‎2021-03-26 04:32 AM
Hi,
I'm hoping this is the correct forum to ask this question. I am developing an industrial product using STM32 devices and I need to add ethernet capability to the product. I have a moderate amount of embedded development experience but zero networking/ethernet/iot experience. I do not know where to start with this addition. There are a number of acronyms floating around the internet but I have no idea what is relevant and what I need to know (tcp/ip, udp, ftp, lwip, aws, sockets, ports, packets etc.) What fundamentals do I need to understand in order to help me get this project off the ground? As my ethernet project requires only the slowest of transfer rates (kilobytes at most) I have currently opted for using a wiznet chip (as used in arduino) and RJ45 with embedded magnetics to make the design simpler. Any guidance or pointers would be appreciated.
‎2021-03-26 05:44 AM
Hi,
In my opinion you should start from understanding the tcp/udp protocols. You have to choose which protocol you want to use and it depends on what you want to achieve. You should also know what are the differences between client/server. For IoT I think you will be more intrested in TCP, because UDP is better to send a lot of data like audio streams.
Will you use RTOS? It's much better and powerful to use RTOS with lwip stack. There are many examples in the internet. I have also made some basics example for stm32h7.
I started my learning with this article and it helps me a lot at the beginning: https://www.academia.edu/32820259/Design_and_Implementation_of_the_lwIP_TCP_IP_Stack
‎2021-03-26 06:10 AM
I'm not exactly sure what my implementation is going to be yet, but ultimately what is needed is to display sensor data in a browser and store a history of sensor data (last 100 instances of data for example) . Whether this is done with the device acting as a webserver or the device acting as a client and us hosting a webserver remotely hasn't yet been decided. I won't be using RTOS in this instance as I'm not familiar with RTOS and I want to keep the product complexity at an absolute minimum (the ethernet addition was decided last minute by management).
‎2021-03-26 06:28 AM
Complexity at an absolute minimum is different for different user :grinning_face:
If you are not intrested in RTOS you will have to use LWIP raw API. It's event-driven api, so you have to implement callback for events. I'm not enough familiar with this solution to help you. Still I think you have to be familiar with tcp/udp and client/server concept at the beginning. That will alow you to implement basics echo server or client. When your lwip stack will work properly then you can go futher and ampliment another layer.
‎2021-03-26 06:34 AM
I'm sure that if one is already familiar with RTOS then that would definitely be the way to go. But as I'm interested in implementing the most basic of ethernet implementations within my time constraints, learning RTOS first and then proceeding with networking wouldn't be the best use of time that I have left. If I can design the required hardware and implement some basic functionality now, there's nothing stopping me from upgrading the software implementation at a later date. I'll take a look at your suggestions, thanks for the help.