StreetPass
3DS has a built-in feature StreetPass which lets nearby users to exchange data from games and applications. This is great if you live in a big city where there are a lot of 3DS devices. However, if you live in a small town, you would be lucky to just get a handful of streetpasses monthly.
StreetPass Relay
Due to that, Nintendo introduced another feature called StreetPass Relay. Every 3DS device has a whitelist of public wifi AP which it can automatically connect to. If connected, some data will be sent and stored on Nintendo server. When another 3DS user connects to the same AP, Nintendo server will send the stored data to the latter device. Consequently, 3DS devices don’t have to be in close proximity to exchange data.
The whitelist contains the SSID and MAC of public wifi AP. Thus, some nice people figured out ways to create homemade StreetPass relays by spoofing MAC and SSID.1 The basic idea to create a public wifi AP with the same SSID and MAC as in the whitelist.
For Raspberry Pi, there is SpillPass-Pi2 which work automatically when you plug in. You only need a wifi dongle wlan0
which support mac spoof and a wired internet connection eth0
.
My setup is slightly different because I don’t have a wired connection to the home router. What I have is 2 wifi dongles, wlan0
and wlan1
. The idea is still the same, but instead of eth0
bridge to wlan0
, I have wlan1
connected to the internet and wlan0
as wifi AP. All the traffic are forwarded to/from wlan0
to wlan1
.
Setup
I used Raspbian Jessie Lite image. I don’t have external keyboard or monitor so desktop on Raspberry Pi is unnecessary. Installed the image on the SD card by either dd or Etcher, then added your wifi network to /etc/wpa_supplicant/wpa_supplicant.conf
.2
Updated and installed softwares:
I used this wonderful guide to setup forwarding.
Interfaces
Set wlan0
to a static ip address 10.0.0.1
.
Tell DHCPCD to ignore wlan0.
Hostapd
Hostapd is an user daemon to start up AP. In /etc/default/hostapd
, uncomment or add the line DAEMON_CONF=/etc/hostapd/hostapd.conf
.
You can test if AP is working by running sudo hostapd /etct/hostapd/hostapd
. You should be able to see attwifi
.
I use dnsmasq
to map IP addresses to MAC addresses. When 3DS connect to my hotspot, it will be assigned a dynamic IP address. It is also possible to bind 3DS MAC address to a static IP address.
Port Forwarding
In /etc/sysctl.conf
, uncomment net.ipv4.ip_forward=1
.
Start services sudo service hostapd start && sudo service dnsmasq start
. Reboot Raspberry Pi and test if attwifi
can be connected to the internet.
Systemd Service and Timer
I use systemd to run my homepass.sh
at boot time and the script will rerun every 5 minutes to change wlan0
to new SSID and MAC.
Enable the timer by executing this command
A nice feature of using systemd to run the script is we can access the logging easily for debugging
homepass.sh
This script was modified from orginal script by Semperverus. You can check out his guide for more details about HomePass. I took the idea of using sqlite3 to store MAC and SSID in a database from danielhoherd’s script.
The script is rerun every 5 minutes by systemd. It stops current running hostapd service. A new /etc/hostapd/hostapd.conf
is generated from querying MAC and SSID from a database. The hostapd service is then restarted with the new conf file.
All Files
You can find all my files at my github repo.