Skip to content
This repository has been archived by the owner on Nov 29, 2022. It is now read-only.

Add support to multiple wlan interfaces #6

Merged
merged 4 commits into from
Sep 23, 2021

Conversation

JoseGoncalves
Copy link
Contributor

Recently I needed to add a second Wi-Fi interface to a BeagleBone Green Gateway via a USB adapter.
After doing that, I've noticed that the SoftAp0 interface was not being initialized.
Digging on this issue I found that the bb-wl18xx-tether script was assuming that only one wlan interface would exist.
This pull request changes this script to allow that BBs with multiple wlan interfaces have the AP functionality properly configured.

@RobertCNelson
Copy link
Owner

Oh fun @JoseGoncalves yeah this looks pretty...

ps i discovered a more easy option and I am completely throwing this out.. ;) In Bullseye all we need is:

https://github.com/rcn-ee/repos/blob/master/bb-wlan0-defaults/suite/bullseye/debian/81-ap-wl18xx-interface.rules

SUBSYSTEM=="net", ACTION=="add", KERNEL=="wlan0", DRIVERS=="wl18xx_driver" \
	RUN+="/sbin/iw dev %k interface add ap%n type managed"

and i'm working on the ap0.conf file right now..

https://rcn-ee.net/rootfs/debian-armhf/2021-09-22/

Regards,

@RobertCNelson RobertCNelson merged commit 5b0de38 into RobertCNelson:master Sep 23, 2021
@RobertCNelson
Copy link
Owner

@JoseGoncalves and this udev rule with these two config:

SUBSYSTEM=="net", KERNEL=="ap0", DRIVERS=="wl18xx_driver", TAG+="systemd", ENV{SYSTEMD_WANTS}="hostapd.service"

https://github.com/rcn-ee/repos/blob/master/bb-wlan0-defaults/suite/bullseye/debian/ap0-DHCPServer.network

[Match]
Name=ap0

[Link]
RequiredForOnline=no

[Network]
DHCP=no
Address=192.168.8.1/24
DHCPServer=on

https://github.com/rcn-ee/repos/blob/master/bb-wlan0-defaults/suite/bullseye/debian/bb-hostapd.conf

REgards,

@JoseGoncalves
Copy link
Contributor Author

JoseGoncalves commented Sep 23, 2021

@RobertCNelson Neat! Using udev events instead of polling sysfs would definetly speed up wireless initialization on BBs.

FYI, I use a similar approach to add a Mesh interface to my boards:

SUBSYSTEM=="ieee80211", ACTION=="add", KERNEL=="phy[0-9]", DEVPATH=="*mmc/*", \
	RUN+="/sbin/iw phy %k interface add mesh0 type mp"

I think that you shoud replace in 81-create-ap0-interface.rules KERNEL=="wlan0" with KERNEL=="wlan[0-9]" and replace ap%nwith ap0 in the iwcommand, to cope with users that add extra wireless interface(s) via USB, i.e., the rule should be:

SUBSYSTEM=="net", ACTION=="add", KERNEL=="wlan[0-9]", DRIVERS=="wl18xx_driver" \
	RUN+="/sbin/iw dev %k interface add ap0 type managed"

@RobertCNelson
Copy link
Owner

RobertCNelson commented Sep 23, 2021

@JoseGoncalves okay did the first one,

rcn-ee/repos@6d3a9c6

then saw my email wasn't in sync with github... i'll add the ap0 (SoftAp0) hard code now too!

and hardcoded SoftAp0/ap0 too:

rcn-ee/repos@39c5eb0

Regards,

@RobertCNelson
Copy link
Owner

@JoseGoncalves i think i'm happy with this setup now, for an out of box usb0/usb1/SoftAp0/wlan0/etc..

Please test when your free, to see if it works for you mesh setup ;)

https://rcn-ee.net/rootfs/debian-armhf/2021-09-23/

Now to hack in all the "mac" address..

Do you think users will understand how to edit 👍

/etc/wpa_supplicant/wpa_supplicant-wlan0.conf

Specially since the RPI uses wpa_supplicantj ?

Regards,

@JoseGoncalves
Copy link
Contributor Author

@JoseGoncalves i think i'm happy with this setup now, for an out of box usb0/usb1/SoftAp0/wlan0/etc..

Please test when your free, to see if it works for you mesh setup ;)

https://rcn-ee.net/rootfs/debian-armhf/2021-09-23/

OK. When I have some spare time I will try it.
Aren't you building console images anymore?
I prefer to start with a minimal console image and incrementaly install the packages that I need for my applications.

Do you think users will understand how to edit

/etc/wpa_supplicant/wpa_supplicant-wlan0.conf

Specially since the RPI uses wpa_supplicantj ?

I think this will be no problem... there is a lot of (good) documentation available on how to config wireless interfaces with wpa_supplicant/hostapd, notably the official RPi docs:

@RobertCNelson
Copy link
Owner

oh @JoseGoncalves i'm still building all the old images.. But with the new release of Debian 11 (Bullseye) i've taken the time to rewrite and cleanup years of cruft...

Eventually there will be a console/iot/etc.. right now it's about getting the basics correct..

Regards,

@JoseGoncalves JoseGoncalves deleted the multiple_wlan branch September 24, 2021 08:38
@JoseGoncalves
Copy link
Contributor Author

@JoseGoncalves i think i'm happy with this setup now, for an out of box usb0/usb1/SoftAp0/wlan0/etc..

Please test when your free, to see if it works for you mesh setup ;)

https://rcn-ee.net/rootfs/debian-armhf/2021-09-23/

@RobertCNelson I've booted the 2021-09-27 image in a BBGW and everthing seems to run fine.
Nevertheless, dmesg shows some errors (don't know if that's OK):

debian@BeagleBone:~$ sudo dmesg -l err
[    0.158134] l3-aon-clkctrl:0000:0: failed to disable
[   11.893337] debugfs: Directory '49000000.dma' with parent 'dmaengine' already present!
[   11.941513] gpio-of-helper ocp:cape-universal: Failed to get gpio property of 'P8_03'
[   11.941544] gpio-of-helper ocp:cape-universal: Failed to create gpio entry
[   11.964716] wkup_m3_ipc 44e11324.wkup_m3_ipc: could not get rproc handle
[   12.481757] omap_voltage_late_init: Voltage driver support not added
[   12.489055] PM: Cannot get wkup_m3_ipc handle

When I tried to power down with the power button, the system halted but power remain applied, i.e., I still see some board's LEDs on. Seems that the PMIC is not being set to shutdown the board.

Noticed also that the utility scripts that were previously stored in /opt/scripts/tools are missing. Still WIP?

Going to test now with my Mesh setup...

@JoseGoncalves
Copy link
Contributor Author

Found that the /opt/scripts/tools/version.sh script was renamed to beagle-version. This is the output on my board:

