|
|
#1 |
|
Member
Join Date: Jan 2010
Posts: 3
![]() |
Hello!
I am just writing a little MIDLET (MIDP 2.1, CLDC 1.1) for mobile Phones. The mobile should be able to get its ip via www.wimi.com and then update my dyndns.com account with this information. My Problem is: when I visit www.wimi.com in my mobile´s Browser, it gets an ip like: ***.***.107.4 And my midlet gets the ip: ***.***.106.128 My code is (in extracts): HttpConnection con = (HttpConnection)Connector.open(url); InputStream inStream = con.openInputStream(); ByteArrayOutputStream bout = new ByteArrayOutputStream(); f.append("URL: "+con.getURL()+"\n"); byte[] buffer = new byte[1024]; for (int n; (n = inStream.read(buffer)) > 0 {bout.write(buffer, 0, n); } f.append("IP: "+bout.toString()); Do you have any suggest how to solve this Problem? By the way: Doesn´t exist a url like http://whatismyip.com/automation/n09230945NL.asp for mobile automation? Thanks in advance! |
|
|
|
|
#2 | |
|
Administrator
Join Date: May 2008
Location: Pigeon Forge, TN
Posts: 858
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Quote:
Please don't use www.wimi.com to automate. All automation should take place on http://www.whatismyip.com/automation/n09230945.asp Since that page only shows the IP address, it should work nicely on any mobile device. My guess is with the incorrect IP showing up is that we're detecting your proxy and that's what your program is seeing. Use the automation page and see what happens. |
|
|
|
|
|
#3 |
|
Member
Join Date: Jan 2010
Posts: 3
![]() |
Hi!
Thank you. The thing I don´t understand, why I get a different IP when I manually open that url in my mobile´s browser and when I run my midlet. Every time I run the midlet, I get a different IP, but the IP by visiting wimi.com stays the same (and yes, I deleted cache ). |
|
|
|
|
#4 |
|
Super Moderator
|
Sebastian
Are you saying that the browser is displaying a different IP address from the midlet when both are doing a GET from http://whatismyip.com/automation/n09230945NL.asp My instant thought is "that's impossible, there must be something wrong with your midlet code". Robin |
|
|
|
|
#5 |
|
Member
Join Date: Jan 2010
Posts: 3
![]() |
Oh my god!!!
Well, first of all, I must apologize! I was just like: RTFM ![]() The Problem was: my Java-Profile was like: o2 internet. So far, so bad: Because with this profile, I get a new IP everytime I make a connection. My browser uses o2 wap. And with this connection, the IP stays the same. And that is the reason, why I got (and I really did) 2 different ips. But now everything is fine. By the way: I am writing a midlet which turns your mobile in a remote-controlled-webcam. And to be able to connect a pc to the mobile, I configure dyndns to redirect to my mobile (I expect ip-change only once a day). If you are interested in this topic, you are pleased to email me sebastian.merz at gmx dot de Thank you again for your help and your service of course! Last edited by wimiadmin; 01-24-2010 at 05:40 PM. |
|
|
|
|
#6 |
|
Administrator
Join Date: May 2008
Location: Pigeon Forge, TN
Posts: 858
![]() ![]() ![]() ![]() ![]() ![]() ![]() |
Glad you got it working.
I edited your email address to save you from some spammers. ![]() |
|
|
![]() |
| Bookmarks |
| Tags |
| automation, java me |
| Thread Tools | |
| Display Modes | |
|
|