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.

CC3135: "No Cmd Ack detected" error when closing socket

Part Number: CC3135


Im using the following code to evaluate the CC3135 on a STM32L4 controller.


        auto result = sl_Start(nullptr, nullptr, nullptr);
        int ctr = 0;
        while (true) {
                printf("%d\r\n", ctr++);

                const auto sockid = sl_Socket(SL_AF_INET, SL_SOCK_STREAM, 0);

                constexpr SlTimeval_t timeVal{ 20, 0 };

                auto sockOptSetResult = sl_SetSockOpt(sockid, SL_SOL_SOCKET, SL_SO_RCVTIMEO, &timeVal, sizeof(timeVal));
                if (sockOptSetResult != 0) {
                        printf("Failed to set timeout\r\n");
                        sl_Close(sockid);
                        sl_Stop(0xFFFF);
                        sl_Start(nullptr, nullptr, nullptr);
                        ThisThread::sleep_for(1000);
                        continue;
                }
                constexpr SlSockNonblocking_t enableOption{ 1 };

                sockOptSetResult = sl_SetSockOpt(sockid, SL_SOL_SOCKET, SL_SO_NONBLOCKING, (_u8 *)&enableOption, sizeof(enableOption));
                if (sockOptSetResult != 0) {
                        printf("Failed to set nonblocking\r\n");
                        ThisThread::sleep_for(1000);
                        NVIC_SystemReset();
                }

                SlSockAddrIn_t addr;
                addr.sin_family = SL_AF_INET;
                addr.sin_port = sl_Htons(8888);

                addr.sin_addr.s_addr = sl_Htonl(SL_IPV4_VAL(192, 168, 42, 130));

                result = SLNETERR_BSD_EALREADY;

                constexpr auto POLL_INTERVAL = 10;
                constexpr auto MAX_POLL = 1000;

                for (int i = 0; i < MAX_POLL && result == SLNETERR_BSD_EALREADY; i++) {
                        result = sl_Connect(sockid, reinterpret_cast<SlSockAddr_t *>(&addr), sizeof(SlSockAddrIn_t));
                        ThisThread::yield();
                        if (result < 0) {
                                ThisThread::sleep_for(POLL_INTERVAL);
                        }
                }

                if (result < 0) {
                        printf("Failed to connect %d\n", result);
                        sl_Close(sockid);
                        continue;
                }

                constexpr auto BUFFER_SIZE = 1460;
                static char buffer[BUFFER_SIZE];
                std::transform(std::begin(buffer), std::end(buffer), std::begin(buffer),
                               [](char) -> char { return static_cast<char>(std::rand()); });

                for (int i = 0; i < 1000; i++) {
                        result = SLNETERR_BSD_EAGAIN;
                        for (int k = 0; k < MAX_POLL && result == SLNETERR_BSD_EAGAIN; k++) {

                                result = sl_Send(sockid, buffer, sizeof(buffer), 0);
                                ThisThread::yield();
                                if (result != sizeof(buffer)) {
                                        ThisThread::sleep_for(POLL_INTERVAL);
                                }
                        }

                        if (result < 0) {
                                printf("Failed to send%d\n", result);
                                NVIC_SystemReset();
                        }
                }

                result = sl_Close(sockid);
                if (result != 0) {
                        printf("Close failed %d\r\n", result);
                }
                printf("done\r\n");
        }

