Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Detecting attached USB devices under Mac OSX

Tags:

c

macos

usb

First of all a statement: I'm a newbie when it comes to programming for the Mac. However I have an assignment which requires USB communication with a device so I thought I'll start with something basic.

I took the code from here, built it and ran it from the Terminal. It starts up and writes:

Looking for devices matching vendor ID=1351 and product ID=8193.

Starting run loop.

However after this, if I plug in and out USB devices (I tried: iPod, GPS, mouse) nothing gets written on the screen, although as much as I understand there should be whenever I connect and disconnect a device.

What am I doing wrong?

Thanks in advance.

like image 473
janosrusiczki Avatar asked Dec 05 '09 18:12

janosrusiczki


People also ask

How can I see what USB devices are connected to my Mac?

Open System Profiler from the Utilities folder, which is inside the Applications folder. From the Contents column on the left, under the Hardware header, select USB; the panel to the right will show all the USB devices that the computer recognizes.

Why isn't my USB showing up on my Mac?

Sometimes your Mac detects the USB drive but doesn't show it on the desktop. Hence, you ought to go to Finder > Preferences > General and ensure the "External disks" option is ticked. At that point, you'll see the USB drive appearing on the Mac.


1 Answers

You can also use system_profiler SPUSBDataType on a terminal

like image 132
Niko Avatar answered Nov 03 '22 10:11

Niko