Giter VIP home page Giter VIP logo

node-red-contrib-usbhid's Issues

unable to duplicate the output of the provided example

Device: Raspberry Pi Zero W
OS: Raspberry Pi Imager recommended RPi OS (Legacy, 32 bit) Debian/Bullseye
Barcode Scanners: Honeywell 1990iXR & Nadamoo Bur3003
Process:

  1. Fresh install of recommended RPi OS (Legacy, 32 bit) Debian/Bullseye
  2. Library installation of node-red-contrib-usbhid
  3. Resolved Raspberry Pi/Node Red crashing by implementing the following
  4. After locating VID & PID, the “HIDdevice” flow would error with “TypeError: Cannot write to hid device”
  5. Ignoring this error & scanning would output individual characters as shown below (& not as a continuous string).
    Request:
    What am I currently missing that is preventing me from duplicating the results shown in the original article?

[ { "id": "e7bfae6b93c713bf", "type": "tab", "label": "Flow 1", "disabled": false, "info": "", "env": [] }, { "id": "7213798195f1c63d", "type": "group", "z": "e7bfae6b93c713bf", "name": "USBHID", "style": { "label": true }, "nodes": [ "c5f5f7e78d547a66", "0ed45f133c95bb55", "8a4dd18c70dca5d2", "06b8086b8b687eb9", "911ec5f175e778cf", "fbaea9ab03cbe2a2", "27114005a81dc1e2" ], "x": 194, "y": 59, "w": 692, "h": 122 }, { "id": "c5f5f7e78d547a66", "type": "debug", "z": "e7bfae6b93c713bf", "g": "7213798195f1c63d", "name": "debug 2", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "false", "statusVal": "", "statusType": "auto", "x": 620, "y": 100, "wires": [] }, { "id": "0ed45f133c95bb55", "type": "getHIDdevices", "z": "e7bfae6b93c713bf", "g": "7213798195f1c63d", "name": "", "x": 460, "y": 100, "wires": [ [ "c5f5f7e78d547a66" ] ] }, { "id": "8a4dd18c70dca5d2", "type": "inject", "z": "e7bfae6b93c713bf", "g": "7213798195f1c63d", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 300, "y": 100, "wires": [ [ "0ed45f133c95bb55" ] ] }, { "id": "06b8086b8b687eb9", "type": "HIDdevice", "z": "e7bfae6b93c713bf", "g": "7213798195f1c63d", "connection": "68a0ec4b6af1dcb1", "name": "", "x": 470, "y": 140, "wires": [ [ "fbaea9ab03cbe2a2" ], [] ] }, { "id": "911ec5f175e778cf", "type": "debug", "z": "e7bfae6b93c713bf", "g": "7213798195f1c63d", "name": "debug 3", "active": true, "tosidebar": true, "console": false, "tostatus": false, "complete": "true", "targetType": "full", "statusVal": "", "statusType": "auto", "x": 780, "y": 140, "wires": [] }, { "id": "fbaea9ab03cbe2a2", "type": "function", "z": "e7bfae6b93c713bf", "g": "7213798195f1c63d", "name": "Hex to String", "func": "const hexBuffer = msg.payload;\n\n// Convert the hex buffer to a Buffer object\nconst buffer = Buffer.from(hexBuffer, 'hex');\n\n// Convert the Buffer to a string\nconst string = buffer.toString();\n\n// Assign the string to msg.payload for further processing\nmsg.payload = string;\n\nreturn msg;", "outputs": 1, "timeout": 0, "noerr": 0, "initialize": "", "finalize": "", "libs": [], "x": 630, "y": 140, "wires": [ [ "911ec5f175e778cf" ] ] }, { "id": "27114005a81dc1e2", "type": "inject", "z": "e7bfae6b93c713bf", "g": "7213798195f1c63d", "name": "", "props": [ { "p": "payload" }, { "p": "topic", "vt": "str" } ], "repeat": "", "crontab": "", "once": false, "onceDelay": 0.1, "topic": "", "payload": "", "payloadType": "date", "x": 300, "y": 140, "wires": [ [ "06b8086b8b687eb9" ] ] }, { "id": "68a0ec4b6af1dcb1", "type": "HIDConfig", "vid": "3118", "pid": "4097", "name": "Barcode Scanner" } ]

Picture1
Picture2
Picture3
Picture4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.