This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LAUNCHXL-CC26X2R1: COAP messages are stopped sending

Part Number: LAUNCHXL-CC26X2R1
Other Parts Discussed in Thread: CC2652R7, CC1352P

Hello everyone, I've been struggling with this problem for quite some time now. Setting up OTBR from scratch. I connect the device to the network, and for a while everything is fine, but after some arbitrary period of time, sending post messages stops. GET will continue to process, but POST will not. I’ve already broken my head and don’t know where to dig and what to look at. I really hope for the community's help. I am attaching the otbr logs as well as the package logs from ubiqua and the code of the firmware itself. In fact, the firmware is a converted example of tempsensor

#include <assert.h>
#include <stddef.h>
#include <string.h>
#include <stdio.h>
#include <time.h>
#include <openthread/coap.h>
#include <openthread/ip6.h>
#include <openthread/link.h>
#include <openthread/thread.h>
#include <utils/uart.h>
#include <sched.h>
#include <pthread.h>
#include <mqueue.h>
#include <ti/drivers/GPIO.h>
#include <ti/drivers/apps/LED.h>
#include <ti/drivers/apps/Button.h>
#include <ti/display/Display.h>
#include <ti/drivers/Watchdog.h>
#include "otsupport/otrtosapi.h"
#include "otsupport/otinstance.h"
#include "ti_drivers_config.h"
#include "tempsensor.h"
#include "utils/code_utils.h"
#include "otstack.h"
#include "task_config.h"
#include "tiop_config.h"
#include "I2cSensor.h"
#include "disp_utils.h"

Watchdog_Handle watchdogHandle;
#define TIMEOUT_MS 30000

#define TIOP_TEMPSENSOR_REPORTING_INTERVAL 10000


#define DEFAULT_COAP_HEADER_TOKEN_LEN      2


#define TEMPSENSOR_PROC_QUEUE_MAX_MSG     (11)

struct TempSensor_procQueueMsg {
    TempSensor_evt evt;
};


static timer_t reportTimerID;

static otIp6Address multicastAddress;

static otIp6Address reportingAddress;

static char eui64[20] = {'\0'};

static uint16_t peerPort = OT_DEFAULT_COAP_PORT;

const char TempSensor_procQueueName[] = "ts_process";
static mqd_t TempSensor_procQueueDesc;

static char stack[TASK_CONFIG_TEMPSENSOR_TASK_STACK_SIZE];

static char data[40] = {'\0'};

static bool serverSetup;

//FROM CUI
void updateLedsWithChangeRole(otDeviceRole role);
static LED_Handle redLedHandle;
static LED_Handle greenLedHandle;
static Button_Handle rightButtonHandle;

static void *TempSensor_task(void *arg0);

static void reportingTimeoutCB(union sigval val);

static void configureReportingTimer(void) {
    struct sigevent event = {
            .sigev_notify_function = reportingTimeoutCB,
            .sigev_notify          = SIGEV_SIGNAL,
    };

    timer_create(CLOCK_MONOTONIC, &event, &reportTimerID);
}

static void startReportingTimer(uint32_t timeout) {
    struct itimerspec newTime = {0};
    struct itimerspec zeroTime = {0};
    struct itimerspec currTime;
    newTime.it_value.tv_sec = (timeout / 1000U);
    newTime.it_value.tv_nsec = ((timeout % 1000U) * 1000000U);
    timer_gettime(reportTimerID, &currTime);
    if ((currTime.it_value.tv_sec != 0) || (currTime.it_value.tv_nsec != 0)) {
        timer_settime(reportTimerID, 0, &zeroTime, NULL);
    }
    timer_settime(reportTimerID, 0, &newTime, NULL);
}

static void reportingTimeoutCB(union sigval val) {
    TempSensor_postEvt(TempSensor_evtReportTemp);
    (void) val;
}

void myServerIpHandler(void *aContext, otMessage *aMessage, const otMessageInfo *aMessageInfo, otError aResult) {
    DISPUTILS_SERIALPRINTF(0, 0, "request handler called\n");
    if(data[0] == '\0'){
        uint16_t offset = otMessageGetOffset(aMessage);
        uint16_t read = otMessageRead(aMessage, offset, data, 40 - 1);
        data[read] = '\0';
    DISPUTILS_SERIALPRINTF(0, 0, "server ip setted ip: %s\n", data);
    }
}

