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.
Photo

New to Netduino, excited about prospects, need help getting started...


  • Please log in to reply
5 replies to this topic

#1 KenTi

KenTi

    Member

  • Members
  • PipPip
  • 11 posts

Posted 09 May 2015 - 03:12 PM

Hi Chris,
I've been a .NET user for a long, long time, but I'm a newbie at Netduino and all that it entails... I'm excited about it's prospects, but having a really difficult time with it at the moment.
  
I'm unable to see any device when running NetduinoUpdate.exe. I have followed the instructions and installed all the pre-requisites. I'm able to compile and run the blinky demo.
 
Here's my setup:
Computer: MSI GT70-0ND
OS: Windows 7 x64
Device manager reports: Universal Serial Bus devices -> STM32 BOOTLOADER
SolutionReleaseInfo.solutionVersion:    4.3.2.0
 
I don't want to clutter this thread with newbie questions, but do you have a pointer to someone just starting with Netduino? I really learn by example, and either I'm searching on Google for the wrong thing, or there just aren't any.
 
I tried to access the Wi-Fi, but failed miserably. It doesn't appear that Netduino 3 specific libraries are available. Even the download page http://www.netduino.com/downloads/doesn't point to 4.3.1 SDK, so how will I know when there's a new release?
 
Finding code samples is a bear... For Wi-Fi, all I see is something like https://msdn.microso...e/gg232761.aspxwhich almost helps, but doesn't actually have info on how to access the device itself (in the code sample, it says "WiFi.Enable...etc..." so I'm assuming WiFi is a reference to the hardware which I can't seem to find in the libraries of the SDK.
 
I even tried writing a simple text file to the SD card, and got the file there, but even doing a .Flush() fails to write the contents... again, I can't find any samples specific to the Netduino 3.
 
Thank you for any help in advance to get me started...



#2 KenTi

KenTi

    Member

  • Members
  • PipPip
  • 11 posts

Posted 09 May 2015 - 03:39 PM

I was able to get the update to work. Seriously, consider changing the name of the STDFU driver from amd64 to x64... I didn't touch it because I'm not using an AMD. ;-)

 

I'm still lost with getting started on the hardware ;-)



#3 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 09 May 2015 - 05:24 PM

Hi KenTi,

I've been a .NET user for a long, long time, but I'm a newbie at Netduino and all that it entails... I'm excited about it's prospects, but having a really difficult time with it at the moment.

No worries. Let's help get you up and running here!

I'm unable to see any device when running NetduinoUpdate.exe. I have followed the instructions and installed all the pre-requisites. I'm able to compile and run the blinky demo.
...
I was able to get the update to work. Seriously, consider changing the name of the STDFU driver from amd64 to x64... I didn't touch it because I'm not using an AMD. ;-)

Okay, well, looks like you're already up and running with NetduinoUpdate. Awesome. Let's deal with the second issue...getting you up and running with Wi-Fi.

I tried to access the Wi-Fi, but failed miserably. It doesn't appear that Netduino 3 specific libraries are available. Even the download page http://www.netduino.com/downloads/doesn't point to 4.3.1 SDK, so how will I know when there's a new release?

Finding code samples is a bear... For Wi-Fi, all I see is something like https://msdn.microso...e/gg232761.aspxwhich almost helps, but doesn't actually have info on how to access the device itself (in the code sample, it says "WiFi.Enable...etc..." so I'm assuming WiFi is a reference to the hardware which I can't seem to find in the libraries of the SDK.

To use Wi-Fi, you'll want to set your network SSID/passphrase in MFDeploy. Then simply write normal .NET code (using Socket, HttpWebRequest, SslStream, etc.) and things should "just work."

On MFDeploy... Run MFDeploy.exe (which comes with the .NET Micro Framework SDK). Then change the transport from SerialPort/COM to USB so that your Netduino is selected. Go to the Target menu > Configuration > Network Configuration. Change the SSID and passphrase. When your Netduino reboots and your app starts running, the ACT LED should change to yellow (searching/connecting) and then green (connected).

Then...just write .NET code to use the network. No special Wi-Fi classes required. :)

