TCP/IP Products

smxWiFi™
smxWiFi is a robust 802.11 Media Access Control (MAC) stack specifically designed and developed for embedded systems. It is written in C, and can run on any hardware platform. While optimized for SMX®, smxWiFi can be ported to another RTOS or to another hardware platform to support a different WiFi chipset.
An 802.11 network is a wireless local area network (WLAN) that conforms to the 802.11 standards. smxWiFi provides the necessary software to add wireless connectivity to an embedded system.
Layers
- Network Interface Layer Provides the interface to a TCP/IP stack.
- Application Interface Layer Provides the interface to the application to manage the networking connection, retrieve the signal and link quality information, and do a site survey.
- MLME Layer Provides services for the MAC Layer Management Entity, such as scan, authentication,
association, and synchronization.
- Chipset Driver Layer Provides a unique interface for different WiFi MAC and RF chipsets such as the Ralink RT2870.
- Porting Layer Provides service functions related to the hardware, OS, and compiler.
Due to the complexities of the 802.11 protocol, smxWiFi requires a multitasking RTOS environment. It is integrated with SMX® RTOS. A TCP/IP stack is also required, and smxWiFi has been integrated with smxNS.
Types of Security
There are two parameters for security. One is the Authentication Type and the other is the Encryption Algorithm/Protocol.
Authentication Types include:
Open System: There is no special authentication. Any WiFi stations can connect to each other, without any password or key.
Shared Key: An old Authentication type, only used with WEP.
WPA: WiFi Protected Access. This is a working standard put together by the WiFi Alliance. It is based on 802.11i draft version.
WPA-PSK: WPA Personal. Based on 802.11i pre-shared key authentication.
WPA-EAP: WPA Enterprise. Uses the authenticated key mode that derives keys from 802.1X.
WPA2: WPA version 2. It is the same as 802.11i.
WPA2-PSK: Same as WPA-PSK but for WPA version 2 (802.11i)
WPA2-EAP: Same as WPA-EAP but for WPA version 2 (802.11i)
Encryption Protocols include:
WEP: Wired Equivalent Privacy. This is the first WiFi encryption algorithm, based on RC4. There are two key lengths, 64-bit and 128-bit
TKIP: Temporal Key Integrity Protocol. This encryption protocol is still based on RC4 but some improvements were made, such as adding message integrity check (MIC).
AES: Advanced Encryption Standard, also called Counter Mode with CBC-MAC Protocol (CCMP).
So when discussing WiFi security, we combine these two components together. For example:
WEP64 means we use shared key authentication and WEP 64-bit encryption.
WEP128 means we use shared key authentication and WEP 128-bit encryption.
WPA-PSK/AES means we use WPA-PSK authentication and AES encryption protocol.
Code Size
Component |
ARM IAR (KB) |
CF CW (KB) |
Core (Network, Application, MLME |
38 |
41 |
Security (WEP) |
2 |
2 |
Security (WPA-PSK) |
10 |
12 |
Security (TKIP, needs WEP) |
1 |
2 |
Security (AES) |
9 |
11 |
Ralink RT2573 Driver |
22 |
27 |
Ralink RT2860 Driver |
40 |
40 |
Ralink RT2870 Driver |
40 |
40 |
Ralink RT3070 Driver |
40 |
40 |
Data Size
| Component |
Size (KB) |
| Core (Network, Application, and MLME layers) |
15 |
| Security |
5 |
| Ralink RT2573 Driver |
6 |
| Ralink RT2860 Driver |
20 |
| Ralink RT2870 Driver |
8 |
| Ralink RT3070 Driver |
8 |
Performance
For performance testing, TCP packets are sent and received simultaneously.
Both sides are using WiFi Dongle to transfer data through one Access Point.
The following is a table of performance of the RT2573 dongle for reading/writing
512-byte network socket packets, without security
| USB Host Controller |
Reading |
Writing |
| X86/ISP1761 |
120 KB/s |
120 KB/s |
| MCF5329 |
98 KB/s |
98 KB/s |
| AT91SAM9260 |
67 KB/s |
67 KB/s |
The following is a table of performance of the RT2573 dongle for reading/writing
1024-byte network socket packets, without security
USB Host Controller |
Reading |
Writing |
| X86/ISP1761 |
205 KB/s |
205 KB/s |
| MCF5329 |
155 KB/s |
155 KB/s |
| AT91SAM9260 |
90 KB/s |
90 KB/s |
The following is a table of performance of the RT2870 dongle for reading/writing
512-byte network socket packets, without security.
The performance on X86/EHCI is almost the same as RT2870 Linux driver.
USB Host Controller |
Reading |
Writing |
| X86/ISP1761 |
130 KB/s |
130 KB/s |
| MCF5329 |
90 KB/s |
90 KB/s |
| AT91SAM9260 |
75 KB/s |
75 KB/s |
The following is a table of performance of the RT2870 dongle for reading/writing
1024-bytes network socket packets, without security
USB Host Controller |
Reading |
Writing |
| X86/ISP1761 |
300 KB/s |
300 KB/s |
| MCF5329 |
140 KB/s |
140 KB/s |
| AT91SAM9260 |
110 KB/s |
110 KB/s |
The following is a table of performance of the RT2860 PCI card for reading/writing
1400-bytes network socket packets, without security
Processor |
Reading |
Writing |
| X86 |
350 KB/s |
350 KB/s |
Adding security causes a decrease in performance of less than 5%.
See the smxWiFi User’s Guide for additional performance test results.
smxWiFi API
swf_iInit();
swf_Open();
swf_Close();
swf_Release();
swf_RegisterNotify();
swf_GetNodeID();
swf_SendPacket();
swf_GetLinkStatus();
swf_Connect();
swf_Disconnect();
swf_IsConnected();
swf_IsInserted();
swf_IsOpen();
swf_ScanBss();
swf_GetBssNum();
swf_GetBssInfo();
swf_SetBssType();
swf_SetAuthMode();
swf_SetWepDefaultKeyID();
swf_SetWepSharedKey();
swf_GenerateWPAKey();
swf_SetWPAKey();
Porting
The porting layer is contained in wfport.h and wfport.c. These files have definitions,
macros, and functions to port smxWiFi to a particular target, such as another compiler and RTOS.
In addition, if the WiFi chipset is not already supported, a new driver will need to be written.
smxWiFi was developed for use with SMX® and smxNS, but it can be ported to another RTOS and TCP/IP stack.
Tested Devices
WiFi Dongles/Card
- AmbiCom M600N-USB (RT2870)
- AmbiCom WL150N-nUSB (RT3070)
- AmbiCom WL150N-USBx (RT3070)
- Belkin F5D7050 v3002 (RT2573)
- Buffalo WLI-UC-G300N (RT2870)
- D-Link DWA-140 (RT2870)
- D-Link EWUGRL2700 (RT2573)
- Linksys WUSB54GC (RT2573)
- Ralink 2070 (RT2573)
- Ralink 3070 WS-WNU682N (RT3070)
- W483 802.11n PCI Card (RT2860)
Access Points
- D-Link DIR-625 RangeBooster N Router
- Linksys WRT54G Wireless Router
- Linksys WRT400N Dual-Band Wireless-N Router
- NETGEAR WGR614 v6 Wireless Router
- TP-Link TL-WR841ND Wireless N Router
- TRENDnet TEW-432BRP 11g Wireless Router
For more information
|