Skip to content

Commit

Permalink
Update on 30 Jun 2023. Expand to see details.
Browse files Browse the repository at this point in the history
06cb10f01 Fix typo in NetXDuo Crypto
996dd14fc BSD functions overriding option
3b756c219 Fix mqtt interoperability issue when upgrade to ubuntu 20.04
01ca51021 Added support for skipping failed step
3e3a15e79 Add record length checking in nxe_secure_tls_session_send.
ec617d178 Fix demo_netx_secure_tls test link issue under nightly build
a934cb718 Fix pipeline libgcc issue in nx_secure_interoperability test
f08024578 Fix illegal access when NXD_MQTT_OVER_WEBSOCKET enabled
9798e2b89 Corrected the mDNS symbols check
456007dd1 Fixed multiple proxy update issue
cf0bf15b5 Add TLS sample demo_netx_secure_tls.c.
87ea505bf Add sha256 in driver preprocess command for ADU
7e1b9686a Add pnp check for ADU
ef78d336d Improved the code to ignore null file url.
  • Loading branch information
TiejunMS committed Jun 30, 2023
1 parent 5b5c8c5 commit b53390f
Show file tree
Hide file tree
Showing 34 changed files with 2,314 additions and 735 deletions.
1,213 changes: 778 additions & 435 deletions addons/BSD/nxd_bsd.c

Large diffs are not rendered by default.

400 changes: 270 additions & 130 deletions addons/BSD/nxd_bsd.h

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions addons/azure_iot/nx_azure_iot.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ NX_AZURE_IOT *_nx_azure_iot_created_ptr;
/* Define the callback for logging. */
static VOID(*_nx_azure_iot_log_callback)(az_log_classification classification, UCHAR *msg, UINT msg_len);

extern UINT _nxd_mqtt_client_packet_allocate(NXD_MQTT_CLIENT *client_ptr, NX_PACKET **packet_ptr, ULONG wait_option);
extern UINT _nxd_mqtt_client_publish_packet_send(NXD_MQTT_CLIENT *client_ptr, NX_PACKET *packet_ptr,
USHORT packet_id, UINT QoS, ULONG wait_option);

