RAK7391 LoRa gateway experience

Just received my RAK7391 which I’m pretty excited about - very well built and tons of great peripheral support. I only just started experimenting and will share my experience here as I progress, but I did have one observation/question that is Balena specific.

Because it’s a CM4 based board, I instinctively set the DT overlay "dwc2,dr_mode=host" from the Balena console to get the USB ports enabled/powered - however, doing so seems to temporarily brick my device. What I mean by that is that it restarts with the new config, but never comes back online and freezes with the ACT LED stuck on. Power reboots do not resolve the issue.

I’ve tried it a few times and the results are the same - they only way to fix is to re-flash the CM4 with a new device image. Never had a problem with other CM4 based boards and those DT overlays.

Has anyone else seen this behavior with other boards?


I just tried setting those parameters directly in config.txt before flashing and the result was the same.

The reason I’m asking here is because RAK’s default Rakpios image has those settings configured out of the box and the board accepts.

Not sure why, but it seems BalenaOS doesnt like "dwc2,dr_mode=host" specifically in the RAK7391 case. :thinking:

I had a lot of issues building my own Yocto images for CM4 - especially regarding the USB 2.0 controller on board (thats what you’re trying to configure). But this was already an issue on the building Yocto level, which probably the balenaOS Devs got figured out better than me. But for reference the link to the issue, maybe something useful there ( CM4 USB not working · Issue #824 · agherzan/meta-raspberrypi · GitHub ). Looking at the pinout of the board ( RAK7391 WisGate Connect Datasheet | RAKwireless Documentation Center) I am wondering a bit. Within the USB 2.0 text it is mentioned that the main USB 2.0 is connected to an USB 2.0 hub on the board. Also, there is an eMMC Flash jumper. I guess thats the same thing like with the RPi base board - you need to pull/change it if you do not want to flash the CM4 on the mainboard. Regarding the Status LEDs - it seems like they are also behind a GPIO Expander, so I would think they will not work until software is written for them…?
I am somehow feeling without extensive work / an own balenaOS version for this board, it will not support all features… :confused:

Shoot I was so looking forward to a plug and play. But perhaps we’re both wrong - I recall @xoseperez and @mpous did a RAK7391/Balena talk at TTN back in Sept. perhaps there is some code or instructions floating around from that presentation that I just overlooked?

1 Like

I really don’t know, sorry maybe I missed something there and it is way easier than I think - I love to be wrong in that case. Life is complicated enough :smiley: ! (putting this thread on tracking and looking forward to your progress :3 )

Let’s see if @xoseperez can help! i haven’t tried myself the RAK7391 :frowning:


That is going to be interesting! The platform sounds really awesome to be honest. I love these modular multi-radio systems. So many possibilites to do some cool stuff :slight_smile:


@nmaas87 would you be interested in taking a stab at Balenifying one? I’d consider ordering one for you if you share your experience.

@barryjump Well, I haven’t build a balenaOS image in ages - and I am always a bit low on time, however I would be quite interested to freshen up those skills and I would certainly take a stab and share the experience here - though I would be uncertain of the outcome of this endeavor (as said, has been some time XD).

The only real downside I see is that shipping that stuff to Germany is terribly expensive - we still got the 19% tax on the total sum (including cost of shipping) + some ~10 bucks of customs handling - which are called for during/after the delivery process to the receiver. Due to the same issue I only got a single RAK5146 866 (EU) USB /LBT/GPS which is hardwired into my home gateway - so I would not have a LoRaWAN module to test the board with.

So in case you were thinking about going forward with this, I would at least insist on paying the taxes and customs handling, otherwise I would feel bad about it.

1 Like

@nmaas87 Let me see what I can work out. Taxes shmaxes…
I think I still have your address from the Fin days.

@barryjump Yeah the address stayed the same. But I can send it to you again if you need it :slight_smile: