Open rfairley opened 6 years ago
Also related, now that Ethernet has been used successfully through the lwIP stack (in isolation at least) and we have more familiarity with UDP/TCP in general, we can also revisit the FreeRTOS stack https://www.freertos.org/FreeRTOS-Plus/FreeRTOS_Plus_TCP/TCP_Networking_Tutorial.html.
Opening this to make note, but is not high priority and really is an extra and educational item.
Describe the feature Right now we have been able to communicate over ethernet by sending UDP packets using the lwIP Raw API as seen in the
Development/Ethernet/lwip-rtos-config
project. Although UDP is acceptable, we should try to have closer control of ethernet communications and not rely on the lwIP framework, implementing only what is necessary for our application. This issue asks to answer the question "Can we use the hal_eth functions to implement MCU <-> PC communications? Provide an example program that does this." After confirming it works, this would be implemented in the Robot projects.Reason for request This is for a few reasons:
Timeline Should be investigated at some point, but not in the near future.
Additional information Will require consideration of the PC side of communications as well. Right now, a python script using the
socket
module is all that is necessary for UDP communication. With low-level ethernet communications, lower-level access to the PC ethernet peripheral may be needed (e.g. networking system calls).The idea is that ethernet communications will be done through callbacks like
void HAL_ETH_RxCpltCallback(ETH_HandleTypeDef *heth)
, similar to UART currently.The lwIP implementation of ethernet communication e.g. in
ethernetif.h/c
will be helpful as reference code.