static void tempSensorReport(void) {


    otError error = OT_ERROR_NONE;
    otMessage *requestMessage = NULL;
    otMessageInfo messageInfo;
    otMessageInfo putMessageInfo;
    otInstance *instance = OtInstance_get();

    DISPUTILS_SERIALPRINTF(0, 0, "start reporting function first symbol ip: %c\n", data[0]);
    if(data[0] == '\0'){
        DISPUTILS_SERIALPRINTF(0, 0, "Starting request server IP\n");
        otExtAddress extAddress;
        OtRtosApi_lock();
        otLinkGetFactoryAssignedIeeeEui64(OtInstance_get(), &extAddress);
        OtRtosApi_unlock();
        sprintf(eui64, "0x%02x%02x%02x%02x%02x%02x%02x%02x",
                extAddress.m8[0], extAddress.m8[1], extAddress.m8[2],
                extAddress.m8[3], extAddress.m8[4], extAddress.m8[5],
                extAddress.m8[6], extAddress.m8[7]);
        eui64[19] = '\0';
        OtRtosApi_lock();
        requestMessage = otCoapNewMessage(instance, NULL);
        otEXPECT_ACTION(requestMessage != NULL, error = OT_ERROR_NO_BUFS);
        otCoapMessageInit(requestMessage, OT_COAP_TYPE_NON_CONFIRMABLE, OT_COAP_CODE_GET);
        otCoapMessageGenerateToken(requestMessage, DEFAULT_COAP_HEADER_TOKEN_LEN);
        error = otCoapMessageAppendUriPathOptions(requestMessage,
                                                  GET_SERVER_IP_URI);
        OtRtosApi_unlock();
        otEXPECT(OT_ERROR_NONE == error);
        OtRtosApi_lock();
        otCoapMessageSetPayloadMarker(requestMessage);
        OtRtosApi_unlock();
        OtRtosApi_lock();
        error = otMessageAppend(requestMessage, eui64,
                                strlen(eui64));
        OtRtosApi_unlock();
        memset(&messageInfo, 0, sizeof(messageInfo));
        OtRtosApi_lock();
        otIp6AddressFromString("FF03::2", &multicastAddress);
        OtRtosApi_unlock();
        messageInfo.mPeerAddr = multicastAddress;
        messageInfo.mPeerPort = peerPort;

        OtRtosApi_lock();
        error = otCoapSendRequest(instance, requestMessage, &messageInfo, &myServerIpHandler,
                                  NULL);
        DISPUTILS_SERIALPRINTF(0, 0, "IP requested\n");
        OtRtosApi_unlock();
    } else {
        DISPUTILS_SERIALPRINTF(0, 0, "Starting sending report\n");
        float temperatureValue = 0.0;
        float humidityValue = 0.0;
        Watchdog_clear(watchdogHandle);
        DISPUTILS_SERIALPRINTF(0, 0, "watchdog restarted\n");
//        getTemperature(&temperatureValue);
//        getHumidity(&humidityValue);
        DISPUTILS_SERIALPRINTF(0, 0, "readed values t: %2.1f, h: %2.0f\n", temperatureValue, humidityValue);
        OtRtosApi_lock();
        requestMessage = otCoapNewMessage(instance, NULL);
        otEXPECT_ACTION(requestMessage != NULL, error = OT_ERROR_NO_BUFS);
        otCoapMessageInit(requestMessage, OT_COAP_TYPE_NON_CONFIRMABLE, OT_COAP_CODE_POST);
        otCoapMessageGenerateToken(requestMessage, DEFAULT_COAP_HEADER_TOKEN_LEN);
        error = otCoapMessageAppendUriPathOptions(requestMessage,
                                                  PUT_SENSOR_DATA_URI);
        OtRtosApi_unlock();
        OtRtosApi_lock();
        otIp6AddressFromString(data, &reportingAddress);
        OtRtosApi_unlock();
        OtRtosApi_lock();
        otCoapMessageSetPayloadMarker(requestMessage);
        OtRtosApi_unlock();

        char str[200] = {'\0'};
        sprintf(str, "{\"eui64\":\"%s\", \"params\": [{\"name\": \"TEMPERATURE\", \"value\": %2.1f}, {\"name\":\"HUMIDITY\", \"value\": %2.0f}]}",
                eui64, temperatureValue, humidityValue);

        OtRtosApi_lock();
        error = otMessageAppend(requestMessage, str,
                                strlen(str));
        OtRtosApi_unlock();
        memset(&putMessageInfo, 0, sizeof(putMessageInfo));
        putMessageInfo.mPeerAddr = reportingAddress;
        putMessageInfo.mPeerPort = peerPort;
        OtRtosApi_lock();
        error = otCoapSendRequest(instance, requestMessage, &putMessageInfo, NULL,
                                  NULL);
        OtRtosApi_unlock();
        char ip[40];
        OtRtosApi_lock();
        otIp6AddressToString(&reportingAddress, ip, 40);
        OtRtosApi_unlock();
        DISPUTILS_SERIALPRINTF(0, 0, "Data sended. data: %s, ip: %s:\n", eui64, ip);
    }
    startReportingTimer(TIOP_TEMPSENSOR_REPORTING_INTERVAL);
    exit:
    if (error != OT_ERROR_NONE && requestMessage != NULL) {
        OtRtosApi_lock();
        otMessageFree(requestMessage);
        OtRtosApi_unlock();
    }
}

