数据传输加密:物联网设备之间传输的数据可以使用AES加密算法进行加密,确保数据在传输过程中不被窃取或篡改。
身份验证:AES加密技术可以用于物联网设备的身份验证过程,确保只有合法的设备可以接入物联网网络。
安全存储:物联网设备上存储的数据可以使用AES加密算法进行加密,确保数据在设备丢失或被盗时不会被泄露。
/** * Function : am_aes_cipher_encrypt * Description : * Input : data 加密数据 * exdata 加密后的数据 * data_len 加密数据长度 * Output : * Return : * Auther : zhaoning * Others : **/ int am_aes_cipher_encrypt(AM_AES_CIPHER_T* paes) { int ret = 0; mbedtls_cipher_context_t ctx = {0}; const mbedtls_cipher_info_t* info = NULL; size_t ilen = 0; size_t olen = 0; size_t slen = 0; AM_AES_CIPHER_T* p_aes_cipher = NULL; p_aes_cipher = paes; if(NULL == paes->data || NULL == paes->exdata || NULL == paes->key || NULL == paes->iv || 0 == paes->data_len) { uprintf("%s[%d] params err", __FUNCTION__, __LINE__); return -1; } //初始化cipher结构体 mbedtls_cipher_init(&ctx); //获取AES模式info info = mbedtls_cipher_info_from_type(p_aes_cipher->type); //设置cipher模式 ret = mbedtls_cipher_setup(&ctx, info); if(0 != ret) { uprintf("%s[%d] setup err", __FUNCTION__, __LINE__); goto exit; } //设置padding模式 ret = mbedtls_cipher_set_padding_mode(&ctx, p_aes_cipher->padding); if(0 != ret) { uprintf("%s[%d] padding err", __FUNCTION__, __LINE__); goto exit; } //设置密钥 //#ifdef DTU_DATA_PRINTF_DATA_MODE // uprintf("key:%s", dtu_file_ctx->format.key); //#endif /* ifdef DTU_DATA_PRINTF_DATA_MODE.2023-12-21 15:36:29 by: zhaoning */ ret = mbedtls_cipher_setkey(&ctx, p_aes_cipher->key, strlen((void*)p_aes_cipher->key) * 8, MBEDTLS_ENCRYPT); if(0 != ret) { uprintf("%s[%d] setkey err", __FUNCTION__, __LINE__); goto exit; } //设置初始化向量IV //#ifdef DTU_DATA_PRINTF_DATA_MODE // uprintf("iv:%s", dtu_file_ctx->format.iv); //#endif /* ifdef DTU_DATA_PRINTF_DATA_MODE.2023-12-21 15:36:33 by: zhaoning */ ret = mbedtls_cipher_set_iv(&ctx, p_aes_cipher->iv, strlen((void*)p_aes_cipher->iv)); if(0 != ret) { uprintf("%s[%d] setiv err", __FUNCTION__, __LINE__); goto exit; } //更新输入数据,olen = format_size / 16 ilen = p_aes_cipher->data_len; ret = mbedtls_cipher_update(&ctx, p_aes_cipher->data, ilen, p_aes_cipher->exdata, &olen); if(0 != ret) { uprintf("%s[%d] update err", __FUNCTION__, __LINE__); goto exit; } //#ifdef DTU_DATA_PRINTF_DATA_MODE // temp = malloc(encrypt_len * 2 + 1); // memset(temp, 0, encrypt_len * 2 + 1); // utils_hex2ascii_str(temp, (UINT8*)encrypt, olen); // uprintf("olen:%d", olen); // uprintf("after:%s", temp); // free(temp); //#endif /* ifdef DTU_DATA_PRINTF_DATA_MODE.2023-12-25 15:00:02 by: zhaoning */ //偏移olen = format_size / 16字节,完成最后一个16字节计算 slen = olen; //完成计算,olen = 16 ret = mbedtls_cipher_finish(&ctx, (unsigned char*)(p_aes_cipher->exdata + slen), &olen); if(0 != ret) { uprintf("%s[%d] finish err", __FUNCTION__, __LINE__); goto exit; } //打印加密后的数据,转为str后,使用uprintf输出,输出十六进制多回车换行 #if 0 char* temp = NULL; UINT16 encrypt_len = 0; char arr_temp[33] = {0}; UINT32 p_len = 0; encrypt_len = (data_len / 16 + 1) * 16; temp = malloc(encrypt_len * 2 + 1); p_len = encrypt_len / 16; if(NULL != temp) { memset(temp, 0, encrypt_len * 2 + 1); utils_hex2ascii_str(temp, (UINT8*)exdata, encrypt_len); uprintf("%s[%d] slen:%d olen:%d after encrypt len:%d", __FUNCTION__, __LINE__, slen, olen, encrypt_len); memset(arr_temp, 0, 17); for(UINT32 i = 0; i < p_len;i++) { memcpy(arr_temp, temp + 32 * i, 32); uprintf("%s", arr_temp); } free(temp); } // dtu_send_to_uart(encrypt, encrypt_len); #endif /* ifdef DTU_DATA_PRINTF_DATA_MODE.2023-12-21 11:03:22 by: zhaoning */ exit: //释放cipher结构体 mbedtls_cipher_free(&ctx); return ret; }int dtu_aes_cipher_decrypt(AM_AES_CIPHER_T* paes)解密,解密数据、参数的等内容,在AM_AES_CIPHER_T结构体中。/** * Function : am_aes_cipher_decrypt * Description : 下行数据处理 * Input : * * Output : * Return : * Auther : zhaoning * Others : **/ int am_aes_cipher_decrypt(AM_AES_CIPHER_T* paes) { int ret = 0; mbedtls_cipher_context_t ctx = {0}; const mbedtls_cipher_info_t* info = NULL; size_t olen = 0; size_t slen = 0; AM_AES_CIPHER_T* p_aes_cipher = NULL; p_aes_cipher = paes; if(NULL == paes->data || NULL == paes->exdata || NULL == paes->key || NULL == paes->iv || 0 == paes->data_len) { uprintf("%s[%d] params err", __FUNCTION__, __LINE__); return -1; } //初始化cipher结构体 mbedtls_cipher_init(&ctx); //获取AES模式info info = mbedtls_cipher_info_from_type(p_aes_cipher->type); //设置cipher模式 ret = mbedtls_cipher_setup(&ctx, info); if(0 != ret) { uprintf("%s[%d] setup err", __FUNCTION__, __LINE__); goto exit; } //设置padding模式 ret = mbedtls_cipher_set_padding_mode(&ctx, p_aes_cipher->padding); if(0 != ret) { uprintf("%s[%d] padding err", __FUNCTION__, __LINE__); goto exit; } //设置密钥 ret = mbedtls_cipher_setkey(&ctx, p_aes_cipher->key, strlen((void*)p_aes_cipher->key) * 8, MBEDTLS_DECRYPT); // mbedtls_cipher_setkey(&ctx, (unsigned char*)"]4_PeXYZI_G2KyEf", 128, MBEDTLS_DECRYPT); if(0 != ret) { uprintf("%s[%d] setkey err", __FUNCTION__, __LINE__); goto exit; } //设置初始化向量IV ret = mbedtls_cipher_set_iv(&ctx, p_aes_cipher->iv, strlen((void*)p_aes_cipher->iv)); // mbedtls_cipher_set_iv(&ctx, (unsigned char*)"-5A_#Xi-D1PpS_wD", 16); if(0 != ret) { uprintf("%s[%d] setiv err", __FUNCTION__, __LINE__); goto exit; } //更新输入数据,olen = format_size / 16 ret = mbedtls_cipher_update(&ctx, p_aes_cipher->data, p_aes_cipher->data_len, p_aes_cipher->exdata, &olen); if(0 != ret) { uprintf("%s[%d] update err", __FUNCTION__, __LINE__); goto exit; } #ifdef DTU_DATA_PRINTF_DATA_MODE // char* temp = NULL; // UINT16 dncrypt_len = 0; // temp = malloc(dncrypt_len * 2 + 1); // memset(temp, 0, dncrypt_len * 2 + 1); // utils_hex2ascii_str(temp, (UINT8*)data->message->payload, data->message->payloadlen); // // uprintf("dl:%s", temp); // free(temp); // uprintf("%s[%d] olen:%d before:%s", __FUNCTION__, __LINE__, olen, data->message->payload); // uprintf("%s[%d] after1:%s", __FUNCTION__, __LINE__, dncrypt); #endif /* ifdef DTU_DATA_PRINTF_DATA_MODE.2023-12-25 15:00:02 by: zhaoning */ //偏移olen = format_size / 16字节,完成最后一个16字节计算 slen = olen; //完成计算,olen = 16 ret = mbedtls_cipher_finish(&ctx, (unsigned char*)(p_aes_cipher->exdata + slen), &olen); if(0 != ret) { uprintf("%s[%d] finish err", __FUNCTION__, __LINE__); goto exit; } //打印加密后的数据,转为str后,使用uprintf输出,输出十六进制多回车换行 // uprintf("%s[%d] after2:%s", __FUNCTION__, __LINE__, dncrypt); #ifdef DTU_DATA_PRINTF_DATA_MODE // char* temp = NULL; // temp = malloc((slen + olen) * 2 + 1); // if(NULL != temp) // { // memset(temp, 0, (slen + olen) * 2 + 1); // utils_hex2ascii_str(temp, (UINT8*)dncrypt, (slen + olen)); // uprintf("%s[%d] slen:%d olen:%d after dncrypt len:%d", __FUNCTION__, __LINE__, slen, olen, dncrypt_len); // uprintf("%s[%d] after:%s", __FUNCTION__, __LINE__, temp); // free(temp); // } #endif /* ifdef DTU_DATA_PRINTF_DATA_MODE.2023-12-21 11:03:22 by: zhaoning */ exit: //释放cipher结构体 mbedtls_cipher_free(&ctx); return ret; }2.基于红豆平台调用AES加密组件的demo示例:
2.1 创建一个Demo
复制20.2_at_xtu示例工程,到同一个文件夹下,修改文件名为22.1_aes_cipher,如图:2.2 修改makefile
增加文件组件所在目录头文件路径,和源文件路径,以及一些宏定义,如图:2.3 增加头文件
使用代码编辑器,将新建的工程文件加入代码编辑器中,打开main.c,修改main.c,加入am.h头文件,如图:2.4 修改代码
示例使用的是板载5x6卡,用户的硬件可能是使用外置卡,或者是三合一全网通卡,因为硬件上三种卡使用的模组SIM卡接口不一样(外置卡SIM1,5x6卡和三合一卡SIM2),所以,需要通过一个全局变量来制定SIM卡硬件接口。在Phase2Inits_exit 调用文件组件提供的对外API,如图:修改main函数中,实现加密解密API调用2.5 编译
在SDK根目录打开命令行,输入命令.\build.bat -l .\amaziot_bloom_os_sdk\sample\libraries\22.1_aes_cipher\PS F:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF λ .\build.bat -l .\amaziot_bloom_os_sdk\sample\libraries\22.1_aes_cipher\ 子目录或文件 out\bin 已经存在。 子目录或文件 build\mbedTLS 已经存在。 子目录或文件 build\obj 已经存在。 gnumake: Entering directory `F:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/22.1_aes_cipher' armcc.exe -c --cpu Cortex-R4 --no_unaligned_access -g -O2 --apcs /inter --diag_suppress 2084,1,2,177,188,223,550,1296,2795,6319,9931,9933 --diag_error=warning --gnu --thumb --loose_implicit_cast -DDATA_COLLECTOR_IMPL -DISPT_OVER_SSP -DDIAG_SSP_DOUBLE_BUFFER_USE_DYNAMIC_ALLOCATION -DENV_XSCALE -DL1_DCXO_ENABLED -DLTE_HIGH_MOBILITY_OPTIMIZATION -DRUN_XIP_MODE -DCRANE_Z2 -DCA_LONG_IPC_MSG -DNEZHA3 -DNEZHA3_1826 -DUPGRADE_PLMS -DUPGRADE_PLMS_SR -DLTE_GSMMULTIBCCH -DGPLC_LTE_RSSI_SCAN -DL1V_NEW_RSSI -DUPGRADE_PLMS_3G -DUPGRADE_PLMS_L1 -DUPGRADE_FG_PLMS -DFG_PLMS_URR -DUPGRADE_L1A_FG_PLMS -DUPGRADE_PLMS_STAGE_2 -DUPGRADE_MBCCH -DMULTI_BCCH_READY_IND -DURR_MRAT_ICS_SEARCH -DUPGRADE_ICS -DMRAT_NAS -DUPGRADE_PLMS_SEARCH_API -DICS_MBCCH -DICS_MBCCH_2G_RSSI -DDIAG_NEWPP -DPHS_SW_DEMO -DPHS_SW_DEMO_TTC -DPHS_SW_DEMO_TTC_PM -DFULL_SYSTEM -D_DDR_INIT_ -D_TAVOR_HARBELL_ -DUPGRADE_ARBEL_PLATFORM -D_TAVOR_B0_SILICON_ -DTDL1C_SPY_ENABLE -DDLM_TAVOR -DTAVOR -DFLAVOR_DUALCORE -DDEBUG_D2_MOR_REG_RESEREVED_ENABLE -D_DIAG_USE_COMMSTACK_ -D_TAVOR_DIAG_ -DPM_DEBUG_MODE_ENABLED -DPM_D2FULL_MODE -DPM_EXT_DBG_INT_ARR -DFEATURE_WB_AMR_PS -DMACRO_FOR_LWG -DHL_LWG -DOPTIMIZE_FOR_2G_BCCH -DPLAT_TEST -D_FDI_USE_OSA_ -DPLAT_USE_THREADX -DLWIP_IPNETBUF_SUPPORT -DCRANE_MCU_DONGLE -DAT_OVER_UART -DPHS_SW_DEMO_TTC_PM -DUPGRADE_LTE_ONLY -DEXT_AT_MODEM_SUPPORT -DLTEONLY_THIN_SINGLE_SIM -DLFS_FILE_SYS -DLFS_FILE_SYS_V2 -DPSM_ENABLE -DNO_PAHO_MQTT -DNO_XML -DNO_LWM2M -DREMOVE_MBEDTLS -DNO_AT_NET -DCRANE_SD_NOT_SUPPORT -DNTP -DYMODEM_EEH_DUMP -DENABLE_DM_LTEONLY -DLTEONLY_THIN -DNO_EXTEND_MY_Q_AT -DNOT_SUPPORT_HTTPS -DNOT_SUPPORT_PM813 -DCRANEL_4MRAM -DREMOVE_PB -DUART_NEW_VERSION -DREMOVE_MEP -DREMOVE_SMS -DREMOVE_ENVSIM -DAPN_INCODE -DLTEONLY_THIN_SINGLE_SIM_2MFLASH -DASR160X_OPENCPU_FEATURE -DENABLE_UART3_FEATRUE -DENABLE_UART4_FEATRUE -DYUGE_MBEDTLS_3_2_1 -DENABLE_MAC_TX_DATA_LOGGING -DDISABLE_NVRAM_ACCESS -DINTEL_UPGRADE_EE_HANDLER_SUPPORT -DLTE_W_PS -DL1_DUAL_MODE -DUPGRADE_HERMON_DUAL -DINTEL_UPGRADE_DUAL_RAT -DINTEL_UPGRADE_GPRS_CIPHER_FLUSH -DUPGRADE_ENHANCED_QUAD_BAND -DINTEL_2CHIP_PLAT -DI_2CHIP_PLAT -DUPGRDE_TAVOR_COMMUNICATION -DRUN_WIRELESS_MODEM -DFLAVOR_DDR12MB_GB1MB5 -DFEATURE_SHMEM -DACIPC_ENABLE_NEW_CALLBACK_MECHANISM -DRELIABLE_DATA -DMAP_NSS -DTV_FNAME="\"SW_PLATFORM=PMD2NONE PHS_SW_DEMO PHS_SW_DEMO_PM SRCNUCLEUS FULL_SYSTEM NOACRTC PDFLT PLAT_TEST PV2 DIAGOSHMEM NVM WITHL1V\"" -DTV_FDESC="\"SW_DESCRIPTION=\"" -DENABLE_ACIPC -D_DATAOMSL_ENABLED_ -DUSB_CABLE_DETECTION_VIA_PMIC -DMIPS_TEST -DMIPS_TEST_RAM -DFLAVOR_DIET_RAM -DNVM_INCLUDE -DMSL_INCLUDE -DMSL_POOL_MEM -DNO_AUDIO -DOSA_QUEUE_NAMES -D_DIAG_DISABLE_USB_ -DOSA_NUCLEUS -DOSA_USED -DPM_D2NONE_MODE -DCRANE_SOC_TEMPERATURE_SENSOR -DL1_SW_UPDATE_FOR_DIGRF -DPHS_L1_SW_UPDATE_R7 -DUPGRADE_LTE -DFRBD_CALIB_NVM -DFRBD_AGC_CALIB -DFRBD_FDT_CALIB -DHSPA_MPR -DCAPT_PARAMS_OPTIMIZE -DL1_WB_R99_ONLY -DL1V_WB_R99_ONLY -DINTERGRATED_RF_SUPPORT -DL1_RX_DIV_SUPPORT -DENABLE_OOS_HANDLING -DTAVOR_D2_WB_L1_SUPPORT -DL1_DDR_HIGH_FREQ -DUPGRADE_DIGRF3G_SUPPORT -DW_PS_PLUS_G_PAGING -D"NO_APLP=0" -DINTEL_UPGRADE_UNIFIED_VOICE_TASK -DINTEL_UPGRADE_R99 -DAPLP_SPY_ENABLE -D__TARGET_FEATURE_DOUBLEWORD -DWHOLE_UMTS_STACK -DUSE_TTPCOM_CSR_BLUETOOTH_AUDIO_GAIN_CONTROL -DL1_UPGRADE_R5 -DUPGRADE_EDGE -DUPGRADE_R4_FS1 -DINTEL_UPGRADE_GSM_CRL_IF -DUPGRADE_EGPRS_M -DINTEL_UPGRADE_EGPRS_M -DINTEL_UPGRADE_RF_PARAMS_IN_CF_TDS -DINTEL_UPGRADE_2SAMPLES_PER_SYMBOL -D"GPRS_MULTISLOT_CLASS=12" -D"EGPRS_MULTISLOT_CLASS=12" -DMARVELL_UPGRADE_BSIC_REDESIGN -DMSL_INCLUDE -DINTEL_HERMON_SAC -DCRANE_CUST_BUILD -DL1_SW_UPDATE_FOR_DIGRF -DFLAVOR_COM -DSILICON_PV2 -DSILICON_SEAGULL -DSILICON_TTC_CORE_SEAGULL -DPCAC_INCLUDE -Otime -DBUILD_DATE="\"02 21 2024\"" -DBUILD_TIME="\"18:03:58\"" -Iatcmds\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\yuge\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\UART\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\core\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\PMU\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\GPIO\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\os\posix\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\diag\diag_logic\src -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\csw\SysCfg\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\csw\platform\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\env\win32\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\csw\BSP\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\csw\platform\dev_plat\build -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\os\osa\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\os\threadx\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\os\nu_xscale\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\psm\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\httpclient\src -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\diag\diag_logic\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\timer\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\intc\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\csw\PM\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\pm\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\TickManager\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\BSP\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\atcmdsrv\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\atparser\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\sdk\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\httpclient\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\ci\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include\arch -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include\ipv4 -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include\ipv6 -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include\lwip -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\lwipv4v6\src\include\netif -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\mmi_mat\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\tavor\Arbel\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\tavor\env\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\modem\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\duster\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\fota\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\I2C\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\ACIPC\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\fatsys\flash -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\FDI\src\INCLUDE -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\MMU\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\FDI\src\FDI_ADD -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\FDI\src\FM_INC -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\fatsys\fs\hdr -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\littlefs\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\tts\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\dial\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\csw_memory\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\utilities\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\commpm\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\nvm\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\EEhandler\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\EEhandler\src -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\RTC\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\telephony\ci_client\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\BT_device\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\UART\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\mrd\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\dma\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\softutil\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\SPI\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\websocket\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\atnet_srv\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\softutil\fotacomm\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\aud_sw\Audio\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\aud_sw\ACM_COMM\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\aud_sw\audio_stub\src -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hop\aam\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\aud_sw\AudioHAL\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\hal\dbgshell\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\include\asr160x\pcac\opencpu\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\amaziot_bloom_os_sdk\utils -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\CSDK_CODE\mbedTLS\mbedTLS_3_2_1\asros -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\CSDK_CODE\mbedTLS\mbedTLS_3_2_1 -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\CSDK_CODE\mbedTLS\mbedTLS_3_2_1\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\CSDK_CODE\mbedTLS\mbedTLS_3_2_1\include -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\CSDK_CODE\mbedTLS\mbedTLS_3_2_1\include\mbedtls -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\CSDK_CODE\mbedTLS\mbedTLS_3_2_1\inc\mbedtls -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\CSDK_CODE\mbedTLS\mbedTLS_3_2_1\tests\include\test -DSDK_ENABLE_MBEDTLS -IF:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/22.1_aes_cipher\am\inc -IF:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/22.1_aes_cipher -IF:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/22.1_aes_cipher\atcmds\inc -IF:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/libraries\am\xtu -o build\obj/ext_at_cmds.o F:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/22.1_aes_cipher/atcmds/src/ext_at_cmds.c armlink.exe build\obj/main.o build\obj/ext_at_cmds.o build\obj/ext_at_controller.o build\obj/am_aes_cipher.o build\obj/utils_string.o build\CSDK_CODE.lib \ -o F:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\out\bin\Arbel_PMD2NONE_40M.axf \ --via F:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\prebuilt_1606l\Arbel_PMD2NONE_targ_objliblist.txt \ --elf \ --scatter F:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\prebuilt_1606l\Crane_DS_4M_Ram_2M_Flash_XIP_CIPSRAM_Common_SingleSIM.sct \ --predefine="-DLTEONLY_THIN_SINGLE_SIM" --map --symbols --info sizes,totals \ --list F:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\out\bin\Arbel_PMD2NONE_40M.map \ --keep init.o(Header) --keep init.o(Vectors) --diag_suppress 6312,6314,6319,6329 \ --feedback F:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\out\feedbackLinkOptLteonlyThin_SingleSim_NoSMS.txt F:\3.asr-b\cat.1-asr1606\1.software\BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF\tools\buildimage_1606l.bat SDK_PROD_TYPE : [DM] SDK_CUST_SKU : [THIN_SINGLE_SIM_NO_SMS] SDK_PS_MODE : [LTEONLY] SDK_CHIP_VER : [Z2A0] SDK_OS_TYPE : [TX] Platform Convertion Tools v4.01 with PS option extension Convertion done! |INPUT |out\bin\cp_1606L.bin |MARK |NAME |EXEADDR .LOADADDR.LENGTH .CPZLADDR|COMPRESS STASTIC | |--------|--------|--------.--------.--------.--------|------------------------------| |This Is LteOnly 4M| |RW_CPZ_1|DDR_RW_ |7e119000.8006f1ac.0000cde0.80070000|0000cde0->00003000 |This Is LteOnly 4M| |RW_CPZ_2|PS_NCAH |7e388000.8007bf8c.00001300.80073000|00001300->00001000 |This Is LteOnly 4M| |RW_CPZ_3|ITCM |7e3dac00.8007d28c.0000f51c.80074000|0000f51c->0000a000 |This Is LteOnly 4M| |RW_CPZ_4|CODE_PS |7e1aa000.8008c7a8.00030ce4.8007e000|00030ce4->0001e000 |This Is LteOnly 4M| |RW_CPZ_5|CODEPSB |7e1dc000.800bd48c.000339c0.8009c000|000339c0->0001b000 |This Is LteOnly 4M| |RW_CPZ_6|CODEPSC |7e213000.800f0e4c.000323ec.800b7000|000323ec->0001b000 |This Is LteOnly 4M| |RW_CPZ_7|CODEPSD |7e249000.80123238.00028d88.800d2000|00028d88->0001a000 |This Is LteOnly 4M| |RW_CPZ_8|CODEPSE |7e277000.8014bfc0.0002e310.800ec000|0002e310->0001a000 |This Is LteOnly 4M| |RW_CPZ_9|CODEPSF |7e2a9000.8017a2d0.0001c948.80106000|0001c948->00011000 |This Is LteOnly 4M| |RW_CPZ_A|CODE_PL |7e2ca000.80196c18.0002fa44.80117000|0002fa44->0001e000 |This Is LteOnly 4M| |RW_CPZ_B|CODEPLB |7e2fa000.801c665c.00039058.80135000|00039058->00021000 |This Is LteOnly 4M| |RW_CPZ_C|CODEPLC |7e337000.801ff6b4.000268d4.80156000|000268d4->00011000 |--------|--------|--------.--------.--------.--------|------------------------------| | | 0x0020ef88 -> 0x00150000| | | 2.058(MB) -> 1.313(MB)| |------------------------------------------------------------------------------------| cp_1606L.axf cp_1606L.bin cp_1606L.map gnumake: Leaving directory `F:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A09_WIHT_NEWRF/amaziot_bloom_os_sdk/sample/libraries/22.1_aes_cipher' "copy NEZHAC_CP_CNR_MIFI_TX.bin to ./ " 已复制 1 个文件。2.6 生成固件
参考入门中开发工具,生成工具。2.7 查看现象
固件下载到模组,设置参数连接服务器,发送透传数据,查看服务器数据是否按照配置上报。配置为AT+FMCFG=1,上报为十六进制数据。配置AT+FMCFG=2,上报JSON数据(注意配置为2,只支持字符串透传,十六进制尽量配置为1)四、如何了解更多AES加密功能
本文章源自奇迹物联开源的物联网应用知识库Cellular IoT Wiki,更多技术干货欢迎关注收藏Wiki欢迎同学们走进AmazIOT知识库的世界!
这里是为物联网人构建的技术应用百科,以便帮助你更快更简单的开发物联网产品。Cellular IoT Wiki初心:
在我们长期投身于蜂窝物联网 ODM/OEM 解决方案的实践过程中,一直被物联网技术碎片化与产业资源碎片化的问题所困扰。从产品定义、芯片选型,到软硬件研发和测试,物联网技术的碎片化以及产业资源的碎片化,始终对团队的产品开发交付质量和效率形成制约。为了减少因物联网碎片化而带来的重复开发工作,我们着手对物联网开发中高频应用的技术知识进行沉淀管理,并基于 Bloom OS 搭建了不同平台的 RTOS 应用生态。后来我们发现,很多物联网产品开发团队都面临着相似的困扰,于是,我们决定向全体物联网行业开发者开放奇迹物联内部沉淀的应用技术知识库 Wiki,期望能为更多物联网产品开发者减轻一些重复造轮子的负担。Cellular IoT Wiki沉淀的技术内容方向如下:奇迹物联的业务服务范围:基于自研的NB-IoT、Cat1、Cat4等物联网模组,为客户物联网ODM/OEM解决方案服务。我们的研发技术中心在石家庄,PCBA生产基地分布在深圳、石家庄、北京三个工厂,满足不同区域&不同量产规模&不同产品开发阶段的生产制造任务。跟传统PCBA工厂最大的区别是我们只服务物联网行业客户。连接我们,和10000+物联网开发者一起降低技术和成本门槛让蜂窝物联网应用更简单~~
欢迎直接加入飞书“开源技术交流群”,随时找到我们哦~Hey 物联网从业者,你是否有了解过奇迹物联的官方公众号“eSIM物联工场”呢?这里是奇迹物联的物联网应用技术开源wiki主阵地,欢迎关注公众号,不迷路~及时获得最新物联网应用技术沉淀发布
哈哈你终于滑到最最重要的模块了,千万不!要!划!走!忍住冲动!~淘宝搜索“奇迹物联企业店” 微信搜索“奇迹物联eSIM物联工场店”一分钟的时间带你了解”奇迹组件购买“√通信模组√功能类模组√SOM产品区
楼主最近还看过