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.

Chris Walker

Member Since 18 Jul 2010
Offline Last Active Private
****-

#63199 Netduino is running slower in certain classes than others(Video)..Why?

Posted by Chris Walker on 18 June 2015 - 02:46 AM

Hi gismo,

Do you have any "tight loops" or busy code happening on background threads?

My first recommendation is to isolate each section of code, to figure out if something is chewing up a bunch of cycles.

Chris


#63190 MFDepoy Wireless Configuration grayed out

Posted by Chris Walker on 17 June 2015 - 05:47 PM

Hi hypersniper,

Sorry for the troubles; let's get you up and running here.

When you press Ping in MFDeploy, what response do you get?

If you press ctrl+shift+c, what output is displayed in MFDeploy?

Finally...can you post a screenshot of the wireless config screen on top of MFDeploy (with the output from ctrl+shift+c)? That will help us understand what is going on a bit better.

Welcome to the Netduino community,

Chris


#63157 Can the Shield Base be used with Netduino 3 for extra I/O

Posted by Chris Walker on 15 June 2015 - 07:09 PM

Hi stikyy,

Netduino 3 supports all the non-beta modules. It should also support Shield Base in the future, once Shield Base comes out of beta. That's a little way off still though; for GoBus, we're focused on shipping the new STM8S-based modules (serial pack and sensor pack) right now.

There are some I2C and SPI-based GPIO expanders out there, if you need a few more IOs...but those won't be virtualized like Shield Base.

Welcome to the Netduino community,

Chris


#63154 Netduino.IP Technical Preview (Build 5)

Posted by Chris Walker on 15 June 2015 - 05:20 PM

The Netduino.IP Technical Preview is a progressive preview: we will be testing one feature at a time.

To use Netduino.IP, simply write standard code using standard System.Net.Sockets classes.

This build includes the following features:
  • New: DNS support
  • UDP sockets
  • Dynamic IP (DHCP) configuration support
  • Static IP configuration support
  • ICMP (ping) support
  • IPv4 and ARP support
  • Link detection support (and NetworkAvailability event)
  • ENC28J60 network chip driver
  • Retrieval of network configuration from NETMF configuration sector
The following features are not yet supported in the Technical Preview program:
  • TCP support
For this test, please:
  • Run the attached Netduino Update app to reflash your Netduino Plus 2 with Netduino.IP Preview firmware.
  • Deploy and run the attached sample app--or test out your own existing UDP networking code
I have also attached a sample project which retrieves the current time from an Internet time server.

If you run into any troubles, please let me know. Once we know that everything is working well here, we'll move onto Build 6. Builds 6+ will finish up the core protocol stack with TCP support.

Thank you for taking the time to help us test out Netduino.IP!

Chris

P.S. Netduino.IP source code has been checked into the Netduino repository at GitHub.
https://github.com/n...ino/Netduino.IP

Attached Files




#63105 What is the latest firmware version for Netduino 1

Posted by Chris Walker on 11 June 2015 - 03:21 AM

Hi Dr. Who,

The most popular boards from Netduino Gen1 were the Netduino Plus 1 boards. The networking stack in NETMF 4.3+ is too big to fit.

We do have a shiny new networking stack (Netduino.IP) that we could fit on Netduino Plus 1, and bring it up to NETMF 4.3.1. But we don't have a driver for the AT91SAM7X512's on-board networking MAC.

If a few kind folks from the community (or even one awesome community member with free weekends) wants to write a native+managed code LinkLayer (MAC) driver for Netduino Plus 1...we would be more than happy to incorporate that and do the remaining work to upgrade all the gen1 boards up to NETMF 4.3. Netduino is open source, and this is one of those areas where we need resource help (contributions from community members) to be able to make this kind of thing happen.

It would be cool to be able to upgrade 5-year-old Netduinos to the latest firmware, indeed. :)

Chris


#63099 What is the latest firmware version for Netduino 1

Posted by Chris Walker on 10 June 2015 - 05:36 PM

Hi lcacciatore,

The latest firmware for the gen1 hardware (Netduino 1, Netduino Mini, and Netduino Plus 1) is 4.2.

