Hi guys,
I just bought this device https://www.startech.com/it/m/Sched...tatore-micro-usb-seriale-android~ICUSBANDR232.
I'm trying to send some commands using this RS232 adapter.
What is the best way to use it?
I'm using the usb library to discover the adapter as an accessory and sending commands using the asyncstream. Everything works fine for the first start of the app but when i close it and open again an error appear: libcore.io.ErrnoException: write failed: ENODEV (No such device). I have to unplug/plug the adapter to make it work again.
I tried different libraries (felusb,usb serial) without results.
If i use the inputstream and outputstream instead asyncstream the problem disappear but i can't read the answer correctly. (Partial answer)
Help please..
I just bought this device https://www.startech.com/it/m/Sched...tatore-micro-usb-seriale-android~ICUSBANDR232.
I'm trying to send some commands using this RS232 adapter.
What is the best way to use it?
I'm using the usb library to discover the adapter as an accessory and sending commands using the asyncstream. Everything works fine for the first start of the app but when i close it and open again an error appear: libcore.io.ErrnoException: write failed: ENODEV (No such device). I have to unplug/plug the adapter to make it work again.
I tried different libraries (felusb,usb serial) without results.
If i use the inputstream and outputstream instead asyncstream the problem disappear but i can't read the answer correctly. (Partial answer)
Help please..