Organize and Share your Electronics the way you want. Sign-Up for a free account now. It takes only 30 seconds!

Uncomplicated Wireless Networking

Uncomplicated Wireless Networking

Wireless networking is easy, as long as you have the right tools for the job. Here is how to “get on the air” with Z-World Wi-Fi application kit, which includes a Linksys Wi-Fi card and RCM3100 module. Go wireless in no time.
WIRELESS API

The seemingly automatic operation of the wireless CompactFlash card was actually pulled off by the default settings inside the Dynamic C wireless packet driver and TCP/IP functions. You can override the defaults in your code using the Dynamic C wireless API. The structure of the Dynamic C wireless API is as follows:

pd_ioctl(int nic, int cmd, char

*data, int len);

where nic is always zero, and cmd is the Dynamic C Wi-Fi command. *data is the string, character array, or pointer to a structure. len is the size of the data field.

To command the Linksys wireless CompactFlash card to perform a scan, you must issue the API call in the following way:

pd_ioctl(0,WIFI_SCANREQ,(char

*)0,0);

To inspect the results of the scan, all you have to do is define a buffer (unsigned scanbuf[1000];) and call the wireless API:

pd_ioctl(0,WIFI_SCANRES,(char

*)scanbuf,sizeof(scanbuf));

The wireless scan process requires the wireless CompactFlash card’s Roam mode be set to manual. You also might want to force the wireless CompactFlash card into Infrastructure mode. Because you’re actively scanning, the SSID should be set to “any” (any is defined as “ ”). These tasks are easily performed by filling in the API blanks in the WIFI_INIT macro (see Listing 3).

As you can see in Listing 3, there are a number of API commands that can be issued in your wireless code. To set up the Wi-Fi application kit for IBSS mode, the Dynamic C documentation says to code IBBS in the parameter field of the WIFI_MODE command. This is a typo and the example programs will compile but they won’t run. I checked the API source code and the API is expecting to see IBSS in the WIFI_MODE parameter field.

The WIFI_OWNCHAN and WIFI_OWNSSID API commands are also used in Ad Hoc mode to define the channel and SSID of the independent station. I installed a second AP called CircuitCellar in a remote part of the Florida room and forced the Linksys wireless CompactFlash card to associate with it by coding CircuitCellar in the parameter field of the WIFI_SSID command.

WEP is enabled by coding:

pd_ioctl(0,WIFI_WEP_FLAG,”1”,0);.

Four sets of 13 bytes form the WEP keys. The transmit key is selected using the WIFI_WEP_USEKEY command. Private authentication is activated with the WIFI_WEP_AUTH command and a 1 in the parameter field.

There’s one more API command that allows the wireless programmer to start and stop the MAC. pd_ioctl (0,WIFI_MAC,”off”,0); disables the wireless CompactFlash card’s MAC engine and pd_ioctl(0,WIFI_MAC, ”on”,0); enables the MAC. This command is useful when you want to programmatically change the wireless CompactFlash card’s configuration. Stop the MAC to make your changes.

Visit Here for more.







 

More Articles to Read

DECA MAX®10 FPGA Evaluation Kit
DECA MAX®10 FPGA Evaluation Kit
An Arduino laser pinball machine
An Arduino laser pinball machine
CTCSS fingerprinting: A method for transmitter identification
CTCSS fingerprinting: A method for transmitter identification
TI DLP® Pico™ Technology for Aftermarket Head-up Displays
TI DLP® Pico™ Technology for Aftermarket Head-up Displays
Brute force computation for cheap log digital potentiometer
Brute force computation for cheap log digital potentiometer
Smart "Homer"
Smart "Homer"
A DIY Segway-style vehicle
A DIY Segway-style vehicle
Superbeta transistors inside: Die photos and analysis of the LM108 op amp
Superbeta transistors inside: Die photos and analysis of the LM108 op amp
Peeqo is a desktop bot that communicates through GIFs
Peeqo is a desktop bot that communicates through GIFs
Using a Programmable Input Multiplier to Minimize Integer Boundary Spurs
Using a Programmable Input Multiplier to Minimize Integer Boundary Spurs

Top


Shares