Two more pointers:
1. Grab the new Netduino 4.3.2.1 SDK from the downloads page. The 4.3.1 SDK you're using will work fine--but the new SDK includes the new universal Netduino template and GoBus goodies.
2. Netduinos boot faster than Wi-Fi can connect sometimes. Be sure to wait for an IP address before trying to connect to the network (or you'll get a SocketException since you don't have connectivity). Here are two options for that:
while (IPAddress.GetDefaultLocalAddress() == IPAddress.Any) ; // wait for DHCP-allocated IP address
...or if you'd like something event-driven, capture the appropriate event...
Microsoft.SPOT.Net.NetworkInformation.NetworkChange.NetworkAddressChanged += NetworkChange_NetworkAddressChanged;

even tried writing a simple text file to the SD card, and got the file there, but even doing a .Flush() fails to write the contents... again, I can't find any samples specific to the Netduino 3.

Let's handle that separately. First of all: are you using a <=2GB MicroSD card (not SDHC)? The SD driver is part of the NETMF core, so we can do some investigation and then run this up the ladder if there's a bug.

Chris

#4 KenTi

KenTi

    Member

  • Members
  • PipPip
  • 11 posts

Posted 09 May 2015 - 11:07 PM

You Rock!!! Thank you soooo much for your fast reply and on a Saturday as well!!... I love my green light ;-)

 

Was there docs somewhere that I missed on that? What if I wanted to read the SSID from, say, from a config.txt file from the SD card and dynamically configure it.. is that way to in depth at this point in time? When I try to Wireless80211.SaveConfiguration, I get a feature not supported type error...

 

----

CTRL+F5 refresh on the downloads page gave me completely different results, so now I'm able to see the latest and greatest... Thank you again.

 

---

As far as SD card, I purchased the one I think you recommended from Amazon... 2GB Micro SD.

 

I wrote some simple code based on what I found on the net and it basically wrote to \SD\TestFile.txt using File.WriteBytes

 

This came from http://forums.netdui...ile-to-sd-card/which seemed to also have the same issue about it not committing the text to the file.

 

(Code was similar to post #15)

 

Again, thank you so much for a push in the right direction... If I can avoid burning the board up, I'm going to have tons of fun.



#5 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 09 May 2015 - 11:30 PM

Hi KenTi,

You Rock!!! Thank you soooo much for your fast reply and on a Saturday as well!!... I love my green light ;-)

We're not always here on the weekend, but we're here for you :) And actually there's a community of awesome people here supporting each other--so it's really them that deserve all the thanks.

Was there docs somewhere that I missed on that? What if I wanted to read the SSID from, say, from a config.txt file from the SD card and dynamically configure it.. is that way to in depth at this point in time? When I try to Wireless80211.SaveConfiguration, I get a feature not supported type error...

There are some flash wear concerns with changing SSIDs all the time so we haven't enabled dynamic changes to SSIDs...although that's something we could possibly patch into the old SPOT libraries (Wireless80211.SaveConfiguration, etc.) if critical to your application. For now I recommend using MFDeploy... And looking forward to all the new API goodness coming in NETMF 4.4 and beyond.

As far as SD card, I purchased the one I think you recommended from Amazon... 2GB Micro SD.

I wrote some simple code based on what I found on the net and it basically wrote to \SD\TestFile.txt using File.WriteBytes

This came from http://forums.netdui...ile-to-sd-card/which seemed to also have the same issue about it not committing the text to the file.

Ah yes, looks like this might be a bug in the NETMF core. Can you add your experiences to that thread, and I'll ping the team in Redmond to see if this is something that can get fixed in NETMF 4.4? [Also, do any of the workarounds in that thread fix things for you?]

Chris

#6 KenTi

KenTi

    Member

  • Members
  • PipPip
  • 11 posts

Posted 10 May 2015 - 05:18 PM

There are some flash wear concerns with changing SSIDs all the time so we haven't enabled dynamic changes to SSIDs...although that's something we could possibly patch into the old SPOT libraries (Wireless80211.SaveConfiguration, etc.) if critical to your application. For now I recommend using MFDeploy... And looking forward to all the new API goodness coming in NETMF 4.4 and beyond.

I can understand it was constantly written to, but if someone checked the current SSID, and it has not changed, then a write wouldn't be necessary. It's not a critical thing, I was mainly curious about alternative ways of configuring the wireless.

 

 

Ah yes, looks like this might be a bug in the NETMF core. Can you add your experiences to that thread, and I'll ping the team in Redmond to see if this is something that can get fixed in NETMF 4.4? [Also, do any of the workarounds in that thread fix things for you?]

This was my stupidity... I didn't try the last sample in the thread, and that seemed to have fixed the flushing.

 

Thank you again for your awesome help.  :D






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

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.