Page 1 of 1

wireless signal strength

PostPosted: Tue May 19, 2009 11:40 am
by Silvio
Can YOU post the whole code how to get the wireless signal strength, thanks

Re: wireless signal strength

PostPosted: Sat May 23, 2009 4:58 pm
by Otto
Hello Antonio,
do you think this class can be adapted to FWPPC?
Thanks in advance
Otto

The CWifiPeek class does all the Wifi query stuff. It can be used in non-MFC applications, too. You have to add CWifiPeek.h and CWifiPeek.cpp to your project.
http://www.codeproject.com/KB/mobile/PeekPocket.aspx

Re: wireless signal strength

PostPosted: Sat May 23, 2009 10:10 pm
by Otto
Hello Antonio,
I downloaded the vp++ - project and compiled the source.
The program is working as suspected.
RSSI would be the value I need.
Please could you have a look at the vp++ code .
Do you think you could convert this code?
Thanks in advance
Otto

Image

Re: wireless signal strength

PostPosted: Sun May 24, 2009 2:44 pm
by Antonio Linares
Otto,

Yes, in fact we don't need to convert it. We can mix C and C++ code in Harbour and FWPPC :-)

We simply need to build the OBJ from WifiPeek.cpp and then create some C functions to manage the class from Harbour

I may review it this next week :-)

Re: wireless signal strength

PostPosted: Sun May 24, 2009 2:51 pm
by Antonio Linares
Otto,

As a start example:
wifi.cpp
Code: Select all  Expand view

#include "WifiPeek.h"

extern "C"
{
    #include <hbapi.h>
};   

HB_FUNC( CWIFIPEEK )
{
   hb_retnl( ( LONG ) new CWifiPeek );
}
 

Re: wireless signal strength

PostPosted: Sun May 24, 2009 3:54 pm
by Otto
Hello Antonio,
thank you. This function will be very useful.
I thought I have found a workaround for the frozen screen.
But it is not working:

I tried with a timer and a STATIC variable lNetOK

Before I check if I can reach the file on the network I activated the timer and
Set lNetOK to false. The timer executes the netzok function.
But the frozen screen is still there and only after a while the “program comes back”.

FUNCTION netzok
if lNetzOK = .f.
msginfo1("NO NET")
endif
oTmr:DeActivate()
return nil
//----------------------------------------------------------------------------//

So I am waiting very hard for the network test function.
Best regards,
Otto






Hello Antonio,
this solution is working but if there is no network you get for a very long time a frozen systembefore an error is returned.
Many useres press the reset button because they think the system is gone down.
Maybe there is a better solution?
Thanks in advance
Otto



If you mean local network, then you may check for a file existence:

if File( "\\machine\path\filename" )

Re: wireless signal strength

PostPosted: Mon May 25, 2009 5:27 am
by Antonio Linares
Otto,

Have you modified my wifi.cpp little example source code ?

That code I provided is just the starting point. Now more functions should be added to make it work.

Re: wireless signal strength

PostPosted: Mon May 25, 2009 6:30 am
by Otto
Hello Antonio,
I don’t know how to do it.
I was searching the forum for EXTERN “C” and found 2 or 3 examples.
I will try to understand these.
Best regards,
Otto

Re: wireless signal strength

PostPosted: Mon May 25, 2009 7:03 am
by Antonio Linares
Otto,

First of all we have to compile WifiPeek.cpp:

c:\vce\bin\CLARM.EXE -c -Ic:\vce\include\arm -DARM -DUNICODE WifiPeek.cpp

I am getting some compile errors here that we need to solve.

Re: wireless signal strength

PostPosted: Mon May 25, 2009 7:08 am
by Antonio Linares
Otto,

This way compiled perfectly:

c:\vce\bin\CLARM.EXE -c -Ic:\vce\include\arm -DARM -DUNICODE -DUNDER_CE WifiPeek.cpp

But I wonder if it may work fine for Windows Mobile, as -DUNDER_CE means for Windows CE.

Next we will build a small test so we can check if it properly links.

Re: wireless signal strength

PostPosted: Mon May 25, 2009 8:08 am
by Otto
Hello Antonio,

I downloaded the code from:
// Coded by dzolee
// http://dzolee.blogspot.com


I think this is his latest version.

I compiled this version with VS2005 and on my HTC (mobile 6.1)
it is working but on a symbol mobile 2003 Second Edition I only see the adapter but no AP’s.

Best regards,
Otto

Re: wireless signal strength

PostPosted: Mon May 25, 2009 8:28 am
by Antonio Linares
Otto,

> symbol mobile 2003 Second Edition

Maybe that Windows Mobile version is too old to support that code.

Re: wireless signal strength

PostPosted: Fri Jul 10, 2009 8:45 am
by Silvio
Antonio, Otto

any solution for wifi signal ?

I must use this msginfo because I use the fwppc application far from Sea chalet and I wish link to pc's dbfs

the user must see the signal and open the application when the signal is on 80 %