Firmware Update Fails
-
I am using a linux desktop (Debian (jessie) + python 2.7.9) without a wireless network interface.
I can connect to my WiPy 2.0 using USB, but when trying to update the firmware the updater fails to connect after I select the device path and the speed. Am I right in guessing that the updater is trying to connect to the default IP address advertised by the WiPy (192.168.1.1)?
I wouldn't worry about updating at this stage if it wasn't for the fact that I can connect to my wireless AP from the WiPy, but when trying to connect to my WiPy using ftp or telnet if I specified a username or password when setting up the server all incoming connections are rejected which doesn't seem right.
print (os.uname())
(sysname='ESP32', nodename='ESP32', release='0.9.0b', version='1f7bdfd on 2016-10-09', machine='WiPy with ESP32')Mike T.
-
The updater uses USB for transferring the image. If you already had a REPL prompt though USB with simple tools like screen or picocom, the connection part should be OK.
If not,- check the cable, the access rights (UDEV rules).
In any case: - did you connect G23 and GND and pus reset afterwards?
- check whether your PC has access to the Internet, because the image is retrieved on-the-fly during update.
- try to reduce the speed.
- check the cable, the access rights (UDEV rules).
-
I was getting the error 'Something failed trying to connect to the device.' Taking a closer look at the script I could see that it called updater.py and if I tried to run the updater.py I got an error indecating I was missing a module.
./bin/updater.py --port /dev/ttyUSB0 --speed 115200 Traceback (most recent call last): File "./bin/updater.py", line 10, in <module> from esptool import ESP32ROM File "~/pyupgrade/bin/esptool.py", line 25, in <module> import serial ImportError: No module named serialInstalling python-serial fixed that problem
apt-get install python-serial Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: python-wxgtk3.0 python-wxgtk The following NEW packages will be installed: python-serial 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 66.6 kB of archives. After this operation, 413 kB of additional disk space will be used. Get:1 http://ftp.uk.debian.org/debian/ jessie/main python-serial all 2.6-1.1 [66.6 kB] Fetched 66.6 kB in 0s (233 kB/s) Selecting previously unselected package python-serial. (Reading database ... 57684 files and directories currently installed.) Preparing to unpack .../python-serial_2.6-1.1_all.deb ... Unpacking python-serial (2.6-1.1) ... Setting up python-serial (2.6-1.1) ...But I now get the error 'Something failed trying to contact the server.', both wget and curl are installed - and it seems to try to down load a file but the down load seem to fail almost immediately as the temporary file just contain a blank line and three zeros.
cat tmpfile <blank line> 000#Not sure what to try next...
-
I did trying to edit this post to delete 'I putitalicised text' but I just get the message
'Error Post content was flagged as spam by Akismet.com' - sigh... -
The update script appears to be trying to retreive the file using the following command but it doesn't look like it is working - or do I have the latest firmware already?
curl -sL -w \n%{http_code} -d {"wmac": "240AC4xxxxx", "toolversion": 67633794, "name": "wipy.wipy with esp32", "smac":[{"id": "", "type": "lpwan"}]} -H Content-Type: application/json https://software.pycom.io/device/insert n000n000n000n000n000n000n000n000n000# -
@mike632t
No, updater tool did not check if you have version already it is because you can have version already but with some error - and you can reflash it once again with same version "fixed"your problem is that you use Linux - i am joking ;-)
I know that this is not helpful but on Windows there are no problem with this at all. -
Well, I never had any problem when using Linux, with both types of updaters. I would not even consider a second to use Windows for that task.
@mike632t: Do you use the most recent updater tool, and do you have access to the site, wget tries to get the image from? -
@robert-hh
I used 'wget' to download the updater last night so I'm reasonably sure it is the current version.The problem looks like the 'curl' command (see below). I did try connecting directly to my router (I normally connect from behind a firewall) but it makes no difference. Unfortunately I have no idea what the output means.
I'll try uninstalling 'curl' later which should force the updater to use 'wget' and see if that makes a difference.
Mike T.
-
In this thread @bucknall was mentioning a problem in the Linux updater, not sure if this related.
-
@livius
LOL - I generally find that the problem with windows is windows :-) - unfortunately I have to use it at work.I have not used Windows at home for years, I think I have an old XP box somewhere but drivers for the USB serial interface could be a problem...
Mike T.
-
@mike632t
:) :) :)For XP you can fiund drivers too - but on XP (laptop) i have UART TTL -> USB converter and work ok
I do not know if the same will be for drivers for expansion board -
Thanks @jmarcelino!
I believe the Linux Firmware Updater should be working correctly now!
@mike632t I'd suggest a couple of things:
- Ensure all the headers on the expansion board are connected
- Try changing USB port on your computer
- Do you have the jumper cable connected across pins GND and G23 on the expansion board? (I know it's been asked but this is normally the cause!)
-
- Yes they are
- Tried that makes no difference
- Yes and the initial serial communication to detect the type of device works.
Serial communication with the 'console' works on all the ports I've tried, and the script is able to communicate with the board to discover what type of device it is but it exits when it checks the contents of the temporary file that it tried to download from the web using curl.
Mike T.
-
@mike632t Hmm odd, let me check this internally! Will get back to you ASAP!
-
Is it possible to update without the USB? I only have wifi connection to my Wipy and using the iOS app failed..
-
@robmarkcole
at this time no - only RS232 (or UART TTL -> USB converter) -
@livius thanks :)
-
@livius I saw a youtube video yesterday where the guy used a nodeMCU to provide the UDB-sserial connection for a Lopy, is there a guide? I have a nodeMCY (bricked), raspberry pi and a particle photon available..
-
I would assume that they simply used the USB/Serial chip on the NondeMCU for that purpose, connecting RX-RX and TX-TX of the two devices. The nodemcu board has to be powered for that purpose. The problem is to get the TX pin of the NodeMCU to high impedance and have the NodeMCU to be silent. One guess would be to keep in in reset (pull reset low).
A similar approach is sometimes told with an Arduino. -
@robert-hh Thanks for the info, if I get it working I will make a post :)
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