0
  • 聊天消息
  • 系統(tǒng)消息
  • 評論與回復(fù)
登錄后你可以
  • 下載海量資料
  • 學(xué)習(xí)在線課程
  • 觀看技術(shù)視頻
  • 寫文章/發(fā)帖/加入社區(qū)
會員中心
創(chuàng)作中心

完善資料讓更多小伙伴認(rèn)識你,還能領(lǐng)取20積分哦,立即完善>

3天內(nèi)不再提示

物聯(lián)網(wǎng)中RTU的DI是什么?如何實現(xiàn)DI相關(guān)軟件功能?

jf_94171069 ? 來源:jf_94171069 ? 作者:jf_94171069 ? 2024-09-25 15:28 ? 次閱讀

一 概述

DI即數(shù)字輸入(DI, Digital Input),用于接收二進(jìn)制信號(0或1),通常用于接收開關(guān)、按鈕、傳感器(如接近開關(guān)、光電傳感器等)的狀態(tài)。數(shù)字輸入只能識別兩種狀態(tài):高電平(通常代表“1”或“開”)和低電平(通常代表“0”或“關(guān)”)。

二 相關(guān)技術(shù)描述

常開觸點(NO)或常閉觸點(NC)接入,

常開觸點,也稱為NO(Normally Open)觸點,指的是一種當(dāng)電氣設(shè)備未被激活時處于打開狀態(tài)的開關(guān)。換句話說,當(dāng)電流通過該開關(guān)時,觸點會關(guān)閉并允許電流流動;而當(dāng)電流停止流動時,觸點會自動返回到打開狀態(tài)。常開觸點通常被用于需要手動控制的電路中,例如呼叫按鈕、燈開關(guān)等。

常閉觸點,也稱為NC(Normally Closed)觸點,指的是一種當(dāng)電氣設(shè)備未被激活時處于關(guān)閉狀態(tài)的開關(guān)。與常開觸點不同,當(dāng)電流通過該開關(guān)時,觸點會打開并中斷電流的流動;而當(dāng)電流停止流動時,觸點會自動返回到關(guān)閉狀態(tài)。常閉觸點通常被用于需要自動控制的電路中,例如安全繼電器、保護(hù)裝置等。

狀態(tài)觸發(fā)? 可配置為脈沖計數(shù)接口

一種上升沿(按鍵釋放計數(shù)),一種下降沿(按鍵閉合計數(shù)),第三種電平(按鍵閉合釋放都會計數(shù))。

濾波參數(shù)用于輸入信號有效性判斷,比如默認(rèn)使用6即6ms以下的輸入信號作為抖動不會進(jìn)行計數(shù)也不會判斷為有效的輸入信號。

干節(jié)點信號輸入或0~3.3V電平信號輸入?

干接點信號是一種電氣開關(guān)信號,具有閉合和斷開兩種狀態(tài),其兩個接點之間沒有極性,可以互換。這種信號通常用于各種開關(guān)、傳感器輸出以及繼電器、干簧管的輸出等。干接點信號在工業(yè)控制領(lǐng)域中應(yīng)用廣泛,具有無需電源即可工作的特點,適用于多種設(shè)備和場景。

三 應(yīng)用場景

3.1 計數(shù)器

統(tǒng)計接入設(shè)備觸發(fā)的次數(shù),涉及到DI的采樣頻率,頻率太高,可能漏采,這一點在使用時必須考慮

wKgaombzu3uATTfkAALsFLrt-nk910.jpg

3.2 門磁

門磁開關(guān)常用于門是否開啟、關(guān)閉。兩個磁鐵靠近后會產(chǎn)生一個高電平,或者低電平信號,DI檢測到后,可以識別門的狀態(tài),從而通知云端同步門的狀態(tài)

wKgZombzu32AQbhkAAXuW50N5hQ292.jpg

3.3 紅外感應(yīng)

常用于熱源檢測,例如是否有人進(jìn)入檢測等。檢測到熱源后,會產(chǎn)生一個高電平或者低電平信號,DI接收到后,通知遠(yuǎn)端檢測事件發(fā)生。

