Sunday, January 16, 2011

RedPine Wifi Card: Going through the Sample Source Code

Here's another part of the Redpine Wifi adventure.

My main aim is to modify the sample firmware source code and create a very simple app on Python on PC (and put it on my Android) and display the text on the LCD of the Renesas Starter kit. Another goal is to create a simple display of text on Hyperterminal from Renesas Starter kit.

Renesas and Wifi card in Receive Mode

I modified the recv_cb0 function on the rsi_spi.c file. Source Code Link

At the rsi_initialize_netwrok_config1 (by the way, the netwrok is not really spelled right on the source code) function on network_config.c file, you will see the networkConfig->stLocalPort = 800;. This is the port number in which the client program (like Hyperterminal, a python program that uses socket, etc.) will connect to. Here is a very short Python script to send a string to the Renesas kit and display the text on the LCD.

Renesas and Wifi card in Transmit Mode

This is easier than the receive mode. On the main function of the RSRX62N2201DEMO.c, I just modified the sending on the while loop to be able to see "Hello" periodically on Hyperterminal. Source code link (I included all the things inside the infinite loop and put my sample code inside the #if 1)

Saturday, January 15, 2011

RedPine Wifi Card: Getting Started



The Java Demo Application of the free RedPine Wifi Card is very easy to use. The demo application - by default - can connect to a router with no security key. I removed the security key on my router and tried the included Java demo app and it worked! :D



When you connect it to a router with security key, you need to modify the network_config.h file as stated on the Quick Start Guide. At minimum, here are the things needed to be changed.

Not stated on the Quick Start Guide is that it only supports WPA2 (AES) mode of security and does not support WEP and WPA (TKIP). I was stucked on the testing of the Wifi Card on my secured router (using WEP) because I quickly jumped on making it work and didn't even managed to read first the documentations on the CD (lesson learned here haha). So I just changed my router's key to a WPA2. And it can be controlled now by the Java demo app.

Next is to create a Python app on my desktop and control the Wifi card. Final project is to control the Renesas using Android.

Just Received my Free Redpine Wifi Card!

Thank you to Redpine for the wonderful free Wifi Card.





This will be a good learning adventure. :)