Matthew1
Posts: 1
Joined: Wed Jul 10, 2019 4:15 am

USB Device URI - how to find this

Wed Jul 10, 2019 4:26 am

Hey all, I'm new to this R Pi stuff so forgive me if I am a total noob


I am trying to run some demo code for the Thingmagic USBPro RFID reader using the C version of the Mercury API on the R Pi.

The extract of my terminal is below.

I need to find the URI of my USB device to use it. I ran the 'lsusb' command, and discovered it is in Bus 1 Device 004, so I though the URI would be 'tmr:///dev/USB004' (it is the only device without a name, this must be it)

You can see below it doesn't work though, I get the same error if I just put in nonsense, leading me to think it has a completely different path.
I also tried it with USB00X for every device just to be sure


Anybody know what this path is? Or how to find it?

I am also wondering if I should have installed some sort of driver, is this only a windows thing or should this have been done? (I am a linux noob)




Code: Select all

[email protected]:~/c/src/api $ ./demo
Usage: demo reader-uri <command> [args]
  (URI: 'tmr:///COM1' or 'tmr://astra-2100d3/' or 'tmr:///dev/ttyS0')

[email protected]i:~/c/src/api $ lsusb
Bus 001 Device 004: ID 2008:1004
Bus 001 Device 006: ID 045e:00cb Microsoft Corp. Basic Optical Mouse v2.0
Bus 001 Device 005: ID 046d:c31c Logitech, Inc. Keyboard K120
Bus 001 Device 007: ID 0424:7800 Standard Microsystems Corp.
Bus 001 Device 003: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 002: ID 0424:2514 Standard Microsystems Corp. USB 2.0 Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

[email protected]:~/c/src/api $ ./demo reader-tmr:///dev/USB004
Error creating reader: Invalid argument

[email protected]:~/c/src/api $ ./demo reader-tmr:///dev/aaaaaa
Error creating reader: Invalid argument

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2224
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: USB Device URI - how to find this

Wed Jul 10, 2019 1:02 pm

That usage information looks strange. Perhaps they mean:

Code: Select all

Usage: demo reader-uri <uri> <command> [args]
Try this instead:

Code: Select all

$ ./demo reader-uri tmr:///dev/USB004 <cmd>
where <cmd> is a valid command.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2224
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: USB Device URI - how to find this

Wed Jul 10, 2019 1:04 pm

Or it could just be:

Code: Select all

Usage: demo  <uri> <command> [args]
In which case you should use:

Code: Select all

$ ./demo tmr:///dev/USB004 <cmd>

Return to “Device Tree”