Chris


#63054 Where is PWM class in 4.2.1

Posted by Chris Walker on 05 June 2015 - 04:29 AM

Hi Direstraits,

Because of the new PWM class in NETMF 4.2+, we have removed the legacy PWM class from the main DLLs. But it's still there...you just need to add "SecretLabs.NETMF.Hardware.PWM.dll" as an assembly to your project.

Does that get you up and running?

Welcome to the Netduino community,

Chris


#62934 How to recover non responding Netduino 3

Posted by Chris Walker on 27 May 2015 - 05:22 PM

Hi DevBiker,

One question ... when running the "DFU File Manager", there are some additional inputs. Under "Device", there's "Vendor ID", "Product ID" and "Version". Also, under "Injection" is "Target Id" and "Target Name". Should these be left as they are or do they need to have specific values?

You can leave these blank, although we typically set the device ID values to the ones shown in DfuSe Demonstrator. 
 

OK ... ran through the process with the defaults and ... IT WORKED!!! Yay! Thanks! :D
One strange thing, though ... the Dfu File Manager only seemed to want to save to its installation folder (Program File (x86)), not to the folder that I specified for the files. This baffled me a bit as it reported success but there weren't any actual files until I ran it "As Administrator".

Yeah... We are grateful that ST has tools for manually flashing boards via USB...but...they can be a bit quirky ;)

Chris


#62928 How to recover non responding Netduino 3

Posted by Chris Walker on 27 May 2015 - 07:39 AM

Hi DevBiker,

To manually flash firmware using ST DFUSE tools, grab the latest copy of ST's DFUSE tools from the download link at the bottom of the following page:
http://www.st.com/we...SS1533/PF257916

To erase your board's firmware (do this first):
1. Detach your Netduino
2. Press and hold your Netduino's pushbutton while plugging it in via USB; this will put it in bootloader mode.
3. Erase the firmware on your Netduino using the STDFU Tester application
> a. Select the "Protocol" tab
> b. Press the "Create from Map" button
> c. Select the "Erase" radio button option
> d. Press the "Go" button
> e. Wait for erase process to complete

To create the DFU files which you will program onto your Netduino:
1. Run "DFU File Manager" (from the ST DFU tools)
2. Select "I want to GENERATE a DFU file" and press OK.
3. Click "S19 or HEX..." and then select one of the firmware files in Netduino Update's respective Firmware folder.
4. Click the "generate" button to generate a DFU file which contains the S19 (HEX) file you picked in step 3.
5. Click "delete selected image".
6. Repeat steps 3-5 for the other two firmware files.

Finally, flash each of the .DFU files using the ST DfuSe Demonstrator application (included with STDFU Tester).
1. Run "ST DfuSe Demonstrator"
2. Locate the "Upgrade or Verify Action" pane (bottom-right pane)
3. Press "Choose..." and select one of the generated DFU files
4. Check the "Verify after download" option
5. Press "Upgrade". It will take a few moments to update your Netduino.
6. Repeat steps 3-5 for the other two firmware files.

After you have flashed all the .DFU files, detach and reattach your Netduino (power cycle) or press "Leave DFU mode".

This takes quite a few more steps than Netduino Update, but it should get you back up and running.

Did these instructions enable you to reflash your board?

Chris


#62883 Set Network settings during runtime?

Posted by Chris Walker on 26 May 2015 - 06:14 AM

Would you guys like me to see if we can put together a wrapper class, to change the Wifi SSID/passphrase from code?

Chris


#62670 Netduino 3 Wi-Fi Firmware v4.3.2 (update 2)

Posted by Chris Walker on 14 May 2015 - 08:10 AM

Version: 4.3.2 Update 2 (version 4.3.2.2)

Download link
Download Netduino v4.3.2.2 firmware now

Updates in this release
1. Fix: Pins.ONBOARD_BTN now disables reset feature properly

Additional updates from recent releases
1. MAC Address now automatically repopulated after upgrade (from OTP flash)
2. Added descriptive exceptions to socket classes
3. Added multicast support (experimental)
4. Domain name resolution is now thread safe
5. Streamlined "Netduino Application" universal template now supported

