Category Archives: mobile devices

mobile devices technical

Displaying your windows mobile device on a bigger screen via VNC

Some time ago I was tasked with creating some training sessions for staff using smartphones running WM6. So I could both record procedures from the smartphone using a flash-video creation software, and demo things on a big screen live in front of the class, I setup my phone with VNC which allowed me to do both.

I needed to create and deliver several training sessions for PDAs covering the following topics:

  • Connection to the wireless network and config of proxies etc for internet access
  • Synching with the exchange server and related calendaring and email
  • Transferring files back and forth to the device

As well as a few other items which came up on the day.

You’ll need a VNC server (not client) on the windows mobile device. I ended up downloading Pocket VNC Server and running that, with a regular VNC client connection from the laptop.

Once the service is running you have to figure out which IP each device is listening on, then initiate a client vnc connection from the PC to the mobile device. After this you can use the PDA and the PC  (eg projector or big screen) will display what is happening on the PDA in a window, which can be recorded or screenshot as required.

There are two ways to get a VNC session to the PDA – either via an activesync connection (I used a USB cable, possibly you could use ActiveSync via bluetooth if you’re adventurous), or via a local wireless LAN. I wasted a lot of time trying to setup a Bluetooth PAN (Personal Area Network) between my laptop and the PDA so I could connect via a small private subnet, but couldn’t get it working. <rant>I remain convinced that most of bluetooth networking is junk and not yet much good for enterprise use</rant>.

Option 1: Activesync (Cabled)

Activesync is actually the easiest way to get an IP connection. It wasn’t documented anywhere obvious, but once you have an activesync connection established, the two devices (host PC/laptop, PDA) should have the following IPs:

  • – Host PC
  • – PDA

As long as you’re not going to be messing with the activesync connection and don’t want to walk around or move far from the PC, this is fine to use. Its actually preferable in that you’re not at the mercy of a wireless connection for your presentation. Having the wireless drop out or go flaky when you’re trying to demonstrate something to a room full of people is not what you want.

Option 2: Wireless

This method could be used either in AP or ad-hoc config. As there was a good wireless signal from one of our campus access points in the room, I went with the AP option. I also allowed each device to DHCP an address: somewhat risky in case the leases changed for some reason but it worked out ok. A more leak-proof method would have been to hardwire the IP’s to something static while still using the wireless network.

I used a well known freeware tool called VXUtil to determine the ip address of my PDA to use for connection to the VNC server.

Pros: You can walk around the room, you can demonstrate the full range of exchange/activesync settings, you can demonstrate internet connectivity. (I’ve demo’d google earth on the pda on a big screen via this method – it can be a bit of a slideshow over VNC, but it gets the point across).

Cons: Wireless can have random connection issues. You cant demonstrate setup of a wireless connection on the PDA since its already using one. Even if your setup doesn’t involve disabling and re-enabling wireless, You’ll probably end up disconnecting yourself anyway. (Windows mobile networking is fun like that).

Option 3: Both Wireless and Activesync, or: Heres one we prepared earlier.

To get this done, You can use any live screen recording software, or even take screenshots of the steps in your demo. I used an app for windows (camtasia) since we had a license for it, but there are likely suitable programs for linux as well (provided you can get your networking going with or without activesync).

Pros: Its rock solid. Networking is taken out of the picture so you shouldn’t have a problem.

Cons: You have to have it all pre-prepared, if you want to deviate from the prepared material you have to augment your presentation with either option 1 or 2.

That’s about it. Get the VPN server installed, get some form of networking up, connect to it from the PC, and you’re good. Its a little slow but a lot better than trying to get a room full of people to see what’s going on by holding your 320×240 PDA screen above your head…

mobile devices sysadmin technical

Windows Mobile 5/6 Networking Profiles, Proxy and VPN setup

After the last rant on Windows Mobile networking, I’ll go over a few actual solutions to the issues I encountered: hopefully a few people may find this more helpful.

