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.

andybareweb

Member Since 07 Jan 2011
Offline Last Active Nov 27 2012 03:49 PM
-----

Posts I've Made

In Topic: How to check if ethernet is connected?

29 October 2012 - 05:14 PM

Hi,

I know that i'm digging an old thread but I have the similar question and I must manually set the IP address (so no DHCP).

Is there any way to do it ?

Thanks.

Cédric


Hi Cédric:

var interfaces = Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces();
                foreach (var networkInterface in interfaces)
                {
                    Debug.Print(networkInterface.IsDhcpEnabled ? "Dhcp Enabled" : "Static Ip");
                    Debug.Print(networkInterface.IPAddress);
                    if (networkInterface.IsDhcpEnabled)
                    {
                        networkInterface.EnableStaticIP("192.168.0.9", "255.255.255.0", "192.168.0.1");
                    }
                }

This prints out whether you're already Dhcp Enabled or Static, and if Dhcp it sets to static.

You'd probably want to be a little cleverer around releasing leases if you want to be friendly to your dhcp server, but otherwise the above works.

Regards
Andy

In Topic: Netduino Sam-BA connection not found

24 October 2012 - 11:16 AM

Perfect. I also had to install the x64 driver for Windows from the wiki, and I had to erase twice as I started getting an error (attached) from the Amtel tool. Once I'd gone back to a fresh erase (3v3 to pin under 0) the problem went away. As a side note, to document my experience I also found that I was using the wrong MFDeploy (one I downloaded from Microsoft rather than the one C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Tools) and that couldn't see the Netduino to upload the firmware. Once everything was in line, driver, amtel tool, mfdeploy and the netduino bits, the flashing worked first time. Thanks for the support, Andy

In Topic: Netduino Sam-BA connection not found

23 October 2012 - 12:37 PM

Hi!

Just a question, how does Windows call it? If it still sees a "Netduino" in the device manager, it's not yet reset.


Ah-hah! It is Netduino, good intuition.

I must have not hit the erase properly (tentative worried fingers...) I'll retry.

Many thanks
Andy

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.