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 cannot connect after firmware upgrades

    Scheduled Pinned Locked Moved MicroPython
    39 Posts 11 Posters 17.5k Views 11 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.
    • J Offline
      jonirons
      last edited by

      Confirm I'm having the same problem with Pymakr and wipy1.
      Have set up boot.py to connect to my wlan
      Can connect to board using telnet.
      Can update using FTP

      Can't connect using Pymakr

      I get a popup error dialog with the message:
      Warning:
      QStackedWidget::setCurrentWidget: widget 0x7fe1ccddc0d0 not contained in stack

      Behind the error popup is:
      Connecting to a Pycom device...
      Error while communicating with the Pycom device! (click to attempt to reconnect)

      I'm not sure what to click, but if you go to preferences -> Pycom Device -> Ok
      I get the Error while communicating message again.

      1 Reply Last reply Reply Quote 0
      • S Offline
        stevePy
        last edited by sakis

        Hi,

        I have successfully installed the 0.9.3.b2 firmware onto my WiPy 2.0 and I can connect via Telnet, FTP (FileZilla) and via Tera Term + REPL using the USB virtual UART. Using FileZilla, I have confirmed that my boot.py contains:-

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

        and using Tera Term + REPL with:-

        import os
        os.name()
        

        I have confirmed that the WiPy responds with 0.9.3.b2

        I have installed PyMakr version 1.0.0.b6 onto my Windows 10 pc (same as used for the above) and my WiPy is connected both via WiFi and via the USB serial - as tested and proven to work, above.

        When I try to connect using either the serial (with the correct COM port, as proven via Tera Term + REPL), or via the IP settings (as proven via Telnet and FTP) and the correct micro/python auth, I get the following error message:-

        "Error while communicating with the Pycom device! (click to attempt to reconnect)"

        This issue appears to be connected with the appearance of the PyMakr error message shown below.

        I also occasionally get a message which looks something like: QStackedWidget::setCurrentWidget: widget 0x???????????? not contained in stack

        Regards Steve


        2016-11-09, 10:30:20

        <type 'exceptions.TypeError'>:
        'NoneType' object has no attribute 'getitem'

        File "C:\Program Files (x86)\Pycom\Pymakr\Pymakr\Plugins\PluginPycomDevice.py", line 90, in __onWindowLoad
        self.__ui.showEvent(event)
        File "C:\Program Files (x86)\Pycom\Pymakr\Pymakr\Plugins\PluginLiteUI.py", line 75, in __windowLoaded
        self.__setupToolbars()
        File "C:\Program Files (x86)\Pycom\Pymakr\Pymakr\Plugins\PluginLiteUI.py", line 197, in __setupToolbars
        self.__initLiteToolbar(self.__ui, self.__toolbars)
        File "C:\Program Files (x86)\Pycom\Pymakr\Pymakr\Plugins\PluginLiteUI.py", line 183, in __initLiteToolbar
        for el in self.__ui.getToolbar(bar[0])[1].actions():


        Version Numbers:
        Python 2.7.12
        Qt 4.8.7
        PyQt 4.11.4
        sip 4.16.8
        QScintilla 2.9
        WebKit 534.34
        Pymakr 1.0.0.b6

        Platform: win32
        2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:19:22) [MSC v.1500 32 bit (Intel)]

        Plugins Version Numbers:
        PluginAbout 6.1.0
        PluginAboutPymakr 1.0.0
        PluginCodeStyleChecker 6.1.0
        PluginCompletionJedi 1.0.3
        PluginEricapi 6.1.0
        PluginEricdoc 6.1.0
        PluginFeedback 1.0.0
        PluginFullUI 1.0.0
        PluginLiteUI 1.0.0
        PluginPycomDevice 1.0.0
        PluginPycomStyle 1.0.0
        PluginPycomSync 1.0.0
        PluginREPL 1.0.0
        PluginSyntaxChecker 6.1.0
        PluginTabnanny 6.1.0
        PluginUpdate 1.0.0
        PluginVcsMercurial 6.1.0
        PluginVcsPySvn 6.1.0
        PluginVcsSubversion 6.1.0
        PluginVmListspace 6.1.0
        PluginVmTabview 6.1.0
        PluginWizardE5MessageBox 6.1.0
        PluginWizardPyRegExp 6.1.0
        PluginWizardQColorDialog 6.1.0
        PluginWizardQFileDialog 6.1.0
        PluginWizardQFontDialog 6.1.0
        PluginWizardQInputDialog 6.1.0
        PluginWizardQMessageBox 6.1.0
        PluginWizardQRegExp 6.1.0
        PluginWizardQRegularExpression 6.1.0

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

          same as you. can not connect to wipy2 by pymakr. I pause my work with wipy for 1 month and back to see if all my problems are gone.
          Too much time waisted

          think about people first, then computers

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

            @stevePy Thanks for the stacktrace and other information, I've seen that error once before and will definitely look into that. Same for the QStackedWidget error.

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

              While Rogierb seems to have fixed his problem mine is still there...
              Pymakr 1.0.0.b6
              Wipy 1.0 with v1.8.2.

              Cannot connect using serial connection

              EDIT: after I sorted out my permissions to /dev/ttyUSB0
              I get the same error as below

              QStackedWidget::setCurrentWidget: widget 0x3a38abc not contained in stack

              hugo

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

                @hugo We are working on the QStackedWidget error, which will be solved in the next release.

                1 Reply Last reply Reply Quote 0
                • D Offline
                  dg66 Pybytes Beta
                  last edited by

                  I can confirm that i'm unable to connect via serial with pymaker. I am able to use screen to connect so it is not a wipy related problem (like code crashing). I'm using pymakr 1.0.0b6 under ubuntu 16.04 on a brand new wipy2 with the latest firmware and no additional code. Connecting with rshell also work fine. Pymakr is configured to connect through the correct serial (/dev/ttyUSB0)

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

                    Hi @dg66, Assuming you do have the REPL code enabled in your boot.py and do not have any other connections open to the board while trying to connect from Pymakr, I suggest you first try the latest firmware release from yesterday evening which has some stability improvements: https://www.pycom.io/support/supportdownloads/.

                    Let me know if that helps, otherwise we'll go into more detail to debug your issue.

                    D R 2 Replies Last reply Reply Quote 0
                    • R Offline
                      Ralph
                      last edited by

                      @jonirons
                      One thing that could be going wrong, is the wifi code in your boot.py file. Pymakr does a soft reset when connecting, so you need this check just above your wifi code (see example):

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

                      This prevents your wifi connection to be reset when you connect using pymakr.

                      Let me know if that helps with your issue.

                      J 2 Replies Last reply Reply Quote 0
                      • L Offline
                        livius
                        last edited by

                        Pymakr can not connect to WiPy2 with newest firmware also.

                        i got message

                        pymakr - Error getting versions information
                        ---------------------------
                        The versions information could not be downloaded for the last 7 days. Please go online and try again.
                        ---------------------------
                        OK   
                        ---------------------------
                        

                        and trying to connect by pymakr

                        Error while communicating with the Pycom device! (click to attempt to reconnect)
                        Connecting to a Pycom device...
                        

                        and strange it now restart my device
                        tested on Windows 10

                        think about people first, then computers

                        1 Reply Last reply Reply Quote 0
                        • J Offline
                          jonirons @Ralph
                          last edited by

                          @Ralph Yes - I tried that.
                          The loop waiting for "not wlan.isconnected() caused a watchdog timeout (took 8 seconds to finish) and watchdog timer HALTED the machine (I've posted this issue on this forum). The only way out was to wipe the flash. I then removed that code from boot.py, and put it in a sample.py file, and discovered that watchdog feeding is not available (also posted somewhere on the forum).

                          The difference between my code and the example is the use of 'dhcp'. I've also posted somewhere or other that dhcp on WiPy2 takes 10 seconds, whereas on WiPy 1 it takes a bit under 2 seconds.

                          If 'dhcp' is not yet properly supported this would be useful to know, as would watchdog feeding, no support for RTC etc.

                          We really do need to know what is working, what isn't, and when it might be fixed.

                          More particularly those who haven't bought a device yet need to be advised that the software doesn't yet support all features.

                          if machine.reset_cause() != machine.SOFT_RESET:
                          wlan.init(WLAN.STA)
                          # configuration below MUST match your home router settings!!
                          wlan.ifconfig(config=('192.168.178.107', '255.255.255.0', '192.168.178.1', '8.8.8.8'))

                          if not wlan.isconnected():
                          # change the line below to match your network ssid, security and password
                          wlan.connect('mywifi', auth=(WLAN.WPA2, 'mywifikey'), timeout=5000)
                          while not wlan.isconnected():
                          machine.idle() # save power while waiting

                          P 1 Reply Last reply Reply Quote 0
                          • P Offline
                            PatSenn @jonirons
                            last edited by

                            @jonirons @Ralph
                            Maybe I am just to new to this system, but I am having problems locating boot.py. I searched the folders that I could and found nothing. How do I view the '/flash' folder?

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

                              @livius thanks for notifying this, l'll check if our update system is causing this version information error.

                              I'm also still unable to connect Pymakr with the latest firmware version. This issue is probably the cause of this, perhaps somehow also involved in preventing connection over serial. We'll be working on a fix for this very soon.

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

                                @jonirons said in Pymakr cannot connect after firmware upgrades:

                                We really do need to know what is working, what isn't, and when it might be fixed.

                                I completely agree with you and we are working on improving this. Step one is making more use of the new repo's on github for tracking issues.

                                My colleagues will take care of your watchdog questions in those topics, since that's not my field of expertise.

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

                                  @PatSenn
                                  You can indeed find the boot.py and main.py files in the /flash folder. Use FTP to download them to a folder on your pc. After this, you can go to Pymakr, create a new project for this folder and start coding and syncing code to the device from there. You can also skip the FTP download part and create new boot and main files from Pymakr.
                                  Let me know if this helps you to get started.

                                  1 Reply Last reply Reply Quote 0
                                  • D Offline
                                    dg66 Pybytes Beta @Ralph
                                    last edited by

                                    @Ralph thx for the answer. I will give it a try tomorrow.

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

                                      @Ralph Hi Ralph, I just upgraded to Pymakr 1.0.0.b6 and Wipy to (sysname='WiPy', nodename='WiPy', release='0.9.4.b1', version='bc42ea7 on 2016-11-14', machine='WiPy with ESP32')

                                      Still these issues:

                                      • Connecting over USBSerial doesn't work (Yes, I have the correct REPL code on boot.py)
                                      • Connecting over Wifi does work, but Pymakr crashes with "QStackedWidget::setCurrentWidget: widget 0x7fb7b85bdf70 not contained in stack"-error

                                      Connecting over wifi through telnet and doing some stuff on the command line works fine.

                                      (edit: after displaying the "setCurrentWidget"-error, my telnet is dead, I need to reboot the device)

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

                                        Hi @rogierb, There are two bugs responsible for this behaviour, with the versions you are using. One in the firmware that causes the USB Serial not to function and one in Pymakr that causes the QStackedWidget error. Both bugs have now been fixed and will be released soon.

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

                                          @Ralph Hi, any idea on when the fixes will be released?

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

                                            @richardkt Next week we'll release a new version of Pymakr, as well as a firmware update.

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

                                            Pycom on Twitter

                                            Pycom