is compatible with HLK-7688A, because it’s MT7688 not MT7628
The MT7628 is basically just an MT7688 with a diversity wifi radio; they are for all practical purposes software compatible.
What you may need to watch out for is different serial port assignments on different boards, otherwise you may find that the serial output you have from U-Boot suddenly ceases when the Linux kernel starts because it is configured to have the console on a different UART than U-Boot was. It can be changed but is painful; also there’s some obscure change you need to do in order to enable all of the UARTs.
Functionally, the main thing to be aware of is that RAK applies a patch to the MT76x8 kernel SPI driver to work around a hardware quirk, and the modifies the LoRa gateway HAL to use the resulting capability. Other than that the packet forwarder is pretty much stock.
Their builds may have a lot of extraneous stuff pulled in; at one point I had one (not sure if this starting point or another) break because an IP webcam daemon’s upstream repository went away. While putting a webcam on a gateway sounds fun, it wasn’t a core need so disabled it in the build.
If you go cellular, consider using an ordinary USB interface to the modem for more flexibility to change it later. The SIM808 is limited to some fairly old standards which are being phased out. And since you only have the one USB port, consider putting a hub in there.
Beware the MT76x8 family is basically end of life and not recommended for new designs.
I want to build a movable gateway
Consider that this can cause many of the same problems for other TTN users as the single channel fake gateways do: if your portable box pops up giving strong coverage in an area where there was previously only weak coverage, other people’s ADR nodes will adapt. Then when you move away, it may take hours to days of data loss for them to ramp back down to a longer range mode which does work with the surviving fixed gateways.
So what kind of OpenWrt MCU you could recommend to me ?
I know the movable problem, but it’s for bees hives application, and where there are hives there are no LoRaWan, so i need a gateway that i can leave where there is cellular connection. Second why, is that beekepers move there hives every months.
There’s the AR9331 that Dragino uses. To me it’s less attractive as it only has one UART, vs the 3 on the Mediatek parts.
Mediatek had been making some noise about coming out with a new chip; I did some looking today and see no hints of it.
It’s not like the MT76’s you have on hand are going to suddenly stop working, just that someday the supply will run dry, and the underlying Linux hasn’t been updated in ages.
Thanks for your reply.
Yes, the AR9331 could be a good choice.
For Internet connection, i think i could use a 4G / 5G USB dongle with antenna. It’s less expensive.
@cslorabox, interested in your thoughts about the variety of Linux and the hardware in this application.
Assuming the gateway is behind a NAT Router (even if it’s on a 4G/5G network), then do you see an advantage of OpenWRT over say Debian or Ubuntu? I noted your comment that in the case of the MT76’s the OpenWRT had not been updated in ages.
With respect to the hardware. Are the components on the MCUs listed in this post "carrier grade? How do you think they compare with the Raspberry Pi alternative?
A pi is really not meant for production use; it’s a set-top-box chip re-purposed as a computer science education gizmo. And it inescapably depends on an SD card made of cheap multi level flash cells hiding behind an undocumented flash translation layer.
In contrast, OpenWRT is an example of a compact Linux with an all-up image size in the single-digit megabytes. It’s specially targeted to being able to fit in a small NOR flash - not only an inherently more robust storage technology, but one that runs without a flash translation layer. A read-only partition on a NOR flash is truly read-only, as it is at the actual physical location specified, rather than being a sea of blocks from shared collection logically put there but a flash translation layer.
To put it in simple terms: you need to shut down a pi, but you can pull power on a properly configured OpenWRT box as often as like.
The MT76x8 and AR9331 both come from a long lines of MIPS-based SoC’s intended specifically to be small, robust routers. And that’s basically what a LoRaWAN gateway is, only to an unusually simple and low traffic degree.
The main issue with the MT76x8 and its older OpenWRT and particularly Linux kernel derives from Mediatek never having released source for a WiFi driver, but only binary builds tied to a particular kernel. There have been attempts at open source drivers, but it’s not clear if any ever really panned out. If one doesn’t need WiFi (a production grade gateway really shouldn’t…) then it’s possible to use a fairly up-to-date kernel (for which no vendor wifi driver is available) and a newer OpenWRT distribution. I believe Dragino’s setup for the AR9331 is substantially more current - it’s been a while since I looked, but my guess would be the WiFi driver there (if used) is properly open source.
There are two key reasons something similar can’t be done with a pi: one is that the pi foundation hasn’t exposed the strapping pins needed to leverage the SoC’s ability to boot from NOR. The other is that the secret GPU is needed for a lot of basic behind-the-scenes system functionality, and the binary blob to make it work is a bit large all by itself.
Okay so, the best choise is RAK2287 for LoraWan (less consumption), AR9331 for MIPS and RAK8213 for LTE.
But what about the compatibility of all with OpenWrt ? https://github.com/RAKWireless
It is interesting, but only go that route if you are really determined and willing to do some source level work. You’d likely be the first person to build the code needed for the newer concentrator chip for OpenWRT. It will definitely be possible but there’s a fair chance you’ll need to make some small adjustments, eg with something (picoGW?) there was a novel variation of a sort routine not typical present in small libc’s. It was fixable, but took some study. And you may need to port any host-spi HAL customizations from the SX1301 version to the SX1302. Semtech unfortunately maintains three separate software projects; they’re a lot of similarity so porting fixes between them isn’t too bad, but they are distinct repos and sometimes do the same thing in slightly different ways.
My recommendation: build the code before you buy the hardware, if it’s seeming too larger a project, get an SX1301 instead
AR9331 for MIPS
If you do that, you probably want to start with Dragino’s sources
and RAK8213 for LTE.
Better to get yourself setup to host any traditional mpcie form factor embedded modem, which will be USB connected using the USB bus embedded on the mpcie connector. Also rig things so that you can power cycle or reset it from a GPIO, as some can get “stuck” in interesting ways. Then you can choose whichever vendors modem seems most suitable and compatible with the carrier you want to use. But get the modem from a vendor or even the mobile carrier, middlemen aren’t useful here.