Hi all,
I am developing a scanner for an application.
When I scan and debug, the red light of scanner is dead
until the barcode data are completely read at one IN endpoint.
In the other words, red light is dead while data transferring.
When I shut down my app, I use closed() method.
if(dev!=null){
commListener.stop(); //Stopping thread that keep reopening dev and reading data from IN ep
dev.close();
dev = null;
System.out.println("Device closed.");
}
After shutting down the app, I scan once.
It should show me the scanned digits as usual.
But instead, the red light is off. (seems like reading the data)
When I run my app again, suddenly my app reads the just scanned digits.
And barcode is alive again.
The scanner should still work as usual when I shut down my app.
It seems device is not closed properly.
Can anyone suggest?
Best Regards,
Swe Han
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I'm not sure what the cause of your problem is. It looks like a device specific issue.
Maybe it helps to call reset() instead of close() to reset the device.
Note that a reset will make the device handle invalid. So you need to open the device again before doing anything with it.
Hope that helps!
Regards, Andi
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hi all,
I am developing a scanner for an application.
When I scan and debug, the red light of scanner is dead
until the barcode data are completely read at one IN endpoint.
In the other words, red light is dead while data transferring.
When I shut down my app, I use closed() method.
if(dev!=null){
commListener.stop(); //Stopping thread that keep reopening dev and reading data from IN ep
dev.close();
dev = null;
System.out.println("Device closed.");
}
After shutting down the app, I scan once.
It should show me the scanned digits as usual.
But instead, the red light is off. (seems like reading the data)
When I run my app again, suddenly my app reads the just scanned digits.
And barcode is alive again.
The scanner should still work as usual when I shut down my app.
It seems device is not closed properly.
Can anyone suggest?
Best Regards,
Swe Han
Hi
I'm not sure what the cause of your problem is. It looks like a device specific issue.
Maybe it helps to call reset() instead of close() to reset the device.
Note that a reset will make the device handle invalid. So you need to open the device again before doing anything with it.
Hope that helps!
Regards, Andi