Re: [dev] Simpler WiFi alternatives

From: Josuah Demangeon <me_AT_josuah.net>
Date: Fri, 12 May 2023 13:20:04 +0200

It is not always possible to have an open-source software implementation to
a proprietary hardare solution.

In particular when something deals with hardware interfaces: parallel ports
are unreachable from most software: unfeasible to have a software-based approach
using GPIO.

So you would need hardware, in particular for internet which will require a PHY
chip to handle the correct electrical format.

A full router is a very large-scale project. It is very rare that
routing happens purely from hardware, for being complex.

Some open-hardware implementation of a switch:

- https://ohwr.org/project/wr-switch-hdl/wikis/home

I'd say it is made this complex to hope to get fast.

I imagine you'd be interested in taking existing hardware for this.

If you just want something that can route WiFi to an ISP modem,
maybe a simple access-point project would work great! It would not
allow any complex network configuration such as VLANs, firwalling,
NAT (unless you can live with IPv6 only) DNS and SSH access, all
of which would be a huge project to support with a "single main.c
operating system".

Likely you would be interested in a small operating system to be
able to run the tcpdump(1) command for debugging, spin a wireguard
daemon for a VPN, and so on.

> One of them, although shitty, is god dammit what is it called LoRaWAN I
> think.
> But it's proprietary, that's the shitty part.. something something patents
> something.. patented I think.

They have their very appealing approach of encoding data as chirps:
signal seeping a whole frequency range instead of using one fixed
frequency. This has great effects

> https://en.wikipedia.org/wiki/LoRaWAN
> LoRaWAN is like up to >10km with perfect clearing, but throw a tree here and
> there, and what do you get? even if 1km, that's fucking awesome, in my
> opinion!

They kind of won in the hobbyist sphere even though proprietary,
due to the very vast amount of inexpensive hardware working for
them.

Ultimately, hardware vendors will decide. But it is possible to
implement roughly anything on top of the radio hardware of the
LoRaWan chips: the protocol is usually implemented in software,
so it is possible to repurpose the hardware for something
different in the same frequency range.

Maybe there'll be a bit of hardware optimization though.

> They even compare them: https://en.wikipedia.org/wiki/DASH7

This is what you might be after:
https://en.wikipedia.org/wiki/Low-power_wide-area_network

> DASH7 is 0-5km, etc.
> Also LoRaWAN has that high range with low power, which is a) suprising and 2)
> important.. not sure about DASH7.

The lowest power you could get is with load shift keying,
as in NFC: the waves *power* the device, the device consuption
is negative: harvest energy from the environment.

This needs very powerful emitters though...

> And when I was figuring out networking and shit, I thought to myself: what if
> most of networking was wireless (say a mesh network over something like
> Yggdrasil, without ISPs, without internet, 100% free except hardware and
> electricity.

Welcome to https://freifunk.net/ and other open mesh networks!
Which are heavily based off the OpenWRT and friends project you
seem to reject so much... ;)

> WHAT THE FUCK IS THIS
> > "Ground breaking world record! LoRaWAN packet received at 702 km (436
> miles)
> distance"
>
> In LoRaWAN references.. HOLY SHIT!

There are multiple HamRadio operators who send voice conversation across
continents with 1W of power, this usually gets them some medal though!

But yeah, waves can propagate beyond the horizon (~64km) at low frequencies.

Side pun: Maybe IP over Pigeon Carrier can go even beyond. ^_^
https://datatracker.ietf.org/doc/html/rfc1149

> Anyways..
> If you gonna build anything, having it suckless would be cool.
> What would also be cool is the following things:
> Can I have shit like firewall?
> Like I want to deny/allow access STRICTLY to say shit like I2P/Tor, perhaps
> have that optional?
>
> What about hardware, though? I think we should be moving more towards FPGAs
> because of hardware verification utopia:
> Open Source is Insufficient to Solve Trust Problems in Hardware:
> https://youtube.com/watch?v=Hzb37RyagCQ

I'd advise to seek for existing projects, many hardware needs some amount
of networking built into their hardware.

> I agree that routers shouldn't be a whole OS like OpenWRT, but then again:
> should it instead be machine assembly?

That reminds me of https://github.com/cjdelisle/cjdns/

You are talking about massive effort: writing a network stack,
hardware drivers for multiple boards, verilog/other HDL for the
switching/routing acceleration (you'd like to be able to still watch
online videos, even at low resolution?).

> If you gonna write C, you are probably going to have some sort of embedded
> system, no? Hmmm
> I'd like to see a tiny thing, like RPI, doing say 1G networking, 3-5 ethernet
> ports and like 1-5 antennas.

RaspberryPis have bee shortaged, out of order world-wide for years now

One does not simply buy raspberry pis anymore! ^_^'

https://rpilocator.com/

> Holy shit, who makes something on GNU/Linux anymore? Phew, asking for
> security problems, I tell you!
> At least use like FreeBSD or preferably OpenBSD, stupid routers!
> HAHAHA OpenWRT is written in Lua?

And FreeBSD too, and OpenBSD in Perl... for some parts.
And Lua is written in C, oh shoot! the loop never ends. :)

> But yeah.. not sure if I'd like buy one, but putting it together myself on a
> breadboard? I could 100% do that.
> Not sure how I'd fucking do that if 1000 components, but if <50, I could
> do it,
> after a few shows of alcohol to calm hands (if we talking CMR or whatever
> those small things are).

SMT? Surface Mount Technology? You can go with larger DIP packages
if they are available for the parts you need or go with a PCB.

You'd be able to find modules for the most popular parts.

I think you might encounter a wall of difficulty when trying to run
bare metal C on top of hardware and try to drive peripherals, but
not necessarily!

> what about a RPI project? I have them, and many people have them, as well as
> they could be already very familiar to some people.

They are a bit hard to find, but the hardware seems able to support
what you aim.

Not sure you can do anything with the wireless of a Raspberry Pi:
Broadcom hardware is not exactly open.

I would advise to save every single cursed word from your email
for the moment you try to implement a network stack in C, and
after succeeding, realizing that you would need more hardware
acceleration and spend another extra 5 years on this project
to get there.

This might be a good use-case though: a small device that can
communicate on long-range, needs little-to no configuration,
and lacking an operating system, can fit on tiny tiny inexpensive
devices, and provide email-style networking to the masses.


If you want to experiment, I'd propose you to try an LTE module
with an external antenna, I discussed with people off-grid,
supposedly too far for anything, getting a YAGI-style antenna
below roof and get Internet that way.
Received on Fri May 12 2023 - 13:20:04 CEST

This archive was generated by hypermail 2.3.0 : Fri May 12 2023 - 13:36:09 CEST