Aug 20 2015
operating the serial port to a arduino and the problems about arduino reboot
-a- a friend has a problem that arduino IDE on RPI often show the grey port
and not allow to use the serial monitor,
even restart IDE, RPI reboot does not work. only power/cold reboot solves this.
now as i know about that and i still think it might be connected with the arduino IDE ( or RXTX jawa or???)
last time i finished my test about that and jessie and ide 165 on RPI i just recommended:
RPI REBOOT and THEN connect arduino, but exactly that he can not do.
i give him a short intro to "screen" ( as i know he not need the IDE, he just want use a serial terminal )
sudo apt-get install screen
man screen or Link
now you can still use it from putty or from a VNC desktop terminal (arduino IDE only run from desktop )
screen /dev/ttyACM0 115200
for a arduino UNO on RPI running my serial menu program,
pls change to your port like
/dev/ttyUSB0 for FTDI?
and 9600 for your baud rate?
to stop use [ctrl][a][\][y] or [ctrl][a][k][y] ( screen is terminating) do not just close the window!
to start from desktop per mouse double click: ( again copy paste to putty )
as i play a lot i noticed that i am not able to find the info online for a detail adjustment of the serial port when using "screen"
so i back up to the
sudo apt-get install minicom
minicom -D /dev/ttyACM0
[ctrl][a][o] change setting, "save as dfl"
[ctrl][a][x][yes] to stop, do not only close terminal window.
while we play online and i see with my arduino and my serial menu that "screen" and "minicom" works
my friend has the problem that both not work ???
but i not know his system, he use different hardware ( aduino mini and ftdi ) and a menu code
from the internet.
and i noticed this: i not see my arduino reboot when i open the terminal!
sudo apt-get install -y arduino
but had to reboot to use the serial monitor
and after i see port not grey, i adjust /dev/ttyACM0
and in serial monitor adjust my 115200 baud it worked. AND i see the arduino REBOOT.
furthermore, when i start minicom/screen i now also see the arduino reboot.
that sounds so crazy that all i can do is a complete test again from image:
next morning i burn a raspbian ( and now want do as little as possible changes )
i not even run raspi-config or upgrade
sudo apt-get update
sudo apt-get install -y screen minicom xrdp ( i need desktop to later test the arduino iDE )
sudo reboot ( with connecting UNO USB. )
screen /dev/ttyACM0 115200 and i see my arduino reboot message.
minicom -D /dev/ttyACM0 works, NO REBOOT
here i recheck: [ctrl][a][o] port (F) hardware flow control is YES
screen /dev/ttyACM0 115200 works, NO REBOOT
ok besides the very first start i could reproduce that situation
now for arduino ide better first do
sudo raspi-config expand filesystem name ..reboot
sudo apt-get update
sudo apt-get upgrade ( test again )
and now see the arduino REBOOT, very funny.
ok, more testing shows i need to run "minicom" and then arduino not REBOOT even i use "screen" later.
looks like now i have the same situation like am able to run from WIN7 using HTERM input control DTR button see here and also there i found ( very surprised ) that a arduino also reboots when the arduino IDE serial monitor is closed!
now install IDE
sudo apt-get install -y arduino and reboot
run minicom several times and arduino reboots 5 time! test screen test minicon, arduino not reboot.
GRRR there is no loigic in this.
switching between arduino serial monitor and minicom same unpredictable thing.
anyhow: it has nothing to do with: if arduino IDE is installed or not.
stty -F /dev/ttyACM0 [-]crtscts did not change anything
stty -F /dev/ttyACM0 [-]cdtrdsr did not work for this linux
more Link and Link and Link
now i know that i can prevent the reboot by a capacitor hardware trick, is there a way that my hardware is in a undefined state for this?
i can only check arduino V++ ( comes from RPI via USB ) = 5.07V / and RPI2 runs on a 5V 1.3A charger from my LG phone.
on a post in forum i see a other TIP: use SEYON
sudo apt-get install seyon
with seyon --help or man seyon sounds great, but no help
or with seyon /dev/ttyACM0 or with seyon -modem /dev/ttyACM0 or with seyon -e /dev/ttyACM0: NOTHING
here i see that i need directory and some files??
but still not get it started, check the group thing:
groupadd uucp say group already exist
groups see pi is not group uucp
sudo adduser pi uucp say it adds pi to group uucp, but
groups not show it ?? better do reboot, now ok
still not lucky with starting it.
for modern desktop now i find something more appropriate
here and here and here
sudo apt-get install cutecom a nice QT4 tool
from a terminal in desktop start
the DEVICE dropdown list not show ttyACM0 but you can type it in there
button OPEN DEVICE