W wroyw Member Licensed User Feb 18, 2017 #1 Hi, I'm new on B4A and android programming. I need a USB-serial lib , with a read command. I found this : https://github.com/mik3y/usb-serial-for-android Now I use the SLC tool to compiling for B4A (jar + xml file) But I get many warnings like this : Working with class: com.felhr.deviceids.CH34xIds No ShortName annotation found for class: CH34xIds And then I missing many daclarations of classes ... Have you some hints for me ? Best regards Roy
Hi, I'm new on B4A and android programming. I need a USB-serial lib , with a read command. I found this : https://github.com/mik3y/usb-serial-for-android Now I use the SLC tool to compiling for B4A (jar + xml file) But I get many warnings like this : Working with class: com.felhr.deviceids.CH34xIds No ShortName annotation found for class: CH34xIds And then I missing many daclarations of classes ... Have you some hints for me ? Best regards Roy
Erel B4X founder Staff member Licensed User Longtime User Feb 19, 2017 #2 Roy Wengler said: Have you some hints for me ? Click to expand... Yes, this library is already available: https://www.b4x.com/android/forum/threads/28176 Another option: felUsbSerial - Alternative Usb Serial library Upvote 0
Roy Wengler said: Have you some hints for me ? Click to expand... Yes, this library is already available: https://www.b4x.com/android/forum/threads/28176 Another option: felUsbSerial - Alternative Usb Serial library
W wroyw Member Licensed User Feb 19, 2017 #3 thats not the same ... I search a library with a Read function like this : port.read(buffer,count,timeout) Upvote 0
thats not the same ... I search a library with a Read function like this : port.read(buffer,count,timeout)
Erel B4X founder Staff member Licensed User Longtime User Feb 19, 2017 #4 UsbSerial wraps this open source project. You should never try to read serial data synchronously in Android (on the main thread). The library together with AsyncStreams takes care of it. Upvote 0
UsbSerial wraps this open source project. You should never try to read serial data synchronously in Android (on the main thread). The library together with AsyncStreams takes care of it.
W wroyw Member Licensed User Feb 19, 2017 #5 hmm, the problem is that I must read many settings from a device (many commands) and show the settings in my application so I wanted write a sub for every command like this : sub ReadSetting1 as float end sub sub ReadSetting2 as byte end sub sub ReadSetting3 as string end sub and in my main : dim f as float = ReadSetting1 dim b as byte = ReadSetting2 dim s as string = ReadSetting3 That sound complicated with a async communication ... Upvote 0
hmm, the problem is that I must read many settings from a device (many commands) and show the settings in my application so I wanted write a sub for every command like this : sub ReadSetting1 as float end sub sub ReadSetting2 as byte end sub sub ReadSetting3 as string end sub and in my main : dim f as float = ReadSetting1 dim b as byte = ReadSetting2 dim s as string = ReadSetting3 That sound complicated with a async communication ...
Erel B4X founder Staff member Licensed User Longtime User Feb 19, 2017 #6 See my answer here: https://www.b4x.com/android/forum/threads/usbserial-wait-for-receiving-bytes.76336/ Upvote 0
See my answer here: https://www.b4x.com/android/forum/threads/usbserial-wait-for-receiving-bytes.76336/