Ethernet Module (HCARDU0028)

Wireless and wired modules including Bluetooth, Ethernet, and IR kits.
admin
Site Admin
Posts: 866
Joined: Sun Aug 05, 2012 4:02 pm

Re: Ethernet Module (HCARDU0028)

Post by admin » Fri Jun 07, 2013 6:49 am

I'm going to pull one out of stock and test it with the ethercard library and sketch from the microduino thread to rule out any batch/software issues. I'll get back to you later this morning.

admin
Site Admin
Posts: 866
Joined: Sun Aug 05, 2012 4:02 pm

Re: Ethernet Module (HCARDU0028)

Post by admin » Fri Jun 07, 2013 9:17 am

Ok, I have one set up and everything works fine with the ethercard and sketch from the microduino topic. I've also confirmed with another user that they work fine with this module too. So can we just sanity check a few things when using the ethercard library and microduino sketch:

PINNOUT
Module.....Uno
SO..........D12
SI...........D11
SCK.........D13
CS..........D8
VCC........3V3
GND........GND

The module should have the red LED D1 illuminated. On the RJ socket the green link LED should be illuminated and the amber data on should flash occasionally.

In the microduino sketch you have changed the IP address to one that matches your subnet and is not in use by any other device on your network.

Dixo
Posts: 13
Joined: Thu Jun 06, 2013 4:20 pm

Re: Ethernet Module (HCARDU0028)

Post by Dixo » Fri Jun 07, 2013 11:24 am

