bastengao / react-native-serial-port-api

react-native serial port API
https://bastengao.com/react-native-serial-port-api/
28 stars 11 forks source link

No permission to read or write this serial port even after setting suPath Android. #22

Open KeaganFerrao opened 2 years ago

KeaganFerrao commented 2 years ago

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); }

lakpriya1s commented 12 months ago

@KeaganFerrao Could you resolve your issue?

yaser-elbatal commented 2 months ago

any update ?