Go Down

Topic: LinkSprite Diamondback / BlackWidow: Wifi Shield-Arduino Combo How To (Read 4585 times) previous topic - next topic


I'm setting up a system using the new DiamondBack Wifi Shield-Aruduino combo card. I wasn't able to find a simple how-to, so I'm writing this one. If you folks have any corrections, or additions, by all means pile on!

First, the Diamondback is apparently identical to the older AsyncLabs BlackWidow. It certainly uses the same software. The Diamondback is made by LinkSprite, and their updated software is available from GitHub:

The older AsyncLabs libraries and examples are here:

AsyncLabs also has a very informative wiki:

I don't know what the changes in the software are. The AsyncLabs BlackWidow stuff seems to compile and run fine on the current Diamondback.

To try any of the examples, you have to modify the main sketch file:

unsigned char local_ip[] = {192,168,1,2};   // IP address of WiShield
unsigned char gateway_ip[] = {192,168,1,1};   // router or gateway IP address
unsigned char subnet_mask[] = {255,255,255,0};   // subnet mask for the local network
const prog_char ssid[] PROGMEM = {"ASYNCLABS"};      // max 32 bytes

unsigned char security_type = 0;   // 0 - open; 1 - WEP; 2 - WPA; 3 - WPA2

// WPA/WPA2 passphrase
const prog_char security_passphrase[] PROGMEM = {"12345678"};   // max 64 characters

// WEP 128-bit keys
// sample HEX keys
prog_uchar wep_keys[] PROGMEM = {   0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d,   // Key 0

Note that to compile the different examples, you need to modify one of the library header files. In particular, you have to change the commenting out of these lines in apps-conf.h:

//Here we include the header file for the application(s) we use in our project.
//#define APP_UDPAPP
//#define APP_WISERVER

By default, WebServer is enabled. Here, I've enabled the SockApp example.

If you're connecting to your existing WiFi Access Point, you'll probably want to disable encryption initially. Also make sure (doh!) that it's not setup to be "G-Only". The Diamondback is 802.11b, and the AP needs to be in "B-only" or "Mixed" mode.

When that works, and you want to enable encryption (well, at least for 10-digit, 64bit WEP), you have to modify another file, g2100.c:

   cmd->keyLen = 5;   // Key length: 5 bytes (64-bit WEP); 13 bytes (128-bit WEP)

As I recall, those are the only difficulties that I encountered, and having these instructions would have saved me a coupla hours.

Good Luck!
Thumbs Up!
Gene Knight

Go Up