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

    Pymakr unable to connect to LoPy in STA mode

    Scheduled Pinned Locked Moved MicroPython
    9 Posts 3 Posters 2.9k 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.
    • K Offline
      Keptenkurk
      last edited by Keptenkurk

      Getting my feet wet with Pymakr (1.0.0.b5). Connecting the LoPy (0.9.1.b1) only succeeds in AP mode at 192.168.4.1
      In STA mode at DHCP aquired address Pymakr doesn't connect.
      FTP, Telnet connect fine though. No other active sessions when trying to connect Pymakr.
      Any clues?

      A 2 Replies Last reply Reply Quote 0
      • A Offline
        abilio @Keptenkurk
        last edited by

        @Keptenkurk Thank you for the report. This has been seen in another cases, and we're working on a solution for it. Stay tuned for the upcoming Pymakr release.

        1 Reply Last reply Reply Quote 0
        • A Offline
          abilio @Keptenkurk
          last edited by

          Dear @Keptenkurk,

          After looking very hard to reproduce the error, we came up with a "most probable reason", but we need confirmation from your side.

          Does the code that switches the board to STA skips the process if it's a soft reboot, or it reprograms the WiFi it every time it runs?. If the latter is the case, the LoPy/WiPy will drop the connection for a brief moment while configuring the radio, but long enough to be noticeable.

          As Pymakr does a soft-reboot when trying to connect, it detects that short drop as a communication problem, hence the failure message.

          If you want more details on how to detect and skip the setup on soft reboots, please look at the following post:
          https://forum.pycom.io/topic/104/boot-py-wifi-script

          Looking forward for your feedback, hoping this post helped,
          Abilio

          K 1 Reply Last reply Reply Quote 0
          • A Offline
            arnaudw
            last edited by

            Hello,

            Same problem here :
            It works with FTP but not with PyMakr : it connects sometimes to PyMakr but can't stay connected and sometimes it doesn't connect at all.
            I use W10 pro, Python from PyMakr package (no installed before) and the same versions used by @Keptenkurk (PyMakr 1.0.0.b5 & Firmware 0.9.1b1).
            Hopes it can help.
            Great product moreover :)

            A 1 Reply Last reply Reply Quote 0
            • A Offline
              abilio @arnaudw
              last edited by

              Hi @arnaudw, can you confirm you're having this problem with the STA mode? can you confirm if you set it to STA every time it boots, or you skip doing it if the boot cause was a soft-reboot?

              1 Reply Last reply Reply Quote 0
              • K Offline
                Keptenkurk @abilio
                last edited by

                @abilio I use a script like you just posted here but indeed without the check for reboot cause with "machine.reset_cause() != machine.SOFT_RESET:" To my understanding and experience that was not implemented yet in LoPy firmware.
                However i didn't check if the "partial implementation" of machine.reset_cause in 0.9.1.b1 (whatever that is) fixes enough of it to become usable in the boot.py script.
                Will try again tonight. The explanation sure makes sense!

                A 1 Reply Last reply Reply Quote 0
                • A Offline
                  abilio @Keptenkurk
                  last edited by

                  @Keptenkurk Yeah, you're totally right, the original LoPy firmware (0.9.0.b1) didn't implement it.

                  K 1 Reply Last reply Reply Quote 0
                  • A Offline
                    arnaudw
                    last edited by

                    Indeed @abilio and i use the script on the wiki : https://docs.pycom.io/lopy/lopy/tutorial/wlan.html (in boot.py) to connect to my wifi router.

                    1 Reply Last reply Reply Quote 0
                    • K Offline
                      Keptenkurk @abilio
                      last edited by

                      @abilio Succes!! Adding machine.reset_cause() != machine.SOFT_RESET: did the trick.
                      Pymakr is now able to connect to the LoPy on its STA address.
                      Thanks for the great support!

                      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