Sorry the line as you said don't fail, but when the thread pointer is created it has flag property and it take the value 2 that represent TIMEOUT, the process is executed 3 times and then it returns a fail because the condition if (flags & TFLAGS_RESP) never occur. It is rare because i can ping the IP of each device but the connection always fail.
*What do you mean by "the flag is always different"? Does it have a valueother than TIMEOUT or TFLAGS_RESP?* It always take the TIMEOUT value (different than the result expected) *Could you please check the output of the "ps" command after "con" fails?Just to rule out a stack overflow.* When i executed the ps command it show that the emcute stack is 1024 and is used 1020 so it's probably a problem. 2017-04-27 8:55 GMT+02:00 Andy Rosete <[email protected]>: > Sorry the line as you said don't fail, but when the thread pointer is > created it has flag property and it take the value 2 that represent > TIMEOUT, the process is executed 3 times and then it returns a fail because > the condition > if (flags & TFLAGS_RESP) never occur. It is rare because i can ping the > IP of each device but the connection always fail. > > > > *What do you mean by "the flag is always different"? Does it have a > valueother than TIMEOUT or TFLAGS_RESP?* > It always take the TIMEOUT value (different than the result expected) > > > *Could you please check the output of the "ps" command after "con" > fails?Just to rule out a stack overflow.* > When i executed the ps command it show that the emcute stack is 1024 and > is used 1020. > > INFO # pid | name | state Q | pri | stack ( used) | base | current INFO # - | isr_stack | - - | - | 512 ( 164) | 0x20000000 | 0x200001b8 INFO # 1 | idle | pending Q | 15 | 256 ( 136) | 0x2000052c | 0x200005a4 INFO # 2 | main | running Q | 7 | 1536 ( 828) | 0x2000062c | 0x20000a6c INFO # 3 | 6lo | bl rx _ | 3 | 1024 ( 464) | 0x200044fc | 0x200047c4 INFO # 4 | ipv6 | bl rx _ | 4 | 1024 ( 776) | 0x200023ac | 0x20002674 INFO # 5 | udp | bl rx _ | 5 | 1024 ( 336) | 0x20001a8c | 0x20001d74 INFO # 6 | at86rf2xx | bl rx _ | 2 | 1024 ( 448) | 0x20001f60 | 0x2000225c INFO # 7 | emcute | bl mbox _ | 6 | 1024 ( 1020) | 0x20000c6c | 0x20000edc INFO # | SUM | | | 7424 ( 4172) > After see the total, everything is fine because the memory used is almos > the middle of the stack, so I'm in the same situation. If somebody know how > can I solve this please help. > > Thanks a lot > > > 2017-04-27 1:19 GMT+02:00 Andy Rosete <[email protected]>: > >> Sorry the line as you said don't fail, but when the thread pointer is >> created it has flag property and it take the value 2 that represent >> TIMEOUT, the process is executed 3 times and then it returns a fail because >> the condition >> if (flags & TFLAGS_RESP) never occur. It is rare because i can ping the >> IP of each device but the connection always fail. >> >> When i executed the ps command it show >> >> >> it is pretty close to the overflow so I don't know if that is the >> reason of the timeout result. So what else could be? >> >> Thanks a lot >> >> 2017-04-25 12:00 GMT+02:00 <[email protected]>: >> >>> Send users mailing list submissions to >>> [email protected] >>> >>> To subscribe or unsubscribe via the World Wide Web, visit >>> https://lists.riot-os.org/mailman/listinfo/users >>> or, via email, send a message with subject or body 'help' to >>> [email protected] >>> >>> You can reach the person managing the list at >>> [email protected] >>> >>> When replying, please edit your Subject line so it is more specific >>> than "Re: Contents of users digest..." >>> >>> >>> Today's Topics: >>> >>> 1. Re: Communicate two samr21-xpro Emcute example and >>> gnrc_border_route example (Kaspar Schleiser) >>> >>> >>> ---------------------------------------------------------------------- >>> >>> Message: 1 >>> Date: Tue, 25 Apr 2017 09:10:53 +0200 >>> From: Kaspar Schleiser <[email protected]> >>> To: RIOT OS users list <[email protected]> >>> Subject: Re: [riot-users] Communicate two samr21-xpro Emcute example >>> and gnrc_border_route example >>> Message-ID: <[email protected]> >>> Content-Type: text/plain; charset=utf-8 >>> >>> Hi Andy, >>> >>> On 04/24/2017 11:55 PM, Andy Rosete wrote: >>> > After fill the code with debug lines i saw that the line that fail is >>> > *thread_t *me = (thread_t*) sched_active_thread;* >>> >>> That line basically cannot fail(tm). What do you mean by "the line >>> fails"? >>> >>> > >>> > this code segment for example >>> > >>> > emcute.c >>> > static int syncsend(uint8_t resp, size_t len, bool unlock) >>> > { >>> > [...] >>> > * t**hread_flags_t flags = thread_flags_wait_any(TFLAGS_ANY);* >>> >>> > [...] >>> >>> > because it try to inittialize the thread pointer but the flag is always >>> > different >>> > if (flags & TFLAGS_RESP) >>> > >>> > The values are: >>> > The flag = 0x00000002 (This mean TIMEOUT) and TFLAGS_RESP = 0x00000001 >>> >>> What do you mean by "the flag is always different"? Does it have a value >>> other than TIMEOUT or TFLAGS_RESP? >>> >>> Could you please check the output of the "ps" command after "con" fails? >>> Just to rule out a stack overflow. >>> >>> Kaspar >>> >>> >>> ------------------------------ >>> >>> Subject: Digest Footer >>> >>> _______________________________________________ >>> users mailing list >>> [email protected] >>> https://lists.riot-os.org/mailman/listinfo/users >>> >>> >>> ------------------------------ >>> >>> End of users Digest, Vol 51, Issue 3 >>> ************************************ >>> >> >> >
_______________________________________________ users mailing list [email protected] https://lists.riot-os.org/mailman/listinfo/users
