Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 5 of 5

Thread: ICMP Ping on Teensy Ethernet Library

  1. #1

    ICMP Ping on Teensy Ethernet Library

    I'm working on Ethernet Project, and want to ping another device from teensy, i have been searching around about icmp ping but i can not find library for teensy ethernet library, i'm using Ethernet library 2.0.0 https://www.pjrc.com/arduino-ethernet-library-2-0-0/

    can somebody help me to figure this out?

  2. #2
    i tried to modify Arduino Ping w5500 by nickson (https://github.com/NicksonYap/Arduino-Ping-W5500). i changed w5500.h to 5100.h and all class to w5100
    but it compile error, it said w5100 not declared. so i check utility/w5100.h that has extern W5100class W5100

  3. #3
    i read Ethernet.h on Ethernet Library 2.0.0

    / Sending UDP packets

    // Start building up a packet to send to the remote host specific in ip and port
    // Returns 1 if successful, 0 if there was a problem with the supplied IP address or port
    virtual int beginPacket(IPAddress ip, uint16_t port);
    // Start building up a packet to send to the remote host specific in host and port
    // Returns 1 if successful, 0 if there was a problem resolving the hostname or port
    virtual int beginPacket(const char *host, uint16_t port);
    // Finish off this packet and send it
    // Returns 1 if the packet was sent successfully, 0 if there was an error
    virtual int endPacket();

    i wonder if i can check target ip with begin packet?

    if return is 0 then there was problem with ip or port → is right this code checking for target ip?

    Thankyou so much

  4. #4
    Senior Member
    Join Date
    Nov 2012
    Posts
    1,488
    Which Teensy and ethernet hardware are you using?

    Pete

  5. #5
    im using teensy 4.0 with w5500

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •