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.

Mercer's Content

There have been 17 items by Mercer (Search limited from 27-April 23)


By content type

See this member's

Sort by                Order  

#42026 Support for UDP Multicast?

Posted by Mercer on 22 December 2012 - 06:00 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Mercer,

Is this code which works on some other NETMF board? If NETMF supports it and turning on the feature won't overflow the RAM, we could certainly support it.

If it's not something which NETMF supports, we can request that it be added (or add it as a community and contribute it to the netmf.codeplex.com core).

Chris



Chris.

I did some testing on another board, and the following code works as expected.

            Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
            socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastInterface, multicastIPAddress.GetAddressBytes());
            socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, 1);

            IPAddress DestinationIP = new IPAddress(new byte[] { 239, 255, 0, 1 });
            IPEndPoint DestinationEndPoint = new IPEndPoint(DestinationIP, 5568);

So, it looks like this could be supported in future releases and would make a great addition. Thank you for considering.



#41697 Support for UDP Multicast?

Posted by Mercer on 17 December 2012 - 11:21 PM in Netduino Plus 2 (and Netduino Plus 1)

When I call SetOption, I get the following error A first chance exception of type 'System.Net.Sockets.SocketException' occurred in Microsoft.SPOT.Net.dll An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in Microsoft.SPOT.Net.dll socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastInterface, multicastIPAddress.GetAddressBytes()); //Fails socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, 1); // Fails socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, true); // Works Any chance of getting this fixed/added in future releases?



#41695 Support for UDP Multicast?

Posted by Mercer on 17 December 2012 - 11:19 PM in Netduino Plus 2 (and Netduino Plus 1)

mIP could be modified to do generic UDP multicast. Right now mIP does multicast for the mDNS implementation. All the code is C# too. The only hiccup is getting a firmware build without the Ethernet compiled in. Chris, what would happen if someone loaded the NetduinoGo firmware on the N2+ ?

See mip.codeplex.com

-Valkyrie-MT


Thanks Valkyrie for the suggestion.



#41399 Netduino plus 2 - Webbserver -

Posted by Mercer on 11 December 2012 - 06:18 PM in Netduino Plus 2 (and Netduino Plus 1)

Yes, see the following thread. http://forums.netdui...nmikawebserver/



#41362 NeonMika.Webserver

Posted by Mercer on 11 December 2012 - 04:47 AM in Project Showcase

Thanks Dave. The download you provided works perfectly. I did have to make one small change when using DCHP.

//Dynamic IP
  interf.EnableDhcp( );
//interf.RenewDhcpLease( );

Calling RenewDhcpLease() sets the IP address to 0.0.0.0. Just calling EnableDhcp() enables DHCP and gets an address.

Thanks again!



#41361 Support for UDP Multicast?

Posted by Mercer on 11 December 2012 - 04:05 AM in Netduino Plus 2 (and Netduino Plus 1)

Hi Mercer,

Since we have more flash and RAM on Netduino Go, we may be able to support this...as long as NETMF supports it.

Chris


Hello Chris,

I finally got around to testing this with the N2+. When I call SetOption, I get the following error

A first chance exception of type 'System.Net.Sockets.SocketException' occurred in Microsoft.SPOT.Net.dll
An unhandled exception of type 'System.Net.Sockets.SocketException' occurred in Microsoft.SPOT.Net.dll


   socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastInterface, multicastIPAddress.GetAddressBytes());  //Fails
   socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, 1);  // Fails
   socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.Broadcast, true); // Works

Any idea why this is failing or if this could be addressed in a future release? I believe NETMF supports this, but not sure. Thanks.



#41285 NeonMika.Webserver

Posted by Mercer on 09 December 2012 - 10:15 PM in Project Showcase

Yes, I have it running on multiple Netduino Plus 2s. I have modified the project to work with my prototypes but I can try to recreate the upgraded base project. Just might need a day or so.


That would be awesome. Thanks!



#41274 NeonMika.Webserver

Posted by Mercer on 09 December 2012 - 05:50 PM in Project Showcase

Has anyone else built this on N2+ 4.2 SDK? If so, would you mind sharing the project? Thanks.



#41273 Unable to deploy using VS

Posted by Mercer on 09 December 2012 - 05:49 PM in Netduino Plus 2 (and Netduino Plus 1)

Thanks for the reply. I spent a lot more time with this yesterday and narrowed the issue down to the project I am trying to deploy. I am trying to deploy the web server written by neonmika, and am upgrading the project from 4.1 to 4.2 on the N2+. Once I deploy, the device is locked. See the following thread. http://forums.netdui...__80#entry41239 I am not sure what else to check. The project builds okay, but will not successfully deploy.



#41239 NeonMika.Webserver

Posted by Mercer on 08 December 2012 - 08:56 PM in Project Showcase

Okay, now I get slightly different results

Resolving.

The debugging target runtime is loading the application assemblies and starting execution.
Ready.