static otError setupCoap(otInstance *aInstance) {
    otError error = OT_ERROR_NONE;
    OtRtosApi_lock();
    error = otCoapStart(aInstance, OT_DEFAULT_COAP_PORT);
    OtRtosApi_unlock();
    otEXPECT(OT_ERROR_NONE == error);
    exit:
    return error;
}

static void processOtStackEvents(uint8_t event, void *aContext) {
    (void) aContext;
    switch (event) {
        case OT_STACK_EVENT_NWK_JOINED: {
            TempSensor_postEvt(TempSensor_evtNwkJoined);
            break;
        }
        case OT_STACK_EVENT_NWK_JOINED_FAILURE: {
            TempSensor_postEvt(TempSensor_evtNwkJoinFailure);
            break;
        }
        case OT_STACK_EVENT_NWK_DATA_CHANGED: {
            TempSensor_postEvt(TempSensor_evtNwkSetup);
            break;
        }
        case OT_STACK_EVENT_DEV_ROLE_CHANGED: {
            TempSensor_postEvt(TempSensor_evtDevRoleChanged);
            break;
        }
        default: {
            break;
        }
    }
}

static void processEvent(TempSensor_evt event) {
    switch (event) {
        case TempSensor_evtReportTemp: {
            tempSensorReport();
            break;
        }
        case TempSensor_evtNwkSetup: {
            if (false == serverSetup) {
                serverSetup = true;
                (void) setupCoap(OtInstance_get());
                TempSensor_postEvt(TempSensor_evtAddressValid);
            }
            break;
        }
        case TempSensor_evtKeyRight: {
            if ((!otDatasetIsCommissioned(OtInstance_get())) &&
                (OtStack_joinState() != OT_STACK_EVENT_NWK_JOIN_IN_PROGRESS)) {
                DISPUTILS_SERIALPRINTF(0, 0, "Joining Nwk ...\n");

                OtStack_joinConfiguredNetwork();
            }
            break;
        }
        case TempSensor_evtNwkJoined: {
            DISPUTILS_SERIALPRINTF(0, 0, "Joinied Nwk\n");
            (void) OtStack_setupNetwork();
            break;
        }
        case TempSensor_evtNwkJoinFailure: {
            DISPUTILS_SERIALPRINTF(0, 0, "Join Failure\n");
            break;
        }
        case TempSensor_evtAddressValid: {
            startReportingTimer(TIOP_TEMPSENSOR_REPORTING_INTERVAL);
            break;
        }
        case TempSensor_evtDevRoleChanged: {
            OtRtosApi_lock();
            otDeviceRole role = otThreadGetDeviceRole(OtInstance_get());
            OtRtosApi_unlock();
            updateLedsWithChangeRole(role);
            break;
        }
        default: {
            break;
        }
    }
}


void otPlatUartReceived(const uint8_t *aBuf, uint16_t aBufLength) {
    (void) aBuf;
    (void) aBufLength;
}

void otPlatUartSendDone(void) {

}

void TempSensor_postEvt(TempSensor_evt event) {
    struct TempSensor_procQueueMsg msg;
    int ret;
    msg.evt = event;
    ret = mq_send(TempSensor_procQueueDesc, (const char *) &msg, sizeof(msg), 0);
    assert(0 == ret);
    (void) ret;
}

