LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-31-2006, 07:36 AM   #1
MattFunke
LQ Newbie
 
Registered: Mar 2006
Distribution: TSLinux 3.0, RedHat Enterprise 4
Posts: 16

Rep: Reputation: 0
What to use as descriptor in ioctl for USB modem?


I finally got my wireless USB modem up and running at boot. I'd like to monitor the Carrier Detect (CD) signal, though, so that I can see when the wireless network has decided to drop me and I need to reconnect. I understand that I can look at what's returned by a function call to ioctl:

ioctl(fd, TIOCMGET, &flags);

... and if bitwise-ANDing flags with TIOCM_CAR yields nonzero, CD is asserted; otherwise, it's not.

Here's my question, though: How do I get the file descriptor (fd) for the ioctl function? Where do I find it? Is there a function (in usb.c, say) that will return it?

Thanks for any help that you can offer this rank newbie.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use ioctl with USB bluethumb Linux - General 0 02-02-2006 01:24 PM
SUSE 9.2 detect my [B]ADSL USB-Ethernet Modem-Router [/B] as a [B]Dial up modem[/B]. myprecius Linux - Hardware 0 06-27-2005 09:21 AM
Problem with Mandrake 10.0 Community, Sagem usb modem and logitech usb mouse. al370601 Mandriva 4 04-29-2004 06:48 PM
usb descriptor jonfa Linux - General 3 02-10-2004 06:32 PM
Hotplug usb agent "Cannot get config descriptor 0"? imk Linux - Networking 0 10-26-2003 12:48 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 08:59 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration