Hi
I’m trying to communicate two devices (samr21-xpro) one of them with emcute (mqtt-sn) example and the gnrc_border_route example, but the con command of emcute example return TimeOut error.
I’ve added the ip of the gnrc_border_route example to emcute example
(gnrc_border_route) (emcute with the ip added)
if its executed ping6 command it can receive a response of gnrc example
But when the con command is executed it return a TimeOut error (res= -4) (it say successfully connected but it must be a bug)
After fill the code with debug lines i saw that the line that fail is thread_t me = (thread_t) sched_active_thread;
this code segment for example
emcute.c
static int syncsend(uint8_t resp, size_t len, bool unlock) { int res = EMCUTE_TIMEOUT; waiton = resp; timer.arg = (void )sched_active_thread; / clear flags, in case the timer was triggered last time right before the
- remove was called / thread_flags_clear(TFLAGS_ANY); for (unsigned retries = 0; retries < EMCUTE_N_RETRY; retries++) { sock_udp_send(&sock, tbuf, len, &gateway); xtimer_set(&timer, (EMCUTE_T_RETRY * US_PER_SEC)); t***hread_flags_t flags = thread_flags_wait_any(TFLAGS_ANY); if (flags & TFLAGS_RESP) { xtimer_remove(&timer); res = result; retries = EMCUTE_N_RETRY; }
}
/* cleanup sync state */ waiton = 0xff; if (unlock) { mutex_unlock(&txlock); } DEBUG(“The final result = %d\n”, res); return res; }