wKgaombzu36AMSJQAAL3m9uKxiA662.jpg

3.4 煙感

室內(nèi)防火使用,檢測到煙以后,DI檢測到,配合DTU輸出DO告警等。

wKgZombzu4KAHHUyAAKQFP5-1iw439.jpg

3.5 水浸

檢測是否有水進(jìn)入,傳感器會產(chǎn)生數(shù)字輸出信號給DI,DI檢測到后,進(jìn)行下一步處理。

四 DI組件的使用

1 Gitee鏈接地址

組件位于amaziot_bloom_os_sdklibrariesamxtuam_di.c

Gitee源碼地址:https://gitee.com/ning./hongdou

Github源碼地址:https://github.com/ayumid/hongdou

2 應(yīng)用層組件功能介紹

提供DI實現(xiàn)實例。

使用該組件,必須同時使用AT組件,文件組件,TCP組件,掉線組件,掉線重連組件,DI組件,DO組件,AI組件,JSON組件,CLK組件。

3 代碼講解

1 dtu_di1_report_timer_callback

功能:該函數(shù)用于,DI1周期上報定時器超時回調(diào)函數(shù),超時后,判斷當(dāng)前是否在透傳模式,發(fā)送消息給JSON任務(wù),上報到服務(wù)器。

參數(shù)

參數(shù) 釋義
tmrId 參數(shù),暫未使用

返回值:無

示例:

OSATimerStart(dtu_di1_report_timer_ref, uc_time * 200, uc_time * 200, dtu_di1_report_timer_callback, 0);

2 dtu_di1_report_timer_stop

功能:該函數(shù)用于,DI1周期上報定時器停止。

參數(shù):無

返回值:無

示例:

dtu_di_report_timer_stop(channel);

3 dtu_di_report_timer_start

功能:該函數(shù)用于,DI1周期上報定時器開始。

參數(shù):

參數(shù) 釋義
index 定時器索引
time 時間

返回值:無

示例:

//開定時器
dtu_di_report_timer_start(channel, interval);

4 dtu_di_int_init1

功能:該函數(shù)用于,初始化DI1,配置為中斷模式,判斷NV項,是否需要打開周期上報定時器。

參數(shù):無

返回值:無

示例:

dtu_di_int_init1();

5 dtu_di_times_init

功能:該函數(shù)用于,主動上報定時器句柄初始化。

參數(shù):五

返回值:無

示例:

//初始化DI上報定時器
dtu_di_times_init();

4 Demo實戰(zhàn)

4.1 創(chuàng)建一個Demo

復(fù)制20.2_at_xtu示例工程,到同一個文件夾下,修改文件名為20.9_di_xtu,如圖:

wKgZombzu4WAeP1vAAChNqp7q1o580.jpg

4.2 修改makefile

增加文件組件所在目錄頭文件路徑,和源文件路徑,以及一些宏定義,如圖:

-D是makefile中定義宏定義必要的前綴,可以搜索相關(guān)makefile學(xué)習(xí)文章學(xué)習(xí)相關(guān)知識。

DTU_BASED_ON_TCP 表示當(dāng)前是TCP模式,當(dāng)前組件使用需要am.h中包含一些對應(yīng)。

DTU_TYPE_5X6 表示使用SOM板貼片5x6卡,可以使用其它卡,修改為對應(yīng)宏定義就可以。

DTU_UART_115200_BAUD 表示使用115200波特率

DTU_TYPE_JSON_INCLUDE 表示把JSON功能包含進(jìn)來

wKgZombzu4WAH1iyAAC9FdBCYvg903.jpg

4.3 增加頭文件

使用代碼編輯器,將新建的工程文件加入代碼編輯器中,打開main.c,修改main.c,加入am.h頭文件,如圖:

wKgaombzu4aAT3hhAAAjjDrqVyc030.jpg

4.4 修改代碼