Note that the following explanations, definitions of features and so on are the product of my own observation and experimentation with various WM5 and WM6 mobile devices. I have found some documentation on their functions but the majority of information I have discovered through trial and error. If there is some official documentation somewhere which contradicts what I say here (and I wouldn’t be at all surprised) then so be it: what I can say for sure is mine works.

That said, Windows Mobile networking is in my experience notoriously flaky and even though the stuff here works for my device, your mileage may vary considerably.

Ok, lets get into it.

Golden rule: Anytime you change anything at all in the networking profiles, after you have saved the changes, disable and re-enable the wireless network/adapter. I have a control utility for this on my device – (HTC Hermes) – but this will vary between devices. Following this step  every time I change anything has reduced my frustrations considerably – not doing this means settings often just don’t take effect, and after doing this sometimes things just start working.

A quick explanation of terms I’ve used:

  • “Config Profiles” refer to the named settings you can create and assign to different networks in “Network Management” (Start -> Settings -> Connections -> Connections -> Advanced -> Select Networks) – Some of the existing config profiles are ‘My ISP” and “My Workplace” (and you will have others automatically created for your ISP if you have mobile internet access on your SIM card via a 3G or GPRS network).

Explanation of how WM decides which network to use (And hence which attached config profile is used to decide how to connect)

Windows mobile networking is whack (but you knew that already, right?). Here’s how it breaks down: It decides how to handle a http network request based on whether there are any decimals (periods) in the dns name.

By its logic, anything with a decimal/period is ‘internet’ and anything without a decimal/period is ‘work’.


  1. http://bogus.internal” is handled with the config profile attached to the“Internet” network
  2. http://bogus” is handled with the config profile attached to the“Private Network” network

You can create multiple different named config profiles and assign any of them to either “Internet” or “Private Network”.

An important thing to note is, a config cannot have a VPN server added to it (or use an already setup VPN) when applied to the ‘Internet’ network. If you want to use a VPN you’ll have to do it through the ‘Work’ network (see exceptions hint below).

Explanation of the ‘Exceptions’ settings.

