Shop OBEX P1 Docs P2 Docs Learn Events
PINK for 2 IP addresses simultaneously — Parallax Forums

PINK for 2 IP addresses simultaneously

fedeblancofedeblanco Posts: 4
edited 2008-04-22 20:54 in General Discussion
Hi all,

I am new at this forum, but I have been using the Javelin and specially the PINK for a while and I need a little help...

I have a system that uses a PINK (Parallax Internet Netburner Kit) as serial-to-Ethernet interface. Right now, I am sending UDP messages with the most relevant info to a Windows Service. But, I need to send the information from my circuit to 2 different IP addresses SIMULTANEOUSLY (no matter the protocol). Can I do that with my PINK?

HOW?


Thanks for your support

Comments

  • Mike GreenMike Green Posts: 23,101
    edited 2008-04-22 18:37
    I may be wrong, but I don't believe it is possible at all. All internet traffic is either directed to a specific recipient (address) or is a broadcast (to all addresses). You can send two otherwise identical messages, one to each address, but not one message to two addresses simultaneously.
  • fedeblancofedeblanco Posts: 4
    edited 2008-04-22 19:28
    Can I do broadcast with the PINK?
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-04-22 19:59
    Is there a reason you cannot send the first message, change the destination IP and send it again? The messages would appear so quickly it would be as if they were sent at the same time.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • fedeblancofedeblanco Posts: 4
    edited 2008-04-22 20:18
    In fact, it is a technicality..., in the requirements of the project they requested that the info must be sent simultaneously. I had thought out as you suggest (send to one address first, and immediately after, to the other) but I just want to know if it is possible to do it simultaneous like they requested.

    Note: they want it simultaneously in order to implement redundancy...
  • Harrison.Harrison. Posts: 484
    edited 2008-04-22 20:24
    Well you can't send two packets at once. You may be able to use a udp broadcast to your subnet if both the remote hosts are on the same subnet as the PINK.

    If you really want redundancy, then broadcast the packets a few times. UDP is a stateless protocol so it cannot be guaranteed that your packet will make it to the remote host.

    You can download a network protocol analyzer (such as Wireshark) to look at packets if you want to understand why 'simultaneous' is impossible. NICs can only send one packet at a time. You can technically send them so fast that it appears that it is simultaneous, but that is a bit much to ask from an embedded device.
  • Mike GreenMike Green Posts: 23,101
    edited 2008-04-22 20:37
    Even if you were to have two separate PINK devices and two separate Stamps or a Propeller with two processors, you would need two completely separate internet connections to the local router since only one message can travel on a local internet segment at a time.
  • fedeblancofedeblanco Posts: 4
    edited 2008-04-22 20:54
    OK.

    Thank you all for your help.
Sign In or Register to comment.