WIPY OEM antenna EXT or INT?



  • Hello, i'm using a wipy oem, i'm in face of a problem. The wipy have a thread who act as a webserver, and sometimes (i have actually not find the condition) the wifi signal is lost between html page switch. I search a solution, and it's why i ask you about the antenna of wipy oem. In the source code i use this:
    antenna=WLAN.INT_ANT but if i use WLAN.EXT_ANT i have no difference. But what's the right parameter please? EXT or INT? Thank's



  • @thibault The antenna selection does not matter at all, because the W01 has just one antenna port which will used in any case.



  • @robert-hh i have use my own antenna, but i have to be sure that i use the right call to the wifi:
    wlan.init(mode=WLAN.AP, ssid='Test', auth=None, channel=7, antenna=WLAN.EXT_ANT) or wlan.init(mode=WLAN.AP, ssid='Test', auth=None, channel=7, antenna=WLAN.INT_ANT)? With you answer i think the twice is fine, but i don't want to make a misconfiguration :) Thank's



  • @thibault The W01 WiPy OEM module has no built-in antenna at all. You have always to attach your own antenna, and in that case the antenna selection does not apply.



  • Thank's robert-hh, i have try to use this configuration:

    from machine import Pin
    p12 = Pin("P12", Pin.OUT)
    p(12)=1
    wlan.init(mode=WLAN.AP, ssid='Test', auth=None, channel=7, antenna=WLAN.EXT_ANT)
    

    and

    from machine import Pin
    p12 = Pin("P12", Pin.OUT)
    p(12)=0
    wlan.init(mode=WLAN.AP, ssid='Test', auth=None, channel=7, antenna=WLAN.INT_ANT)
    

    But i have also the same wifi strength signal. I use the OEM wipy, wich have an internal antenna?



  • @thibault There is a bug in the code in that selecting the antenna port does not work for newer modules like WiPy3, LoPy4, FiPy, ...
    As a work-around, set P12 as output before changing the antenna, like:

    from machine import Pin
    p12 = Pin("P12", Pin.OUT)
    

    Since the antenna select more or less only switches P12, you can then (using the code above) do that also with p12(0) for internal, and p12(1) for external antenna.



Pycom on Twitter