Mailing List os2-wireless_users@2rosenthals.com Archived Message #6428

From: "Neil Waldhauer" <os2-wireless_users@2rosenthals.com> Full Headers
Undecoded message
Subject: Re: [OS2Wireless] Command File to Enable/Disable WiFi
Date: Sat, 7 Nov 2009 08:09:12 -0800
To: "OS/2 Wireless Users Mailing List" <os2-wireless_users@2rosenthals.com>

On Fri, 06 Nov 2009 19:16:10 -0500 (EST), "Hakan"
<os2-wireless_users@2rosenthals.com> wrote:

> Does anyone have the commands that need to be used in a CMD file to
> enable/disable the built-in WiFi? I am currently doing it using the
> eCenter widget but would like to have a CMD-file for enabling WiFi
> while disabling the cabled connection, and vice versa.

These are commands I used a long time ago. Modify them to suit yourself.

Neil


/* turn on the radio
 * This command activates the 802.11b interface
 *
 * The wireless NIC should be inserted in the PC Card slot
 */
wifiProg = "e:\programs\ambicom\wifistat.exe"
say "Activating the wireless network card"
'@ net stop messenger /y'
'@ net stop req /y'
'@ dhcpmon -t'
'@ ifconfig lan0 down'
'@ ifconfig lan0 delete'
'@ route -fh'
'@ arp -f'
'@ dhcpstrt -i lan1 -d 0'
'@ start' wifiProg
'@ start dhcpmon'
say "Wireless networking enabled"
return


/* turn off the radio
* This command deactivates the 802.11b interface
*/
say "Deactivating the wireless network card"
'@ go -k wifistat.exe'
'@ go -k dhcpmon.exe'
'@ dhcpmon -t'
'@ ifconfig lan1 down'
'@ ifconfig lan1 delete'
'@ route -fh'
'@ arp -f'
'@ dhcpstrt -i lan0 -d 10'
say "Cable networking enabled"
--
Neil Waldhauer, neil@blondeguy.com

I found God; now it's my turn to hide.

Subscribe: Feed, Digest, Index.
Unsubscribe
Mail to ListMaster