Just a few random thoughts... Can you load an echo program into the Arduino to check comms is not getting corrupted? https://www.baldengineer.com/alternatives-to-arduinos-serial-monitor.html Is the problem with a USB3 port? Try using a USB2 port. Are you using an FTDI cable? http://forum.arduino.cc/index.php?topic=373817.0 http://ewen.mcneill.gen.nz/blog/entry/2016-06-26-os-x-el-capitan-setup/ try disabling Apple's Virtual Com Port and using FTDI's per section 7... http://www.ftdichip.com/Support/Documents/AppNotes/AN_134_FTDI_Drivers_Insta... or using a non-FTDI serial adpator. cheers -ben On Mon, Mar 13, 2017 at 12:21 AM, olivier auverlot < olivier.auverlot@gmail.com> wrote:
Hi,
I try to use the serial port to communicate with an Arduino. On Linux, no problemo. I can open the serial port with the following code:
| serialPort baudRate comPortNumber | baudRate := 31250. comPort := '/dev/ttyACM0'.
serialPort := SerialPort new baudRate: 31250; dataBits: 8; stopBitsType: 1; parityType: 0; yourself.
"the port is closed to ensure that it will be free" serialPort close. (serialPort openPort: comPort) isNil ifTrue: [ ^self error: 'COM port not available' ] ifFalse: [ serialPort inspect ]. serialPort close.
But on MacOS X (10.11.6), the same code used with /dev/cu.usbmodel1411 doesn't run. The error is "Cannot open '/dev/cu.usbmodel1411'". I'm sure that is the correct serial port. If I type "more -f /dev/cu.usbmodel1411" in a terminal, the rx/tx leds of the Arduino are blink.
Someone has an idea about this problem that is not specific of the Arduino but concerns the generic usage of the serial port with Pharo?
Best regards Olivier
ps: I can't test on Windows but I'm interested by a feedback.