I did on ttyACM0, but not ttyACM1.
So, I did:
chmod a+rw /dev/ttyACM1
ls -l /dev/ttyACM*
crw-rw-rw- 1 root dialout 166, 0 Aug 30 13:35 /dev/ttyACM0
crw-rw-rw- 1 root dialout 166, 1 Aug 30 13:54 /dev/ttyACM1
Ran Julia:
julia> using LibSerialPort
julia> list_ports()
/dev/ttyS4
Description: ttyS4
Transport type: SP_TRANSPORT_NATIVE
/dev/ttyS5
Description: ttyS5
Transport type: SP_TRANSPORT_NATIVE
/dev/ttyACM0
Description: UDOO X86 - K71212271
Transport type: SP_TRANSPORT_USB
/dev/ttyACM1
Description: ttyACM1 - 64933303732351117121
Transport type: SP_TRANSPORT_USB
julia> port = sp_get_port_by_name(“/dev/ttyACM1”)
Ptr{LibSerialPort.SPPort} @0x0acb0f90
julia> sp_open(port, SP_MODE_READ_WRITE)
OS error code 25: Inappropriate ioctl for device
ERROR: From /home/julia-user/.julia/v0.6/LibSerialPort/src/wrap.jl: 111:
libserialport returned SP_ERR_FAIL - Host OS reported a failure.
Stacktrace:
[1] handle_error(::LibSerialPort.SPReturn, ::String) at /home/julia-user/.julia/v0.6/LibSerialPort/src/wrap.jl:106
[2] sp_open(::Ptr{LibSerialPort.SPPort}, ::LibSerialPort.SPMode) at /home/julia-user/.julia/v0.6/LibSerialPort/src/wrap.jl:155
I’m looking for another approach. I am experimenting with doing remote calls on 3 different development boards that I have on a small local Beowulf cluster: Raspberry Pi, Beaglebone Black, and Udoo x86. I want to demonstrate how you can remotely control sensors attached to different GPIOs [from my desktop running Julia].
I have it working with a digital PIR [motion] sensor on the RPi, and an analog light sensor on the BeagleBone. The interesting thing about the Udoo X86 is that it has an Arduino 101 built directly on the board. It also has GPIOs that I have gotten to work, but I thought it would be cool to connect up to an Arduino script that was running and access it from Julia (remotely) - hence the need for the serial routines. I can just do a readline() and get values, but the timing will never be synced.
I would like to take all of this information that I have been gathering and programming and do a talk at the next Julia Conference. That’s what this all about - lots of experimenting.