open-sdr / openwifi

open-source IEEE 802.11 WiFi baseband FPGA (chip) design: driver, software
GNU Affero General Public License v3.0
3.9k stars 659 forks source link

Does openwifi support mesh (open802.11s)? #186

Open yohanes-erwin opened 2 years ago

yohanes-erwin commented 2 years ago

Hi, I'm a researcher in FPGA design, but a beginner in Linux kernel. Currently, I'm looking for a suitable method for wireless mesh communication (MANET) for our project. I have designed PHY layer based on 802.16 on FPGA, but have difficulty in the MAC layer. Then, I found out that there is a protocol that already exists on mac802.11 which is open802.11s (mesh).

I've tried the open802.11s (it is part of the mac80211) on the openwifi design (using openwifi PHY) on the ADRV9361-Z7035 board. I ran the wgd.sh script without A-MPDU. But I didn't run the fosdem.sh script because I thought it was for the AP. I tried channels 1 and 11. I ran some linux commands like in this documentation (https://github.com/o11s/open80211s/wiki/HOWTO) to enable the mesh interface. When I try to connect to the mesh network I get an error like this in the kernel message: tsf : max clockdrift=0; too small to adjust I think it's related to the timestamp, but I haven't been able to figure out what the problem is.

Do you have any opinion on this error?

JiaoXianjun commented 2 years ago

I think the error printing is not from openwifi side. You need to find out the printing message location in the kernel (or other module) code.

yohanes-erwin commented 2 years ago

Yes, the error printing is not from openwifi side, but from mac80211, from function mesh_sync_offset_adjust_tsf() in file mesh_sync.c. Then, I found that the function openwifi_beacon_work() in the sdr.c calls this: (sdr.c) openwifi_beacon_work() -> (mac80211.h) ieee80211_beacon_get() -> (tx.c) ieee80211_beacon_get_tim() -> (tx.c) __ieee80211_beacon_get() -> (mesh_sync.c) adjust_tsf() -> (mesh_sync.c) mesh_sync_offset_adjust_tsf() -> msync_dbg(sdata, "TSF : max clockdrift=%lld; too small to adjust\n", ... I think the openwifi_beacon_work() is periodically called from the workqueue ?

JiaoXianjun commented 2 years ago

"clock drift is too small to adjust" To my understanding, the clock drift is expected to be small, right? So this "good thing" will cause problem?

yohanes-erwin commented 2 years ago

Yes, I think so. The smaller the clock drift the better. But what confuses me is that this error appears every 1 second or so (in kernel message), and I also couldn't ping the other mesh client. So, I assume this error that causes the problem of not being able to ping to the other mesh client.

This is the command that I run to set the mesh network: Board FPGA 1 (ADRV9361Z7035):

./wgd.sh
iw dev sdr0 interface add mesh0 type mp
ifconfig mesh0 192.168.3.91
iw dev mesh0 mesh join my_mesh
ping 192.168.3.92

Board FPGA 2 (ADRV9361Z7035):

./wgd.sh
iw dev sdr0 interface add mesh0 type mp
ifconfig mesh0 192.168.3.92
iw dev mesh0 mesh join my_mesh
ping 192.168.3.91

This error printing occured the I run the command "iw dev mesh0 mesh join my_mesh". Then, I can't ping the other mesh client. Note: All mesh interfaces start by default in channel 1. I've also tried changing the channel to 11 and 44.

This is the kernel log:

root@analog:~/openwifi# dmesg
Marvell 88E1510 e000b000.ethernet-ffffffff:00: attached PHY driver [Marvell 88E1510] (mii_bus:phy_addr=e000b000.ethernet-ffffffff:00, irq=POLL)
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
usbcore: registered new interface driver usb-storage
usbcore: registered new interface driver usbserial
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial support registered for generic
usbcore: registered new interface driver ftdi_sio
usbserial: USB Serial support registered for FTDI USB Serial Device
chipidea-usb2 e0002000.usb: e0002000.usb supply vbus not found, using dummy regulator
ULPI transceiver vendor/product ID 0x0424/0x0007
Found SMSC USB3320 ULPI transceiver.
ULPI integrity check: passed.
ci_hdrc ci_hdrc.0: EHCI Host Controller
ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
i2c /dev entries driver
at24 0-0050: 4096 byte 24c32 EEPROM, writable, 1 bytes/write
IR NEC protocol handler initialized
IR RC5(x/sz) protocol handler initialized
IR RC6 protocol handler initialized
IR JVC protocol handler initialized
IR Sony protocol handler initialized
IR SANYO protocol handler initialized
IR Sharp protocol handler initialized
IR MCE Keyboard/mouse protocol handler initialized
IR XMP protocol handler initialized
usbcore: registered new interface driver uvcvideo
USB Video Class driver (1.1.1)
gspca_main: v2.14.0 registered
cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer at f0951000 with timeout 10s
Xilinx Zynq CpuIdle Driver started
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
sdhci-pltfm: SDHCI platform and OF driver helper
mmc0: SDHCI controller on e0100000.mmc [e0100000.mmc] using ADMA
ledtrig-cpu: registered to indicate activity on CPUs
hidraw: raw HID events driver (C) Jiri Kosina
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
ad7291: probe of 0-002f failed with error -5
fpga_manager fpga0: Xilinx Zynq FPGA Manager registered
Netfilter messages via NETLINK v0.30.
mmc0: new high speed SDHC card at address b368
mmcblk0: mmc0:b368 USD   7.47 GiB
nfnl_acct: registering with nfnetlink.
 mmcblk0: p1 p2 p3
nf_conntrack version 0.5.0 (16384 buckets, 65536 max)
ctnetlink v0.93: registering with nfnetlink.
nf_tables: (c) 2007-2009 Patrick McHardy <kaber@trash.net>
nf_tables_compat: (c) 2012 Pablo Neira Ayuso <pablo@netfilter.org>
xt_time: kernel timezone is -0000
ip_tables: (C) 2000-2006 Netfilter Core Team
ipt_CLUSTERIP: ClusterIP Version 0.8 loaded successfully
arp_tables: arp_tables: (C) 2002 David S. Miller
NET: Registered protocol family 17
Registering SWP/SWPB emulation handler
input: gpio_keys as /devices/soc0/gpio_keys/input/input0
hctosys: unable to open rtc device (rtc0)
ALSA device list:
  No soundcards found.
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) on device 179:2.
devtmpfs: mounted
Freeing unused kernel memory: 1024K
init: hwclock main process (924) terminated with status 1
systemd-udevd[1014]: starting version 204
Registered mathworks_ip class
mwipcore 43c00000.mwipcore: Dev memory resource found at 43c00000 0000FFFF.
mwipcore 43c00000.mwipcore: 'mwipcore' device not found, creating
mwipcore 43c00000.mwipcore: Char dev region registered: major num:242
mwipcore 43c00000.mwipcore: 'mwipcore' device created
init: udev-fallback-graphics main process (1432) terminated with status 1
macb e000b000.ethernet eth0: link up (100/Full)
NET: Registered protocol family 10
Segment Routing with IPv6
init: alsa-restore main process (1747) terminated with status 19
init: isc-dhcp-server main process (1761) terminated with status 1
init: isc-dhcp-server main process ended, respawning
init: isc-dhcp-server main process (1818) terminated with status 1
init: isc-dhcp-server main process ended, respawning
init: isc-dhcp-server main process (1842) terminated with status 1
init: isc-dhcp-server main process ended, respawning
init: isc-dhcp-server main process (1872) terminated with status 1
init: isc-dhcp-server main process ended, respawning
init: samba-ad-dc main process (1692) terminated with status 1
init: isc-dhcp-server main process (1888) terminated with status 1
init: isc-dhcp-server main process ended, respawning
init: tty1 main process (1930) killed by TERM signal
init: lightdm main process (1700) terminated with status 1
init: isc-dhcp-server main process (1939) terminated with status 1
init: isc-dhcp-server main process ended, respawning
init: isc-dhcp-server main process (1998) terminated with status 1
init: isc-dhcp-server main process ended, respawning
init: isc-dhcp-server main process (2014) terminated with status 1
init: isc-dhcp-server main process ended, respawning
init: isc-dhcp-server main process (2026) terminated with status 1
init: isc-dhcp-server main process ended, respawning
init: isc-dhcp-server main process (2034) terminated with status 1
init: isc-dhcp-server main process ended, respawning
init: isc-dhcp-server main process (2042) terminated with status 1
init: isc-dhcp-server respawning too fast, stopped
init: alsa-restore main process (2113) terminated with status 19
init: isc-dhcp-server main process (2128) terminated with status 1
init: isc-dhcp-server main process ended, respawning
init: isc-dhcp-server main process (2223) terminated with status 1
init: isc-dhcp-server main process ended, respawning
init: isc-dhcp-server main process (2231) terminated with status 1
init: isc-dhcp-server main process ended, respawning
init: isc-dhcp-server main process (2239) terminated with status 1
init: isc-dhcp-server main process ended, respawning
init: isc-dhcp-server main process (2247) terminated with status 1
init: isc-dhcp-server main process ended, respawning
init: isc-dhcp-server main process (2255) terminated with status 1
init: isc-dhcp-server main process ended, respawning
init: isc-dhcp-server main process (2263) terminated with status 1
init: isc-dhcp-server main process ended, respawning
init: isc-dhcp-server main process (2271) terminated with status 1
init: isc-dhcp-server main process ended, respawning
init: isc-dhcp-server main process (2280) terminated with status 1
init: isc-dhcp-server main process ended, respawning
init: isc-dhcp-server main process (2288) terminated with status 1
init: isc-dhcp-server main process ended, respawning
init: isc-dhcp-server main process (2296) terminated with status 1
init: isc-dhcp-server respawning too fast, stopped
random: crng init done
ad9361 spi0.0: ad9361_probe : enter (ad9361)
ad9361 spi0.0: ad9361_probe : AD936x Rev 2 successfully initialized
cf_axi_adc 79020000.cf-ad9361-lpc: ADI AIM (10.01.b) at 0x79020000 mapped to 0xf27c8000, probed ADC AD9361 as MASTER
cf_axi_dds 79024000.cf-ad9361-dds-core-lpc: Analog Devices CF_AXI_DDS_DDS MASTER (9.01.b) at 0x79024000 mapped to 0xf0c6e000, probed DDS AD9361
clk_unregister: unregistering prepared clock: spi0.0-tx_sampl_clk
clk_unregister: unregistering prepared clock: spi0.0-clktf_clk
clk_unregister: unregistering prepared clock: spi0.0-t1_clk
clk_unregister: unregistering prepared clock: spi0.0-t2_clk
clk_unregister: unregistering prepared clock: spi0.0-dac_clk
clk_unregister: unregistering prepared clock: spi0.0-adc_clk
clk_unregister: unregistering prepared clock: spi0.0-bbpll_clk
clk_unregister: unregistering prepared clock: spi0.0-bb_refclk
ad9361 spi0.0: ad9361_probe : enter (ad9361)
ad9361 spi0.0: ad9361_probe : AD936x Rev 2 successfully initialized
------------[ cut here ]------------
WARNING: CPU: 1 PID: 2355 at drivers/clk/clk.c:2726 clk_core_disable+0x68/0x94
Modules linked in: ad9361_drv ipv6 mwipcore mwipcore_iio_streaming mwipcore_dma_streaming mathworks_ip_common
CPU: 1 PID: 2355 Comm: load_fpga_img.s Not tainted 4.14.0-gb6e379910a11-dirty #3
Hardware name: Xilinx Zynq Platform
[<c010edbc>] (unwind_backtrace) from [<c010b6f4>] (show_stack+0x10/0x14)
[<c010b6f4>] (show_stack) from [<c06f11c4>] (dump_stack+0x8c/0xa0)
[<c06f11c4>] (dump_stack) from [<c011c890>] (__warn+0xe8/0x100)
[<c011c890>] (__warn) from [<c011c958>] (warn_slowpath_null+0x20/0x28)
[<c011c958>] (warn_slowpath_null) from [<c0337cfc>] (clk_core_disable+0x68/0x94)
[<c0337cfc>] (clk_core_disable) from [<c0338b14>] (clk_core_disable_lock+0x18/0x24)
[<c0338b14>] (clk_core_disable_lock) from [<c058fb74>] (cf_axi_dds_remove+0x64/0xa0)
[<c058fb74>] (cf_axi_dds_remove) from [<c03b29b0>] (platform_drv_remove+0x20/0x40)
[<c03b29b0>] (platform_drv_remove) from [<c03b15ec>] (device_release_driver_internal+0x158/0x1f8)
[<c03b15ec>] (device_release_driver_internal) from [<c03afe34>] (unbind_store+0x78/0xf4)
[<c03afe34>] (unbind_store) from [<c0252284>] (kernfs_fop_write+0xec/0x1f0)
[<c0252284>] (kernfs_fop_write) from [<c01efc10>] (__vfs_write+0x1c/0x120)
[<c01efc10>] (__vfs_write) from [<c01efe88>] (vfs_write+0xa4/0x168)
[<c01efe88>] (vfs_write) from [<c01f004c>] (SyS_write+0x3c/0x90)
[<c01f004c>] (SyS_write) from [<c0107960>] (ret_fast_syscall+0x0/0x48)
---[ end trace 917fa062b6923aa7 ]---
------------[ cut here ]------------
WARNING: CPU: 1 PID: 2355 at drivers/clk/clk.c:622 clk_core_disable_lock+0x18/0x24
Modules linked in: ad9361_drv ipv6 mwipcore mwipcore_iio_streaming mwipcore_dma_streaming mathworks_ip_common
CPU: 1 PID: 2355 Comm: load_fpga_img.s Tainted: G        W       4.14.0-gb6e379910a11-dirty #3
Hardware name: Xilinx Zynq Platform
[<c010edbc>] (unwind_backtrace) from [<c010b6f4>] (show_stack+0x10/0x14)
[<c010b6f4>] (show_stack) from [<c06f11c4>] (dump_stack+0x8c/0xa0)
[<c06f11c4>] (dump_stack) from [<c011c890>] (__warn+0xe8/0x100)
[<c011c890>] (__warn) from [<c011c958>] (warn_slowpath_null+0x20/0x28)
[<c011c958>] (warn_slowpath_null) from [<c0338b14>] (clk_core_disable_lock+0x18/0x24)
[<c0338b14>] (clk_core_disable_lock) from [<c058fb74>] (cf_axi_dds_remove+0x64/0xa0)
[<c058fb74>] (cf_axi_dds_remove) from [<c03b29b0>] (platform_drv_remove+0x20/0x40)
[<c03b29b0>] (platform_drv_remove) from [<c03b15ec>] (device_release_driver_internal+0x158/0x1f8)
[<c03b15ec>] (device_release_driver_internal) from [<c03afe34>] (unbind_store+0x78/0xf4)
[<c03afe34>] (unbind_store) from [<c0252284>] (kernfs_fop_write+0xec/0x1f0)
[<c0252284>] (kernfs_fop_write) from [<c01efc10>] (__vfs_write+0x1c/0x120)
[<c01efc10>] (__vfs_write) from [<c01efe88>] (vfs_write+0xa4/0x168)
[<c01efe88>] (vfs_write) from [<c01f004c>] (SyS_write+0x3c/0x90)
[<c01f004c>] (SyS_write) from [<c0107960>] (ret_fast_syscall+0x0/0x48)
---[ end trace 917fa062b6923aa8 ]---
------------[ cut here ]------------
WARNING: CPU: 1 PID: 2355 at drivers/clk/clk.c:504 clk_unprepare+0x24/0x2c
Modules linked in: ad9361_drv ipv6 mwipcore mwipcore_iio_streaming mwipcore_dma_streaming mathworks_ip_common
CPU: 1 PID: 2355 Comm: load_fpga_img.s Tainted: G        W       4.14.0-gb6e379910a11-dirty #3
Hardware name: Xilinx Zynq Platform
[<c010edbc>] (unwind_backtrace) from [<c010b6f4>] (show_stack+0x10/0x14)
[<c010b6f4>] (show_stack) from [<c06f11c4>] (dump_stack+0x8c/0xa0)
[<c06f11c4>] (dump_stack) from [<c011c890>] (__warn+0xe8/0x100)
[<c011c890>] (__warn) from [<c011c958>] (warn_slowpath_null+0x20/0x28)
[<c011c958>] (warn_slowpath_null) from [<c0339228>] (clk_unprepare+0x24/0x2c)
[<c0339228>] (clk_unprepare) from [<c058fb7c>] (cf_axi_dds_remove+0x6c/0xa0)
[<c058fb7c>] (cf_axi_dds_remove) from [<c03b29b0>] (platform_drv_remove+0x20/0x40)
[<c03b29b0>] (platform_drv_remove) from [<c03b15ec>] (device_release_driver_internal+0x158/0x1f8)
[<c03b15ec>] (device_release_driver_internal) from [<c03afe34>] (unbind_store+0x78/0xf4)
[<c03afe34>] (unbind_store) from [<c0252284>] (kernfs_fop_write+0xec/0x1f0)
[<c0252284>] (kernfs_fop_write) from [<c01efc10>] (__vfs_write+0x1c/0x120)
[<c01efc10>] (__vfs_write) from [<c01efe88>] (vfs_write+0xa4/0x168)
[<c01efe88>] (vfs_write) from [<c01f004c>] (SyS_write+0x3c/0x90)
[<c01f004c>] (SyS_write) from [<c0107960>] (ret_fast_syscall+0x0/0x48)
---[ end trace 917fa062b6923aa9 ]---
cf_axi_dds 79024000.cf-ad9361-dds-core-lpc: Analog Devices CF_AXI_DDS_DDS MASTER (9.01.b) at 0x79024000 mapped to 0xf27c6000, probed DDS AD9361
cf_axi_adc 79020000.cf-ad9361-lpc: ADI AIM (10.01.b) at 0x79020000 mapped to 0xf27d0000, probed ADC AD9361 as MASTER
xilinx-vdma 80400000.dma: Xilinx AXI DMA Engine Driver Probed!!
xilinx-vdma 80410000.dma: Xilinx AXI DMA Engine Driver Probed!!
tx_intf: loading out-of-tree module taints kernel.

sdr,tx_intf dev_probe match!
sdr,tx_intf dev_probe io start 0x83c0ffff83c00000 end 0x200ef7f4f94 name (null) flags 0xbf21f01c desc 0xbf21f01c
sdr,tx_intf dev_probe base_addr 0xf3d90000
sdr,tx_intf dev_probe tx_intf_driver_api_inst 0xbf21f284
sdr,tx_intf dev_probe             tx_intf_api 0xbf21f284
sdr,tx_intf dev_probe succeed!
sdr,tx_intf hw_init mode 7
sdr,tx_intf hw_init mode TX_INTF_BW_20MHZ_AT_N_10MHZ_ANT1
sdr,tx_intf hw_init err 0

sdr,rx_intf dev_probe match!
sdr,rx_intf dev_probe io start 0x83c20000 end 0x83c2ffff name /fpga-axi@0/rx_intf@83c20000 flags 0x00000200 desc 0x00000000
sdr,rx_intf dev_probe base_addr 0xf3dd0000
sdr,rx_intf dev_probe rx_intf_driver_api_inst 0xbf228284
sdr,rx_intf dev_probe             rx_intf_api 0xbf228284
sdr,rx_intf dev_probe succeed!
sdr,rx_intf hw_init mode 2
sdr,rx_intf hw_init mode DDC_BW_20MHZ_AT_0MHZ
sdr,rx_intf hw_init err 0

sdr,openofdm_tx dev_probe match!
sdr,openofdm_tx dev_probe io start 0x83c10000 end 0x83c1ffff name /fpga-axi@0/openofdm_tx@83c10000 flags 0x00000200 desc 0x00000000
sdr,openofdm_tx dev_probe base_addr 0xf3e10000
sdr,openofdm_tx dev_probe openofdm_tx_driver_api_inst 0xbf231284
sdr,openofdm_tx dev_probe             openofdm_tx_api 0xbf231284
sdr,openofdm_tx dev_probe succeed!
sdr,openofdm_tx hw_init mode 1
sdr,openofdm_tx hw_init mode OPENOFDM_TX_NORMAL
sdr,openofdm_tx hw_init err 0

sdr,openofdm_rx dev_probe match!
sdr,openofdm_rx dev_probe io start 0x83c30000 end 0x83c3ffff name /fpga-axi@0/openofdm_rx@83c30000 flags 0x00000200 desc 0x00000000
sdr,openofdm_rx dev_probe base_addr 0xf3e50000
sdr,openofdm_rx dev_probe openofdm_rx_driver_api_inst 0xbf239284
sdr,openofdm_rx dev_probe             openofdm_rx_api 0xbf239284
sdr,openofdm_rx dev_probe succeed!
sdr,openofdm_rx hw_init mode 1
sdr,openofdm_rx hw_init mode OPENOFDM_RX_NORMAL
sdr,openofdm_rx hw_init input: power_thres 124 dc_running_sum_th 64 min_plateau 100
sdr,openofdm_rx hw_init err 0

sdr,xpu dev_probe match!
sdr,xpu dev_probe io start 0x83c40000 end 0x83c4ffff name /fpga-axi@0/xpu@83c40000 flags 0x00000200 desc 0x00000000
sdr,xpu dev_probe base_addr 0xf3eb0000
sdr,xpu dev_probe xpu_driver_api_inst 0xbf242284
sdr,xpu dev_probe             xpu_api 0xbf242284
sdr,xpu dev_probe reset tsf timer
sdr,xpu dev_probe XPU_REG_TSF_RUNTIME_VAL_LOW_read 1 33668 100676us
sdr,xpu dev_probe succeed!
sdr,xpu hw_init mode 1
sdr,xpu hw_init mode XPU_NORMAL
sdr,xpu hw_init err 0
sdr: no symbol version for openofdm_rx_api

sdr,sdr openwifi_dev_probe: match!
sdr,sdr custom_match_spi_dev ad9361-phy ad9361-phy 1
sdr,sdr bus_find_device ad9361-phy: ad9361. driver_data pointer ee51c810
sdr,sdr ad9361_spi_to_phy ad9361-phy: ad9361
sdr,sdr custom_match_platform_dev 79024000.cf-ad9361-dds-core-lpc
sdr,sdr openwifi_dev_probe: cf-ad9361-dds-core-lpc dds_st->version 00090162 chip_info->name AD9361
sdr,sdr openwifi_dev_probe: cf_axi_dds_datasel DATA_SEL_DMA
sdr,sdr openwifi_dev_probe: priv->rf_bw == 40000000Hz. bool for 20000000 0, 40000000 1
sdr,sdr openwifi_dev_probe: test_mode 0 AGGR_ENABLE 0 TX_OFFSET_TUNING_ENABLE 0 init_tx_att 0
sdr,sdr openwifi_set_antenna: tx_ant1 rx_ant1
sdr,sdr openwifi_set_antenna: ad9361_set_tx_atten ant0 0 OK
sdr,sdr openwifi_set_antenna: ad9361_set_tx_atten ant1 89750 OK
sdr,sdr openwifi_set_antenna: ad9361_ctrl_outs_setup en_mask 0xff index 0x16
sdr,sdr openwifi_set_antenna: TX_INTF_REG_ANT_SEL_write value 1
sdr,sdr openwifi_set_antenna: RX_INTF_REG_ANT_SEL_write value 0
sdr,sdr openwifi_dev_probe: ad9361_spi_read REG_CTRL_OUTPUT_POINTER 0x16
sdr,sdr openwifi_dev_probe: ad9361_spi_read REG_CTRL_OUTPUT_ENABLE 0xff
sdr,sdr openwifi_dev_probe: rfkill radio on
sdr,sdr openwifi_dev_probe: band_2GHz.n_channels 13 n_bitrates 12 band_5GHz.n_channels 11 n_bitrates 12
sdr,sdr openwifi_dev_probe: mac_addr 66:55:44:33:22:d1
sdr,sdr openwifi_get_antenna: tx_ant1 rx_ant1
sdr,sdr openwifi_get_antenna: drv tx cfg 2 offset 0 drv rx cfg 2 offset 0 drv ctrl_out sel 16
sdr,sdr openwifi_get_antenna: fpga tx sel 1 rx sel 0
sdr,sdr openwifi_get_antenna: rf tx att0 0 tx att1 89750 ctrl_out sel 16
ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
sdr,sdr openwifi_dev_probe: ieee80211_register_hw 0
sdr,sdr openwifi_dev_probe: sysfs_create_bin_file 0
sdr,sdr openwifi_dev_probe: sysfs_create_group tx_intf_attribute_group 0
sdr,sdr openwifi_dev_probe: sysfs_create_group stat_attribute_group 0
ieee80211 phy0: hwaddr 6655443322d1, ZYNQ + ad9361
sdr,sdr openwifi_rfkill_init: wireless switch is on
sdr,sdr fpga-axi@0:sdr sdr0: renamed from wlan0
systemd-udevd[2348]: renamed network interface wlan0 to sdr0
sdr,sdr openwifi_set_antenna: tx_ant1 rx_ant1
sdr,sdr openwifi_set_antenna: ad9361_set_tx_atten ant0 0 OK
sdr,sdr openwifi_set_antenna: ad9361_set_tx_atten ant1 89750 OK
sdr,sdr openwifi_set_antenna: ad9361_ctrl_outs_setup en_mask 0xff index 0x16
sdr,sdr openwifi_set_antenna: TX_INTF_REG_ANT_SEL_write value 1
sdr,sdr openwifi_set_antenna: RX_INTF_REG_ANT_SEL_write value 0
sdr,sdr openwifi_start: rfkill radio on
sdr,rx_intf hw_init mode 2
sdr,rx_intf hw_init mode DDC_BW_20MHZ_AT_0MHZ
sdr,rx_intf hw_init err 0
sdr,tx_intf hw_init mode 2
sdr,tx_intf hw_init mode TX_INTF_BW_20MHZ_AT_0MHZ_ANT0
sdr,tx_intf hw_init err 0
sdr,openofdm_tx hw_init mode 1
sdr,openofdm_tx hw_init mode OPENOFDM_TX_NORMAL
sdr,openofdm_tx hw_init err 0
sdr,openofdm_rx hw_init mode 1
sdr,openofdm_rx hw_init mode OPENOFDM_RX_NORMAL
sdr,openofdm_rx hw_init input: power_thres 124 dc_running_sum_th 64 min_plateau 100
sdr,openofdm_rx hw_init err 0
sdr,xpu hw_init mode 1
sdr,xpu hw_init mode XPU_NORMAL
sdr,xpu hw_init err 0
sdr,sdr openwifi_start: rx_intf_cfg 2 openofdm_rx_cfg 1 tx_intf_cfg 2 openofdm_tx_cfg 1
sdr,sdr openwifi_start: rx_freq_offset_to_lo_MHz 0 tx_freq_offset_to_lo_MHz 0
sdr,sdr openwifi_start: DMA channel setup successfully. priv->rx_chan 0xeeb57e40 priv->tx_chan 0xee61ba40
sdr,sdr openwifi_init_rx_ring: NUM_RX_BD 64 RX_BD_BUF_SIZE 2048 pkt existing flag are cleared!
sdr,sdr openwifi_start: irq_rx 49
sdr,sdr openwifi_start: irq_tx 51
sdr,sdr openwifi_start: normal end
sdr,sdr openwifi_add_interface start. vif for loop result 0
sdr,sdr openwifi_add_interface end with vif idx 0 addr 66:55:44:33:22:d1
sdr,sdr openwifi_bss_info_changed WARNING BSS_CHANGED_ERP_CTS_PROT 0
sdr,sdr openwifi_bss_info_changed WARNING BSS_CHANGED_ERP_SLOT 8 BSS_CHANGED_ERP_PREAMBLE 4 short slot 0
sdr,sdr openwifi_conf_tx: [queue 0], aifs: 2, cw_min: 3, cw_max: 7, txop: 47, aifs and txop ignored
sdr,sdr openwifi_conf_tx: [queue 1], aifs: 2, cw_min: 7, cw_max: 15, txop: 94, aifs and txop ignored
sdr,sdr openwifi_conf_tx: [queue 2], aifs: 3, cw_min: 15, cw_max: 1023, txop: 0, aifs and txop ignored
sdr,sdr openwifi_conf_tx: [queue 3], aifs: 7, cw_min: 15, cw_max: 1023, txop: 0, aifs and txop ignored
sdr,sdr ad9361_tx_calibration 2412MHz tx_quad_cal duration 11566 us
sdr,sdr openwifi_rf_rx_update_after_tuning 2412MHz rssi_correction 153 fpga_lbt_th 150(-78dBm) auto 150 static 306 receiver th 138(-84dBm)
sdr,sdr ad9361_rf_set_channel 2412MHz done
sdr,sdr openwifi_prepare_multicast
sdr,sdr openwifi_configure_filter MON 0 M_BCN 1 BST0 1 BST1 1 UST 1 PB_RQ 0 PS_PL 1 O_BSS 0 CTL 0 BCN_PRP 0 PCP_FL 0 FCS_FL 0 ALL_MUT 1
sdr,sdr openwifi_prepare_multicast
sdr,sdr openwifi_configure_filter MON 0 M_BCN 1 BST0 1 BST1 1 UST 1 PB_RQ 0 PS_PL 1 O_BSS 0 CTL 0 BCN_PRP 0 PCP_FL 0 FCS_FL 0 ALL_MUT 1
IPv6: ADDRCONF(NETDEV_UP): mesh: link is not ready
sdr,sdr openwifi_prepare_multicast
sdr,sdr openwifi_configure_filter MON 0 M_BCN 1 BST0 1 BST1 1 UST 1 PB_RQ 0 PS_PL 1 O_BSS 0 CTL 0 BCN_PRP 0 PCP_FL 0 FCS_FL 0 ALL_MUT 1
sdr,sdr openwifi_config changed flag 00000100
sdr,sdr ad9361_tx_calibration 5220MHz tx_quad_cal duration 11694 us
sdr,sdr openwifi_rf_rx_update_after_tuning 5220MHz rssi_correction 145 fpga_lbt_th 134(-78dBm) auto 134 static 290 receiver th 122(-84dBm)
sdr,sdr ad9361_rf_set_channel 5220MHz done
sdr,sdr openwifi_bss_info_changed WARNING BSS_CHANGED_TXPOWER 14
sdr,sdr openwifi_prepare_multicast
sdr,sdr openwifi_configure_filter MON 0 M_BCN 1 BST0 1 BST1 1 UST 1 PB_RQ 0 PS_PL 1 O_BSS 1 CTL 0 BCN_PRP 0 PCP_FL 0 FCS_FL 0 ALL_MUT 1
mesh: setting non-peer PM to user value
sdr,sdr openwifi_bss_info_changed WARNING BSS_CHANGED_BEACON_INT 3e8
sdr,sdr openwifi_bss_info_changed WARNING BSS_CHANGED_BASIC_RATES ff0
sdr,sdr openwifi_bss_info_changed WARNING BSS_CHANGED_BEACON_ENABLED
mesh: TSF : max clockdrift=0; too small to adjust
sdr,sdr openwifi_bss_info_changed WARNING enable_beacon
sdr,sdr openwifi_bss_info_changed WARNING BSS_CHANGED_BEACON_ENABLED 512 BSS_CHANGED_BEACON 256
IPv6: ADDRCONF(NETDEV_CHANGE): mesh: link becomes ready
sdr,sdr openwifi_prepare_multicast
sdr,sdr openwifi_configure_filter MON 0 M_BCN 1 BST0 1 BST1 1 UST 1 PB_RQ 0 PS_PL 1 O_BSS 1 CTL 0 BCN_PRP 0 PCP_FL 0 FCS_FL 0 ALL_MUT 1
mesh: TSF : max clockdrift=0; too small to adjust
sdr,sdr openwifi_prepare_multicast
sdr,sdr openwifi_configure_filter MON 0 M_BCN 1 BST0 1 BST1 1 UST 1 PB_RQ 0 PS_PL 1 O_BSS 1 CTL 0 BCN_PRP 0 PCP_FL 0 FCS_FL 0 ALL_MUT 1
mesh: TSF : max clockdrift=0; too small to adjust
mesh: TSF : max clockdrift=0; too small to adjust
mesh: TSF : max clockdrift=0; too small to adjust
mesh: TSF : max clockdrift=0; too small to adjust
mesh: TSF : max clockdrift=0; too small to adjust
mesh: TSF : max clockdrift=0; too small to adjust
mesh: TSF : max clockdrift=0; too small to adjust
mesh: TSF : max clockdrift=0; too small to adjust
mesh: TSF : max clockdrift=0; too small to adjust
mesh: TSF : max clockdrift=0; too small to adjust
mesh: TSF : max clockdrift=0; too small to adjust
mesh: TSF : max clockdrift=0; too small to adjust
mesh: TSF : max clockdrift=0; too small to adjust
mesh: TSF : max clockdrift=0; too small to adjust
mesh: TSF : max clockdrift=0; too small to adjust
mesh: TSF : max clockdrift=0; too small to adjust
mesh: TSF : max clockdrift=0; too small to adjust
mesh: TSF : max clockdrift=0; too small to adjust
twpedersen commented 2 years ago

can you please share the output of:

iw mesh0 station dump

and

ip a show mesh0

Thanks.

yohanes-erwin commented 2 years ago

This is the output of that commands:

root@analog:~/openwifi# iw mesh0 station dump
root@analog:~/openwifi# ip a show mesh0
4: mesh0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 66:55:44:33:22:7a brd ff:ff:ff:ff:ff:ff
    inet 192.168.3.92/24 brd 192.168.3.255 scope global mesh0
       valid_lft forever preferred_lft forever
    inet6 fe80::6455:44ff:fe33:227a/64 scope link
       valid_lft forever preferred_lft forever
root@analog:~/openwifi#

The iw mesh0 station dump shows nothing.

JiaoXianjun commented 1 year ago

Now it might support mesh (or you can enable it easily maybe), becaue we have upgraded to the Raspberry PI OS:

https://github.com/open-sdr/openwifi/releases/tag/v1.4.0

zhangmazi123321 commented 1 year ago

Now it might support mesh (or you can enable it easily maybe), becaue we have upgraded to the Raspberry PI OS:

https://github.com/open-sdr/openwifi/releases/tag/v1.4.0 After updating the version, I still have the same problem as him. The configuration and errors are the same as his.

zhangmazi123321 commented 1 year ago

This is the output of that commands:

root@analog:~/openwifi# iw mesh0 station dump
root@analog:~/openwifi# ip a show mesh0
4: mesh0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 66:55:44:33:22:7a brd ff:ff:ff:ff:ff:ff
    inet 192.168.3.92/24 brd 192.168.3.255 scope global mesh0
       valid_lft forever preferred_lft forever
    inet6 fe80::6455:44ff:fe33:227a/64 scope link
       valid_lft forever preferred_lft forever
root@analog:~/openwifi#

The iw mesh0 station dump shows nothing.

Is your problem solved?

peking428 commented 1 year ago

thanks JiaoXianjun. openwifi is very strong. i finished this work that runing batman base on AP-sta/mesh/ad-hoc with this three mode. debug this work, need some must step and ability of resolve problem. so. v : peking428

xxw1617 commented 1 year ago

This is the output of that commands:

root@analog:~/openwifi# iw mesh0 station dump
root@analog:~/openwifi# ip a show mesh0
4: mesh0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 66:55:44:33:22:7a brd ff:ff:ff:ff:ff:ff
    inet 192.168.3.92/24 brd 192.168.3.255 scope global mesh0
       valid_lft forever preferred_lft forever
    inet6 fe80::6455:44ff:fe33:227a/64 scope link
       valid_lft forever preferred_lft forever
root@analog:~/openwifi#

The iw mesh0 station dump shows nothing.

Is your problem solved? i have the same problem as you. Have you solved the problem?