Unfortunately their packet structure is already defined and they don't include a timestamp.. go figure. I believe this is because the system that uses the vehicle speed data needs to make immediate use of it and if its at all delayed then it won't use it. This is a real time system but not a safety system...
Anyway. I got this working with Netservices finally.
I modified lwip/include/lwip/tcp_impl.h
I changed:
TCP_TMR_INTERVAL 250
to this:
TCP_TMR_INTERVAL 40
this is the tcp fast timer value in milliseconds.
I also modified lwip/core/tcp_out.c
added lines of "apiflags |= TF_NODELAY" to the tcp_write and tcp_pbuf_prealloc functions.
Granted this fix is more of a temporary hack that would only work for my specific situation and probably would not be suitable for anything else.
I have an interesting problem where I need to transmit TCP packets deterministically rather than whenever the tcp/ip stack gets around to sending the packet. I haven't been able to accomplish this using Netservices but I would really like to. I have used the lwip library directly and I am able to send tcp packets at 10hz exactly with the data I need in each packet using the tcp_write followed by a tcp_output. However in Netservices there is no access to tcp_write and tcp_output directly. Does anyone know where I can start to modify the Netservices library to gain direct access to tcp_write and tcp_output ? I have tried hard at this and just can't figure it out. I have played with options in lwipopts.h and the best I could do was set the TCP_MSS to 10 (my max packet size) which kind of works, the packets are no larger than 10 bytes but they don't get transmitted immediately, they are still queued up somewhere.
I would really like to use Netservices for this project, I just need access to tcp_write and tcp_output.
Thanks,
Errol