-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bast practice to solve the permission denied #3
Comments
The serial port device nodes are most likely owned by the
If you add your user to the
P.S. There are also other alternatives, such as specifying the desired owner and/or permissions as UDEV rules. |
Thanks. The app I'm developing is exclusive to Android, so I write a Plugin, and use Android API related to USB to implement it. Also, we can listen the attached/detached events to realize the hot plug of USB. While, there's another question: How can I substitute the stream in |
Hi |
Thanks for bringing this up, I've split this to a separate issue: #4
Hi @fynxiu, how did you manage to solve the permission issue on Android? When I wrote the instructions above, I was actually thinking about Linux. Does the same trick work on Android too? According to libserialport they do support Android, but I don't think I have any suitable devices to test with. |
I have flashed AOSP 10 on a Raspberry Pi 4. I'm having trouble connecting an STM32 development board over USB. Any tips? With USB cable attached:
With USB cable detached:
The USB device is clearly recognized, but it doesn't show up in
For reference, the exact same hardware on Linux (Raspberry Pi 4 + Raspberry Pi OS & STM32): |
It turns out I had to re-compile the kernel with Device drivers => USB support => USB Modem (CDC ACM). Furthermore, I added the following line to
Now, when I connect the USB cable:
The device node:
And it shows up in the |
Interestingly, with sufficient permissions defined in
|
I think it's a matter of Writing SELinux Policy for your Android device. |
@jpnurmi sorry, I just saw this message. |
@fynxiu Can you make a step by step how to make this lib work on android? I don't know much |
I'm really sorry that I just saw your message now. I haven't been in contact with this project for a long time. |
is this fix yet? |
Still have the same problem guys, is it fixed yet? Thanks |
any one find a solution how to access serial port in android |
anyone fixed??? |
Permission denied, errno = 13 |
how did you do that? |
@jpnurmi Thanks for the useful package.
I have a little problem when use it on USB serial device. The device file's permission is default 500, and
chmod 755
could only temporarily make it work. Is there any better way to make it work permanently?The text was updated successfully, but these errors were encountered: