Implementing DE2120 barcode reader

Hello,

I am trying to implement a 2D barcode reader with Raspberry pi 4B on UART, with the Sparkfun python package.

The problem is that there is an issue while receiving data. It cannot pass the begin check with the firmware version request, because the request time’s out without answer. I tried to disable the “wait for ACK/NACK”, or retrying endlessly, and sometimes waiting is sufficient, after like 10 minutes the begin process succeeds, sometimes not, sometimes scanning many barcodes makes it succeeds, sometimes scanning configuration barcodes works out. I don’t know what to do, I thought about the possibility that the sensor doesn’t have enough power and I verified it, it suits the specs. Also tried to change the wires, nothing to do.

Does it work normally with a different MCU (PC, arduino, etc)? Also be sure to run the package updates https://learn.sparkfun.com/tutorials/2d … on-package

On Windows with USB it works smoothly. I don’t have a UART/USB cable to test with UART on Windows though. Tried to scan the POR232 barcode beforehand, and then tried to open connection with scanner with UART, but doesn’t work. It receives nothing, not even NACK.

"ERROR: An exception occured while trying to open serial connection to scanner:

2024-02-02T10:22:12.063090 - ord() expected a character, but string of length 0 found"

Tried on USB with the raspi, works perfectly too in USB/COM mode