Hi!
Scratch is unable to display serial ports other than /dev/ttyUSB*. So it is unable to communicate with modern Arduino boards connected via USB that appears as /dev/ttyACM* and with boards connected via Bluetooth (/dev/rfcomm*) of COM port (/dev/ttyS*).
The following patch fixes this issue:
--- scratch-1.4.0.7.src/src/plugins/scratch/unixSeriaPort2Ops.c.orig 2013-02-28 13:37:49.192408027 +0400 +++ scratch-1.4.0.7.src/src/plugins/scratch/unixSeriaPort2Ops.c 2013-02-28 13:43:02.607540279 +0400 @@ -337,7 +337,10 @@ } int isSerialPortDev(char *s) { - return isPrefix("ttyusb", s); + return isPrefix("ttyusb", s) || + isPrefix("ttys", s) || + isPrefix("ttyacm", s) || + isPrefix("rfcomm", s); } int isPrefix(char *prefix, char *s) {
Offline
mikhirev wrote:
Hi!
Scratch is unable to display serial ports other than /dev/ttyUSB*. So it is unable to communicate with modern Arduino boards connected via USB that appears as /dev/ttyACM* and with boards connected via Bluetooth (/dev/rfcomm*) of COM port (/dev/ttyS*).
The following patch fixes this issue:Code:
--- scratch-1.4.0.7.src/src/plugins/scratch/unixSeriaPort2Ops.c.orig 2013-02-28 13:37:49.192408027 +0400 +++ scratch-1.4.0.7.src/src/plugins/scratch/unixSeriaPort2Ops.c 2013-02-28 13:43:02.607540279 +0400 @@ -337,7 +337,10 @@ } int isSerialPortDev(char *s) { - return isPrefix("ttyusb", s); + return isPrefix("ttyusb", s) || + isPrefix("ttys", s) || + isPrefix("ttyacm", s) || + isPrefix("rfcomm", s); } int isPrefix(char *prefix, char *s) {
cool. If you have a github account you could make a pull request to lightnin's repo.
Offline