Ruby - Get USB VID/PID from serial port in a cross platform way

Kaz Walker

I'm writing a Ruby gem that will communicate to devices over serial via USB. There are a few different communication formats I need to deal with, the format is determined using a combination of PID/VID values.

I'd like for the gem to be cross platform (Linux/Mac/Windows), but I would settle for just Linux and Mac.

What is the most portable way in Ruby, using the fewest number of gems, to reliably detect USB PID/VID info of a serial port?

Kaz Walker

I ended up parsing the output from command line programs under Mac & Linux, there doesn't seem to be a solution under windows with out writing a custom C extension.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Get input from a scanner connected to USB port or Serial Port in .net

From Dev

Data from USB ~ Serial Port

From Dev

Reading from USB serial port under Cygwin

From Dev

System.USB: serial port from Device

From Dev

Unable to get all characters from serial port

From Dev

How to get data from serial port?

From Dev

PHP USB serial port call from Windows to Linux

From Dev

serial port on laptop with usb adapters

From Dev

Get serial number from a certificate using Ruby

From Dev

Best way to return value from serial port within a library

From Dev

Best way to get favicon working cross browser/platform

From Dev

How to get a settings storage path in a cross-platform way in Qt?

From Dev

Cross-platform way to run external process from java?

From Dev

How to get pulses from the output of serial port RS232?

From Dev

Read/Write on Serial Port in Windows Universal Platform

From Dev

How can I get USB device serial number from iserialnumber?

From Dev

How to get the effective height of window in a cross-browser and cross-platform way?

From Dev

USB Serial Port Unplugged but still in the list of Ports

From Dev

Read USB to Serial port Info in Xojo

From Dev

Match USB serial # to port name with Qt and libusb

From Dev

USB Serial port programming has "disastrous" results

From Dev

Bind serial device address to specific usb port

From Dev

USB Serial port programming has "disastrous" results

From Dev

can latency of usb-serial port be programmed?

From Dev

Get local IP address from "ip route" cross-platform

From Dev

Why my serial port keep disconnecting when I stream data from PC to Arduino via usb?

From Dev

Read double from serial port

From Dev

Read double from serial port

From Dev

Reading from serial port in C

Related Related

  1. 1

    Get input from a scanner connected to USB port or Serial Port in .net

  2. 2

    Data from USB ~ Serial Port

  3. 3

    Reading from USB serial port under Cygwin

  4. 4

    System.USB: serial port from Device

  5. 5

    Unable to get all characters from serial port

  6. 6

    How to get data from serial port?

  7. 7

    PHP USB serial port call from Windows to Linux

  8. 8

    serial port on laptop with usb adapters

  9. 9

    Get serial number from a certificate using Ruby

  10. 10

    Best way to return value from serial port within a library

  11. 11

    Best way to get favicon working cross browser/platform

  12. 12

    How to get a settings storage path in a cross-platform way in Qt?

  13. 13

    Cross-platform way to run external process from java?

  14. 14

    How to get pulses from the output of serial port RS232?

  15. 15

    Read/Write on Serial Port in Windows Universal Platform

  16. 16

    How can I get USB device serial number from iserialnumber?

  17. 17

    How to get the effective height of window in a cross-browser and cross-platform way?

  18. 18

    USB Serial Port Unplugged but still in the list of Ports

  19. 19

    Read USB to Serial port Info in Xojo

  20. 20

    Match USB serial # to port name with Qt and libusb

  21. 21

    USB Serial port programming has "disastrous" results

  22. 22

    Bind serial device address to specific usb port

  23. 23

    USB Serial port programming has "disastrous" results

  24. 24

    can latency of usb-serial port be programmed?

  25. 25

    Get local IP address from "ip route" cross-platform

  26. 26

    Why my serial port keep disconnecting when I stream data from PC to Arduino via usb?

  27. 27

    Read double from serial port

  28. 28

    Read double from serial port

  29. 29

    Reading from serial port in C

HotTag

Archive