Send file data through D7A Action Protocol demo.

Dependencies:   modem_ref_helper

Files at this revision

API Documentation at this revision

Comitter:
Jeej
Date:
Thu Oct 11 09:54:18 2018 +0000
Parent:
10:daa4b52991b7
Child:
12:e0dba9c55dff
Commit message:
v1.0.2 Updated API

Changed in this revision

files.cpp Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
modem_ref_helper.lib Show annotated file Show diff for this revision Revisions of this file
--- a/files.cpp	Thu Sep 20 12:37:37 2018 +0000
+++ b/files.cpp	Thu Oct 11 09:54:18 2018 +0000
@@ -6,7 +6,7 @@
 #define __DEVICE_ID__               0x00000015
 
 alp_file_header_t h_rev = {
-    .perm = RW_R,
+    .perm = RWR_R_,
     .prop = FS_PERMANENT_NOTIF,
     .afid = FID_ACTP_RPT_FULL,
     .ifid = IFID_REPORT,
@@ -28,14 +28,14 @@
     .fw_version.id       = 0,
     .fw_version.major    = 1,
     .fw_version.minor    = 0,
-    .fw_version.patch    = 1,
+    .fw_version.patch    = 2,
     .fw_version.hash     = 0x00000000,
     /// Not used
     .cup_max_size        = 0x00000000
 };
 
 alp_file_header_t h_sensor_config = {
-    .perm = RW_RW,
+    .perm = RWRWRW,
     .prop = FS_VOLATILE,
     .afid = 0,
     .ifid = 0,
@@ -53,7 +53,7 @@
 };
 
 alp_file_header_t h_sensor_light = {
-    .perm = RW_R,
+    .perm = RWRWR_,
     .prop = FS_VOLATILE_NOTIF,
     .afid = FID_ACTP_RPT_FULL,
     .ifid = IFID_REPORT,
--- a/main.cpp	Thu Sep 20 12:37:37 2018 +0000
+++ b/main.cpp	Thu Oct 11 09:54:18 2018 +0000
@@ -194,10 +194,7 @@
     uint8_t id = modem_get_id(my_main_callback);
     
     DPRINT("Register Files\n");
-    
-    // HOST Revision is a local file. Uses D7AActP Notification.
-    modem_update_file(FID_HOST_REV, (alp_file_header_t*)&h_rev, (uint8_t*)&f_rev);
-    
+        
     // Create report file on modem.
     modem_update_file(FID_SENSOR_LIGHT, (alp_file_header_t*)&h_sensor_light, NULL);
 
@@ -218,8 +215,8 @@
     modem_ready.wait();
     
     PRINT("Notify FW Version\n");
-    modem_notify_file(FID_HOST_REV, 0, SIZE_HOST_REV, id);
-    modem_ready.wait();
+    uint8_t default_root_key[16] = DEFAULT_ROOT_KEY;
+    modem_notify_host_rev(&f_rev, &h_rev, default_root_key);
     
     modem_free_id(id);
     
--- a/modem_ref_helper.lib	Thu Sep 20 12:37:37 2018 +0000
+++ b/modem_ref_helper.lib	Thu Oct 11 09:54:18 2018 +0000
@@ -1,1 +1,1 @@
-https://developer.mbed.org/teams/WizziLab/code/modem_ref_helper/#7386c5c5bb9f
+https://developer.mbed.org/teams/WizziLab/code/modem_ref_helper/#7563b8e53e1d