Electronics > Microcontrollers

How does one integrate WIFI & GSM into a microcontroller project with LWIP/TLS?

(1/3) > >>

peter-h:
I have this 32F417 based board (FreeRTOS, LWIP, MbedTLS, FatFS). Ethernet 10/100. All working.

Add-ons are interfaced via SPI, up to 21MHz.

I have a customer enquiry for WIFI and 4G.

AFAICT 4G uses a module. U-BLOX do some. I am already using a U-BLOX SPI GPS module.

With a GSM modem, you send it ATDT*99# and then when it returns OK (it now has an IP connection, be it GPRS, EDGE, 3G, 4G, 5G, etc according to local availability) you connect the TCP stack to it. I suspect one just does new versions of the ETH low_level_input and low_level_output functions (which currently connect LWIP to the ETH controller in the CPU, and aren't particularly complicated).

WIFI I have no idea. How is that done? It could be vastly more complex than GSM. One extra is that you need a UI somewhere to configure the credentials, so the product needs an LCD, or a config via ETH or USB.

I would always want to leverage my existing product, because it works great, and doing all this from scratch would be a huge job. The ESP32 tends to draw these applications but that would be a huge engineering job with a lot of risk, compared to doing an SPI daughter board with two modules on it. And I've had so many bad experiences with Chinese vendors (which I have used extensively) and the severe degradation in their business ethics, plus the obvious political risk, that I don't want to go down that route. The Chinese are picking up a lot of business right now because they are shipping silicon, when Western companies are not.

Has anyone done this before, and what kind of extra software is needed?

tellurium:
For WiFi, I'd look at the WiFi module used by the RP2040 Pico-W board.
https://www.raspberrypi.com/documentation/microcontrollers/raspberry-pi-pico.html#raspberry-pi-pico-w-and-pico-wh
It uses CYW43439 Cypress module (now Infineon), https://www.infineon.com/cms/en/product/wireless-connectivity/airoc-wi-fi-plus-bluetooth-combos/wi-fi-4-802.11n/cyw43439/?redirId=216343

Silenos:
So you want GSM or 4G? That's not the same thing. And for 4G: do you want short messages? voice? video? Internet? Mind GSM/UMTS is totally different to 4G + on everything, including UE interfacing. I'm not familliar with full-blown 4G modules, but if such exist, you propably can get away with 4G-specific nasty stuff, especially with at commands.
Also, good luck with handling multiple eth interfaces without linux.

peter-h:
Just internet. It would be short messages. Telemetry.

The actual network connection is transparent to the TCP/IP stack, normally, but obviously anything less than 3G doesn't work at all for normal internet use since the protocol is so horrible (over https) that various things time out.

I said "GSM" because that is how you start. You start with a GSM (voice, SMS, and 9.6k data which used to be sold as "WAP") dial-up connection to the tower, and you dial ATDT*99# and then you get whatever there is for the IP connection. AFAIK you never just start with 4G. But this is implemented by the module, AFAIK, and some may do the dial-up internally. With the older GPRS modems, say the Siemens/Cinterion TC35 etc ones, *99# would get you only GPRS (because that was all the modem did) which at ~20kbits/sec is absolutely fine for talking to private servers but probably not for TLS and it is almost totally useless for the open internet. Messaging (e.g. Telegram) works over GPRS, eventually, but websites don't.

Probably the ETH v. GSM selection would be done with a config file i.e. not auto config.

nctnico:
Likely any 'GSM modem' (whatever is underneath it) talks to a host using PPP protocol so the microcontroller side would need to be able to work with that.

Navigation

[0] Message Index

[#] Next page

There was an error while thanking
Thanking...
Go to full version
Powered by SMFPacks Advanced Attachments Uploader Mod