wireless signal strength

Post Reply
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

wireless signal strength

Post by Silvio »

Can YOU post the whole code how to get the wireless signal strength, thanks
Best Regards, Saludos

Falconi Silvio
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: wireless signal strength

Post 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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: wireless signal strength

Post 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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: wireless signal strength

Post 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 :-)
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: wireless signal strength

Post by Antonio Linares »

Otto,

As a start example:
wifi.cpp

Code: Select all

#include "WifiPeek.h"

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

HB_FUNC( CWIFIPEEK )
{
   hb_retnl( ( LONG ) new CWifiPeek );
} 
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: wireless signal strength

Post 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" )
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: wireless signal strength

Post 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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: wireless signal strength

Post 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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: wireless signal strength

Post 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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: wireless signal strength

Post 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.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: wireless signal strength

Post 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
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Antonio Linares
Site Admin
Posts: 37481
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain
Contact:

Re: wireless signal strength

Post by Antonio Linares »

Otto,

> symbol mobile 2003 Second Edition

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

Antonio Linares
www.fivetechsoft.com
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Re: wireless signal strength

Post 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 %
Best Regards, Saludos

Falconi Silvio
Post Reply