Pre-requisites for this firmware
1. Visual Studio 2012 or Visual Studio 2013. Or Visual Studio 2015 (beta).
2. .NET Micro Framework SDK v4.3 QFE2 or newer
3. NETMF plug-in for Visual Studio 2012, NETMF plug-in for Visual Studio 2013 or NETMF plug-in for Visual Studio 2015 (beta).
4. Netduino SDK v4.3.2.1 or newer

How to flash this firmware
1. Detach your Netduino from your computer to turn it off.
2. Press and hold your Netduino's pushbutton while plugging it in via USB; this will put it in bootloader mode.
3. Run the Netduino Update tool (see link above).
a. If your device does not appear, install the STDFU drivers + tools v3.0.3.
b. If your device appears as "STM Device in DFU Mode", click on "Options", select your board type from the Product selection box and close the Options window.
4. Select the checkbox next to your device and press "Upgrade"
5. Wait while the upgrade operation completes. After flashing, your Netduino will reboot and will be removed from the upgrade list.
6. After flashing, set your network settings using MFDeploy. In MFDeploy, select the Target > Configuration > Networking menu. Re-enter your IP address and Wi-Fi settings.

How to find your current version of Netduino firmware
1. Go to the Start Menu > Programs > Microsoft .NET Micro Framework 4.3
2. Run MFDeploy.
3. Plug your Netduino into your PC using a Micro USB cable.
4. In the Device section at top, select USB instead of Serial. Your Netduino should appear in the drop-down; if not, select it.
5. Select the Target menu > Device Capabilities option.
6. In the output box, find the "SolutionReleaseInfo.solutionVersion" value. This is your firmware version.

Enjoy, and please let us know if you run into any troubles.

Chris

Download link
Download Netduino v4.3.2.2 firmware now


#62646 How to recover non responding Netduino 3

Posted by Chris Walker on 13 May 2015 - 06:05 PM

Hi Beastyboy,

Can you try something for me really quickly?
1. Unplug your Netduino 3 from your computer. Remove all shields/components from the board.
2. Start Netduino Update on your computer.
3. Plug the MicroUSB cable into your Netduino 3.
4. Hold the pushbutton on your Netduino 3. Keep holding the pushbutton.
5. Plug the other end of the USB cable into your PC (while still holding the pushbutton).

Does the board show up in Netduino Update now? What does it appear as?

We've found that the STDFU drivers struggle a little bit with some computers (a combination of certain versions of Windows and certain USB chipset drivers). The above steps are meant to eliminate power-up sequence and signal connection speed from the equation.

There is a backup reflash plan, in case Netduino Update can't pull your board type via the STDFU drivers. Today that backup plan is using the STDFU tools themselves--although we could add a "manual firmware selection" feature to Netduino Update in the future if that's a better backup option.

Chris


#62613 Outdoor project, 70 feet, 5 walls and a shed.

Posted by Chris Walker on 11 May 2015 - 08:45 PM

HI Dave1374,

I'm looking to do an outdoor project that needs to receive the signal from about 70 feet from the home router. Also, there are multiple walls (5?) between the router and the microcontroller.
 
Can it work with the Netduino 3 built in wifi or do I need to add an antena ?
 
The Netduino will be inside a shed.

With RF, for better or worse, results will depend on multiple factors include the signal strength of your access point. That said, 2.4GHz is a faster frequency so it will get blocked more by walls...and five walls and 70 feet may be stretching things a bit at that point. Add to that a possible outer-metal wall on the shed...

If the range is too much, you may consider adding a Wi-Fi repeater inside the outer wall of your home. Or using XBee with repeaters or another technology in conjunction with or as a replacement for Wi-Fi. Lots of options, some better for your application than others...

Chris


#62562 Curiosity asbout a "mega" version

Posted by Chris Walker on 09 May 2015 - 10:57 PM

Hi Rx7man,

And even better: a bit later this year, you will be able to plug a Shield Base into a Netduino 3 board. That will give you more GPIOs and AnalogInputs--and a dozen more interrupts as well.

