Author Topic: TwclWifiManager without vcl, problems with events  (Read 12982 times)

rstruebl

  • Guest
TwclWifiManager without vcl, problems with events
« on: April 09, 2015, 01:09:33 PM »
Hello!

I tried to implement the TwclWifiManager without the usage of the vcl in an external unit:

-------------------------------------------------------
constructor TRsWLan.Create;
begin

  inherited Create(nil);

  wclAPI         := TwclAPI.Create(nil);
  wclWiFiManager := TwclWiFiManager.Create(nil);

  // ---> events
  wclWiFiManager.OnConnected    := OnApConnected;        // WclWiFiConnectionEvent
  wclWiFiManager.OnDisconnected := OnApDisConnected;   // WclWiFiConnectionEvent
  wclWiFiManager.OnOpened       := OnApOpened;             // TNotifyEvent
  // <--- events
 
 ...

----------------------------------------------------------------

My problem is, that only the "OnOpened" shows an reaction, not the important ones
"wclWiFiManager.OnConnected / wclWiFiManager.OnDisconnected". The only difference I could see is that the reacting one is type of "TNotifyEvent", the others "WclWiFiConnectionEvent".
In a windows based application everything works fine, but I have to write a driver for a console application...

Is there any possibility to get them working?


Best Regards
rstruebl


Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 3675
  • Karma: 1000
    • Wireless Communication Libraries
Re: TwclWifiManager without vcl, problems with events
« Reply #1 on: April 09, 2015, 04:12:22 PM »
Hello,

WCL requires Message Loop in your console app.

If you know C++ a bit you may take a look on BluetoothConsole demo from WCL C++ Edition.

rstruebl

  • Guest
Re: TwclWifiManager without vcl, problems with events
« Reply #2 on: April 16, 2015, 09:41:58 AM »
Hi Mike,

thanks a lot!
I got it working.

Best Regards
rstruebl

 

Sitemap 1 2 3 4 5 6 7