示例使用的是板載5x6卡,用戶的硬件可能是使用外置卡,或者是三合一全網(wǎng)通卡,因為硬件上三種卡使用的模組SIM接口不一樣(外置卡SIM1,5x6卡和三合一卡SIM2),所以,需要通過一個全局變量來制定SIM卡硬件接口。

extern外部變量SDK_INIT_SIM_SELECT_VALUE,這里判斷了是否使用外置卡,這個宏定義在Makefile里面定義。

wKgZombzu4aALjZQAAAVMVRfTbM116.jpg

在Phase1Inits_enter中,宏定義判斷是否要包含對SDK_INIT_SIM_SELECT_VALUE變量的修改。

wKgaombzu4eAUZh4AAAhKBe8PfY642.jpg

在Phase2Inits_exit 調(diào)用文件組件提供的對外API,如圖:

wKgZombzu4eAKKRfAAELEb5IAI4324.jpg

4.5 編譯

在SDK根目錄打開命令行,輸入命令.build.bat -l .amaziot_bloom_os_sdksamplelibraries20.9_di_xtu

PS F:3.asr-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08
λ .build.bat -l .amaziot_bloom_os_sdksamplelibraries20.9_di_xtu
子目錄或文件 outbin 已經(jīng)存在。
子目錄或文件 buildcJSON 已經(jīng)存在。
子目錄或文件 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.9_di_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 22 2023"" -DBUILD_TIME="" 9:48:15"" -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-bcat.1-asr16061.softwareBLOOM_OS_1606_OPENCPU_1191_A08CSDK_CODEcJSONinc -IF:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A08/amaziot_bloom_os_sdk/sample/libraries/20.9_di_xtuaminc -IF:/3.asr-b/cat.1-asr1606/1.software/BLOOM_OS_1606_OPENCPU_1191_A08/amaziot_bloom_os_sdk/sample/libraries/20.9_di_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 -DDTU_TYPE_DODIAI_INCLUDE -DDTU_TYPE_JSON_INCLUDE  -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.9_di_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_hb.o buildobj/am_di.o buildobj/am_do.o buildobj/am_ai.o buildobj/am_clock.o buildobj/am_json.o buildobj/am_socket.o buildCSDK_CODE.lib 
                -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.8006cd70.0000d40c.8006d000|0000d40c->00003000
