2D Barcode Scanner Build Error

I’ve been trying to get the DE2120 2D Barcode Scanner to work with the demo scripts in the github:

I have been through the installation instructions, but I am unable to install the package file. I keep getting this error:

I am using a Raspberry Pi with Python 3.11.2. I have installed and upgraded serial, pyserial, wheels, setuptools, numpy, and m2r2. I’ve followed a couple general troubleshooting guides but I’ve been unable to get this installed.

Any help would be greatly appreciated!

This page has some more info about the error Remove support for installed `.egg` packages when using the `importlib.metadata` backend · Issue #12330 · pypa/pip · GitHub - you can try a re-install with pip3, or you can just download the package directly here 2D Barcode Scanner Breakout Hookup Guide - SparkFun Learn

I tried reinstalling the package and still couldn’t get it to work. Do you think the .egg file warning is the problem?

I also tried downloading the package directly from that page but I couldn’t run the script. I kept getting this error:

I tried to install the pip package again, which weirdly has a different name than the one linked in that hookup guide, but I couldn’t even in a venv

I’m also realizing that my cables might not be compatible with the Raspberry Pi4. I’m finding I can use the device with Terra Term and a USB C-USB C cord on my laptop, but it doesn’t register with a USB C-USB A. The Raspberry Pi4 doesn’t have C ports, so would an adapter be sufficient?

As long as the adapter and cable have all 4 lines on them (some are power-only and only have 2 lines)

I got the device to register properly, but I’m still getting an error I believe is related to the de2120_barcode_scanner package not properly being installed. It throws this when I try to run the first example script:

File "/home/username/Documents/GitHub/DE2120_Py/venv/lib/python3.11/site-packages/de2120_barcode_scanner.py", line 226, in is_connected if ord(incoming) == 0x06: # ACK ^^^^^^^^^^^^^ TypeError: ord() expected a character, but string of length 0 found

I’m still following the installation guide on github, since the package on the setup page that you linked has a different name and throws an error when I try to install with pip3 install sparkfun-de2120. I’m still getting the same error when I try to run the install command:

It actually looks like this is an open issue:

Drats - do you an any other non-4B MCUs laying around?

Also: let me know if it no longer suits your use-case (or alert the vendor if not purchased from us) and we can get it returned

Another option, if’n: I used an old $40 laptop for this back when, perhaps that’s an option for you too

I tried on my laptop and had the same error. This is for my capstone project at school and was ordered through the university, so a return might be a process.

Is there any hope the repo could be updated any time soon? If not I might look for some kind of workaround or another option.

Or is there any way I can get the contact of the original repo creator?

You can try to msg them on github and see if they have any suggestions, other than that I’m mostly out of ideas