Other Parts Discussed in Thread: SYSCONFIG
Tool/software: Code Composer Studio
Hello Sir!
Now i test that two board (collector & sensor) are connection test
I used that sdk is simplelink_cc13x2_26x2_sdk_3_20_00_68 and boards are not cc1352p_lunchxl(there are developed for my system)
RF Configuration is set by syscfg tool
It looks like below that
1.sensor board run unlimit loop
void Sensor_process(void) { /* Start the collector device in the network */ if(Sensor_events & SENSOR_START_EVT) { GPIO_write(Board_PIN_LED0,0); // GPIO_write() is operating GPIO_write(Board_PIN_LED1,0); // GPIO_write() is operating ApiMac_deviceDescriptor_t devInfo; Llc_netInfo_t parentInfo; #ifdef USE_DMM uint32_t frameCounter = 0; /* update policy */ DMMPolicy_updateStackState(DMMPolicy_StackRole_154Sensor, DMMPOLICY_STACKSTATE_154SENSOR_PROVISIONING); Sensor_securityInit(frameCounter); #endif /* USE_DMM */ if(Ssf_getNetworkInfo(&devInfo, &parentInfo ) == true) { Ssf_configSettings_t configInfo; #ifdef FEATURE_MAC_SECURITY ApiMac_status_t stat; #endif /* FEATURE_MAC_SECURITY */ /* Do we have config settings? */ if(Ssf_getConfigInfo(&configInfo) == true) { /* Save the config information */ configSettings.frameControl = configInfo.frameControl; configSettings.reportingInterval = configInfo.reportingInterval; configSettings.pollingInterval = configInfo.pollingInterval; /* Update the polling interval in the LLC */ Jdllc_setPollRate(configSettings.pollingInterval); } /* Initially, setup the parent as the collector */ if(parentInfo.fh == true && CONFIG_RX_ON_IDLE) { collectorAddr.addrMode = ApiMac_addrType_extended; memcpy(&collectorAddr.addr.extAddr, parentInfo.devInfo.extAddress, APIMAC_SADDR_EXT_LEN); } else { collectorAddr.addrMode = ApiMac_addrType_short; collectorAddr.addr.shortAddr = parentInfo.devInfo.shortAddress; } #ifdef FEATURE_MAC_SECURITY /* Put the parent in the security device list */ stat = Jdllc_addSecDevice(parentInfo.devInfo.panID, parentInfo.devInfo.shortAddress, &parentInfo.devInfo.extAddress, 0); if(stat != ApiMac_status_success) { Ssf_displayError("Auth Error: 0x", (uint8_t)stat); } #endif /* FEATURE_MAC_SECURITY */ #ifdef FEATURE_SECURE_COMMISSIONING if(!CONFIG_FH_ENABLE) { nvDeviceKeyInfo_t devKeyInfo; SM_seedKey_Entry_t * pSeedKeyEnty; if(Ssf_getDeviceKeyInfo(&devKeyInfo) == TRUE) { /* Update the seedKeyTable and MAC Key Table */ /* Use its own ext address */ updateSeedKeyFromNV(&devInfo,&devKeyInfo); pSeedKeyEnty = getEntryFromSeedKeyTable(devInfo.extAddress,devInfo.shortAddress); /* Do not change the order below to lines */ /* Copy collector ext Address first */ memcpy(commissionDevInfo.extAddress, parentInfo.devInfo.extAddress, sizeof(ApiMac_sAddrExt_t)); addDeviceKey(pSeedKeyEnty,devKeyInfo.deviceKey, true); LCD_WRITE_STRING("KeyInfo recovered", 6); } } #endif Jdllc_rejoin(&devInfo, &parentInfo); rejoining = true; } else { GPIO_write(Board_PIN_LED0,1); // GPIO_write() is operating GPIO_write(Board_PIN_LED1,1); // GPIO_write() is operating /* Get Start Timestamp */ #ifdef OSAL_PORT2TIRTOS <-- sensor board run and not action anyother joinTimeTicks = Clock_getTicks(); #else joinTimeTicks = ICall_getTicks(); #endif Jdllc_join(); } }
So i thank that
If Ssf_getNetworkinfo() function is reading data from Flash memory but I not write data to Flash memory so flash memory is empty
2.Collector board is run unlimit repeat
Collector_events & COLLECTOR_TRACKING_TIMEOUT_EVT -> Collector_events & COLLECTOR_BROADCAST_TIMEOUT_EVT
->Collector_events & COLLECTOR_TRACKING_TIMEOUT_EVT
void Collector_process(void) { /* Start the collector device in the network */ if(Collector_events & COLLECTOR_START_EVT) { if(cllcState == Cllc_states_initWaiting) { processStartEvent(); } } /* Is it time to send the next tracking message? */ if(Collector_events & COLLECTOR_TRACKING_TIMEOUT_EVT) { /* Process Tracking Event */ generateTrackingRequests(); display = Display_open(Display_Type_HOST, NULL); Display_printf(display, 0, 0, "Collect tracking timeout event", NULL, NULL); GPIO_write(Board_STATE_LED2,0); // GPIO_write() is operating GPIO_write(Board_STATE_LED1,1); // GPIO_write() is operating GPIO_write(Board_STATE_LED3,1); // GPIO_write() is operating /* Clear the event */ Util_clearEvent(&Collector_events, COLLECTOR_TRACKING_TIMEOUT_EVT); } /* The generate a config request for all associated devices that need one */ if(Collector_events & COLLECTOR_CONFIG_EVT) { #ifdef FEATURE_SECURE_COMMISSIONING if(SM_Last_State != SM_CM_InProgress) { generateConfigRequests(); } #else generateConfigRequests(); #endif /* Clear the event */ Util_clearEvent(&Collector_events, COLLECTOR_CONFIG_EVT); } /* Collector generate a broadcast command message for FH mode */ if(Collector_events & COLLECTOR_BROADCAST_TIMEOUT_EVT) { /* Clear the event */ Util_clearEvent(&Collector_events, COLLECTOR_BROADCAST_TIMEOUT_EVT); if(FH_BROADCAST_INTERVAL > 0 && (!CERTIFICATION_TEST_MODE)) { generateBroadcastCmd(); /* set clock for next broadcast command */ Csf_setBroadcastClock(FH_BROADCAST_INTERVAL); } display = Display_open(Display_Type_HOST, NULL); Display_printf(display, 0, 0, "Collect broadcast timeout event", NULL, NULL); GPIO_write(Board_STATE_LED1,1); // GPIO_write() is operating GPIO_write(Board_STATE_LED2,1); // GPIO_write() is operating GPIO_write(Board_STATE_LED3,1); // GPIO_write() is operating } /* Process LLC Events */ Cllc_process(); /* Allow the Specific functions to process */ Csf_processEvents(); #ifdef FEATURE_SECURE_COMMISSIONING /* Allow the security manager specific functions to process */ SM_process(); #endif /* FEATURE_SECURE_COMMISSIONING */ /* Don't process ApiMac messages until all of the collector events are processed. */ #ifdef FEATURE_SECURE_COMMISSIONING if((Collector_events == 0) && (SM_events == 0)) #else if(Collector_events == 0) #endif { /* Wait for response message or events */ ApiMac_processIncoming(); } }
It is not connect with collector and sensor but i don't why
I always thank that your answer.