Hi there,
Santa Claus brought me a brand new Netduino 3 WiFi and I already thought this would be a "happy hacking Christmas". Unfortunately, it was not.
I tried to get the N3 connected to my network but I could not make any progress so far. I have been working with .NET for many years and using a Netduino Plus 2 for quite a while. So I think I have some experience with this.
However, I was not able to connect my N3 to my network. Or maybe I was.... Things are not quite clear.
FYI: I´m running VS 2013 Community Edition on a Windows 10 System, NETMF SDK 4.3, Netduino SDK 4.3.2.1 and Netduino firmware 4.3.2.3.
Here is what did and what happened (or not):
- connected the N3 to my computer for the 1st time, driver was installed correctly
- running MFDeploy to set the WiFi settings
- creating a little .NET program which first blinks the onboard LED, then using the "wait for IP address" code form
the best practice part as posted in this forum, then waiting for an IP address and if it gets one continuously
blinking the LED
- deploying the program the the N3 and running it
- WiFi LED on the board remains yellow for a few seconds, then turned green (should be connected now)
- I have checked my WiFi routers protocol and found the N3 connected, it´s shown in the log with an IP address
- the "wait for IP address" loop in my code never terminates, debugging shows IP address 0.0.0.0
(which is - of course! - different from the one my router shows for the N3)
- to ensure that the connection basically works I have changed the WiFi password to a wrong one for the N3 using MFDeploy, restarted the N3 and checked the WiFi LED: first yellow, the off (not sure) but never green!
- changed back the password to the valid one, restarted the N3: LED first yellow, then green. Should be connected. N3 also visible in the list of connected devices on my router, again with valid IP address
- code on N3 still not able to "see" an IP address
- in VS output window I get this error message, every time the "wait for IP address" loop iterates:
"A first chance exception of type 'Netduino.IP.LinkLayers.CC3100SimpleLinkException' occurred in Netduino.IP.LinkLayers.CC3100"
After playing around with it for several hours trying different WiFi settings (using MFDeploy) and trying several debugging stuff I decided to have a beer instead. I´m somehow pissed now, not from the beer but from the N3. Or - more likely - once again from Microsoft. I don´t know yet
Obviously it is connected (green LED, visible in the router´s list of connected devices) but also not, because I cannot obtain an IP address within my code.
I do not expect this to be a hardware problem of the N3. I´m pretty sure I did something wrong, maybe my code is rubbish. However, is there somebody out there who has similar problems and was able to get them fixed? Or can anybody describe how he/she get´s his/her N3 connected to a WiFi network?
I´m using this to check for WiFi connectivity:
while (IPAddress.GetDefaultLocalAddress() == IPAddress.Any)
And could anybody explain what the error message means:
"A first chance exception of type 'Netduino.IP.LinkLayers.CC3100SimpleLinkException' occurred in Netduino.IP.LinkLayers.CC3100" ?? Google obviously can´t
Any ideas?
Thanks in advance...
Daniel
Netduino 3 WiFi - no WiFi connection, no IP?
#1
Posted 27 December 2015 - 02:18 AM
#2
Posted 27 December 2015 - 02:52 AM
I had some issues getting my ND3 connected to WiFi (light never turned green), but that was due to my connection settings in MFDeploy. Once that got resolved and the status light turned green things were fine.
My code looks something like this:
#3
Posted 27 December 2015 - 01:07 PM
This could be the issue? Here is my code in vb it requires a reference to NetduinoExtentions.dll.
- ab1aw likes this
#4
Posted 27 December 2015 - 07:48 PM
thanks for your replies!
I was able to solve the problem, yet I don´t really understand it
While I was not able to connect my N3 to the network I tried yesterday (although it looked connected from a routers point of view) I could connect to my other home network today. Same settings in MFDeploy (of course other DNS, SSID and password), same code on the N3.
N3 showed up in the "connected devices" list on the other router and I also could obtain an IP address within my code. Looks like it is really connected now. Finally!
So there must be something wrong with the WiFi network I used first. Whatever it was.
However, my Netduino 3 is connected to my network now. It has an IP address, I can ping it. I´m happy.
Big step forward to my wireless online-weather-station. A prototype of it is running on my Netduino Plus 2, but now I do not need the cable any more. Cool! Happy hacking Christmas finally!
@David: if I missed to reference a certain assembly I would expect a compiler error. But there was none. Code just compiled fine.
However, it seems to be a problem of the network I tried to connect to.
#5
Posted 28 December 2015 - 12:18 PM
I am glad you got it working.
I had a hard time getting mine to work also I couldn't remember why its been a few months.
The other issue I had was before I started using the connection I needed about a 3 second delay or I got an error.
#6
Posted 28 December 2015 - 01:49 PM
I was watching the behavior of the WiFi LED on the board. Usually it takes not longer then 3-5 seconds until it goes from yellow (no connection) to green (connection established). So I set an initial delay of 10 seconds at the begin of my program and check the board´s IP address then. Successful, so far. I´ll try to improve my code in the next few days, cause this delay somehow feels not very smart.
However, since the startup time of the program is not critical for my project I could also live with the delay.
Daniel
#7
Posted 29 December 2015 - 05:41 PM
I´m actually falling in love with the 3 WiFi
Pretty cool device and it makes my "sun and moon machine" (still a prototype) independent from a network cable. How cool is that!
Thanks, Secret Labs!
Daniel
#8
Posted 29 December 2015 - 10:53 PM
Nice!
I didn't have to add any delays on mine, it just works using the code I posted earlier. Takes a few seconds but not as long as 10 seconds to get an IP.
#9
Posted 30 December 2015 - 09:03 AM
I´m actually falling in love with the 3 WiFi
It is a neat device isn't it. Glad to see you got your project up and running.
Regards,
Mark
To be or not to be = 0xFF
Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life
Follow @nevynuk on Twitter
#10
Posted 04 January 2016 - 07:41 AM
#11
Posted 29 January 2016 - 04:11 AM
@Daniel
This is what I use for all of my "Networked" application including those for the Netduino Wi-Fi 3
/// <summary> /// This method works for Ethernet connected devices (such as NetDuino Plus 2) as well /// as Wi-Fi connected Devices (such as Netduino 3 Wi-Fi) /// </summary> private static void WaitForNetworkConnectivity() { Debug.Print("Waiting for IP Address..."); while (Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].IPAddress == "0.0.0.0") ; Microsoft.SPOT.Net.NetworkInformation.NetworkInterface networkInterface = Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0]; Debug.Print("IP Address: " + networkInterface.IPAddress); }
There are no assemblies you need to reference other than those included in a blank (ND Wi-Fi 3) project. The ND Wi-Fi projects have a reference to:
Microsoft.SPOT.Wireless.IEEE_802_15_4
In addition to the default. Hope this helps.
By the way, would you mind sharing the code/library required for your LCD display? And the make/model of your display as well please?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users