Troubleshooting
Start with the symptom you can observe. Apply one change at a time, then retry the smallest Quick Start example.
| Symptom | Check | Fix |
|---|---|---|
begin() returns false: the sketch prints Scanner did not respond..., or MicroPython prints DE2120 not detected. Check wiring. | Is the scanner still in USB mode, the mode it ships in? | Scan the POR232 configuration barcode once to switch it to UART, then reset the controller. |
begin() returns false and the scanner is in UART mode | Are RX and TX crossed? | Connect the controller's TX to the scanner's RX, and the scanner's TX to the controller's RX. |
| The scanner does not power up or keeps dropping out | Is it supplied with 3.3 V on 3V3, or 5 V on USB-C? It draws up to 190 mA while scanning. | Use a supply that delivers the current. Never put 5 V on 3V3. |
| The scanner beeps on a scan, but nothing reaches the controller | The beep means it decoded the code. Does its TX reach the controller's RX? | Check that wire. If the scanner was back in USB mode, scan POR232 again. |
| Nothing at all in the Serial Monitor | Is the Serial Monitor at 115200 baud? The Arduino examples print at that speed. | Set 115200 baud and reset the board. |
| Nothing happens when you point the scanner at a code | Manual mode is the default, so the scanner reads only while triggered. Is the code within 25 to 400 mm? | Press the trigger button, or pull TRIG low. Move the code closer or further, depending on its size. |
| A code type is never read | Did a sketch switch off a symbology group? | Call enableAll1D() and enableAll2D() to switch every group back on. |
| Long codes come out cut short (Arduino) | readBarcode() stops at the buffer size, and the examples use BUFFER_LEN 40. | Raise BUFFER_LEN to fit the longest code you expect. |
| Long codes come out cut short (MicroPython) | readBarcode() keeps at most 256 bytes of one code. | Keep codes under 256 bytes, or raise _MAX_BARCODE_LEN in de2120.py. |
ImportError: no module named 'de2120' | Is de2120.py on the board? | Install it with mpremote mip install github:SolderedElectronics/Soldered-DE2120-MicroPython-Library. |
DE2120(tx=5, rx=4) fails on your board | The module creates UART(1, ...) by default. Does your board have UART 1 on those pins? | Pass another uart_id, or build a UART yourself and pass it as uart. |
begin() returns false after another sketch changed the scanner's settings | begin() only tries 9600 and 115200 baud. Did a sketch call changeBaudRate() with another rate? | Keep the scanner at 9600 or 115200 baud: begin() cannot find it at any other rate. |
Still blocked?
Ask on the community forum. Include the following so someone can reproduce it:
- product name and SKU: Soldered Barcode Scanner DE2120,
333384 - controller board and software environment
- library or module revision
- complete error text or unexpected output
- connection method and power source
- a clear photo of the wiring