Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Issue Resolved: WiFi connection using 192.168.4.1

    Scheduled Pinned Locked Moved FiPy
    wlan192.168.4.1
    4 Posts 3 Posters 709 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • D Offline
      DDA
      last edited by DDA

      Hi,
      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')
      
      
      
      1 Reply Last reply Reply Quote 0
      • T Offline
        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', '8.8.8.8'))
        

        See here:

        • https://docs.pycom.io/firmwareapi/pycom/pycom.html#pycomwifionbootenable
        • https://docs.pycom.io/firmwareapi/pycom/network/wlan.html

        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.mode(), wlan.ssid() and wlan.auth() after boot and see what the current setup is.

        1 Reply Last reply Reply Quote 0
        • P Offline
          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?

          1 Reply Last reply Reply Quote 0
          • D Offline
            DDA
            last edited by DDA

            @throwaway
            Re: Issue: WiFi connection using 192.168.4.1
            Thanks much. Per suggest AP mode was not O, manual wlan.init(), did the trick, and its working:

            >>> 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')
            >>>
            

            Thanks much!!

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • 1 / 1
            • First post
              Last post

            Pycom on Twitter

            Pycom