Author Topic: Adding WiFi/Ethernet Connectivity to STM32 Board  (Read 3391 times)

0 Members and 1 Guest are viewing this topic.

Offline Kittu20Topic starter

  • Regular Contributor
  • *
  • Posts: 96
  • Country: in
Adding WiFi/Ethernet Connectivity to STM32 Board
« on: December 20, 2023, 11:57:09 am »
Hello Everyone,

I'have an STM32F407  board and aiming to establish data transmission to a remote server via either WiFi or Ethernet connectivity. To achieve this, I've identified the ENC28J60 for Ethernet and the ESP8266 for WiFi as potential options.

However, I'd greatly appreciate your expertise and recommendations on additional hardware suitable for WiFi/Ethernet connectivity with an STM32 board.

If anyone has prior experience with similar setups or knows of reliable modules that  integrate with the STM32 platform for data transmission, I would be extremely grateful for your guidance.
 

Offline profdc9

  • Frequent Contributor
  • **
  • Posts: 319
  • Country: us
Re: Adding WiFi/Ethernet Connectivity to STM32 Board
« Reply #1 on: December 20, 2023, 12:46:55 pm »
The ENC28J60 only sends and receives packets.  If you want something that can perform the TCP/IP protocol for you, consider the Wiznet 5100 or 5500 (very similar).

The ESP8266 works fine as a serial to wifi gateway.   You can get schematics and links to firmware here:

https://github.com/profdc9/WifiModem

Dan
 

Offline phil from seattle

  • Super Contributor
  • ***
  • Posts: 1029
  • Country: us
Re: Adding WiFi/Ethernet Connectivity to STM32 Board
« Reply #2 on: December 20, 2023, 07:59:52 pm »
For ethernet, Wiznet IO modules - Wiz850io or Wiz550io.  I've not integrated these with STM but have used with Pico/RP2040.  Cheap and reliable.  Uses SPI.  Phy, magnetics and RJ45 jack in one small package.  You can move everything onto your board if you want to do the work or just use the module as a plug in to your board.  Lots of good info on the wiznet site.  lwip is supported.

https://www.wiznet.io/product-item/wiz850io/
 

Offline fchk

  • Regular Contributor
  • *
  • Posts: 245
  • Country: de
Re: Adding WiFi/Ethernet Connectivity to STM32 Board
« Reply #3 on: December 21, 2023, 01:32:51 pm »
You really should have a look at these guys:

https://www.8devices.com/products

These are Linux based communication modules that both integrate wired and wireless LAN. The use of Linux get you a much better network stack than anything that is available on STM32 today. You can choose between 2.4G and 2.4/5G WiFi and single or dual wired LAN ports, and you only have to design a single communication link to the STM32. The link to the STM32 could be USB, UART, SPI, ...

fchk
 

Offline kripton2035

  • Super Contributor
  • ***
  • Posts: 2587
  • Country: fr
    • kripton2035 schematics repository
Re: Adding WiFi/Ethernet Connectivity to STM32 Board
« Reply #4 on: December 21, 2023, 05:04:22 pm »
Rich connectivity: Superior and innovative peripherals: Compared to the STM32F4x5 series, the STM32F407/417 product lines feature Ethernet MAC10/100 with IEEE 1588 v2 support and a 8- to 14-bit parallel camera interface to connect a CMOS camera sensor.

[/size][/color][/size]
 

Online tellurium

  • Regular Contributor
  • *
  • Posts: 229
  • Country: ua
Re: Adding WiFi/Ethernet Connectivity to STM32 Board
« Reply #5 on: December 27, 2023, 09:48:08 pm »
Speaking about Ethernet.
Those STM32s with integrated MAC controller still require an external PHY chip.
An alternative is to use W5500 MAC+PHY (works over SPI), and then use pretty much any MCU you like.
What is the point of being limited to MAC-enabled STs? Right, there is no point at all.

W5500 has its own built-in stack with socket API, alternatively you can run a stack on the main MCU and use W5500 just to send/receive frames.

Then, WiFi and Espressif. I don't get why people still mention, still talk, and still use ESP8266. Mental inertia, I suppose.
Practically, only ESP32 line should be considered.
And if we're talking about ESP32, a possible solution is to run the whole networking stuff solely on ESP32. Both Ethernet and/or WiFi and/or cellular. Then, ESP32 could provide a simple serial interface to the main MCU. One possible implementation of that scenario - a product of my company, https://vcon.io
Open source embedded network library https://mongoose.ws
TCP/IP stack + TLS1.3 + HTTP/WebSocket/MQTT in a single file
 
The following users thanked this post: SiliconWizard

Offline SiliconWizard

  • Super Contributor
  • ***
  • Posts: 14481
  • Country: fr
Re: Adding WiFi/Ethernet Connectivity to STM32 Board
« Reply #6 on: December 27, 2023, 10:10:53 pm »
Mostly agree here. One thing to add is that products with an Ethernet connection rarely are ultra-cheap devices. I just don't see a market for that. USB/Wifi/BT, yes. But Ethernet? Not really.

So the benefit of saving maybe a dollar and maybe some PCB area by integrating the MAC on the MCU, I don't really see a benefit either indeed, considering that will make you dependent on a particular MCU as tellurium pointed out. And that again, Ethernet-enabled devices rarely need to be ultra-cheap nor ultra-miniaturized.

The thing against the W5500 is that it's a bit limited in terms of throughput, but you probably won't get any better with the integrated MAC of a STM32. Plus the pain of the software network stack indeed.

So while I'm all for nicely integrated USB and radio stuff, I just don't see it for Ethernet on a MCU, at least not unless you target maybe Gigabit Ethernet, and then that will limit the options severely anyway.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf