Re: [lime] Notes on testing LibreMesh on OpenWrt 22.03

Delete this message

Reply to this message
Autore: gothos
Data:  
To: libremesh
Vecchi argomenti: [lime] Notes on testing LibreMesh on OpenWrt 22.03
Oggetto: Re: [lime] Notes on testing LibreMesh on OpenWrt 22.03
Hi

Thanks a lot for this email, I apologize of reposting it after so long,
but I would like to ask 2 question about.

continue below

On 11/9/22 10:00, Ilario via LibreMesh wrote:
> Hello!
> I share here some unsolicited notes on the testing I did using the
> latest LibreMesh code on top of OpenWrt 22.03, mostly because I hit an
> issue that seems a bit complicated for me to fix...
> And also because Jesi asked if I could share an easy-to-understand
> explanation of my open pull requests and issues on Github and I think
> this is a great idea :)
>
>
> ==== Technical stuff - skip this unless you want to replicate ====
>
> I compiled an image of clean OpenWrt 19.07 and another of OpenWrt 22.03
> following the instructions on the LibreMesh website (for the latter I
> replaced all "19.07" occurrences with "22.03").
> In order to have a clean OpenWrt image I selected the LibreMesh packages
> as <M> in menuconfig instead than <*>. This means that the LibreMesh
> packages are compiled and are available in the openwrt/bin/ folder but
> they are not included in the compiled firmware image.
> This way I can later install the LibreMesh packages one by one in the
> routers.
> A quicker alternative would have been to take OpenWrt already compiled
> from OpenWrt repository, add LibreMesh repositories, add the LibreMesh
> repository signing key as trusted and install the LibreMesh packages
> from there (but I don't know how to get and add the packages' signing key).
>
> The reason for flashing an image compiled with only OpenWrt without
> LibreMesh stuff is:
> * LibreMesh is not yet tested to work on top of OpenWrt 22.03, so that
> could malfunction.
> * The easiest way to return a router to a working state if you screw up
> with some configuration is the reset button, which takes back the router
> to the state it was when it was just flashed. But if you flash something
> broken, it takes you back to a broken state, not useful. So if you flash
> a plain OpenWrt, and then you break something while installing or
> configuring LibreMesh components, you can just go back to plain OpenWrt
> using the reset button.
> * This way I can analyze the LibreMesh packages one by one, easier for
> debugging.
>
> Then I set a static 192.168.1.2 IPv4 to my laptop and I connected to the
> router >
> --
> Side note #1:
> modern Linux systems will refuse old RSA keys that are used in OpenWrt
> 19.07 and you will get an error like this:
>
> Unable to negotiate with 192.168.1.1 port 22: no matching host key type
> found. Their offer: ssh-rsa
>
> in this case you will have to add these options to your ssh and scp
> commands:
>
> -o HostKeyAlgorithms=+ssh-rsa -o PubkeyAcceptedKeyTypes=+ssh-rsa
> --
>
> --
> Side note #2:
> with modern ssh clients, scp will complain with an error like this:
>
> ash: /usr/libexec/sftp-server: not found
> scp: Connection closed
>
> unless you add a "-O" option (from the man page "-O Use the legacy SCP
> protocol for file transfers instead of the SFTP protocol.")
> --
>
> Then I added this to /etc/opkg/customfeeds.conf (would have been smarter
> to add it in the buildroot compilation process creating a
> files/etc/opkg/customfeeds.conf file):
>
> src/gz local1 http://192.168.1.2:8000/packages/mipsel_24kc/base
> src/gz local2 http://192.168.1.2:8000/packages/mipsel_24kc/libremesh
> src/gz local3 http://192.168.1.2:8000/packages/mipsel_24kc/luci
> src/gz local4 http://192.168.1.2:8000/packages/mipsel_24kc/packages
> src/gz local5 http://192.168.1.2:8000/packages/mipsel_24kc/profiles
> src/gz local6 http://192.168.1.2:8000/packages/mipsel_24kc/routing
> src/gz local7 http://192.168.1.2:8000/packages/mipsel_24kc/telephony
> src/gz local8 http://192.168.1.2:8000/targets/ramips/mt7621/packages
>
> then I shared the packages from the buildroot on my laptop with:
>
> cd openwrt/bin
> python -m http.server
>
> And on the router again:
>
> root@OpenWrt:/etc/opkg# opkg update
>
> This succeeds to download the local ones and fails to download the
> others as I did not connect the router to the internet.
>



I found very useful this explanation of compiling for debugging purposes.
And the use you made of "<M> in menuconfig instead than <*>" building
the packages without adding them to the build, for adding them later one
by one via opkg.

I think it would be nice to have a dedicated page on libremesh.org that
explain how to debug in this way. Or at least a link to the openwrt
documentation that explain this usage with make menuconfig.

Also in this instructions you start from a plain Openwrt and then you
install Libremesh.
I think it would be useful also a guide like this, "From openwrt to
libremesh" on the website.

I mean, is not frequent, but rarely we meet people who already know the
openwrt project, and are geek enough that if you say them to install
openwrt following the official website for their devices, and then do
the libremesh installation and configuration apart they are not forced
to receive from us the firmware image and can go ahead theirselves.

A similar case I think is from people from the hacklabs, that would
benefit from such publicly available instructions and would have a way
to participate to the community installing their own devices, without
being forced to trust our tech team, or to contact us to build for their
devices.


For this second "from openwrt to libremesh"
I noticed you also provide the lime-reports with the different versions
here: https://github.com/libremesh/lime-packages/issues/951
and that you said you followed this sequence for installing all the
libremesh components:

lime-system and lime-proto-anygw and lime-proto-batadv and lime-proto-babeld

Is this a general recommended way to install libremesh starting from
openwrt, or is only suitable for debugging purposes?


--
gothos
PGP Key ID: 0x6406B32F2CEC0008
PGP Key server: https://keys.openpgp.org/