SpheroRVR + Rpi4 + Ubuntu20 Server

Hello Everyone
From the past seven days, I am facing this issue. I am using Raspberry pi4 with Sphero rvr

Problem statement -
Control sphero via ssh.

Experimentation -
Sphero is perfectly run with raspbian buster over ssh.
I changed OS because raspbian buster has issues with ROS.

I Installed the ubuntu 20 server and convert it into the desktop. Sphero firmware faced issues while running python scripts.

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

I performed almost every solution which is available on the internet related with this issue. but this issue is still there.
I changed OS form ubuntu server to ubuntu mate but this issue is still there.

All the experts who developed Sphero firmware please reply.

1 Like

Hi @kunal, welcome to our forums!

This sounds like it could be a Linux permissions issue, which is well outside of my area of expertise as a firmware engineer, but I’ll give it a shot.

If you run ls -l /dev/ | grep ttyS0 can you post the output?

On my Pi 3b+, I get:

lrwxrwxrwx  1 root root           5 Jul 14 16:33 serial0 -> ttyS0
crw-rw----  1 root dialout   4,  64 Jul 14 16:33 ttyS0

Jim

Also, if the Pi4 UART is simply on a different TTY, you can set the port in your scripts with an adjustment to how you initialize SerialAsyncDal. I’ve used a USB-serial adapter with this:

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

-Jim