-
-
Notifications
You must be signed in to change notification settings - Fork 42
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
[Bug]: Barcode scanning bug on Add Part page #305
Comments
Ran output of scanner through cat and xxd (i.e. dumped the text in hex/ascii) and got this:
|
Is there documentation on what format the barcode scanner should send it's messages. I see dozens of different options in the barcode reader manual. I have tried several different configs on 2 different scanners. |
that's a good question. I'm not aware if there's an actual standard here that should be applied as the barcode scanners all seem to vary by brand. I've bought a few barcode scanners and tried to add support for the different formats they output. I based most of my work on what DigiKey likes to see for barcode input in their API, and this has to do with how the Group Separator (GS) and Record Separators (RS) values are encoded. Most barcode scanners have a way to configure them, but many manufacturers have different default values. I probably need to add more information to the Barcode wiki, and after doing some testing just now I can see it's not working very reliably. Could be from a browser update, or could have been affected by some other related changes in the past. I'll try to prioritize investigating and fixing this very soon, if anyone else has barcode scan data they can share it would help. The support I wrote will try to convert different formats before they are processed in an attempt to standardize the input. So it's supposed to support the following GS code characters: Here's the raw output from one of my barcode scanners (Tera 2D D5100), on a DigiKey part label:
It's hard to see the unicode characters here, but here's what it looks like in the Binner Barcode Scanner tool where it is outputting the ␝ and ␞ characters in rawValueFormatted: ![]() {
"type": "datamatrix",
"value": {
"description": "BINNER 24V CAB U7",
"mfgPartNumber": "AOZ2261BQI-28",
"salesOrder": "88367366",
"invoice": "106737011",
"unknown1": "1",
"countryOfOrigin": "CN",
"quantity": 10,
"pick": "PICK",
"partId": "22248872",
"loadId": "999999"
},
"correctedValue": "[)>␞06␝PBINNER 24V CAB U7␝1PAOZ2261BQI-28␝30P785-AOZ2261BQI-28CT-ND␝K␝1K88367366␝10K106737011␝9D2422␝1TARN1154.01␝11K1␝4LCN␝Q10␝11ZPICK␝12Z22248872␝13Z999999␝20Z000000000000000000000000000000000000000000000000000000000000000000000000\r␄\r",
"rawValue": "[)>06\u001dPBINNER 24V CAB U7\u001d1PAOZ2261BQI-28\u001d30P785-AOZ2261BQI-28CT-ND\u001dK\u001d1K88367366\u001d10K106737011\u001d9D2422\u001d1TARN1154.01\u001d11K1\u001d4LCN\u001dQ10\u001d11ZPICK\u001d12Z22248872\u001d13Z999999\u001d20Z000000000000000000000000000000000000000000000000000000000000000000000000\r",
"rsDetected": false,
"gsDetected": true,
"eotDetected": false,
"invalidBarcodeDetected": false,
"rawValueFormatted": "[)>06␝PBINNER 24V CAB U7␝1PAOZ2261BQI-28␝30P785-AOZ2261BQI-28CT-ND␝K␝1K88367366␝10K106737011␝9D2422␝1TARN1154.01␝11K1␝4LCN␝Q10␝11ZPICK␝12Z22248872␝13Z999999␝20Z000000000000000000000000000000000000000000000000000000000000000000000000␍"
} |
I just got my Tera D5100. Decided wireless was much handier. Unfortunately, it's got similar issues. Running this on the barcode tool (nice took BTW), it seems to recognize the bar code, but still returns errors from Digi-key. Here's the output of my new D5100:
Still get the errors: When I go to the settings/Digikey I can run the test and it says it's succeeding. |
How should I have the Digikey API set up? |
Your configuration looks correct for DigiKey, assuming you have it correct on the DigiKey side. You may have already seen the help page for setting it up. I'm taking a guess here but I think you're affected by the bug that's popped up in version 2.6.4 and 2.6.5. I'm currently trying to debug the cause and get a release pushed out to fix it - hopefully by today by worst case tomorrow. |
yep, confirmed it's the same issue. I'll ping this issue once the new release is up for this |
the issue you are seeing is actually a little different but also related to DigiKey search results, I've managed to fix this one (incorrect parametric filtering, some really old code but unrelated to barcode stuff) and once I've got the other one I'll get a release up. |
Binner version
v2.6.3
Operating System
Windows 11
Describe the bug and the steps to reproduce it
When scanning a DigiKey part label to add the part to Binner, a BadRequest error is displayed even though the DigiKey api result returned the part. This appears to be a UI bug but needs further investigation. Not all parts encountered this issue.
The part appeared in the UI along with the error message (see screenshot)
Would you like to attach your appsetings.json configuration?
No response
Screenshots or Videos (Optional, but they help!)
Are you able to contribute a PR? (No is ok!)
None
The text was updated successfully, but these errors were encountered: