apertus-open-source-cinema / axiom-firmware

AXIOM firmware (linux image, gateware and software tools)
GNU General Public License v3.0
171 stars 54 forks source link

Add Wifi Hotspot functionality #122

Closed anuejn closed 4 years ago

anuejn commented 4 years ago

This PR creates a passwordless WIFI Hotspot, when the camera has a wifi stick plugged in.

ssid: "axiom" password: None

The camea has the ip 10.42.0.1 and it will be a dhcp & dns server. the domain axiom.camera will be resolved to this address.

A captive portal funcionality is implemented as follows: All other domains will be resolved to 1.1.1.1. and all traffic to all adresses (except for 10.42.0.1) on port 80 will be redirected to 10.42.0.1:80 where a webserver will redirect to axiom.camera
this allows the user to enter any ip and see the cameras webinterface. moreover most modern computers will show the cameras web ui imediately after connecting.

rroohhh commented 4 years ago

The kernel config changes seem to have some unrelated changes, is this intentional? (for example these).

Have you thought about how a user would disable this?

Also maybe we should encourage / force users to setup a password for a wpa2 based wifi hotspot on the first access of the webui or something...

anuejn commented 4 years ago

The kernel config changes seem to have some unrelated changes, is this intentional? (for example these).

Most of them are due to a new kernel and a new compiler afaik?

Have you thought about how a user would disable this?

They can simply disable the NetworkManager profile with nmcli or nmtui. everything else is dependent on these.

Also maybe we should encourage / force users to setup a password for a wpa2 based wifi hotspot on the first access of the webui or something...

Maybe, but maybe not now ;). I think this should be done by some webui ;)

anuejn commented 4 years ago

When @sp-apertus and @rroohhh give green light, we can merge this imho :)

rroohhh commented 4 years ago

The kernel config changes seem to have some unrelated changes, is this intentional? (for example these).

Most of them are due to a new kernel and a new compiler afaik?

ah yes could very well be

Have you thought about how a user would disable this?

They can simply disable the NetworkManager profile with nmcli or nmtui. everything else is dependent on these.

perfect

Also maybe we should encourage / force users to setup a password for a wpa2 based wifi hotspot on the first access of the webui or something...

Maybe, but maybe not now ;). I think this should be done by some webui ;)

yeah of course

rroohhh commented 4 years ago

Can't test it as I have no wifi stick on hand, but otherwise lgtm.

anuejn commented 4 years ago

Maybe we also want to experiment with usb-gadget networking for the micro a bit further, as this would improve the usability heavily.

Id vote for using a similiar NetworkManager profile there

rroohhh commented 4 years ago

Yes I like that idea, but I would say that should go into a different PR.

apertus-bot commented 4 years ago

Download a build of the latest (untested) commit at https://api.cirrus-ci.com/v1/artifact/task/5709374458167296/image_upload/build/axiom-beta-pr-122-b09021bb.img.xz