[riot-notifications] [RIOT-OS/RIOT] send data with UDP at 10HZ, the program die (#11860)

jhx2002 notifications at github.com
Thu Jul 18 04:58:34 CEST 2019


setup:

- hardware:  stm32f4+enc28j60

- core code: 
```
void send(sender_t* dev) {
    assert(dev != NULL);
    char* buf = "hi";
    size_t res = sock_udp_send(NULL, buf, strlen(buf), &gw);                                                                                                                                                           
    printf("send %d\n", res);
}


static void *main_task(void *arg)
{
    assert(arg != NULL);

    sender_t* dev = (sender_t*)arg;                                                                                                                                                                

    /* main loop */
    int count = 0;
    while(1) {
        send(dev);
        count ++ ;
        xtimer_usleep(100000); //100ms                                                                                                                                                                             
    }

    return NULL;    /* should never be reached */
}

```

- logs, program dead after sending 8 package
```
2019-07-18 10:56:58,513 - INFO # gateway: fe80::f58c:2fb7:adad:1
2019-07-18 10:56:58,516 - INFO # local: fe80::f58c:2fb7:adad:10
2019-07-18 10:56:58,517 - INFO # send 2
> 2019-07-18 10:56:58,617 - INFO #  send 2
2019-07-18 10:56:58,718 - INFO # send 2
2019-07-18 10:56:58,818 - INFO # send 2
2019-07-18 10:56:58,919 - INFO # send 2
2019-07-18 10:56:59,020 - INFO # send 2
2019-07-18 10:56:59,120 - INFO # send 2
2019-07-18 10:56:59,221 - INFO # send 2
2019-07-18 10:56:59,322 - INFO # send 2
2019-07-18 10:56:59,422 - INFO # send 2
ps



```


-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/RIOT-OS/RIOT/issues/11860
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.riot-os.org/pipermail/notifications/attachments/20190717/a1267f56/attachment.htm>


More information about the notifications mailing list