一 概述
斷線(xiàn)重連是指在計(jì)算機(jī)網(wǎng)絡(luò)中,當(dāng)網(wǎng)絡(luò)連接遇到異常中斷或者斷開(kāi)時(shí),系統(tǒng)會(huì)自動(dòng)嘗試重新建立連接,以保證網(wǎng)絡(luò)通信的連續(xù)性和穩(wěn)定性。這是一種常見(jiàn)的網(wǎng)絡(luò)通信技術(shù),廣泛應(yīng)用于各種計(jì)算機(jī)網(wǎng)絡(luò)場(chǎng)景,包括互聯(lián)網(wǎng)、局域網(wǎng)、廣域網(wǎng)等。下面我們分別從含義、步驟、實(shí)現(xiàn)方式、重要性的方面分別展開(kāi)講解。
當(dāng)計(jì)算機(jī)在進(jìn)行網(wǎng)絡(luò)通信時(shí),可能會(huì)遇到各種意外情況導(dǎo)致連接中斷,比如網(wǎng)絡(luò)故障、設(shè)備故障、鏈路故障、網(wǎng)絡(luò)擁塞等。當(dāng)連接中斷時(shí),原本建立的通信鏈路將無(wú)法繼續(xù)傳遞數(shù)據(jù),此時(shí)就需要通過(guò)斷線(xiàn)重連技術(shù)來(lái)重新建立連接。在斷線(xiàn)重連過(guò)程中,首先會(huì)檢測(cè)當(dāng)前連接是否已經(jīng)中斷,可以通過(guò)發(fā)送心跳包、接收心跳回應(yīng)等方式來(lái)檢測(cè)連接的可用性。如果發(fā)現(xiàn)連接已經(jīng)中斷,系統(tǒng)會(huì)自動(dòng)觸發(fā)斷線(xiàn)重連操作。
斷線(xiàn)重連操作通常包括以下幾個(gè)步驟:1. 斷開(kāi)當(dāng)前連接:當(dāng)檢測(cè)到連接中斷后,系統(tǒng)會(huì)主動(dòng)斷開(kāi)當(dāng)前連接,釋放相關(guān)資源。2. 嘗試重新建立連接:系統(tǒng)會(huì)按照預(yù)先設(shè)定的規(guī)則或者策略,嘗試重新建立連接。這個(gè)過(guò)程可以包括多次嘗試,每次嘗試可能采用不同的方式或參數(shù)進(jìn)行。3. 連接驗(yàn)證和協(xié)商:當(dāng)重新建立連接時(shí),通常需要進(jìn)行連接驗(yàn)證和協(xié)商,以確保雙方的通信能力和參數(shù)兼容,避免發(fā)生通信錯(cuò)誤或者數(shù)據(jù)丟失。4. 恢復(fù)數(shù)據(jù)傳輸:一旦連接成功建立,系統(tǒng)會(huì)恢復(fù)之前中斷的數(shù)據(jù)傳輸,保證數(shù)據(jù)的完整性和連續(xù)性。這個(gè)過(guò)程可能包括重發(fā)未確認(rèn)的數(shù)據(jù)包、重建傳輸隊(duì)列等。
斷線(xiàn)重連技術(shù)的實(shí)現(xiàn)可以采用多種方式,例如在應(yīng)用層、傳輸層或者網(wǎng)絡(luò)層實(shí)現(xiàn),具體的實(shí)現(xiàn)方法和機(jī)制會(huì)根據(jù)不同的網(wǎng)絡(luò)環(huán)境和應(yīng)用需求而有所差異。
斷線(xiàn)重連技術(shù)的重要性在于保證網(wǎng)絡(luò)通信的可靠性和穩(wěn)定性。在大規(guī)模的網(wǎng)絡(luò)環(huán)境中,網(wǎng)絡(luò)中斷或者故障是不可避免的,但通過(guò)斷線(xiàn)重連技術(shù),系統(tǒng)能夠快速自動(dòng)地進(jìn)行連接恢復(fù),減少網(wǎng)絡(luò)中斷對(duì)應(yīng)用和用戶(hù)的影響。
綜上,斷線(xiàn)重連是一種計(jì)算機(jī)網(wǎng)絡(luò)中常用的技術(shù)手段,用于在網(wǎng)絡(luò)連接中斷時(shí)自動(dòng)重新建立連接。通過(guò)斷線(xiàn)重連技術(shù),可以確保網(wǎng)絡(luò)通信的連續(xù)性和穩(wěn)定性,提升用戶(hù)體驗(yàn)和應(yīng)用性能。
二 掉線(xiàn)重連組件的使用
1 Gitee鏈接地址
組件位于amaziot_bloom_os_sdklibrariesamam_net.c
Gitee源碼地址:https://gitee.com/ning./hongdou
Github源碼地址:https://github.com/ayumid/hongdou
2 應(yīng)用層組件功能介紹
提供重連機(jī)制,設(shè)備掉線(xiàn)后,需要重新連接服務(wù)器,可以參考本組件,或者直接在組件上修改。本例調(diào)用了部分TCP組件,MQTT組件和切卡組件API。
使用該組件,必須同時(shí)使用AT組件,文件組件,TCP組件,掉線(xiàn)組件,掉線(xiàn)重連組件。
3 代碼講解
1 dtu_wait_dev_reg_net
功能:該函數(shù)用于,駐網(wǎng),每隔3s查詢(xún)一次駐網(wǎng)情況,超過(guò)20次后,復(fù)位模組。
參數(shù):無(wú)
返回值:無(wú)
示例:
//等待駐網(wǎng) dtu_wait_dev_reg_net();
2 dtu_main_check_net_thread
功能:該函數(shù)用于,維護(hù)網(wǎng)絡(luò)連接,掉線(xiàn)后重連。
參數(shù):
參數(shù) | 釋義 |
ptr | 任務(wù)指針,按需使用 |
返回值:無(wú)
示例:
//創(chuàng)建主任務(wù),包括網(wǎng)絡(luò)連接,死循環(huán)中檢查網(wǎng)絡(luò)連接情況,斷連后重新連接 status = OSATaskCreate(&dtu_task_ref, dtu_task_stack, DTU_TASK_STACK_SIZE, 150, "main_task", dtu_main_check_net_thread, NULL); ASSERT(status == OS_SUCCESS);
3 dtu_checknet_task_init
功能:該函數(shù)用于,創(chuàng)建網(wǎng)絡(luò)重連任務(wù),以及相關(guān)資源初始化。
參數(shù):無(wú)
返回值:無(wú)
示例:
//網(wǎng)絡(luò)保持任務(wù)初始化 dtu_checknet_task_init();
4 Demo實(shí)戰(zhàn)
4.1 創(chuàng)建一個(gè)Demo
復(fù)制20.4_trans_xtu示例工程,到同一個(gè)文件夾下,修改文件名為20.7_netreconnect_xtu,如圖:
4.2 修改makefile
增加文件組件所在目錄頭文件路徑,和源文件路徑,如圖:
4.3 增加頭文件
使用代碼編輯器,將新建的工程文件加入代碼編輯器中,打開(kāi)main.c,修改main.c,加入am.h等頭文件,如圖:
4.4 修改代碼
示例使用的是板載5x6卡,用戶(hù)的硬件可能是使用外置卡,或者是三合一全網(wǎng)通卡,因?yàn)橛布先N卡使用的模組SIM卡接口不一樣(外置卡SIM1,5x6卡和三合一卡SIM2),所以,需要通過(guò)一個(gè)全局變量來(lái)制定SIM卡硬件接口。
extern外部變量SDK_INIT_SIM_SELECT_VALUE,這里判斷了是否使用外置卡,這個(gè)宏定義在Makefile里面定義。
在Phase1Inits_enter中,宏定義判斷是否要包含對(duì)SDK_INIT_SIM_SELECT_VALUE變量的修改。
在Phase2Inits_exit 調(diào)用文件組件提供的對(duì)外API,如圖:
4.5 編譯
在SDK根目錄打開(kāi)命令行,輸入命令.build.bat -l .amaziot_bloom_os_sdksamplelibraries20.7_netreconnect_xtu
PS F:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08 λ .build.bat -l .amaziot_bloom_os_sdksamplelibraries20.7_netreconnect_xtu 子目錄或文件 outbin 已經(jīng)存在。 命令語(yǔ)法不正確。 子目錄或文件 buildobj 已經(jīng)存在。 gnumake: Entering directory `F:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A08/amaziot_bloom_os_sdk/sample/libraries/20.7_netreconnect_xtu' 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=""11 21 2023"" -DBUILD_TIME=""15:44:12"" -Iatcmdsinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhoptelephonyyugeinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhalUARTinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhalcoreinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhalPMUinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhalGPIOinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xosposixinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xdiagdiag_logicsrc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xcswSysCfginc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xcswplatforminc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xenvwin32inc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xcswBSPinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xcswplatformdev_platbuild -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xososainc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xosthreadxinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xosnu_xscaleinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xpcacpsminc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xpcachttpclientsrc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xdiagdiag_logicinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhoptimerinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhopintcinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xcswPMinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhoppminc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xsoftutilTickManagerinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhopBSPinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhoptelephonyatcmdsrvinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhoptelephonyatparserinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhoptelephonysdkinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xpcachttpclientinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xpcacciinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xpcaclwipv4v6srcinclude -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xpcaclwipv4v6srcincludearch -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xpcaclwipv4v6srcincludeipv4 -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xpcaclwipv4v6srcincludeipv6 -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xpcaclwipv4v6srcincludelwip -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xpcaclwipv4v6srcincludenetif -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhopmmi_matinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xtavorArbelinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xtavorenvinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhoptelephonymodeminc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xpcacdusterinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xpcacfotainc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhalI2Cinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhalACIPCinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xsoftutilfatsysflash -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xsoftutilFDIsrcINCLUDE -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhalMMUinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xsoftutilFDIsrcFDI_ADD -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xsoftutilFDIsrcFM_INC -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xsoftutilfatsysfshdr -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xsoftutillittlefsinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xpcacttsinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xpcacdialinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xsoftutilcsw_memoryinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhoputilitiesinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhopcommpminc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xsoftutilnvminc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xsoftutilEEhandlerinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xsoftutilEEhandlersrc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhopRTCinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhoptelephonyci_clientinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhalBT_deviceinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhalUARTinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhopmrdinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhopdmainc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xsoftutilsoftutilinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhalSPIinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xpcacwebsocketinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xpcacatnet_srvinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xsoftutilfotacomminc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xaud_swAudioinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xaud_swACM_COMMinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xaud_swaudio_stubsrc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhopaaminc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xaud_swAudioHALinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xhaldbgshellinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08includeasr160xpcacopencpuinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08amaziot_bloom_os_sdkutils -IF:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A08/amaziot_bloom_os_sdk/sample/libraries/20.7_netreconnect_xtuaminc -IF:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A08/amaziot_bloom_os_sdk/sample/libraries/20.7_netreconnect_xtuatcmdsinc -IF:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08/amaziot_bloom_os_sdk/librariesamxtu -DDTU_BASED_ON_TCP -DDTU_TYPE_5X6 -DDTU_UART_115200_BAUD -o buildobj/ext_at_cmds.o F:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A08/amaziot_bloom_os_sdk/sample/libraries/20.7_netreconnect_xtu/atcmds/src/ext_at_cmds.c armlink.exe buildobj/main.o buildobj/ext_at_cmds.o buildobj/ext_at_controller.o buildobj/am_file.o buildobj/am_at.o buildobj/am_trans.o buildobj/am_socket.o buildobj/am_hb.o buildobj/am_net.o -o F:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08outbinArbel_PMD2NONE_40M.axf --via F:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08prebuilt_1606lArbel_PMD2NONE_targ_objliblist.txt --elf --scatter F:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08prebuilt_1606lCrane_DS_4M_Ram_2M_Flash_XIP_CIPSRAM_Common_SingleSIM.sct --predefine="-DLTEONLY_THIN_SINGLE_SIM" --map --symbols --info sizes,totals --list F:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08outbinArbel_PMD2NONE_40M.map --keep init.o(Header) --keep init.o(Vectors) --diag_suppress 6312,6314,6319,6329 --feedback F:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08outfeedbackLinkOptLteonlyThin_SingleSim_NoSMS.txt F:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08toolsbuildimage_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 |outbincp_1606L.bin |MARK |NAME |EXEADDR .LOADADDR.LENGTH .CPZLADDR|COMPRESS STASTIC | |--------|--------|--------.--------.--------.--------|------------------------------| |This Is LteOnly 4M| |RW_CPZ_1|DDR_RW_ |7e11c000.80066514.0000d188.80067000|0000d188->00003000 |This Is LteOnly 4M| |RW_CPZ_2|PS_NCAH |7e388000.8007369c.00001300.8006a000|00001300->00001000 |This Is LteOnly 4M| |RW_CPZ_3|ITCM |7e3dac00.8007499c.0000f51c.8006b000|0000f51c->0000a000 |This Is LteOnly 4M| |RW_CPZ_4|CODE_PS |7e1ad000.80083eb8.0002fc5c.80075000|0002fc5c->0001e000 |This Is LteOnly 4M| |RW_CPZ_5|CODEPSB |7e1df000.800b3b14.000339bc.80093000|000339bc->0001b000 |This Is LteOnly 4M| |RW_CPZ_6|CODEPSC |7e216000.800e74d0.000323ec.800ae000|000323ec->0001b000 |This Is LteOnly 4M| |RW_CPZ_7|CODEPSD |7e24c000.801198bc.00028d88.800c9000|00028d88->0001a000 |This Is LteOnly 4M| |RW_CPZ_8|CODEPSE |7e27a000.80142644.0002e310.800e3000|0002e310->0001a000 |This Is LteOnly 4M| |RW_CPZ_9|CODEPSF |7e2ac000.80170954.0001c948.800fd000|0001c948->00011000 |This Is LteOnly 4M| |RW_CPZ_A|CODE_PL |7e2cd000.8018d29c.0002f914.8010e000|0002f914->0001e000 |This Is LteOnly 4M| |RW_CPZ_B|CODEPLB |7e2fd000.801bcbb0.00038d58.8012c000|00038d58->00021000 |This Is LteOnly 4M| |RW_CPZ_C|CODEPLC |7e337000.801f5908.000268d4.8014d000|000268d4->00012000 |--------|--------|--------.--------.--------.--------|------------------------------| | | 0x002051dc -> 0x00148000| | | 2.020(MB) -> 1.281(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_A08/amaziot_bloom_os_sdk/sample/libraries/20.7_netreconnect_xtu' "copy NEZHAC_CP_CNR_MIFI_TX.bin to ./ " 已復(fù)制 1 個(gè)文件。
4.6 生成固件
參考入門(mén)中開(kāi)發(fā)工具,生成工具。
4.7 查看現(xiàn)象
固件下載到模組后,通過(guò)AT串口配置服務(wù)器地址,等待設(shè)備連接服務(wù)器后,斷開(kāi)關(guān)閉服務(wù)器,設(shè)備會(huì)離線(xiàn),之后打開(kāi)服務(wù)器。設(shè)備會(huì)重新連接。
5 總結(jié)
根據(jù)實(shí)驗(yàn)現(xiàn)象,按照本文所述流程,可以實(shí)現(xiàn)串口模式切換。
本文章源自奇跡物聯(lián)開(kāi)源的物聯(lián)網(wǎng)應(yīng)用知識(shí)庫(kù)Cellular IoT Wiki,更多技術(shù)干貨歡迎關(guān)注收藏Wiki:Cellular IoT Wiki 知識(shí)庫(kù)(https://rckrv97mzx.feishu.cn/wiki/wikcnBvAC9WOkEYG5CLqGwm6PHf)
歡迎同學(xué)們走進(jìn)AmazIOT知識(shí)庫(kù)的世界!
這里是為物聯(lián)網(wǎng)人構(gòu)建的技術(shù)應(yīng)用百科,以便幫助你更快更簡(jiǎn)單的開(kāi)發(fā)物聯(lián)網(wǎng)產(chǎn)品。
Cellular IoT Wiki初心:
在我們長(zhǎng)期投身于蜂窩物聯(lián)網(wǎng) ODM/OEM 解決方案的實(shí)踐過(guò)程中,一直被物聯(lián)網(wǎng)技術(shù)碎片化與產(chǎn)業(yè)資源碎片化的問(wèn)題所困擾。從產(chǎn)品定義、芯片選型,到軟硬件研發(fā)和測(cè)試,物聯(lián)網(wǎng)技術(shù)的碎片化以及產(chǎn)業(yè)資源的碎片化,始終對(duì)團(tuán)隊(duì)的產(chǎn)品開(kāi)發(fā)交付質(zhì)量和效率形成制約。為了減少因物聯(lián)網(wǎng)碎片化而帶來(lái)的重復(fù)開(kāi)發(fā)工作,我們著手對(duì)物聯(lián)網(wǎng)開(kāi)發(fā)中高頻應(yīng)用的技術(shù)知識(shí)進(jìn)行沉淀管理,并基于 Bloom OS 搭建了不同平臺(tái)的 RTOS 應(yīng)用生態(tài)。后來(lái)我們發(fā)現(xiàn),很多物聯(lián)網(wǎng)產(chǎn)品開(kāi)發(fā)團(tuán)隊(duì)都面臨著相似的困擾,于是,我們決定向全體物聯(lián)網(wǎng)行業(yè)開(kāi)發(fā)者開(kāi)放奇跡物聯(lián)內(nèi)部沉淀的應(yīng)用技術(shù)知識(shí)庫(kù) Wiki,期望能為更多物聯(lián)網(wǎng)產(chǎn)品開(kāi)發(fā)者減輕一些重復(fù)造輪子的負(fù)擔(dān)。
Cellular IoT Wiki沉淀的技術(shù)內(nèi)容方向如下:
奇跡物聯(lián)的業(yè)務(wù)服務(wù)范圍:基于自研的NB-IoT、Cat1、Cat4等物聯(lián)網(wǎng)模組,為客戶(hù)物聯(lián)網(wǎng)ODM/OEM解決方案服務(wù)。我們的研發(fā)技術(shù)中心在石家莊,PCBA生產(chǎn)基地分布在深圳、石家莊、北京三個(gè)工廠,滿(mǎn)足不同區(qū)域&不同量產(chǎn)規(guī)模&不同產(chǎn)品開(kāi)發(fā)階段的生產(chǎn)制造任務(wù)。跟傳統(tǒng)PCBA工廠最大的區(qū)別是我們只服務(wù)物聯(lián)網(wǎng)行業(yè)客戶(hù)。
連接我們,和10000+物聯(lián)網(wǎng)開(kāi)發(fā)者一起 降低技術(shù)和成本門(mén)檻
讓蜂窩物聯(lián)網(wǎng)應(yīng)用更簡(jiǎn)單~~
哈哈你終于滑到最重要的模塊了,
千萬(wàn)不!要!劃!走!忍住沖動(dòng)!~
歡迎加入飛書(shū)“開(kāi)源技術(shù)交流群”,隨時(shí)找到我們哦~
點(diǎn)擊鏈接如何加入奇跡物聯(lián)技術(shù)話(huà)題群(https://rckrv97mzx.feishu.cn/docx/Xskpd1cFQo7hu9x5EuicbsjTnTf)可以獲取加入技術(shù)話(huà)題群攻略
Hey 物聯(lián)網(wǎng)從業(yè)者,
你是否有了解過(guò)奇跡物聯(lián)的官方公眾號(hào)“eSIM物聯(lián)工場(chǎng)”呢?
這里是奇跡物聯(lián)的物聯(lián)網(wǎng)應(yīng)用技術(shù)開(kāi)源wiki主陣地,歡迎關(guān)注公眾號(hào),不迷路~
及時(shí)獲得最新物聯(lián)網(wǎng)應(yīng)用技術(shù)沉淀發(fā)布
-
通信
+關(guān)注
關(guān)注
18文章
5950瀏覽量
135789 -
物聯(lián)網(wǎng)
+關(guān)注
關(guān)注
2901文章
44084瀏覽量
370296 -
計(jì)算機(jī)網(wǎng)絡(luò)
+關(guān)注
關(guān)注
3文章
335瀏覽量
22101
發(fā)布評(píng)論請(qǐng)先 登錄
相關(guān)推薦
評(píng)論