Errors programming Wlan
Answer
1/8/19 11:43 AM

On the workbench main page I clicked on Wlan management and found these errors in the image. I just added the SSID of the network I wanted the device to connect to but it seems it doesnt connect. Can anyone help?

0 (0 Votes)
RE: Errors programming Wlan
Answer
1/8/19 11:44 AM as a reply to Syed Asphandyar Ali.
Furthermore, the operation also aborted. 
0 (0 Votes)
RE: Errors programming Wlan
Answer
1/8/19 2:18 PM as a reply to Syed Asphandyar Ali.

Hello Syed,

i am not sure what project you are using right now. Is it one of the tutorial projects?

But the Code you posted has a wrong syntax. The XDK is basically a microcontroller. So you have to program it with C code. You can use C89 or C99, both is ok.

Before you are going further in XDK programming i recommand to do a C tutorial to avoid syntax errors.

If you want to add a SSID of you WLAN the code should look something like that:

WlanConnect_SSID_T connectSSID = "yourWlanSsid";

WlanConnect_Init();

NetworkConfig_SetIpDhcp(0);

WlanConnect_Open(connectSSID );

You forgot the semicolons in the end of the lines.

If you have further questions feel free to ask.

Best regards,

Christian

0 (0 Votes)
RE: Errors programming Wlan
Answer
1/8/19 3:34 PM as a reply to Christian Köhler.
Dear Syed,

As Christian stated, the screenshot you provided does unfortunately not show any hint about which WlanNetworkManagement example from which XDK-Workbench version you are referring to.
Could you please go more into detail about the version of the XDK-Workbench you are currently running on?

Furthermore, the issue might be caused, because you have parts of the Wi-Fi implementation in the main.c file, which is only supposed to be used to start the XDK application and the FreeRTOS operation system next to other necessary XDK peripherals.

It should not be used for implementing any kind of functionality in it. For the implementation of your XDK functionality, you always should use the header- and implementation files AppController.h and AppController.c .

Additionally, as Christian already mentioned, the functions PAL_Initialize() and PAL_socketMonitorInit() are not closed with a semicolon ("; "), which is essential in the language C to indicate the end of a programming sequence.
I guess this is most likely the main cause for your error.

Please let me know if this was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo
0 (0 Votes)
RE: Errors programming Wlan
Answer
1/8/19 5:00 PM as a reply to Franjo Stjepandic.

Thanks Christian and Franjo, 

 

I realized the mistakes I made due to poor knowledge of C. I wanted to program XDK to connect with my LAN so I could sense temperature and control SonOFF switch automatically, but it seems a long way now. Ill go through C tutorials for refreshers, thank you.

0 (0 Votes)
RE: Errors programming Wlan
Answer
1/9/19 4:53 PM as a reply to Syed Asphandyar Ali.
Hello Syed,

you are very welcome.

By the means of using the internal temperature sensor of the XDK to control a relay for automatic purposes, the most important question is, how precise the temperature should be read and how are the environmental requirements.

Due to the internal placement of the XDK's temperature sensor, the heat of the board and the almost closed housing, the internal XDK sensor is majorly influenced by the internal Wi-Fi chip, which produces the most heat. Here it depends how long the XDK will run in your environment and if it has time to warm up.

If the XDK has time to warm up onto the operating temperature, then you can simply compensate the offset by using the compensation feature in the BCDS_Environmental.h API.

Otherwise, if the XDK has not the time to warm up to operating temperature, then the offset caused by the Wi-Fi module has a much greater impact on the temperature measuring.

Then you will need to take dynamic temperature compensation into account, but this depends on the requirements of your project.

Please let me know if this was helpful and feel free to ask if you have further questions.

Kind regards,
Franjo
0 (0 Votes)