Go Back   Velocity Reviews > Newsgroups > Wireless Networking
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Reply

Wireless Networking - Switching from Ad Hoc to access point mode and visa-versa

 
Thread Tools Search this Thread
Old 01-19-2005, 08:29 AM   #1
Default Switching from Ad Hoc to access point mode and visa-versa


Hi,

I've downloaded the evaluation version.
Found in ethman en netui the sources needed to find the device name
and switch the mode to and from accesspoint
//switching the mode
if(iSelection == 2)
{
// Computer-to-computer
s_mode = Ndis802_11IBSS;
}
else if(iSelection == 1)
{
// infrastructure (access point) network
s_mode = Ndis802_11Infrastructure;
}
else if(iSelection == 0)\
{
// Any network (access point preferred)
s_mode = Ndis802_11AutoUnknown;
}

s_pWLanInfo->dwCtlFlags &= ~INTFCTL_CM_MASK;
s_pWLanInfo->dwCtlFlags |= (((DWORD) s_mode) &
INTFCTL_CM_MASK);

FillPreferredLV(s_pWLanInfo);
//get the devicename (I hope this will not change)
while (ReadMsgQueue(
hMsgQueue,
&sDeviceNotification,
sizeof(NDISUIO_DEVICE_NOTIFICATION),
&dwBytesReturned,
1,
&dwFlags))
{

PTCHAR ptcDeviceName = NULL;

// The device name should be in uppercase to query
NdisUIO
ptcDeviceName =
_wcsdup(sDeviceNotification.ptcDeviceName);
if (!ptcDeviceName)
{
DEBUGMSG(ZONE_ERROR, (TEXT("ETHMAN: Could not
allocate memory for string \"%s\"\r\n"),
sDeviceNotification.ptcDeviceName));
continue;
}

_wcsupr(ptcDeviceName);

I only hope it will work.

Regards
Laery
-----------------
Then you probably don't have enough information to make a serious
attempt at
this. You could download the evaluation version of PB and go from
there...

Paul T.

"Laery" <> wrote in message
news: om...
> Hi Paul,
>
> Thanks for the response, but I don't have platform builder only evc.
>
> Regards
> Laery
> ----------------------
> Yes, you can do it via the Windows Zero Config API. When you call
> WZCSetInterface(), you'd set the infrastructure mode field of the
> structure
> one way or the other.
>
> Paul T.
>
> "Laery" <> wrote in message
> news: om...
>> Hi,
>>
>> I'm currently working on an application where a ppc2003 device

prints
>> to a mobile network printer using point-to-point wifi connection.
>> (both fixed IP).
>>
>> For communication with the PC a FTP server is started on the

handheld
>> which is connected to a wifi-router which is connected to the pc

using
>> a cable.
>>
>> The problem:
>> The printer is point-to-point (you cannot take the accesspoint with
>> you on the street).
>> The communication with the PC is using an access-point. (There can

be
>> several devices, more than 50, at an office location)
>>
>> Currently the switch in connection mode has to be done manually

using
>> the supplies driver GUI. Is there away to do it using an API from
>> windows?
>>
>> Each handheld and printer has a unique IP but the same SSID and

WEP.
>> (same as the accesspoint)
>>
>> Or can something be done on the PC so that it connects to the
>> terminals one by one.
>>
>> Regards
>> Laery



Laery
  Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




SEO by vBSEO 3.3.2 ©2009, Crawlability, Inc.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46