issues interfacing with OS X

Posted on
  • I am having some issues interfacing with OS X. I follow the instructions from http://www.espruino.com/Interfacing but when I type echo "LED1.set()" > /dev/ttyACM0obviously with the right tty – it doesn't do anything. It doesn't return to the command line and I can't use the Web IDE to connect until I cancel the action. I am able to connect using screen though.

  • I'll need to look at this - unless someone else gets there first ;)

    I imagine it's something that needs to be set up with stty. On Raspberry Pi I've used:

    stty -F /dev/ttyAMA0 9600 -parenb -parodd cs8 hupcl -cstopb cread clocal -crtscts ignbrk raw min 0 time 5
    

    but there may be different settings needed on Mac. If I'm honest I'm not 100% sure on this, but it's probably just a matter of turning flow control off.

  • Ha, your answer didn't really help me (as the -F flag is not available for example), but a quick look through /dev/ showed another device /dev/cu.usbmodem1411 while I normally connect to `/dev/tty.usbmodem1411. And this one works like a charm.

    Maybe best to double check this, but it thus seems that all you need to do on OS X is to write to cu instead of tty. Not surprising though that it is different from Linux/Raspberry, given that it is BSD based instead of Linux based.

  • Strange... Thanks for the info, I'll give it a try and update the docs.

    Glad you got it going - that'll be a huge help for Mac users looking to do some simple hardware stuff.

  • The mystery deepens ... the devices connect to Bluetooth just fine and I can access them using screen. However, piping to either tty or cu causes them to disconnect from Bluetooth ...

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

issues interfacing with OS X

Posted by Avatar for Kim @Kim

Actions