Monday, 14 May 2012

DomainUpDown in Compact Framework 3.5

Really quick tip for anyone struggling with DomainUpDown clearing on the .NET Compact Framework. It seems setting the SelectedIndex to -1 is not enough to clear your selection and can be quite infuriating when you need the form to forget the last choice. It seems that setting the SelectedIndex isn't enough and without setting the Text property to an empty string the DomainUpDown will not clear your previous selection.

Wednesday, 14 March 2012

Scrollbars in Windows CE

Screen space is always a premium on handheld devices, so to get round it we've reduced the size of our scrollbars. We took this decision because our apps are not touch-screen enabled (some devices we use do not have touch screens) so there's no requirement for a large scrollbar to be able to scroll up and down.

To do this, we added the following to a SCROLLBARS.REG file and placed this in the \Platform folder. It's important we placed it here, rather than the \Application folder, as these settings are needed earlier in the cold boot. Placing this reg file in the \Application folder will result in your scrollbars not being the correct width after a cold boot, but the correct width after a subsequent warm boot.

REGEDIT4

[HKEY_LOCAL_MACHINE\System\GWE]
"cxHScr"=dword:00000008
"cyHScr"=dword:00000008
"cxVScr"=dword:00000008
"cyVScr"=dword:00000008

Monday, 23 January 2012

Preparing For GS1 DataBar

In 2014, GS1 are planning the introduction of a new barcode standard, GS1 DataBar (previously known as RSS or Reduced Space Symbology). In preparation for this, we're readying our Motorola devices to scan these barcodes so when suppliers start sending stock with these on them we'll be ready.

To scan these barcodes, you will need to update your devices to the latest EMDK for .NET (2.5 Update 1 at time of writing). To do this, you need to uninstall your existing EMDK, then install the new version, then install the update. This will allow you to take the correct symbol cabinet file for your device and deploy it to your device.

WT4090 on Windows CE 5 uses %PROGRAM FILES%\Motorola EMDK for .NET\v2.5\SDK\Smart Devices\wce500\armv4i\symbol.all.arm.cab).

You will also need to update your application project references to the new 2.5 version of DLLs now installed on your PC.

As usual, there seems to be a deafening silence on the internet about how to do this but as it turns out, it's not so hard to work out. After calling the "Actions.Enable()" method on your barcode object (Symbol.Barcode.Actions.Enable), you can enable additional decoders. To help you identify the ones you need, however, you need to know the historic IDs for your barcode types.

Old RSS NameNew GS1 DataBar™Motorola Decoder
RSS-14GS1 DataBar OmnidirectionalSymbol.Barcode.DecoderTypes.RSS14
RSS-14 TruncatedGS1 DataBar TruncatedSymbol.Barcode.DecoderTypes.RSS14
RSS-14 StackedGS1 DataBar StackedSymbol.Barcode.DecoderTypes.RSS14
RSS-14 Stacked OmnidirectionalGS1 DataBar Stacked OmnidirectionalSymbol.Barcode.DecoderTypes.RSS14
RSS-14 LimitedGS1 DataBar LimitedSymbol.Barcode.DecoderTypes.RSSLIM
RSS-14 ExpandedGS1 DataBar ExpandedSymbol.Barcode.DecoderTypes.RSSEXP
RSS-14 Expanded StackedGS1 DataBar OmnidirectionalSymbol.Barcode.DecoderTypes.RSSEXP

Once you do this, you can easily enable the decoders for these barcode types;

_BarcodeScanner.Decoders.SetEnabled(Symbol.Barcode.DecoderTypes.RSS14, True) _BarcodeScanner.Decoders.SetEnabled(Symbol.Barcode.DecoderTypes.RSSEXP, True) _BarcodeScanner.Decoders.SetEnabled(Symbol.Barcode.DecoderTypes.RSSLIM, True)

Monday, 12 December 2011

WT4090 - ActiveSync and "Connect to Device Failed"

Quick note today, but hopefully may prevent someone tearing their hair out.

The WT4090 has a "quirk" with it's ActiveSync connection which may wreak havoc with Visual Studio when you try to debug a project or deploy to the device. You will see a "Connect to Device Failed" message when attempting either of those two actions. This occurs when your device is tethered to your PC when your PC starts up. To rectify, simply lift the device from it's cradle for 5 seconds then replace. The device should make that distinct "ActiveSync" sound when it re-docks and you should be good to go!

Tuesday, 29 November 2011

Deleting "Motorola Out of Box Magic" Profile

Having multiple WiFi profiles on your device can slow down the responsiveness of your device and can result in slow re-connections to your wireless network.

By default, Motorola pre-load their devices with a WiFi profile. The registry file \Platform\FUSIONOBMPROFILE.REG is responsible for this. Delete / change the file extension of this file to prevent the system adding this profile on cold boot.

Friday, 28 October 2011

Forgotten Password - Motorola AppCenter

Forgotten / lost your AppCenter password for your Motorola device? First, try "symbol" as a password - this is the default for AppCenter - it might save you a little time!

If "symbol" doesn't work, dock your device to your PC using Microsoft ActiveSync and click the "Explore" button to browse the files on the device.

Navigate to the "\Application" folder and locate the "AppCenter.reg" file. Copy this file to your machine and open with notepad. If this file does not exist on your device, you will need to copy all the registry files onto your machine, then open each file in turn in notepad and look for the following entry;

[HKEY_LOCAL_MACHINE\SOFTWARE\Symbol\AppCenter]

Beneath this registry entry there will be two GUIDs.They will look something like this;

"{B6235F29-5B71-4389-A0A6-ACF2758AC1DC}"=hex:00,00,00,00
"{2EACC9DF-C9BF-428E-9074-D50B57D0D747}"=hex:2F,00,2A,00,22,00,24,00,3B,00,3C,00,73,00,52,00,07,00,1E,00,17,00,3C,00,2B,00,35,00,27,00,25,00,16,00,0A,00,3C,00,3D,00,0D,00,2F,00,3E,00,25,00,37,00,21,00,08,00,06,00,19,00,11,00,0C,00,57,00

Remove these two entries from your registry file and save it.

Copy the registry file back to the device in the "\Application" folder.

Cold boot the device. (Usually press and hold the 1 & 9 keys then press the power button.)

The device should now boot and the default password of "symbol" should now be active.

Wednesday, 26 October 2011

The Power of .RUN Files

Short blog for you today - wanted to discuss the power of .RUN files on Motorola Windows CE devices.

Persisting applications when your device cold boots is an issue you will encounter every time you start a new project for the devices. Motorola provide a very helpful guide which you can read through here; http://devzone.symbol.com/resources/Installing_Applications_for_Persistence_v2.pdf

One aspect of this, is the use of .RUN files in the \Application\Startup folder. These run files are essentially commands that can be executed when the device starts up after a cold boot.

The files are simple text files with two lines. The first line is the path to the executable you wish to run and the second line are the parameters you wish to pass into the application.

One common example is the ability to load cab files at startup. To do this, create a .RUN file in the \Application\Startup folder (EG: "MYAPP.RUN") with the following on two lines;

\Windows\wceload.exe
/noui /delete 0 /noaskdest "\Application\MYAPP.cab"

The order of your second line counts - always the switches before the file name.

There is no control over the order that these cab files install - if you need that, look at using SymScript instead.