Hello,
I’m actually using the cordovarduino plugin to do a connection between an android device and a FTDI device by the USB OTG: https://github.com/xseignard/cordovarduino
But I have an issue when I try to read the data that my FTDI device is sending. The object I have doesn’t have any data in it as you can see in this screenshot:
My FTDI device is sending a freeflow of data and I don’t have any problem to read those data in bluetooth.
Here is the function I use to connect by USB and read the data:
`fundUSBDevices()
{
serial.requestPermission({
vid:'0403',
pid:'6015',
driver: 'FtdiSerialDriver' // or any other
},
function success(){
console.log("succès permission");
alert("success permission");
serial.open(
{baudRate:9600},
function success(){
console.log("success open");
alert("success open");
//--------------------here is the function that allow the plugin to read the data from the FTDI device
serial.read(
function success(data)
{
alert("success read");
console.log(data);
},
function error(evt)
{
alert("fail read");
console.log(evt);
}
);
},
function error(evt)
{
console.log("error open");
}
);
},
function error(evt)
{
console.log("error permission");
console.log(evt);
}
);
}`
Thanks for your help.
Regards.