'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\mscorlib.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Native.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Net.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\System.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.SerialPort.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.IO.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\System.IO.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.PWM.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.Usb.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Secret Labs\Netduino SDK\Assemblies\v4.2\le\SecretLabs.NETMF.Diagnostics.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Secret Labs\Netduino SDK\Assemblies\v4.2\le\SecretLabs.NETMF.Hardware.Netduino.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.OneWire.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Time.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Users\Downloads\NetWebServer\NeonMika.Webserver\Framework\NeonMika.Webserver\NeonMika.NETMF.Webserver\bin\Debug\le\..\JSONLib.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Users\Downloads\NetWebServer\NeonMika.Webserver\Framework\NeonMika.Webserver\NeonMika.NETMF.Webserver\bin\Debug\le\..\SecretLabs.NETMF.Hardware.PWM.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Users\Downloads\NetWebServer\NeonMika.Webserver\Framework\NeonMika.Webserver\NeonMika.NETMF.Webserver\bin\Debug\le\..\SecretLabs.NETMF.Hardware.AnalogInput.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Users\Downloads\NetWebServer\NeonMika.Webserver\Framework\NeonMika.Webserver\NeonMika.NETMF.Webserver\bin\Debug\le\..\NeonMika.XML.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Users\Downloads\NetWebServer\NeonMika.Webserver\Framework\NeonMika.Webserver\NeonMika.NETMF.Webserver\bin\Debug\le\..\NeonMika.Util.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Users\Downloads\NetWebServer\NeonMika.Webserver\Framework\NeonMika.Webserver\NeonMika.NETMF.Webserver\bin\Debug\le\NeonMika.Webserver.dll', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Users\Downloads\NetWebServer\NeonMika.Webserver\Executeable\NeonMikaWebserver\NeonMikaWebserver\bin\Debug\le\NeonMikaWebserver.exe', Symbols loaded.
'Microsoft.SPOT.Debugger.CorDebug.dll' (Managed): Loaded 'C:\Program Files (x86)\Secret Labs\Netduino SDK\Assemblies\v4.2\le\SecretLabs.NETMF.Hardware.dll', Symbols loaded.
A first chance exception of type 'System.InvalidOperationException' occurred in Microsoft.SPOT.Hardware.dll

No additional information is included in the output window and no break point is hit in the program. After this point, I need to reflash the firmware to recover the device.



#41236 Unable to deploy using VS

Posted by Mercer on 08 December 2012 - 07:34 PM in Netduino Plus 2 (and Netduino Plus 1)

I have successfully been able to write programs and download to my N2+, but after a program has been deployed, I am unable to debug again. Running MFDeploy I cannot ping the device. If I erase the device and reload the firmware, I can build and deploy another project, but I find myself in the same state again. It appears as if the N2+ is busy running the program I have previously downloaded. Also, when building the project in VS, if I remove the USB cable, my machine will blue screen and reboot. Any ideas what I am missing?



#41234 NeonMika.Webserver

Posted by Mercer on 08 December 2012 - 05:36 PM in Project Showcase

I am working on loading this on my N2+.

namespace NeonMika.Webserver
{
    /// <summary>
    /// Interface between NeonMika.Webserver and the executing programm
    /// Use this class to work with your pins
    /// </summary>
    static public class PinManagement
    {
        //Standard output ports
        static private OutputPort Digital0 = new OutputPort(SecretLabs.NETMF.Hardware.NetduinoPlus.Pins.GPIO_PIN_D0, false);

When I run the code, I get the following error when defining the standard output ports. The last line shown above.

A first chance exception of type 'System.ArgumentException' occurred in Microsoft.SPOT.Hardware.dll
An unhandled exception of type 'System.ArgumentException' occurred in Microsoft.SPOT.Hardware.dll

Uncaught exception


Any idea what I am doing wrong? Thanks.



#28269 UTF8Encoding GetString

Posted by Mercer on 28 April 2012 - 04:29 PM in Visual Studio

return new String(Encoding.UTF8.GetChars(bfr));



Thank you!



#28234 Simple DMX Transmitter

Posted by Mercer on 27 April 2012 - 09:05 PM in Project Showcase

Is it normal for the SN75176B to become hot. The chip is so hot I cannot touch it. I am running 5v directly from the board and have it wired as shown in the diagram. Any ideas?



#27428 Support for UDP Multicast?

Posted by Mercer on 17 April 2012 - 03:50 AM in Netduino Plus 2 (and Netduino Plus 1)

Is support for multicast planned? If so, can I use the SocketOptionName methods? I am looking forward to checking out the Netduino Go, but I need multicast support. The following is a segment of code I am currently using on the PC that I would like to port to the Netduino.

   NetworkInterface.EnableStaticIP(ip, subnet, gateway, mac);
   NetworkInterface.EnableStaticDns(new byte[] { 192, 168, 1, 1 });
   Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);
   
   socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastInterface, multicastIPAddress.GetAddressBytes());
   socket.SetSocketOption(SocketOptionLevel.IP, SocketOptionName.MulticastTimeToLive, 1);
   
   IPAddress DestinationIP = new IPAddress(new byte[] { 239, 255, 0, 1 });
   IPEndPoint DestinationEndPoint = new IPEndPoint(DestinationIP, 5568);



#23408 Advanced DMX Controller

Posted by Mercer on 29 January 2012 - 04:01 AM in Project Showcase

After all the hard work most of it is finished. This link is a Zip file of all the code. (excuse us but the documentation is mostly written in Dutch.) Instructions on how to use will follow later.

Code



Unfortunatly, the link to the code is no longer available. Does anyone else have a copy they could share? Thanks.



#22813 UTF8Encoding GetString

Posted by Mercer on 16 January 2012 - 12:49 AM in Visual Studio

I am trying to perform the following, but System.Text.UTF8Encoding.GetString is not supported in the Microframework. UTF8Encoding val = new UTF8Encoding(); return val.GetString(bfr, offset, length); Is there another way to accomplish this task?




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.