
Dear Larry,
I am working with the RCM4400W Wi-Fi core module, and I wanted to know if it’s possible to use Wi-Fi protected access, and what would be the best way to implement it?
Chad M.
Chad, that’s a great question. With the release of Dynamic C® 10.21 you are now able to use Rabbit Wi-Fi® devices in networks that offer WPA (Wi-Fi Protected Access) encryption. WPA is a class of systems to secure wireless (WiFi) computer networks and is much more secure than the previous WEP (Wired Equivalent Privacy).
In the initial testing of your device it is always best to start simply, using no encryption. This is to make sure that your connection is working. Try some of the easier sample programs such as the PINGME.C program in the C:\DCRABBIT_X.XX\Samples\TCPIP\ICMP directory. If you successfully ping your device, try the ECHO.C program in the C:\DCRABBIT_X.XX\Samples\TCPIP directory next.
Once you have successfully established a connection it is time to move on to securing your network.
To use WPA with Rabbit Wi-Fi devices in your network see the comments at the top of the lib\rcm4000\tcpip\tcp_config.lib file. You can modify this file or create your own custom_config.lib file. You can also put statements in the DEFINES window of Project Options or even define the statements in your own programs.
Here is an outline of what needs to be changed:
First, change these basic settings to accommodate your network and router:
#define _PRIMARY_STATIC_IP "10.10.6.100"
#define _PRIMARY_NETMASK "255.255.255.0"
#define MY_GATEWAY "10.10.6.1"
#define MY_NAMESERVER "10.10.6.1"
Then set up your wi-fi settings for your network and router:
#define _WIFI_SSID "rabbitTest" (line 624 in tcp_config.lib)
#define _WIFI_WEP_FLAG WIFICONF_WEP_TKIP (line 676 in tcp_config.lib)
#define WIFI_USE_WPA (line 686 in tcp_config.lib)
#define RAND_USE_MD5 (line 687 in tcp_config.lib)
#define _WIFI_PSK_PASSPHRASE "now is the time" (line 708 in tcp_config.lib)
(This last #define needs to be something that you come up with (1 to 63 characters) then
put the passphrase in your Wi-Fi security settings on your router and in the quotes above.)
You have the option to use the actual key instead of the passphrase. This will cut down on the time your program takes to convert passphrases to hex keys in order for WPA PSK to work. See details at the top of the tcp_config.lib file and the samples\rcm4400w\tcpip\passphrase.c program. The following is an example of a passphrase converted to the hex key (line 714-715 in tcp_config.lib)
#define _WIFI_PSK_HEX \
"75BA7FD02288E764DCE26382768F58BE96EBB59B8CB952C871AED8B0356922E8"
I hope this helps with your wireless endeavors.
- Larry C.
Larry Cicchinelli is Rabbit’s Technical Support Manager. He has 30 years of embedded experience, and is considered one of the foremost authorities on Rabbit products. Larry and his staff offer comprehensive technical support to Rabbit customers.
Submit your questions for Larry via email at
AskLarry@rabbit.com
Read more Ask Larry Answers