Better router via XU4/HC1 designs

Share here your ideas for new projects
Post Reply
Nominal Animal
Posts: 73
Joined: Sat Sep 16, 2017 12:51 pm
languages_spoken: English, Finnish
ODROIDs: C1+, HC1
Location: Finland
Has thanked: 0
Been thanked: 0
Contact:

Better router via XU4/HC1 designs

Unread post by Nominal Animal » Wed Mar 13, 2019 2:46 pm

If I were Hardkernel, I would look into whether it would be worth the effort to respin yet another board variant from XU4/HC1, one for "router" use.

First, let me explain what I am talking about.

Currently, dedicated Linux-based routers are very limited in RAM. I've looked at various (mostly OpenWRT-compatible) routers and router boards from e.g. Mikrotik, but they typically have only 64MB of RAM. This is fine for an off-the-shelf router, but completely inadequate for a proper network node; for stuff like running your own automation or IOT stuff, or really even for running proper stateful firewalling solutions with blacklisting based on suspicious behaviour. (I am referring to things like fail2ban, which I run on my internet-exposed machines. Right now, after visiting some less than reputable sites, the fail2ban on this laptop has blocked 468 IP addresses due to SSH connection attempts in the last 24 hours. Everyone should run something like this on the internet-facing edges of their networks.)

I would love to have Ralink RT5572 integrated (via USB 3.0) on the board, dual-band with separate radios and IPX connectors (allowing simultaneous soft-AP on both 2.4 GHz and 5 GHz bands; this uses the rt2800usb Linux driver); or similar already supported chipset (pair), say Atheros 10k. This would allow one to use the board as a dual access point or router, or just as an SBC with well-supported wireless connectivity.

I'd also love to have either an USB 2.0 port on pins, or an integrated mini-PCIe WWAN adapter slot (they're really just USB 2.0 with extra pins and a SIM slot!) or two on the board also -- or, perhaps, on a helper board -- with associated SIM card sockets. These do exist as separate boards already; they're basically mechanical, with almost no active components.

There is no need for the HDMI connector, and the way HC1 has the processor on the underside for easier cooling solutions would be optimal. Essentially, the only outside connectors would be the Gbit Ethernet, an USB 3.0 port, and the power jack. A second Ethernet port would be quite useful as well, even if it increases the price a bit. It would be optimal if the board had an integrated DC-DC converter, so that one could supply 9 - 20 V to the board from a cheap wall wart. GPIO pins, especially some with 3.3V SPI and I2C capability, would be a boon to hobbyists. (For example, to run a small TFT or OLED display for the thingamajic.)

Now, why would that be interesting to anybody?

With a WWAN adapter, say a Huawei ME909s-120 (B1/B2/B3/B4/B5/B7/B8/B20 bands for 3G/4G/LTE in the EMEA region; check your local bands here), you'd essentially have a router capable of dual band AP (2.4 GHz and 5 GHz), Gbit Ethernet, and 4G/LTE wireless Internet connectivity. I, and many others, are looking for that exact thing. The closest thing to something like this currently is the Linksys WRT32X router; remember, we are talking about a device one can run Linux on, and do what they want: home automation, small IOT servers, or whatever.

Software-wise, I would recommend sticking to upstream kernels only. Not only would this save development costs, but it would also make it much more Linux-developer-friendly. Samsung is actively developing the Exynos 5422 support in mainline kernels; I can see very recent patches by e.g. Lucasz Luba at LKML. This is especially important wrt. the WiFi chipset support; I'd rather have something well supported than bleeding-edge. (WWAN modems use USB 2.0, and are supported via ModemManager. You could do what Mikrotik did, and release their own mini-PCIe modem by rebadging an existing one, just making sure userspace ModemManager supports it.)

Why am I bringing this up?

This is basically the problem I've been trying to solve for two years now, using existing (discrete) hardware, and am increasingly seeing others trying to solve it as well. Outside of big cities, 4G/LTE internet connectivity is much cheaper than fixed landlines, but reliable installation (anything better than USB stick-type 4G/LTE modems) is expensive, with very few options for us home automation hobbyists that give us full control. (Basically, you cobble together from discrete devices, and hope to be able to run OpenWRT on enough of them to get the job done.)

