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

Who has a Wiznet W5100-based Ethernet shield?


  • Please log in to reply
19 replies to this topic

#1 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 09 September 2010 - 06:17 AM

As requested, we have been working on a few Ethernet options for the Netduino here at Secret Labs.

One of these that's in development is support for the Wiznet W5100-based Ethernet shields. A few forums members indicated that they've also started writing code for it. I'd like to see if we can get everyone on the same track so we can leverage each other's efforts.

I don't have any data on the stability of the chip for networking. I can say that we have completed the first portion of the support--but are still fleshing out the TCP and UDP support.

Here's what user setup code looks like so far (I just tested it on my home network):

// configure our wiznet chip
SecretLabs.NETMF.Net.WiznetChip wiznet = new SecretLabs.NETMF.Net.WiznetChip(Pins.GPIO_PIN_D10);
// configure our IP settings
NetworkInterface networkInterface = NetworkInterface.GetAllNetworkInterfaces()[0];
networkInterface.PhysicalAddress = new byte[] { 0x01, 0x23, 0x45, 0x67, 0x89, 0x01 };
networkInterface.EnableStaticIP("10.0.1.12", "255.255.255.0", "10.0.1.1");
Pretty simple, and compatible with the .NET MF networking object model.

Please note that this is all beta, subject to change, subject to abandonment, etc. :) We only want to ship things that are stable--and we're not far enough along to make that call yet...

Chris

#2 pascal06

pascal06

    Advanced Member

  • Members
  • PipPipPip
  • 95 posts
  • LocationFrance

Posted 09 September 2010 - 02:39 PM

As requested, we have been working on a few Ethernet options for the Netduino here at Secret Labs.

One of these that's in development is support for the Wiznet W5100-based Ethernet shields. A few forums members indicated that they've also started writing code for it. I'd like to see if we can get everyone on the same track so we can leverage each other's efforts.

I don't have any data on the stability of the chip for networking. I can say that we have completed the first portion of the support--but are still fleshing out the TCP and UDP support.

Here's what user setup code looks like so far (I just tested it on my home network):

// configure our wiznet chip
SecretLabs.NETMF.Net.WiznetChip wiznet = new SecretLabs.NETMF.Net.WiznetChip(Pins.GPIO_PIN_D10);
// configure our IP settings
NetworkInterface networkInterface = NetworkInterface.GetAllNetworkInterfaces()[0];
networkInterface.PhysicalAddress = new byte[] { 0x01, 0x23, 0x45, 0x67, 0x89, 0x01 };
networkInterface.EnableStaticIP("10.0.1.12", "255.255.255.0", "10.0.1.1");
Pretty simple, and compatible with the .NET MF networking object model.

Please note that this is all beta, subject to change, subject to abandonment, etc. :) We only want to ship things that are stable--and we're not far enough along to make that call yet...

Chris

Hello Chris,

Next week, I will receive these components :
http://www.coolcompo...uksdbumahtmuqg5
http://www.coolcompo...?products_id=83

W5100 is very nice, but limited (only ipv4, only 4 concurrent connexions ...),
Enc28j60 is more low level, only MAC, but we can use lwIP.
But, lwip seems to be to big to run on Netduino. I will work on uIP instead of lwIP and see if it's possible to run on .net MF ...

My first issue is to be able to compile the firmware. I currently use a eval version of RVDS 4.1 with success, but it's a eval version. With GCC, we probably raise a out of flash memory very quickly :(

Pascal

#3 pascal06

pascal06

    Advanced Member

  • Members
  • PipPipPip
  • 95 posts
  • LocationFrance

Posted 10 September 2010 - 12:55 PM

Hello Chris,

Next week, I will receive these components :
http://www.coolcompo...uksdbumahtmuqg5
http://www.coolcompo...?products_id=83

W5100 is very nice, but limited (only ipv4, only 4 concurrent connexions ...),
Enc28j60 is more low level, only MAC, but we can use lwIP.
But, lwip seems to be to big to run on Netduino. I will work on uIP instead of lwIP and see if it's possible to run on .net MF ...

My first issue is to be able to compile the firmware. I currently use a eval version of RVDS 4.1 with success, but it's a eval version. With GCC, we probably raise a out of flash memory very quickly :(

Pascal

I just receive an offer for MDK, Keil, 3900 euros without taxes :( !!! Is RVDS cheaper ?

Pascal

#4 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 10 September 2010 - 04:38 PM

I just receive an offer for MDK, Keil, 3900 euros without taxes :( !!! Is RVDS cheaper ?

I think that MDK is less expensive than RVDS.

#5 CW2

CW2

    Advanced Member

  • Members
  • PipPipPip
  • 1592 posts
  • LocationCzech Republic

Posted 10 September 2010 - 06:34 PM

I just receive an offer for MDK, Keil, 3900 euros without taxes :( !!! Is RVDS cheaper ?

This is perhaps a little bit off-topic, but it can save you some time in case you evaluate MDK: TinyCLR scatter file for MDK in Netduino solution (scatterfile_tinyclr_mdk.xml) contains invalid values for Heap_End and Code_BaseAddress, the latter causes the firmware to be flashed at the invalid location (0x10E000 instead of 0x10C000). To fix this problem, please use the correct values from scatterfile_tinyclr_rvds.xml (or just copy ...rvds.xml over ...mdk.xml, MDK also has the RealView compiler).

#6 ThreadAbort

ThreadAbort

    New Member

  • Members
  • Pip
  • 4 posts
  • LocationChesapeake, VA

Posted 10 September 2010 - 07:07 PM

Chris,

I have been working on the Wifi Shield code in my spare time. It looks pretty easy to do. I actually just got one of these in the mail. It shipped quick!

Cute Digi WiShield v2.0

I like this because I can locate the netduino anywhere without a wire.

Do you have the ethernet firmware based code that I could try?

Thanks,
Chris

#7 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 11 September 2010 - 05:19 AM

Hi ThreadAbort, for the WiShields, I believe they use a custom communication protocol (not the integrated networking stack option)...

#8 Fred

Fred

    Advanced Member

  • Members
  • PipPipPip
  • 302 posts
  • LocationUK

Posted 11 September 2010 - 07:43 AM

I'm looking to get an ethernet shield. I assume from this post that the updated Arduino Ethernet Shield would be a good choice and likely to be supported soon. Is that right?

#9 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 11 September 2010 - 08:53 AM

I'm looking to get an ethernet shield. I assume from this post that the updated Arduino Ethernet Shield would be a good choice and likely to be supported soon. Is that right?


Hopefully. Until we have final code, here's the disclaimer: :)

Please note that this is all beta, subject to change, subject to abandonment, etc. We only want to ship things that are stable--and we're not far enough along to make that call yet...



#10 Fred

Fred

    Advanced Member

  • Members
  • PipPipPip
  • 302 posts
  • LocationUK

Posted 11 September 2010 - 09:21 AM

Great. I understand the disclaimer, but if it's one of the ones you're working with then I have every confidence.

#11 segu

segu

    Advanced Member

  • Members
  • PipPipPip
  • 31 posts
  • LocationLima - Peru

Posted 11 September 2010 - 04:02 PM

Chris, I edited the quotation, as we all think ... (I think) ;)

Hopefully. Until we have final code, here's the disclaimer: :)

Chris said:
Please note that this is all beta, subject to change, subject to abandonment, etc. We only want to ship things that are stable--and we're not far enough along to make that call yet...


You are in the right way
:) :) :)

#12 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 11 September 2010 - 05:27 PM

Chris, I edited the quotation, as we all think ... (I think) ;)


We like setting expectations low :) Then we try to exceed them.

As a company, we wouldn't normally share things that are in experimental/alpha/testing stage, but since Netduino community members are the awesome kind of crowd who likes that stuff...we're trying to share where we can.

But yes, we still add the disclaimer...just in case. Worst case, it doesn't pass our QA standards and we just release the code for people to tinker with--but we remove our name from it first ;)

Thanks for the enthusiasm and for belonging to the Netduino community,

Chris

#13 hari

hari

    Advanced Member

  • Members
  • PipPipPip
  • 131 posts

Posted 12 September 2010 - 08:11 PM

Please note that this is all beta, subject to change, subject to abandonment, etc. :)

Chris,
Thanks for working on Ethernet support.
1.Would it work with this shield & Ethernet module?
2. Where do I download the beta?
3. Do I need to solder up ICSP pins on the Netduino or would the library talk through other data pins?

#14 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 12 September 2010 - 08:49 PM

Hi Hari,

1.Would it work with this shield & Ethernet module?


It should work as long as it's using the Wiznet W5100 chip using SPI. Our two test shields are the DFRobot Ethernet shield and the official Arduino Ethernet Shield.

2. Where do I download the beta?


