Hi Olivier, You'd only mentioned the middle one, which I didn't think was sufficient. But I agree the other two are strong tests indicating the USB is okay. Sorry I don't have OSX to test further. But a question for me to learn something, what makes these two ports equivalent test points between your Pharo code and your "more" test. * /dev/ttyACM0 * /dev/cu.usbmodel1411 To be specific, did ttyACM0 with Perl and the IDE ? cheers -ben On Mon, Mar 13, 2017 at 3:27 PM, olivier auverlot < olivier.auverlot@gmail.com> wrote:
Hi Ben,
I don't think that the problem concerns the USB port or the cable because:
* I have tested with a simple Perl script (with the Device::SerialPort module) and all is ok. * In a shell, I can activate the rx/tx leds of the Arduino with the command "more -f /dev/cu.usbmodel1411". * I can use the Arduino IDE to program the card and send my binaries.
If my Pharo code is correct, I suspect a problem in the serial plugin for MacOS X. I tried unsuccessful with Pharo 5 and Pharo 6.
Best regards Olivier :)
2017-03-13 8:01 GMT+01:00 Ben Coman <btc@openinworld.com>:
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_FT DI_Drivers_Installation_Guide_for_MAC_OSX.pdf
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.