Noob here with a potentially really obvious question. If I am using FreeRTOS with TCP/IP, do I need an Ethernet connection for it to work? Or can I connect between the device and my computer no problem? As an extension of that, I mainly understand cellular WiFi and a reasonable understanding of routers. What does the TCP/IP extension make the device function as? What are its usecases?
If I am using FreeRTOS with TCP/IP, do I need an Ethernet connection for it to work?
Definitions time !!! TCP stands stands for “Transmission Control Protocol.” Long story short, it’s a protocol imposing how packets are transmitted.
Ethernet, It’s a technology for wired networking.
Take a look at this image (article source.) It presents the chain of transmission/reception of data. It’s named OSI. In this, TCP takes place in the “Transport Layer”, while Ethernet is on “Data Link Layer” and “Physical Layer”. What we can understand is that using TCP do not impose to use Ethernet. The implementation of these two technologies are not dependent. Ethernet can be replaced by Wi-Fi in this chain (not in a finger snap of course.) To go further, TCP can be replaced by another protocol as UDP (not in a finger snap, they don’t present the same pros and cons nor the same interfaces, but it’s not the subject.)
So First ! You do not need an Ethernet connection for it to work.
What does the TCP/IP extension make the device function as? What are its usecases?
I’m not sure of my answer, so I’ll preserve myself of spreading misinformation. Can I suggest you to take a look at the following resources ?
A post explaining the role of the device depends more on its funder API than on FreeRTOS :
A topic about using an ST MCU as a Wi-Fi Access Point (AP) :
I’m not 100% sure if I understand completely. If you’re asking if a router is mandatory, I’ll say no. It’s still usable to create network connection only between these two hosts (PC ↔ device).
For example, assuming that there is no DHCP server or router functionalties on your computer. You can configure a static IP address 192.168.1.2 for your device and set another IP address 192.168.1.3 on your computer. Then they can connect to each other with this link.
Note that I skip gateway and subnet mask to simplify. Besides that, in this example, the device is only able to connect with your computer and no external internet available.
You can create an application using the loopback interface and use protocols like TPC, UDP, and mDNS.
The two PCAP interfaces (WinPCAP, Linux) “borrow” the Ethernet adapter of your PC or laptop. It allows you to create a new interface with you own IP- and MAC-address and communicate on the LAN and Ethernet.
It is not fast, and it is not perfect, but it is very useful for educational purposes.