How to send data to USB device in node.js using libusb

前端 未结 3 1544
遥遥无期
遥遥无期 2020-12-16 21:52

I have try to get data from device (USB thermometer), following this documentation, but I have not any result.

For getting themperature data from device, I should sen

相关标签:
3条回答
  • 2020-12-16 22:45

    Use sudo before running your command.

    Wrong:

    node index.js
    

    Right:

    sudo node inex.js
    
    0 讨论(0)
  • 2020-12-16 22:48

    The interface should be declared using the term.interface(interfaceId) method, not term.interfaces[0]

    https://www.npmjs.com/package/usb#interfaceinterface

    0 讨论(0)
  • 2020-12-16 22:50

    You forgot to call interface.claim().

    https://github.com/nonolith/node-usb#claim

    0 讨论(0)
提交回复
热议问题