debian@BeagleBone:~$ sudo beagle-version 
eeprom:[A335BNLTGW1ABBGW18100744]
model:[TI_AM335x_BeagleBone_Green_Wireless]
dogtag:[BeagleBoard.org Debian Bullseye IoT Image 2021-09-27]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot SPL 2021.10-rc3-g9e7b9ed3 (Sep 23 2021 - 13:35:48 +0000)]:[location: dd MBR]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot SPL 2019.04-g1da4564 (Aug 31 2021 - 14:32:40 +0000)]:[location: dd MBR]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2019.04-g1da4564]:[location: dd MBR]
UBOOT: Booted Device-Tree:[am335x-bonegreen-wireless-uboot-univ.dts]
UBOOT: Loaded Overlay:[BB-ADC-00A0.kernel]
UBOOT: Loaded Overlay:[BB-BBGW-WL1835-00A0.kernel]
UBOOT: Loaded Overlay:[BB-BONE-eMMC1-01-00A0.kernel]
kernel:[5.10.59-ti-r20]
/boot/uEnv.txt Settings:
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>]
pkg:[bb-cape-overlays]:[4.14.20210821.0-0~bullseye+20210821]
WARNING:pkg:[bb-customizations]:[NOT_INSTALLED]
pkg:[bb-usb-gadgets]:[1.20210923.0-0~bullseye+20210923]
pkg:[bb-wl18xx-firmware]:[1.20210922.1-0~bullseye+20210922]
pkg:[kmod]:[28-1]
WARNING:pkg:[librobotcontrol]:[NOT_INSTALLED]
pkg:[firmware-ti-connectivity]:[20210315-3]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal input bluetooth netdev admin tisdk weston-launch cloud9ide gpio]
cmdline:[console=ttyS0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet]
dmesg | grep remote
[   12.390259] remoteproc remoteproc0: wkup_m3 is available
[   12.619588] remoteproc remoteproc0: powering up wkup_m3
[   12.623267] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217148
[   12.623567] remoteproc remoteproc0: remote processor wkup_m3 is now up
[   39.093897] Bluetooth: hci0: change remote baud rate command in firmware
[   49.537360] remoteproc remoteproc1: 4a334000.pru is available
[   49.627993] remoteproc remoteproc2: 4a338000.pru is available
dmesg | grep pru
[   49.537360] remoteproc remoteproc1: 4a334000.pru is available
[   49.627993] remoteproc remoteproc2: 4a338000.pru is available
dmesg | grep pinctrl-single
[   11.934460] pinctrl-single 44e10800.pinmux: 142 pins, size 568
dmesg | grep gpio-of-helper
[   11.936305] gpio-of-helper ocp:cape-universal: Failed to get gpio property of 'P8_03'
[   11.936334] gpio-of-helper ocp:cape-universal: Failed to create gpio entry
[   12.597669] gpio-of-helper ocp:cape-universal: Allocated GPIO id=0 name='P8_03'
[   12.597952] gpio-of-helper ocp:cape-universal: Allocated GPIO id=1 name='P8_04'
[   12.598152] gpio-of-helper ocp:cape-universal: Allocated GPIO id=2 name='P8_05'
[   12.598352] gpio-of-helper ocp:cape-universal: Allocated GPIO id=3 name='P8_06'
[   12.598905] gpio-of-helper ocp:cape-universal: Allocated GPIO id=4 name='P8_07'
[   12.599113] gpio-of-helper ocp:cape-universal: Allocated GPIO id=5 name='P8_08'
[   12.599331] gpio-of-helper ocp:cape-universal: Allocated GPIO id=6 name='P8_09'
[   12.599534] gpio-of-helper ocp:cape-universal: Allocated GPIO id=7 name='P8_10'
[   12.599861] gpio-of-helper ocp:cape-universal: Allocated GPIO id=8 name='P8_11'
[   12.600090] gpio-of-helper ocp:cape-universal: Allocated GPIO id=9 name='P8_12'
[   12.600377] gpio-of-helper ocp:cape-universal: Allocated GPIO id=10 name='P8_13'
[   12.600584] gpio-of-helper ocp:cape-universal: Allocated GPIO id=11 name='P8_15'
[   12.600778] gpio-of-helper ocp:cape-universal: Allocated GPIO id=12 name='P8_16'
[   12.600973] gpio-of-helper ocp:cape-universal: Allocated GPIO id=13 name='P8_18'
[   12.601181] gpio-of-helper ocp:cape-universal: Allocated GPIO id=14 name='P8_19'
[   12.601380] gpio-of-helper ocp:cape-universal: Allocated GPIO id=15 name='P8_20'
[   12.601586] gpio-of-helper ocp:cape-universal: Allocated GPIO id=16 name='P8_21'
[   12.601788] gpio-of-helper ocp:cape-universal: Allocated GPIO id=17 name='P8_22'
[   12.601972] gpio-of-helper ocp:cape-universal: Allocated GPIO id=18 name='P8_23'
[   12.602166] gpio-of-helper ocp:cape-universal: Allocated GPIO id=19 name='P8_24'
[   12.602363] gpio-of-helper ocp:cape-universal: Allocated GPIO id=20 name='P8_25'
[   12.602564] gpio-of-helper ocp:cape-universal: Allocated GPIO id=21 name='P8_27'
[   12.602767] gpio-of-helper ocp:cape-universal: Allocated GPIO id=22 name='P8_28'
[   12.602953] gpio-of-helper ocp:cape-universal: Allocated GPIO id=23 name='P8_29'
[   12.603148] gpio-of-helper ocp:cape-universal: Allocated GPIO id=24 name='P8_30'
[   12.603357] gpio-of-helper ocp:cape-universal: Allocated GPIO id=25 name='P8_31'
[   12.603559] gpio-of-helper ocp:cape-universal: Allocated GPIO id=26 name='P8_32'
[   12.603866] gpio-of-helper ocp:cape-universal: Allocated GPIO id=27 name='P8_33'
[   12.604067] gpio-of-helper ocp:cape-universal: Allocated GPIO id=28 name='P8_34'
[   12.604276] gpio-of-helper ocp:cape-universal: Allocated GPIO id=29 name='P8_35'
[   12.604480] gpio-of-helper ocp:cape-universal: Allocated GPIO id=30 name='P8_36'
[   12.604671] gpio-of-helper ocp:cape-universal: Allocated GPIO id=31 name='P8_37'
[   12.604868] gpio-of-helper ocp:cape-universal: Allocated GPIO id=32 name='P8_38'
[   12.605068] gpio-of-helper ocp:cape-universal: Allocated GPIO id=33 name='P8_39'
[   12.605294] gpio-of-helper ocp:cape-universal: Allocated GPIO id=34 name='P8_40'
[   12.605492] gpio-of-helper ocp:cape-universal: Allocated GPIO id=35 name='P8_41'
[   12.605680] gpio-of-helper ocp:cape-universal: Allocated GPIO id=36 name='P8_42'
[   12.605878] gpio-of-helper ocp:cape-universal: Allocated GPIO id=37 name='P8_43'
[   12.606064] gpio-of-helper ocp:cape-universal: Allocated GPIO id=38 name='P8_44'
[   12.606262] gpio-of-helper ocp:cape-universal: Allocated GPIO id=39 name='P8_45'
[   12.606457] gpio-of-helper ocp:cape-universal: Allocated GPIO id=40 name='P8_46'
[   12.606658] gpio-of-helper ocp:cape-universal: Allocated GPIO id=41 name='P9_11'
[   12.606861] gpio-of-helper ocp:cape-universal: Allocated GPIO id=42 name='P9_12'
[   12.607079] gpio-of-helper ocp:cape-universal: Allocated GPIO id=43 name='P9_13'
[   12.607275] gpio-of-helper ocp:cape-universal: Allocated GPIO id=44 name='P9_14'
[   12.607474] gpio-of-helper ocp:cape-universal: Allocated GPIO id=45 name='P9_15'
[   12.607755] gpio-of-helper ocp:cape-universal: Allocated GPIO id=46 name='P9_16'
[   12.607973] gpio-of-helper ocp:cape-universal: Allocated GPIO id=47 name='P9_17'
[   12.608158] gpio-of-helper ocp:cape-universal: Allocated GPIO id=48 name='P9_18'
[   12.608367] gpio-of-helper ocp:cape-universal: Allocated GPIO id=49 name='P9_19'
[   12.608565] gpio-of-helper ocp:cape-universal: Allocated GPIO id=50 name='P9_20'
[   12.608746] gpio-of-helper ocp:cape-universal: Allocated GPIO id=51 name='P9_21'
[   12.608967] gpio-of-helper ocp:cape-universal: Allocated GPIO id=52 name='P9_22'
[   12.609170] gpio-of-helper ocp:cape-universal: Allocated GPIO id=53 name='P9_23'
[   12.609358] gpio-of-helper ocp:cape-universal: Allocated GPIO id=54 name='P9_24'
[   12.609880] gpio-of-helper ocp:cape-universal: Allocated GPIO id=55 name='P9_25'
[   12.610092] gpio-of-helper ocp:cape-universal: Allocated GPIO id=56 name='P9_26'
[   12.610304] gpio-of-helper ocp:cape-universal: Allocated GPIO id=57 name='P9_27'
[   12.610504] gpio-of-helper ocp:cape-universal: Allocated GPIO id=58 name='P9_28'
[   12.610690] gpio-of-helper ocp:cape-universal: Allocated GPIO id=59 name='P9_29'
[   12.610895] gpio-of-helper ocp:cape-universal: Allocated GPIO id=60 name='P9_31'
[   12.611099] gpio-of-helper ocp:cape-universal: Allocated GPIO id=61 name='P9_41'
[   12.611311] gpio-of-helper ocp:cape-universal: Allocated GPIO id=62 name='P9_91'
[   12.611512] gpio-of-helper ocp:cape-universal: Allocated GPIO id=63 name='P9_42'
[   12.611810] gpio-of-helper ocp:cape-universal: Allocated GPIO id=64 name='P9_92'
[   12.611824] gpio-of-helper ocp:cape-universal: ready
lsusb
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
END

@JoseGoncalves
Copy link
Contributor Author

JoseGoncalves commented Sep 29, 2021

@RobertCNelson Just noticed that you have havegedinstalled and running on the Debian 11 image.
AFAIK, this is now obsolete for kernels greater than v5.6. See:

@RobertCNelson
Copy link
Owner

Sweet!!!!

@JoseGoncalves
Copy link
Contributor Author

JoseGoncalves commented Sep 30, 2021

When I tried to power down with the power button, the system halted but power remain applied, i.e., I still see some board's LEDs on. Seems that the PMIC is not being set to shutdown the board.

The same happens when I execute a sudo systemctl poweroff.
I've checked the console log on shutdown and I get this:

[  OK  ] Reached target Shutdown.
[  OK  ] Reached target Unmount All Filesystems.
[  OK  ] Reached target Final Step.
[  OK  ] Finished Power-Off.
[  OK  ] Reached target Power-Off.
[   72.619777] systemd-shutdown[1]: Syncing filesystems and block devices.
[   72.695423] systemd-shutdown[1]: Sending SIGTERM to remaining processes...
[   72.722303] systemd-journald[240]: Received SIGTERM from PID 1 (systemd-shutdow).
[   72.767266] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
[   72.819619] systemd-shutdown[1]: Unmounting file systems.
[   72.843664] [597]: Remounting '/' read-only in with options 'errors=remount-ro'.
[   72.905484] EXT4-fs (mmcblk0p1): re-mounted. Opts: errors=remount-ro
[   72.947142] systemd-shutdown[1]: All filesystems unmounted.
[   72.958620] systemd-shutdown[1]: Deactivating swaps.
[   72.966932] systemd-shutdown[1]: All swaps deactivated.
[   72.978556] systemd-shutdown[1]: Detaching loop devices.
[   72.991447] systemd-shutdown[1]: All loop devices detached.
[   73.002568] systemd-shutdown[1]: Stopping MD devices.
[   73.010099] systemd-shutdown[1]: All MD devices stopped.
[   73.015666] systemd-shutdown[1]: Detaching DM devices.
[   73.021597] systemd-shutdown[1]: All DM devices detached.
[   73.027612] systemd-shutdown[1]: All filesystems, swaps, loop devices, MD devices and DM devices detached.
[   73.055673] systemd-shutdown[1]: Syncing filesystems and block devices.
[   73.065787] systemd-shutdown[1]: Powering off.
[   73.113372] reboot: System halted

