Question: what more do I need to do to get a simple Arduino sketch to talk to JMRI/CMRI on a Rasp Pi 3 over a usb cable?
Problem: the Serial Port entry in CMRI preferences,
/dev/ttyACM0 is red.
Rasp Pi 3 - Raspian 8 (jessie) updated/upgraded today Java 1.8.0_65 JMRI version 4.4-R1ccf76b lsusb shows Bus 001 Device 004 ID 2341:0042 Arduino Mega 2560R3 (CDC ACM) plus other devices (flash drive, keybd, wireless)
Sketch is a simple cut-down clone (20 lines) of a more complicated one (800+ lines) that works through the same cable to an HP laptop running Windows 10 & JMRI/CMRI, so I am familiar with the process.
I am able to upload the sketch from the Pi 3 to the Arduino when JMRI (PanelPro) is not running. (When PPro is running, the port entry in Arduino Tools is grayed out, as it should be.)
The Arduino resets when PPro starts, and the receive light flashes. CMRI monitor shows Transmit, bits xmitted, and Poll 0 (ie no receive). The Arduino however is not receiving, as the sketch waits for a CMRI light (cmri.get_bit, my handshake routine), and then does a cmri.set_bit, I have modified the sketch to just send, but again, no receive shows in CMRI monitor.
/dev/ttyACM0 is set for 57600 8N2, using minicom, as is the Arduino (Serial.begin(57600, Serial_8N2). Flow ctl is hdwr yes/softwr no (have tried no/no and no/yes)
(CMRI uses 2 stop bits!)
I have disabled console access to serial via raspi-config - interfaces - serial console - No.
I also entered
sudo gpasswd -a pi dialout return: adding user pi to group dialout sudo chmod 777 /dev/ttyACM0 return: blank
The following does receive data from an Arduino example sketch ("Hi Pi") thru the usb cable (when stop bits have been set back to 1).
python2 import serial ser = serial.Serial('/dev/ttyACM0', 57600) while 1 : ser.readline()
so it seems to be a CMRI port problem.
Can anyone suggest what I should do to get the 'red' out?