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 even after setting suPath Android.

Open KeaganFerrao opened this issue 3 years ago • 2 comments

Getting "No permission to read or write this serial port" Error while trying to read serial port.But After setting the su path, the app does not run at all. It stops on a white screen and "BUNDLE ./index.js" command dosen't move ahead. (/system/xbin/su is my root path)

Code snippet: - SerialPortAPI.setSuPath("/system/xbin/su"); let serialPort = await SerialPortAPI.open("/dev/ttyS1", { baudRate: 9600 }) serialPort.onReceived(buff => { setData(buff.toString('hex').toUpperCase()); }) } catch (error) { console.log(error.message) setData(error.message); }

KeaganFerrao avatar Feb 02 '22 12:02 KeaganFerrao