While in buster, with proper power off, I get this:

[  OK  ] Reached target Shutdown.
[  OK  ] Reached target Final Step.
[  OK  ] Started Power-Off.
[  OK  ] Reached target Power-Off.
[  100.942477] systemd-shutdow: 41 output lines suppressed due to ratelimiting
[  101.032314] systemd-shutdown[1]: Syncing filesystems and block devices.
[  101.118635] systemd-shutdown[1]: Sending SIGTERM to remaining processes...
[  101.141882] systemd-journald[993]: Received SIGTERM from PID 1 (systemd-shutdow).
[  101.192695] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
[  101.216196] systemd-shutdown[1]: Unmounting file systems.
[  101.228700] [2335]: Remounting '/' read-only in with options 'errors=remount-ro'.
[  101.276043] EXT4-fs (mmcblk1p1): re-mounted. Opts: errors=remount-ro
[  101.300770] systemd-shutdown[1]: All filesystems unmounted.
[  101.306712] systemd-shutdown[1]: Deactivating swaps.
[  101.312249] systemd-shutdown[1]: All swaps deactivated.
[  101.317679] systemd-shutdown[1]: Detaching loop devices.
[  101.324075] systemd-shutdown[1]: All loop devices detached.
[  101.329829] systemd-shutdown[1]: Detaching DM devices.
[  101.380501] reboot: Power down

So, on buster the kernel receives the power down command, while in bullseye it's (wrongly) receiving the halt command.

Maybe this is due to some device tree misconfiguration for PMIC, because I see this dmesg output in bullseye:

debian@BeagleBone:~$ dmesg -l warn | grep tps
[   11.139287] tps65217-pmic: Failed to locate of_node [id: -1]
[   11.155946] tps65217-bl: Failed to locate of_node [id: -1]
[   11.164723] tps6521x_pwrbutton tps65217-pwrbutton: DMA mask not set

while in buster I only see this:

debian@beaglebone:~$ dmesg -l warn | grep tps
[    2.989525] tps6521x_pwrbutton tps65217-pwrbutton: DMA mask not set

@RobertCNelson
Copy link
Owner

RobertCNelson commented Sep 30, 2021

Pretty sure it's the kernel, so i'll need to look into that..

root@BeagleBone:~# uname -r ; dmesg | grep tps
5.10.59-ti-r22
[    7.727248] tps65217-pmic: Failed to locate of_node [id: -1]
[    7.738207] tps65217-bl: Failed to locate of_node [id: -1]
[    7.739826] tps6521x_pwrbutton tps65217-pwrbutton: DMA mask not set

