Issue Resolved: WiFi connection using 192.168.4.1
DDA last edited by DDA
I have been so far been using my FiPys with VS studio and USB connection with PyTrack for months without trouble. But, now I need to switch my connection to Wifi or BLE ( as my Fipy needs to be removed from PyTrack and moved to my own dev board) . I tried the steps defined under VS Studio section and followed some of the forum blogs but I don't seem to see the 192.168.4.1 connection working. I have added my WLAN SSID details etc into my boot.py and tried connecting with my PC's WIFi with
"FiPy-wlan-6bfc" or "FiPy-wlan" and passowrd :www.pycom.io but I am sure I am doing something wrong. Please advise.
Connecting on COM25... Found 5 serialports COM25 (FTDI) (copied to clipboard) COM1 ((Standard port types)) COM18 (Brother) COM4 (Intel) COM3 (SUNIX Co., Ltd.) >>> os.uname() (sysname='FiPy', nodename='FiPy', release='1.18.1.r7', version='v1.8.6-849-d1c5ea9 on 2018-12-17', machine='FiPy with ESP32', lorawan='1.0.2', sigfox='1.0.1')
DDA last edited by DDA
>>> import pycom >>> from network import WLAN >>> wlan=WLAN() >>> wlan.mode() 2 >>> wlan.init() >>> wlan.mode() 1 >>> wlan.ssid() 'lopy-wlan-4080' >>> wlan.auth() (3, 'www.pycom.io') >>>
Paul Thornton last edited by
Just to confirm. You can see the FiPy's wireless network and connect to it with the pc. but still cant access the fipy?
throwaway last edited by
Out of the box I believe the device will enable WiFi and configure itself as an access point, behaving as if you have done something like:
import pycom from network import WLAN # https://docs.pycom.io/firmwareapi/pycom/pycom.html#pycomwifionbootenable pycom.wlan_on_boot(True) wlan = WLAN() wlan.init(mode=WLAN.AP, ssid='wipy-wlan', auth=(WLAN.WPA2,'www.wipy.io'), channel=7, antenna=WLAN.INT_ANT) # id=1 is for configuring the AP mode wlan.ifconfig(id=1, config=('192.168.4.1', '255.255.255.0', '192.168.4.1', '126.96.36.199'))
If you scan for WLAN networks on your PC you should be able to see the FiPy device if it's in AP mode.
If not, it might be because you have fiddled around with the WLAN configuration so that the device will boot up as an AP configured with your WLAN SSID details (as opposed to connecting as a station to that WLAN SSID).
You can tell by calling
wlan.auth()after boot and see what the current setup is.