SUMMARY:
We have some snip ,test codes in SDK release, this blog is showing how to use snip.dct_read_write, snip.apsta, snip.GPIO to finish one application. And the function is to join different AP by pressing user button. It will help you to understand how to join AP , how to read/write DCT area, be familiar with rule of GPIO operation. Test is based on Wiced 6.2.1.2 release on CYW954907AEVAL1F EVB.
MAIN WORK:
you can type <status> to check the interface like below:
3. If you want to use command console ,really need big memory (2MB and above), and you need to enable it in makefile:
GLOBAL_DEFINES += INCLUDE_COMMAND_CONSOLE
If you want to use the DCT mac address, you need to enable it in makefile:
GLOBAL_DEFINES +=MAC_ADDRESS_SET_BY_HOST
Some other useful commands are showed here.
4. ADD user_1, user_2 GPIO test code into APSTA.
to find platform_gpio_buttons define in platform.c and platform.h
Below are some structure relationships in the code.
You will see real user_1, user_2 connections in the pdf circuit.
About user_1 and user_2 button initialization, these two pins are already set to INPUT_PULL_UP by default in the boot stage of the board,so you don’t need to initialize them again as a GPIO.
5. Add DCT read code into APSTA.
Below is the wifi config section printed:
6. Adding code to switch AP
And it is better to add some wwd_wlan_status judge before jumping into calling.
7. add all functions into apsta code:
The steps are:
Reference:
Snip.apsta
Snip.GPIO
Snip.dct_read_write
WICED Device Configuration Table (DCT) Users Guide
cyw954907aeval1f.pdf
Hey zhez:
Thanks for the great post - lot of good information here! I wanted to ask you about the speed of the change on devices like the 43907 and 54907 (without 802.11r). I took what was here and did some timing and I got that the average time to switch to a new AP (including network down, rewriting dct, then bringing the network interface back up) was about 20 seconds all told on average. Would you have any ideas on what the bottlenecks are in this situation? The one major one I can think of is DHCP so maybe using a static IP would be best but are there any ways you think time could be shaved off those 20 seconds?
I appreciate the consideration of the question, and thanks again for the blog post.
Hello:
thanks, I think we can have a time print to figure out which is the max time consuming part . Just as you said DHCP will save a lot of time, and we can do more diggings on network_up period.