v5.4.x-ti: http://gfnd.rcn-ee.org:81/farm/uptime/pwr15-ser23-bbgw-5.4.106-ti-r35.log

[    3.642043] tps6521x_pwrbutton tps65217-pwrbutton: DMA mask not set
[    3.649493] input: tps65217_pwr_but as /devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e0b000.target-module/44e0b000.i2c/i2c-0/0-0024/tps65217-pwrbutton/input/input0
[    3.667519] usb 1-1: new high-speed USB device number 2 using musb-hdrc
[    3.674936] tps65217 0-0024: TPS65217 ID 0xe version 1.2

v5.10.x-ti: http://gfnd.rcn-ee.org:81/farm/uptime/pwr17-ser25-bbbw-5.10.59-ti-r18.log

[   13.888519] tps65217-pmic: Failed to locate of_node [id: -1]
[   13.906440] tps65217-bl: Failed to locate of_node [id: -1]
[   13.915796] tps6521x_pwrbutton tps65217-pwrbutton: DMA mask not set
[   13.923255] input: tps65217_pwr_but as /devices/platform/ocp/44c00000.interconnect/44c00000.interconnect:segment@200000/44e0b000.target-module/44e0b000.i2c/i2c-0/0-0024/tps65217-pwrbutton/input/input0
[   13.942003] tps65217 0-0024: TPS65217 ID 0xe version 1.2

@JoseGoncalves
Copy link
Contributor Author

@RobertCNelson I've tested the bullseye image with my mesh setup and everything works fine, after some required changes;

  • Turn down wlan0 interface by adding to /etc/systemd/network/wlan0.network a line with Unmanaged=yes in the [Link] section.
  • Add a udev rule to create a mesh0 interface.
  • Add a wpasupplicant config for the mesh network.
  • I need to add some TI's kernel patches for mesh support in wl18xx, that are only available for v4.19, so I can not user kernel v5.10.
  • Latest available wl18xx firmware (8.9.0.0.88) has issues in mesh mode. Needed to install version 8.9.0.0.86.
  • Debian wpasupplicant package is currently compiled without mesh support. Needed to compile a custom version with that support.

Regarding wpasupplicant, there is currently a request to Debian's package maintainers to add mesh support:

As I see that you are now building your own wpasupplicant package:

can you enable mesh support on it?
It would be one less thing that I needed to do when configuring BBs to work as mesh nodes :-)

@RobertCNelson
Copy link
Owner

@JoseGoncalves can you share your mesh0 and wlan0 files, i'll add them to the templates directory.. i can also switch back to '86, we upgraded the firmware for you. ;)

rcn-ee/repos@6a18658

@JoseGoncalves
Copy link
Contributor Author

JoseGoncalves commented Oct 2, 2021

@RobertCNelson here goes my /etc/wpa_supplicant/mesh.conf:

##### wpa_supplicant configuration file for a Mesh Point (802.11s)
# For details see https://w1.fi/cgit/hostap/plain/wpa_supplicant/wpa_supplicant.conf

ctrl_interface=/run/wpa_supplicant
ctrl_interface_group=netdev
max_peer_links=10
mesh_max_inactivity=30
country=COUNTRY_CODE
p2p_disabled=1

network={
	ssid="MESH_NETWORK_SSID"
	mode=5
	frequency=MESH_NETWORK_FREQUENCY
	key_mgmt=SAE
	sae_password="MESH_NETWORK_PASSWORD"
}

And this is my udev rule to add a mesh0 interface:

SUBSYSTEM=="ieee80211", ACTION=="add", KERNEL=="phy[0-9]", DEVPATH=="*mmc/*", \
	RUN+="/sbin/iw phy %k interface add mesh0 type mp"

This was based in information retreived from TI's SDK and SWAA166 Application Report .

There is no added config for wlan0, I do not use it when setting up a mesh network.

Regarding firmware, the 8.9.0.0.88 should be better for standard uses (client station and AP) as it solves some security issues (according with TI's changelog). So, I don't have a strong opinion to what firmware version shoud be the default on BBs.

Please note that mesh does not work properly with mainline wl18xx driver. For proper operation you need to have driver R8.8. TI has documented this driver release on WiLink8 Linux Wi-Fi Driver Release R8.8 Build User's Guide.

@RobertCNelson
Copy link
Owner

and pushed! rcn-ee/repos@5e154ef

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants