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

There is no NETwork in Netduino Plus (2) ?

network tcp udp socket neduino 4.3

  • Please log in to reply
4 replies to this topic

#1 Emilio x64

Emilio x64

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts

Posted 22 August 2013 - 02:34 PM

My netduino application *needs* to communicate with the server running on the PC to exchange information. This communication needs to be fast. I was told USB was not "possible" unless I implemented the whole USB stack which I must say is q HUGE task (I have seen some of the sources back in 2001). The usual serial communication is also not desirable because it doesn't fit into my scheme of designs.

 

So that leaves the ethernet connection. On the server side I already implemented the TCP server that listens for commands as well as the UDP that sends the "who is out there" broadcasts (unless somebody has a better idea).

 

Now, when I wanted to code my TCP & UDP parts in the .NET Microframework project using TcpClient and UdpClient I found them nowhere. Found some examples on the internet that claims it is present in the mfdpwsextensions.dll appearing under the System.Ext.Net namespace but neither adding a reference to that DLL nor the Microsoft.SPOT.Hardware.Net give me anything of use, not even the plain Socket.

 

What am I missing, can somebody help me out with this? I need them soon.



#2 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 22 August 2013 - 02:48 PM

Hi Emilio,

 

When you create a Netduino Plus 2 project, it includes System.dll in your project.  This assembly (under NETMF) contains the System.Net sockets classes.

 

You can also pull in System.Http.dll as a reference which will get you client and server functionality.

 

For TCP and UDP access, just open up a Socket using "stream" or "datagram" options, respectively, and you should be good to go.

 

Does that help get you up and running?

 

Chris



#3 Emilio x64

Emilio x64

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts

Posted 22 August 2013 - 03:26 PM

Hey thank you so much Chris!!!! somehow my .NETMF project didn't have the System.dll in the list of references and as far as I know I did not remove it. Just added it and finally I have System.Net and the Socket class (plus related gadgets).

 

One last question though... I have seen some .NETMF examples out there using UdpClient that is what got me into trying to use TcpClient & UdpClient. Will now get on to my Sockets code, thank you very much.



#4 Emilio x64

Emilio x64

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts

Posted 22 August 2013 - 05:31 PM

Just found out there is no Async Send in the NETMF Socket class :-( anyway, it got me on the way.



#5 Emilio x64

Emilio x64

    Advanced Member

  • Members
  • PipPipPip
  • 40 posts

Posted 26 August 2013 - 09:33 PM

Still having problems trying to get my desktop application's Broadcast UDP packets to be received by the emulated netduino on the emulator. Trying to isolate the problem, are there any known issues like "Emulator doesn't have Ethernet connection" ? Is there a way to simulate ethernet cable (un)plugging in the emulator?







Also tagged with one or more of these keywords: network, tcp, udp, socket, neduino, 4.3

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.