You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
"
uses-permission android:name="android.things.permission.USE_PERIPHERAL_IO"
uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
"
get /system/xbin/su from command ( which su ) and put this to following code
async function example() {
SerialPortAPI.setSuPath("/system/xbin/su");
console.log("tp1")
const serialPort = await SerialPortAPI.open("/dev/ttyS2", { baudRate: 38400 });
// subscribe received data
serialPort.onReceived(buff => {
console.log(buff.toString('hex').toUpperCase());
})
// unsubscribe
// sub.remove();
// send data with hex format
await serialPort.send('00FF');
// close
serlialPort.close();
}
example()
The text was updated successfully, but these errors were encountered:
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
"
uses-permission android:name="android.things.permission.USE_PERIPHERAL_IO"
uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE"
uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"
"
get /system/xbin/su from command ( which su ) and put this to following code
async function example() {
The text was updated successfully, but these errors were encountered: