I would recommend to add this in /etc/rc.local, just before the exit 0:
Restart the ATmega ... just to recover bridge
/usr/bin/reset-mcu
I would recommend to add this in /etc/rc.local, just before the exit 0:
/usr/bin/reset-mcu
Hi Prochat,
I had the same problem with my Yun, I lost bridge after Linux reboot, but I can't understand what do you mean with:
...to add this in /etc/rc.local, just before the exit 0:
Restart the ATmega ... just to recover bridge
/usr/bin/reset-mcu
This is a good suggestion. I've noticed that if you reset Linux out from under the sketch, the sketch will have problems with the Bridge interface until the sketch re-initializes the Bridge. Automatically resetting the sketch when Linux reboots is a good solution, and adding that command to /etc/rc.local is the first thing I do on a Yun.
There is a discussion about various ways to improve reboot stability, and this sketch reset is one of those options: How to improve reboot stability
Fluvius:
but I can't understand what do you mean with:
On the Linux side, there is a file /etc/rc.local that is run as one of the last steps of the Linux boot process. If you edit that file, you can add your own commands, and prochat is recommending adding a line that causes the Linux processor to reboot the AVR sketch processor. This will restart the sketch from the beginning, making it run the setup() function again, and start up the Bridge interface all over again.
You can log onto the Yun's Linux command line using SSH and edit the file directly using command line commands, or you can modify the file through the Yun' web interface:
No more words ...perfect.
Thank you guys.
Sorry for bringing this up again, but I tried and it doesn't seem to be working. This is what I have in /etc/rc.local
# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.
# wifi-live-or-reset
# Changing bootloader name in LUA executable
FILE=/usr/bin/merge-sketch-with-bootloader.lua
BOARD=`cat /proc/cpuinfo | grep machine | awk {'print $4'}`
case $BOARD in
'One'|'Lei'|'Chiwawa'|'Yun-Mini')
sed -i -e "s/Caterina-Yun.hex/Caterina-$BOARD.hex/g" $FILE
;;
*)
exit 0
;;
esac
# Restart the ATmega ... just to recover bridge
/usr/bin/reset-mcu
exit 0
I've tried by rebooting Linux via reset button, ssh and sketch code and nothing... am I doing something wrong?