Hello everyone,

I am developing a product that requires an ad-hoc mesh network. I have a Raspberry Pi with a WiFi adapter, which I am attempting to use in an ad-hoc network with an iPad. Basically, I want to use the Raspberry Pi as an access point, but it is part of a mesh network, which is why I am using ad-hoc mode rather than infrastructure mode. I have found that the Raspberry Pi transmits beacon frames for a few minutes, allowing the iPad to connect to it. However, after about 5 minutes, the Pi stops transmitting beacon frames, and starts transmitting probe frames instead. In addition, it no longer responds to probe requests from the iPad. I have verified all of this on Wireshark. The problem only happens if no other nodes are connected to the network.

I've narrowed the problem down to a specific file in the Linux kernel: linux/net/mac80211/ibss.c (can't post link because I just joined.) What led me to this file is an error I saw in dmesg:

Code:
[ 2026.006693] wlan0: No active IBSS STAs - trying to scan for other IBSS networks with same SSID (merge)
It seems that this functionality is intentional. When no other nodes are connected, it tries to probe other nodes. However, this is not what I want; I want the ad-hoc network to always transmit beacon frames. Does anyone know of a patch or a configuration option that changes this behavior? If not, how difficult would it be for me to implement it myself? Would it affect the stability of the kernel and/or the network in any way? I am well-versed in C, and I have occasionally written kernel code in the past, but I was hoping someone would have an expert opinion on this. If anyone would like to help me patch this code, that would also be appreciated. Thanks in advance!

Kyle