Best hardware for a very small IoT deployment AP

Hi,

I am looking for a new device to use as a Wifi AP (2.4G) for a few ESP32 situated a few meter away and running a MQTT broker (mosquitto).

  • It need to be able to be used as a Wi-Fi extender/repeater/bridge.
  • It would be better if the power consumption is low as it will often need to be powered by a battery

So far the Gl iNet Mango or Shadow seems to fir my use case as they are very cheap & consume only 1A https://store.gl-inet.com/products/gl-mt300n-v2-mini-smart-router
but might be too limited to run a MQTT broker ?

Any other suggestion in a sub $50 price range? like should I consider the RPI Zero 2W ?

Many thanks

Only if you're OK with terrible built-in wifi.

1 Like

Considering that the client devices are ESP32s doing MQTT a "few meters" away, the only issue would be with the Pi's limit on attached clients when in AP mode.

There's alternate firmware for that use case, but I don't think it applies to the Zero 2W - https://github.com/RPi-Distro/firmware-nonfree/commit/feeeda21e930c2e182484e8e1269b61cca2a8451 is limited to the Pi4 I think

1 Like

Can always get something listed at https://github.com/morrownr/USB-WiFi, but then you need some kind of motherboard for it, I guess.

1 Like

Yeah, and at least the "known good" ones I have experience with are massive overkill for OP's use case, and power hogs as a result of it.

Low power (even at the cost of performance) is a whole different use case. TBH an Android phone might be the best solution here, not sure if there's a way to run an MQTT broker on such a device. Nothing else has the power management chops for this use case. All Pis have very poor power management (while the base SoC might have some good PM features, the boards themselves omit the support for those - kinda like the BeagleBone does not support ANY of the AM3328's low-power optimizations) - and even if you did run vanilla Linux on an Android phone, you'd probably lose a good portion of the power management goodies.

Of course, the OP's definition of "battery" is unknown. Running off of a single 18650 or a set of AAs is completely different than, say, a solar panel feeding a 20-40 Ah lead-acid or LiFePO4.

1 Like

Where is your server with a database?
The mqtt broker could be in the server as an input port, then your AP is nothing special.

TBH an Android phone might be the best solution here, not sure if there's a way to run an MQTT broker on such a device.

There is a package for termux https://github.com/termux/termux-packages/tree/master/packages/libmosquitto
Yes, an old android phone is at the same time a very elegant or awkward solution but at least it would solve the power management issue very simply. The problem is I do not have any handy...

I know the RPi Zero is not a good solution because of its wireless and to be honest I was fishing for suggestion in its alternatives like the Orange, Banana, Nano PI ...

No the problem is I need the MQTT broker if there is a power outrage so it need to be on the "IoT" AP powered by the battery.

What kind of battery are we talking about here, and what is the required runtime? What is the upstream connection's power source and runtime? The small travel routers from TP-Link or GL-inet might be reasonable options...

You can rule out all pi devices if you want it to use its onboard wifi as an extender/repeater device that uses a wireless uplink... the radio can only operate in sta or AP mode, not both simultaneously (although you could add a USB wifi stick).

Wifi 'extender' functionality is a bit of a hack using relayd -- it may have some quirks expecially if you're trying to run the MQTT broker on device. If you have the ability to provide an ethernet uplink, that'll be better.

What kind of battery are we talking about here, and what is the required runtime? What is the upstream connection's power source and runtime?

I would say the goal is 8 hours on battery with a small UPS & later a solar installation.

Someone actually measured the consumption of the Mango and apparently is about 1.5W and the Shadow consume less
So not bad !

I also measured the consumption of my Flint and it i about 4W but it is another type of beast and is running a few services.

Wifi 'extender' functionality is a bit of a hack using relayd -- it may have some quirks expecially if you're trying to run the MQTT broker on device. If you have the ability to provide an ethernet uplink, that'll be better.

I can't have an ethernet link and to be honest I trusted GL iNet who pretend it support it. I couldn't find out if their driver support Layer 2 bridging or anything else.
What kind of quirks are thinking about?

Is there a chipset I should prefer regarding this issue between the Mango's MediaTek MT7628AN and the Shadow's Atheros QCA9531 if I weree to use OpenWRT ?

Many thanks

1 Like

Aside from the already mentioned limits:

the Zero2 is still practically not supported yet due to never resolved Wifi OSS licensing issues. Though the OpenWRT stuff would be practically there, it requires self-compiling and extra tinkering at this time.

Also any Raspberry (at least I think all RPIs are affected) built-in Broadcom Wifi chip can either be Access Point or Client, but not both at the same time, as the RPi foundation chose the cheap Wifi chip firmware deal, to save costs.
As a result not usable as repeater, unless you buy and attach an extra USB Wifi stick.

1 Like

See the known issues.

1 Like

Yup. And also as I mentioned, there is a SEVERE limit on connected clients in AP mode - there's alternate firmware for the pi4 that I linked for this, but that isn't usable on the PiZero2W

Since it sounds like the battery backup can be a somewhat larger thing such as a 12v gel-cell or 12v LFP, I think some of GL.iNet's older stuff like the AR750S might work well here. Although the AR750S microusb port for power is really fragile - I switched to Pi4s because too many of them failed. (In my Pi4 use case, it's operating in client mode only, so the various AP-mode issues aren't problematic. Although right now client mode is broken on the openWRT master branch for the Pi4 - I still need to collect logs and provide them to nbd but haven't gotten around to it...)

1 Like

The Atheros n chips are very good on power, it should be less than 1 watt for the whole router. I don't know how that compares to MT7628.

1 Like

While MT7628 is a nicely integrated (low-end) SOC, I wouldn't consider it part of my vocabulary. The mixture of old-world RaLink (rt2x00 for 2.4 GHz and SOC) designs and new-world Mediatek (mt76 for 5 GHz) designs is not great (rt2x00 in AP mode does not meet quality expectations relative to mt76 or ath9k/ ath10k), apart from the typically low-end system specs (not that much of an issue for this use case, but still).

mt7621a+mt7602e[*] or ath79+ar92xx[*] would be preferable in pretty much every regard.

--
[*] or better, e.g. driver support for >=mt7615n brings a significant improvement over mt7602e/ mt7603e; the support state between ar9220 and >=ar93xx varies less.
The TP-Link TL-WR1043n v2/ v3 (NOT v1!, not enough RAM) might do or the TP-Link TL-WDR3600 (preferred), both tend to be rather cheap on the used markets.

1 Like