Shop OBEX P1 Docs P2 Docs Learn Events
Pink Module and UDP code — Parallax Forums

Pink Module and UDP code

Dave ADave A Posts: 31
edited 2007-11-29 20:26 in BASIC Stamp
Attached is a working pink code.· This has only been tested through a local switch, not accross a wide network.· I have an application that will go across a city.
Chris Savage please review and give any comments.

Comments

  • DgswanerDgswaner Posts: 795
    edited 2007-10-08 18:48
    If you want to try your code over a Wan let me know, and I can try one side for you.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-10-09 14:50
    Dave,

    Thanks for posting your work. I was out yesterday and did not get the example completed. The code I have almost completed is technically setup for LAN, but the only difference for most between LAN and WAN is router configuration and root IP Address. In other words, my PINK is home safely behind my router and has a Static IP Address in the range 192.168.x.x. Now if I want to send a UDP message to it, I send it to the my DSL Modem IP Address and my Router must be configured to Port Forward UDP Messages on the selected port. This is all transparent to the PINK. You simply select the IP Address and Port. So you code should work fine. But give me a day to get the RX code home and tomorrow I will try the send from here and see what happens. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • DgswanerDgswaner Posts: 795
    edited 2007-10-09 16:04
    what about setting up an "auto responder" so those of us with one pink can mess around with UDP messaging, have a pink receive a message wait 5 seconds then send it back. part or all of the message could be the IPaddress of the sender.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    A complex design is the sign of an inferior designer. - Jamie Hyneman, Myth Buster
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-10-10 14:43
    I never really considered an echo a reliable means of determining successful transmission due to the fact that certain hardware failures can cause that (at least on a PC) to be false positive. If your target PINK is running on a BS2 it can easily receive packets up to the number of bytes available for variable storage. On a BS2p or higher you can do up to 126 bytes. It would be pretty simple to have a PINK setup to receive a packet, run a CRC on it and return back verification that the packet was received intact. I was actually working on something like that. The target PINK could also send out a NAK to indicate a garbled message and/or to request resend. An optimum setup would have CRC checking and ACK/NAK capability, especially in light of the fact that UDP messages don’t confirm receipt such as e-mail does.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
  • john_sjohn_s Posts: 369
    edited 2007-11-22 22:41
    Chris,

    Did you have a chance to experiment with your PINK setup as per your email dated 10/9/2007? Did it work?
    Can you share some snippets of your RX code smile.gif

    Regards, John
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2007-11-29 20:26
    John,

    I have been out for a few days but this weekend I will be putting some new demo code together and try to get it listed on the website (and Forums) first thing Monday. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Tech Support
Sign In or Register to comment.