WiPy 3.0 getting started issues



  • Just started with my freshly received WiPy 3.0 and pymakr plugin for Atom.
    WiPy is started and blinking with blue light.WiFi AP is ready. Connexion works and I was able to upload a simple boot.py in order to connect to my home WiFi. And it is not working as expected:

    • After reset boot.py is not executed. I still see the AP and WiPy is not connected to my network.

    • When bood.py is started from Pymakr there is no errors, WiPy is connected to my AP (ping ok) but Telnet connexion is not working. When I am connecting I am getting REPL prompt which is truncated somewhere in the middle.0_1515010888116_boot.py

    • I wrote another script. Which should turn off the heartbeat and light a green light instead. Tested line by line in REPL and works. When I start the script from Pymakr it stops the heartbeat but no green light. Still no errors.
      0_1515011000326_test.py

    Ok. I read the forum and 1st thing to do should be a firmware update. I have no expansion board so I took a usb-serial controller (with 5-3.3v jumper as suggested) configured for 3.3v and connected Tx Rx to P0,P1.

    • On the serial console nothing happens at all. No REPL prompt, just nothing. It looks like connected (if I inverse Tx and Rx CuteCom doesn't echo what I am sending, so I hope this means that communication happens)

    • Pymakr plugin just ignores the setting if I put the TTY port device in the location. It still tries to connect to the default IP.

    What am I doing wrong?



  • Thank you. Everything works now. I hope that pymakr will be fixed as well.


  • administrators

    @artiom That's a timing issue. I suggest you adapt your code as follows:

    import pycom,time
    pycom.heartbeat(False)
    time.sleep(.1)
    pycom.rgbled(0x00ff00)
    print("Done")
    


  • Well. Pymakr aside, what is wrong with my code so the led is not turned on when I run it as a script?
    I mean even if I put the code into main or boot the result is the same. Hearbeat is off, but no led is on.



  • This post is deleted!

  • administrators

    @artiom Can you please post (or send via PM) the following additional details:

    • echo $USER
    • cat /etc/group |grep dialout
    • ls -l /dev/ttyUSB*

    Directly after plugging in the serial device:

    • dmesg | tail -15


  • Some more progress in this story.

    After added led code to boot.py and main.py (with different colors) it appears that boot.py suddenly works. WiPy connects to my network on boot. A have not changed anything in my config. Still using Atom. Uploaded files via WiPy's access point using Pymakr. The only thing is that picocom was connected while I was doing all those manipulations.
    Now I can connect to it using my subnet's address.

    Remaining points:

    • Pymakr still cannot connect on ttyUSB0. I am using linux and have the right permission, because picocom run under the same user works.

    • Led code from main or boot only turns off hearbeat but doesn't turn on the led.


  • administrators

    If you are using linux just double check the user running atom has the correct permissions for the serial port. Sometimes atom does fail to connect properly, once you see atom say connected, try starting the board, making sure to remove the wire connecting P2 to ground so that the device boots into normal mode.

    Just to trouble shoot a bit more can you try changing the LED colour in main.py rather than boot.py to see if this makes any difference? Also try uploading via FTP and see if that works. These will help us narrow down what might be causing your issue.



  • Well I found a trick to start the upgrade. After connecting serial to USB I have to reset WiPy and after that serial console works. I upgraded the firmware.
    This solved only part of the issues.

    • I found that in Pymakr there is also "Project Configuration". I have to put new device address there rather than to global configuration. Still it doesn't connect. I only see a message : "Connecting on /dev/ttyUSB0". At the same time picocom works well on the same port (of cause picocom is disconnected when I try Pymakr). No REPL prompt, Download does nothing, no errors.

    • boot.py is still not executed at boot. If I run it manually it still works as before.

    • My test script still not turning green light on. Even tried directly through the console:

    execfile("test.py")
    Done

    Heartbeat stops but still no green light.


  • administrators

    Hi,

    If you havn't updated your WiPy 3.0 firmware before trying to use it, please do this. This is a know issue with the version of the firmware the device shipped with and it should work correctly once updated.

    if you don't have a one of our base boards you will need to connect RX, TX and ground to your USB UART adapter. You then need to tie P2 (fourth pin down on the left hand side) to ground and reset the board by pressing the button. When P2 is tied low during boot the device goes into bootloader mode. You should then be able to use our firmware upgrade tool to update your module. If you want to use the REPL then do not tie P2 low and connect to the UART at 115200 baud.


  • administrators

    @artiom You should at least see some messages over serial (115200bps, 8n1) when pressing the reset button on the WiPy3, otherwise the serial connection isn't working properly. To put the module into firmware update mode, you also need to connect a jumper wire between P2 and GND. In that case the module should show some messages and Waiting for download on the serial port after pressing the reset button.

    If you see those messages then the firmware update tool should work.



Pycom on Twitter

Looks like your connection to Pycom Forum was lost, please wait while we try to reconnect.