prokli Active Member Licensed User Longtime User Apr 1, 2020 #1 I am using the USBSerial 2.30 Version inside an activity. This work great. But whenever I move same code to a code- or a service module, I dont get any reception event. I mean that the function shown next is never called again: B4X: Sub astreams_NewData (Buffer() As Byte) Dim oByte As String oByte = BytesToString(Buffer, 0, Buffer.Length, "UTF8") bytdata = bytdata & oByte End Sub
I am using the USBSerial 2.30 Version inside an activity. This work great. But whenever I move same code to a code- or a service module, I dont get any reception event. I mean that the function shown next is never called again: B4X: Sub astreams_NewData (Buffer() As Byte) Dim oByte As String oByte = BytesToString(Buffer, 0, Buffer.Length, "UTF8") bytdata = bytdata & oByte End Sub
Erel B4X founder Staff member Licensed User Longtime User Apr 2, 2020 #2 You should move the code to the starter service. Can you post the service code? Upvote 0
prokli Active Member Licensed User Longtime User Apr 3, 2020 #3 Erel, I had some issues within my external hardware (USB-RS232) but the code is working perfectly. Thanks Upvote 0
Erel, I had some issues within my external hardware (USB-RS232) but the code is working perfectly. Thanks