hid-barcode-scanner
hid-barcode-scanner copied to clipboard
DataMatrix code with special characters is not transmitted correctly
I scan a DataMatrix code from a pack of medicine and I see a different code in the app than the one transmitted via Bluetooth. Unfortunately, the "Raw Value" setting did not help either.
The text arrives via Bluetooth as "010415005024809221102784642637491725123110NN1814" (without the character between 49 and 17).
Hi, thank you for your report. When I scan the code, there is no space shown for me between the 49 and 17. Is the space for you also there if you view it from the history page?
Hi, thank you for your report. When I scan the code, there is no space shown for me between the 49 and 17. Is the space for you also there if you view it from the history page?
Using another scanner I was able to confirm the space between the 49 and 17. I will look into it why it isn't transmitted.
Using another scanner I was able to confirm the space between the 49 and 17. I will look into it why it isn't transmitted.
It looks like the missing character is a group seperator (ascii 0x1D). There are two instances of this in the code, at the beginning and in the middle ("010415005024809221102784642637491725123110NN1814"). Unfortunately it is not directly possible to type this character with a keyboard. That is why it is currently simply ignored during transmission.
What I could do instead, is to add a new option to the settings that would allow to specify a character/string that will be used as a fallback for non-typable characters (e.g. space). Let me know if that would help you or if you have other ideas!
Hi, thanks for checking!
Perhaps transferring the raw value of the barcode as a Base64 or HEX string would be an easy option? Then the receiving application would be guaranteed to have all the information from the barcode.
Perhaps transferring the raw value of the barcode as a Base64 or HEX string would be an easy option? Then the receiving application would be guaranteed to have all the information from the barcode.
That's also a good idea. The easiest way to implement this for now, would probably be as a new custom template e.g {CODE_HEX} for hex and {CODE_B64} for base64 encoding.
That sounds great! It would be wonderful if the feature could be implemented.