ofSerial bug in linux

Hi

Just found a bug in ofSerial.cpp when compiling under linux. Setup won’t work, since the code is made for mac. Under both mac and linux it will try to find str.substr(0,3) == “cu.” when finding the port, but it should be str.substr(0,3) == “tty” || str.substr(0,3) == “rfc” on linux (like under enumerateDevices).

Fast solution is to edit line 275 to

if( str.substr(0,3) == “cu.” || str.substr(0,3) == “tty” || str.substr(0,3) == “rfc” ){

or add a linux block would be nicer

Jonas Jongejan / HalfdanJ

hey

it seems i’ve only tried with the other version of setup, totally missed that one. will correct it for 0061

thanks

I got another problem now, i have made a simple app that sends and retrieves some serial messages from a arduino. It works perfectly on my mac, but on my ubuntu machine the serial.readBytes function doesnt return anything. I can see that it writes to the arduino (athe arduino blinks in rx, and blinks on tx as response) but readbytes always return -1… Any ideas??