Pymakr cannot connect after firmware upgrades


  • Global Moderator

    @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.


  • Global Moderator

    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.


  • Pybytes Beta

    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)


  • Global Moderator

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



  • 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


  • Global Moderator

    @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.



  • 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



  • 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



  • 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.



  • On Linux Mint18 I have updated my Lopy and Wipy2.0 with the update tool.

    On my GtkTerm it shows:

    >>> os.uname()
    (sysname='LoPy', nodename='LoPy', release='0.9.2.b1', version='333b92c on 2016-10-26', machine='LoPy with ESP32')
    >>>
    

    and

    >>> os.uname()
    (sysname='WiPy', nodename='WiPy', release='0.9.2.b1', version='333b92c on 2016-10-26', machine='WiPy with ESP32')
    >>> 
    

    With Pymakr version 1.0.0.b5 both are able to communicate via net on 192.168.4.1, but only the Lopy can communicate via /dev/ttyUSB0, the Wipy2.0 shows only

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


  • The bug is confirmed by abilio
    We must wait for fix

    But in the mentime you can try setting in pymark device as 192.168.4.1 not as COMX



  • I can telnet into the WiPy2.0, so it is not crashing. I can also connect through FTP.
    Connecting from Pymakr through USBSerial or wifi is not possible.

    So connecting to the WiPy is not the issue, Pymakr has the issue.


  • Global Moderator

    Hi @rogierb
    Thanks for all the info. With the right serial port set in the configuration, and the boot.py file setup like you have, Pymakr should be able to connect over serial port. Is there any other code in boot.py or main.py that can potentially crash the WiPy?

    About the first point you mention, where Pymakr doesn't perform the update: This feature is not implemented in Pymakr yet. It's planned for the next release. Sorry for this instructions to be incorrect, we are working on improving the getting started pages as we speak.



  • @Xykon Pymakr 1.0.0.b5, WiPy2.0 firmware 0.9.2.b1. Running a Mac (so no Windows+R ;) )



  • Nothing help and yes 1.0.0.b5 and firmware 0.9.2.b1
    but i have WiPy2.0

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


  • administrators

    Which version of PyMakr are you using? I've just tried with 1.0.0.b5 and the serial connection is working (though it does seem the LoPy is resetting every time I connect).

    Something that might help is to erase Pymakr settings:

    Close Pymakr, press windows + r and enter %APPDATA%\Pycom and remove the files. Now restart Pymakr and see if that helps?

    Are you getting any output in the Pycom console at al?



  • I have the same. telnet work, wifi work
    UART work i can send data throught it and recive by com port monitor
    but PYMAKR can not connect by COM port



  • FYI, my boot.py:

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



  • I am now trying to upgrade the firmware again as described in https://forum.pycom.io/topic/119/firmware-upgrade

    Update: Firmware upgrade to 0.9.2.b1 was succesful, so my Serial connection is working, the problem lies elsewhere....


Locked
 

Pycom on Twitter