Expand Down Expand Up @@ -360,9 +361,9 @@ UINT nx_azure_iot_publish_packet_get(NX_AZURE_IOT *nx_azure_iot_ptr, NXD_MQTT_CL
{
UINT status;

status = nx_secure_tls_packet_allocate(&(client_ptr -> nxd_mqtt_tls_session),
nx_azure_iot_ptr -> nx_azure_iot_pool_ptr,
packet_pptr, wait_option);
NX_PARAMETER_NOT_USED(nx_azure_iot_ptr);

status = _nxd_mqtt_client_packet_allocate(client_ptr, packet_pptr, wait_option);
if (status)
{
LogError(LogLiteralArgs("Create publish packet failed"));
Expand Down
242 changes: 209 additions & 33 deletions addons/azure_iot/nx_azure_iot_adu_agent.c

Large diffs are not rendered by default.

23 changes: 17 additions & 6 deletions addons/azure_iot/nx_azure_iot_adu_agent.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ extern "C" {
#define NX_AZURE_IOT_ADU_AGENT_PROXY_UPDATE_COUNT 0
#endif /* NX_AZURE_IOT_ADU_AGENT_PROXY_UPDATE_COUNT */

/* For multiple updates. By default ADU agent stops processing next step (update) if there is an error.
To let agent continue all steps (updates), define NX_AZURE_IOT_ADU_AGENT_SKIP_FAILED_STEP. */
/*
#define NX_AZURE_IOT_ADU_AGENT_SKIP_FAILED_STEP
*/

/* Define the ADU agent component name. */
#define NX_AZURE_IOT_ADU_AGENT_COMPONENT_NAME "deviceUpdate"

Expand Down Expand Up @@ -136,6 +142,9 @@ extern "C" {
#define NX_AZURE_IOT_ADU_AGENT_UPDATE_RECEIVED 0
#define NX_AZURE_IOT_ADU_AGENT_UPDATE_DOWNLOADED 1
#define NX_AZURE_IOT_ADU_AGENT_UPDATE_INSTALLED 2
#ifdef NX_AZURE_IOT_ADU_AGENT_SKIP_FAILED_STEP
#define NX_AZURE_IOT_ADU_AGENT_UPDATE_PARTIAL_INSTALLED 3
#endif /* NX_AZURE_IOT_ADU_AGENT_SKIP_FAILED_STEP */
#define NX_AZURE_IOT_ADU_AGENT_UPDATE_FAILED 255

/* FIXME: status codes should be defined in iothub client. */
Expand Down Expand Up @@ -315,9 +324,15 @@ typedef struct NX_AZURE_IOT_ADU_AGENT_DRIVER_STRUCT
/* Define the driver return status. */
UINT nx_azure_iot_adu_agent_driver_status;

/* Define the firmware size for the driver to preprocess. */
/* Installed criteria for the driver to check update. */
const UCHAR *nx_azure_iot_adu_agent_driver_installed_criteria;
UINT nx_azure_iot_adu_agent_driver_installed_criteria_length;

/* Define the firmware size and integrity for the driver to preprocess. */
UINT nx_azure_iot_adu_agent_driver_firmware_size;

const UCHAR *nx_azure_iot_adu_agent_driver_firmware_sha256;
UINT nx_azure_iot_adu_agent_driver_firmware_sha256_length;

/* Define the firmware data for the driver to write. */
UINT nx_azure_iot_adu_agent_driver_firmware_data_offset;
UCHAR *nx_azure_iot_adu_agent_driver_firmware_data_ptr;
Expand All @@ -326,10 +341,6 @@ typedef struct NX_AZURE_IOT_ADU_AGENT_DRIVER_STRUCT
/* Define the return pointer for raw driver command requests. */
ULONG *nx_azure_iot_adu_agent_driver_return_ptr;

/* Installed criteria. */
const UCHAR *nx_azure_iot_adu_agent_driver_installed_criteria;
UINT nx_azure_iot_adu_agent_driver_installed_criteria_length;

} NX_AZURE_IOT_ADU_AGENT_DRIVER;

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,11 @@ static void adu_agent_update_notify(NX_AZURE_IOT_ADU_AGENT *adu_agent_ptr,
/* Start to download and install update immediately for testing. */
nx_azure_iot_adu_agent_update_download_and_install(adu_agent_ptr);
}
else if(update_state == NX_AZURE_IOT_ADU_AGENT_UPDATE_INSTALLED)
else if ((update_state == NX_AZURE_IOT_ADU_AGENT_UPDATE_INSTALLED)
#ifdef NX_AZURE_IOT_ADU_AGENT_SKIP_FAILED_STEP
|| (update_state == NX_AZURE_IOT_ADU_AGENT_UPDATE_PARTIAL_INSTALLED)
#endif /* NX_AZURE_IOT_ADU_AGENT_SKIP_FAILED_STEP */
)
{

/* Start to apply update immediately for testing. */
Expand Down
9 changes: 6 additions & 3 deletions addons/mdns/nxd_mdns.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/* APPLICATION INTERFACE DEFINITION RELEASE */
/* */
/* nxd_mdns.h PORTABLE C */
/* 6.1.11 */
/* 6.x */
/* AUTHOR */
/* */
/* Yuxin Zhou, Microsoft Corporation */
Expand All @@ -52,6 +52,9 @@
/* 04-25-2022 Yuxin Zhou Modified comment(s), */
/* fixed the issue of timer, */
/* resulting in version 6.1.11 */
/* xx-xx-xxxx Bo Chen Modified comment(s), and */
/* corrected the symbols check,*/
/* resulting in version 6.x */
/* */
/**************************************************************************/

Expand Down Expand Up @@ -130,9 +133,9 @@ extern "C" {
#error "mDNS IPv6 is not supported if IPv6 is not enabled."
#endif /* FEATURE_NX_IPV6 */

#ifndef NX_IPV6_MULTICAST_ENABLE
#ifndef NX_ENABLE_IPV6_MULTICAST
#error "mDNS IPv6 is not supported if IPv6 multicast is not enabled."
#endif /* NX_IPV6_MULTICAST_ENABLE */
#endif /* NX_ENABLE_IPV6_MULTICAST */

#ifndef NX_MDNS_DISABLE_SERVER
#ifndef NX_ENABLE_IPV6_ADDRESS_CHANGE_NOTIFY
Expand Down
Loading

0 comments on commit b53390f

Please sign in to comment.