Showing posts with label Windows CE. Show all posts
Showing posts with label Windows CE. Show all posts

Friday, August 8, 2014

Deploying a Service on Windows Mobile 6.x

Smile

In one of projects I’m working on at my workplace there is a service for Windows CE handheld devices (Motorola MC3x90 series)[1].Work This service has been developed following the instructions at http://msdn.microsoft.com/en-us/library/aa446909.aspx. While it says it apply to Microsoft® Windows® CE 4.0 and 5.0 it also works on newer Windows CE versions as well. Nerd smile

Unfortunately when I try to put it over to Windows Mobile Mobile phone(Which indeed based on the Windows CE platform) devices of the same manufacturer (MC3x90Z series) the service was not loading despite validating that dll can be loaded from another app as well as copying over exact registry settings which are the only two pieces that need to get it running. Thinking smile

Troubleshooting was also very painful since there was no command prompt app in these windows mobile devices so had to put some 3rd party console programs like the one you gets with Windows Mobile Developer Power Toys[2]. Still the services.exe was refusing to load and run service when warm booted and this was very frustrating. Annoyed

After lot of cursing Devilfinally found another one which also was developed by me long time ago and had a working service on Windows Mobile.Angel And a careful examination on the CAB file revealed that it need couple of work from our part to get a service running on Windows Mobile platform. Following is the findings.Light bulb

1. A compatible console.dll should be copied to \Windows directory. You can find the one I had been using (Don’t know exactly where I had found it) at my Google Drive

2. Following Registry settings apart from what needed for Service loading as described in the referenced msdn tutorial.

[HKEY_LOCAL_MACHINE\Drivers\Console]

”OutputTo"=dword:00000000

[HKEY_LOCAL_MACHINE\Services]

”AllowCmdLine"=dword:00000001

3. Last but not least. A shortcut at \Windows\StartUp folder to load the service. You can create one by creating a file with extention .lnk which contains a text in following format

<length of the text following after #>#services load <name of registry key of service>

e.g.

20#services load MTXSVC

Good luck and happy coding!Computer

 

References

[1] Handheld Computers http://www.motorolasolutions.com/US-EN/Business+Product+and+Services/Mobile+Computers/Handheld+Computers

[2] Windows Mobile Developer Power Toys http://www.microsoft.com/en-us/download/details.aspx?id=10601

[Published with Windows Live Writer on Windows 8.1]

Sunday, November 20, 2011

My Car PC – Alpha Build (GPS Navigation)

After the success in first Car PC build I had, decided to go further with adding a GPS unit to the build. So I went straight to eBay and ordered a GlobalSat BU353 USB GPS Receiver. After a couple of weeks I received a mail from Colombo central mail exchange that the item is on hold at customs. Oh Sh!# Annoyed.
So I went to the customs office and upon inspection in presence of customs officer, I was directed to TRC (Telecommunication Regulatory Commission) to obtain the approval. I really did not have any option other than that since the damn thing was clearly marked as a GPS. Upon submitting a written request to TRC they said they would forward my request to MoD (Ministry of defense) for approval. Fortunately I did not have to go to MoD as well (They did a brief interview over the phone though Call me)
And after the much of the drama and almost all the government institutions sending letters here and there between each other to consult on the matter, finally I got the approval back from TRC. (At one point I was wondering whether they would even consult CIA, FBI and DoD of USA as well for the matter that I’m about to use their GPS system Smile with tongue out) Then after submitting back the TRC approval and paying around thousand rupees Money got the damn thing back. Following is the bunch of letters I received from various government institutions regarding this matter. Sarcastic smile
IMG_20110729_141242
Phew, However fortunately I found out that It’s having a Prolific chip for converting serial data to USB and managed to get a WindowsCE driver and get the GPS receiver to connect to eBox. I also decided to put the mini PC under the drivers seat so the dashboard stays clutter free.
DSC04550 (800x599)
The next task was to put in a navigation app. Unfortunately it was not easy to find a navigation app for the Windows CE x86 processor architecture. Even there was since there is no way to make input to the PC. it was not going to make much help. So I decided to make a homebrew application using static maps tiles I scraped off the Google Maps static map API. (I know it kind of violate the license agreement but do I have any other option? specially since the device is not connected to internet.) Following is the crude UI of the current system. It simply show the current location on the static map tiles so basically it’s better than nothing.
Untitled
Apart from that it also logs all the information received from OBD-II cable as well as GPS receiver data in case requirement arise for the later analyze.
So I think now it’s time to get serious and buy some real H/W for a decent Car PC. Auto
[Posted with Windows Live Writer™ 2012 on Windows 7 64bit]

Thursday, April 21, 2011

My Car PC – Alpha Build

Smile
From the first day I got my Auto I wanted to build up a Car PC. Hot smile But the problem was finding the parts I want to put in the build. While entry level components like Intel 945GCLF and later 945GCLF2 was available in the local marked I couldn’t convince myself to settle for anything that does not have a ION chipset. And neither I could find an easy way to get that kind of board from offshore. Disappointed smile
So I just ordered only an OBD-II cable from eBay for some 17$ and was using with laptop to read out OBD parameters that I noticed it also have Windows CE drivers as well. Well after all while I don’t like to waste my Moneyon an Intel board I could certainly try out hooking up eBox 2300 I had on my i-Robot Sumo which I won at Imagine Cup 2009 Finals if I just had a suitable screen. Thinking smile
Well I thought why don’t I try out buying a cheap VGA to AVI converter and a Small screen used for Car reversing cameras. It won’t be a waste since I can certainly use those for either robot itself or for the Car PC it self as a secondary display in a later stage when I got the proper hardware. And anyway total cost for both will be just under 40$
So again off to the eBay and got both ordered. While VGA converter was fast to come the screen got a considerable time to get delivered which almost annoyed me but fortunately it was finally delivered.
So I just wired in everything together and stuffed the CE PC inside the empty DIN slot below the Car Audio/CD player.
DSC01082
But the problem was that I noticed after a while eBox was really hot and worried about it’s long running health. So I just moved it to the slot over the cubby hole and stuffed all wires and the VGA converter in the DIN slot.
DSC01073
For the software part I actually didn’t had much of a requirement at this stage. After all it is just a Windows CE 6 PC with just 200MHz CPU, 128 MB RAM with 256 MB Flash storage. Embarrassed smile
It even showed that not just adequate to even run a Full screen video at VGA resolutions so no use of trying it as a video player. But after all I was just after the onboard diagnostics so I just wrote out a crude application that collect all those fancy data from the OBD-II protocol and log them.
Car PC–Build 1
Later I wrote a simple program that let me to analyze the captured data on a PC. Following is a sample data set from that tool.
image
[Posted with Windows Live Writer™ 2011 on Windows 7 64bit]