react-native-serial-port-api icon indicating copy to clipboard operation
react-native-serial-port-api copied to clipboard

no permission to read or write this serial port

Open SArrueLorca opened this issue 3 years ago • 8 comments

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

SArrueLorca avatar Oct 18 '21 20:10 SArrueLorca