Monday, April 26, 2010

PipeTerm for Windows Embedded CE 6.0

PipeTerm is a Windows Embedded CE 6.0 PowerToy that can be used to display serial port (debug) output from a booting/running CE 6.0 operating system image being hosted in Virtual PC 2007.

Check it here.

- Nicolas

Thursday, April 22, 2010

Windows Embedded CE 6.0 R3 Silverlight demo on a Freescale reference design

Check out this video of Silverlight for Windows Embedded demos done by Adeneo-Embedded and running on a Freescale tablet reference design.



- Nicolas

Wednesday, April 14, 2010

Webcast : Silverlight for Windows Embedded CE (French)

Missed the Techdays 2010 or would like to review the really interesting conference about Silverlight for Windows Embedded, you can check this out here.

- Nicolas

Friday, April 9, 2010

Create and Manage Telnet users

Windows Embedded CE is provided with a Telnet server, that you can use on your target to access it from the network. This Telnet service can work in two different modes :

  1. without authentication : anybody connecting to the Telnet have access to the target
  2. with authentication enable : only trusted user with password have access to the target

Enable Telnet Server :
In your OSDesign, select the Telnet Server component located in :
Core OS -> CEBASE -> Communication Services and Networking -> Servers -> Telnet Server

Disable authentication :
Simply add the following lines to your project.reg to disable service authentication. All users then will have access to the service as no credential will be requested.
[HKEY_LOCAL_MACHINE\COMM\TELNETD]
"IsEnabled"=dword:1
"UseAuthentication"=dword:0

Enable authentication :
When enabling authentication, you have to add in addition to the Telnet server support, the NTLM component located in :
Core OS -> CEBASE -> Security -> Authentication Services (SSPI) -> NTLM
And you also have to add in registry the list of users that will have access to the service. Users can be classified by groups of users (check MSDN for details).
[HKEY_LOCAL_MACHINE\COMM\TELNETD]
"IsEnabled"=dword:1
"UseAuthentication"=dword:1
"UserList"="Bob"

In the sample above, we are adding user named Bob, and only this user will have access to the telnet service.

Set and Change user password :
By default there is no default password for the different users defined on the system, and the password is ciphered and stored in the registry. This password cannot be set at Runtime image build time, and is usually set on first system boot. The sample code below set the password for user Bob.
#include "ntlmssp.h"

#define DEFAULT_USER L"Bob"
#define DEFAULT_NEW_PASS L"password"
...
BOOL bRet = NTLMSetUserInfo(DEFAULT_USER, DEFAULT_NEW_PASS);

if (bRet == FALSE)
RETAILMSG(1, (L"Failed to set user info"));
else
RETAILMSG(1, (L"User info updated"));
...


- Nicolas

Wednesday, April 7, 2010

Microsoft Certification Contest in France

Microsoft is launching a contest around its Certifications, you can win a 5 days trip to the Tech*Ed taking place June 8th in New Orleans, Louisiana. And get a second chance for Free.

The How To of the Microsoft Certifications is here.

- Nicolas

Tuesday, April 6, 2010

Enable RamDisk, and Mass Storage under Windows CE [Updates]

A Ram Disk is a storage disk located in RAM of your device, meaning its content isn't persistent between system boot. The RamDisk usually used for storing temporary content like software updates source binaries.

Reserve Memory space on target :

The Ram disk will be located at a customizable memory address and size on the device, and will be mounted on your root file system as any other file system. In order to reserve the physical memory area, you have to modify the config.bib file of your BSP and add a reserved section for RAM Disk as shown as below. It make sense to map this area on a physical portion of the RAM.

MEMORY


; Name Start Size Type
; ------- -------- -------- ----
BLDR 80000000 00058000 RESERVED
DRVGLOB 80058000 00001000 RESERVED
EMACBUF 80059000 0000E000 RESERVED
NK 80067000 01000000 RAMIMAGE
RAM 81067000 02BA7000 RAM ; 43.65 MB
RAMDISK 83C0E000 00300000 RESERVED ; 3.00 MB


In the example above, I reduced the size of RAM to have enough room for the RAMDISK section of 0x300000 (3MBytes).

Include RamDisk into OSDesign
Add the RamDisk support to your runtime image, by enabling the SYSGEN_RAMDISK variable into the OSDesign property window.

Configure RamDisk
The RamDisk driver is by default mounted by the storage manager and no configuration of the storage driver name allowed. So I prefer to make few registry modifications in my platform.reg to be able to fix the driver DSK name and index.

; HIVE BOOT SECTION

[HKEY_LOCAL_MACHINE\Drivers\BuiltIn\RamDisk]
"Dll"="ramdisk.dll"
"Prefix"="DSK"
"FriendlyName"="RAM Disk Driver"
"Order"=dword:0
"Ioctl"=dword:4
"IClass"=multi_sz:"{A4E7EDDA-E575-4252-9D6B-4195D48BB865}"
"Profile"="RAMDisk"
"Size"=dword:300000
"Address"=dword:83C0E000
"SectorSize"=dword:200
"index"=dword:9

[HKEY_LOCAL_MACHINE\System\StorageManager\AutoLoad\RAMDisk]
"DriverPath"="Drivers\\BuiltIn\\RamDisk"
"LoadFlags"=dword:1
"BootPhase"=dword:0

; END HIVE BOOT SECTION

Note that the Address and Size of the RamDisk driver definition match the values defined in the config.bib. The storage driver will then be accessible through DSK9:, and you can then easily configure a USB Function mass storage profile to point on this storage.

Configure USB Function Mass Storage
The USB Function driver loads profiles when device plugged to a host, the profile to be loaded by default is set through the registry.

[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers]

"DefaultClientDriver"=- ; erase previous default
[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers]
"DefaultClientDriver"="Mass_Storage_Class"

[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Mass_Storage_Class]
"DeviceName"=- ; erase previous default
[HKEY_LOCAL_MACHINE\Drivers\USB\FunctionDrivers\Mass_Storage_Class]
"DeviceName"="DSK9:"


Note as the "DeviceName" is set to DSK9: matching the driver index described before for the RamDisk.
Note don't forget to add the USB Function driver of the BSP and set the following variables : SYSGEN_USBFN, SYSGEN_USBFN_STORAGE

To go further :
- RamDisk can be used in association to the ROM Only mechanism to reduce write access to the physical storage.
- RamDisk and USB Function, this to provide a way to drop files on your target using USB mass storage profile.

Special thanks to Juanito for the hints

[Updated on 08-22-2011] : fixed a platform configuration file name.

- Nicolas