|This Is LteOnly 4M|
|RW_CPZ_2|PS_NCAH |7e388000.8007a17c.00001300.80070000|00001300->00001000
|This Is LteOnly 4M|
|RW_CPZ_3|ITCM    |7e3dac00.8007b47c.0000f51c.80071000|0000f51c->0000a000
|This Is LteOnly 4M|
|RW_CPZ_4|CODE_PS |7e1ad000.8008a998.0002fcdc.8007b000|0002fcdc->0001e000
|This Is LteOnly 4M|
|RW_CPZ_5|CODEPSB |7e1df000.800ba674.000339c0.80099000|000339c0->0001b000
|This Is LteOnly 4M|
|RW_CPZ_6|CODEPSC |7e216000.800ee034.000323ec.800b4000|000323ec->0001b000
|This Is LteOnly 4M|
|RW_CPZ_7|CODEPSD |7e24c000.80120420.00028d88.800cf000|00028d88->0001a000
|This Is LteOnly 4M|
|RW_CPZ_8|CODEPSE |7e27a000.801491a8.0002e310.800e9000|0002e310->0001a000
|This Is LteOnly 4M|
|RW_CPZ_9|CODEPSF |7e2ac000.801774b8.0001c948.80103000|0001c948->00011000
|This Is LteOnly 4M|
|RW_CPZ_A|CODE_PL |7e2cd000.80193e00.0002f914.80114000|0002f914->0001e000
|This Is LteOnly 4M|
|RW_CPZ_B|CODEPLB |7e2fd000.801c3714.00038d38.80132000|00038d38->00021000
|This Is LteOnly 4M|
|RW_CPZ_C|CODEPLC |7e337000.801fc44c.000268d4.80153000|000268d4->00012000
|--------|--------|--------.--------.--------.--------|------------------------------|
|                                                     |      0x0020bd20 -> 0x0014e000|
|                                                     |       2.046(MB) ->  1.305(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.9_di_xtu'
"copy NEZHAC_CP_CNR_MIFI_TX.bin to ./ "

已復(fù)制         1 個文件。

4.6 生成固件

參考入門中開發(fā)工具,生成工具。

4.7 查看現(xiàn)象

固件下載到模組后,發(fā)送DI 配置AT指令,觀察AT串口信息

wKgaombzu4iAG6U7AAFD3KWJdwQ121.jpg

觸發(fā)di后,使用查看命令

[11-22 09:55:58:926]
[11-22 09:56:02:721]RDY
[11-22 09:56:08:620]
[11-22 09:56:08:620]OK
[11-22 09:56:12:229]
[11-22 09:56:12:229]+DI1CFG:0,0,0
[11-22 09:56:12:229]+DI2CFG:0,0,0
[11-22 09:56:12:229]+DI3CFG:0,0,0
[11-22 09:56:12:229]+DI4CFG:0,0,0
[11-22 09:56:12:229]+DI5CFG:0,0,0
[11-22 09:56:12:229]
[11-22 09:56:12:229]OK
[11-22 09:56:13:737]
[11-22 09:56:13:737]AT+DICFG=5,0,10,0
[11-22 09:56:13:737]
[11-22 09:56:13:737]OK
[11-22 09:56:15:727]
[11-22 09:56:15:727]+DI1CFG:0,0,0
[11-22 09:56:15:727]+DI2CFG:0,0,0
[11-22 09:56:15:727]+DI3CFG:0,0,0
[11-22 09:56:15:727]+DI4CFG:0,0,0
[11-22 09:56:15:727]+DI5CFG:0,10,0
[11-22 09:56:15:727]
[11-22 09:56:15:727]OK
[11-22 09:56:24:814]
[11-22 09:56:24:814]+DIRD:0
[11-22 09:56:24:814]
[11-22 09:56:24:814]OK

5 總結(jié)

根據(jù)實驗現(xiàn)象,用戶需要實現(xiàn)自己的AT指令,只需要參考組件中的例子,按照自己需求修改,

本文章源自奇跡物聯(lián)開源的物聯(lián)網(wǎng)應(yīng)用知識庫Cellular IoT Wiki,更多技術(shù)干貨歡迎關(guān)注收藏Wiki:Cellular IoT Wiki 知識庫(https://rckrv97mzx.feishu.cn/wiki/wikcnBvAC9WOkEYG5CLqGwm6PHf)

歡迎同學(xué)們走進(jìn)AmazIOT知識庫的世界!

這里是為物聯(lián)網(wǎng)人構(gòu)建的技術(shù)應(yīng)用百科,以便幫助你更快更簡單的開發(fā)物聯(lián)網(wǎng)產(chǎn)品。

Cellular IoT Wiki初心:

在我們長期投身于蜂窩物聯(lián)網(wǎng) ODM/OEM 解決方案的實踐過程中,一直被物聯(lián)網(wǎng)技術(shù)碎片化與產(chǎn)業(yè)資源碎片化的問題所困擾。從產(chǎn)品定義、芯片選型,到軟硬件研發(fā)和測試,物聯(lián)網(wǎng)技術(shù)的碎片化以及產(chǎn)業(yè)資源的碎片化,始終對團(tuán)隊的產(chǎn)品開發(fā)交付質(zhì)量和效率形成制約。為了減少因物聯(lián)網(wǎng)碎片化而帶來的重復(fù)開發(fā)工作,我們著手對物聯(lián)網(wǎng)開發(fā)中高頻應(yīng)用的技術(shù)知識進(jìn)行沉淀管理,并基于 Bloom OS 搭建了不同平臺的 RTOS 應(yīng)用生態(tài)。后來我們發(fā)現(xiàn),很多物聯(lián)網(wǎng)產(chǎn)品開發(fā)團(tuán)隊都面臨著相似的困擾,于是,我們決定向全體物聯(lián)網(wǎng)行業(yè)開發(fā)者開放奇跡物聯(lián)內(nèi)部沉淀的應(yīng)用技術(shù)知識庫 Wiki,期望能為更多物聯(lián)網(wǎng)產(chǎn)品開發(fā)者減輕一些重復(fù)造輪子的負(fù)擔(dān)。

Cellular IoT Wiki沉淀的技術(shù)內(nèi)容方向如下:

wKgaombqoM2AYL2RAAQrZ8e-uz8392.jpg

奇跡物聯(lián)的業(yè)務(wù)服務(wù)范圍:基于自研的NB-IoT、Cat1、Cat4等物聯(lián)網(wǎng)模組,為客戶物聯(lián)網(wǎng)ODM/OEM解決方案服務(wù)。我們的研發(fā)技術(shù)中心在石家莊,PCBA生產(chǎn)基地分布在深圳、石家莊、北京三個工廠,滿足不同區(qū)域&不同量產(chǎn)規(guī)模&不同產(chǎn)品開發(fā)階段的生產(chǎn)制造任務(wù)。跟傳統(tǒng)PCBA工廠最大的區(qū)別是我們只服務(wù)物聯(lián)網(wǎng)行業(yè)客戶。

連接我們,和10000+物聯(lián)網(wǎng)開發(fā)者一起 降低技術(shù)和成本門檻

讓蜂窩物聯(lián)網(wǎng)應(yīng)用更簡單~~

哈哈你終于滑到最重要的模塊了,

千萬不!要!劃!走!忍住沖動!~

歡迎加入飛書“開源技術(shù)交流”,隨時找到我們哦~

點擊鏈接如何加入奇跡物聯(lián)技術(shù)話題群(https://rckrv97mzx.feishu.cn/docx/Xskpd1cFQo7hu9x5EuicbsjTnTf)可以獲取加入技術(shù)話題群攻略

Hey 物聯(lián)網(wǎng)從業(yè)者,

你是否有了解過奇跡物聯(lián)的官方公眾號“eSIM物聯(lián)工場”呢?

這里是奇跡物聯(lián)的物聯(lián)網(wǎng)應(yīng)用技術(shù)開源wiki主陣地,歡迎關(guān)注公眾號,不迷路~

及時獲得最新物聯(lián)網(wǎng)應(yīng)用技術(shù)沉淀發(fā)布


(如有侵權(quán),聯(lián)系刪除)

審核編輯 黃宇

聲明:本文內(nèi)容及配圖由入駐作者撰寫或者入駐合作網(wǎng)站授權(quán)轉(zhuǎn)載。文章觀點僅代表作者本人,不代表電子發(fā)燒友網(wǎng)立場。文章及其配圖僅供工程師學(xué)習(xí)之用,如有內(nèi)容侵權(quán)或者其他違規(guī)問題,請聯(lián)系本站處理。 舉報投訴
  • 物聯(lián)網(wǎng)
    +關(guān)注

    關(guān)注

    2909

    文章

    44635

    瀏覽量

    373354
  • RTU
    RTU
    +關(guān)注

    關(guān)注

    0

    文章

    413

    瀏覽量

    28679
收藏 人收藏

    評論

    相關(guān)推薦

    TCL樂華2111DI2116DI彩電OM8838芯片原理圖相關(guān)資料推薦

    TCL樂華2111DI/2116DI彩電(OM8838芯片)原理圖文件下載
    發(fā)表于 05-27 06:51

    TCL2511DI2539DI彩電原理圖相關(guān)資料分享

    TCL 2511DI/2539DI彩電原理圖文件下載
    發(fā)表于 06-04 06:27

    TCL2511DI2539DI彩電原理圖相關(guān)資料推薦

    TCL 2511DI/2539DI彩電原理圖文件下載
    發(fā)表于 06-24 09:50

    大量供應(yīng)金鴿科技8AI+8DO+8DI以太網(wǎng)遠(yuǎn)程IO模塊

    金鴿科技8AI+8DO+8DI以太網(wǎng)遠(yuǎn)程IO模塊的通信規(guī)約采用標(biāo)準(zhǔn) Modbus TCP 協(xié)議、Modbus RTU over TCP 協(xié)議、MQTT 協(xié)議;金鴿科技8AI+8DO+8DI以太網(wǎng)遠(yuǎn)程IO模塊的應(yīng)用如圖金鴿科技8A
    發(fā)表于 12-23 15:12

    通過DAQ實現(xiàn)開關(guān)量輸入(DI)_labview程序案例

    程序案例 通過DAQ實現(xiàn)開關(guān)量輸入(DI),喜歡的朋友可以下載來學(xué)習(xí)。
    發(fā)表于 01-13 16:12 ?54次下載

    利用LabVIEWCVI實現(xiàn)數(shù)字量輸入(DI)_程序案例

    程序案例 利用LabVIEWCVI實現(xiàn)數(shù)字量輸入(DI
    發(fā)表于 01-13 16:21 ?5次下載

    利用LabWindowsCVI實現(xiàn)開關(guān)量輸入DI_程序案例

    程序案例 利用LabWindowsCVI實現(xiàn)開關(guān)量輸入DI
    發(fā)表于 01-13 16:24 ?9次下載

    利用LabVIEWDAQ實現(xiàn)開關(guān)量輸入(DI)_程序案例

    程序案例 利用LabVIEWDAQ實現(xiàn)開關(guān)量輸入(DI
    發(fā)表于 01-14 15:33 ?13次下載

    基于Labview開關(guān)量輸入的實現(xiàn)集合(DI)_程序案例

    程序案例 基于Labview開關(guān)量輸入的實現(xiàn)集合(DI
    發(fā)表于 01-14 15:33 ?56次下載

    Proteus在MCS&ARM的應(yīng)用之Di-Di_Alarm

    【好程序系列】Proteus在MCS&ARM的應(yīng)用之Di-Di Alarm
    發(fā)表于 01-20 15:15 ?9次下載

    di185規(guī)格明細(xì)

    di185規(guī)格明細(xì)
    發(fā)表于 09-08 16:49 ?13次下載
    <b class='flag-5'>di</b>185規(guī)格明細(xì)

    di131規(guī)格明細(xì)

    di131規(guī)格明細(xì)
    發(fā)表于 09-08 16:53 ?6次下載
    <b class='flag-5'>di</b>131規(guī)格明細(xì)

    怎么設(shè)置變頻器DI端口?

    控制板自帶7個DI端口,編號為DI1~DI7。DI端口的內(nèi)部硬件上配有24Vdc檢測用電源,用戶只需將DI端口與COM端口短接,即可給變頻器
    發(fā)表于 06-12 17:37 ?6211次閱讀
    怎么設(shè)置變頻器<b class='flag-5'>DI</b>端口?

    Orbotech Corus DI系統(tǒng)可實現(xiàn)PCB板雙面成像

    Orbotech Corus DI系統(tǒng)采用雙面成像 (DSI?) 技術(shù),是業(yè)界首創(chuàng)的創(chuàng)新技術(shù),可實現(xiàn)PCB板雙面成像,無需多個獨立的DI、裝載/卸載和翻轉(zhuǎn)系統(tǒng)。
    的頭像 發(fā)表于 10-26 17:46 ?1743次閱讀

    通博聯(lián)帶io口的智能網(wǎng)關(guān)實現(xiàn)DI、DO數(shù)據(jù)采集

    的數(shù)字信號。如何實現(xiàn)DI、DO數(shù)據(jù)采集? 通博聯(lián)帶IO口的智能網(wǎng)關(guān)WG593是一種具有數(shù)據(jù)采集和傳輸功能的設(shè)備,它可以連接多個傳感器和執(zhí)行器,能夠?qū)I、AO、
    的頭像 發(fā)表于 10-10 16:45 ?745次閱讀
    <b class='flag-5'>物</b>通博聯(lián)帶io口的智能網(wǎng)關(guān)<b class='flag-5'>實現(xiàn)</b><b class='flag-5'>DI</b>、DO數(shù)據(jù)采集