![]() |
|
|
|||||||
![]() |
Wireless Networking - Switching from Ad Hoc to access point mode and visa-versa |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
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 |
|
|