Re: [riot-devel] Problem socket UDP
Yes sure 2015-02-06 15:07 GMT+01:00 Ludwig Ortmann : > Hi Baptiste, > > could you open an issue please? > > Cheers, Ludwig > > On Fri, Feb 06, 2015 at 03:05:05PM +0100, Baptiste Clenet wrote: > > After pluging a second sender, I got the problem: > > if ((socket > MAX_SOCKETS) || (socket_base_sockets[socket - > > 1].socket_id == 0)) { > > return false; > > } > > socket = 11534388 > > socket_base_sockets[socket - 1].socket_id = 64 > > > > And then the program goes to isr_hard_fault > > > > 2015-02-06 14:19 GMT+01:00 Baptiste Clenet : > > > > > I have let my program running with two boards: one sender and one > > > receiver. It seems to work for the moment (longer than with three > sender > > > boards) > > > > > > 2015-02-06 10:53 GMT+01:00 Baptiste Clenet : > > > > > >> Hi Oleg, > > >> > > >> I tried on native by simulating the value from sensor and it works > after > > >> one hour of running. > > >> So it seems to be a platform specific problem. > > >> > > >> Any clues? Which test shoud I do then? and where the variable socket > is > > >> incremented? > > >> > > >> Cheers, > > >> > > >> 2015-02-06 8:18 GMT+01:00 Oleg Hahm : > > >> > > >>> Hi Maxence! > > >>> > > >>> > You mean than I should slow down the number of transmission? I > send a > > >>> > packet every second on three boards which means that the other > board > > >>> > receives three packets a second. > > >>> > How may I check apart from slowing down the rate of the > transmission? > > >>> > > >>> Three packets every second shouldn't be a problem. Have you checked > if > > >>> same > > >>> (or similar code) works on native. That would be always the first > > >>> indicator if > > >>> it's a general problem in - let's say the network stack - or if it's > > >>> something > > >>> particular to this hardware. > > >>> > > >>> Cheers, > > >>> Oleg > > >>> -- > > >>> panic ("Splunge!"); > > >>> linux-2.2.16/drivers/scsi/psi240i.c > > >>> > > >>> ___ > > >>> devel mailing list > > >>> devel@riot-os.org > > >>> http://lists.riot-os.org/mailman/listinfo/devel > > >>> > > >>> > > >> > > >> > > >> -- > > >> > > >> *Clenet BaptisteFR: +33 6 29 73 05 39 > <%2B33%206%2029%2073%2005%2039>* > > >> *Élève-Ingénieur ESEO Angers, dernière année, spécialisation: > Architecte > > >> système temps réél embarqué* > > >> > > >> > > >> *Bidiplôme Master Robotics à l'Université de Plymouth en 2013-2014* > > >> > > > > > > > > > > > > -- > > > > > > *Clenet BaptisteFR: +33 6 29 73 05 39 <%2B33%206%2029%2073%2005%2039>* > > > *Élève-Ingénieur ESEO Angers, dernière année, spécialisation: > Architecte > > > système temps réél embarqué* > > > > > > > > > *Bidiplôme Master Robotics à l'Université de Plymouth en 2013-2014* > > > > > > > > > > > -- > > > > *Clenet BaptisteFR: +33 6 29 73 05 39* > > *Élève-Ingénieur ESEO Angers, dernière année, spécialisation: Architecte > > système temps réél embarqué* > > > > > > *Bidiplôme Master Robotics à l'Université de Plymouth en 2013-2014* > > > ___ > > devel mailing list > > devel@riot-os.org > > http://lists.riot-os.org/mailman/listinfo/devel > > ___ > devel mailing list > devel@riot-os.org > http://lists.riot-os.org/mailman/listinfo/devel > -- *Clenet BaptisteFR: +33 6 29 73 05 39* *Élève-Ingénieur ESEO Angers, dernière année, spécialisation: Architecte système temps réél embarqué* *Bidiplôme Master Robotics à l'Université de Plymouth en 2013-2014* ___ devel mailing list devel@riot-os.org http://lists.riot-os.org/mailman/listinfo/devel
Re: [riot-devel] Problem socket UDP
Hi Baptiste, could you open an issue please? Cheers, Ludwig On Fri, Feb 06, 2015 at 03:05:05PM +0100, Baptiste Clenet wrote: > After pluging a second sender, I got the problem: > if ((socket > MAX_SOCKETS) || (socket_base_sockets[socket - > 1].socket_id == 0)) { > return false; > } > socket = 11534388 > socket_base_sockets[socket - 1].socket_id = 64 > > And then the program goes to isr_hard_fault > > 2015-02-06 14:19 GMT+01:00 Baptiste Clenet : > > > I have let my program running with two boards: one sender and one > > receiver. It seems to work for the moment (longer than with three sender > > boards) > > > > 2015-02-06 10:53 GMT+01:00 Baptiste Clenet : > > > >> Hi Oleg, > >> > >> I tried on native by simulating the value from sensor and it works after > >> one hour of running. > >> So it seems to be a platform specific problem. > >> > >> Any clues? Which test shoud I do then? and where the variable socket is > >> incremented? > >> > >> Cheers, > >> > >> 2015-02-06 8:18 GMT+01:00 Oleg Hahm : > >> > >>> Hi Maxence! > >>> > >>> > You mean than I should slow down the number of transmission? I send a > >>> > packet every second on three boards which means that the other board > >>> > receives three packets a second. > >>> > How may I check apart from slowing down the rate of the transmission? > >>> > >>> Three packets every second shouldn't be a problem. Have you checked if > >>> same > >>> (or similar code) works on native. That would be always the first > >>> indicator if > >>> it's a general problem in - let's say the network stack - or if it's > >>> something > >>> particular to this hardware. > >>> > >>> Cheers, > >>> Oleg > >>> -- > >>> panic ("Splunge!"); > >>> linux-2.2.16/drivers/scsi/psi240i.c > >>> > >>> ___ > >>> devel mailing list > >>> devel@riot-os.org > >>> http://lists.riot-os.org/mailman/listinfo/devel > >>> > >>> > >> > >> > >> -- > >> > >> *Clenet BaptisteFR: +33 6 29 73 05 39 <%2B33%206%2029%2073%2005%2039>* > >> *Élève-Ingénieur ESEO Angers, dernière année, spécialisation: Architecte > >> système temps réél embarqué* > >> > >> > >> *Bidiplôme Master Robotics à l'Université de Plymouth en 2013-2014* > >> > > > > > > > > -- > > > > *Clenet BaptisteFR: +33 6 29 73 05 39 <%2B33%206%2029%2073%2005%2039>* > > *Élève-Ingénieur ESEO Angers, dernière année, spécialisation: Architecte > > système temps réél embarqué* > > > > > > *Bidiplôme Master Robotics à l'Université de Plymouth en 2013-2014* > > > > > > -- > > *Clenet BaptisteFR: +33 6 29 73 05 39* > *Élève-Ingénieur ESEO Angers, dernière année, spécialisation: Architecte > système temps réél embarqué* > > > *Bidiplôme Master Robotics à l'Université de Plymouth en 2013-2014* > ___ > devel mailing list > devel@riot-os.org > http://lists.riot-os.org/mailman/listinfo/devel ___ devel mailing list devel@riot-os.org http://lists.riot-os.org/mailman/listinfo/devel
Re: [riot-devel] Problem socket UDP
Here is the backtrace bt #0 isr_hard_fault () at RIOT/cpu/samd21/startup.c:104 #1 #2 0x06ec in clist_advance (list=0x20001c30 ) at RIOT/core/include/clist.h:80 #3 0x08d4 in thread_yield () at RIOT/core/thread.c:99 #4 0x000167fe in isr_eic () at RIOT/cpu/samd21/periph/gpio.c:1027 #5 #6 0x147a in ?? () 2015-02-06 15:05 GMT+01:00 Baptiste Clenet : > After pluging a second sender, I got the problem: > if ((socket > MAX_SOCKETS) || (socket_base_sockets[socket - > 1].socket_id == 0)) { > return false; > } > socket = 11534388 > socket_base_sockets[socket - 1].socket_id = 64 > > And then the program goes to isr_hard_fault > > 2015-02-06 14:19 GMT+01:00 Baptiste Clenet : > >> I have let my program running with two boards: one sender and one >> receiver. It seems to work for the moment (longer than with three sender >> boards) >> >> 2015-02-06 10:53 GMT+01:00 Baptiste Clenet : >> >>> Hi Oleg, >>> >>> I tried on native by simulating the value from sensor and it works after >>> one hour of running. >>> So it seems to be a platform specific problem. >>> >>> Any clues? Which test shoud I do then? and where the variable socket is >>> incremented? >>> >>> Cheers, >>> >>> 2015-02-06 8:18 GMT+01:00 Oleg Hahm : >>> Hi Maxence! > You mean than I should slow down the number of transmission? I send a > packet every second on three boards which means that the other board > receives three packets a second. > How may I check apart from slowing down the rate of the transmission? Three packets every second shouldn't be a problem. Have you checked if same (or similar code) works on native. That would be always the first indicator if it's a general problem in - let's say the network stack - or if it's something particular to this hardware. Cheers, Oleg -- panic ("Splunge!"); linux-2.2.16/drivers/scsi/psi240i.c ___ devel mailing list devel@riot-os.org http://lists.riot-os.org/mailman/listinfo/devel >>> >>> >>> -- >>> >>> *Clenet BaptisteFR: +33 6 29 73 05 39 <%2B33%206%2029%2073%2005%2039>* >>> *Élève-Ingénieur ESEO Angers, dernière année, spécialisation: Architecte >>> système temps réél embarqué* >>> >>> >>> *Bidiplôme Master Robotics à l'Université de Plymouth en 2013-2014* >>> >> >> >> >> -- >> >> *Clenet BaptisteFR: +33 6 29 73 05 39 <%2B33%206%2029%2073%2005%2039>* >> *Élève-Ingénieur ESEO Angers, dernière année, spécialisation: Architecte >> système temps réél embarqué* >> >> >> *Bidiplôme Master Robotics à l'Université de Plymouth en 2013-2014* >> > > > > -- > > *Clenet BaptisteFR: +33 6 29 73 05 39 <%2B33%206%2029%2073%2005%2039>* > *Élève-Ingénieur ESEO Angers, dernière année, spécialisation: Architecte > système temps réél embarqué* > > > *Bidiplôme Master Robotics à l'Université de Plymouth en 2013-2014* > -- *Clenet BaptisteFR: +33 6 29 73 05 39* *Élève-Ingénieur ESEO Angers, dernière année, spécialisation: Architecte système temps réél embarqué* *Bidiplôme Master Robotics à l'Université de Plymouth en 2013-2014* ___ devel mailing list devel@riot-os.org http://lists.riot-os.org/mailman/listinfo/devel
Re: [riot-devel] Problem socket UDP
After pluging a second sender, I got the problem: if ((socket > MAX_SOCKETS) || (socket_base_sockets[socket - 1].socket_id == 0)) { return false; } socket = 11534388 socket_base_sockets[socket - 1].socket_id = 64 And then the program goes to isr_hard_fault 2015-02-06 14:19 GMT+01:00 Baptiste Clenet : > I have let my program running with two boards: one sender and one > receiver. It seems to work for the moment (longer than with three sender > boards) > > 2015-02-06 10:53 GMT+01:00 Baptiste Clenet : > >> Hi Oleg, >> >> I tried on native by simulating the value from sensor and it works after >> one hour of running. >> So it seems to be a platform specific problem. >> >> Any clues? Which test shoud I do then? and where the variable socket is >> incremented? >> >> Cheers, >> >> 2015-02-06 8:18 GMT+01:00 Oleg Hahm : >> >>> Hi Maxence! >>> >>> > You mean than I should slow down the number of transmission? I send a >>> > packet every second on three boards which means that the other board >>> > receives three packets a second. >>> > How may I check apart from slowing down the rate of the transmission? >>> >>> Three packets every second shouldn't be a problem. Have you checked if >>> same >>> (or similar code) works on native. That would be always the first >>> indicator if >>> it's a general problem in - let's say the network stack - or if it's >>> something >>> particular to this hardware. >>> >>> Cheers, >>> Oleg >>> -- >>> panic ("Splunge!"); >>> linux-2.2.16/drivers/scsi/psi240i.c >>> >>> ___ >>> devel mailing list >>> devel@riot-os.org >>> http://lists.riot-os.org/mailman/listinfo/devel >>> >>> >> >> >> -- >> >> *Clenet BaptisteFR: +33 6 29 73 05 39 <%2B33%206%2029%2073%2005%2039>* >> *Élève-Ingénieur ESEO Angers, dernière année, spécialisation: Architecte >> système temps réél embarqué* >> >> >> *Bidiplôme Master Robotics à l'Université de Plymouth en 2013-2014* >> > > > > -- > > *Clenet BaptisteFR: +33 6 29 73 05 39 <%2B33%206%2029%2073%2005%2039>* > *Élève-Ingénieur ESEO Angers, dernière année, spécialisation: Architecte > système temps réél embarqué* > > > *Bidiplôme Master Robotics à l'Université de Plymouth en 2013-2014* > -- *Clenet BaptisteFR: +33 6 29 73 05 39* *Élève-Ingénieur ESEO Angers, dernière année, spécialisation: Architecte système temps réél embarqué* *Bidiplôme Master Robotics à l'Université de Plymouth en 2013-2014* ___ devel mailing list devel@riot-os.org http://lists.riot-os.org/mailman/listinfo/devel
Re: [riot-devel] Problem socket UDP
I have let my program running with two boards: one sender and one receiver. It seems to work for the moment (longer than with three sender boards) 2015-02-06 10:53 GMT+01:00 Baptiste Clenet : > Hi Oleg, > > I tried on native by simulating the value from sensor and it works after > one hour of running. > So it seems to be a platform specific problem. > > Any clues? Which test shoud I do then? and where the variable socket is > incremented? > > Cheers, > > 2015-02-06 8:18 GMT+01:00 Oleg Hahm : > >> Hi Maxence! >> >> > You mean than I should slow down the number of transmission? I send a >> > packet every second on three boards which means that the other board >> > receives three packets a second. >> > How may I check apart from slowing down the rate of the transmission? >> >> Three packets every second shouldn't be a problem. Have you checked if >> same >> (or similar code) works on native. That would be always the first >> indicator if >> it's a general problem in - let's say the network stack - or if it's >> something >> particular to this hardware. >> >> Cheers, >> Oleg >> -- >> panic ("Splunge!"); >> linux-2.2.16/drivers/scsi/psi240i.c >> >> ___ >> devel mailing list >> devel@riot-os.org >> http://lists.riot-os.org/mailman/listinfo/devel >> >> > > > -- > > *Clenet BaptisteFR: +33 6 29 73 05 39 <%2B33%206%2029%2073%2005%2039>* > *Élève-Ingénieur ESEO Angers, dernière année, spécialisation: Architecte > système temps réél embarqué* > > > *Bidiplôme Master Robotics à l'Université de Plymouth en 2013-2014* > -- *Clenet BaptisteFR: +33 6 29 73 05 39* *Élève-Ingénieur ESEO Angers, dernière année, spécialisation: Architecte système temps réél embarqué* *Bidiplôme Master Robotics à l'Université de Plymouth en 2013-2014* ___ devel mailing list devel@riot-os.org http://lists.riot-os.org/mailman/listinfo/devel
Re: [riot-devel] Problem socket UDP
Hi Oleg, I tried on native by simulating the value from sensor and it works after one hour of running. So it seems to be a platform specific problem. Any clues? Which test shoud I do then? and where the variable socket is incremented? Cheers, 2015-02-06 8:18 GMT+01:00 Oleg Hahm : > Hi Maxence! > > > You mean than I should slow down the number of transmission? I send a > > packet every second on three boards which means that the other board > > receives three packets a second. > > How may I check apart from slowing down the rate of the transmission? > > Three packets every second shouldn't be a problem. Have you checked if same > (or similar code) works on native. That would be always the first > indicator if > it's a general problem in - let's say the network stack - or if it's > something > particular to this hardware. > > Cheers, > Oleg > -- > panic ("Splunge!"); > linux-2.2.16/drivers/scsi/psi240i.c > > ___ > devel mailing list > devel@riot-os.org > http://lists.riot-os.org/mailman/listinfo/devel > > -- *Clenet BaptisteFR: +33 6 29 73 05 39* *Élève-Ingénieur ESEO Angers, dernière année, spécialisation: Architecte système temps réél embarqué* *Bidiplôme Master Robotics à l'Université de Plymouth en 2013-2014* ___ devel mailing list devel@riot-os.org http://lists.riot-os.org/mailman/listinfo/devel
Re: [riot-devel] Problem socket UDP
Hi Maxence! > You mean than I should slow down the number of transmission? I send a > packet every second on three boards which means that the other board > receives three packets a second. > How may I check apart from slowing down the rate of the transmission? Three packets every second shouldn't be a problem. Have you checked if same (or similar code) works on native. That would be always the first indicator if it's a general problem in - let's say the network stack - or if it's something particular to this hardware. Cheers, Oleg -- panic ("Splunge!"); linux-2.2.16/drivers/scsi/psi240i.c pgp4pouXHIiwV.pgp Description: PGP signature ___ devel mailing list devel@riot-os.org http://lists.riot-os.org/mailman/listinfo/devel
Re: [riot-devel] Problem socket UDP
You mean than I should slow down the number of transmission? I send a packet every second on three boards which means that the other board receives three packets a second. How may I check apart from slowing down the rate of the transmission? Baptiste, 2015-02-05 17:36 GMT+01:00 Oleg Hahm : > Hi Baptiste! > > > It works for more or less 20 minutes and then I receive a: > > > > printf("ERROR: recsize < 0!\n"); > > > > This comes from here: > > if ((socket > MAX_SOCKETS) || (socket_base_sockets[socket - > > 1].socket_id == 0)) { > > return false; > > } > > > > When I break here, socket = 2, then 3, then 4 and then it blocks, not a > > isr_hard_fault but I don't receive anything then. > > Sounds like sockets where not freed after sending the UDP packet. If this > assumption is correct, the problem should not be dependent on the time, > but on > the number of transmissions. Can you check? > > Cheers, > Oleg > -- > /* Sun, you just can't beat me, you just can't. Stop trying, > * give up. I'm serious, I am going to kick the living shit > * out of you, game over, lights out. > */ > linux-2.6.6/arch/sparc/lib/checksum.S > > ___ > devel mailing list > devel@riot-os.org > http://lists.riot-os.org/mailman/listinfo/devel > > ___ devel mailing list devel@riot-os.org http://lists.riot-os.org/mailman/listinfo/devel
Re: [riot-devel] Problem socket UDP
Hi Baptiste! > It works for more or less 20 minutes and then I receive a: > > printf("ERROR: recsize < 0!\n"); > > This comes from here: > if ((socket > MAX_SOCKETS) || (socket_base_sockets[socket - > 1].socket_id == 0)) { > return false; > } > > When I break here, socket = 2, then 3, then 4 and then it blocks, not a > isr_hard_fault but I don't receive anything then. Sounds like sockets where not freed after sending the UDP packet. If this assumption is correct, the problem should not be dependent on the time, but on the number of transmissions. Can you check? Cheers, Oleg -- /* Sun, you just can't beat me, you just can't. Stop trying, * give up. I'm serious, I am going to kick the living shit * out of you, game over, lights out. */ linux-2.6.6/arch/sparc/lib/checksum.S pgprQ991cMeGi.pgp Description: PGP signature ___ devel mailing list devel@riot-os.org http://lists.riot-os.org/mailman/listinfo/devel
[riot-devel] Problem socket UDP
Hello, I encounter a problem after lot of transmission in UDP. I use the SAMR21, example RPL_UDP + my application (3 boards send values from sensor to one board). The 3 boards works fine, the problem occurs on the board which gathers all the data. It works for more or less 20 minutes and then I receive a: printf("ERROR: recsize < 0!\n"); This comes from here: if ((socket > MAX_SOCKETS) || (socket_base_sockets[socket - 1].socket_id == 0)) { return false; } When I break here, socket = 2, then 3, then 4 and then it blocks, not a isr_hard_fault but I don't receive anything then. I set the push button to send a message to my other board, if I do that, the programs goes to the same error and socket = 2. This is annoying because the program can't run and get message for a while. Any ideas? -- *Clenet Baptiste* ___ devel mailing list devel@riot-os.org http://lists.riot-os.org/mailman/listinfo/devel