react-native-serial-port-api
react-native-serial-port-api copied to clipboard
no permission to read or write this serial port
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