Hi there,
I'm using UsbSerial to connect to a usb thermal printer device.
I can connect to it and I can print with success.
After I've connected to the device, I use this:
I then start receiving information on the "astreamsUsb_NewData" function. I can read the printer status, I can detect paper errors and all that.
After I started to do this, I realized my app was getting slower and slower. I've created a counter like this:
And I realised that in 1 minute, the value of numMsgs was almost 650.000, meaning this event is being called A LOT.
Any thoughts on this issue? I'm using UsbSerial with the speed of 9600 but the printer is a Usb one.
Any help will be appreciated.
Thanks.
I'm using UsbSerial to connect to a usb thermal printer device.
I can connect to it and I can print with success.
After I've connected to the device, I use this:
B4X:
astreamsUsb.Initialize(UsbSerial1.GetInputStream, UsbSerial1.GetOutputStream, "astreamsUsb")
I then start receiving information on the "astreamsUsb_NewData" function. I can read the printer status, I can detect paper errors and all that.
After I started to do this, I realized my app was getting slower and slower. I've created a counter like this:
B4X:
Sub astreamsUsb_NewData (Buffer() As Byte)
numMsgs = numMsgs + 1
End Sub
And I realised that in 1 minute, the value of numMsgs was almost 650.000, meaning this event is being called A LOT.
Any thoughts on this issue? I'm using UsbSerial with the speed of 9600 but the printer is a Usb one.
Any help will be appreciated.
Thanks.