PDA

View Full Version : pink and WAN IP



stef
01-26-2009, 02:51 AM
Hi

I connected one of my PINK modules to a popeller. I used some code to interact and everyting is working fine.
Now I'm searching on something I need to solve for a little project I have. I connected the PINK module behind my ADSL router. Did all the settings so it is reachable from outside. That part is already working. The problem is that in my country we ofthen get a dynamic WAN IP. (You can get a fix but then you have to pay more). So my WAN IP is changing every 24 Hours. I can see my wan IP when I'm at home (In the wep page of my router) I can use DYNDNS and a litle program but then I need to let my PC on 24H a day.
I was wondering if thier is a way to get mY wan IP only using my PINK and a propeller. It seems to be so easy when you say it but I can't find a sullution. I was thinking of this sollution because I need to plase some modules in the field for gathering test information. If I can place them on a low budget ADSL and find myself every 24H all the WAN IP it would be less expencife.
I also thouth off using some routers from belkin where they have bild in DYNDNS support but my client is not willing to do that. He hase already the cisco routers and they don't have the DYNDNS support. So that is also no option.

So,any idea is welkom to overcome this problem using only a pink and a propeller. (and of cours a working ADSL connection wit a router)

stef

Chris Savage
01-26-2009, 11:55 PM
Stef,

Two options…both of these I have used to some degree. If the PINK is connected directly to the internet and is assigned an internet IP rather than an intranet IP then you could either have the module send a UDP message to a fixed IP system notifying it of its IP address. I have done this with success. The other option is to have the PINK module e-mail this information, or, in my case, text message it to you (using e-mail). If the PINK is assign an intranet IP, such as 192.168.xxx.xxx or 10.10.xx.xx then you won’t be able to do anything because the PINK will only report the IP assigned to it, not the gateway. I hope this helps. Take care.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering

stef
01-27-2009, 09:37 PM
Hi Chris

Thanks for the options. My problem is that I 'm always behind the router of the end user. So that is plasing me in the possition that the pink always has a privit IP. The router is doing the forwarding so thier is no problem reaching it from the internet or getting out. The problem to get in is I'm not knowing the IPWAN at all the time. I use a lot the propeller and the sx but I'm not familliar with html and php ec... Is thier a way that the pink module can strip the IP from the web page off the router. Just te same as I can see it when I brouws to the router?

Stef

Chris Savage
02-03-2009, 12:32 AM
I don’t see any way for that to happen. If the PINK module can’t send a message to another device which can then return the IP address to it, you may not have a way to do it with this device. In my case, if I was in your situation I would have the PINK send a UDP message to a fixed IP address. That IP address could then acknowledge the message and return the transmitter’s IP address. This is all I can think of under the circumstances. I hope this helps. Take care.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering

Oldbitcollector (Jeff)
02-03-2009, 04:08 AM
What if he had a CGI running on another computer that updated a file
with just the IP address? Could he read that file on his internal network with the PINK?

I've been racking my brain on this all afternoon, thinking there has got to be a way for him to do this.

Perhaps I need to get my hands on a PINK and study it a bit myself so I understand where all the boundaries are.

OBC

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
New to the Propeller?

Check out: Protoboard Introduction (http://jeffledger.googlepages.com/Protoboard_Introduction.pdf) , Propeller Cookbook 1.4 (http://ucontroller.com/Propeller%20Protoboard%20Designs%20for%20the%20Beg inner.pdf) & Software Index (http://forums.parallax.com/showthread.php?p=770318)
Updates to the Cookbook are now posted to: Propeller.warrantyvoid.us (http://propeller.warrantyvoid.us)
Got an SD card connected? - PropDOS (http://www.orrtech.net/propdos/)

Chris Savage
02-03-2009, 04:20 AM
OBC, it would have to be sent as a UDP message or POSTed to the PINK web page. These are the only ways to get data into the PINK Module from the network.

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Engineering

Harrison.
02-03-2009, 05:09 AM
You could have your PINK send emails to a specific email address. Then you can take a look at the raw email headers and find the WAN IP address (this isn't a failsafe method, but it would be the easiest to implement).

Another method is to write your own custom UDP daemon and run it on a remotely accessible server. The UDP method isn't too hard to implement either, but it would require some custom code.