void TempSensor_taskCreate(void) {
    pthread_t thread;
    pthread_attr_t pAttrs;
    struct sched_param priParam;
    int retc;
    retc = pthread_attr_init(&pAttrs);
    assert(retc == 0);
    retc = pthread_attr_setdetachstate(&pAttrs, PTHREAD_CREATE_DETACHED);
    assert(retc == 0);
    priParam.sched_priority = TASK_CONFIG_TEMPSENSOR_TASK_PRIORITY;
    retc = pthread_attr_setschedparam(&pAttrs, &priParam);
    assert(retc == 0);
    retc = pthread_attr_setstack(&pAttrs, (void *) stack,
                                 TASK_CONFIG_TEMPSENSOR_TASK_STACK_SIZE);
    assert(retc == 0);
    retc = pthread_create(&thread, &pAttrs, TempSensor_task, NULL);
    assert(retc == 0);
    retc = pthread_attr_destroy(&pAttrs);
    assert(retc == 0);
    (void) retc;
}

void processKeyChangeCB(Button_Handle _buttonHandle, Button_EventMask _buttonEvents) {
    if (_buttonHandle == rightButtonHandle && _buttonEvents & Button_EV_CLICKED) {
        TempSensor_postEvt(TempSensor_evtKeyRight);
    }
}

void initButtonsAndLeds() {
    Button_Params bparams;
    LED_Params ledParams;
    Button_Params_init(&bparams);
    bparams.buttonEventMask = Button_EV_CLICKED;
    rightButtonHandle = Button_open(CONFIG_BTN_RIGHT, &bparams);
    if (!GPIO_read(((Button_HWAttrs *) rightButtonHandle->hwAttrs)->gpioIndex)) {
        OtRtosApi_lock();
        otInstanceFactoryReset(OtInstance_get());
        OtRtosApi_unlock();
    }
    Button_setCallback(rightButtonHandle, processKeyChangeCB);
    greenLedHandle = LED_open(CONFIG_LED_GREEN, &ledParams);
    redLedHandle = LED_open(CONFIG_LED_RED, &ledParams);
}

void updateLedsWithChangeRole(otDeviceRole role) {
    switch (role) {
        case OT_DEVICE_ROLE_DISABLED: {
            LED_setOff(greenLedHandle);
            LED_setOff(redLedHandle);
            break;
        }
        case OT_DEVICE_ROLE_DETACHED: {
            LED_setOff(greenLedHandle);
            LED_setOn(redLedHandle, LED_BRIGHTNESS_MAX);
            break;
        }
        case OT_DEVICE_ROLE_CHILD: {
            LED_setOn(greenLedHandle, LED_BRIGHTNESS_MAX);
            LED_setOff(redLedHandle);
            break;
        }
        case OT_DEVICE_ROLE_ROUTER: {
            LED_setOn(greenLedHandle, LED_BRIGHTNESS_MAX);
            LED_setOff(redLedHandle);
            break;
        }
        case OT_DEVICE_ROLE_LEADER: {
            LED_setOn(greenLedHandle, LED_BRIGHTNESS_MAX);
            LED_setOn(redLedHandle, LED_BRIGHTNESS_MAX);
            break;
        }
    }
}
void watchdogCallback(uintptr_t watchdogHandle)
{
    while (1) {}
}
void *TempSensor_task(void *arg0) {
    Watchdog_Params params;
    uint32_t reloadValue;
    Watchdog_Params_init(&params);
    params.callbackFxn    = (Watchdog_Callback)watchdogCallback;
    params.debugStallMode = Watchdog_DEBUG_STALL_ON;
    params.resetMode      = Watchdog_RESET_ON;
    watchdogHandle = Watchdog_open(CONFIG_WATCHDOG0, &params);
    reloadValue = Watchdog_convertMsToTicks(watchdogHandle, TIMEOUT_MS);
    if (reloadValue != 0)
    {
        Watchdog_setReload(watchdogHandle, reloadValue);
    }

    struct mq_attr attr;
    bool commissioned;
    mqd_t procQueueLoopDesc;
    attr.mq_curmsgs = 0;
    attr.mq_flags = 0;
    attr.mq_maxmsg = TEMPSENSOR_PROC_QUEUE_MAX_MSG;
    attr.mq_msgsize = sizeof(struct TempSensor_procQueueMsg);
    TempSensor_procQueueDesc = mq_open(TempSensor_procQueueName,
                                       (O_WRONLY | O_NONBLOCK | O_CREAT),
                                       0, &attr);
    procQueueLoopDesc = mq_open(TempSensor_procQueueName, O_RDONLY, 0, NULL);
    DispUtils_open();
    OtStack_taskCreate();
    OtStack_registerCallback(processOtStackEvents);
    OtRtosApi_lock();
    otLinkSetPollPeriod(OtInstance_get(), TIOP_CONFIG_POLL_PERIOD);
    OtRtosApi_unlock();
    initButtonsAndLeds();
    OtRtosApi_lock();
    commissioned = otDatasetIsCommissioned(OtInstance_get());
    OtRtosApi_unlock();
    if (true == commissioned) {
        OtStack_setupInterfaceAndNetwork();
    }
    configureReportingTimer();
    /* process events */
    while (true) {
        DISPUTILS_SERIALPRINTF(0, 0, "main while\n");
        struct TempSensor_procQueueMsg msg;
        ssize_t ret;
        ret = mq_receive(procQueueLoopDesc, (char *) &msg, sizeof(msg), NULL);
        if (ret < 0 || ret != sizeof(msg)) {
            continue;
        }
        processEvent(msg.evt);
    }
    return NULL;
}

