vThings Forums

Full Version: Unable to update NDIR vAir - CO2 Monitor FW
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi,

I am trying to update the firmware of my NDIR vAir - CO2 Monitor to the latest version.
However I get the following error:

vAir found on : COM3
received:vAir CO2 Monitor: v1.9.3
Visit 'vair-monitor.com' for configuration details

sending: proxy
received:proxy
ESP Proxy

received:‚‚ò—=‡>ŠIЇÿþ
vAir - WiFi Module v1.6.1
ready
Waiting for auto-connect

received:IP address: 192.168.1.102 in 4033 ms
GOT IP

sending: otah
received:Starting Web update, mode 1

received:HTTP_UPDATE_FAILED
>

Tried it a couple of times.
Any idea what's going wrong?

Kind regards,

Peter
Hi Peter,

I had this problem for few weeks, where the default update location was from Github via HTTPS, and at some point of time it turned out that the firmware does not have enough memory at start so that an update over HTTPS is possible. As a result i had to rewrite a big part of it to fix this and also moved the location to an http server. So to update from this version what you need to do is:


  1. Download and extract the zip file with the fw from there : http://anker-bg.com/vlast3k/vair/fw.zip
  2. Via the config tool, send command "proxy", and then once it connects to your wifi - "otau" - this will start local fw update. it should say
    Starting OTA...Ready
  3. in the folder where you extracted the archive, start "espota.py -i 192.168.1.124 -f latestVairGit.bin" (change the ip address the the one of your device) (you may need to download some python if you do not have it, version is not important)
  4. this will update to the fixed version that updates over http and the device will restart
  5. once it restarts and connects to Wifi again it should be version 1.10.4, and then trigger "otah" - this will automatically update to 1.13
I am sorry about this.. there are a lot of things to learn in this area (mostly that i need to test more Smile)) )

Regards, Vladimir
Hi Vladimir,

Ok. Tried to follow the steps you described, however at step3 I get the following error:

D:\Downloads\fw>"c:\Program Files (x86)\Python\python.exe" espota.py --i 192.168.1.102 -f latestVairGit.bin -d -r
22:11:27 [DEBUG]: Options: {'esp_ip': '192.168.1.102', 'auth': '', 'esp_port': 8266, 'progress': True, 'spiffs': False, 'debug': True, 'image': 'latestVairGit.bin'}
22:11:27 [INFO]: Starting on 0.0.0.0:25080
22:11:27 [INFO]: Upload size: 310128
22:11:27 [INFO]: Sending invitation to: 192.168.1.102
Traceback (most recent call last):
File "espota.py", line 302, in <module>
sys.exit(main(sys.argv))
File "espota.py", line 297, in main
return serve(options.esp_ip, options.esp_port, options.auth, options.image,
command)
File "espota.py", line 91, in serve
sent = sock2.sendto(message, remote_address)
TypeError: a bytes-like object is required, not 'str'

Any idea what's going wrong here?

Regards,

Peter
hmm.. which python version are you using, maybe it indeed does matter, at least such a suggestion did i found in one forum, can you try with 2.7.x? i have 2.7.8
I was using 3.5.x. So now I tried with 2.7.8 and looks better, however, now it seems I got a connection, but after a short while the connection is aborted:

D:\Downloads\fw>espota.py -i 192.168.1.102 -f latestVairGit.bin -d -r
23:10:48 [DEBUG]: Options: {'esp_ip': '192.168.1.102', 'image': 'latestVairGit.bin', 'auth': '', 'esp_port': 8266, 'spiffs': False, 'debug': True, 'progress': True}
23:10:48 [INFO]: Starting on 0.0.0.0:24071
23:10:48 [INFO]: Upload size: 310128
23:10:48 [INFO]: Sending invitation to: 192.168.1.102
23:10:48 [INFO]: Waiting for device...
23:10:58 [ERROR]: No response from device

In the vThings app I see the following response when starting the upload, but after a couple of seconds in ends with an error.

received:Start
Progress: 0%

received:Error[2]: Connect Failed
Error[4]: End Failed

Never mind... firewall was blocking communication on port 8266. After temporary disabling my firewall I was able to upload the firmware
Great Smile