Menu

List the available firmware updates (Version 2)

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 JSON and XML to demonstrate how to get a list of recommended firmware updates available with Knox E-FOTA.

Ensure that you have devices registered to a valid Knox E-FOTA license, if there are no devices registered to your license, the return will be empty.

Request

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

https://eu-api.samsungknox.com/b2bfota/v2/firmwareList

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.
  • deviceModelName—The model number of the device you want to get the firmware info for.
  • salesCode—The consumer software customization code for the device carrier. This was previously called carrierCodeon Knox E-FOTA v1. The sales code is information obtained from the device.
  • currentFirmwareVersion—The current firmware you are looking to update from.
    NOTE—Note that 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 elements, see the API reference for Knox E-FOTA v2's firmwarelist.

Example

Here is an XML sample request to get the firmware available for the device SM-G930A:

{ "B2bFirmwareInfoListVO": { "mdmId": "d1e2f3g4h5", "customerId": "EEEE4444-FF55-AA66-BB77-CCCCCC888888", "license": "EFOTA1-fff555-ggg666-hh77", "deviceModelName": "SM-G930A", "salesCode": "OXM", "currentFirmwareVersion": "ZNNN01A1/ZNNN01B1/ZNNN01C1", "languageCode": "ENG" } }

<B2bFirmwareInfoListVO> <mdmId>d1e2f3g4h5</mdmId> <customerId>EEEE4444-FF55-AA66-BB77-CCCCCC888888</customerId> <license>EFOTA1-fff555-ggg666-hh77</license> <deviceModelName>SM-G930A</deviceModelName> <salesCode>OXM</salesCode> <currentFirmwareVersion>ZNNN01A1/ZNNN01B1/ZNNN01C1</currentFirmwareVersion> <languageCode>ENG</languageCode> </B2bFirmwareInfoListVO>

NOTEcarrierCode has been renamed to salesCode, inputting salesCode will result in a FUD_1007 error response.

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

public function getFirmwareList($mdmId,$customerId,$license,$deviceModelName,$salesCode,$currentFirmwareVersion,$languageCode){
    $token = getToken();
    $curl = curl_init();
    curl_setopt_array($curl, array(
        CURLOPT_URL => "https://eu-api.samsungknox.com/b2bfota/v2/firmwareList",
        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><license>$eFotaKey/license><deviceModelName>$deviceModel</deviceModelName><sakesCode>$salesCode</salesCode><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:

Here's an XML sample response if providing currentFirmwareVersion:

<B2bFirmwareInfoListVO>
  <firmwareVersionList>
      <firmwareVersionItem>
         <firmwareId>FW-20120308-37052</firmwareId>
         <currentFirmwareVersion>G739FXXU0ANI2/G739FOXA0ANI2/G739FXXU0ANI2</currentFirmwareVersion>
         <targetFirmwareVersion>G739FXXU0APE2/G739FOXA0NPE2/G739FXXU0APE2</targetFirmwareVersion>
         <description>FOTA-FUS UPDATE</description>
         <osOldVersion>Kitkat(Android 4.4.2)</osOldVersion>
         <osVersion>Kitkat(Android 4.4.3)</osVersion>
         <firmwareType>Bug Fix</firmwareType>
         <openedDate>2012-03-08 02:31:50</openedDate>
         <samsungSecurityPatchDate>2017-12-20</samsungSecurityPatchDate>
      </firmwareVersionItem>
      <firmwareVersionItem>
         <firmwareId>FW-20120308-37052</firmwareId>
         <currentFirmwareVersion>G739FXXU0ANI2/G739FOXA0ANI2/G739FXXU0ANI2</currentFirmwareVersion>
         <targetFirmwareVersion>G739FXXU0APE2/G739FOXA0NPE2/G739FXXU0APE2</targetFirmwareVersion>
         <description>FOTA-FUS UPDATE</description>
         <osOldVersion>Kitkat(Android 4.4.2)</osOldVersion>
         <osVersion>Kitkat(Android 4.4.3)</osVersion>
         <firmwareType>Bug Fix</firmwareType>
         <openedDate>2012-03-08 02:31:50</openedDate>
         <samsungSecurityPatchDate>2017-12-20</samsungSecurityPatchDate>
      </firmwareVersionItem>
   </firmwareVersionList>
</B2bFirmwareInfoListVO>

Here's an XML sample response if providing currentFirmwareVersion:

<B2bFirmwareInfoListVO>
  <firmwareVersionList>
      <firmwareVersionItem>
         <firmwareId>None</firmwareId>
         <currentFirmwareVersion>None</currentFirmwareVersion>
         <targetFirmwareVersion>G739FXXU0APE2/G739FOXA0NPE2/G739FXXU0APE2</targetFirmwareVersion>
         <description>FOTA-FUS UPDATE</description>
         <osOldVersion>None</osOldVersion>
         <osVersion>Kitkat(Android 4.4.3)</osVersion>
         <firmwareType>None</firmwareType>
         <openedDate>2012-03-08 02:31:50</openedDate>
         <samsungSecurityPatchDate>2017-12-20</samsungSecurityPatchDate>
      </firmwareVersionItem>
      <firmwareVersionItem>
         <firmwareId>None</firmwareId>
         <currentFirmwareVersion>None</currentFirmwareVersion>
         <targetFirmwareVersion>G739FXXU0APE3/G739FOXA0NPE3/G930FXXU1DQB1</targetFirmwareVersion>
         <description>FOTA-FUS UPDATE</description>
         <osOldVersion>None</osOldVersion>
         <osVersion>Kitkat(Android 4.4.3)</osVersion>
         <firmwareType>None</firmwareType>
         <openedDate>2012-05-16 08:21:15</openedDate>
         <samsungSecurityPatchDate>2017-12-20</samsungSecurityPatchDate>
      </firmwareVersionItem>
   </firmwareVersionList>
</B2bFirmwareInfoListVO>

For details about each of these elements, see the API reference for Knox E-FOTA v2's firmwareList.

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

  • ap_version (PDA version)—G739FXXU0APE3
  • csc_version (Phone/Modem version)—G739FOXA0NPE3
  • cp_version (CP version)—G930FXXU1DQB1

Tutorial Progress

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