Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
force totumduino flashing
You want to flash your Totumduino and it won't with this error message (you see it directly if using commandline via ssh, or showing the trace in the recovery menu of a recent FABUI):
avrdude-original: stk500_getsync() attempt 1 of 10: not in sync: resp=0x65
avrdude-original: stk500_getsync() attempt 2 of 10: not in sync: resp=0x63
avrdude-original: stk500_getsync() attempt 3 of 10: not in sync: resp=0x68
avrdude-original: stk500_getsync() attempt 4 of 10: not in sync: resp=0x6f
avrdude-original: stk500_getsync() attempt 5 of 10: not in sync: resp=0x3a
Other remedies around, to which you should pay attention, but are not part of this solution:
- Use the latest version of FABUI
- Use a new SDCard
- Try to reset manually the Totumduino with the switch button just before triggering the flash (hitting return in the command line or after it says it resetted in the UI).
I am not saying that those cannot cause this problem. What I say, from experience (lots of arduinos and quite a lot of Totumduino flashing), is that this has happened to me like 5 times with totally different FABUI versions.
This method has worked to me fine. If you come across such a "I refuse to flash" behaviour, please let us know if this worked for you (you can open a GitHub issue if there isn't one opened).
It just comes from the idea that Arduinos do not usually refuse to be flashed (unless the bootloader is corrupted, which seldom happens), so it must be something with the UART. As you are resetting the Totumduino, then there is a big chance that the problem is the Raspberry pi.
Make an SSH connection to your FABtotum, if you are using Linux you can just type:
ssh root@fabtotum(default password is fabtotum)
Stop Apache and Mysql, at least to avoid having errors in the logs because other process will be killed:
List all the processes running in the RPi:
Find in the list these two (by name) and note the process identifiers:
root 1505 0.0 1.9 50392 17508 ? S 18:47 0:00 php /var/www/fabui/script/socket_server.php
root 1506 0.4 1.2 112824 11116 ? Sl 18:47 0:06 python /var/www/fabui/python/monitor.py
- Kill those processes using
kill -9like this (make sure to put your processid numbers not mine):
kill -9 1505 1506
Note: Probably it suffices to kill monitor.py. If you try and it works let us know it using the Issues in GitHub.
Go to the directory where you have previously uploaded your flash image. Usually the last tried one is still in /var/www/build.
Flash the totumduino from commandline using:
sudo /usr/bin/avrdude -D -q -V -p atmega1280 -C /etc/avrdude.conf -c arduino -b 57600 -P /dev/ttyAMA0 -U flash:w:Marlin.cpp.hex:i
NOTE: In a second try it has sufficed to me to kill the process "python /var/www/fabui/python/monitor.py"