-
Notifications
You must be signed in to change notification settings - Fork 278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bluetooth barcode scanner #624
Comments
Barcode scanners generally ship with interfaces that are pre-configured. There are many different configurations, but in regards to connectivity, they generally support:
Unfortunately, the default configuration of these devices isn't always obvious. In the case of my scanner, there was a booklet that shipped with it and I had to scan a configuration barcode to switch it from keyboard mode to HID mode. Note, QZ Tray has been tested with Symbol (Zebra) and Honeywell barcode scanners in HID mode. |
@tresf Thanks for your reply ! :) HID is kind of serial emulation ? |
Although some USB devices offer serial emulation, HID is quite different from serial.
I'm not sure what an SPP scanner is, but if you share the make/model of your barcode scanner, we can check quickly if it supports HID communication. Symbol (now part of Zebra) is the most popular barcode scanner in the United States and our product works with that just fine. Honeywell is another popular brand and we were able to get it working with some custom code (#288) so that is supported as well. If your scanner is acting as a keyboard, you should see if it offers HID support, or share the product information with us so that we can check for you. |
@tresf its just a cheep no brand bluetooth barcode scanner. Do you have any experience with bluetooth reders ? Thanks for your help so far ! :) |
We're still interested, we try to be hardware agnostic and if there are cheap bluetooth barcode scanners being bought on mass, we'd love to support them like the big brands. That said, bluetooth is an odd technology to interact with, so we'll need some more information. Firstly, yes, serial is a viable option for some Bluetooth devices, so I'll have to double-back a bit on my previous HID statements. This is because Bluetooth very specifically provides an RS232 emulation layer in the protocol. If you have a way to enable this, you can use our Serial API to communicate with the scanner. In regards to the Tera digital brand, I have a feeling the comms will be very similar. Most often the cheaper hardware providers attempt to mimic the more expensive brands. |
As i have read "HID MODE" is default for ble scanners, and only some support SPP mode (RS232 emulation) |
I have a Tera model arriving next Tuesday, so we can test viability. |
@tresf i also just oredre a Tera T5100, so will get back to you when it arrives and i have testet :D |
@tresf just got my T5100 today
So i guess the only way to make ble barcode reader work with QZ is to use the SPP mode with COM. Tho i think this will give some issues when reader goes in standby. |
@tresf is it possible to listen for when BLE device connects / disconnect ? |
Not really. You can continuously scan the COM ports and pop something up when a new one's discovered but the COM is relatively generic and if it's through Bluetooth I don't know if the OS removes and re-adds it each time it "connects", knowing it's the scanner would be quite hard, we'd need proper Bluetooth support to know that it's that actual scanner. Bluetooth support doesn't exist for Java proper, so it would be a pretty large enhancement to add it. |
@tresf any sugestions on what else to do ? :) |
Mine will arrive on Friday and I'll know more. I don't have an SPP device to know the behavior. My experience with virtual COM ports is you can assign a number, so that might be a good way to control it, e.g. always use I don't know how this would work on Mac or Linux though. I'll know more when the hardware arrives, I guess. :D |
@tresf in windows bluetooth maneger you can defind what virtual COM the bluetooth device should use. |
Yeah they call it HID, but it's probably more accurately a HID keyboard, which we're locked out of communicating with for security/keylogging purposes. 🤣
I'd guess this is
I'm curious how the port behaves when the device sleeps or gets powered off. I think handling these scenarios is going to prove whether or not SPP is a viable solution. Since they offer this mode, it may be as easy as periodically checking that port, handling closing/opening, etc. This should be relatively easy if the COM port doesn't constantly change. |
A good way to test this without QZ Tray is to install Putty, open to that COM port and see how Putty behaves. Putty is a nice way to testout the communication for a serial device without having QZ Tray in the middle. We should be able to mimic Putty. |
@tresf yea it would be great to have BLE support. |
Mine will be in tomorrow too, we'll know more then. |
@tresf QZ PUTTY |
@thbl I ran out of time today, but when I get to this, I'll attempt to put together a small routine which automatically checks and opens communication to the device. I should have time time in the next few days. |
@tresf "LightBlue" app from android store can be used for find custom services/UUID For Tera T5100 i found the BLE service to be 0000feea-0000-1000-8000-00805f9b34fb and the characteristic (data to read / notify) 00002aa1-0000-1000-8000-00805f9b34fb I know this is a bit off topic, but wanted to share my findings as this has solved my app issue for the moment.. :) |
Seams like its not possible to auto connect to a device tho..... :/ |
@tresf maby this could be used in QZ to detected if device close com ? |
I tried to continuously send data to the device in hopes that the interrupted connection would be caught, but it's not. Even Putty seems confused that the device has lost connection. There's a barcode you can scan which will increase the default sleep time to 30 minutes with the downside of decreasing the battery life. I'm also getting QZ Tray to become confused about whether or not the port is opened, requiring me to restart QZ Tray between tests. Proper wake/sleep will likely require a bluetooth library and API expansion. Thoughts are welcome. |
Perhaps a middleground is to set a JavaScript timeout that matches the scanner's default timeout which closes the port just before sleep occurs. I can assume that received data is the time it's going to start it's sleep countdown from. It's not ideal, but should at least close the connection out cleanly. |
@tresf think it will give troubles to do a timeout function in JS. |
@tresf did you check if tera HID over cable works with qz ? |
No I haven't but I'd expect this to work just fine, we're already integrated with Honeywell, Symbol (Zebra) without issue. |
Hi
I'm new to QZ, as i understand it i can use the HID api to read input from etc. a barcode scanner / keyboard ?
Tho i have tried claming device in demo and click open stream, i get no data from keyboard / barcode scanner ?
What am i doing wrong, using version 2.1
The text was updated successfully, but these errors were encountered: