Find the answer to your Linux question:
Results 1 to 3 of 3
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Question Howto get status of serial & USB port

    I m new to linux. I just want to check that if something is connected to my machine's serial port & USB port through C program using ioctl command. I searched a lot and got lot of material but still not clear that what specific data can tell me that something is connected or not.
    plz send ur suggestions for the same.


  2. #2
    Linux Enthusiast KenJackson's Avatar
    Join Date
    Jun 2006
    Maryland, USA


    You need to use libusb and libusb-devel. The API has functions like usb_open() and usb_get_string_simple().

    I'm having difficulty in that area right now. AVRDUDE includes a file named usb_libusb.c which uses these commands to access the Atmel AVRISPmkII programmer via USB. But it can't get permission to access USB, and I don't know how to set the permissions.

    Hey, also note that command-line tools 'usbview' and 'lsusb', if installed, will tell you what USB devices are connected.

  3. #3

  4. $spacer_open

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts