OpenCFNet LargeIntervalTimer on Socket SoMo 650/655

I am working on a Windows Mobile 6.1 / 6.5 application running on .NET Compact 3.5. This application has been running successfully for many years on the old HP iPaq 210, but I had problems running it on the Socket SoMo 655.

Almost everything works as it should, with the exception of the LargeIntervalTimer function of the OpenNETCF library. The timer really works if the device remains connected to the PC, but otherwise the device goes into standby mode, which this timer cannot wake up.

Now, this is the whole purpose of LargeIntervalTimer. It wakes up a device that has entered the suspend mode so that it can perform some kind of task. It works correctly on iPaq, waking it, it would seem, in any form of sleep mode. However, on SoMo, the timer does not work after the device is left alone long enough to turn off.

Does anyone have any ideas? Is there any other way to wake a device from any power state that I can use in managed code?


Edit:

Thanks for the helpful suggestion, Joseph, and for the difficulty of writing a test application. From what I can tell, the event is being added correctly to the database. If I launch the application and immediately click "Start" and then "Stop", I see that there is 1 new record (the one created by the test application itself). However, if I click Start, and then open my own application, before switching back and clicking Stop, I will get 2 new entries. This is true for both devices, a working iPaq and a problematic Socket.

I think the problem should be related to the power status of the Socket after the device is allowed to go into suspend mode. LargeIntervalTimer works correctly when the Socket remains connected via USB to my computer, and I think that since the device will never completely fall asleep when connected. However, if I disconnect the device and allow it to enter suspend mode, the timer simply never activates.

Anyway, thanks for your help. I am still open to ideas, but there seems to be no simple solution that I just forgot ...


Edit 2:

I noticed that Socket SoMo 655 is running Windows CE, and Socket SoMo 650 (where the application works fine) is running Windows Mobile 6.5. Could there be a difference between these mobile operating systems that interfere with the OpenNETCF library?

+4
source share
1 answer

OpenNetCF LargeIntervalTimer uses a notification database and adds a time-based event.

If this fails or the notification mechanism does not fire an event (alarm), LargeIntervalTimer will fail.

I ran a test application at https://code.google.com/p/win-mobile-code/source/browse/#svn%2Ftrunk%2FOpenNetCF_LargeTimer (the binary is also in the bin directory).

enter image description hereenter image description here

After starting the application, just click the "Start" button, and the new "LargeTimer" object will be initialized. The tool then receives a list of notification events and uploads them to the text box.

When you click (Stop), the application stops LargeTimer and executes another list of events. Then the lists are compared, and if there is a new entry, you will get the contents.

New entry: 889192489, \\.\Notifications\NamedEvents\50f2c337-5b1a-4b78-8923-53df9e009980 

OpeneNetCF does not seem to delete old records; it always creates new unique records of named events.

If the LargeTimer application does not work on your device, this may be caused by the fact that the event will not be entered into the database. Using the tool you can check old and new records.

~ Joseph

+2
source

Source: https://habr.com/ru/post/1447607/


All Articles