Now – anything in the ‘Exceptions’ list goes through the “My Work” profile regardless of whether the dns name has decimals in it to not. The good news is you can use wildcards here to force a wide range of sites through the ‘My Work’ profile if you want – hint: http:/*.* and https://*.* . I didn’t end up using this for my solution, but you might find it useful.

I’m sure this flavor of networking makes sense to some software engineer in Microsoft land, but to me it just spells confusion. Once I worked out what was actually going on, I figured out some shortcuts/config hacks which can be used to railroad the networking into doing more or less what you tell it to.

So here’s what I’ve done to make mine work:

First, I access everything using its FQDN – no dotless machinename shortcuts. This makes sure everything is using the profile assigned to “Internet” (regardless of whether I’m on a work network or not).

Make sure the ‘Exceptions’ section has no entries.

Next, tell windows mobile that every wireless network you connect to is “The Internet”. Forget about the “Work” option . As far as my usage goes, that option is useless. All the wireless networks I connect to are set to “Internet”. If you have already added a wireless network and don’t know if its tagged to “Work” or “Internet, you can go into settings -> wireless networks, find existing networks, and change which network it connects to.

Next, create a couple of new custom network configs, as follows:

  • ‘Direct Connection’ – this does as it says, and contains no settings for proxy or vpn.
  • ‘Proxy Connection’ – this has my work proxy server entered

You do this via Settings –> connections (tab) –> connections (icon) –> Advanced (tab), Select Networks (button). Here you can edit existing or create new config profiles.

Incidentally, my workplace uses VPNs to grant authenticated access to the wireless network – so not allowing a VPN connection to a host on a “private network” just breaks everything.

Once you’ve done that and entered your proxy authentication credentials in the appropriate places, you’re ready to go. Whenever you want to change how you’re connecting to the net go to network settings, and change “internet” to one of your created profiles. Remember to start/stop the wireless to force the change, and your next network access should be using either direct, proxy, (or VPN – see below), whichever you’ve chosen.

By doing this you lose any pretense of windows Mobile networking transparently working from whichever location / network you are connected to, but it never worked properly for me anyway, and at least this way you have some control back.

Connecting to a VPN

The above covered getting web access only, either direct or via a proxy. To get a VPN connection active (eg for skype and the like) heres what you have to do instead:

  1. Assign a config profile to the ‘work’ network
  2. Add a VPN connection to the config profile you used. You can add VPN connections to a config profile by assigning it to to the “Internet” connection, hitting OK, going back to the ‘Tasks’ tab and clicking the ‘Add a new VPN server connection’.
  3. Add the appropriate wildcard exceptions (to the ‘exceptions’ section) to trigger the VPN connection for every hostname.

Once I get a VPN up at my work from inside the wireless I can make direct connections to outside hosts, for example using PocketPutty. Be warned though that even if it does connect, Windows Mobile likes to shut down the VPN connection once it decides it is no longer in use, eg after you haven’t looked at web pages for a while, regardless of whatever else you are doing on the network, (say in a live SSH session). Parking pocket IE on a web page with an auto-refresh might possibly fool it into keeping the VPN alive, but I haven’t experimented with that yet.

Hopefully there is some useful info in here and it eases the pain of getting your mobile device networking in a saner fashion.

This is a fairly quick covering of networking with WM5/6 and its highly likely there are holes, inaccuracies and/or bits left out:  If anyone has queries, corrections or extra to add, go ahead and comment or hit up the contact form for direct email.

mobile devices rant sysadmin technical

A hall of mirrors: configuring Windows Mobile Networking and the gremlins therein

The time is apon me for a bit of a rant about Windows Mobile, specifically with regards to its approach to networking profiles. I’ve been spoiling for a write up on the topic for a while: ever since the PocketPC days, networking on PDAs with windows O/S has been, at least for this techie, a giant pain in the ass.

It should be noted that most of this gripe is based on experiences with Pocket PC 2003 and its predecessors. WM5 and WM6 are recent additions to the fold for me, and a number of the mentioned issues seem to be, if not solved, at least partially smoothed over.

So far, so far the strongest argument I’ve yet encountered for blowing Windows Mobile away in favor of some flavor of embedded linux is the WM implementation of networking. A real shame because aside from that, WM more or less seems to get it right – decent information management, desktop / remote email sync (when you can get past the networking hurdles), and with third party tools, enough access to the internals to keep a techie happy. Except the networking interface.

Windows mobile networking has generally confused me. As a network admin, I’ve dealt with plenty of odd setups, but Windows Mobile truly does take the cake. After a few hours of mind games you’ll likely be begging for a simple ‘do what your told’ setup as opposed to the ‘second guess you because we know better’ philosophy that WM6 seems to adopt.

I have messed around with these devices for longer than I should admit. Many a time I’ve had everything working – for a while. Then it stops, develops amnesia, stumbles about disoriented. Losing wireless has the device utterly, and inexplicably confused, and too often for happenstance a hard reset will get things going again – with the exact same config.

Indeed, there seems to be a new definition of logic when it comes to how networking should function, and often a setting will seem to have no effect, or the result will be inconsistent. It will work for a while then stop. One application will work fine, but another will not. Changing a seemingly unrelated networking parameter has ramifications: things start working in an unexpected fashion or not at all.

The approach seems to be akin to a puzzle game with a random element as opposed to a tool designed to achieve an outcome. Sometimes it will work, sometimes will not. The same inputs to the black box will not always render the same output.

Now I’ve had a bit of a dubiously qualified rave, making vague accusations and pointing my finger about the place at indistinct phantoms, here are some actual specifics I have encountered.

Most, if not all of the headaches come from the implementation of multiple networking profiles – “My Work”, and “The Internet”. Now this multiple config setup could have been cool, if they hadn’t crippled them both in subtle and painful ways. Setting them up in seemingly logical configs does not work (ie you expect to connect to a network, access that network through a proxy if specified, access it directly if not).

After many many hours of trial and error I found some answers on the net which pretty much confirmed there wasn’t much to be done except half baked workarounds. I’ll outline the situation briefly; Its been a while since I struggled with them properly, but heres the gist:

  • Options for the different networking areas are buried, entwined, and otherwise concealed within layers of subterfuge – idiosyncratic ways to get to oddly named tabs and mislabeled options, labels and check boxes. I can only assume this is to prevent joe businessman getting into the settings to mess them up, but they do equally well at confusing IT techs who expect some kind of consistency with other configuration standards. I’ve been hoping since the pocket PC days that they would throw all this out and start again, but sadly WM6 seems to have retained most of it.
  • “My Work” traffic is defined by the device as any server accessed without a period-delimited dns entry. Whaa… So ‘ourmailserver’ would be accessed through whatever the ‘My Work” profile uses, but ‘ourmailserver.internaldomain’ won’t be. You don’t get an option to change this. Also, its not specified or appear to be documented anywhere obvious on the device.
  • To get to the internet via a connection associated with the ‘My Work’ profile, you must have a proxy server entered. You do not get a choice. No proxy, no internet, regardless of whether you happen to have direct access or not.
  • You can specify a list of addresses NOT to use the proxy/internet profile for. (Exceptions). This seemed to be a workaround to get access to the net via VPN from the wireless network on campus (see below).
  • Activesyncing the device with a PC seems to arbitrarily replace the proxy settings on the device with the proxy settings of IE from the PC being synched. It took me a while to figure out this is why my old bosses settings would work for a while on his GPRS plan (which uses a proxy server on the ISP’s network), then die (after he docked his pda and the settings were replaced).
  • VPN-ing only seemed to be allowed through an ‘internet’ connection. (this might have changed in WM6 – except… well see the next point). In WM5 The device assumes you will never be connecting to a VPN from the ‘My Work’ network. Wrong in our case, as we connect to a VPN internally when using wireless – 99% of how the PDA works. To get this working, the wildcard exceptions workaround needed to be used.
  • VPN in WM6 – what VPN? It doesnt work. Sets up fine, then never offers to connect, and attempts to connect manually fail silently. Less than ideal. Fortuantely re-jigging the new devices to use our internal proxy seems to work for most functionality.
  • Pocket IE is hardwired to obey the O/S proxy settings. Often I was unable to access web pages because of some internal device proxy confusion based in the proxy settings (third party tools would show clean pings and connections possible to the proxy server and / or the destination server). It is notable that I could often get pocket mozilla (minimo) and pocket opera to load pages when pocket IE would not.
  • Pocket MSN seems very sensitive to proxy settings. I have only ever had it working when the device has a direct connection to the net, wither via activesyncing to a PC which has a direct connection, or using GPRS.

Complaining like this smacks of heresay, because its hard to be specific about just where and in what manner things are broken. The place is like a wall of mirrors – and the diatribe sounds like someone ranting on without qualification. It sounds like the ravings of a lunatic, of a n00b, of a crazy man.

In truth, a lot of the complaints I have had seem vapous unless you’ve experienced them yourself. I know – I know these problems exist because I’ve sat for hours struggling with the damn things, and I’ve managed to set up plenty of networking devices before, and they work, so I have to lay it back on the device in question rather than any outstanding incompetence on my part.

I think the problem is this: if you add to the various configuration craziness mentioned before the fact that wireless can be flaky, you have a test environment with shifting terrain which makes it difficult to baseline and describe properly, let alone start mapping out solutions. Regardless, Windows Mobile devices are set to become part of the widespread IT landscape at my workplace very soon, and it will be at least partly up to yours truly to ensure it happens as smoothly as possible, so a-testing I must go.

UPDATE: I have posted a few solutions to some of these issues in the post Windows Mobile 5/6 Networking Profiles, Proxy and VPN setup.