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

From: Laery (thelaery_at_hotpop.com)
Date: 01/19/05


Date: 19 Jan 2005 00:29:16 -0800

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" <thelaery@hotpop.com> wrote in message
news:c615ddf1.0501172325.29897a9d@posting.google.com...
> 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" <thelaery@hotpop.com> wrote in message
> news:c615ddf1.0501170610.68fe154e@posting.google.com...
>> 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



Relevant Pages

  • Re: CE virgin, looking for guidance in finding things
    ... evaluation copy on CD or DVD, since it is a huge download. ... Something that will handle TCP and UDP. ... As far as I can tell; DOS violates, unix violates, and ...
    (microsoft.public.windowsce.embedded.vc)
  • Re: MS Project 2003 Demo
    ... Perhaps MS considers sending time-limited evaluation copies to be more ... effective marketing that stripped down limited-functionality model ... in acquisitions time between a download and snail-mail is not going to ...
    (microsoft.public.project)
  • Re: The same old Ex07 32 bit questions
    ... The evaluation versions available for download appear to be EXACTLY the same ... there is actually no such thing as "evaluation media" ... It's not like in the past where you would have to install the ...
    (microsoft.public.exchange.admin)
  • Re: Coding Horrors, Cargo Cult Programming, and other Ghoulish Things
    ... writing code that fails when you change a compiler switch in the IDE or the build tool is bad style. ... DO NOT WRITE CODE THAT ONLY WORK WITH SHORT-CIRCUIT BOOL EVALUATION!. ... Or make damn sure that your personal preference really works, and write that switch in the pas file, or in a inc file. ... in my screens. ...
    (borland.public.delphi.non-technical)
  • Re: Debian evaluation copy
    ... You can download these from debian official site ... >> being I am analyzing some Linux distribution systems. ... >> your product and if there is an evaluation copy that I can get access to. ...
    (Debian-User)