Wrong Device for Code Error

Problem: Device registration using a Windows Mobile emulator appears successful in Sybase Control Center, but the device log shows a Wrong Device for Code error when the device attempts to connect to Unwired Server.

This error occurs when you:
  • Hard reset a Windows Mobile device emulator,
  • Close an emulator without saving the emulator state, or
  • Uninstall and reinstall the Unwired Server client software on the device.

Explanation: Because emulators do not generate unique device IDs, the Unwired Server messaging software on the device creates a device ID during installation and stores it in the emulator device registry. After registration, this permanent link between the emulator and the device ID must remain.

Hard resetting the emulator, closing the emulator without saving the emulator state, or uninstalling and reinstalling the Unwired Server client software purges the device registry and breaks the link between Unwired Server and the device software. When you attempt to reconnect, Unwired Server creates a new device ID for the device. Without the original device ID, the server cannot identify the device emulator, and therefore, cannot establish a relationship between the device and the activation code.

To avoid this problem so that the emulator and server remain synchronized, always save the emulator state before you close the emulator, and refrain from hard resetting the emulator, or uninstalling and reinstalling the client software.
Note: Before saving the state of an emulator, always uncradle the emulator using the Device Emulation Manager. This allows the device emulator to be cradled when the save image is loaded and used in the future.

Solution: Reconnect the emulator by either:

  1. Deleting the original device from Unwired Server, then reregister the device, or
  2. Reregistering the device.

See Sybase Control Center > Manage > Managing Unwired Platform > Routine Command and Control Actions > Provision > Device Users > Devices.

Related reference
User Name of Registered Device Not Displayed