Closed Amerlander closed 3 years ago
Interesting ...
For my tests at home, I used a "stock" Raspberry Pi OS. More precisely, the "Lite" (headless) version, but I assume this makes no difference here.
pi@pimuckl:~ $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
pi@pimuckl:~ $ cat /proc/cpuinfo | grep Model Model : Raspberry Pi 3 Model B Plus Rev 1.3
Mit angeschlossenem Calliope Mini:
pi@pimuckl:~ $ ls -l /dev/ttyA* crw-rw---- 1 root dialout 166, 0 Jul 6 09:55 /dev/ttyACM0 crw-rw---- 1 root dialout 204, 64 Jul 4 14:24 /dev/ttyAMA0
What did you use? Did you use the security-hardened OS provided by ESA?
I uploaded the current code to my Raspberry Pi (see above) and tried to execute the code.
I have the same issue:
calliope@pimuckl:~/src/CalliopEO_AstroPi $ pipenv run python CalliopEO.py
programming: /home/calliope/src/CalliopEO_AstroPi/run_060721-0959/temp01.hex Status: Port must be configured before it can be used. Status: [Errno 13] could not open port /dev/ttyACM0: [Errno 13] Permission denied: '/dev/ttyACM0'
I am afraid, we broke the code ...
Will check the details later.
It is becouse we now try to connect in the try/catch loop to the mini. As the mini restarts it is not available, the root user seem to be okay with that, but the unprivileged user raises the error and stops the script.
Uncommenting the line https://github.com/calliope-edu/CalliopEO_AstroPi/blob/9b798b1748aa2f74efba070e3a22d05b0512907c/CalliopEO.py#L212 and adding the sleep(20)
again solves it. Maybe there is something else we can do?
BTW, I am currently fixing this issue. Will take some more time ....
Fixed with #16
When executed as
calliope
I get the following error:[Errno 13} could not open port /dev/ttyACM0: [Errno 13] Permission denied: '/dev/ttyACM0'
User
calliope
is part ofdialout
anddialout
exists./dev/ttyACM0
is owned byroot:dialout
and has 660 permissions.Chown 666
doesnt change anything.