Open ted1735 opened 5 years ago
Thanks for finding that issue. I think it might be a difference between Linux and windows versions of avrdude, but regardless, I see some things I need to xhange/include (such as avrdude itself) in the pyinstaller files.
Running the 'webcontrol-0.906-rpi-singledirectory' version, the firmware update option seems to be looking for avrdude on a Windows-style path, so it fails. The web page reports 'update complete' though.
pi@pi4:~/webcontrol $ ./webcontrol
Initializing Logger
/home/pi/.WebControl/log.txt
/home/pi/webcontrol
Initializing Configuration
Camera initialized
##
raspbian gnu/linux
##
----
rpi
singledirectory
----
VIDEOIO ERROR: V4L: can't open camera by index 0
/home/pi
Starting Console Queue Processor
/home/pi/.WebControl/webcontrol-*.port
-$$$$$-
/home/pi/webcontrol/main.py
/home/pi/webcontrol
-$$$$$-
opening browser
check for pyrelease
0.906
v0.906
webcontrol-0.906-rpi-singledirectory.tar.gz
https://api.github.com/repos/madgrizzle/WebControl/releases/assets/15259000
{"hostAddress": "127.0.1.1:5000"}
connected
1c09b890a2ee4e4ba5021281ddd00b92
Attempting to re-establish connection to controller
starting UI
connecting
Connected on port /dev/ttyACM0
Sent G20
I'm connected!
Sending Board Data
Sent Board Data
Sending Board Cut Data compressed
Sent Board Cut Data compressed
Sending: B05
WebControl 1.27
Firmware Version 1.28
Sending: G20
Sending: $$
/home/pi/webcontrol/firmware/maslowcnc/*.hex
portClosed0
connection closed at serialPortThread
/dev/ttyACM0
/home/pi/webcontrol
/home/pi/webcontrol/firmware/maslowcnc/maslowcnc-1.26.hex
"C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude" -Cavr/avrdude.conf -v -patmega2560 -cwiring -P/dev/ttyACM0 -b115200 -D -Uflash:w:/home/pi/webcontrol/firmware/maslowcnc/maslowcnc-1.26.hex:i
sh: 1: C:\Program Files (x86)\Arduino\hardware\tools\avr\bin\avrdude: not found
32512
closing modals
{"title": "Actions"}
connecting
Connected on port /dev/ttyACM0
Sent G20
Sending: B05
WebControl 1.27
Firmware Version 1.28
Sending: G20
Sending: $$
/home/pi/.WebControlwc_diagnostics_20191002-215659.zip
PYINSTALLER
pi@pi4:~/webcontrol $
Yeah, I'm going to see if I can package avrdude in the pyinstaller.
So, here's something to overcome.. The goal is to be able to install webcontrol and be able to update the firmware with just a single install file. I seem to be able to run avrdude by packaging both avrdude.exe and libusb0.dll into the pyinstaller. But I worry about the driver for the arduino. I looked at the driver file details for the arduino connected to my Win10 computer and its:
C:\WINDOWS\system32\DRIVERS\usbser.sys
This is a Microsoft provided driver and I think it's built-in to Windows 10.. so does anyone know if a different driver is needed?
What about Linux and RPI? Anyone know enough about this stuff to know?
I created a new version, but my computer is reporting it as a virus. Another computer seems fine though. I noticed the troubled computer hasn't updated in nearly a year.. so going through the long and excruciating process of trying to update.
Linux/Pi already has the driver on the system
OS/X and older windows versions may need a driver to communicate, but that's a one-time thing, upgrades don't change this.
David Lang
On Thu, 3 Oct 2019, madgrizzle wrote:
So, here's something to overcome.. The goal is to be able to install webcontrol and be able to update the firmware with just a single install file. I seem to be able to run avrdude by packaging both avrdude.exe and libusb0.dll into the pyinstaller. But I worry about the driver for the arduino. I looked at the driver file details for the arduino connected to my Win10 computer and its:
C:\WINDOWS\system32\DRIVERS\usbser.sys
This is a Microsoft provided driver and I think it's built-in to Windows 10.. so does anyone know if a different driver is needed?
What about Linux and RPI? Anyone know enough about this stuff to know?
My windows updates keep failing, but at least the virus definition file updated and doesn't report webcontrol as a trojan horse. Hopefully will have new releases to test out sometime today.
Please all try again with latest (I deleted previous release). Win32 builds will be added soon.
Firmware update 'Stock' works here on Win10-64 and various Pi's. 💯
I could wish that there was a firmware option for me to burn a local version of firmware... 😁 For now I can keep replacing a file in the singledirectory-firmware folder, but that's harder with the singlefile version.
In think I could add a local firmware option located using the .WebControl directory.
That would be excellent! 👍
Win32 versions added for testing.
Error occurred when trying to upgrade firmware to holey for calibration.
### After trying to build the ftdi and usblib files, and finding dependency issues with udev and udev-dev, i then installed avrdude at the command line and it added the proper ftdilib!!!
/home/ted/webcontrol/tools/avrdude: error while loading shared libraries: libftdi.so.1: cannot open shared object file: No such file or directory connecting
/home/ted
Starting Console Queue Processor
/home/ted/.WebControl/webcontrol-*.port
-$$$$$-
/home/ted/webcontrol/main.py
/home/ted/webcontrol
-$$$$$-
opening browser
check for pyrelease
/usr/bin/exo-open: /home/ted/webcontrol/libz.so.1: version ZLIB_1.2.9' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16) /usr/bin/exo-open: /home/ted/webcontrol/libz.so.1: version
ZLIB_1.2.9' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16)
0.917
None
XPCOMGlueLoad error for file /usr/lib/firefox/libmozgtk.so:
/home/ted/webcontrol/libz.so.1: version ZLIB_1.2.9' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16) Couldn't load XPCOM. XPCOMGlueLoad error for file /usr/lib/firefox/libmozgtk.so: /home/ted/webcontrol/libz.so.1: version
ZLIB_1.2.9' not found (required by /usr/lib/x86_64-linux-gnu/libpng16.so.16)
Couldn't load XPCOM.
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: iceweasel: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: seamonkey: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: mozilla: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: epiphany: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: konqueror: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: chromium: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: chromium-browser: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: google-chrome: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: www-browser: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: links2: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: elinks: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: links: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: lynx: not found
/usr/bin/xdg-open: 851: /usr/bin/xdg-open: w3m: not found
xdg-open: no method available for opening 'http://localhost:5000'
connecting
Connected on port /dev/ttyACM0
{"hostAddress": "127.0.1.1:5000"} connected 537a01b235594902be170acb5a157fc9 starting UI I'm connected! Sending Board Data Sent Board Data Sending Board Cut Data compressed Sent Board Cut Data compressed 537a01b235594902be170acb5a157fc9 uncompressed:1349064 compressed3D:171319 Sending Gcode compressed Sent Gcode compressed uncompressed:2 compressed3D:22 Sending Gcode compressed Sent Gcode compressed 537a01b235594902be170acb5a157fc9 processing request to close connection closed at serialPortThread /home/ted/webcontrol/tools/avrdude: error while loading shared libraries: libftdi.so.1: cannot open shared object file: No such file or directory connecting
Connected on port /dev/ttyACM0
### After trying to build the ftdi and usblib files, and finding dependency issues with udev and udev-dev, i then installed avrdude at the command line and it added the proper ftdilib!!!
Selecting previously unselected package libftdi1:amd64. (Reading database ... 257710 files and directories currently installed.) Preparing to unpack .../libftdi1_0.20-4build3_amd64.deb ... Unpacking libftdi1:amd64 (0.20-4build3) ... Selecting previously unselected package avrdude. Preparing to unpack .../avrdude_6.3-4_amd64.deb ... Unpacking avrdude (6.3-4) ... Setting up libftdi1:amd64 (0.20-4build3) ... Setting up avrdude (6.3-4) ... Processing triggers for man-db (2.8.3-2ubuntu0.1) ... Processing triggers for libc-bin (2.28-0ubuntu1+zorin4)
home/ted/webcontrol/tools/avrdude: error while loading shared libraries: libftdi.so.1: cannot open shared object file: No such file or directory connecting
Connected on port /dev/ttyACM0
537a01b235594902be170acb5a157fc9 processing request to close connection closed at serialPortThread /home/ted/webcontrol/tools/avrdude: error while loading shared libraries: libftdi.so.1: cannot open shared object file: No such file or directory connecting
Connected on port /dev/ttyACM0
check for pyrelease 0.917 None 537a01b235594902be170acb5a157fc9 processing request to close connection closed at serialPortThread
avrdude: Version 6.2 Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/ Copyright (c) 2007-2014 Joerg Wunsch
System wide configuration file is "/home/ted/webcontrol/tools/avrdude.conf"
User configuration file is "/home/ted/.avrduderc"
User configuration file does not exist or is not a regular file, skipping
Using Port : /dev/ttyACM0
Using Programmer : wiring
Overriding Baud Rate : 115200
AVR Part : ATmega2560
Chip Erase delay : 9000 us
PAGEL : PD7
BS2 : PA0
RESET disposition : dedicated
RETRY pulse : SCK
serial program mode : yes
parallel program mode : yes
Timeout : 200
StabDelay : 100
CmdexeDelay : 25
SyncLoops : 32
ByteDelay : 0
PollIndex : 3
PollValue : 0x53
Memory Detail :
Block Poll Page Polled
Memory Type Mode Delay Size Indx Paged Size Size #Pages MinW MaxW ReadBack
----------- ---- ----- ----- ---- ------ ------ ---- ------ ----- ----- ---------
eeprom 65 10 8 0 no 4096 8 0 9000 9000 0x00 0x00
flash 65 10 256 0 yes 262144 256 1024 4500 4500 0x00 0x00
lfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
hfuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
efuse 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
lock 0 0 0 0 no 1 0 0 9000 9000 0x00 0x00
calibration 0 0 0 0 no 1 0 0 0 0 0x00 0x00
signature 0 0 0 0 no 3 0 0 0 0 0x00 0x00
Programmer Type : Wiring
Description : Wiring
Programmer Model: AVRISP
Hardware Version: 15
Firmware Version Master : 2.10
Vtarget : 0.0 V
SCK period : 0.1 us
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.01s
avrdude: Device signature = 0x1e9801 (probably m2560) avrdude: safemode: hfuse reads as D8 avrdude: safemode: efuse reads as FD avrdude: reading input file "/home/ted/webcontrol/firmware/holey/holey-51.27.hex" avrdude: writing flash (63842 bytes):
Writing | ################################################## | 100% 10.24s
avrdude: 63842 bytes of flash written avrdude: verifying flash memory against /home/ted/webcontrol/firmware/holey/holey-51.27.hex: avrdude: load data flash data from input file /home/ted/webcontrol/firmware/holey/holey-51.27.hex: avrdude: input file /home/ted/webcontrol/firmware/holey/holey-51.27.hex contains 63842 bytes avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 8.19s
avrdude: verifying ... avrdude: 63842 bytes of flash verified
avrdude: safemode: hfuse reads as D8 avrdude: safemode: efuse reads as FD avrdude: safemode: Fuses OK (E:FD, H:D8, L:FF)
avrdude done. Thank you.
connecting
Connected on port /dev/ttyACM0
Sending: B05
Sending: G20
One Error Report Command Misread
WebControl 1.27
Firmware Version 51.27
Sending: $$
Sending: B05
firmwareKeyString Exception: value = 2996.97
firmwareKeyString Exception: value = 413.4
firmwareKeyString Exception: value = 152.4
firmwareKeyString Exception: value = 2
firmwareKeyString Exception: value = 131.2
firmwareKeyString Exception: value = 1650
firmwareKeyString Exception: value = 750
firmwareKeyString Exception: value = 102.498904
Sending: G20
WebControl 1.27
Firmware Version 51.27
Sending: $$
Sending: B05
firmwareKeyString Exception: value = 2996.97
firmwareKeyString Exception: value = 413.4
firmwareKeyString Exception: value = 152.4
firmwareKeyString Exception: value = 2
firmwareKeyString Exception: value = 131.2
firmwareKeyString Exception: value = 1650
firmwareKeyString Exception: value = 750
firmwareKeyString Exception: value = 102.498904
Sending: G20
WebControl 1.27
Firmware Version 51.27
Sending: $$
Sending: B05
firmwareKeyString Exception: value = 2996.97
firmwareKeyString Exception: value = 413.4
firmwareKeyString Exception: value = 152.4
firmwareKeyString Exception: value = 2
firmwareKeyString Exception: value = 131.2
firmwareKeyString Exception: value = 1650
firmwareKeyString Exception: value = 750
firmwareKeyString Exception: value = 102.498904
Sending: G20
WebControl 1.27
Firmware Version 51.27
Sending: $$ Sending: $2=2996.97 firmwareKeyString Exception: value = 2996.97 firmwareKeyString Exception: value = 413.4 firmwareKeyString Exception: value = 152.4 firmwareKeyString Exception: value = 2 firmwareKeyString Exception: value = 131.2 firmwareKeyString Exception: value = 1650 firmwareKeyString Exception: value = 750 firmwareKeyString Exception: value = 102.498904 Sending: $3=413.4 Sending: $5=152.4 Sending: $7=2 Sending: $8=131.2 Sending: $11=1650 Sending: $15=750 Sending: $29=1300.00 Sending: $37=102.498904 Sending: $38=2.00000 Sending: $45=0.00000516850 Sending: $46=97.9000 Sending: $2=2996.97 Sending: $3=413.4 Sending: $5=152.4 Sending: $7=2 Sending: $8=131.2 Sending: $11=1650 Sending: $15=750 Sending: $29=1300.00 Sending: $37=102.498904 Sending: $38=2.00000 Sending: $45=0.00000516850 Sending: $46=97.9000 Sending: $2=2996.97 Sending: $3=413.4 Sending: $5=152.4 Sending: $7=2 Sending: $8=131.2 Sending: $11=1650 Sending: $15=750 Sending: $29=1300.00 Sending: $37=102.498904 Sending: $38=2.00000 Sending: $45=0.00000516850 Sending: $46=97.9000 Sending: $2=2996.97 Sending: $3=413.4 Sending: $5=152.4 Sending: $7=2 Sending: $8=131.2 Sending: $11=1650 Sending: $15=750 Sending: $29=1300.00 Sending: $37=102.498904 Sending: $38=2.00000 Sending: $45=0.00000516850 Sending: $46=97.9000 537a01b235594902be170acb5a157fc9
With which operating system did this occur?
Linux zorin latest
Could this possibily Zorin thing? I don't have a linux machine with an arduino connected to it (I just run linux on a VM and don't have any hardware connected to the host box) so it's hard for me to test. But, I did search my linux VM (ubuntu 16.04) and I was able to find ftdi related files (for example, libtdi.so.1 that I saw was marked as missing in your log).. So are these files not included in Zorin's distro or is there something I else going on?
Could this possibily Zorin thing?
I see the same thing in Mint19 using the singleDirectory-0.917. Replacing the tools/avrdude executable with a newer version (from Arduino 1.8.10 in this case) solves the issue and allows the webcontrol/Actions/firmwareUpgrade process to complete properly.
So is it an avrdude version issue only or is there also a driver issue for the usb?
I would guess that it's an avrdude version issue. The newer version reports "Version 6.3-20190619". No other change was needed to restore operation beyond replacing that one executable file. I think that version is built using the scripts here.
So this new version contains all the missing files and @ted1735 wouldn't have needed to build the ftdi and usblib files?
That's how it looks to me. Just replicated the situation on a Fedora 30 VM; singleDirectory-0.917 firmware update failed and replacing the tools/avrdude with the newer version solved it.
great.. will try to figure out how to get a copy of it. apt-get only seems to get me 6.25
ok, got it built. Will try to build releases tonight and post a new version.
sound great! Its always hard when you feel like you are the only one having an issue, however glad it was able to be replicated and discovered!! If you need any more info LMK!! I run my apps off an old Intel dual core laptop, and a pi 3b+ so if you need something in particular tested. I am happy to help. Webcontrol is such an amazing and innovative program and has made using Maslow so much easier and more efficient!!
the singleDirectory v0.918 seems to have done the trick on the Mint19 and Fedora31 VMs. 💯👍
I am happy to help.
Thanks for testing this out and the research in determining the problem. It saves me countless, countless hours.. especially for things I'm not very familiar with.
WebControl Maslow Holey firmware upgrade error
Initially it couldn't find the file, so I found it in "etc" folder and copied it to the path it seems it was looking for. That didn't work. So I then added a space as noted below and the ENTIRE correct path to the command line to be passed to avrdude.
There seems to be an error in the path and maybe just a small typo of a missing space. I am not familiar with the handles/switch commands involved with avrdude or how they are passed through. However just by viewing the python window I could see there was an error and surmise that the "-C" probably needed a space before the path was passed through to avrdude to look for avrdude.conf.
AND IT WORKED!!!
Below are screen shots you can follow if you choose or just look at the spacing and path that is passed to avrdude and it will fix it!!
ONE more thing. I had to shut down Webcontrol to open the com port and allow avrdude to talk to the Arduino.
https://www.evernote.com/shard/s28/client/snv?noteGuid=2680c421-3a14-49ea-8fb6-0261a8761a73¬eKey=633eee4998e63ccc&sn=https%3A%2F%2Fwww.evernote.com%2Fshard%2Fs28%2Fsh%2F2680c421-3a14-49ea-8fb6-0261a8761a73%2F633eee4998e63ccc&title=WebControl%2BMaslow%2BHoley%2Bfirmware%2Bupgrade%2Berror