Felix, On Thu, Feb 03, 2011 at 12:26:50PM +0100, Felix Obenhuber wrote: > Kurt, > > On Thu, 2011-02-03 at 10:39 +0100, Kurt Van Dijck wrote: > > +4.3 Address Claiming > > [...] > > > + If no-one else contest the address claim within 250ms after > > transmission, the > > + kernel marks the NAME-SA assignment as valid. The valid assignment will > > be > > + kept, among other valid NAME-SA assignments. From that point, any socket > > + bound to the NAME can send packets. > > + > > + If another ECU claims the address, the kernel will mark the NAME-SA > > expired. > > + No socket bound to the NAME can send packets (other than address claims). > > + To claim another address, some socket bound to NAME, must bind(2) again, > > + but with only j1939.addr changed to the new SA, and must then send a > > + valid address claim packet. This restarts the state machine in the kernel > > + (and any other participant on the bus) for this NAME. The details are in net/can/j1939-ac.c, but I'll summarize: > > Do you take care of the NAME arbitration specified in ISO11783 Part 5 > before invalidating a claimed SA? > > For short: if two nodes claim the same SA, then the node with the lower > NAME get's the SA and is allowed to operate with. > > Maybe that's a ISO11783 feature and not used in J1939 - I'm not sure > about... In fact, we supposed that j1939-81 is rather equal to iso11783-5, but we did not verify letter by letter. So, yes. But I remark here that on a proper system, whenever a conflicting address claim comes in, your own address claim should be reissued, thereby initiating a 250msec timeout again...
The kernel considers the arbitration, but does not act. The address claiming process itself (with its policy) is a userspace task. The kernel just follows the process and hold traffic during the process. Hope this answers your question. Kurt _______________________________________________ Socketcan-core mailing list [email protected] https://lists.berlios.de/mailman/listinfo/socketcan-core
