Permission error /dev/ttys0/

To preface: I experimented with RVR a while ago but then got lost with other stuff. I am trying to get back to RVR but when I try to run the sample keyboard control to check if my setup is working I get this error:

serial.serialutil.SerialException: [Errno 13] could not open port /dev/ttyS0: [Errno 13] Permission denied: '/dev/ttyS0'

Any suggestions as to what I can do?

  • I tried to change wires but no luck;
1 Like

Hi @h4rsh4,
I’m not a linux expert at all, but do you know if there is another program using that port?
What setup do you have for your project?

Quentin

1 Like

I haven’t hooked anything else to the pi and only the rvr is connected so far. I checked if the wires were set up right, they are.

Software wise:
I am using the latest raspbian, and the basic pipenv that comes with the sdk.

1 Like

Did you resolve this already? if not, are you getting this error after executing the Python script? Did you use sudo? Did you check the file’s permission flags? This is possibly a permissions issue.

1 Like

You have 2 options.

  1. Run as sudo
  2. Add your user to dialout group adduser $USER dialout.

best regards

1 Like

I got a similar error and it turns out that it’s because I have an older Raspberry Pi (2 I believe). I was able to communicate with the RVR after specifying the correct port in the SerialAsyncDal parameters. I figured it out after finding this issue on github.

In the getting_started/asyncio/api_and_shell/echo.py script I modified the definition of rvr to look like this:

rvr = SpheroRvrAsync(
    dal=SerialAsyncDal(
        loop=loop,
        port_id='/dev/ttyAMA0'
    )
)

Hello, sorry for the super-late response but I couldn’t figure out the problem so I decided to start fresh with a new raspbian image. Everything seems work fine now! Thanks a lot for the responses though!