Tutorial [HOW-TO] Have a homemade Streetpass Relay

What method you are using?

  • Linux

    Votes: 93 7.9%
  • Android

    Votes: 133 11.4%
  • Router

    Votes: 226 19.3%
  • Windows

    Votes: 426 36.4%
  • A pony with a wifi antenna O.o?

    Votes: 292 25.0%

  • Total voters
    1,170
Status
Not open for further replies.

Lyomak

Well-Known Member
Member
Joined
Jun 24, 2009
Messages
436
Trophies
1
Age
39
Location
Bogotá
Website
twitch.tv
XP
389
Country
Colombia
Hey, you are that guy from youtube :P Try booting in to a livecd or usb maybe its a issue with the vmware (I used virtual box and it worked fine)


Yeah, I'm the same guy. xD I used virtualbox and a live usb with no results. No broadcasting and I can't connect to attwifi manually. :(
 

The Mystical One

Well-Known Member
Newcomer
Joined
Aug 13, 2013
Messages
52
Trophies
0
Age
42
XP
86
Country
United States
Got the win7 method to work using my home desktop.

My laptop's virtual wifi would NOT take the MAC of the wireless connection no matter what I did. My desktop's would, and thus worked fine with this method.

So... if win7 isn't working for you, uh... it may be your wifi card doesn't work with the method, assuming you are setting it up correctly.
 

GamerMan619

Member
Newcomer
Joined
Aug 17, 2013
Messages
7
Trophies
0
Age
57
Location
Hope Valley, Rhode Island
XP
51
Country
United States
Got the win7 method to work using my home desktop.

My laptop's virtual wifi would NOT take the MAC of the wireless connection no matter what I did. My desktop's would, and thus worked fine with this method.

So... if win7 isn't working for you, uh... get a different wifi card.

Sh*t. I'm only 10. I know, I need to get a new computer.
 

The Mystical One

Well-Known Member
Newcomer
Joined
Aug 13, 2013
Messages
52
Trophies
0
Age
42
XP
86
Country
United States
I edited my post to better reflect what I mean; that assuming you set it up correctly, it may be that your wifi card just doesn't play right having a virtual miniport take on the MAC (shifted) of the wifi.
 

GamerMan619

Member
Newcomer
Joined
Aug 17, 2013
Messages
7
Trophies
0
Age
57
Location
Hope Valley, Rhode Island
XP
51
Country
United States
I edited my post to better reflect what I mean; that assuming you set it up correctly, it may be that your wifi card just doesn't play right having a virtual miniport take on the MAC (shifted) of the wifi.

The Win7 method would only accept newer than Windows 7, 8, and 2008 R2. Basically, I think Vista is too old for that method, and the XP method seems WAY too complicated.
 

cjorgens

New Member
Newbie
Joined
Aug 18, 2013
Messages
1
Trophies
0
Age
43
XP
51
Country
United States
Looking for some help from any Mac OSX users that have been able to get this to work. I tried the method on the first page and my 3DS saw the network as a Nintendo Zone, but could not connect to it and did not get any Streetpasses. I also tried both the recommended scripts and with those I was able to connect to Nintendo Zone, but still did not pick up any Streetpasses. I'm using Mac OSX 10.6.8 on a Macbook with a built in Airport Extreme wireless and Airport Extreme router. Any thoughts or help appreciated. Thanks!
 

sporkonomix

Well-Known Member
Newcomer
Joined
Jul 12, 2010
Messages
80
Trophies
1
Website
sporkbox.us
XP
259
Country
United States
http://dd-wrt.com/dd-wrtv2/download...dd-wrt.v24-18024_NEWD-2_K2.6_mini_e1000v2.bin

This one you can use to flash from within the stock FW. I am not 100% sure if MAC cloning works in this version, just use inSSIDer to check if it works and report back here.

I just wanted to let you know that it worked! DD-WRT installed without a hitch and it was mostly just as easy to configure it as the stock FW. I've received a StreetPass from someone in California now, so it works! Thanks a lot for helping me find the right binary image to use.

And a huge thanks to the hackers who poked and prodded for a solution! This is awesome!
 

Lyomak

Well-Known Member
Member
Joined
Jun 24, 2009
Messages
436
Trophies
1
Age
39
Location
Bogotá
Website
twitch.tv
XP
389
Country
Colombia
HOLY MOTHER OF GOD! I finally made it thanks to DD WRT. I didn't want to use it but I decided to do it thanks to the failures using Android, Windows and Ubuntu. Also, I didn't know that with DD WRT I can use two SSID: One for the 3DS and one for the house. If you see someone from Colombia, with Captain Falcon hat. Is me! :)

I got Ivy from USA. :)
 
  • Like
Reactions: Sunderlol11100

Alex Atkin UK

Member
Newcomer
Joined
Apr 26, 2011
Messages
24
Trophies
0
XP
174
Country
OpenWRT