We're at the "experimental" phase right now. Our internal schedule is to release a first beta later this month--and a release candidate/release version next month. Would you like me to post some "rough cuts" that you can use to play with functionality (i.e. code which works in a limited fashion--temporarily missing DNS or UDP, outgoing sockets only, etc.)?

3. Do I need to solder up ICSP pins on the Netduino or would the library talk through other data pins?


No soldering of pins needed. However, I would highly recommend soldering the two "INT" pads together (on the shields we use--not sure if the one you linked to has such a thing). This enables the code to run in a low-power/low-MCU interrupt-based fashion. We support both methods--but the interrupt-driven method is much more efficient and frees MCU resources for other things. It does use up pin D2 however.

Chris

#15 hari

hari

    Advanced Member

  • Members
  • PipPipPip
  • 131 posts

Posted 12 September 2010 - 09:08 PM

Our internal schedule is to release a first beta later this month--and a release candidate/release version next month. Would you like me to post some "rough cuts" that you can use to play with functionality (i.e. code which works in a limited fashion--temporarily missing DNS or UDP, outgoing sockets only, etc.)?

Yes, I'd love to play with whatever Internet capability that is available now. Thanks Chris!

#16 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 13 September 2010 - 07:03 AM

Yes, I'd love to play with whatever Internet capability that is available now. Thanks Chris!


Okay, here you go :) These are very early, experimental drivers.
http://forums.netdui...hernet-shields/

Chris

#17 hari

hari

    Advanced Member

  • Members
  • PipPipPip
  • 131 posts

Posted 14 September 2010 - 01:11 AM

Okay, here you go :) These are very early, experimental drivers.
http://forums.netdui...hernet-shields/

Chris


You may regret sharing this with a newbie. ;-)
If you do not have time to answer these basic questions, I understand. I'd rather that you work on the code than to explain it. Posted Image

So, I built it, reference it from another netduino solution. Pasted the sample configuration code, and I figure, I'd instantiate a WebRequest or HttpWebRequest object to start talking to a server via IP. Alas, it does not seem to know anything about either of those classes. I was able to instantiate an IPEndPoint, but not sure what to do with it.

Help! Posted Image

#18 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 14 September 2010 - 02:37 AM

You may regret sharing this with a newbie. ;-)
If you do not have time to answer these basic questions, I understand. I'd rather that you work on the code than to explain it. Posted Image

So, I built it, reference it from another netduino solution. Pasted the sample configuration code, and I figure, I'd instantiate a WebRequest or HttpWebRequest object to start talking to a server via IP. Alas, it does not seem to know anything about either of those classes. I was able to instantiate an IPEndPoint, but not sure what to do with it.

Help! Posted Image


Ah, that's item #6 from the limitations list :) This is an early experimental driver, so there are a half dozen or so things that are not implemented yet.

We plan on adding support for HttpWebRequests, but in the meantime you'll want to use sockets.

If you download the sample code in the second post from the thread, it does a web request using sockets and manual HTTP headers...

If you'd like to wait until we're further along before playing with the driver, that's perfectly fine too. We'll be updating the experimental Ethernet driver with more features soon.

Chris

#19 hari

hari

    Advanced Member

  • Members
  • PipPipPip
  • 131 posts

Posted 23 September 2010 - 05:22 PM

Initially I was unable to get the NKC shield to work, so I bought a genuine Arduino Ethernet Shield, and Chris noted that the newer version DO need the ICSP header to be soldered.
Sure enough, the new Arduino Ethernet Shield now works. So, I tested the NKC again (with ICSP pins on Netduino), now the NKC works also!
So, if your Ethernet Shield isn't working, try soldering those ICSP pins on the Netduino. Worked for me! :-) Thanks Chris!

You are using the new (revised) Arduino Ethernet Shield. You see those 6 odd headers on the bottom? They need to attach to pins on the Netduino. If you solder a 3x2 "ICSP" header onto your Netduino, you should be good to go. Otherwise, you will not get any response from the shield. Very few shield ever require these optional pins--but that one does.

6-pin 'ICSP' connector:
http://search.digike...ds=67996-206HLF



#20 Chris Walker

Chris Walker

    Secret Labs Staff

  • Moderators
  • 7767 posts
  • LocationNew York, NY

Posted 23 September 2010 - 05:31 PM

So glad this is working for you now, hari. I didn't realize that the old NKC Ethernet shield had ICSP headers on it. They probably did that to make it compatible with the Arduino Mega. I need to look at photos closer I suppose :) Chris




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.