For CAN-BUS: if that's a highly requested feature, we could build a CAN-BUS GoBus module.

Does that answer your question well?

Chris

P.S. Have you looked at the STM32F427VI used by Netduino 3? It's a pretty crazy-powerful MCU as well.


#62554 Best practices: how to wait for a Wi-Fi network connection

Posted by Chris Walker on 09 May 2015 - 05:49 PM

Without needing to boot a big OS, Netduino 3 starts up pretty fast.

As a side-effect of this, your code will probably start executing before the Wi-Fi radio even finishes connecting to your Wi-Fi access point.

As standard procedure, we recommend that all apps wait for network connectivity before using System.Net classes or SslStream to access the network. Otherwise, if you try connecting to Internet hosts without a live connection, you will just get SocketExceptions (as expected).

Option 1: using DHCP, wait in a loop for a DHCP-allocated IP address
Most users will have their Netduino 3 Wi-Fi mainboards configured to obtain their IP address using DHCP. A really easy way to wait for connectivity is to wait for an IP address like this:
// wait for DHCP-allocated IP address
while (IPAddress.GetDefaultLocalAddress() == IPAddress.Any) ;

Option 2: using static IP, wait in a loop for network connectivity
If you are using static IP, add the NetduinoExtensions.dll assembly to your project. Then you can simply wait in a loop for the network connection to go live.
// wait for network connectivity
while (!System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable()) ;

Option 3: wait in a loop, regardless of whether DHCP or static IP is used
This is a good option for apps you're writing for public consumption. Just add the NetduinoExtensions.dll assembly to your project and then add this code at the top of your app.
if (!Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].IsDhcpEnabled)
{
    // using static IP
    while (!System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable()) ; // wait for network connectivity
}
else
{
    // using DHCP
    while (IPAddress.GetDefaultLocalAddress() == IPAddress.Any) ; // wait for DHCP-allocated IP address
}

Option 4: event-driven code to wait for network connectivity and address allocation
This is my favorite option and is the most elegant. This is the recommended solution if your code is multi-threaded or you just want the most flexibility and lowest power consumption. Here we will use events and a WaitHandle to signal when connectivity is live.

Add the following code at the top of your class, as class-level fields:
static System.Threading.AutoResetEvent _networkAvailableEvent = new System.Threading.AutoResetEvent(false);
static System.Threading.AutoResetEvent _networkAddressChangedEvent = new System.Threading.AutoResetEvent(false);
Add the following code in your Main function to wire up the event handlers.
// wire up events to wait for network link to connect and address to be acquired
Microsoft.SPOT.Net.NetworkInformation.NetworkChange.NetworkAvailabilityChanged += NetworkChange_NetworkAvailabilityChanged;
Microsoft.SPOT.Net.NetworkInformation.NetworkChange.NetworkAddressChanged += NetworkChange_NetworkAddressChanged;
// if the network is already up or dhcp address is already set, pre-set those flags.
if (System.Net.NetworkInformation.NetworkInterface.GetIsNetworkAvailable())
    _networkAvailableEvent.Set();
if (Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].IsDhcpEnabled && Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].IPAddress != "0.0.0.0")
    _networkAddressChangedEvent.Set();
Add the following code in your Main function to wait for the network connection:
_networkAvailableEvent.WaitOne();
_networkAddressChangedEvent.WaitOne();
Finally, add these event handlers to your class:
static void NetworkChange_NetworkAddressChanged(object sender, EventArgs e)
{
    _networkAddressChangedEvent.Set();
}

static void NetworkChange_NetworkAvailabilityChanged(object sender, Microsoft.SPOT.Net.NetworkInformation.NetworkAvailabilityEventArgs e)
{
    if (e.IsAvailable)
    {
        _networkAvailableEvent.Set();
    }
}

Final notes
In all of the above cases, network connectivity is also usually indicated by a green ACT LED on your Netduino 3 Wi-Fi mainboard. There are some exceptions to that rule (such as the edge case where your router is all out of IP addresses to allocate) but it's a good general rule.

Chris




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.