Use the web UI to setup a wireless network (primary or an additional ssid, it doesn't matter) with the ssid attwifi.

HomePass1.png


If you do not mind not being able to use Nintendo Zone then you CAN use encryption. However if you do, make sure you add the encrypted attwifi network to your 3DS network connections. Also, make sure you click Save & Apply!

Now upload my HomePass2.sh script to your router (feel free to look at it first to reassure yourself its not doing anything nasty). Telnet/SSH in and run the script. It will download a randomised list of the primary, Nintendo World and old primary (SPOOF) MAC addresses and set the MAC to the first in that list.

Each time you run the script it cycles to the next in the list and as its a static (pre-randomised) list it means you will not get assigned the same MAC address twice that day unless you cycle through them all. It also does NOT save the changes to nvram, so it should prevent wearing out your routers flash memory. It doesn't refresh the list seeing as everyone should have a different randomised list I see no point in changing it. If you do want a new list, just delete the HomePass.list file and it will download a new one the next time you run it.

The script is commented so hopefully anyone savvy enough to use OpenWRT will understand it.

If you want it to automatically change every 5 minutes then you can also add it to Sheduled Tasks as below:
HomePass2.png

Make sure the script is in the /root/ directory and executable. Also beware that this WILL restart your WiFi every 5 minutes so you do NOT want to do this on your main WiFi network, especially if you are gaming or streaming from it. Personally, I stick to doing it manually.
 

Lyomak

Well-Known Member
Member
Joined
Jun 24, 2009
Messages
436
Trophies
1
Age
39
Location
Bogotá
Website
twitch.tv
XP
389
Country
Colombia
This is for routers with DD-WRT firmware, micro build is not supported yet
The v2 script is the main now!
This script also can be used with ASUS WL-5xx and RT-N1x custom firmware

Insert script in Administration - Commands
Code:
echo -e "#!/bin/sh\nMACS=/tmp/nzone.macs\n[ -f \$MACS ] || wget -q -O \$MACS \"http://duke-srg.dyndns.org/3ds/nzone?\$1\"\nMACNUM=\$(cat \$MACS | wc -l)\n[ \$MACNUM != 0 ] || exit\nRANDOM=\$(head /dev/urandom | hexdump -d | head -n 1 | cut -c 11-15)\nMACNUM=\$((\$RANDOM%\${MACNUM}+1))\nMAC=\$(head -n \$MACNUM \$MACS | tail -n 1)\nWLINT=\$(nvram get wl0_ifname)\nAPDCNF=/tmp/\${WLINT}_hostap.conf\nAPDPID=/var/run/\${WLINT}_hostapd.pid\nif [ -e \$APDCNF ]; then\nkill \$(cat \$APDPID)\nsleep 3\nsed -ri s/bssid=.*/bssid=\$MAC/ \$APDCNF\nhostapd -B -P \$APDPID \$APDCNF\nelse\nifconfig \$WLINT down\nifconfig \$WLINT hw ether \$MAC\nifconfig \$WLINT up\nfi" >/tmp/nzone; chmod 555 /tmp/nzone
hit Save Startup
Code:
#!/bin/sh
MACS=/tmp/nzone.macs
[ -f $MACS ] || wget -q -O $MACS "http://duke-srg.dyndns.org/3ds/nzone?$1"
MACNUM=$(cat $MACS | wc -l)
[ $MACNUM != 0 ] || exit
RANDOM=$(head /dev/urandom | hexdump -d | head -n 1 | cut -c 11-15)
MACNUM=$(($RANDOM%${MACNUM}+1))
MAC=$(head -n $MACNUM $MACS | tail -n 1)
WLINT=$(nvram get wl0_ifname)
APDCNF=/tmp/${WLINT}_hostap.conf
APDPID=/var/run/${WLINT}_hostapd.pid
if [ -e $APDCNF ]; then
kill $(cat $APDPID)
sleep 3
sed -ri s/bssid=.*/bssid=$MAC/ $APDCNF
hostapd -B -P $APDPID $APDCNF
else
ifconfig $WLINT down
ifconfig $WLINT hw ether $MAC
ifconfig $WLINT up
fi
In Administration - Management - Cron insert:
Code:
*/15 * * * * root /tmp/nzone 49,BASE16
and change script parameter. The script parameter (in example above is 49,BASE16) is a comma-separated address-list identifiers. This script will connect to my server and get your selected lists. For now only these lists are available:
BASE1 - the common prime "@SPOOF" address
BASE16 - the common prime 16 addresses range
BASE256 - the prime 256 addresses range
1 to 3 digit number - the Country Code for Nintendo Zone official hot spot MACS. For now only "49" for USA is available.
3 character game CTR code - to have a desired game title streetpass data. See example below or use my compilation of StreetPass CTR codes. Use only CTR codes for the games you have enabled streetpass!
GBATEMP - custom addresses from GBATEMP users static MAC adresses.
StarWars III have a CRT code "ALG", it is displayed on a sticker in the middle of a character string below, and printed at the beggining of the string at the back of a gamecard:
Gamecard.jpg
hit Apply Settings. Now your router will change to a random MAC from a selected list every 10 minutes starting from 1:00 to 7:50
16.08.2013 v2 script is the main one
15.08.2013 (edit 2) Fixed probable arithmetic error bug
15.08.2013 improved compatibility with DD-WRT mini builds
14.08.2013 added sleep to wait hostapd stop, greatly reduce time to stop-start AP on Atheros routers
Code:
#!/bin/sh
TITLES="OO@OOAOOBOOCOODOOEOOFOOGOOHOOIOOJOOKOOLOOMOONOOO"
BASE="NSP"
RANDOM=$(head /dev/urandom | hexdump -d | head -n 1 | cut -c 11-15)
CTR=$(($RANDOM%$(($(expr length $TITLES)/3))))
MAC=$(echo -e $BASE$TITLES | cut -c 1-3,$(($CTR*3+4))-$(($CTR*3+6)) | hexdump -e '6/1 "%02X:"' | cut -c 1-17)
WLINT=$(nvram get wl0_ifname)
APDCNF=/tmp/${WLINT}_hostap.conf
APDPID=/var/run/${WLINT}_hostapd.pid
if [ -e $APDCNF ]; then
kill $(cat $APDPID)
sleep 3
sed -ri s/bssid=.*/bssid=$MAC/ $APDCNF
hostapd -B -P $APDPID $APDCNF
else
ifconfig $WLINT down
ifconfig $WLINT hw ether $MAC
ifconfig $WLINT up
fi
Code:
*/10 1-7 * * * root /tmp/nzone
Q: Why do we need a title-specific MACS? I feel comfortable with common 16 MACS
A: There are over 130 StreetPass-enabled games now. If you're using less common games, you may pass hundreds of streetpasses to get a StreetPass data for them. The dedicated MAC for a title will guarantee you will get data for that title, as soon as somebody else is using it.

Q: Why not to use a siple cycle through all common MACs
A: In case it is not randomized, you have a big probability to get a StreetPass data from the same partner several times in a row

Q: Can a change MAC more often to get more streetpasses?
A: Since you can only get one StreetPass from a unique MAC per 8 hours, switching MAC too often will at least do nothing for you and at worst spam all used MACs with your data. I suggest you shold change MAC not more than (Number_of_MACS / 8)*2 times per hour

Q: Your script is not working as it should
A1: You should not check for a MAC change at the DD-WRT interface, here only the permanent MAC used at the router startup is displayed. You can check your mac have changed like this
Code:
ifconfig $(nvram get wl0_ifname)
A2: If you have a DD-WRT micro build, it is not supported, at least yet.
A3: You should try to manually run script
Code:
/tmp/nzone
If MAC is not changed please PM me the output, if any.
If MAC is changed, try to restart cron daemon
Code:
stopservice cron; startservice cron
as it seems to be a bug with cron deamon goes to sleep and prevent running scheduled jobs at several DD-WRT builds
A4: Though this script was tested on DD-WRT v24 preSP2 (Build 21061), it may not run properly on your device because of the DD-WRT build differences for a variety of hardware. If this is the case, please make sure you have the latest DD-WRT available for your router and PM me output for this commands
Code:
cat /proc/cpuinfo
nvram get wl0_ifname
ifconfig
iwconfig
ps
- support multi-ssid configuration
- check script with Realtek-baset routers
- DD-WRT micro support

I tried using that script but I don't get a streetpass automatically. What's the config required on dd wrt?
 

seinz

New Member
Newbie
Joined
Aug 15, 2013
Messages
3
Trophies
0
Age
36
XP
51
Country
Indonesia
MAC addresses choosed randomly, i.e. there is no guarantee, that one not choosed twice in a reow, that is why the actual streetpass time is different.
*/15 12-15 is for from 12:00 to 15:45 every 15 minutes. You can just disable or delete cron command or/and clear startup script.


Thanks.

I've tried your v2 script and it doesn't work (not recycling any MAC, and router is not restarting - I notice if I manually change MAC, the rooter is restarting).
This is the cron code:

Code:
  */5 * * * * root /tmp/nzone BASE256,ABR,AMK,JD2,EGD

I also have changed it back to v1 script, copy paste from your post, which now, written in various lines, instead of just one line. This is how it looks:

dd-wrt command.JPG



Cron code is also similar as the one you wrote:

Code:
  */5 * * * * root /tmp/nzone

And it is not working now (yesterday, it works). I notice that the router is not recycling MAC/not rebooting wifi connection. So, what do I do?

Again, thank in advance.
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    NinStar @ NinStar: so sad