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.

Runner

Member Since 01 Aug 2011
Offline Last Active Feb 25 2013 07:57 AM
-----

Posts I've Made

In Topic: Multiple Netduinos within one local Network

05 December 2012 - 08:06 AM

Hello all! please just forget about this post. :) I have checked the IP´s am MAC address with MFdeploy. In the startup of my main function I was setting the new IP address for the Netduinos. unfortunately I have not recognized a function call to one of the classes I have written at the beginning. In the "lost" class I have had a function which was setting the MAC address. Really thanks for your help and from now on I will improve my code documentation! :) btw: UDP is working fine. Connection to both of the Netduinos is working! You guys are really great! Thanks

In Topic: Multiple Netduinos within one local Network

04 December 2012 - 11:43 AM

MAC, IP and networkport of all devices are different! I have checked this several times... Trying to switch my code to TCP protocol. This will cost data transfer rate (UDP is faster cause there is no handshake), but i hope it will fix the communication problem

In Topic: Multiple Netduinos within one local Network

28 November 2012 - 05:55 AM

Hey!

Sorry was ill the last days.
Here some code:
System.Net.Sockets.Socket LVSocket = null;
System.Net.IPEndPoint LVEndpoint = null;
System.Net.Sockets.Socket uCSocket = null;
System.Net.IPEndPoint uCEndpoint = null;

// Path of the init File at the Sd Card
System.String Path = @"\SD\Config_INIT.txt";
// DEFAULT values if SD Card is not found or not inserted

// SETTINGS for Netduino #1
System.String LabViewIP = "192.168.1.20";                 
System.Int32 NetworkPort = 49001;                 
System.String NetduinoIP = "192.168.001.21";

// SETTINGS for Netduino #2
// System.String LabViewIP = "192.168.1.20";                 
// System.Int32 NetworkPort = 49002;                 
// System.String NetduinoIP = "192.168.001.22";

The program checks for an config file at the SD Card (works fine)
If no SD Card detected it will continue with:


System.Net.IPAddress IPLabview = System.Net.IPAddress.Parse(LabViewIP);
System.Net.IPAddress IPNetduino = System.Net.IPAddress.Parse(NetduinoIP);

Microsoft.SPOT.Net.NetworkInformation.NetworkInterface.GetAllNetworkInterfaces()[0].EnableStaticIP(NetduinoIP, "255.255.255.0", "192.168.0.0");

if (uCEndpoint == null)

{
  uCSocket = UDPConnector.RecieveSocket(uCSocket);
  uCEndpoint = UDPConnector.RecievePoint(uCSocket, uCEndpoint, IPNetduino, NetworkPort);
}

if (LVSocket == null)
{
  LVSocket = UDPConnector.SendSocket(LVSocket);
  LVEndpoint = UDPConnector.SendPoint(LVSocket, LVEndpoint, IPLabview, NetworkPort);
}

byte[] Recieved = UDPConnector.getMessage(uCSocket);


BTW I´m using CAT5 cables

In Topic: Multiple Netduinos within one local Network

23 November 2012 - 11:16 AM

Hey Markus, I´m sorry but the solution i mentioned above isn´t working.. But it sounded like a good reason for the failure... Have to leave to the university but a small update to the Network config: Netduino #1 IP: 192.168.1.21 Port: 49001 Netduino #2 IP: 192.168.1.22 Port: 49002 Laptop: IP: 192.168.1.20 Port: 49001 and 49002 The Laptop is running a Lab View program which opens 2 UDP protocol ports (both same IP but different ports) same result as before... everything is connected to a switch hard- and software works fine with just one Netduino connected.

In Topic: Multiple Netduinos within one local Network

23 November 2012 - 09:28 AM

ok one device per port....found it.. :P thanks

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.