drk
drk

Reputation: 271

Objective-C initiate/restore wifi connection

I am currently developing an app - a packet sniffer. It has a server and a client component. Server is written using java. And the client is written using objective-c. I have a centralized server. App is installed in the clients. It will run in frequent intervals and sends information to server. Everything works fine except the following part :

I am using airport en1 sniff command to sniff packets. When it is sniffing the packets, it goes to monitor mode and I lose the internet connection. Are there any frameworks or API that would allow me restore my previous internet connection or initiate a new internet connection?

Thanks in advance!

Upvotes: 1

Views: 508

Answers (2)

Joshua Nozzi
Joshua Nozzi

Reputation: 61228

A wireless interface in "sniff mode" can't be used to participate in network traffic. It's a special mode that has it busy listening to everybody else. It can't be used for both simultaneously.

Upvotes: 2

Rob Keniger
Rob Keniger

Reputation: 46020

You can use the various functions in the System Configuration framework to do this.

Upvotes: 0

Related Questions