Activesync-Connection-Issue-due-to-Redundant-Notification-Database-Entry

When we were working on the Regulus – Evaluation Board, we faced a peculiar problem on Activesync and this is about the Activesync connection that fails after multiple system reboots.

What exactly is the Connection failure? This means that we can detect the USB sync device on the PC but after that Activesync application wasn’t able to connect successfully and the device manager shows an exclamatory mark (“!”) over the device (in device manager) and the device status was “Device not working properly”.

We have used the KernelIOCTL(IOCTL_HAL_REBOOT) for rebooting the device.

At the same time we didn’t get this issue when we reboot without calling the IOCTL_HAL_REBOOT (using GPIO to reset the hardware directly same thing which was done in OALIoCtlHalReboot) or when we do un-mounting the HIVE disk before calling IOCT_HAL_REBOOT.

Our opinion on this is that some registry corruption might have occurred because of which Activesync was not connecting properly, but we were not finding the exact reason that is corrupting the registry.

An event notification database is available in HIVE disk. This notification database contains the notification event for RS232 detect (NOTIFICATION_EVENT_RS232_DETECTED). Since Activesync is an USB serial type communication, each time when the Activesync cable is inserted the serial driver triggers an RS232 detect notification event. Hence if the database entry is not correct it will create the Activesync connection issue.

We got the PHM Tools application to read the CEDB details, each time we reboot using IOCTL_HAL_REBOOT, a RS232 detect notification event record gets added to the DB_notify_events database. This redundant entry of RS232 detect notification causes the Activesync connection problem.

Each time during reboot the RS232 detect notification entry is getting added to DB_notify_events database and when the entry count reaches above 40 – 50 the Activesync connection problem starts occurring.

When we delete all the notification entries and rebooted the device we were able to connect to Activesync without any issues. Though wWe could solve the connection issue by deleting the redundant notification entry during device boot-up, however, we are searching for the exact reason.

References:

  1. Here is the link for getting PHM Tools Application
  2. Here you can get sample source code for enumerating the event notification database