It usually runs for a few iterations and then throws a "FATAL ERROR: No Cmd Ack detected [cmd opcode = 0x9401]" and stops working. sl_SetSockOpt() would fail in the next iteration which would restart the module, by calling sl_Stop and sl_Start. According to the documentation this should fix the issue, but it does not. In the next iteration it would connect to AP and get IP via DHCP but again fail with the same error. In most of these cases sl_Close does return 0, but in a few rare cases it returns -2005. I only encounter this error when i try to close the socket, if i were to continuously send data it works fine.

  • Hello,

    What host driver version (or SDK plugin) are you using? Do you have the latest servicepack flashed to the CC3135?

    Best regards,

    Sarah

  • CHIP: 0x31100000
    MAC:  3.1.0.5
    PHY:  3.1.0.26
    NWP:  4.7.0.3
    ROM:  8738
    HOST: 3.0.1.65

  • I don't need to connect or transfer any data, just creating and closing sockets like in the function below is enough.

    int createAndClose()
    {
            const auto sockid = sl_Socket(SL_AF_INET, SL_SOCK_STREAM, 0);
            if (sockid < 0) {
                    printf("sock create fail:%d\r\n", sockid);
            }
            const auto result = sl_Close(sockid);
            if (result < 0) {
                    printf("sock close fail: %d\r\n", result);
            }
    
            return 0;
    }

    In the above case it throws an error exactly after 16 calls. Only socket APIs are affected, i can call the function below, that reads file from the flash, thousands of times without any issue.

    int readFile()
    {
    
            long unsigned token{};
            auto fh = sl_FsOpen(reinterpret_cast<const unsigned char *>("cacert.pem"), SL_FS_READ, &token);
            if (fh < 0) {
                    printf("failed to open: %ld\r\n", fh);
                    return -1;
            }
            static unsigned char buffer[1024];
            int result = 0;
    
            result = sl_FsRead(fh, 0, buffer, 1024);
            if (result < 0) {
                    printf("failed to read: %d", result);
            }
            constexpr char test[] = "-----BEGIN CERTIFICATE-----";
            if (strncmp(reinterpret_cast<char *>(buffer), test, sizeof(test) - 1) != 0) {
                    printf("Read failed\r\n");
            }
            result = sl_FsClose(fh, nullptr, nullptr, 0);
            if (result < 0) {
                    printf("failed to close: %d", result);
            }
    
            return 0;
    }

  • If i don't call close at the end of a transaction, i instead get "No Cmd Ack detected [cmd opcode = 0x9401]"

  • >i can call the function below, that reads file from the flash, thousands of times without any issue.

    Scratch that. That too is throwing errors after sometime.

    >In the above case it throws an error exactly after 16 calls

    It seems it doesn't have anything to do with the number of calls but rather happens after some time. If i were to repeatedly call the createAndClose()  function without any sleep(), i can make thousands of call before it fails.

  • Hello,

    What error value does sl_Close() return when you call the createAndClose() function?

    In your porting layer, are you using a RTOS? Do you have the timestamp mechanism implemented?

    Best regards,

    Sarah

  • >What error value does sl_Close() return when you call the createAndClose() function?

    Like i said, mostly zeroes but in few rare cases -2005

    >In your porting layer, are you using a RTOS? Do you have the timestamp mechanism implemented?

    Yes, I return the value from a monotonic timer(in ms).

    Atleast two other people had faced the same issue, that too on a CC3235.

    https://e2e.ti.com/support/wireless-connectivity/wifi/f/968/t/881434?BOOSTXL-CC3135-No-Cmd-Ack-detected-when-using-WLAN-NORMAL-POLICY

    https://e2e.ti.com/support/wireless-connectivity/wifi/f/968/t/865143

  • I've ported this to Linux (PI3). At high SPI clock (20MHz) it fails with sync loss. I think its because my timestamp function is not correct. I'm using the following as timestamp and SL_TIMESTAMP_TICKS_IN_10_MILLISECONDS is hardcoded to 10

    unsigned long TimerGetCurrentTimestamp()
    {
            struct timespec ts = { 0 };
            int result = clock_gettime(CLOCK_MONOTONIC, &ts);
            exitOnError(result, "timer fail");
    
            return ts.tv_sec * 1000 + (ts.tv_nsec / (1000 * 1000));
    }

    At low clocks it sends a few KiBs of data and then stalls. Attached a logic analyzer to the SPI pins and could see that the 3135 was keeping on sending a pattern 7D, B9, 9B, 57

  • I first ran clang static analyzer and cppcheck both of which found a few errors. I then ran the driver under valgrind, both memcheck and helgrind reported tons of errors (There might be a few false positives so someone who knows the driver well needs to take a close look at it) but no way can we deploy a product to the field that has "Conditional jump or move depends on uninitialised value" errors in it. Doesn't TI run static analyzers on the code? I'm attaching all the necessary files. You may message me if you need help setting up any of these tools.

  • #include <errno.h>
    #include <fcntl.h>
    #include <gpiod.h>
    #include <linux/spi/spidev.h>
    #include <pthread.h>
    #include <stdio.h>
    #include <sys/ioctl.h>
    #include <unistd.h>
    
    #include <ti/drivers/net/wifi/porting/SIMPLELINKWIFI.h>
    #include <ti/drivers/net/wifi/porting/cc_pal.h>
    #include <ti/drivers/net/wifi/simplelink.h>
    
    volatile SL_P_EVENT_HANDLER g_Host_irq_Hndlr = NULL;
    volatile int spiFd = -1;
    
    void exitOnError(int result, const char *msg)
    {
            if (result < 0) {
                    printf("%s\r\n", msg);
                    exit(1);
            }
    }
    
    struct gpiod_line *nHib = NULL;
    
    Fd_t spi_Open(char *ifName,
                  unsigned long flags)
    {
            printf("%s()%d\r\n", __FUNCTION__, __LINE__);
            spiFd = open("/dev/spidev0.0", O_RDWR);
            exitOnError(spiFd, "Failed to open SPI");
    
            struct gpiod_chip *chip;
            chip = gpiod_chip_open("/dev/gpiochip0");
            if (chip == NULL) {
                    puts("Failed to open chip");
                    exit(1);
            }
            nHib = gpiod_chip_get_line(chip, 21);
    
            int result;
            result = gpiod_line_request_output(nHib, "test", GPIOD_LINE_ACTIVE_STATE_LOW);
            exitOnError(result, "gpio error");
    
            int speed = 10 * 1000 * 1000;
    
            int mode = SPI_MODE_0;
            result = ioctl(spiFd, SPI_IOC_WR_MODE, &mode);
            exitOnError(result, "can't set mode");
    
            int bits = 8;
    
            result = ioctl(spiFd, SPI_IOC_WR_BITS_PER_WORD, &bits);
            exitOnError(result, "can't get bits per word");
    
            result = ioctl(spiFd, SPI_IOC_WR_MAX_SPEED_HZ, &speed);
            exitOnError(result, "can't set clock");
    
            return 0;
    }
    
    int spi_Close(Fd_t fd)
    {
            printf("STUB: %s\n", __FUNCTION__);
            exit(1);
    }
    
    int spi_Read(Fd_t fd,
                 unsigned char *pBuff,
                 int len)
    {
            struct spi_ioc_transfer xfer = { 0 };
    
            xfer.len = (uint32_t)len;
            xfer.rx_buf = (unsigned long)pBuff;
    
            int status = ioctl(spiFd, SPI_IOC_MESSAGE(1), &xfer);
            exitOnError(status, "SPI read fail");
            return (len);
    }
    
    int spi_Write(Fd_t fd,
                  unsigned char *pBuff,
                  int len)
    {
            struct spi_ioc_transfer xfer = { 0 };
            xfer.len = (uint32_t)len;
            xfer.tx_buf = (unsigned long)pBuff;
    
            int status = ioctl(spiFd, SPI_IOC_MESSAGE(1), &xfer);
            exitOnError(status, "SPI write fail");
            return (len);
    }
    
    int NwpRegisterInterruptHandler(P_EVENT_HANDLER InterruptHdl,
                                    void *pValue)
    {
            printf("%s()%d\r\n", __FUNCTION__, __LINE__);
            if (NULL == InterruptHdl) {
                    g_Host_irq_Hndlr = NULL;
                    return (0);
            } else if (NULL == g_Host_irq_Hndlr) {
                    g_Host_irq_Hndlr = InterruptHdl;
                    return (0);
            } else {
                    /* An error occurred */
                    return (-1);
            }
    }
    
    void HostIrqGPIO_callback(uint8_t index)
    {
            if ((NULL != g_Host_irq_Hndlr)) {
                    g_Host_irq_Hndlr(0);
            }
    }
    
    void NwpMaskInterrupt()
    {
    }
    
    void NwpUnMaskInterrupt()
    {
    }
    
    void NwpPowerOnPreamble(void)
    {
    }
    
    void NwpPowerOn(void)
    {
            gpiod_line_set_value(nHib, 1);
            usleep(5 * 1000);
    }
    
    void NwpPowerOff(void)
    {
            gpiod_line_set_value(nHib, 0);
            usleep(5 * 1000);
    }
    
    int Semaphore_pend_handle(sem_t *pSemHandle,
                              uint32_t timeout)
    {
            if (OS_WAIT_FOREVER == timeout) {
                    return (sem_wait(pSemHandle));
            } else {
                    struct timespec abstime;
                    abstime.tv_nsec = 0;
                    abstime.tv_sec = 0;
    
                    /* Since POSIX timeout are relative and not absolute,
             * take the current timestamp. */
                    clock_gettime(CLOCK_REALTIME, &abstime);
                    if (abstime.tv_nsec < 0) {
                            abstime.tv_sec = timeout;
                            return (sem_timedwait(pSemHandle, &abstime));
                    }
    
                    /* Add the amount of time to wait */
                    abstime.tv_sec += timeout / 1000;
                    abstime.tv_nsec += (timeout % 1000) * 1000000;
    
                    abstime.tv_sec += (abstime.tv_nsec / 1000000000);
                    abstime.tv_nsec = abstime.tv_nsec % 1000000000;
    
                    /* Call the semaphore wait API */
                    return (sem_timedwait(pSemHandle, &abstime));
            }
    }
    
    int Mutex_create_handle(pthread_mutex_t *pMutexHandle)
    {
            pthread_mutexattr_t attr;
            pthread_mutexattr_init(&attr);
            pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE);
    
            if (pthread_mutex_init(pMutexHandle, &attr) < 0) {
                    return (Mutex_FAILURE);
            }
    
            return (Mutex_OK);
    }
    
    unsigned long TimerGetCurrentTimestamp()
    {
            struct timespec ts = { 0 };
            int result = clock_gettime(CLOCK_MONOTONIC, &ts);
            exitOnError(result, "timer fail");
    
            return ts.tv_sec * 1000 + (ts.tv_nsec / (1000 * 1000));
    }
    
    void SimpleLinkFatalErrorEventHandler(SlDeviceFatal_t *slFatalErrorEvent)
    {
            puts("FATAL ERROR!!\n");
            switch (slFatalErrorEvent->Id) {
            case SL_DEVICE_EVENT_FATAL_DEVICE_ABORT: {
                    printf("\n[ERROR] - FATAL ERROR: Abort NWP event detected: "
                           "AbortType=%lu, AbortData=0x%lx\n",
                           slFatalErrorEvent->Data.DeviceAssert.Code,
                           slFatalErrorEvent->Data.DeviceAssert.Value);
            } break;
    
            case SL_DEVICE_EVENT_FATAL_DRIVER_ABORT: {
                    printf("\n[ERROR] - FATAL ERROR: Driver Abort detected. \n");
            } break;
    
            case SL_DEVICE_EVENT_FATAL_NO_CMD_ACK: {
                    printf("\n[ERROR] - FATAL ERROR: No Cmd Ack detected "
                           "[cmd opcode = 0x%lx] \n",
                           slFatalErrorEvent->Data.NoCmdAck.Code);
            } break;
    
            case SL_DEVICE_EVENT_FATAL_SYNC_LOSS: {
                    printf("\n[ERROR] - FATAL ERROR: Sync loss detected n\r");
            } break;
    
            case SL_DEVICE_EVENT_FATAL_CMD_TIMEOUT: {
                    printf("\n[ERROR] - FATAL ERROR: Async event timeout detected "
                           "[event opcode =0x%lx]  \n",
                           slFatalErrorEvent->Data.CmdTimeout.Code);
            } break;
    
            default:
                    printf("\n[ERROR] - FATAL ERROR:"
                           " Unspecified error detected \n");
                    break;
            }
    }
    
    void SimpleLinkWlanEventHandler(SlWlanEvent_t *pWlanEvent)
    {
            switch (pWlanEvent->Id) {
            case SL_WLAN_EVENT_CONNECT:
                    printf(
                        "[Event] STA connected to AP"
                        " - BSSID:%.2x:%.2x:%.2x:%.2x:%.2x:%.2x, ",
                        pWlanEvent->Data.Connect.Bssid[0],
                        pWlanEvent->Data.Connect.Bssid[1],
                        pWlanEvent->Data.Connect.Bssid[2],
                        pWlanEvent->Data.Connect.Bssid[3],
                        pWlanEvent->Data.Connect.Bssid[4],
                        pWlanEvent->Data.Connect.Bssid[5]);
    
                    /* set the string terminate */
                    pWlanEvent->Data.Connect.SsidName[pWlanEvent->Data.Connect.SsidLen] = '\0';
    
                    printf("SSID:%s\r\n", pWlanEvent->Data.Connect.SsidName);
                    break;
    
            case SL_WLAN_EVENT_DISCONNECT:
                    printf("[Event] STA disconnected from AP (Reason Code = %d)\r\n",
                           pWlanEvent->Data.Disconnect.ReasonCode);
                    break;
    
            case SL_WLAN_EVENT_STA_ADDED:
                    printf(
                        "[Event] New STA Addeed (MAC Address:"
                        " %.2x:%.2x:%.2x:%.2x:%.2x)\r\n",
                        pWlanEvent->Data.STAAdded.Mac[0],
                        pWlanEvent->Data.STAAdded.Mac[1],
                        pWlanEvent->Data.STAAdded.Mac[2],
                        pWlanEvent->Data.STAAdded.Mac[3],
                        pWlanEvent->Data.STAAdded.Mac[4],
                        pWlanEvent->Data.STAAdded.Mac[5]);
                    break;
    
            case SL_WLAN_EVENT_STA_REMOVED:
                    printf(
                        "[Event] STA Removed (MAC Address: %.2x:%.2x:%.2x:%.2x:%.2x)\r\n",
                        pWlanEvent->Data.STAAdded.Mac[0],
                        pWlanEvent->Data.STAAdded.Mac[1],
                        pWlanEvent->Data.STAAdded.Mac[2],
                        pWlanEvent->Data.STAAdded.Mac[3],
                        pWlanEvent->Data.STAAdded.Mac[4],
                        pWlanEvent->Data.STAAdded.Mac[5]);
                    break;
    
            case SL_WLAN_EVENT_PROVISIONING_PROFILE_ADDED:
                    printf("[Provisioning] Profile Added: SSID: %s\r\n",
                           pWlanEvent->Data.ProvisioningProfileAdded.Ssid);
                    if (pWlanEvent->Data.ProvisioningProfileAdded.ReservedLen > 0) {
                            printf("[Provisioning] Profile Added: PrivateToken:%s\r\n",
                                   pWlanEvent->Data.ProvisioningProfileAdded.Reserved);
                    }
                    break;
    
            case SL_WLAN_EVENT_PROVISIONING_STATUS: {
                    switch (pWlanEvent->Data.ProvisioningStatus.ProvisioningStatus) {
                    case SL_WLAN_PROVISIONING_GENERAL_ERROR:
                    case SL_WLAN_PROVISIONING_ERROR_ABORT:
                    case SL_WLAN_PROVISIONING_ERROR_ABORT_INVALID_PARAM:
                    case SL_WLAN_PROVISIONING_ERROR_ABORT_HTTP_SERVER_DISABLED:
                    case SL_WLAN_PROVISIONING_ERROR_ABORT_PROFILE_LIST_FULL:
                    case SL_WLAN_PROVISIONING_ERROR_ABORT_PROVISIONING_ALREADY_STARTED:
                            printf("[Provisioning] Provisioning Error status=%d\r\n",
                                   pWlanEvent->Data.ProvisioningStatus.ProvisioningStatus);
                            break;
    
                    case SL_WLAN_PROVISIONING_CONFIRMATION_STATUS_FAIL_NETWORK_NOT_FOUND:
                            printf(
                                "[Provisioning] Profile confirmation failed:"
                                " network not found\r\n");
                            break;
    
                    case SL_WLAN_PROVISIONING_CONFIRMATION_STATUS_FAIL_CONNECTION_FAILED:
                            printf(
                                "[Provisioning] Profile confirmation failed:"
                                " Connection failed\r\n");
                            break;
    
                    case SL_WLAN_PROVISIONING_CONFIRMATION_STATUS_CONNECTION_SUCCESS_IP_NOT_ACQUIRED:
                            printf(
                                "[Provisioning] Profile confirmation failed:"
                                " IP address not acquired\r\n");
                            break;
    
                    case SL_WLAN_PROVISIONING_CONFIRMATION_STATUS_SUCCESS_FEEDBACK_FAILED:
                            printf(
                                "[Provisioning] Profile Confirmation failed "
                                "(Connection Success, feedback to Smartphone app failed)\r\n");
                            break;
    
                    case SL_WLAN_PROVISIONING_CONFIRMATION_STATUS_SUCCESS:
                            printf("[Provisioning] Profile Confirmation Success!\r\n");
                            break;
    
                    case SL_WLAN_PROVISIONING_AUTO_STARTED:
                            printf("[Provisioning] Auto-Provisioning Started\r\n");
                            break;
    
                    case SL_WLAN_PROVISIONING_STOPPED:
                            printf("\r\n Provisioning stopped:");
    
                            break;
    
                    case SL_WLAN_PROVISIONING_SMART_CONFIG_SYNCED:
                            printf("[Provisioning] Smart Config Synced!\r\n");
                            break;
    
                    case SL_WLAN_PROVISIONING_SMART_CONFIG_SYNC_TIMEOUT:
                            printf("[Provisioning] Smart Config Sync Timeout!\r\n");
                            break;
    
                    case SL_WLAN_PROVISIONING_CONFIRMATION_WLAN_CONNECT:
                            printf(
                                "[Provisioning] Profile confirmation: WLAN Connected!\r\n");
                            break;
    
                    case SL_WLAN_PROVISIONING_CONFIRMATION_IP_ACQUIRED:
                            printf(
                                "[Provisioning] Profile confirmation: IP Acquired!\r\n");
                            break;
    
                    case SL_WLAN_PROVISIONING_EXTERNAL_CONFIGURATION_READY:
                            printf("[Provisioning] External configuration is ready! \r\n");
                            break;
    
                    default:
                            printf("[Provisioning] Unknown Provisioning Status: %d\r\n",
                                   pWlanEvent->Data.ProvisioningStatus.ProvisioningStatus);
                            break;
                    }
            } break;
    
            default:
                    printf("[Event] - WlanEventHandler has received %lu !!!!\r\n",
                           pWlanEvent->Id);
                    break;
            }
    }
    
    void SimpleLinkGeneralEventHandler(SlDeviceEvent_t *e)
    {
            printf("%s()%d\r\n", __FUNCTION__, __LINE__);
    }
    
    void SimpleLinkNetAppEventHandler(SlNetAppEvent_t *pNetAppEvent)
    {
            switch (pNetAppEvent->Id) {
            case SL_NETAPP_EVENT_IPV4_ACQUIRED: {
                    printf("[NETAPP EVENT] IP Acquired: IP=%lu.%lu.%lu.%lu , "
                           "Gateway=%lu.%lu.%lu.%lu\n",
                           SL_IPV4_BYTE(pNetAppEvent->Data.IpAcquiredV4.Ip, 3),
                           SL_IPV4_BYTE(pNetAppEvent->Data.IpAcquiredV4.Ip, 2),
                           SL_IPV4_BYTE(pNetAppEvent->Data.IpAcquiredV4.Ip, 1),
                           SL_IPV4_BYTE(pNetAppEvent->Data.IpAcquiredV4.Ip, 0),
                           SL_IPV4_BYTE(pNetAppEvent->Data.IpAcquiredV4.Gateway, 3),
                           SL_IPV4_BYTE(pNetAppEvent->Data.IpAcquiredV4.Gateway, 2),
                           SL_IPV4_BYTE(pNetAppEvent->Data.IpAcquiredV4.Gateway, 1),
                           SL_IPV4_BYTE(pNetAppEvent->Data.IpAcquiredV4.Gateway, 0));
            } break;
    
            default: {
                    printf("[NETAPP EVENT] Unexpected event [0x%lx] \n\r",
                           pNetAppEvent->Id);
            } break;
            }
    }
    
    void SimpleLinkSockEventHandler(SlSockEvent_t *e)
    {
            printf("%s()%d\r\n", __FUNCTION__, __LINE__);
    }
    void SimpleLinkHttpServerEventHandler(SlNetAppHttpServerEvent_t *e,
                                          SlNetAppHttpServerResponse_t *r)
    {
            printf("%s()%d\r\n", __FUNCTION__, __LINE__);
    }
    void SimpleLinkNetAppRequestEventHandler(SlNetAppRequest_t *r, SlNetAppResponse_t *s)
    {
            printf("%s()%d\r\n", __FUNCTION__, __LINE__);
    }
    void SimpleLinkSocketTriggerEventHandler(SlSockTriggerEvent_t *t)
    {
            printf("%s()%d\r\n", __FUNCTION__, __LINE__);
    }
    
    void SimpleLinkNetAppRequestMemFreeEventHandler(uint8_t *pVoidBuf)
    {
            printf("%s()%d\r\n", __FUNCTION__, __LINE__);
    }
    

  • Hello,

    That error typically indicates a timing error in your host driver. In version 3.0.1.65, slcb_GetTimestamp() should return the tick value, and SL_TIMESTAMP_TICKS_IN_10_MILLISECONDS must be defined as the number of ticks in 10 milliseconds. This must be done by the developer in user.h. Can you verify that?

    Best regards,

    Sarah

  • After posting my last response, it looks like your edited and new previous replies got caught in the moderation queue and just appeared. Please verify the timing in your porting layer APIs are correct before we continue.

    Best regards,

    Sarah