logs and sniff

  • the last successful message was at 15:35:51 (in ubiqua time is UTC, so 12:35 will be indicated in the sniffer logs)

  • Hello Aleksey,

    Please give us some more information concerning your setup:

    • What SimpleLink CC13XX / CC26XX SDK version are you using?
    • Can this issue be replicated with the default tempsensor project?
    • Are you evaluating with a TI EVM or custom PCB?
    • What is your OTBR hardware and software?
    • What is the return of otCoapSendRequest inside tempSensorReport?
    • Can you recover the device after resetting (push button or power cycle)?

    Unfortunately, I am not able to access your OneDrive folder for the sniffer and device logs.

    Regards,
    Ryan

  • Hi Alexsey,

    It might be possible that the destination address for the POST has changed.

    Can you try changing the destination address to a broadcast address?
    The default used by the tempsensor.c is #define TIOP_TEMPSENSOR_REPORTING_ADDRESS  "ff02::1".

    Thanks,
    Toby

  • Hi. I checked the address, it does not change.

  • In addition, after a while, the device drops out of the network altogether and becomes a leader

  • What SimpleLink CC13XX / CC26XX SDK version are you using?
    simplelink_cc13xx_cc26xx_sdk_7_10_01_24

    Can this issue be replicated with the default tempsensor project?
    Yes, after 2-3 days of work the same thing happens

    Are you evaluating with a TI EVM or custom PCB?
    I'm using CC26x2R1 Launchpad

    What is your OTBR hardware and software?
    Master branch from the official openthread repository. Raspberry PI 4B(Build on the recommended commit fails and fails with errors) RCP CC26x2R1 Launchpad

    What is the return of otCoapSendRequest inside tempSensorReport?
    The first call returns the server IP and the second call directly sending data returns nothing

    Can you recover the device after resetting (push button or power cycle)?
    Only by turning the power off and on, rebooting via watchdog does not help

    Unfortunately, I am not able to access your OneDrive folder for the sniffer and device logs.
    Uploaded to Google Drive: logs and sniff

    Thank you for participating)

  • Periodically, packets like this appear in wireshark:
    828 1220.546064 b2:6f:0b:5e:4d:6e:c6:ba Broadcast IEEE 802.15.4 114 Data, Dst: Broadcast, Src: b2:6f:0b:5e:4d:6e:c6:ba, Bad FCS

  • We have seen an issue in the recent past that seems to match what you observe here.

    The fix we applied for that may be referenced here:
    https://github.com/TexasInstruments/ot-ti/compare/a9dd46d64f7279974d3fd7b077e22aaf663d1460...e61f379de62125e407568056cde58c876f22ce27?diff=split

    Can you try applying these changes to your local copy of radio.c, then re-run your test to see if there are improvements?

  • Thanks for the update Aleksey, I am able to view the logs using the Google Drive link.  I recommend that you follow Toby's instructions and update us with the results when possible.

    Regards,
    Ryan

  • Thank you very much, I will definitely try it and give feedback. But since the failure manifests itself unpredictably: maybe after 5 minutes, or maybe after 1-2 days, I’ll write back in a couple of days, when I can reliably verify that everything is working stably

  • Unfortunately, the error occurred again. Attached are the otbr and wireshark logs. They also came up with this thing: errors occur quite quickly after the device is connected to the USB, which is built into the outlet, but if I connect it to the USB connector, which is on the computer, then the device works stably for much longer. This may be the problem, but if so, what can be done about it? logs

  • I couldn't figure out the timing in wireshark. but errors can be seen at the end of the log, after the last successful COAP /pub

  • and a very strange situation, watchdog reboots the device as expected, but this does not resume operation, it helps to return the device to the network only if it is disconnected from the power supply and turned on again, which is not very convenient :)

  • conducted another experiment: I introduced two devices with the same firmware into the network. They both lost their network at the same time. Could it be an RCP issue? I tried to replace it with RCP radio.c But then openthread does not see it.

  • RCP is missing required capabilities: ack-timeout tx-retries CSMA-backoff

    Oct  4 15:47:10 ubuntu otbr-agent[114414]: 51d.20:54:59.233 [C] Platform------: CheckRadioCapabilities() at radio_spinel_impl.hpp:396: RadioSpinelIncompatible

    Oct  4 15:47:10 ubuntu systemd[1]: otbr-agent.service: Main process exited, code=exited, status=3/NOTIMPLEMENTED

  • Hi Aleksey,

    Thanks for the update.

    errors occur quite quickly after the device is connected to the USB, which is built into the outlet, but if I connect it to the USB connector, which is on the computer, then the device works stably for much longer

    For now, let's keep using power supply which is known to be good (laptop's USB port) and avoid the outlet's USB port.

    and a very strange situation, watchdog reboots the device as expected, but this does not resume operation, it helps to return the device to the network only if it is disconnected from the power supply and turned on again, which is not very convenient :)

    Is the debugger connected in this case?
    According to TRM:
    "The watchdog causes a warm reset in the system. This warm reset can be blocked by ICEPick, which is useful for debugging. When ICEPick is asserted, the warm reset is blocked from the rest of the system; however, watchdog itself is reset."

    conducted another experiment: I introduced two devices with the same firmware into the network. They both lost their network at the same time. Could it be an RCP issue? I tried to replace it with RCP radio.c But then openthread does not see it.

    If it is happening at the same time, then it is possible that the issue could be at the RCP/otbr side.

    Can you try with this attached copy of RCP?

    https://e2e.ti.com/cfs-file/__key/communityserver-discussions-components-files/158/4670.rcp_5F00_CC26X2R1_5F00_LAUNCHXL_5F00_tirtos_5F00_ticlang.out

    Thanks,
    Toby

  • If it is happening at the same time, then it is possible that the issue could be at the RCP/otbr side.

    Can you try with this attached copy of RCP?

    4670.rcp_CC26X2R1_LAUNCHXL_tirtos_ticlang.out

    I'll try it in the morning, thanks!

    Is the debugger connected in this case?
    According to TRM:
    "The watchdog causes a warm reset in the system. This warm reset can be blocked by ICEPick, which is useful for debugging. When ICEPick is asserted, the warm reset is blocked from the rest of the system; however, watchdog itself is reset."

    no, the breakpoints are not installed, I understood this from the frequency of the first request, but the second request did not go through. That is, the board rebooted, but did not return to normal, and if the power supply was distorted, the behavior was corrected.

  • could you build the RCP firmware for the 1352P-4? Since for RCP I had to use my latest CC265x2R and now I don’t have a sniffer) and I can’t run the sniffer on the 1352P-4.

  • Please try building it here: https://github.com/TexasInstruments/ot-ti

    Instead of "./script/build LP_CC2652R7", use "./script/build CC1352P_4_LAUNCHXL"

  • at first i get an error


    TheCMAKE_C_COMPILER:
    /opt/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi-gcc


    I'm guessing it's because I already have ARM Toolchain installed
    I change the path to CMAKE_C_COMPILER in ./script/build to
    /Applications/ArmGNUToolchain/12.3.rel1/arm-none-eabi


    after that I run the command ./script/build CC1352P_2_LAUNCHXL


    and I get the error:


    CMake Error in source/ti/drivers/CMakeLists.txt:
    Target "tfm_dependencies_cc26x4" INTERFACE_INCLUDE_DIRECTORIES property
    contains path:
    "/opt/ot-ti/third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx/tfm_s/cc26x4/build_dependencies"

    which is prefixed in the source directory.

    Is it possible to make a build on a computer with MacOS apple silicon? I'm confused, I need RCP on 1352P_2 but I can't get it done. Slight smile

  • I have some limitation on my work PC preventing me from building this... (the image I shared earlier is something I'd built previously).

    Can you try setting up a Linux Virtual Machine, and build in that environment?
    developer.apple.com/.../creating_and_running_a_linux_virtual_machine

  • new error)


    /opt/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../ arm-none-eabi/bin/ld: bin/ot-ncp-ftd.out section `.rodata' will not fit in region `FLASH'
    /opt/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../ arm-none-eabi/bin/ld: section .ccfg LMA [0000000000057fa8,0000000000057fff] overlaps section .rodata LMA [0000000000055850,000000000005aeb3]
    /opt/gcc-arm-none-eabi-9-2020-q2-update/bin/../lib/gcc/arm-none-eabi/9.3.1/../../../../ arm-none-eabi/bin/ld: region `FLASH' overflowed by 32856 bytes
    collect2: error: ld returned 1 exit status

    At the same time, if you assemble build LP_CC2652R7, then everything goes without errors

  • I managed to build the firmware, but it doesn't work either. I removed the CLI example and left only RCP. out file was assembled without errors, but it differs from your firmware. First: the red LED does not blink. Second, otbr starts, but the devices connect to the network for a couple of seconds and immediately disconnect

    PS: I think I have found one of the solutions. Previously, instead of adding just one commit, I replaced the entire radio.c file. Now I have added only those few lines to which you sent the link. RCP has started, now I’m waiting, checking the stability of the network.

  • First: the red LED does not blink

    Correct, the LED toggle seems to have been excluded when we moved to a polling method (app_main --> otTaskletsProcess) vs the interrupt method (OtStack_task --> mq_receive).

    Second, otbr starts, but the devices connect to the network for a couple of seconds and immediately disconnect

    Can you share a log capturing this behavior?

  • I'm currently checking the stability of the system on the current version of RCP. If there is a failure again, or a couple of days of stable operation pass, then I will definitely update the firmware again with the version from ot-ti and send the logs.

  • new logs 

    my RCP remained just as unstable. I am attaching logs with firmware from the ot-ti repository

  • Some of the packets are encrypted.

    What is the Thread network key?
    You can find this on the otbr CLI command: openthread.io/.../dataset

  • Active Timestamp: 1

    Channel: 15

    Channel Mask: 0x07fff800

    Ext PAN ID: 5151515151515151

    Mesh Local Prefix: fdec:c3b4:7831:a109::/64

    Network Key: 00112233445566778899aabbccddeeff

    Network Name: OTDev

    PAN ID: 0x5151

    PSKc: 5825fe6760e0319189b38260891b2f3f

    Security Policy: 672 onrc 0

    I did not change the key, it is standard by default.

    it is specified in wireshark

  • Maybe you can tell me how you made the firmware, the link to which they sent me for CC26x2R1? I would try to assemble the same for CC1352P_2_LAUNCHXL. Because I don’t know how else I can make a stable version of RCP :( I really don’t want to switch to devices from other manufacturers because of such a small thing.

  • do you have additional information?

  • Maybe you can tell me how you made the firmware, the link to which they sent me for CC26x2R1?

    It was a combination of using an SDK and overwriting the source\third_party\openthread with a newer commit.
    This was a while back, so I think it makes more sense to use the github vs my prior approach.

    An alternative approach could potentially be to build a sniffer FW for CC1352P4.
    Reference CCS projects for that is located here: C:\Program Files (x86)\Texas Instruments\SmartRF Tools\SmartRF Packet Sniffer 2\sniffer_fw\ide

  • It was a combination of using an SDK and overwriting the source\third_party\openthread with a newer commit.

    I came to the same decision and tried again, now I launched the network and am waiting for the result

    This was a while back, so I think it makes more sense to use the github vs my prior approach.

    this solution doesn't work for me. the network is created, but the devices connect for 1-2 seconds and lose the network. I wrote about this above

  • I came to the same decision and tried again, now I launched the network and am waiting for the result

    Thanks for the update. Will wait to hear of the future result.

  • RCP works stably, there seem to be no interruptions in the network. Thanks a lot for your help. If problems arise again, I will definitely write.

  • Thank you for the update!

    For the community, could you share which commit of openthread you used on your RCP?

  • I used the master branch in the ot-ti repository