Menu

List the available firmware (Version 1)

Now that you have devices registered for the Knox E-FOTA service, you can now review the firmware updates available using the device model names (for example, SM-G123A).

This section uses sample XML to demonstrate how to get a list of recommended firmware updates available with Knox E-FOTA.

Request

To get a list of available firmware updates, send an HTTP POST request to this URL:

https://eu-api.samsungknox.com/b2bfota/v1/firmware

Body

In the body of the HTTP request, provide the following information:

  • mdmId—This identifies your company among other partners in our KPP program.
  • customerId—This identifies one of your enterprise customers that will use the Knox E-FOTA service.
  • license—This tracks customer usage of the Knox E-FOTA service for billing purposes.
    NOTE—While trying Knox E-FOTA, the development key is sent to you by email in the following format: "EFOTA1-fff555-ggg666-hh77". During commercial deployment, this license is purchased.
  • groupID—A device group identified by the enterprise IT ;admin to separate groups for different firmware updates . Upper case only, for example: ;"TEST ;GROUP".
  • deviceModelName—The model number of the device you want to get the firmware info for.
  • carrierCode—The consumer software customization code for the device carrier. The carrier code is information obtained from the device.
  • currentFirmwareVersion—The current firmware you are looking to update from.
    NOTE—If parameter value is set to null, only targetFirmwareVersion, description, osVersion, openedDate, samsungSecurityPatchDate values will be shown. All other values will be set to none.
  • languageCode—The language used for the firmware info. For a list of codes, see Language code list. By default, the value is set to ENG.

You encode this info into REST API calls to the Knox E-FOTA server, and also in the Android API call used to set the allowed firmware version on a device.

For details about each of these XML elements, see the API reference for E-FOTA ;v1's firmware.

Example

Here is an XML sample request to get the firmware available for the device GT-S8500A:

<B2bFirmwareInfoListVO> <mdmId>d1e2f3g4h5</mdmId> <customerId>EEEE4444-FF55-AA66-BB77-CCCCCC888888</customerId> <groupId>TEST DEVICE GROUP</groupId> <license>EFOTA1-fff555-ggg666-hh77</license> <deviceModelName>GT-S8500A</deviceModelName> <carrierCode>OXM</carrierCode> <currentFirmwareVersion>ZNNN01A1/ZNNN01B1/ZNNN01C1</currentFirmwareVersion> <languageCode>ENG</languageCode> </B2bFirmwareInfoListVO>

Here is an example of how to use PHP with XML to request the available firmware for a device:

public function getFirmwareList($mdmId,$customerId,$groupId,$license,$deviceModelName,$carrierCode,$currentFirmwareVersion,$languageCode){
    $token = getToken();
    $curl = curl_init();
    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://eu-api.samsungknox.com/b2bfota/v1/firmware",
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_ENCODING => "",
        CURLOPT_MAXREDIRS => 10,
        CURLOPT_TIMEOUT => 30,
        CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
        CURLOPT_CUSTOMREQUEST => "POST",
        CURLOPT_POSTFIELDS => "<B2bFirmwareInfoListVO><mdmId>$mdmId</mdmId><customerId>$customerId</customerId><groupId>$groupId</groupId><license>$eFotaKey/license><deviceModelName>$deviceModel</deviceModelName><carrierCode>$carrierCode</carrierCode><currentFirmwareVersion></currentFirmwareVersion><languageCode>ENG</languageCode></B2bFirmwareInfoListVO>",
        CURLOPT_HTTPHEADER => array(
            'Authorization: Bearer '.$token,
            'cache-control: no-cache',
            'content-type: application/xml'),
    ));
    $result = curl_exec($curl);
    curl_close($curl);
    return $result;
}

Response

If the API call is successful, the Knox E-FOTA server returns "HTTP/1.1 200 OK" with a body such as the following (abbreviated to two firmware versions):

<?xml version="1.0" encoding="utf8" standalone="yes"?>
<B2bFirmwareInfoListVO>
    <firmwareVersionList>
        <firmwareVersionItem>
            <firmwareId>FW-20170130-77702</firmwareId>
            <currentFirmwareVersion>G930FXXU1BPLB/G930FOXA1BPLB/G930FXXU1BPJJ
            </currentFirmwareVersion>
            <targetFirmwareVersion>G930FXXU1DQB3/G930FOXA1DQB1/G930FXXU1DQB1
            </targetFirmwareVersion>
            <description>A software update can include, but is not limited to:
            - Device stability improvements, bug fixes.
            - New and / or enhanced features.
            - Further improvements to performance.
            To get the best from your device, please keep your device up to date and
            regularly check for software updates. The temperature of the device may
            temporarily increase during the software update or update because of the
            data download and associated behaviours.</description>
            <osOldVersion>Marshmallow(Android 6.0.1)</osOldVersion>
            <osVersion>Nougat(Android 7.0)</osVersion>
            <firmwareType>OS Upgrade</firmwareType>
            <openedDate>2017-02-07 01:41:53.0</openedDate>
        </firmwareVersionItem>
        <firmwareVersionItem>
            <firmwareId>FW-20170130-77566</firmwareId>
            <currentFirmwareVersion>G930FXXU1DPLT/G930FOXA1DPLT/G930FXXU1DPLT
            </currentFirmwareVersion>
            <targetFirmwareVersion>G930FXXU1DQB3/G930FOXA1DQB1/G930FXXU1DQB1
            </targetFirmwareVersion>
            <description>A software update can include, but is not limited to:
            - Device stability improvements, bug fixes.
            - New and / or enhanced features.
            - Further improvements to performance.
            To get the best from your device, please keep your device up to date
            and regularly check for software updates. The temperature of the device may
            temporarily increase during the software update or update because of the data
            download and associated behaviours.</description>
            <osOldVersion>Nougat(Android 7.0)</osOldVersion>
            <osVersion>Nougat(Android 7.0)</osVersion>
            <firmwareType>Bug Fix</firmwareType>
            <openedDate>2017-02-07 01:41:52.0</openedDate>
        </firmwareVersionItem>
    </firmwareVersionList>
</B2bFirmwareInfoListVO>

In the next sections, we will set the target firmware version to the first version shown above:

  • ap_version (PDA version)—G930FXXU1DQB3
  • csc_version (Phone/Modem version)—G930FOXA1DQB1
  • cp_version (CP version)—G930FXXU1DQB1

Tutorial Progress

You've completed 5/6 steps! Go to the next step.