I’m new to Raspberry Pi and am trying to run Pure Data on it to control a teensy 3.2 using Open Sound Control which in turn controls some stepper motors for a pump just like here https://github.com/DropletKitchen/pumpsn17 (using the teensy code and Pd files provided at the end of the page). I’ve finally managed to install Pd-extended on my Raspberry Pi 3 (Raspbian Jessie). But I don’t think Pd is able to use the USB to communicate with the teensy, since if I try to run the Pd file, Pd gives me the error “could not open device /dev/ttyS0: failure(13): Permission denied. Could someone help me please to get Pd communicating with OSC through my USB?

Also when I open Pd I get this message

/dev/dsp (read/write): No such file or directory

(now will try write-only…)

/dev/dsp (writeonly): No such file or directory
/dev/dsp (read only): No such file or directory


Audio I/O stuck... closing audio

Do I need to do some further configuration to get Pure Data running properly?

Like I mentioned I am very new to using the Raspberry Pi so any help would be appreciated and please do explain anything as if I were an idiot. That would really help. Thank you.

2 Answers 2


/dev/ttyS0 is the UART connected to GPIO 14/15.

If you have a serial (USB) dongle attached it will be named something like /dev/ttyUSB0.

  • 1
    /dev/ttyS0 is the default serial for Pi3 BUT users should be encouraged to use dev/serial0 which is the accessible serial on all models, including the Pi3, even if BT is swapped. Either way it is disabled by default.
    – Milliways
    Dec 7, 2017 at 23:01
  • Thanks for getting back to me. So I am trying to communicate through the wrong output. Is this something I can change on the Raspberry Pi, to force it to use the USB ports? or is this something I need to change on the PD code. I'm pretty new to all this and the PD code was written by someone else, who apparently got it working on the raspberry pi. I know very little about how to use PD, but would love to get this working, the closest thing I can see to a reference to where to output to is "devicename /dev/tty.usbmodem12341, pollintervall 1"
    – Paul
    Dec 8, 2017 at 13:45
  • @Paul If you are connecting via a USB dongle you must tell PD to use that (e.g. try /dev/ttyUSB0. I know nothing about PD, you will have to find where it holds its configuration data.
    – joan
    Dec 8, 2017 at 13:52
  • the user interface on the PD file, should allow me to chose my output port (from 0-4). 0 and 1 seem to open serial line device dev/ttyAMA0 or 1. whilst 2 gives an error, permission denied (this is when it tries to use dev/ttyS0) whilst 3 and 4 report that they do not exist (max == 2)
    – Paul
    Dec 8, 2017 at 13:53
  • Thank you Joan. I will try to learn a bit more about PD and change the code to use /dev/ttyUSB0. I presume since I have 4 USB ports on the Raspberry pi, that these would be /dev/ttyUSB0, /dev/ttyUSB1, /dev/ttyUSB2 and /dev/ttyUSB3?
    – Paul
    Dec 8, 2017 at 13:58

Thanks for everyone’s help here. It’s great how much help you can get from others on this forum. I after a bit of a learning curve I ended up solving this problem with help from David “whale-av” at PDpatchrepro forum: https://forum.pdpatchrepo.info/topic/11149/getting-pure-data-to-work-on-raspbian-jessie-giving-pure-data-permission-to-access-device

  • It turned out the files provided for the open sound control on Pure data were missing one small piece of code. This is because the object [import mrpeach] needs to be referenced in all the PD files that are provided to enable OSC to communicate with the Teensy. To solve this I added an object to the file Flexible3or4PumpsGOP and inserted the command “[import mrpeach]”, I also did this to the front end file to make sure, although I’m not sure it is necessary. It should already be referenced in o.io.slipserial.pd. Once this is done it should work.
    – Paul
    Jan 2, 2018 at 12:26
  • The raspberry pi now talks to the teensy via ttyACM0. So glad to get this working, and thanks for the help along the way.
    – Paul
    Jan 2, 2018 at 12:26
  • 1
    Please accept your own answer with a click on the tick on its left side. Only this will finish the question and it will not pop up again year for year.
    – Ingo
    Apr 8, 2020 at 15:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.