[PD] raspberry comport error 2

rolfm at dds.nl rolfm at dds.nl
Sat Aug 20 12:39:02 CEST 2016


thanks martin,
you gave me a handle to look further into it and to 'solve' the problem;
(i continue to have big troubles working with linux).

found in /dev/serial/ that the id of the Arduino port is not ttyAMA0 but 
ttyACM0.
so it looked like comport opens a port which isn't the right one, 
although nothing else is connected.

but i also saw the Arduino flashing when starting up the Pd-patch.

why? because the port number is actually 0!

my choices in the Pd-patch start with 1;
on Windows and OSX i've never seen a port 0.

the flash at the start came because my comport object is defined 
[comport 0 115200].

kind of stupid/embarassing.

thanks again,
up to the next hurdle.

rolf

Martin Peach schreef op 19-08-2016 18:47:
> On Fri, Aug 19, 2016 at 12:23 PM, <rolfm at dds.nl> wrote:
> 
>> hello,
>> 
>> Slowly trying to get a grip on RPi.
>> ...
> 
>> Opening the port in Pd goes alright:
>> 
>> [comport] closed port 1 (/dev/ttyAMA0)
>> [comport] set_baudrate: Setting baud rate to 115200 with baudbits
>> 0x1002
>> [comport] opened serial line device 1 (/dev/ttyAMA0)
>> 
>> Trying to send a byte from Pd to Arduino:
>> 
>> [comport]: Write failed for 0 bytes, error is 2
>> 
>> There seems to be no error-'guide' for comport.
> 
> The error is a standard linux errno:
> 
> #define ENOENT       2  /* No such file or directory */
> 
>> What could be the reason?
> 
> Not sure. Do you have permission to write to the serial port?
> 
> What does
> ls -l /dev/ttyAMA0
> say?
> 
> Also sending a [info( message to [comport] will output a list on the
> rightmost outlet.
> 
> It may tell you something.
> 
> Martin
> \



More information about the Pd-list mailing list