Hello, I am trying to get the RN-131C WiFly module working and I can't seem to get the driver instantiated using the Toolbox.NETMF.Hardware.WiFlyGSX driver.
I debugged into the driver and the serial port isn't returning any data. The wifly module is getting power and I am using an external power supply ([font="arial, sans-serif;font-size:13px;"]9V DC 650mA Wall Adapter Power Supply[/font]).
While debugging, I noticed it just stays in the _CommandMode_Start() mehtod on:
// Wait until we actually enterred the command mode while (this._Mode != Modes.CommandMode) Thread.Sleep(1);
this._Mode is always 0
Following the datasheet, I made sure I have power by measuring 3.3v on pin 20 and 21 on the wifly using 3V3 pin on the netduino. Ground on pin 18 on the wifly using GRN on the netduino.
I am using pin 12 and 13 for UART RX/TX on the wifly and Digital I/0 pins 0 and 1 on the netduino..
Here is the code for the app placed in a method being called after I press the ONBOARD.SW1 button on the netduino.
// Declares the WiFly module, configures the IP address and joins a wireless network WiFlyGSX WifiModule = new WiFlyGSX("COM1", 9600, "$", true); WifiModule.EnableDHCP(); WifiModule.JoinNetwork("Router", 7, WiFlyGSX.AuthMode.WPA2_PSK, "WirelessKey", 1); // Showing some interesting output Debug.Print("Local IP: " + WifiModule.LocalIP); Debug.Print("MAC address: " + WifiModule.MacAddress); // Creates a socket SimpleSocket Socket = new WiFlySocket("www.netmftoolbox.com", 80, WifiModule); // Connects to the socket Socket.Connect(); // Does a plain HTTP request Socket.Send("GET /helloworld/ HTTP/1.1rn"); Socket.Send("Host: " + Socket.Hostname + "rn"); Socket.Send("Connection: Closern"); Socket.Send("rn"); while (Socket.IsConnected || Socket.BytesAvailable > 0) { string Text = Socket.Receive(); if (Text != "") Debug.Print(Text); } // Closes down the socket Socket.Close();
Here are the contents of my debugger output:
O: exitrO: closerO: exitrO: $$$
Attached are pictures of the WiFly module and the Netduino.
Thanks in advanced!