Hello,
I'm having some trouble sending large packets using the broadcast protocol. I did modify your driver (4.9.10) to enable/disable the required 50 ms delay between packets.
You can see my patch here:
J1939 Delay Patch
With the delay enabled and disabled, larger packets seem to be over-written and/or not sent if the socket is written before previous packets are sent. The following screenshots are with the delay disabled (shortened).
Using sendto with MSG_SYN and fcntl(file, F_SETFL, O_NDELAY), it looks like the short packets (8 bytes) get out just fine but the larger packets are nowhere to be seen:

I can see the larger packets in /proc/../transport:

No errrors are reported by sendto:

I added sleeps after writing each packet to give it a chance to get out. And that seems to improve the situation:

I can see in my debug logs that the port returns EAGAIN after transmitting larger packets, which is fine. I just retransmit.

However, some time into running the large packets begin to stop coming through:

And it looks like I'm no longer getting the EAGAIN signal from the port:

Looking at the transport file in proc, I can see that packets are queuing:

Pausing the application (CRTL+Z and then fg) briefly or completely restarting the application seems to fix the issue temporarily.
Is there something I'm doing wrong? I was using an earlier version of your driver (3.8) which doesn't have this problem. I also modified that one to reduce the delay from 50 ms to 1 ms, but it's not configurable. It's hard coded.
I'm going to see if I can figure out what's going wrong but I think you'd be able to diagnose a lot quicker than I can so I'd appreciate it if you could weigh in.
Thanks!!!
Rich
P.S. This driver has been a huge help for me, btw. I greatly appreciate the work you and others have put in to make this available to everyone.
Hello,
I'm having some trouble sending large packets using the broadcast protocol. I did modify your driver (4.9.10) to enable/disable the required 50 ms delay between packets.
You can see my patch here:
J1939 Delay Patch
With the delay enabled and disabled, larger packets seem to be over-written and/or not sent if the socket is written before previous packets are sent. The following screenshots are with the delay disabled (shortened).
Using sendto with MSG_SYN and fcntl(file, F_SETFL, O_NDELAY), it looks like the short packets (8 bytes) get out just fine but the larger packets are nowhere to be seen:

I can see the larger packets in /proc/../transport:

No errrors are reported by sendto:

I added sleeps after writing each packet to give it a chance to get out. And that seems to improve the situation:

I can see in my debug logs that the port returns EAGAIN after transmitting larger packets, which is fine. I just retransmit.

However, some time into running the large packets begin to stop coming through:

And it looks like I'm no longer getting the EAGAIN signal from the port:

Looking at the transport file in proc, I can see that packets are queuing:

Pausing the application (CRTL+Z and then fg) briefly or completely restarting the application seems to fix the issue temporarily.
Is there something I'm doing wrong? I was using an earlier version of your driver (3.8) which doesn't have this problem. I also modified that one to reduce the delay from 50 ms to 1 ms, but it's not configurable. It's hard coded.
I'm going to see if I can figure out what's going wrong but I think you'd be able to diagnose a lot quicker than I can so I'd appreciate it if you could weigh in.
Thanks!!!
Rich
P.S. This driver has been a huge help for me, btw. I greatly appreciate the work you and others have put in to make this available to everyone.