After starting with an Odroid HC1 (as essentially a WWAN gateway and local logging/video server), then looking at a number of off the shelf routers (I got a D-Link GO-RT-AC750 and an Asus AC-51U for this), and then at e.g. Mikrotik RBM33G, I'm basically back to my Odroid HC1 a year and a half later. Essentially, I think my best option is to use Odroid HC1 with one of those USB WWAN adapters and a 4G/LTE modem to get 4G/LTE connectivity, and a separate dual-band WiFi router running OpenWRT with VLAN capability to help me route specifically tagged internet traffic to specific devices. It is not optimal, but it is the best I can do with a limited budget. If only there was a board with those USB 2.0 and USB 3.0 features built-in!

User avatar
mad_ady
Posts: 6145
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 120 times
Been thanked: 83 times
Contact:

Re: Better router via XU4/HC1 designs

Unread post by mad_ady » Wed Mar 13, 2019 10:09 pm

Sounds interesting, and the xu4 has the mainline support needed to pull this off, but:
1. You can't easily estimate how many orders you'll get for a specialized device
2. HC1/2's heatsink might interfere with wifi
3. You can do most of what you want with an xu4 and external devices.

User avatar
venkatbo
Posts: 518
Joined: Mon Feb 25, 2013 3:10 pm
languages_spoken: english
ODROIDs: C0/C1+/C2; U3+; XU3-Lite/XU4; H2; VU/VU7+; Touchscreen Show TFT Cloudshell SmartPower mAHRS DAC GPS Multiscope Ocam
Location: Bay Area, California
Has thanked: 0
Been thanked: 4 times
Contact:

Re: Better router via XU4/HC1 designs

Unread post by venkatbo » Wed Mar 13, 2019 10:45 pm

From what I've been reading, it appears more an more related open source software projects are requiring AES-NI support to avail onboard crypto functionality... If that is the case, N2 may be a viable option... with 4GB to boot... maybe the unneeded ports can be "soldered out" and you can "build" this whole proto... definitely more powerful for $30 diff.

As @mad_ady points out it may be not be viable for HK due to low volumes, but a stripped down version of N2 may be an option for HK, like the MC1.

User avatar
mad_ady
Posts: 6145
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 120 times
Been thanked: 83 times
Contact:

Re: Better router via XU4/HC1 designs

Unread post by mad_ady » Wed Mar 13, 2019 11:14 pm

N2 viability as a router depends on mainline kernel support, which is worse than Samsung

Nominal Animal
Posts: 73
Joined: Sat Sep 16, 2017 12:51 pm
languages_spoken: English, Finnish
ODROIDs: C1+, HC1
Location: Finland
Has thanked: 0
Been thanked: 0
Contact:

Re: Better router via XU4/HC1 designs

Unread post by Nominal Animal » Thu Mar 14, 2019 3:40 am

mad_ady wrote:
Wed Mar 13, 2019 10:09 pm
Sounds interesting, ... but
Right. I can grab a powered USB 3.0 hub and connect the USB WiFi adapters to that. For the WWAN, I can use those existing WWAN USB 2.0 adapters (via a powered USB 2.0 hub). They need to be powered, as the radios have rather high peak current requirements. You do need to choose the devices carefully to ensure they are fully supported in Linux -- and the way many manufacturers change the innards without telling the customers makes this hard.

This is basically what I am doing, after exploring all other options for over a year. (Except that because I have a HC1 and not an XU4, I use Gbit Eth instead of USB 3.0, and split it to two separate devices both running Linux.) It is not very integratable, though, even when you rip the devices guts out from their plastic enclosures. It also needs quite a lot of knowledge to get it working (things like EMi interference with WiFi and Bluetooth easily bite those who are unaware of it), so not many hobbyists are doing this yet; it is fragile, unless you are very careful to make it robust.

