-
Notifications
You must be signed in to change notification settings - Fork 11
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
no permission to read or write this serial port #20
Comments
Also. Considering this similar package: https://github.com/licheedev/Android-SerialPort-API/blob/master/README.md |
You could just call |
Great, i called setSuPath and open in a function called by the constructor. Now about the su path, how do i get it if the default one (/system/bin/su) didn't work?. Do i have to root my phone to do so? |
https://developer.android.com/studio/command-line/adb#shellcommands Go into shell on Android phone, then execute |
hi dear i have the same issue too i do some stuff like bellow but still give me the no permission to read or write this serial port i put this lines to androidManifest.xml
get /system/xbin/su from command ( which su ) and put this to following code
please help thanks |
i am still getting the permission error. @alisaya10 Did you get it resolved? |
Hii @rinshadkk , Did you get it resolved the issue? |
hey any update on this issue? I am facing the same. |
Hi. I'm trying to create an app that uses a COM port to send strings to a laptop. So, i was compiling my app on react native with a Windows OS and everytime that i want to use an specific port (COM3 in this case) in the function "const serialPort = await SerialPortAPI.open("/dev/ttyS4", { baudRate: 9600 });" i get the "no permission to read or write this serial port" error message.
I tried to mitigate the error putting the following permissions in my android manifest: INTERNET, WRITE_EXTERNAL_STORAGE", READ_EXTERNAL_STORAGE and USE_PERIPHERAL_IO"
And the following static function in my "App.js", considering the closed issue #9, to no avail
static setSuPath(suPath) {
SerialPortAPI.setSuPath("/system/bin/su");
}
I would like some help on how to fix this error please
The text was updated successfully, but these errors were encountered: