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.

pseabury's Content

There have been 3 items by pseabury (Search limited from 08-March 20)


By content type

See this member's

Sort by                Order  

#58829 Netduino2 & Wifly - Getting Started

Posted by pseabury on 21 June 2014 - 06:22 PM in Netduino 2 (and Netduino 1)

I've used the excellent work by Quiche31 & jdsmith to try and setup a VERY basic netduino2 + wifly shield.  I have the netduino2 & wifly powering up properly, and the wifly shows the expected activity on LEDs P104, P105, P106.

 

The wifly shield is directly connected via headers to the netduino2.  The netduino2 is powered with the external power source.  The netuino2 software configuration is as follows:

Assemblies:
    mscorlib,4.3.1.0
    Microsoft.SPOT.Native,4.3.1.0
    Microsoft.SPOT.Hardware,4.3.1.0
    Microsoft.SPOT.Net,4.3.1.0
    System,4.3.1.0
    Microsoft.SPOT.Hardware.SerialPort,4.3.1.0
    Microsoft.SPOT.IO,4.3.1.0
    System.IO,4.3.1.0
    Microsoft.SPOT.Hardware.PWM,4.3.1.0
    Microsoft.SPOT.Hardware.Usb,4.3.1.0
    SecretLabs.NETMF.Diagnostics,4.3.1.0
    SecretLabs.NETMF.Hardware.Netduino,4.3.1.0
    SecretLabs.NETMF.IO,4.3.1.0
    Microsoft.SPOT.Hardware.OneWire,4.3.1.0
    Microsoft.SPOT.Time,4.3.1.0
    NetduinoPostApp,1.0.0.0
    HttpLibrary,1.0.0.0
    SecretLabs.NETMF.Hardware,4.3.1.0
 

I see P105 flashing when I'm using the astra.http.HttpWiflyImpl to send commands over to the wifly.  I don't, however, ever get any data back from the wifly in response to any commands.  

 

By supplying my SSID & pass, the wifly should associate with my access point, but I can verify via the AP admin page that it is not associated.  

 

I know I have the 14MHz crystal and have the library set accordingly.  Where can I start to debug this?  My guess is that even though I'm asking the wifly to go into command mode, it probably actually isn't.  

 

Also of note is that I can see the wifly with my iPhone as "roving1" and associate to it if I want, which makes me think the wifly may be in an incorrect mode.

 

Here's how I'm trying to use the previously posted code to get some data from the wifly to no avail.  All return null.

wifly = new HttpWiflyImpl(processRequest, 80, HttpWiflyImpl.DeviceType.crystal_14_MHz, SPI.SPI_module.SPI1, SecretLabs.NETMF.Hardware.Netduino.Pins.GPIO_PIN_D10);
            wifly.WIFI_SSID = "SSID";
            wifly.WIFI_Pass = "pass";
                        
            wifly.Connect();
            //wifly.Update();

            //var rst = wifly.factoryRESET();
            var evy = wifly.getEverything();
            var mac = wifly.getMAC();
            var scan = wifly.scan();
            var ip = wifly.getIP();

As an example, getEverything() looks like this:

public String getEverything()
        {
            leaveCommandMode();
            enterCommandMode();
            String result = SendCommand("get everything");
            if (result != null && result.Length > 0)
                return result;
            else
                return null;
        }

And leaveCommandMode(), enterCommandMode(), and SendCommand() are the same from the previous postings.

 

Much thanks,

 

Paul

 

 




#58650 Noob InterruptPort Question

Posted by pseabury on 09 June 2014 - 03:35 PM in Netduino 2 (and Netduino 1)

#1 did the trick, thanks Chris.  Looking forward to doing some cool stuff here!




#58619 Noob InterruptPort Question

Posted by pseabury on 07 June 2014 - 03:40 PM in Netduino 2 (and Netduino 1)

private static InterruptPort button = new InterruptPort(Pins.ONBOARD_SW1, true, Port.ResistorMode.Disabled, Port.InterruptMode.InterruptEdgeLevelHigh);

private static void Main(){        
   // Attach button listener 
   button.OnInterrupt +=new NativeEventHandler((uint port,uint state, DateTime time) =>{ Debug.Print("Hola")});
}
Simply subscribing to the event throws an ArgumentException:
StackTrace "Microsoft.SPOT.Hardware.InterruptPort::EnableInterrupt\r\nMicrosoft.SPOT.Hardware.NativeEventDispatcher::add_OnInterrupt\r\nNetduinoApplication1.Program::Main\r\n" string
 
I started my netduino on 4.2.2 but I just upgraded to 4.3.1 with the same results.  Any ideas?
 
Paul

 





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.