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 will not connect - inconsistent following firmware 0.9.3.b2

    Scheduled Pinned Locked Moved Pymakr
    26 Posts 9 Posters 11.9k Views 9 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.
    • R Offline
      Ralph
      last edited by

      @AgriKinetics @MainSheet One thing you should try is adding this line to your boot file, above your wifi code

      if machine.reset_cause() != machine.SOFT_RESET: 
      

      What happens is that Pymakr sends a soft reset after connecting to the device, making boot.py run and re-initiate the wifi connection, which in turn breaks the connection. This line prevents that. Check the docs for more info

      M 1 Reply Last reply Reply Quote 0
      • A Offline
        AgriKinetics
        last edited by

        @Ralph Thank you very much - your answer was spot on :) All working again!

        1 Reply Last reply Reply Quote 0
        • M Offline
          MainSheet @Ralph
          last edited by

          thanks @Ralph, yes that did help things.

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

            Hi @Ralph and @MainSheet I am using the same versions and OS as @MainSheet and getting the same issues. I'm not sure how to access the boot.py to edit this. I've tried via FileZilla (host: 192.168.4.1 user: micro pwd: python) it using the Site Manager while connected and not connected to the lopy-wlan but it just times out. I have ping-ed it and it's fine. Did you have to install the FTDI drivers and if so, is there a user-friendly instructions on which one to install and how to install it? I'm looking into www.ftdichip.com but there's three of them and I've got limited knowledge and don't want to blindly change my computer driver and registry settings. Help please!

            1 Reply Last reply Reply Quote 0
            • R Offline
              Ralph
              last edited by

              HI @kwix,

              For FTP you don't need the FTDI drivers. Make sure you follow these exact instructions. Notice the passive mode and don't forget to configure the 'one data connection at a time'.

              If that works, place the REPL script in the boot file and try to connect via pymakr or commandline. Very probably windows either already has the ftdi drivers or will try to install them automatically when first connecting the expansion board to your pc.

              K 1 Reply Last reply Reply Quote 0
              • K Offline
                kwix @Ralph
                last edited by

                @Ralph thanks for the help. I've missed off selecting the passive mode and now I am able to access the boot.py file. I've updated the boot.py file to something like below:

                0_1479173265574_upload-83f54b0f-935f-4816-8784-499d79006457

                I've tried both with and without the commented "import machine"

                When I go to Pymakr, it reaches REPL then after a few seconds the popup window with Warning QStackedWidget::setCurrentWidget: widget ... appears. I'd click OK to close the window then I get the same error message that an error occurred while communicating with the Pycom device:

                0_1479173486024_upload-dd21b05c-28f6-41c3-88bf-e7d44f0070af

                After that it will just keep displaying the same error message until I "reset" the device (unplug and plug the USB cable into the LoPy) and reconnect to the lopy-wlan. Also, is it normal to "reset" the LoPy everytime I switch between Filezilla to edit the boot.py and PyMakr to test it?

                Please suggest a better approach for this as I think I might end up breaking the board if I keep on doing this.

                1 Reply Last reply Reply Quote 0
                • R Offline
                  Ralph
                  last edited by

                  @kwix Good to see you made it a step further.

                  The import machine is definitely needed, since you're using it on line 11. First of all, after editing the boot.py file, you need to reboot the device so that it actually executes. Pressing the reset button on the board is enough.

                  From your screenshot of the device console in Pymakr, I see that it does connect the first time, but then imidiately disconnects again, and after that doesn't manage to reconnect. I suspect the code breaks somewhere shortly after connecting. A good way to debug is to keep a telnet connection open from the commandline while trying to connect from Pymakr. This way you can see if any exception occurs that messes things up.

                  The QStackedWidget error will be fixed in the next release (either this weer or next week) but you should still get it to connect anyway. We will definitely improve Pymakr's error messages so you can get more info on this in Pymakr itself.

                  Let me know if that helps or if you manage to get more information on the issue you are having.

                  K 1 Reply Last reply Reply Quote 0
                  • K Offline
                    kwix @Ralph
                    last edited by

                    @Ralph hiya - thanks for the detailed response. I have a kept the telnet connection open and it seems to be working fine:

                    0_1479339966903_upload-803ca7d0-56b8-4bef-bd73-36d7d222d9ba

                    I tried connecting to Pymakr again while telnet connection is open, and now I am only getting error message, unlike before where it connects for a few seconds before it disconnects again:

                    0_1479340035521_upload-569f5273-7b43-429f-8042-db950597588c

                    I don't get any messages from command line of the telnet connection but I got a different pop-up error message from the Pymakr:
                    [0_1479340260779_LoPy-ErrorMsg.txt](Uploading 100%)

                    Not sure if this is related to this or just a result of me disconnecting to lopy-wlan so I can post this entry.

                    Is there any other places where I can see some logs? Or maybe i'm just doing something wrong/missed off?

                    1 Reply Last reply Reply Quote 0
                    • R Offline
                      Ralph
                      last edited by

                      Hi @kwix, which firmware version are you using? We discovered a bug that's in the latest few versions (0.9.3.b2 and up, as far as we know), that makes the connection to Pymakr fail (this issue) It could be that this is your problem, in which case you'll have to wait for the next release. Did you try connecting over usb?
                      A good way to check what's going on, is keeping a connection open to the board via the terminal while trying Pymakr, to see what's going on on the board and with your code. If you are using telnet in Pymakr, keep a screen session open to the serial port from the command line. Or the other way around.

                      K 1 Reply Last reply Reply Quote 0
                      • K Offline
                        kwix @Ralph
                        last edited by

                        @Ralph hi again, I tried connecting over USB and kept a screen session open to the serial port and this is what I got when I try to connect via Pymakr:

                        0_1479428518180_upload-a8a2a387-3c1a-4dd5-b739-3ce03e934b73

                        Same error messages obtained in the Pymakr: QStackedWidget Warning, the popup window, though looking at the timestamp, I think it was from yesterday.
                        0_1479428630404_upload-d78be6d2-ce02-42a9-a8bb-edf50f12ea58

                        In addition to those, another pop-up message appears:
                        0_1479429208151_upload-f63e8ee1-71a3-438e-8868-e326f5049472

                        I've checked my device manager and it recognises whatever's plugged into COM3 as an FTDI device. I'm probably doing something wrong here - I have not come across anyone else having the same issues as I am :(

                        I will just wait for the next release and hopefully it would work out - unless you have other suggestions that I should try? Really appreciate your immediate response.

                        R 1 Reply Last reply Reply Quote 1
                        • L Offline
                          livius
                          last edited by

                          @kwix
                          i have exactly the same - you are not alone

                          think about people first, then computers

                          1 Reply Last reply Reply Quote 0
                          • R Offline
                            rskoniec @kwix
                            last edited by rskoniec

                            This post is deleted!
                            1 Reply Last reply Reply Quote 0
                            • K Offline
                              kwix
                              last edited by

                              @Ralph Can I ask exactly when the next release will be available? Also, forgot to mention the versions I'm using:
                              LoPy 0.9.3.b2
                              Windows 10
                              Pymakr 1.0.0.b6
                              Device:COM3

                              @livius that's nice to know! though I meant in general...or most people are just not using Windows. Will attempt to use Mac OS X, hoping I get somewhere.

                              1 Reply Last reply Reply Quote 0
                              • L Offline
                                livius
                                last edited by

                                still can not connect to WiPy2 throught CMM by pymakr with current firmware 0.9.5.b1
                                i work on Windows platform (Windows 10)

                                think about people first, then computers

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

                                  @Ralph @daniel Hi guys, just a quick note of thanks. Following the release of firmware 0.9.5.b1, I can now happily connect to the LoPy's using WiFi and Com (using Windows 7).

                                  Look forward to receiving the new PyMakr which will hopefully get rid of the message related to not being able to contact the PyCom servers within the last 7 days (on startup).

                                  Also thank you @LoneTech for sorting the pin issues (32 and above), that work was much appreciated!

                                  We can at least get on with some testing of the boxes.

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

                                    @Ralph ditto - upgraded to latest firmware 0.9.5b1 and it works on Windows 10 but only if connected via wlan. Thank you for your help - really appreciate your immediate responses.

                                    I've also tried serial connection via putty and Pymakr - it does not work for me and I get the same issues as before (i.e. QStackedWidget warning message, last 7 days error message and error communicating with LoPy).

                                    1 Reply Last reply Reply Quote 0
                                    • T Offline
                                      tarmael
                                      last edited by

                                      I'm also having this problem on Linux and W10.

                                      I received my LoPy's the other day, they worked fine for about a day then they stopped accepting connections.

                                      I've never been able to connect to them via ssh, telnet or COM on Linux or W10.

                                      I can connect to the LoPy AP, and the Pymakr will connect, however it will not let me sync my code to the LoPy.

                                      1 Reply Last reply Reply Quote 0
                                      • H Offline
                                        HellDesk
                                        last edited by

                                        Hi-
                                        I just received my WiPi 2.0 the other day and immediately upgraded the firmware (as I usually do with such things). Now I'm able to telnet into it just fine, and I can use Putty to get a serial console, however Pymakr fails as many others have said.

                                        My boot.py is set to default. Nothing has been changed from factory except that I updated the firmware out of the box.

                                        Here is my boot.py:

                                        import os
                                        from machine import UART
                                        uart = UART(0, 115200)
                                        os.dupterm(uart)
                                        

                                        Any word from Pycom about this? I'm thinking about trying to reach support or going on Github and posting a bug for Pymakr if I can't find one yet.

                                        1 Reply Last reply Reply Quote 0
                                        • L Offline
                                          livius
                                          last edited by

                                          i am able to connect to my WiPy 2 by COM port by newest Pymakr 1.0.0.b7 :)

                                          think about people first, then computers

                                          1 Reply Last reply Reply Quote 0
                                          • H Offline
                                            HellDesk
                                            last edited by

                                            Lucky you.

                                            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
                                            • 2
                                            • 2 / 2
                                            • First post
                                              Last post

                                            Pycom on Twitter

                                            Pycom