Announcement

Collapse
No announcement yet.

Connection Failed

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • randy
    replied
    Originally posted by IanIreland View Post
    Thanks very much for your detailed reply.

    That's what I have done.

    As the sketch has the correct parameters and it compiles correctly and uploads without errors I conclude I have a faulty board!

    Thanks again for the help.

    I'll get there eventually.
    I will add that I have had horrible luck with aftermarket Ethernet shields. I have had one that failed connect and most of the rest would drop connections. Since I have changed all of mine to genuine Arduino shields I have had 100% uptime on three boards.

    Leave a comment:


  • IanIreland
    replied
    Thanks very much for your detailed reply.

    That's what I have done.

    As the sketch has the correct parameters and it compiles correctly and uploads without errors I conclude I have a faulty board!

    Thanks again for the help.

    I'll get there eventually.

    Leave a comment:


  • randy
    replied
    I'll go over all of the steps because they all must be followed. this is for a normal configuration, the API is similar.

    You need to download and install the Arduino software, Greig recommends version 1.0.5-r2. Then you need to download and install the libraries required for the plug-in. These libraries are installed in the Libraries directory of your Arduino software, overwriting any that might exist.

    Then you configure your board on the Arduino configuration page of the plug-in as shown in the first screenshot below. The plug-in will suggest an IP address, port and MAC address. You can use those or override them if you are comfortable with network settings.

    After all of that is set, you download the sketch using the little blue arrow on the configuration page shown in the first screenshot. Each board has a different sketch, so choose the board you want to download the sketch for.

    Then you open the sketch in the Arduino software and it will look like the second screenshot. You will note that the section with the IP addresses, MAC address and port is near the top of the sketch as shown in the screenshot.

    Then you connect your Arduino by USB, pick the board type and com port in the software under "tools" and use the Arduino software to upload the sketch to the board. The board is powered by USB during the upload process. It is this process that writes the static IP address and port to the board.

    Once that is done, you should be able to power your board and connect it to your network. It will need a separate 6-9 volt power supply when not powered by USB. You should see network activity on the Ethernet port and on the shield LEDs. It should connect to your plug-in and will definitely respond to a ping to the chosen IP address.

    If you don't use the correct version of the Arduino software, your board may not work. If you don't install the correct libraries prior to uploading the sketch, your board might not work. If you do not successfully load the correct sketch to the board it will not work. This can be confirmed by "upload complete" in the Arduino software.
    Attached Files
    Last edited by randy; April 18, 2015, 01:42 PM.

    Leave a comment:


  • randy
    replied
    Originally posted by IanIreland View Post
    Thanks for responding.
    You say before I upload the sketch make sure the IP address is hard coded in.
    This shows my ignorance of Arduino - I'm new to it. How do I do that?
    When you open the sketch in the Arduino software, you can read it in the software window before you upload it. I'll take some screenshots and post them in just a little while.

    Leave a comment:


  • IanIreland
    replied
    Thanks for responding.
    You say before I upload the sketch make sure the IP address is hard coded in.
    This shows my ignorance of Arduino - I'm new to it. How do I do that?

    Leave a comment:


  • randy
    replied
    Originally posted by IanIreland View Post
    Hi,

    I've started experimenting with Arduino. I have a meg 2560 board and 1.0.0.81 version of the plugin.

    With a USB connection I can operate the board.

    I am trying to get an Ethernet Shield working - so far with no success.
    I have it installed on the board. I downloaded the libraries and the new sketch.
    The sketch uploaded with no errors.
    I cannot see the board. Looking in the sketch it sets the MAC, IP and port number. I am unable to ping the IP.
    I added the subnet mask and gateway to the sketch just in case - but that didn't help either.
    Is there a way to tell if the Ethernet shield is working?
    Any suggestions welcome.
    Cheers
    Mine will all respond to a ping if they are connected and working and will show up in my router as attached devices. Before you upload the sketch, make sure the IP address you expect is hard coded in. The HomeSeer ip is also hard coded into the sketch. they are in lines just below


    //******************************Ethernet Setup*****************************

    byte mac[] = {0x00, 0xAA, 0xBB, 0xCC, 0xDE, 0x01};
    IPAddress ip(192,168,2,12); //IP entered in HS config.
    const unsigned int localPort = 55120; //port entered in HS config.
    IPAddress HomeseerIP(192,168,2,25); //Homeseer IP address


    If all of that is correct and you see handshaking lights on the shield Ethernet port, I would think the board might be at fault.

    Leave a comment:


  • IanIreland
    replied
    Hi,

    I've started experimenting with Arduino. I have a meg 2560 board and 1.0.0.81 version of the plugin.

    With a USB connection I can operate the board.

    I am trying to get an Ethernet Shield working - so far with no success.
    I have it installed on the board. I downloaded the libraries and the new sketch.
    The sketch uploaded with no errors.
    I cannot see the board. Looking in the sketch it sets the MAC, IP and port number. I am unable to ping the IP.
    I added the subnet mask and gateway to the sketch just in case - but that didn't help either.
    Is there a way to tell if the Ethernet shield is working?
    Any suggestions welcome.
    Cheers

    Leave a comment:


  • ecuboss
    replied
    Seems to be working on 1.56 now.

    Although, what may be different is where i placed the library files. With the library file you provide, two of the folders already exist - so this time i renamed them before then copying the zip file into the same location.

    Has to be said, the instructions for that part need revising as what it tells you to do, doesn't seem to match what i see when using 1.58 in terms of folder structure - i kept reading and re-installing and it didn't seem to make sense.

    Leave a comment:


  • ecuboss
    replied
    jan-15 14:10:55 Arduino Plugin Disconnected from Board No:1 on COM
    Jan-15 14:10:55 Arduino Plugin Error = Board: 1 Connection FAILED.
    Jan-15 14:10:25 Arduino Plugin Warning = Board: 1 has a connection ERROR. Retrying.
    Jan-15 14:09:25 Arduino Plugin Updating Values on Board No: 1
    Jan-15 14:09:25 Arduino Plugin Updating pins on Board No: 1
    Jan-15 14:09:25 Arduino Plugin Connected to Board No:1 at ip address 192.168.50.55 Port No:8900
    Jan-15 14:09:25 Arduino Plugin Board 1 Version 1.0.0.36 and Plugin Version 1.0.0.36 are compatible.
    Jan-15 14:09:24 Arduino Plugin Connecting Board No:1 at ip address 192.168.50.55 Port No:8900

    I then have to power cycle the arduino, then it repeats the above - precisley 1 minute between connect and disconnect

    Leave a comment:


  • enigmatheatre
    replied
    Originally posted by ecuboss View Post
    my genuine uno is connecting for precisley 1 minute and then disconnecting, using 1.5.8
    Going to try downgrading.
    Do you get a connection error in the log?

    Greig.

    Leave a comment:


  • ecuboss
    replied
    my genuine uno is connecting for precisley 1 minute and then disconnecting, using 1.5.8
    Going to try downgrading.

    Leave a comment:


  • fvhemert
    replied
    That was a valuable suggestion. I experienced intermittent problems with 4 out of 6 Arduino Mega's. When troubleshooting I noticed the boards did not even respond to a ping although the led's on the ethernet suggested there was normal connectivity.

    I have removed the Arduino software completely and downgraded to the 1.5.6-R2 version, compiled and uploaded the sketches to the boards and from that moment on the boards immediately started to respond to pings and also to the HS3 plugin.

    Interested in finding out what is causing this problem, eventually need to upgrade to the latest version because the R2 version does not supports all boards I have.

    Leave a comment:


  • enigmatheatre
    replied
    Good news,

    I have only used 1.5.6-R2 but now I think about it someone else had a problem with 1.5.6 beta and had to roll back to get it to work. I will have to try 1.5 and see if I can work out whats going on with it.

    Greig.

    Leave a comment:


  • Redbull
    replied
    Greig,

    I have found the problem

    I remembered when I was setting op the Arduino, I downloaded 1.5.7 and tried to use the libraries you provided with the plugin. That does not work and gives a compile error.

    I completely removed 1.5.7 from my system and installed 1.5.6-R2 as you described in the manual, installed the libraries from the plugin.

    Took the same sketch, compiled it and loaded it on the same Arduino which gave problems, since it came online........no disconnects or whatever anymore.
    I even can disconnect the board, reset it and connect it manually, data is comming through with the speed of light

    So there is definitly a problem with 1.5.7
    Anyone else same problem/issue/solution?

    Regards

    Redbull

    Leave a comment:


  • Redbull
    replied
    Greig,


    Atatached is the (standard) sketch I am using.
    Using Arduino 1.5.7 to load it.
    The problem is both on the Arduino Uno with Ethernet shield as wel as on the Arduino Ethernet itself.

    Thanks for digging into this one

    Redbull
    Attached Files

    Leave a comment:

Working...
X