Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.

tranceash

Member Since 01 Jun 2011
Offline Last Active May 03 2012 09:13 AM
-----

Posts I've Made

In Topic: RN-XV WiFly Module driver

14 April 2012 - 06:21 AM

That's strange, could you please upload (a part of) your project so I can see what's going on?


using System;
using System.Threading;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using SecretLabs.NETMF.Hardware;
using SecretLabs.NETMF.Hardware.Netduino;
using Toolbox.NETMF;
using Toolbox.NETMF.NET;
using Toolbox.NETMF.Hardware;


namespace NetduinoApplication1
{
    public class wifi
    {

        
        public static void Main()
        {

            // write your code here
            Debug.Print("Starting wifi config...");
 
            WiFlyGSX WifiModule = new WiFlyGSX();
            Debug.Print("Instace created...");
            WifiModule.EnableDHCP();
            WifiModule.JoinNetwork("TEHS_4B6B22", 0 , WiFlyGSX.AuthMode.MixedWPA1_WPA2, "12121212121");

            //// Showing some interesting output
            Debug.Print("Local IP: " + WifiModule.LocalIP);
            Debug.Print("MAC address: " + WifiModule.MacAddress);
            Debug.Print("Dns Lookup google.com.au: " + WifiModule.DnsLookup("google.com.au"));

            // Creates a socket
            SimpleSocket Socket = new WiFlySocket("google.com.au", 80, WifiModule);

            // Connects to the socket
            Socket.Connect();

            // Does a plain HTTP request
            Socket.Send("GET / HTTP/1.1\r\n");
            Socket.Send("Host: " + Socket.Hostname + "\r\n");
            Socket.Send("Connection: Close\r\n");
            Socket.Send("\r\n");

            // Prints all received data to the debug window, until the connection is terminated and there's no data left anymore
            while (Socket.IsConnected || Socket.BytesAvailable > 0)
            {
                string Text = Socket.Receive();
                if (Text != "")
                    Debug.Print(Text);
            }

            // Closes down the socket
            Socket.Close();


    

        }


        




    }
}

One thing is funny if I disconnect and reconnect the output works. The second time i run the code it errors out when it tries to create the socket

In Topic: RN-XV WiFly Module driver

12 April 2012 - 10:59 AM

Hi trencaesh,

It can happen that it takes too much time to get a good signal, I'm not sure. if you enable debugging, you'll see a lot more.


Stephan this is the debug output

Starting wifi config...
Instace created...
Local IP: 192.168.0.200
MAC address: 00:06:66:71:e1:de
Dns Lookup google.com.au: 74.125.237.119
#### Exception System.ApplicationException - 0x00000000 (1) ####
#### Message: Can't connect:<2.31> ERR:Connected!
Disconn from TEHS_4B6B22,1:0

#### Toolbox.NETMF.Hardware.WiFlyGSX::OpenSocket [IP: 0084] ####
#### Toolbox.NETMF.NET.WiFlySocket::Connect [IP: 001c] ####
#### NetduinoApplication1.wifi::Main [IP: 006d] ####
A first chance exception of type 'System.ApplicationException' occurred in Toolbox.NETMF.Hardware.WiFlyGSX.dll
An unhandled exception of type 'System.ApplicationException' occurred in Toolbox.NETMF.Hardware.WiFlyGSX.dll

Additional information: Can't connect:<2.31> ERR:Connected!
Disconn from TEHS_4B6B22,1:0

In Topic: RN-XV WiFly Module driver

11 April 2012 - 02:20 PM

Good to read that!!


Could you make a seperate thread about it on the forums? I would love to look into it, but it's not really related to the RN-XV module anymore :)



Stephan sometimes I get an IP sometimes I dont is there a way to see why I am not receiving an IP. Alos as soon as I get an Ip and try opening a socket to a webpage it cant connect ? Is there a problem with the netduino and wifly module ?

In Topic: RN-XV WiFly Module driver

10 April 2012 - 12:36 PM

You could do the same for the PIR sensor, also with jumper wires :)



Hi Stefan

I have connected RN-XV WiFly module to the netduino using breadboard and it works great.


thanks

In Topic: RN-XV WiFly Module driver

10 April 2012 - 12:14 PM

Hello Stefan,

i figured out that on the shield there has been soldered a diode between Tx of netduino and Pin3 of the RN-XV module.
I bridged it and all trouble has gone. I will also attach a photo
Thank you for your help.


Can you attach the photo of what you did to get the RN-XV module working on the xbee shield

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.