Repository navigation
Hardware
You need an ath9k wireless card that supports active monitor mode.
(you can try another chipset, however, it hasn't been offically tested and most likely wont work)
A 3DS will not complete a StreetPass with something that does not acknowledge its frames. 802.11 ACKs are generated by the card's own hardware within microseconds, far too fast for software. A plain monitor interface picks up everything but acknowledges nothing, so when the console retries, gets nothing back, it gives up partway through the handshake.
An active monitor interface has a MAC address the hardware answers to. The console's frames get ACKed and the exchange proceeds.
lspci -k | grep -A3 -i network
iw list | grep -A10 'Supported interface modes'
iw list | grep -i 'active monitor'If you see ath9k, your hardware is in the best case, proceed to enabling MONITOR_FLAG_ACTIVE.
MONITOR_FLAG_ACTIVE must be present on the command that creates the interface:
iw dev <interface> interface add mon0 type monitor flags active # correctReplace <interface> in the above command with whatever interface your Wi-Fi device is on
(e.g. wlan0).
Get available Wi-Fi interfaces with:
iw dev | awk '$1=="Interface"{print $2}'Once done, move onto Getting your keys.
mac80211 allocates the per-interface transmit queue in ieee80211_if_add() only when the flag
is present at that moment. If you create a plain monitor interface and switch it to active
afterwards, bringing the link up dereferences a null vif->txq inside ath_tx_node_init(). The
kernel fails with rtnl_lock still held, and the machine needs a sysrq reset.
scripts/sp_monitor.sh always creates the interface with flags active in one command, so you
shouldn't hit this problem through LinuxPass.
Tear the interface down and build it again:
sudo <LinuxPass root>/scripts/sp_monitor.sh down
sudo <LinuxPass root>/scripts/sp_monitor.sh upThe service does the same on every restart (ExecStartPre), so restarting recovers a
stalled radio. The daemon also has a 120-second watchdog: if the daemon's sniffing loop stops
reporting, systemd restarts it.
sp_monitor.sh takes the adapter away from NetworkManager while it runs, and gives it back on
down, including when the service stops or fails. If NetworkManager had to be stopped outright,
a flag file at /run/linuxpass.nm-stopped records that so it gets restarted.
Without NetworkManager, down removes the monitor interface and brings the real adapter back up,
if it was up before up ran.
With no adapter named, sp_monitor.sh only ever picks an ath9k card. To use another driver, set
SP_IFACE. If there is no suitable adapter then it exits without modifying any of them.
StreetPass discovery happens on channels 1, 6 and 11, and the bulk transfer moves to a channel the
host picks during the handshake. LinuxPass watches all three by default (SP_CHANNELS).