none
How to update device NK.bin with the new NK.bin automatically by device. RRS feed

  • Question

  • Hi All,

    I have developed a custom application in Windows CE 6.0 and would like place it on some server. I want the device to check the server and see whether any update is available? If yes the device should download this new NK.bin file and update itself with any human intervention. Please do let me know how we can do that? I know its challenging but not impossible.....

    From,

    imkagzi.

    Thursday, January 31, 2013 2:16 PM

All replies

  • You asked a very large question, but didn't give much clue as to what part of the problem you need assistance with.   So I am going to assume that you can write a socket application to look for and download the nk.bin.

    Now, how you proceed will depend on capabilities of your bootloader.   Is your bootloader capable of loading an nk.bin from flash, or does it need to read an expanded nk.bin (known as nk.nb0) from flash?   The answer to that will determine how you write the contents of the file to flash.


    Bruce Eitman (eMVP)
    Senior Engineer
    Bruce.Eitman AT Eurotech DOT com
    My BLOG http://geekswithblogs.net/bruceeitman

    Eurotech Inc.
    www.Eurotech.com

    Thursday, January 31, 2013 3:07 PM
    Moderator
  • Perhaps the question is for a bigger picture, like Device Management solutions?


    - Chandra

    Thursday, January 31, 2013 5:52 PM
  • 1. To download nk from remote location you need to write a browser application that shall copy the updated nk from network and copy it to device secondary storage.

    2. Once the nk is downloaded, you need to provide an API to copy the nk from the secondary storage to reserved nand region partitioned for NK if your boot device is NAND.

    3. If your boot device is Storage card/USB, then copy the nk to Storage Card/USB (over write NK )

    Remember if your copy is not successful and only partial, your device will not boot. Hence you should also think about the backup else you should not turn off the device when update is happening.

     Hope this will help.

    --- Misbah


    Senior Design Engineer T.E.S Electroni Solutions (Bangalore-India) www.tes-dst.com email-misbah.khan@tes-dst.com


    • Edited by Misbah Khan Friday, February 1, 2013 4:58 AM
    Friday, February 1, 2013 4:57 AM
  • Hi All,

    Thank you for your reply.

    I would like to provide my information on the same. At present I am using Blue Technology PCB built RE2 uSD 600Mhz single board computer.

    ( http://www.bluechiptechnology.co.uk/Product/RE2-Single-Board-Computer )  - where in its configuration, I have provided three option to select as Boot Device 1) On board NAND Flash, 2) Ethernet (KITL) and 3) MMC/SD Card - MMC/SD Boot File - [ NK.bin ]. The default selected option is On board NAND Flash. I can configure to the 3rd option and place the NK.bin to the SD Card. Then how can I make the device to update or boot with the new NK.bin. Please suggest......

    • Another I have seen about -  Device Management Client (Windows Embedded CE 6.0 ) - http://msdn.microsoft.com/en-us/library/ee489244%28v=winembedded.60%29.aspx

    Will this be helpful or right to implement for such application. Or will it be feasible to implement Device Management Client.  Please do let me know or share your ideas and suggestions.   If feasible then if you have any sample/doc available then please share.

    Friday, February 1, 2013 7:39 AM
  • This is a very device-specific question. Every device running Windows CE is a bit different. On devices that I've built, you can copy over the nk.bin and reboot the unit to use the new version. On other devices I've built, nk.bin is actually written to linear flash, so you need the cooperation of the bootloader to load the new version, program flash, and reboot to begin using it (2 reboots to reprogram the OS).

    Read the manual for your target device/bootloader to discover your options. Based on your description, I'd guess that writing the new nk.bin and rebooting the device is enough. However, you'll again have to consult with the device vendor/OS builder to determine how exactly you perform a reboot from application code. It might be a KernelIoControl(IOCTL_HAL_REBOOT...) or there might be a special API from your device/OS.

    Paul T.

    Friday, February 1, 2013 4:10 PM
  • Dear Paul G. Tobey,

    For my device I do have API to reboot. But I am not sure how can I place the new NK.bin file as boot reference. How I will change in the boot loader that my new updated NK.bin is located in SD-Card and boot from this path. What I will have to change, How can I tell the existing running system to update with this new update and reboot with this new updated Nk.bin file. Please suggest. In short I want to update the device automatically.

    Monday, February 4, 2013 12:15 PM
  • Hi,

    Basically you can update from two places

    1. From boot-loader
    2. After the OS boots completely

    From Boot-loader

    • Boot-loader shall support File system 
    • Shall support SD Card accessing functionality
    • Check if NK.bin is present in SD Card after eboot comes up
    • If NK.bin is present overwrite the current OSImage with this
    • Move to normal OS boot

    After OS Boots

    • Write a auto start application which checks for the presence of NK.bin on sd card
    • If NK.bin is present then application shall read the nk.bin and instruct the flash driver to write into OS Partition
    • Then give a Reboot instruction

    Regards,

    GSR

    Tuesday, February 5, 2013 3:35 AM