LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-19-2012, 05:21 PM   #1
andrew70
LQ Newbie
 
Registered: Dec 2012
Posts: 2

Rep: Reputation: Disabled
sample code to programmatically detect wlan0


Hi,

I need to start a service (using systemd) only after wlan0 is up.
How can I detect it programmatically?

Sample code in g++ would be great. I'm using Angstrom v2012.05
Cheers
 
Old 12-23-2012, 10:59 PM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Moved: This thread is more suitable in Programming and has been moved accordingly to help your thread/question get the exposure it deserves.
 
Old 12-24-2012, 04:09 PM   #3
theNbomr
LQ 5k Club
 
Registered: Aug 2005
Distribution: OpenSuse, Fedora, Redhat, Debian
Posts: 5,399
Blog Entries: 2

Rep: Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908Reputation: 908
Not completely sure, but I think your requirement falls into the domain of udev. Perhaps research the problem form that angle.
--- rod.
 
Old 12-25-2012, 05:48 AM   #4
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: Disabled
I think you could parse the output of both 'ifconfig' and 'iwconfig'. ifconfig will show you if the interface is up and iwconfig will show you that it is authenticated at the access point.

Markus
 
1 members found this post helpful.
  


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
sample code with mmap xerox Linux - Newbie 0 10-21-2011 06:17 AM
MRG Sample Code xingkia Programming 0 05-05-2008 08:43 PM
Perl: What's this mean? (Code sample) Benr Programming 5 10-23-2004 07:20 AM
Open Firmware code for booting OS from SATA : sample code available somewhere ? drsparikh Linux - Hardware 0 03-12-2004 11:16 AM
Any sample code of how to use Rand_seed() cybercop12us Programming 0 04-03-2003 07:25 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:56 AM.

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