Thursday, August 5, 2010

GPRS Settings on WM 6.5

GPRS Settings on WM 6.5

Most of the time, i find many of my colleagues forgot how to configure the GPRS connectivity on WM 6.5. So I thought of putting the info on this blog

Steps to follow:

1.Click on Start Menu -> Settings ->Connections -> Connections

2.Under Task / My ISP, Click on Add a New Modem Connection

3. Leave the Name as it is , Under Select a Modem, choose Cellular Line (GPRS),

4. Click Next, Enter Access Point Name ( Get it from your Carrier)

5. Click Next, Enter User Name and Password ( Get it from your Carrier)

6. Domain Name; Check with your Carrier and enter if required

7. Then Click on Finish ( Mostly, there is no need for advanced settings.)

For Idea connection in Bangalore,The following are the settings we used.

AP Name: simplyinternet

User Name: Idea Mobile No

Password: spice

Domain: Empty

No Advanced settings

Friday, June 25, 2010

Stream Driver Load Issue

Hi All,
We would have seen many issues while writing a stream drvier. Today i faced an peculiar issue.
I was trying to implement a service ( a stream Interface DLL).
DLL_PROCESS_ATTACH is called and immediately DLL_PROCESS_DETACH is called, i was struggling for more than 3 hours why?.
I changed the .cpp to .c and was changing the Sources file, Registry file and everything. Nothing helped.
Atlast the issue was Uppercase I. Yes.
In my Deinit function instead of XXX_Deinit I had XXX_DeInit. This is the culpirit.

When the Device.exe/Services.exe loads the DLL, it checks whether all the interfaces are properly defined. It sees that XXX_Deinit is not defined properly, so it unloads the DLL and sends DLL_PROCESS_DETACH .. and exits.

So friends, be Sensitive for Case Sensitive

Monday, June 21, 2010

AKU Version In Windows Mobile Build Tree

Sometimes we may not know what is the AKU Version and would like to see that.
Where to see?
bldver.h contains OS version, Build Version.

One sample data:
#define CE_MAJOR_VER 0x0005
#define CE_MINOR_VER 0x0002 // Minor version is in hundredths

#define CE_BUILD_VER 23096
#define CE_BUILD_SYSVER 4134

this OS Kernel is CE5.02 , AKU Version is 23096

Sunday, April 25, 2010

Calling Native Code from C#. (.Net CF in WM)

One of My Colleague was trying to configure a GPIO pin from a C# Application. To call the native code we have P- Invoke in C#. But sometimes it confuses,what data types to use while declaring the function in C# and whether that type is compatible in C/C++.

Another Colleague suggested a smart way of handling these type of issues.

If you are not passing any input to the Native code from C#(or if it is not required to pass), then simply define a a function with no input and do all the processing in the native code itself. In Native code you can call any system APIs like DeviceIoctl or MmMapIoSpace and have any data types you need to.

This may help the beginners to catch up !!

Friday, April 23, 2010

Cold booting Windows CE 6.0 Terminal

Hi All,
Yesterday I was trying to find how to cold boot a CE6.0 terminal from a Application.
You could call KerneIoctl function with IOCTL_HAL_REBOOT to warm boot the system (Soft Reset) and if you call SetCleanRebootFlag() beofore the Ioctl call, so you can do Cold Boot (Hard Reset).
In CE5.0, WM6.1 and WM 6.5, these calls were directly possible from the application itself. But in CE 6.0 as the memory architecture was changed, only limited IOCTLs are supported by default from user Mode Applications and Drivers. (But OEMs can modify this behavior and may support more IOCTLs).

There is a simple alternate method worked for me, which is using PM API SetSystemPowerState().
PM has two state called coldreboot (Cold Boot) and reboot(Warm Boot).
Warm Boot has a state defined in PM.H as POWER_STATE_RESET, but I believe Cold boot is not documented properly. POWER_STATE_BOOT didn't do Cold boot as expected.

Cold Boot:

SetSystemPowerState(L"reboot",FALSE,POWER_FORCE); or

when the SetSysmPowerstate is called with coldreboot string, PM does call SetCleanRebootFlag and KernelIoctl with IOCTL_HAL_REBOOT.

I believe Application developers can make use of PM API to do Cold and Warm Boots.

I have tested these APIs on Motorola MPA 2.0 CE Terminal.

Please correct me, If Iam Wrong.