But, if someone wanted to hit this market niche, HK would be superbly placed to do so:
  • It only makes sense (for users) if the support is mainlined, and Exynos 5422 is a processor particularly well suited for this kind of use.
  • HC1/HC2/MC1 are very close already. The difference would be in the peripherals, not the core board.
    (In particular, I'd use two USB 3.0 hubs: One for two Gbit Ethernet interfaces (just duplicating the existing circuit twice) and the two WiFi radios; the other for an user-accessible USB 3.0 port and two or more USB 2.0 high-speed interfaces for the WWANs via mini-PCIe connectors.)
  • You could even put the WWAN and radios on an USB 3.0 daughter card, that you could spin in two variants: one with USB 3.0 connector (for use with XU4 and other boards), and one with a short shielded cable for the new board.
XU4 has the unnecessary HDMI connector and associated circuitry, otherwise it would be even better than HC1/HC2 for such use.

The WiFi radios are essentially canned reference designs. You can tell them from the ground stitching outline on boards. Any heatsink won't affect the WiFi radios at all because of that isolation, and because the antennae are external (via IPX connectors) -- no on-board antennae. Bluetooth will interfere, and you do need to be careful to shield the USB 3.0 lines from the radios (or use those foil cans, essentially metal boxes on top of the WiFi radios, to shield them); this is one of the details that produces very poor results for some.

It is absolutely true that nobody knows whether this would make any business sense. I am only saying that there are no equivalents on the market, and I am seeing many people looking for something like this.

It is interesting to note, however, that the proper industrial stuff is done basically the same way, except with SPF modules in proper high-bandwidth backplane devices, and "dumb" WiFi transceivers. Most consumer devices surprisingly have *more* smarts in them, rather than less. For example, it is impossible to find plain WWAN USB modems in stick form factor. Things like ZTE MF823 actually include a WWAN USB modem, and a small SBC running Linux! It is the industrial stuff that has plain WWAN modems. Sure, they tend to use much better quality components (as in name-brand capacitors, designs rated for 24/7 use unlike consumer hardware, wider operating temperature range, conformally coated boards, and so on), but they are also about 2x - 4x more expensive.

In particular, the Huawei ME909s-120 3G/4G/LTE modem is commonly used even in high-end industrial 4G/LTE installations. (The best ones have two, in a failover configuration.)
venkatbo wrote:
Wed Mar 13, 2019 10:45 pm
it appears more an more related open source software projects are requiring AES-NI support to avail onboard crypto functionality...
Well, not really really. I mean, if you run a home automation or an IOT server, you do need to use TLS, absolutely. However, the bandwidth needed is not huge. Crypto is just not a bottleneck for home users at all.

It is rather important to realise what the actual user needs are. I'm just describing mine here, hoping that perhaps HK would look into it, and find out whether such a spin-off board is feasible; noting that it really is more of a respin of a well-designed existing product they obviously have lots of experience with, and not a completely new board. Heck, if I was an EE, I'd design a USB 3.0 board (with dual WiFi radios, dual USB 2.0 WWAN connectors with SIM card slots, and twin Gbit Ethernet) myself.

Nominal Animal
Posts: 73
Joined: Sat Sep 16, 2017 12:51 pm
languages_spoken: English, Finnish
ODROIDs: C1+, HC1
Location: Finland
Has thanked: 0
Been thanked: 0
Contact:

Re: Better router via XU4/HC1 designs

Unread post by Nominal Animal » Thu Mar 14, 2019 4:01 am

mad_ady wrote:
Wed Mar 13, 2019 11:14 pm
N2 viability as a router depends on mainline kernel support, which is worse than Samsung
Interestingly, there are folks who are really trying to get Amlogic AML-S805X-AC and AML-S905X-AC support into mainline kernels; Libre Computer folks for example. I backed the La Frite Kickstarter for exactly that reason, but they botched it utterly. It was supposed to be delivered in Nov 2018, but it is now Mar 2019 and no board yet.

Unfortunately, I do not see similar efforts for the AML-S922X. Neil Armstrong from Baylibre recently added the AML-S922X G12B package ID to Amlogic Meson Linux support for booting the Odroid-N1, queued for kernel 5.2, but that's about it. Amlogic Meson support is alive, but I am not sure how active it is. Lacking an N1/N2, I obviously do not know how good the current mainline support is. (I do have a C1+ as well, but haven't booted it up in months, but I suspect it should work quite well using a mainline kernel, considering the ongoing AML-S805 mainlining efforts.)