Well I've previously observed the LEDs are lighting up and blinking so I'm hopeful that the ethernet module itself is ok (though I can't be 100% until I see it working) - You can just about see the orange one:

Image

Anyway what has emerged is that my arduino is now refusing to upload code to my Mega 2560. It will do it successfully around once every 6-7 attempts. I noted it was becoming somewhat slow to upload previously (the day I brought it home). I've called Maplin and they're telling me to send that back to them so until I can lay my hands on another I'm somewhat stumped.

Earlier I had been looking at this for at least 5 minutes:

Image

Anyway despite this I have finally managed to upload code and with my IP (only taken me around 15 attempts):

Image

Still nothing. IP is set, gateway / router is set but I've no idea how to set the 255.255.255.0 subnet you mention as there is nowhere in the code for that.

As you can see, when I try and hit it with the browser:

Image

I've re-wired it multiple times, checked, double checked, triple checked the wiring, used different wires and despite putting in some serial debugging output I'm still only getting this - even after two resets:

Image

I'm beaten. I can't be wasting any more time on this as I clearly have no chance of using my arduino or ethernet module so I'm off to ebay. Will leave feedback while I'm there. Sorry for all the agro & thanks for your kind help.

admin
Site Admin
Posts: 866
Joined: Sun Aug 05, 2012 4:02 pm

Re: Ethernet Module (HCARDU0028)

Post by admin » Fri Jun 07, 2013 12:11 pm

Sorry to hear that you are not having much success at the moment. Not wanting to get into debugging Maplin's products, but I suggest you try a different USB cable before you return it to Maplin. This is the most common cause of problems with Arduino boards.

The subnet I was referring to is your networks subnet, i.e. the 192.168.0. part of your ip address needs to match the settings in your router, which it probably does.

All I can do at this point is reconfirm that ethercard library and our microduino sketch work fine with this module and that there is nothing obvious that you are doing wrong. If once you manage to get your Mega working correctly again and you convince yourself that your setup is fine and that there may be a problem with the module, just contact us again through eBay and we can arrange a replacement/refund.

Dixo
Posts: 13
Joined: Thu Jun 06, 2013 4:20 pm

Re: Ethernet Module (HCARDU0028)

Post by Dixo » Fri Jun 07, 2013 3:16 pm

Yeah I've tried two usb cables but it still plays up when uploading. I end up having to swap usb sockets that its plugged into etc. Once I've swapped usb sockets it plays ball for a while before getting grumpy again. I assume thats not normal for a mega? - Have you ever had this?

Anyway when I can get the code uploaded it runs and I get the initial output but it always stalls on the same area of code:

Code: Select all

// Arduino demo sketch for testing the DHCP client code
//
// Original author: Andrew Lindsay
// Major rewrite and API overhaul by jcw, 2011-06-07
//
// Copyright: GPL V2
// See http://www.gnu.org/licenses/gpl.html

#include <EtherCard.h>

static byte mymac[] = { 0x74,0x69,0x69,0x2D,0x30,0x31 };

byte Ethernet::buffer[700];

void setup () {
  Serial.begin(57600);
  Serial.println("\n[testDHCP]");

  Serial.print("MAC: ");
  for (byte i = 0; i < 6; ++i) {
    Serial.print(mymac[i], HEX);
    if (i < 5)
      Serial.print(':');
  }
  Serial.println();
  
  if (ether.begin(sizeof Ethernet::buffer, mymac) == 0)  //Doesn't get past this
    Serial.println( "Failed to access Ethernet controller");
The output from that is:
[testDHCP]
MAC: 74:69:69:2D:30:31
So anything before the ether.begin() line runs but it never gets past it :(

Now I have to obviously get my hands on another arduino before I can test this out again (unless it can be tested on the Pi?) however this may take me a while as I'm still recovering from major surgery (tummy opened right up- 8 inch long incision) and still unable to drive / get out so I may have to get back to you in a week or three if the ethernet module is faulty - is that ok?

admin
Site Admin
Posts: 866
Joined: Sun Aug 05, 2012 4:02 pm

Re: Ethernet Module (HCARDU0028)

Post by admin » Fri Jun 07, 2013 7:06 pm

Ok well about 90% of reported Arduino board problems turn out to be either a faulty USB cable or some weird issue with the host PC. After that it tends to be something more fundamental. However if both your PC and USB port are working correctly, your Mega should be rock solid. So if you do end up returning it, don't let them fob you off. If you can, two other things to try is plugging it into a different computer and if you have a multimeter to hand monitor the 5V pin to see if it brownouts under peek load conditions such as when the Mega is being flashed.

Some other things you may want to check with the module:

If you do have a multimeter, check the CS line is doing something.
Also if your router is able to, see if it has the module listed in its connected devices list.
Finally from a command line see if you can ping the module.

It will work fine with a Pi if someone has ported or written drivers for it. Unfortunately we don't stock Raspberry Pi's so I wouldn't be able to confirm this.

3 weeks is fine, we would replace/refund a faulty product after that time even if it hadn't already been reported with a potential problem.

Good luck with your Mega/Module/Recovery.

Andrew

closeprotection85
Posts: 3
Joined: Fri Jul 12, 2013 7:59 am

Re: Ethernet Module (HCARDU0028)

Post by closeprotection85 » Tue Jul 16, 2013 7:40 pm

Just a quick query - Still a newbee...

I have downloaded the new ethercard-master.zip Library and managed to successfully run the first example in this Forum.
Unfortunitly all the examples from the new Library fail to operate as expected, and I noticed that the Forum uses the following:
"static uint8_t IPaddress[] = { 192,168,1,55 };" but all the examples use "static byte myip[] = { 192,168,1,55 };"
Not sure if it has anything to do with my problem but it seems that the new Library examples fail to establish an IP....

I feel so restricted to the Forum example, would it be possible to be pointed in the right direction or receive some additional examples based on the Forum example to allow for addition functions and user control to interact with the Arduino so I can tear it apart and learn more?

Thanks

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: Ethernet Module (HCARDU0028)

Post by andrew » Wed Jul 17, 2013 9:21 am

I have downloaded the new ethercard-master.zip Library and managed to successfully run the first example in this Forum.
Unfortunitly all the examples from the new Library fail to operate as expected
I have checked one of the example sketches (backsoon) contained within the library and it seemed to work fine. Are you changing the '#define STATIC 0' to a '1' to signify that you want to use a fixed ip?
and I noticed that the Forum uses the following:
"static uint8_t IPaddress[] = { 192,168,1,55 };" but all the examples use "static byte myip[] = { 192,168,1,55 };"
Without getting to deep into the C programming language, the two lines effectively mean the same thing. uint8_t and byte are two ways of saying that we want to create an array that will contain data that is 8 bits in size. The Ipaddress[] is the actual name of the array which can be anything you want so long as wherever it is used within your program it is called the same thing.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Dixo
Posts: 13
Joined: Thu Jun 06, 2013 4:20 pm

Re: Ethernet Module (HCARDU0028)

Post by Dixo » Sun Sep 22, 2013 9:58 pm

Well I'm back with good and bad news..

Good news is that Maplin found a fault with my arduino mega. I thought they'd try to fob me off but the engineers inspected it and confirmed it was faulty. The bad news is I've still not been well enough to cash the cheque to order a replacement from ebay so my ethernet module is still in the box / anti static packaging it was sent in.

Sorry for the delay, I will try to get this sorted soon.

Dixo

andrew
Site Admin
Posts: 1374
Joined: Sun Aug 05, 2012 4:15 pm

Re: Ethernet Module (HCARDU0028)

Post by andrew » Thu Sep 26, 2013 11:40 am

Glad you managed to get your money back. Don't forget we also sell very reliable Mega's on our website ;-)

Hope the module will work fine when you are able to test it. Good luck and get well soon.
Comments made by this poster do not necessarily reflect the views of Hobby Components Ltd.

Post Reply

Return to “Wireless / Wired”