I am working on native android application. In this application I am connecting hardware devices using usb cable, for this connection I used below library: https://github.com/felHR85/UsbSerial
I have 3 different hardware devices and each device has different baudrate.
I have one scan button in app. If user click on it then I need to check which device is connected and print its information.
- To implement this, I create 3 methods. Each method have same code with different baudrate.
- When user click on scan button then it will call 1st method and check if the hardware is detected or not. If not detected then check with 2nd method.
Now the issue is, I am not getting any event if attached device is not connected with given baudrate. So I am not sure when I need to call 2nd method.
Note :- I am getting success if attached device baudrate is same as baudrate set in 1st method so its working. I need event like failed case. If I get any event if failed then I can call 2nd method in it but I am not getting any event like failed.