I guess it was always on the back of my mind, that one could verify the feasibility and cost of my above triple-dual GbE/WWAN/WiFi using a simple (reference design derived!) USB 3.0 board with an XU4. Iff that works well, they could spend the efforts of integrating it to an Exynos 5422 board, using their existing knowhow with XU4/HC1/MC1 etc.

The only thing I can say for sure to HardKernel, is that they need to stop forking the kernel, and instead concentrate on getting their boards supported in mainline kernels. I know the software engineers hate the idea (and why), but really, it is the only long-term viable solution. Maintaining your own kernel fork, even if it makes your software engineers happier, is simply too expensive in the long run. (While they may claim that maintaining their own fork is cheaper, they are lying. They lie, because it is much more comfortable to work on your own fork; especially when management pushes for results, you can simply cobble together something that seems to work, and hope to fix it properly later. Feed them and get them drunk, and they will admit it. I know this, because I feel that way myself, and know at least a dozen others who feel the same way.)

User avatar
mad_ady
Posts: 6145
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, N1, H2, N2
Location: Bucharest, Romania
Has thanked: 120 times
Been thanked: 83 times
Contact:

Re: Better router via XU4/HC1 designs

Unread post by mad_ady » Thu Mar 14, 2019 4:21 am

As far as I remember, the XU4 has two usb3 root hubs, each limited to about 1.5Gbps - one used for onboard ethernet and one either for the two usb3 ports, or for the sata adapter in HC series.

Not sure you could squeeze 1Gbps ethernet + high performance wifi (3-800Mbps) + 4G (1-200?Mbps) on the same bus.

Nominal Animal
Posts: 73
Joined: Sat Sep 16, 2017 12:51 pm
languages_spoken: English, Finnish
ODROIDs: C1+, HC1
Location: Finland
Has thanked: 0
Been thanked: 0
Contact:

Re: Better router via XU4/HC1 designs

Unread post by Nominal Animal » Thu Mar 14, 2019 5:02 am

mad_ady wrote:
Thu Mar 14, 2019 4:21 am
Not sure you could squeeze 1Gbps ethernet + high performance wifi (3-800Mbps) + 4G (1-200?Mbps) on the same bus.
You're right. Looking at the block diagram, I'd put the WWAN adapter(s) on the USB 2.0 host, with a hub, exposing an USB 2.0 port for use with HID and 12 Mbit/s devices -- microcontrollers and similar home automation and IOT stuff. Just make sure you don't do a Qualcomm and have the hardware drop USB packets on high load: that is inane, and very much a show stopper: that's why I don't use RPi's for anything anymore.

(Note that for this particular use case, the entire multimedia subsystem is unneeded. If I'd found one, I'd used the HC1 block diagram instead of the XU4 one.)

The two USB 3.0 hosts could use almost identical hardware: a three/four-way hub each, with one/two exposed port(s), a GbE, and a WiFi radio (except one is 2.4 GHz, and the other 5 GHz; say, 750 Mbps class). These are all straight reference designs. The reason for two GbE ports per SBC is not to maximize bandwidth, but to allow firewall configurations without relying on VLANs. For example, I need a firewalled subnetwork for wired IP cameras, and I want it separate from the user-accessible wireless network. This is very standard fare for home automation, really, as those devices tend to be porous as swiss cheese security-wise; I want to strictly restrict access to that network using the kernel firewall rules. The actual bandwidth isn't that important, and even 100 Mbit/s Ethernet would be sufficient, although GbE is preferable for a number of reasons. I do not see a need for a GbE switch, though. Whenever I want to use two GbE ports, I want to use the Linux kernel firewall in between.

It might be a bit surprising for users to have to consider their particular use case to choose which USB 3.0 port to use for say an external HDD, but I don't think that would be a problem in real life at all.

Post Reply

Return to “The Ideas”

Who is online

Users browsing this forum: No registered users and 2 guests