WLAN Problems EB069
Posted: Thu May 03, 2012 4:29 pm
Hello,
To anyone having problems with the WLAN board.
Basically the WLAN board features a WIZ610wi module that the microcontroller communicates with. The problem with the modules seems to be in getting them to reply to commands being sent by the microcontroller. A reason for this is that the module uses the UART pins for commands and wireless data and the module seems to sometimes get stuck in data mode. Once the module has replied to incoming commands then the two devices run hand in hand using the component code.
Another issue is that the board requires two wired connections from the programmer. +V and VPWR. You must ensure both these connections are wired into the module the correct way around before powering up the board. Be very careful with the VPWR cable as if this shorts against anything on the E-blocks then it could potentially cause all kinds of problems such as killing your WLAN module.
The first step to take when troubleshooting the board is to update to the latest version of Flowcode. Flowcode PIC v5.2 will be available shortly and this includes the latest recommended fix for the WLAN component C code.
The WLAN component uses a few levels of the stack so you may need to enable the software call stack to fully support this device on a 8-bit PIC, AVR's ARM's and dsPIC's need not do this. To do this select the Chip -> Compiler options menu in Flowcode and click on the Linker tab. Add the following section to the end of the linker parameters text field.
-swcs 6 2
The WLAN component also produces an warning during compilation saying that the delay is used in the main and in the interrupt. This is not the case as the delay in the interrupt code is never called so this warning can be safely ignored.
There are two variations of WLAN E-blocks at the moment. One with v1.1.29 firmware and one with v1.2.3 firmware which should be marked by a sticker on the underside of the module. The v5.2 component C file has been tested with both firmware revisions but the 1.2.3 firmware performs better. You can update the firmware on the earlier models by using a laptop or smart phone to connect to the module and visiting the WLAN setup wizard. The firmware can downloaded from the WIZ610wi downloads page on the Wiznet website.
v1.2.3 FW takes approx 30 seconds to initialise from cold start
v1.1.29 FW takes approx 60-90 seconds to initialise from cold start
If all else fails then you can attempt a factory reset of the WLAN settings using the code customisation feature in Flowcode and un-commenting the delay in the init function code. This can be useful if you want to be able to login to modify the loaded firmware version. With the v1.1.29 firmware I found that you may have to up the delay from 4 seconds to 30 seconds to ensure the factory reset is performed.
Attached is the test program we use for testing the WLAN board and module.
It involves a EB006 with 16F877A and 19.6608MHz Crystal, EB005 in PortB and EB069 in PortC with jumper setting B. The URL to visit once you have joined the unsecured "Flowcode" network using your laptop or smart phone is "192.168.1.1:5000". The ":5000" portion is important or you will end up at the WLAN wizard page rather then the page served out by the PIC. To check you have joined the network correctly have a look at the IP address you have been assigned. This should be between 192.168.1.10 and 192.168.1.100.
The Hex file can be loaded directly into the PIC using PPP and used to double check if the problem is with the code Flowcode is producing or the E-block hardware itself.
When everything is working correctly the LCD should print Start and then shortly after it should print OK.
Once this has happened the LCD displays the URL to visit i.e. "192.168.1.1:5000".
Once the URL has been loaded you should get "Hello World" printed in the web browser and the LCD should reflect the number of page requests that have been received and processed.
To anyone having problems with the WLAN board.
Basically the WLAN board features a WIZ610wi module that the microcontroller communicates with. The problem with the modules seems to be in getting them to reply to commands being sent by the microcontroller. A reason for this is that the module uses the UART pins for commands and wireless data and the module seems to sometimes get stuck in data mode. Once the module has replied to incoming commands then the two devices run hand in hand using the component code.
Another issue is that the board requires two wired connections from the programmer. +V and VPWR. You must ensure both these connections are wired into the module the correct way around before powering up the board. Be very careful with the VPWR cable as if this shorts against anything on the E-blocks then it could potentially cause all kinds of problems such as killing your WLAN module.
The first step to take when troubleshooting the board is to update to the latest version of Flowcode. Flowcode PIC v5.2 will be available shortly and this includes the latest recommended fix for the WLAN component C code.
The WLAN component uses a few levels of the stack so you may need to enable the software call stack to fully support this device on a 8-bit PIC, AVR's ARM's and dsPIC's need not do this. To do this select the Chip -> Compiler options menu in Flowcode and click on the Linker tab. Add the following section to the end of the linker parameters text field.
-swcs 6 2
The WLAN component also produces an warning during compilation saying that the delay is used in the main and in the interrupt. This is not the case as the delay in the interrupt code is never called so this warning can be safely ignored.
There are two variations of WLAN E-blocks at the moment. One with v1.1.29 firmware and one with v1.2.3 firmware which should be marked by a sticker on the underside of the module. The v5.2 component C file has been tested with both firmware revisions but the 1.2.3 firmware performs better. You can update the firmware on the earlier models by using a laptop or smart phone to connect to the module and visiting the WLAN setup wizard. The firmware can downloaded from the WIZ610wi downloads page on the Wiznet website.
v1.2.3 FW takes approx 30 seconds to initialise from cold start
v1.1.29 FW takes approx 60-90 seconds to initialise from cold start
If all else fails then you can attempt a factory reset of the WLAN settings using the code customisation feature in Flowcode and un-commenting the delay in the init function code. This can be useful if you want to be able to login to modify the loaded firmware version. With the v1.1.29 firmware I found that you may have to up the delay from 4 seconds to 30 seconds to ensure the factory reset is performed.
Attached is the test program we use for testing the WLAN board and module.
It involves a EB006 with 16F877A and 19.6608MHz Crystal, EB005 in PortB and EB069 in PortC with jumper setting B. The URL to visit once you have joined the unsecured "Flowcode" network using your laptop or smart phone is "192.168.1.1:5000". The ":5000" portion is important or you will end up at the WLAN wizard page rather then the page served out by the PIC. To check you have joined the network correctly have a look at the IP address you have been assigned. This should be between 192.168.1.10 and 192.168.1.100.
The Hex file can be loaded directly into the PIC using PPP and used to double check if the problem is with the code Flowcode is producing or the E-block hardware itself.
When everything is working correctly the LCD should print Start and then shortly after it should print OK.
Once this has happened the LCD displays the URL to visit i.e. "192.168.1.1:5000".
Once the URL has been loaded you should get "Hello World" printed in the web browser and the LCD should reflect the number of page requests that have been received and processed.