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)

2 comments:

  1. hi there, i am using this board too, but i stuck somewhere when i try to send/receive the message.
    Actually, what i want to do is when i press switch 1, it will send a string "hello" tru the wifi but i do not know how to do it. Can u help me? -nissa_student@yahoo.com

    ReplyDelete
  2. hi, just use the rsi_send_data function. :)

    -7string

    ReplyDelete