Windows mobile Web Service - Windows Mobile Development and Hacking General

Hi, i'm doing a app for windows mobile and i want to connect to a web service, anyone knows how?
Thanks

Use a WebRequest to read the results.
replace ##### with the web address of the service and any parameters it wants e.g.
"http://www.webserver.com/webservice?parma=A&parmb=B"
Then use the Read() method of the stream to get the results. Remember that you can only read 8192 bytes of the stream over the net at one go. You will have to read consecutive blocks of data if the response is longer than that.
e.g.
Code:
using System.IO;
using System.Net;
Byte[] Buffer = new Byte[8192];
int ByteCount;
Stream ResponseStream = WebRequest.Create("########").GetResponse().GetResponseStream();
while ((ByteCount = ResponseStream.Read(Buffer, 0, 8192)) > 0)
{
// Do something with what's in the buffer.
}
ResponseStream.Close();
If the webservice returns XML use an XMLTextReader on the url instead
Code:
XmlTextReader xtr = new XmlTextReader(""http://www.webserver.com/webservice?parma=A&parmb=B");
Then use the Read() method to read the response a line at a time. The Name or Value properties of the class will hold the return values, depends on how the XML has been returned.

I'm doing like this, but its not connecting
connecting.StreamWS ws = new connect.connecting.StreamWS();
ws.Url = "http://192.168.56.106:9090"; //url do serviço
string strOut = ws.HelloWorld();
//textBoxResultado.Text = strOut;
MessageBox.Show(strOut);

What happens if you enter "http://192.168.56.106:9090" in the url of Internet Explorer on your Pocket PC?

nothing happens.
The network connection needs to be active?

192.xxx.xxx.xxx is part of your own network, not the web.
What is the webservice you wish to call? Where is it defined?

The webService is running on IIS. I can access it by pc browser or by a forms win app, but not by the windows mobile emulator. The application is deployed to the emulator via visual studio.

You have to configure the emulator to use your network.
From the emulator window itself, click on File -> Configure and click the network Tab. Check 'Host-only networking' and try that. If not, try adding 'Enable NE2000 adapter' and bind it to your network card.

It didn't work, i'm still getting the same error
"Could not establish connection to network."
I think the code is right
private void buttonResultado_Click(object sender, EventArgs e)
{
//Properties.Settings.Default["StreamWSTestClient_StreamingWS_Service1"] = "http://localhost:9090/";
//WindowMobileService service = new WindowMobileService();
//service = "
connecting.StreamWS ws = new connecting.StreamWS();
ws.Url = "http://mlourenco-pc:9090"; //url do serviço
string strOut = ws.HelloWorld();
//textBoxResultado.Text = strOut;
MessageBox.Show(strOut);
//textBoxResultado.Text = ws.Soma(Convert.ToInt32(textBox1.Text), Convert.ToInt32(textBox2.Text)).ToString();
}

Until you can get Internet Explorer on the emulator to display the IIS site you are wasting your time with any code at all.
Emupronet is the set up screen for the emulator.
NE2000 is the setup screen for the NE2000 adapter.
Localhost is the default under construction screen served by IIS from a default untouched website. The IP address is of the Host PC running IIS.
If the emulator's IE can't display a basic webpage served from your PC, webservices won't work either.
If your internet connection is served through a proxy, your PPC has to match, also you will have to set up the proxy details in code before it will work.

I can access internet but no IIS

Somewhat at a loss as to why it won't work. Works a treat on mine as can be seen in the post above.
Last resort, see if the emulator will work in a 'cradled' state.
From Device Emulator Manager, right click on the active emulation and select 'Cradle'. It should be preceded by a network cable icon.
You will need ActiveSync installed on the PC to be able to virtually 'cradle' it.

I already did it men, it was the f..... firewall
Thanks a lot for your help.
Now the next step is receiving a feed list and call wmp to play it, but not in web client.
Thanks

That explains it! In hindsight I should have spotted the fact you were using a different port number.
HTML goes through port :80 which is normally wide open. Non-standard port numbers are usually blocked by your firewall by default unless specifically defined.
Good luck!

Related

Recognising Wifi on WM5

Hello,
I've developed an application on WM4 that associates with 802.11 access-points and also establishes GPRS connections. Connections created with my app work just fine on PocketPC 2002 (WM4). When I ported to PocketPC 2005 (WM5) the application still creates the 802.11 and GPRS connections without error but the device will not recognise the 802.11 connection and always wants to create a connection using GPRS when I open IE or attempt any other IP connection. The only way around this that I've found is to put the phone into flight mode, but since my software is supposed to run on phones, that is not an option since users probably want to recieve calls while they browse. I've seen threads related to this on user forums but so far the only solution I've seen is to disable the phone.
Everything works just fine when WZC creates the 802.11 connection which leads me to believe that there's some IOCTL out there that tells the device to use the 802.11 connection.
Does anyone know the true magic to get around this?
litewoheat said:
Hello,
I've developed an application on WM4 that associates with 802.11 access-points and also establishes GPRS connections. Connections created with my app work just fine on PocketPC 2002 (WM4). When I ported to PocketPC 2005 (WM5) the application still creates the 802.11 and GPRS connections without error but the device will not recognise the 802.11 connection and always wants to create a connection using GPRS when I open IE or attempt any other IP connection. The only way around this that I've found is to put the phone into flight mode, but since my software is supposed to run on phones, that is not an option since users probably want to recieve calls while they browse. I've seen threads related to this on user forums but so far the only solution I've seen is to disable the phone.
Everything works just fine when WZC creates the 802.11 connection which leads me to believe that there's some IOCTL out there that tells the device to use the 802.11 connection.
Does anyone know the true magic to get around this?
Click to expand...
Click to collapse
Have you disable WZC ? If you disable the WZC of device, the Connection Manager can not detect the WiFi card and it use GPRS connection. IE use the service of Connection Manager for detect if a device is connected or no to internet.
WZC
WZC is disabled. With it enabled I cannot control the 802.11 device with NDISUIO.
litewoheat said:
WZC is disabled. With it enabled I cannot control the 802.11 device with NDISUIO.
Click to expand...
Click to collapse
Yes and no.
You can query and set OID value of 802.11 also if NDISUIO is locked by WZC.
IOCTL_NDISUIO_QUERY_OID_VALUE accept NDISUIO_QUERY_OID struct that in WinCE is present the ptcDeviceName variable. Set it with name of device and you can query OID value also if NDISUIO is locket by WZC.
You can select the access point with WZC and prefered network. The functions is WZCQueryInterface and WZCSetInterface.
Ciao Massimo
Really can't use WZC
Thanks for the informative reply. We'd like to turn WZC off for other reasons, mainly the notifications it displays when a new access point is in range. In places where there's metro wifi or just a large concentration of wifi access the notifications are extreeeeemly annoying when they constantly pop up(thanks Microsoft).
Is there a way to disable Connection Manager entirely so that it doesn't get in the way?
litewoheat said:
Thanks for the informative reply. We'd like to turn WZC off for other reasons, mainly the notifications it displays when a new access point is in range. In places where there's metro wifi or just a large concentration of wifi access the notifications are extreeeeemly annoying when they constantly pop up(thanks Microsoft).
Is there a way to disable Connection Manager entirely so that it doesn't get in the way?
Click to expand...
Click to collapse
For notification,you can simply disable from panel control->sound & notification.
For disable Connecion Manager, you must kill the process connmgr.exe with a task manager. Without connecion manager, the wifi remains enabled also you syncronize the device with activesync. The collateral effect is that IE don't work. The Connection Manager is a wrapper between applications and socket. Without CM, the applications can not establish a connection also is the device is effectively connected to network.
You can also disable WZC with DeactivateDevice API.
if I can give a suggestion to you, don't disable WZC or Connection Manager... the negative effect is more of positive effect. Try to use my prev solution.
I am developing a advanced manager of wireless with thie solution posted and work very well. I can select a my prefered AP, retrive RSSI and search SSID without disable WZC a CM.
Ciao Massimo
I'll give it a try, but...
OK, I think you've convinced me. Can I programatically disable the notifications? I can't really expect our users to do that.
litewoheat said:
OK, I think you've convinced me. Can I programatically disable the notifications? I can't really expect our users to do that.
Click to expand...
Click to collapse
For disable notifications edit the registry:
HKCU\ControlPanel\Notifications\{DDBD3B44-80B0-4b24-9DC4-839FEA6E559E}
and set
Options = 0
Ciao Massimo
How to link in wzcsapi.lib?
So I guess I'm not smart enough to figure out how to link in the library wzcsapi.lib. I'm using VS2005. I have Platform Builder so I do indeed have the correct files. I don't get a cannot file file linker error but I do get linker errors for every WZC function in my app. I tried the wzctool sample with the same outcome.
From what I can tell the wzcsapi.lib does have the exports I need but I just can't get VS2005 to link.
Is there some magic to use the WZC functions?
If you use Platform Builder, add into your catalog platform "Wireless LAN (802.11) STA - Automatic Configuration and 802.1x". After sysgen, you found wzcsapi.lib into $(_PROJECTROOT)\cesysgen\oak\lib\$(_CPUINDPATH)\ folder.
No using PB
I'm not using Platform Builder. I'm using VC2005.
Is there a solution for this issue
Using a dll without the correct lib file.
First my guess at the problem, and then a couple of questions.
Library files are compiler specific. The one you're using is for Platform Builder. Platform Builder's compiler probably differs from the one in VS2005.
Another way to use wzcsapi.dll is to link to it at run time using LoadLibrary and GetProcAddress like so
Code:
INTFS_KEY_TABLE GuidTable;
PINTFS_KEY_TABLE pGuidTable;
pGuidTable = &GuidTable;
HMODULE hMod = LoadLibrary (_T("wzcsapi.dll"));
if (hMod==NULL) {
_stprintf(buff, , ErrorCode);
MessageBox(NULL, _T("Failed to load wzcsapi.dll"), _T("ERROR"), MB_OK);
return;
}
_WZCEnumInterfaces pfnWZCEnumInterfaces = (_WZCEnumInterfaces) GetProcAddress (hMod, _T("WZCEnumInterfaces"));
if (pfnWZCEnumInterfaces == NULL) {
MessageBox(NULL, _T("Failed find function"), _T("ERROR"), MB_OK);
return;
}
DWORD ErrorCode = pfnWZCEnumInterfaces(NULL, pGuidTable);
if (ErrorCode!= ERROR_SUCCESS )
{
ErrorCode=GetLastError();
_stprintf(buff, _T("WZCEnumInterfaces Failed--error code %d"), ErrorCode);
MessageBox(NULL, buff, _T("ERROR"), MB_OK);
return;
}
Now for the question part .
How does a miniport driver originally tell the connection manager to consider using the miniport when making and IP connection?
Also, I'd like to be able to request 802.11 scans and set OID_802_11_BSSID to force association with a particular access point. Is this best done using CreateFile/DeviceIoControl or using the WZC funtions? I'll guess using DeviceIoControl, since it doesn't look possible using WZC functions? Can I do this with connection manager running? Anyone have sample code for getting/setting one of the OID_802_11 oid's?
Thanks,
SetoK
Thanks
SetoK

GUIDE - Bypass carrier's PROXY - Access SMTP/POP emails, Windows Live Messenger, etc!

Like many other people, my carrier filters all my GPRS through their HTTP Proxy.
- POP/SMTP email can't be polled
- Windows Live Messenger won't connect
- Streaming whatever is obviously impossible
- Whatever other network you want won't work
- All you can do is browse web pages and update RSS news
I wrote a very unpopular thread in the past about how to bypass your carrier's GPRS Proxy server
in order to access blocked ports for emails & other services. It was unpopular probably because
it only worked on a PC
http://forum.xda-developers.com/showthread.php?t=314757
Now I made it work ON your phone.
Basic Guide - This post
Tip to autoload everything once setup - Bottom of first post
Make a SSH server - Second Post
Setup your email settings - Third Post
~~~~~~STEP BY STEP GUIDE ~~~~~~~~~~
1 - Setup a SSH server to listen to port 443. Port 443 being opened to the internet OBVIOUSLy.
Linux users will have no issue with this.
However, Windows XP users need to install a SSH server, so please see my second post for how to do this.
2 - Download Pocketputty for your phone
3 - In your phone, go to: settings / system / About / Device ID (tab) | Write something unique, but in a single word, such as your username.
4 - Go in Settings / Connections / Connections / Advanced / Select Networks | Select "My Work Network" for both options.
It might not be named "My work Network" but it has to be the network which you can add a proxy server to the settings.
5 - Add your GPRS information for the "My Work Network".
6 - Go to "Edit my proxy server"
7 - Check the two boxes in proxy settings, then click on "Advanced"
HTTP : add your carrier's HTTP proxy address. Pocket IE cannot work any other way.
WAP : Useless (unless you NEED this working, add your carrier's proxy, or the same information SOCKS proxy under)
Secure WAP : useless
SOCKS : write your phone's "about" name from step 2, port is 1080
8 - Click Ok,Ok,Ok etc until you get back to "today"
9 - Load PocketPutty
TAB - Session
Hostname : your SSH server's external IP address
Port : 443
TAB - Tunnel
Source : 1080
Destination : (nothing)
Check circle "Dynamic"
Click Add (top right)
Go back to Tab - Session
Stored Session : proxy
Click Save
Click Cancel
10 - Use a registry editor & Edit the following Values (MAKE SURE IT IS DECIMAL VALUES)
HKEY_CURRENT_USER / SOFTWARE / SIMONTATHAM / PUTTY / SESSIONS / PROXY
LocalPortAcceptAll = 1
ProxyHost = (your cellphone carrier's HTTP proxy server)
ProxyPort = (Your cellphone carrier's HTTP Proxy server port, should be 80 or 8080)
ProxyMethod = 3
RemoteCommand = top
12 - Initiate a GPRS connection (Settings / Connections / Connections / Manage Existing Connections /
Select your GPRS connection, Tap & hold, click on connect)
13 - Load Putty
14 - Load settion "Proxy"
15 - Click Open & A black terminal window will appear
16 - go back to the "today" screen as soon as possible (it's the only way it will connect, while in the background,
I think it's a bug or something)
17 - Wait a few seconds, suddenly a window will appear asking you if you wish to save an encryption key. Click yes
(note : this will only happen on the first time you connect)
18 - Go back into Putty (DO NOT LOAD A NEW PUTTY WINDOW, use the task manager to bring back the ongoing session)
19 - It should ask your username then password, fill in the obvious information requirements.
20 - Once you are logged into your SSH server, type "top" and press enter, it will allow you to keep your connection alive.
21 - Go back to the "Today" screen and try loading Windows Live Messenger, for the first time, while using the proxy, it should connect!
~~~~~~TIP~~~~~
With Total Command, you can make a shortcut that will load putty and log you in AUTOMATICALLY
Find Putty.exe
Click on File, then >>>>>>>>>>>>> (A) >
Create Shortcut
Place it in \windows\start menu\programs\
Then browse to that folder with total command
find Putty.exe.ink
Tap/Hold and open properties
tab SHORTCUT
Assuming putty.exe is located in "\" write this in target:
\PUTTY.EXE" -load proxy -l yourusername -pw yourpassword
Then click on ok, tadaa, simply start up Putty fro that shortcut and go back to the today screen.
It will log you on automatically without your intervention.
You still need to initate a GPRS connection first though.
For running a SSH server in Windows
Part 1
1 - Download & Run http://www.cygwin.com/setup.exe
2 - Click - Install from the Internet / NEXT
3 - Root directory : c:\cygwin / NEXT
4 - Local Package Directory : c:\cygwin / NEXT
5 - Direct Connection / NEXT
6 - Select any download site / NEXT
7 - Click on "VIEW" on top right
8 - Click on the column title "Package" (to sort alphabetically) and find "Openssh: The OpenSSH server and client programs"
{
"lightbox_close": "Close",
"lightbox_next": "Next",
"lightbox_previous": "Previous",
"lightbox_error": "The requested content cannot be loaded. Please try again later.",
"lightbox_start_slideshow": "Start slideshow",
"lightbox_stop_slideshow": "Stop slideshow",
"lightbox_full_screen": "Full screen",
"lightbox_thumbnails": "Thumbnails",
"lightbox_download": "Download",
"lightbox_share": "Share",
"lightbox_zoom": "Zoom",
"lightbox_new_window": "New window",
"lightbox_toggle_sidebar": "Toggle sidebar"
}
9 - Click on Skip on the far left column, on that row.
http://img59.imageshack.us/img59/4001/sshdpackage2xp2.gif[/IMG}
10 - Repeat step 8 & 10 for packages tcp_wrappers, procps & zlib (might already be selected)
11 - Click NEXT & wait (about 40-50MB download)
12 - Click on Finish (check or uncheck Create Icon & Add Icon to your discretion)
Part 2
1 - Go to your Control panel, then go into System (This is in Windows XP, not cygwin)
2 - Click on "Advanced" tab, then click on Environment Variables at the bottom
3 - Under "System Variables" click on "New"
4 - Name = CYGWIN / Variable Value = ntsec tty CLICK OK
5 - Back into "Environment Variables", look for the variable "Path"
6 - Click on EDIT, then WRITE EXACTLY at the END of the line: ;C:\cygwin\bin
7 - Here is my complete value for example: %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\cygwin\bin
8 - Click OK,OK,OK etc until you get out completely of the Control Panel and System
Part 3
1 - Go in your C:\cygwin\ folder
2 - Double-click: cygwin.bat | You'll see this window appear (with your computer name instead of alk)
[IMG]http://img182.imageshack.us/img182/273/terminalki1.gif
3 - type "ssh-host-config" then press enter
4 - "privilege separation", answer yes (not just "y")
5 - "create local user sshd", answer yes
6 - "install sshd as a service", answer yes
7 - When the script stops and asks you for "CYGWIN=" your answer is ntsec tty
8 - Type "chmod 0777 /etc/shhd_config" and enter
9 - In Windows, go to the file C:\cygwin\etc\sshd_config
10 - Open it with NOTEPAD
11 - Where it says "Port 22", replace it so it says "Port 443" and save the changes
12 - Back in the terminal, type "chmod 0644 /etc/sshd_config" and enter
13 - type "net start sshd"
14 - It should say the SSHD service has started
15 - Test out your server by connecting to your server with putty
httpp://the.earth.li/~sgtatham/putty/latest/x86/putty.exe
16 - In putty, enter "127.0.0.1" as hostname and "443" as port, then click on "Open"
17 - It will ask you if you want to save the key, click "Yes"
18 - Enter your windows XP username, enter, then your XP password, enter.
19 - You should then see something like [email protected]:
20 - Success, you have a running SSH server for your phone to connect to.
Notice - Make sure that if your Windows machine is behind a router or firewall, that the port 443 is
forwarded to your computer. Otherwise, nobody on the internet would be able to connect to your
SSH server on port 443, including your phone.
POP/SMTP EMAIL SERVER ACCESS
Im going to write an example for using GMAIL. You can guess the rest for different services.
1 - Load your Proxy session, but dont connect yet.
2 - Go to the Tunnel tab
Local : 35553 (or any big unused port number)
Remote : pop.googlemail.com:993
Select "local"
Click add
Again
Local : 35554 (different from above)
Remote : smtp.googlemail.com:465
Click add
Go back to session and save the new settings
Now connect to your SSH server
Go to your Messaging
Add a new Email account
Email address : [email protected]
UNCHECK : Try to get your email settings directly from the internet
Select Provider : Internet Email
Fill everything yourself until "Incoming Mail Server"
Incoming mail server : alkizmotytn:35553 (that's MY PHONE's name, type in YOURS!!!)
Account type : pop3
Enter your gmail username & password
Outgoing Mail Server : alkizmotytn:35554 (dont be an idiot)
Check box : Outgoing server requires authentification
Click "Advanced Settings"
Check box : Require SSL for incoming
Check Box : Require SSL for outgoing
Network Connections : Work
It should be able to download/send emails now, while using Putty.
ok, so I can connect but when it does it says
Fatal error....
in the terminal it says
Bash: Top: Command not found
BTW! Thanks for this, If this works your my hero. If not well. Your still my hero. lol
Ohhh I know exactly what's wrong.
Here's how to fix it :
1 - Run "setup.exe" that you downloaded from cygwin
2 - Repeat the same steps of installation (you'll notice, it's taking your previous settings already)
3 - Find "Procps" package, click on "skip" just like you did with OpenSSH, Zlib, etc.
4 - Click next, and it will install "procps" on top of your SSH server.
5 - Reconnect, TOP will now work.
Here's WHY this happened
"top" command is a command that is sent automatically. It is added in Step 10.
"top" is ALWAYS part of a Linux system, but aparently not for the SSH server for windows.
I didnt think to check this since I run a small linux server.
now it should work
GOOD NEWS THOUGH : YOU HAVE PASSED THE HARDEST PART! TOP WAS A TINY ISSUE!!!
edit - I edited the SSH Server setup to include "procps" in the package installation list. I hope people read this thread. This is a major improvement for those stuck behind a HTTP proxy.
~~~~~~ TO RUN A SSH SERVER WITHOUT A COMPUTER ~~~~~~~
If you dont like the idea of running a PC 24/7 at home, you can turn your wireless router into a SSH server.
Look at the hardware list here
http://wiki.openwrt.org/TableOfHardware
If your router's model number and revision has "SUPPORTED" under status, you might just be in luck!!!
You can install a linux based firmware operating system on your wireless router. It will replace your router's OS completely with a MUCH MUCH more powerful one.
I recommend X-WRT since it is VERY userfriendly
http://x-wrt.org/
But OpenWRT is good for advanced linux users
http://wiki.openwrt.org/OpenWrtDocs/Installing
There's also DD-WRT for the complete n00b
http://www.dd-wrt.com/dd-wrtv2/index.php
All of them, once installed, have a SSH server right out of the box.
So your server is your router.
Thanks, I will try this.
alkizmo said:
~~~~~~ TO RUN A SSH SERVER WITHOUT A COMPUTER ~~~~~~~
If you dont like the idea of running a PC 24/7 at home, you can turn your wireless router into a SSH server.
Look at the hardware list here
http://wiki.openwrt.org/TableOfHardware
If your router's model number and revision has "SUPPORTED" under status, you might just be in luck!!!
You can install a linux based firmware operating system on your wireless router. It will replace your router's OS completely with a MUCH MUCH more powerful one.
I recommend X-WRT since it is VERY userfriendly
http://x-wrt.org/
But OpenWRT is good for advanced linux users
http://wiki.openwrt.org/OpenWrtDocs/Installing
There's also DD-WRT for the complete n00b
http://www.dd-wrt.com/dd-wrtv2/index.php
All of them, once installed, have a SSH server right out of the box.
So your server is your router.
Click to expand...
Click to collapse
If I remember correctly there are FON routers on Ebay for dirt cheap that can use this DWRT thingy.
cd85233 said:
Thanks, I will try this.
If I remember correctly there are FON routers on Ebay for dirt cheap that can use this DWRT thingy.
Click to expand...
Click to collapse
I'd recommend a Linksys WRT54GL if you are going to dish out the cash for a new router. Might as well buy a POWERFUL router. The WRT54GL can be overclocked to 250mhz (mine runs at 262mhz stable) and you can mod it to add a flash SD card to it to expand the memory to install OTHER applications.
You can run a small HTTP server with 1-2GB of storage with the SD mod.
I run an Asterisk VoIP server + HTTP + the SSH tunnel thing + router can become a relay access point (the router is a WIFI CLIENT!!) and a bunch of other linux applications.
WRT54G and WRT54GS are good too, but you need to find an older revision number.
FON routers are... meh...
edit - Im out for the night, Ill check back in the morning for questions and problems.
PLEASE READ!!!!
I forgot a VERY important registry setting for PocketPutty in Step 10
LocalPortAcceptAll = 1
VERY IMPORTANT!!!! ok?
sorry for the mistakes
Me no Likey SSH
Hmm SSH server has given me lots of trouble. I think I would rather use an HTTP proxy if this made things work.
Nothing really works, and my internet connection is messed up when I use the SSH server.
I won't give up though. THIS IS A GREAT GUIDE.
If this is the way to kick T-Mo's Butt, I'm going to drive this into the ground!
Please try this, and post your results.
Alkizmo and I will hopefully get time to get this to work.
More Alkizmo than I, I'll be the guinea pig
almost working... help please ^^
Alkizmo thanks for the great guide!
I got almost everything to work.. but I guess there's something still missing..
Pocketputty correctly connects to the SSH server with the correct tunnel settings (checked many times). Registry settings for Pocketputty are set correctly as well (also checked..). By the way, Pocketputty doesn't seem to know how to start EDGE/GPRS connection on demand, so I either manually connect, or start Opera browser and go to a random website to start the connection.
The proxy settings changed under the T-Mobile Data network, with HTTP proxy pointing to the T-Mobile well-known proxy server, and the SOCKS proxy (tried both SOCKS4 and SOCKS5) pointing to the localhost:1080 (tried 127.0.0.1, tried the id of the phone).
No luck... Windows Live Messenger still cannot connect.
Let's try to find out the missing piece!
Thank you!
p.s. using AT&T Tilt, with Dutty's hybrid ROM.
sorry for the late reply. It's been a while since i've roamed these forums.
So, you should try the SSH tunnel on another computer with the PC version of Putty and see if you can tunnel through sock4, so you can eliminate the server as a fault.
Second, you can do another test to see if it's pocketputty's fault or T-Mobile's proxy being very strange.
You test it by changing pocketputty's proxy settings to be very specific with a pop3 email server as explained in the guide. Then create a pop3 email account on your phone to connect through the pocketputty proxy.
If that doesnt work, then im thinking that there's something else at work to prevent you from tunneling. I had someone else with t-mobile that couldnt SSH tunnel for some reason.
I found your MISTAKE mmoroz!
You enter in the SOCKS proxy - localhost:1080
however, as specified in the step #3, you have to first give a unique ID name to your phone. Name it : mmoroz
Settings / System / About / Device ID / Device Name : mmoroz
THEN in SOCKS proxy, you enter - mmoroz:1080
WM5/6 dont seem to understand localhost or 127.0.0.1, that's why you got to specify your phone's Device ID as the localhost address.
windows live mail on windows mobile
Does windows live mail (hotmail) works with this method? The instruction looks complicated, but I'm willing to do it if it works with live mail with push feature. By the way, do I need static ip address for the server?
Thank a lot! This is a great guide!
navy2010 said:
Does windows live mail (hotmail) works with this method? The instruction looks complicated, but I'm willing to do it if it works with live mail with push feature. By the way, do I need static ip address for the server?
Thank a lot! This is a great guide!
Click to expand...
Click to collapse
Hotmail push email will work. The moment you're connected to messenger, all the other services will follow.
You dont need a static IP, but you'd need to have a system to either update your DNS address with your new IP every time, or manually change it yourself.
I got a dynamic IP, but since im on broadband, the connection is active all the time, so my IP pretty much never changes.
alkizmo said:
Hotmail push email will work. The moment you're connected to messenger, all the other services will follow.
Click to expand...
Click to collapse
Thanks A LOT! I'm working hard to get this work (no xbox for past 48 hrs). I'm using dd-wrt router to do the SSH server, but i have to change my verizon router to bridge mode first & i'm still trying to change it. Anyway, i will keep you update w/ my progress.
Guys, I STRONGLY recommend you setup a TEMPORARY SSH server before making all this effort to setup a permanent one. You can do this on your computer directly connected to the internet.
You should TEST with your phone BEFORE making a permanent server. That way, if your carrier blocks something special prevent SSH access, then you wouldn't have wasted your time setting up the server.
problems!
Hi,
I set up a SSH server on my Buffalo router with DD-WRT firmware. Instead of just use password, I used a private key for SSH server authorization. I did load/save the private on to the client on my phone. I got this error msg. on my phone when I try to connect to the SSH server.
PuTTY Fatal Error
"Server unexpectedly closed network connection"
I check the firewall log on the router, it confirmed that it accepted the connection from my phone. I did double check the IP address of the phone and confirmed that it's the same IP address from log:
Source IP------Protocol------Destination Port Number-----Rule
66.94.XX.XX------TCP ---------------------https------Accepted
By the way, I'm using T-Mobile USA service. Please see the attached picture for the SSH setting on my router (I did exactly as show on the picture, but I copied the pic from the web). I also enabled SSH remove management on my router.
I have been reading a lot of information regarding SSH. I can't figure out the problems yet. Please offer any suggestions.
alkizmo said:
~~~~~~ TO RUN A SSH SERVER WITHOUT A COMPUTER ~~~~~~~
If you dont like the idea of running a PC 24/7 at home, you can turn your wireless router into a SSH server.
Click to expand...
Click to collapse
I wouldn't suggest leaving any router, whether it be DD-WRT, OpenWRT or etc... open to SSH for an extended period of time... you're going to open up a bad can of worms security-wise. It's cool to do it for a short amount of time for testing, but when your done... close the hole and shut it down
navy2010 said:
Hi,
I set up a SSH server on my Buffalo router with DD-WRT firmware. Instead of just use password, I used a private key for SSH server authorization. I did load/save the private on to the client on my phone. I got this error msg. on my phone when I try to connect to the SSH server.
PuTTY Fatal Error
"Server unexpectedly closed network connection"
I check the firewall log on the router, it confirmed that it accepted the connection from my phone. I did double check the IP address of the phone and confirmed that it's the same IP address from log:
Source IP------Protocol------Destination Port Number-----Rule
66.94.XX.XX------TCP ---------------------https------Accepted
By the way, I'm using T-Mobile USA service. Please see the attached picture for the SSH setting on my router (I did exactly as show on the picture, but I copied the pic from the web). I also enabled SSH remove management on my router.
I have been reading a lot of information regarding SSH. I can't figure out the problems yet. Please offer any suggestions.
Click to expand...
Click to collapse
You're not using port 443. You need to use port 443, that's one of the only ports opened by the T-Mobile proxy.
Also, im not sure if SSHD will work with my trick. I only tested with SSH
seattleweb said:
I wouldn't suggest leaving any router, whether it be DD-WRT, OpenWRT or etc... open to SSH for an extended period of time... you're going to open up a bad can of worms security-wise. It's cool to do it for a short amount of time for testing, but when your done... close the hole and shut it down
Click to expand...
Click to collapse
Make the password extra extra long and block your router from responding to ping requests and you'll be fine. SSH is a very very very secure protocol.

unable to sync over gprs - wifi works fine

Unable to activesync over GPRS WiFi works fine
Bookmark:
Question: I have been having problems with our PDA's since Friday. We have SBS 2003 and all our PDA's are unable to activesync via GPRS.
When i connect the PDA's up to a WIFI connection they are able to activesync using that internet connection however when i try to sync using GPRS it gives the error code - 0x80072f78.
I am also unable to reach the URL via the internet explorer on the mobile phone - i.e. Http://server1/exchange unless i use the wifi connection.
I have narrowed it down to a possible carrier block however i have tried it on 3 different networks and all give the same errors? I have searched high and wide on the net and have removed the proxy from the Tytn II GPRS connection. My carrier is Orange UK.
The PDA's have been working effortlessly for the past 2years and on Friday something happened that has stopped any GPRS activesync nothing has change on our network!!!
Please help!!
Thanks
also i am unable to access OMA by visiting http://server/oma
that brings up this error
The PDA's on our network have been unable to sync OTA for 4 days now, it happened overnight and everything was working fine. When i try to access http://server1/OMA i receive the following error. Can anyone decipher what the problem is please??? I cant understand any of it !
Server Error in '/OMA' Application.
Collection was modified; enumeration operation may not execute.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.InvalidOperationException: Collection was modified; enumeration operation may not execute.
Source Error:
The source code that generated this unhandled exception can only be shown when compiled in debug mode. To enable this, please follow one of the below steps, then request the URL:
1. Add a "Debug=true" directive at the top of the file that generated the error. Example:
<%@ Page Language="C#" Debug="true" %>
or:
2) Add the following section to the configuration file of your application:
<configuration>
<system.web>
<compilation debug="true"/>
</system.web>
</configuration>
Note that this second technique will cause all files within a given application to be compiled in debug mode. The first technique will cause only that particular file to be compiled in debug mode.
Important: Running applications in debug mode does incur a memory/performance overhead. You should make sure that an application has debugging disabled before deploying into production scenario.
Stack Trace:
[InvalidOperationException: Collection was modified; enumeration operation may not execute.]
System.Collections.ArrayListEnumeratorSimple.MoveNext() +2833870
Microsoft.Exchange.OMA.Tracing.OmaTrace.set_DebugOutputTracing(Boolean value) +167
Microsoft.Exchange.OMA.UserInterface.Global..ctor() +262
ASP.global_asax..ctor() +5
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeTypeHandle.CreateInstance(RuntimeType type, Boolean publicOnly, Boolean noCheck, Boolean& canBeCached, RuntimeMethodHandle& ctor, Boolean& bNeedSecurityCheck) +0
System.RuntimeType.CreateInstanceSlow(Boolean publicOnly, Boolean fillCache) +103
System.RuntimeType.CreateInstanceImpl(Boolean publicOnly, Boolean skipVisibilityChecks, Boolean fillCache) +268
System.Activator.CreateInstance(Type type, Boolean nonPublic) +66
System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +1036
System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes) +114
System.Web.HttpApplicationFactory.GetNormalApplicationInstance(HttpContext context) +200
System.Web.HttpApplicationFactory.GetApplicationInstance(HttpContext context) +114
System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr) +350
ok for some reason ASP.NET had changed to V2 so i set it back to 1.x and i can now visit the OMA site on the server.. My PDA's are still giving the 0x80072F78 error when i try to synchronise to it though!

CompactDDNS - DynDNS

Hi,
I have found a really nice new program:
http://www.codeproject.com/KB/mobile/CompactDynDNS.aspx
It allows dynmic DNS Updates. So far so good, it is working very well on my Kaiser.
This tool also includes a VNCServer for WindowsMobile .
Although I get an IP from my provider for my "domain" (but I get no response with a ping !), I am not able to make a connection to my phone.
Unfortunately, the VNCServer does not create any log.
Requirements:
To use CompactDDNS, you will need:
* A DynDNS account and at least one host created
* (Free for up to 5 hosts)
* A Pocket PC phone with WM5 or WM6
* (Might work with PPC2003)
* A 3G/GPRS enabled SIM card with a ‘Public IP’
* Visual Studio 2005 with the relevant Pocket PC SDK
What does ‘Public IP’ really mean ?
Regards
kuzco1
kuzco1 said:
What does ‘Public IP’ really mean ?
Click to expand...
Click to collapse
I'm sure it means what it says - that the phone receives a public (non-internal network) IP so that the whole reason for this software works...
Some phone service providers will use a private (non-routable) IP for the phones on their network if they use proxy access... An IP in the following ranges is usually considered non-routable:
10.0.0.0/8
127.0.0.0/8
169.254.0.0/16
172.16.0.0/16
192.168.0.0/24
(these are off the top of my head, so I don't remember if I got the CIDRs correct)
If your service provider gives you one of these internal IPs, then using the DynDNS won't do any good since the IP will be wrong... And if it does detect the proper external IP, it will be of the routers or proxy server used by the carrier. And then, of course, using the VNC software won't work, either... There won't be a way to connect to it.
mcw said:
I'm sure it means what it says - that the phone receives a public (non-internal network) IP so that the whole reason for this software works...
Some phone service providers will use a private (non-routable) IP for the phones on their network if they use proxy access... An IP in the following ranges is usually considered non-routable:
10.0.0.0/8
127.0.0.0/8
169.254.0.0/16
172.16.0.0/16
192.168.0.0/24
(these are off the top of my head, so I don't remember if I got the CIDRs correct)
If your service provider gives you one of these internal IPs, then using the DynDNS won't do any good since the IP will be wrong... And if it does detect the proper external IP, it will be of the routers or proxy server used by the carrier. And then, of course, using the VNC software won't work, either... There won't be a way to connect to it.
Click to expand...
Click to collapse
Ok, sounds clear. I thought the same,but ....
I get normaly an IP i.e. 90.186.x.x or 77.24.x.x - so they are public.
Unfortunaltey I can not ping this IP (I have no FW on my movile) or get a connection via VNC.
It is possible that the provider can deny ping or remote connection?
Regards
kuzco
Go to a website like http://www.whatismyip.com/ and see if the IP it gives you is the same as what you get on the phone.
If it is, then you have a public one. If not then you are being proxied/NATed.
Now, companies can either completely or selectively block ICMP traffic to their networks quite easily via their gateway/firewall.
Will this only work with GSM phones req. "3G/GPRS enabled SIM card with a ‘Public IP’ "?
Why?
Can't you get a public ip from 3g cdma?

Socket Connection over Internet

Hi,
I want to create a Socket Connection over the Internet:
On my Android Device I´ve opened a Socket Server:
Code:
ServerSocket ss = new ServerSocket(4711);
Log.i("Tcp Example", "Start Socket ");
while(!end){
//Server is waiting for client here, if needed
Log.i("Tcp Example", "Wait for client: ");
Socket s = ss.accept();
Log.i("Tcp Example", "Client acceptet");
BufferedReader input = new BufferedReader(new InputStreamReader(s.getInputStream()));
PrintWriter output = new PrintWriter(s.getOutputStream(),true); //Autoflush
String st = input.readLine();
Log.i("Tcp Example", "From client: "+st);
...
...
And for Tests I´ve created a Socket Client in Java:
Code:
Main() throws IOException{
System.out.println("... verbinde!");
client = new Socket (serverName, port);
System.out.println("... success!");
out = new BufferedWriter(new OutputStreamWriter(client.getOutputStream()));
System.out.println("... out!");
in = new BufferedReader(new InputStreamReader(client.getInputStream()));
System.out.println("... int!");
sendData("TTTESSSTTT");
}
// Sendet Daten an den Server
public void sendData(String outgoing) throws IOException{
out.write(outgoing);
out.newLine();
out.flush();
}
This works finde when I´m in my local Network @ Home, but I want to connected to the Server over the Internet (with a Web Interface - PHP), so I get my Mobile IP Adress von here http://www.whatsmyip.org/, start the Server and want to connect with the Cliebt to this IPAdress, but nothing happens.
Is it even possible or what am I doing wrong?
Thanks!
IceTi said:
Hi,
I want to create a Socket Connection over the Internet:
On my Android Device I´ve opened a Socket Server:
Code:
ServerSocket ss = new ServerSocket(4711);
Log.i("Tcp Example", "Start Socket ");
while(!end){
//Server is waiting for client here, if needed
Log.i("Tcp Example", "Wait for client: ");
Socket s = ss.accept();
Log.i("Tcp Example", "Client acceptet");
BufferedReader input = new BufferedReader(new InputStreamReader(s.getInputStream()));
PrintWriter output = new PrintWriter(s.getOutputStream(),true); //Autoflush
String st = input.readLine();
Log.i("Tcp Example", "From client: "+st);
...
...
And for Tests I´ve created a Socket Client in Java:
Code:
Main() throws IOException{
System.out.println("... verbinde!");
client = new Socket (serverName, port);
System.out.println("... success!");
out = new BufferedWriter(new OutputStreamWriter(client.getOutputStream()));
System.out.println("... out!");
in = new BufferedReader(new InputStreamReader(client.getInputStream()));
System.out.println("... int!");
sendData("TTTESSSTTT");
}
// Sendet Daten an den Server
public void sendData(String outgoing) throws IOException{
out.write(outgoing);
out.newLine();
out.flush();
}
This works finde when I´m in my local Network @ Home, but I want to connected to the Server over the Internet (with a Web Interface - PHP), so I get my Mobile IP Adress von here http://www.whatsmyip.org/, start the Server and want to connect with the Cliebt to this IPAdress, but nothing happens.
Is it even possible or what am I doing wrong?
Thanks!
Click to expand...
Click to collapse
Ain't gonna happen. Your android gets a private IP (normally 10.x.x.x) which by internet standards cannot be seen outside the local network. You can get around this on home computers by setting up port forwarding and such on your router (which you could do if your phone is on wifi and you have access to the router--i.e. your home access point), but I doubt that the phone company is going to let you forward ports on the router at their local switch.
Gene Poole said:
Ain't gonna happen. Your android gets a private IP (normally 10.x.x.x) which by internet standards cannot be seen outside the local network. You can get around this on home computers by setting up port forwarding and such on your router (which you could do if your phone is on wifi and you have access to the router--i.e. your home access point), but I doubt that the phone company is going to let you forward ports on the router at their local switch.
Click to expand...
Click to collapse
Yes I gete a private (internal) IP but I also get an external IP.
This external IP is indeed addressed by for ex. a webiste or something like this. The website also send Data direct over the internet to my phone... so why is it not possible to send data from MY website to direct my appilication?
Because that IP you see in "whatsmyip.com" is shared by any number of devices. How would the router know that you're running a server on a particular port and to redirect any traffic to that port to your device and your device only?
This is basic TCP/IP, and beyond the scope of this forum. Look it up if you want more info.
Hmmm, I think I´m confussed now
How do other Apps a Client/Server Communication for Example "Whats App".
Well, I want to create a Website which allows me to send Data to my Phone. The Server is started on the Phone and the Website connects to it or the other way?!
Because that IP you see in "whatsmyip.com" is shared by any number of devices. How would the router know that you're running a server on a particular port and to redirect any traffic to that port to your device and your device only?
Click to expand...
Click to collapse
I think this is not right.. for the moment this IP is just for MY Device...
IceTi said:
Hmmm, I think I´m confussed now
How do other Apps a Client/Server Communication for Example "Whats App".
Well, I want to create a Website which allows me to send Data to my Phone. The Server is started on the Phone and the Website connects to it or the other way?!
I think this is not right.. for the moment this IP is just for MY Device...
Click to expand...
Click to collapse
Not to belabor this too much more, but as a for instance, do you have a broadband connection at home? How many computers are connected to it? Run whatsmyip.com on all of them and tell me what you get. Try running a server on one of those computers and connecting from some arbitrary client on the internet. What happens? It's more or less the same with your phone. The details differ depending on the carrier, etc. but essentially all the phones on a given node are going to have a common router at the switch and that's the IP you see at whatsmyip.com. The router uses NAT to allow clients on the private network to connect to servers on the internet, but NAT doesn't work the other way (without explicitly enabling certain ports to certain machines in the routing tables of the router itself). It's possible that you are the only phone on the network node at some given time, but not the norm and even if you are the only one for some reason, the node router isn't going to treat your phone any differently.

Categories

Resources