Shop OBEX P1 Docs P2 Docs Learn Events
Sending UDP data from PINK module — Parallax Forums

Sending UDP data from PINK module

BeanBean Posts: 8,129
edited 2008-12-25 15:50 in General Discussion
I have written a REALbasic app to receive and log TCP data.
I was going to create one to receive UDP data from the PINK, but I have been told that the PINK can only send UDP data to the local subnet (not across the internet).

Can anyone confirm if this is true ?

I'm fairly certain that it can RECEIVE UDP data from the internet, but it's SENDING that I'm worried about.

If it CAN send UDP data across the internet then I will devote some time to re-write the program for UDP data.

Bean.


▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
·The next time you need a superhero don't look up in the sky...Look in the mirror.


·

Comments

  • soshimososhimo Posts: 215
    edited 2008-12-23 01:09
    I took a look at the manual and there is nothing in there that states you can't route your UDP packets. There might be a network limitation though as I know a lot of SE's turn off UDP internally and even install routers that don't route the UDP data. The protocol itself should be routable as it follows the same transport protocol as tcp/ip, namely internet protocol. It's only at the application layer when it makes the difference (tcp is packet based with ack/nack and udp is single datagram with no ack/nack). I think you are good to go with your design - you will only be limited by what environment you are in.
  • BeanBean Posts: 8,129
    edited 2008-12-23 02:22
    If anyone has REALbasic and wants to try the TCP Logger here is the source file. I'd be happy to hear comments from other OSes other than Windows.

    I have also posted the windows EXE in the zip file.

    Comment welcome.

    Bean.


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ·The next time you need a superhero don't look up in the sky...Look in the mirror.
  • Peter VerkaikPeter Verkaik Posts: 3,956
    edited 2008-12-23 06:31
    Bean,
    In this thread
    http://forums.parallax.com/showthread.php?p=556951
    near the last post, you will find an udp server and udp client program.
    Note that this thread talks about the Pink with the old firmware,
    but that shouldn't make a difference regarding udp.
    regards peter
    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-12-23 15:15
    Bean,

    The PINK Module can send UDP packets to any valid IP address on any valid port. Note that the original firmware limited UDP packets to port 10000, but newer versions allow any valid port. I hope this helps. It will be interesting to see what you come up with. I personally feel that for those who can take advantage of UDP on a PC application the PINK is a great interface for their microcontroller applications since the UDP can be used in ways the e-mail and web interface cannot.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • BeanBean Posts: 8,129
    edited 2008-12-23 15:27
    Chris,
    I have a PINK, but I don't know if it has the old or new firmware. Is there an easy way to tell ?

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ·The next time you need a superhero don't look up in the sky...Look in the mirror.


    ·
  • Chris SavageChris Savage Parallax Engineering Posts: 14,406
    edited 2008-12-23 15:35
    Bean,

    Yes, go into the Modify Variable web page and scroll to the bottom…it will tell you the firmware version. Take care.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Chris Savage
    Parallax Engineering
  • BeanBean Posts: 8,129
    edited 2008-12-24 22:13
    I know it's xmas eve, but if anyone has the ability to send a UDP message to me so I can test my software.
    Send any text data to 66.59.107.234 port 10000

    !!! NOTE: If you have a router, will MUST setup port forwarding on the router for the message to get through the router.

    I would help me greatly if you could assist.

    Please reply here if you do send something.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ·The next time you need a hero don't look up in the sky...Look in the mirror.




    Post Edited (Bean (Hitt Consulting)) : 12/24/2008 10:21:16 PM GMT
  • BeanBean Posts: 8,129
    edited 2008-12-24 22:59
    Yahoo!!! I got two "Hi Bean" messages.

    Thanks whoever it was...

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ·The next time you need a hero don't look up in the sky...Look in the mirror.


    ·
  • Harrison.Harrison. Posts: 484
    edited 2008-12-24 23:00
    That would be me [noparse]:)[/noparse]. I sent it with echo "Hi Bean" > /dev/udp/66.59.107.234/10000 on a linux box.
  • BeanBean Posts: 8,129
    edited 2008-12-24 23:01
    Cool, I assume you sent it twice ?

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ·The next time you need a hero don't look up in the sky...Look in the mirror.


    ·
  • Harrison.Harrison. Posts: 484
    edited 2008-12-24 23:02
    Yeap. I sent it twice just in case there was some packet loss.
  • BeanBean Posts: 8,129
    edited 2008-12-25 15:50
    I have posted the finished project in the "Completed Projects" forum.

    This REALbasic program allows you to collect data sent from the Parallax PINK module.

    It allows the PINK to "push" data to the PC.

    It stores the data in a comma delimited file as: date,time,remoteIP,data
    I will post the .EXE file for windows and the REALbasic source code is available so you can run it on Windows, Mac or Linux if you have the REALbasic compiler.

    Bean.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
    ·The next time you need a hero don't look up in the sky...Look in the mirror.


    ·
Sign In or Register to comment.