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.

Osmosis

Accidents Happen. Don't be one of them.
Member
Joined
Dec 20, 2014
Messages
823
Trophies
0
XP
387
Country
United States
Using DD-WRT router method on A9LH FW 11.0.0-33U.

Only getting 6 hits every 8 hours. WTF?

I used to get 10 every 30 mins.

Using BASE256 GBATEMP, same code whole shabbang. Even swapped out my main router for the Homepass router.

What happened?
 

Kartun

New Member
Newbie
Joined
Aug 19, 2016
Messages
1
Trophies
0
Age
41
XP
51
Country
Serbia, Republic of
It would be useful for someone using routers with Tomato firmware.
Prerequisites ...
Save it somewhere in router, possibly in "/opt", make executable "chmod +x", and schedule using web interface.
Adjust parameters if required (name of virtual wireless interface, timeout between mac changes, add some mac-addreses if you like)

Code:
#!/opt/bin/bash

mac=( "4E:53:50:4F:4F:46" "4E:53:50:4F:4F:45" "4E:53:50:4F:4F:41" "4E:53:50:4F:4F:42" "4E:53:50:4F:4F:43" "4E:53:50:4F:4F:44")

# Device specific parameters
hotspot_name="NZ@McD1"
interface="wl0.1"
timeout=120

if [ "`nvram get ${interface}_radio`" = "1" ]; then
        echo "Interface:{$interface} is running. Disabling"
        /bin/nvram set "${interface}_bss_enabled"=0
        /bin/nvram set "${interface}_radio"=0
        /bin/nvram commit
        sleep 10
else
        echo "Interface {$interface} is down. No need to disable"
fi

for i in "${mac[@]}"
do
        echo "Setting mac" $i
        /bin/nvram set "${interface}_bss_enabled"=1
        /bin/nvram set "${interface}_radio"=1
        /bin/nvram set "${interface}_ssid"=$hotspot_name
        /bin/nvram set "${interface}_hwaddr"=$i
        /bin/nvram commit
        service wireless restart
        echo "Sleeping for" $timeout
        sleep $timeout
        # Finally disable this interface
        echo "Disabling " $interface
        /bin/nvram set "${interface}_bss_enabled"=0
        /bin/nvram set "${interface}_radio"=0
        /bin/nvram commit
        service wireless restart
        sleep 10
done
 

AngelDamien

Member
Newcomer
Joined
Oct 15, 2009
Messages
10
Trophies
0
XP
167
Country
United States
Saw this before, finally trying to start cycling since I'm playing more games now.

On a DD-WRT router

wget -O /tmp/nzone.sh http://nintendozone.dynu.net/install; ch
mod +x /tmp/nzone.sh; /tmp/nzone.sh BASE16,GBATEMP
Connecting to nintendozone.dynu.net (213.141.148.11:80)
nzone.sh 100% |*******************************| 4525 0:00:00 ETA
No wireless interfaces found

^ Any idea whats going on?
 

arcadesdude

Member
Newcomer
Joined
Nov 23, 2013
Messages
6
Trophies
0
XP
285
Country
United States
This is a unified script you only need to make a hompass MAC change for:
- routers with DD-WRT firmware (not supported by Ralink-based routers, and most probably micro builds and build older than 21xxx)

DDWRT on WRT54GL V1.1 with 4MB RAM and recent mini install of DDWRT (Broadcom chipset) using the modified version of the homepass script. This is a custom solution and values are hardcoded so be sure to customize it to your needs.

For whatever reason, wget wouldn't work on my install but USED TO WORK. I believe this was due to no-ip.org and other dynamic install addresses failing or some other configuration issue I have yet to solve. The below instructions are my workaround to get at least the BASE256 macs cycling again but now on the virtual wireless interface so I still have encryption on my main connection.

Command when run would give (yes even with the latest version of the install script with the updated ip address as of this post 8/29/16!):
-sh: /tmp/nzone.sh: not found
Not sure why this worked before (perhaps it was because I was on a really old standard build of ddwrt rather than the spiffy new mini build I'm using now).

Update 9/2/16: Duke's script still works and he is very responsive to PM's if you have trouble. I'm leaving my modification of his work here if you want local mac caching using jffs and/or virtual mac cycling along with physical mac cycling.

Update 8/29/16: If the original script author would like to modify or use anything in this post, feel free. I might not check here very often now that street passes are working again but I'm happy with it as it is....not to say if you read this and have an update that would work with my mini build of ddwrt (DD-WRT v3.0-r30471 mini (08/24/16)) that would be awesome!

My wget DOES work
it just doesn't support ssl AND it seems to require a file extension or the server to send back a file. Having the notehub.org url end in 'export' wasn't enough and I still couldn't use it to download it from the server. The original script would interpret the url and send back appropriate data for this to be installed or give the requested MACS ... so this modification is a custom hardcoded simplified version to get around wget's limitations and manually set up the cycling again. Also has added benefit for ap isolation so you don't have to have your main connection unencrypted and just have the homepass connection open.

Problem: My old original homepass script on my DD-WRT router broke. I decided to update ddwrt and try again. No go. So I edited and manually installed the script and macs modifying it to suit my needs.

Solution: below.

Instructions start:

Go to router login address usually 192.168.1.1 unless you changed it.

Administration tab -> Management, scroll down to JFFS2 Support and enable and also (important!) Clean Internal Flash Storage this once to initialize it. Should so something like but not exactly:
Total / Free Size 704.00 KB / 380.00 KB
under it.

Wireless tab -> Click add under virtual interface
Now set up your main wifi ssid name and for the virtual name use NZ@McD1. I also turned on AP isolation here since this will be unsecured (no encryption)
Save and apply settings

Setup tab -> Mac address clone ON: set wireless to be 4E:53:50:4F:4F:00 (that will be the real interface) The virtual interface (wl0.1) will already be +1 of the real interface (eth1) and start off as (4E:53:50:4F:4F:01). You could change those to the prime mac-1 and the prime mac numbers if you desire, just edit the /jffs/nzone.macs appropriately.
Save and apply settings

Wireless tab -> Wireless security (disabled for NZ@McD1 required for street passes to work). Good idea to set it up (WPA2 Personal best) for your main/real wireless interface.
Save and apply settings

start putty and log in (tty session to your dd-wrt router)

make sure you have a mini build or better (micro builds won't work likely)

cd /tmp

vi nzone.sh

press 'Insert' key to change mode

switch to browser copy nzone install script https://notehub.org/xoa8w/export

Code:
#!/bin/sh
LISTS=$1
[ -z $LISTS ] && LISTS=BASE256
NZ=nzone
if grep -q Ubuntu /proc/version; then
    VER=Ubuntu
    PS="ps -A"
    PACKAGES="hostapd dnsmasq sudo iptables procps cron net-tools wireless-tools pciutils module-init-tools coreutils grep sed"
    [ $(dpkg -l $PACKAGES | grep -ce ^ii) -lt 13 ] && sudo apt-get update && sudo apt-get install $PACKAGES
    SCRIPTROOT=/usr/local/bin
    SCRIPT=$SCRIPTROOT/$NZ
    APSCRIPT=$SCRIPTROOT/$NZ.ap
    RCSCRIPT=/etc/rcS.d/S99$NZ.ap
    EXTINT=$(route | grep default | sed -r "s/(.* +){7}(.*)/\2/")
    WLINT=$(iwconfig 2>&1 | grep -v "no wireless" | cut -d " " -f 1 | grep -v $EXTINT | sed /^$/d)
    WLCOUNT=$(echo -n $WLINT | wc -c)
    [ $WLCOUNT -eq 0 ] && echo No wireless interfaces found && exit
    WLCOUNT=$(echo "$WLINT" | wc -l)
    if [ $WLCOUNT -gt 1 ]; then
        for i in $(seq 1 $WLCOUNT); do
            printf "%d - %s\n" $i $(echo "$WLINT" | head -n $i | tail -n 1)
        done
        read -p "Select the number of the wireless interface to use: " WLIDX
        [ $WLIDX -lt 1 ] || [ $WLIDX -gt $WLCOUNT ] && echo Invalid wireless interface number && exit
        WLINT=$(echo "$WLINT" | head -n $WLIDX | tail -n 1)
    fi
    WLMOD=$(lspci -k | grep -A 3 -i "wireless" | grep "Kernel driver" | sed -r "s/.*?: (.*)/\1/" | tail -n 1)
    [ $(modinfo $WLMOD | grep depend | grep -c mac80211) = 0 ] && echo "$WLMOD WiFi adapter not supported" && exit
    HOSTAPDCONF=/etc/${WLINT}_hostap.conf
    HOSTAPDPID=/var/run/${WLINT}_hostapd.pid
    DNSMASQPID=/var/run/${WLINT}_dnsmasq.pid
fi
if (grep -q dd-wrt /proc/version) || (grep -q OpenWrt /proc/version); then
    VER=DD-WRT
    PS=ps
    SCRIPTROOT=/tmp
    SCRIPT=$SCRIPTROOT/$NZ
    SESSCRIPTROOT=/tmp/etc/config
    SESSCRIPT=$SESSCRIPTROOT/$NZ.sesbutton
    WLINT=$(nvram get wl0_ifname)
    HOSTAPDCONF=/tmp/${WLINT}_hostap.conf
    HOSTAPDPID=/var/run/${WLINT}_hostapd.pid
fi
if [ -f /.version ]; then
    VER=WL500G
    PS=ps
    SCRIPTROOT=/usr/local/sbin
    SCRIPT=$SCRIPTROOT/$NZ
    POSTBOOT=$SCRIPTROOT/post-boot
    WLINT=$(nvram get wl0_ifname)
fi
[ -z $VER ] && echo System not supported && exit
echo "#!/bin/sh" > $SCRIPT
[ $VER = Ubuntu ] && echo "export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" >> $SCRIPT
echo "URL=https://notehub.org/xoa8w/export" >> $SCRIPT
echo "MACS=/tmp/$NZ.macs" >> $SCRIPT
echo "SPDELAY=480" >> $SCRIPT
echo "MACNUM=0" >> $SCRIPT
echo "[ -f \$MACS ] && MACNUM=\$(grep -v x \$MACS | wc -l) && DELAY=\$(((\$(date +%s)-\$(date -r \$MACS +%s))/60))" >> $SCRIPT
echo "[ \$MACNUM = 0 ] && NEWMACS=\$(cat '/jffs/nzone.macs')" >> $SCRIPT
echo "[ \$(echo -n \"\$NEWMACS\" | wc -c) != 0 ] && echo \"\$NEWMACS\" > \$MACS && MACNUM=\$(cat \$MACS | wc -l)" >> $SCRIPT
echo "[ -z \$DELAY ] && DELAY=\$SPDELAY" >> $SCRIPT
echo "[ \$MACNUM = 0 ] && sed -ri \"s/x(.*)/\\\1/\" \$MACS && MACNUM=\$(grep -v x \$MACS | wc -l)" >> $SCRIPT
echo "MACTOTAL=\$(cat \$MACS | wc -l)" >> $SCRIPT
echo "[ \$MACNUM = 0 ] || ([ \$MACTOTAL -lt \$SPDELAY ] && [ \$DELAY -lt \$((\$SPDELAY/\$MACTOTAL)) ]) && exit" >> $SCRIPT
echo "RANDOM=\$(head /dev/urandom | hexdump -d | head -n 1 | cut -c 11-15 | sed -r \"s/0*(.*)/\\\1/\")" >> $SCRIPT
echo "MAC=\$(grep -v x \$MACS | head -n \$((\$RANDOM%\${MACNUM}+1)) | tail -n 1 | cut -d , -f 1)" >> $SCRIPT
echo "MAC2=\$(grep -v x \$MACS | head -n \$((\$RANDOM%\${MACNUM})) | tail -n 1 | cut -d , -f 1)" >> $SCRIPT
echo "sed -ri s/\$MAC/x\$MAC/ \$MACS" >> $SCRIPT
echo "ifconfig wl0.1 down" >> $SCRIPT
echo "ifconfig $WLINT down" >> $SCRIPT
[ $VER = Ubuntu ] && echo "rfkill unblock wifi" >> $SCRIPT
[ $VER = Ubuntu ] || [ ! -f /usr/sbin/hostapd ] && echo -e "ifconfig $WLINT hw ether \$MAC2\nifconfig wl0.1 hw ether \$MAC\nifconfig $WLINT up\nifconfig wl0.1 up" >> $SCRIPT
[ -f /usr/sbin/hostapd ] && echo "sed -ri s/bssid=.*/bssid=\$MAC/ $HOSTAPDCONF" >> $SCRIPT
[ $VER = Ubuntu ] || [ -f /usr/sbin/hostapd ] && echo "while ! hostapd -B -P $HOSTAPDPID $HOSTAPDCONF; do"  >> $SCRIPT && echo "    PID=\$($PS | grep $HOSTAPDPID | grep -v grep | sed 's/^ *//' | cut -d ' ' -f 1)" >> $SCRIPT && echo "    [ ! -z \$PID ] && kill \$PID" >> $SCRIPT && echo "    sleep 1" >> $SCRIPT && echo "done" >> $SCRIPT
[ $VER = DD-WRT ] && echo "stopservice cron" >> $SCRIPT && echo "startservice cron" >> $SCRIPT
chmod +x $SCRIPT
if [ $VER = Ubuntu ]; then
    echo "#!/bin/sh" > $APSCRIPT
    echo "case \"\$1\" in" >> $APSCRIPT
    echo "start)" >> $APSCRIPT
    echo "    [ -f $DNSMASQPID ] || [ -f $HOSTAPDPID ] && echo Already running && exit" >> $APSCRIPT
    echo "    rfkill unblock wifi" >> $APSCRIPT
    echo "    dnsmasq -i $WLINT -x $DNSMASQPID -F 192.168.23.50,192.168.23.150,255.255.255.0,12h" >> $APSCRIPT
    echo "    sysctl -w net.ipv4.ip_forward=1" >> $APSCRIPT
    echo "    iptables -t nat -I POSTROUTING -o $EXTINT -j MASQUERADE" >> $APSCRIPT
    echo "    iptables -I FORWARD -i $WLINT -j ACCEPT" >> $APSCRIPT
    echo "    ifconfig $WLINT 192.168.23.1 up" >> $APSCRIPT
    echo "    hostapd -B -P $HOSTAPDPID $HOSTAPDCONF" >> $APSCRIPT
    echo "    echo \"\$(sudo crontab -l | sed -r \"s/^#+(.*?$NZ.*?)/\\\1/\")\" | sudo crontab -" >> $APSCRIPT
    echo ";;" >> $APSCRIPT
    echo "stop)" >> $APSCRIPT
    echo "    ifconfig $WLINT down" >> $APSCRIPT
    echo "    [ -f $DNSMASQPID ] && kill \$(cat $DNSMASQPID) && rm -f $DNSMASQPID" >> $APSCRIPT
    echo "    PID=\$($PS | grep $HOSTAPDPID | sed 's/^ *//' | cut -d ' ' -f 1)" >> $APSCRIPT
    echo "    [ ! -z \$PID ] && kill \$PID && rm -f $HOSTAPDPID" >> $APSCRIPT
    echo "    iptables -t nat -D POSTROUTING -o $EXTINT -j MASQUERADE" >> $APSCRIPT
    echo "    iptables -D FORWARD -i $WLINT -j ACCEPT" >> $APSCRIPT
    echo "    echo \"\$(sudo crontab -l | sed -r s/^[^#+].*?$NZ.*?/#\&/)\" | sudo crontab -" >> $APSCRIPT
    echo ";;" >> $APSCRIPT
    echo "esac" >> $APSCRIPT
    chmod +x $APSCRIPT
    ln -sf $APSCRIPT $RCSCRIPT
    echo "interface=$WLINT" > $HOSTAPDCONF
    echo "driver=nl80211" >> $HOSTAPDCONF
    echo "channel=1" >> $HOSTAPDCONF
    echo "ssid=attwifi" >> $HOSTAPDCONF
    echo "auth_algs=1" >> $HOSTAPDCONF
    echo "$(sudo crontab -l | sed /$NZ/d)\n#* * * * * $SCRIPT $LISTS" | sudo crontab -
    $APSCRIPT start
fi
if [ $VER = DD-WRT ]; then
    mkdir -p $SESSCRIPTROOT
    echo "#!/bin/sh" > $SESSCRIPT
    echo "CRONJOBS=\$(nvram get cron_jobs)" >> $SESSCRIPT
    echo "if echo \"\$CRONJOBS\" | grep -q $NZ; then" >> $SESSCRIPT
    echo "    if echo \"\$CRONJOBS\" | grep $NZ | grep -qe '^#'; then" >> $SESSCRIPT
    echo "        nvram set cron_jobs=\"\$(echo \"\$CRONJOBS\" | sed -r \"s/^#+(.*?$NZ.*?)\$/\\\1/\")\"" >> $SESSCRIPT
    echo "    else" >> $SESSCRIPT
    echo "        nvram set cron_jobs=\"\$(echo \"\$CRONJOBS\" | sed -r s/^[^#+].*?$NZ.*?\$/#\&/)\"" >> $SESSCRIPT
    echo "    fi" >> $SESSCRIPT
    echo "    stopservice cron" >> $SESSCRIPT
    echo "    startservice cron" >> $SESSCRIPT
    echo "fi" >> $SESSCRIPT
    chmod +x $SESSCRIPT
    CMD=$(cat $SCRIPT | sed s/\\\\/\\\\\\\\/g | sed s/\"/\\\\\"/g | sed s/\\$/\\\\$/g | sed s/$/\\\\n/ | tr -d "\n")
    SESCMD=$(cat $SESSCRIPT | sed s/\\\\/\\\\\\\\/g | sed s/\"/\\\\\"/g | sed s/\\$/\\\\$/g | sed s/$/\\\\n/ | tr -d "\n")
    nvram set rc_startup="echo -e \"$CMD\" > $SCRIPT; chmod +x $SCRIPT; mkdir -p $SESSCRIPTROOT; echo -e \"$SESCMD\" > $SESSCRIPT; chmod +x $SESSCRIPT"
    nvram set cron_jobs="* * * * * root sh $SCRIPT $LISTS"
    nvram commit
    stopservice cron
    startservice cron
fi
if [ $VER = WL500G ]; then
    [ ! -f $POSTBOOT ] && echo "#!/bin/sh" > $POSTBOOT && chmod +x $POSTBOOT
    sed -ri /crond/d $POSTBOOT
    echo crond >> $POSTBOOT
    echo -e "$(crontab -l | sed /$NZ/d)\n* * * * * $SCRIPT $LISTS" | crontab -
    sed -ri /crontabs/d /usr/local/.files
    echo /etc/crontabs >> /usr/local/.files
    flashfs enable
    flashfs save
    flashfs commit
    [ -z $(pidof crond) ] && crond
fi

switch back to putty, and right click to paste into vi
ensure there is a new line (press enter) at the end of the last 'fi' instruction (or you'll get an error about unexpected eof when trying to run it)

press Esc to switch modes

type :wq
press enter

back in putty (ash shell command line) type:

chmod +x nzone.sh

sh nzone.sh

sh nzone
(no sh this time)

at this point wget wasn't working to download the macs so I modified the install to use jffs (router's flash storage). So let's manually create the nzone.macs file with the BASE256 macs:

switch to browser and copy BASE256 macs https://notehub.org/s8k58/export

Code:
4E:53:50:4F:4F:01
4E:53:50:4F:4F:02
4E:53:50:4F:4F:03
4E:53:50:4F:4F:04
4E:53:50:4F:4F:05
4E:53:50:4F:4F:06
4E:53:50:4F:4F:07
4E:53:50:4F:4F:08
4E:53:50:4F:4F:09
4E:53:50:4F:4F:0A
4E:53:50:4F:4F:0B
4E:53:50:4F:4F:0C
4E:53:50:4F:4F:0D
4E:53:50:4F:4F:0E
4E:53:50:4F:4F:0F
4E:53:50:4F:4F:10
4E:53:50:4F:4F:11
4E:53:50:4F:4F:12
4E:53:50:4F:4F:13
4E:53:50:4F:4F:14
4E:53:50:4F:4F:15
4E:53:50:4F:4F:16
4E:53:50:4F:4F:17
4E:53:50:4F:4F:18
4E:53:50:4F:4F:19
4E:53:50:4F:4F:1A
4E:53:50:4F:4F:1B
4E:53:50:4F:4F:1C
4E:53:50:4F:4F:1D
4E:53:50:4F:4F:1E
4E:53:50:4F:4F:1F
4E:53:50:4F:4F:20
4E:53:50:4F:4F:21
4E:53:50:4F:4F:22
4E:53:50:4F:4F:23
4E:53:50:4F:4F:24
4E:53:50:4F:4F:25
4E:53:50:4F:4F:26
4E:53:50:4F:4F:27
4E:53:50:4F:4F:28
4E:53:50:4F:4F:29
4E:53:50:4F:4F:2A
4E:53:50:4F:4F:2B
4E:53:50:4F:4F:2C
4E:53:50:4F:4F:2D
4E:53:50:4F:4F:2E
4E:53:50:4F:4F:2F
4E:53:50:4F:4F:30
4E:53:50:4F:4F:31
4E:53:50:4F:4F:32
4E:53:50:4F:4F:33
4E:53:50:4F:4F:34
4E:53:50:4F:4F:35
4E:53:50:4F:4F:36
4E:53:50:4F:4F:37
4E:53:50:4F:4F:38
4E:53:50:4F:4F:39
4E:53:50:4F:4F:3A
4E:53:50:4F:4F:3B
4E:53:50:4F:4F:3C
4E:53:50:4F:4F:3D
4E:53:50:4F:4F:3E
4E:53:50:4F:4F:3F
4E:53:50:4F:4F:40
4E:53:50:4F:4F:41
4E:53:50:4F:4F:42
4E:53:50:4F:4F:43
4E:53:50:4F:4F:44
4E:53:50:4F:4F:45
4E:53:50:4F:4F:46
4E:53:50:4F:4F:47
4E:53:50:4F:4F:48
4E:53:50:4F:4F:49
4E:53:50:4F:4F:4A
4E:53:50:4F:4F:4B
4E:53:50:4F:4F:4C
4E:53:50:4F:4F:4D
4E:53:50:4F:4F:4E
4E:53:50:4F:4F:4F
4E:53:50:4F:4F:50
4E:53:50:4F:4F:51
4E:53:50:4F:4F:52
4E:53:50:4F:4F:53
4E:53:50:4F:4F:54
4E:53:50:4F:4F:55
4E:53:50:4F:4F:56
4E:53:50:4F:4F:57
4E:53:50:4F:4F:58
4E:53:50:4F:4F:59
4E:53:50:4F:4F:5A
4E:53:50:4F:4F:5B
4E:53:50:4F:4F:5C
4E:53:50:4F:4F:5D
4E:53:50:4F:4F:5E
4E:53:50:4F:4F:5F
4E:53:50:4F:4F:60
4E:53:50:4F:4F:61
4E:53:50:4F:4F:62
4E:53:50:4F:4F:63
4E:53:50:4F:4F:64
4E:53:50:4F:4F:65
4E:53:50:4F:4F:66
4E:53:50:4F:4F:67
4E:53:50:4F:4F:68
4E:53:50:4F:4F:69
4E:53:50:4F:4F:6A
4E:53:50:4F:4F:6B
4E:53:50:4F:4F:6C
4E:53:50:4F:4F:6D
4E:53:50:4F:4F:6E
4E:53:50:4F:4F:6F
4E:53:50:4F:4F:70
4E:53:50:4F:4F:71
4E:53:50:4F:4F:72
4E:53:50:4F:4F:73
4E:53:50:4F:4F:74
4E:53:50:4F:4F:75
4E:53:50:4F:4F:76
4E:53:50:4F:4F:77
4E:53:50:4F:4F:78
4E:53:50:4F:4F:79
4E:53:50:4F:4F:7A
4E:53:50:4F:4F:7B
4E:53:50:4F:4F:7C
4E:53:50:4F:4F:7D
4E:53:50:4F:4F:7E
4E:53:50:4F:4F:7F
4E:53:50:4F:4F:80
4E:53:50:4F:4F:81
4E:53:50:4F:4F:82
4E:53:50:4F:4F:83
4E:53:50:4F:4F:84
4E:53:50:4F:4F:85
4E:53:50:4F:4F:86
4E:53:50:4F:4F:87
4E:53:50:4F:4F:88
4E:53:50:4F:4F:89
4E:53:50:4F:4F:8A
4E:53:50:4F:4F:8B
4E:53:50:4F:4F:8C
4E:53:50:4F:4F:8D
4E:53:50:4F:4F:8E
4E:53:50:4F:4F:8F
4E:53:50:4F:4F:90
4E:53:50:4F:4F:91
4E:53:50:4F:4F:92
4E:53:50:4F:4F:93
4E:53:50:4F:4F:94
4E:53:50:4F:4F:95
4E:53:50:4F:4F:96
4E:53:50:4F:4F:97
4E:53:50:4F:4F:98
4E:53:50:4F:4F:99
4E:53:50:4F:4F:9A
4E:53:50:4F:4F:9B
4E:53:50:4F:4F:9C
4E:53:50:4F:4F:9D
4E:53:50:4F:4F:9E
4E:53:50:4F:4F:9F
4E:53:50:4F:4F:A0
4E:53:50:4F:4F:A1
4E:53:50:4F:4F:A2
4E:53:50:4F:4F:A3
4E:53:50:4F:4F:A4
4E:53:50:4F:4F:A5
4E:53:50:4F:4F:A6
4E:53:50:4F:4F:A7
4E:53:50:4F:4F:A8
4E:53:50:4F:4F:A9
4E:53:50:4F:4F:AA
4E:53:50:4F:4F:AB
4E:53:50:4F:4F:AC
4E:53:50:4F:4F:AD
4E:53:50:4F:4F:AE
4E:53:50:4F:4F:AF
4E:53:50:4F:4F:B0
4E:53:50:4F:4F:B1
4E:53:50:4F:4F:B2
4E:53:50:4F:4F:B3
4E:53:50:4F:4F:B4
4E:53:50:4F:4F:B5
4E:53:50:4F:4F:B6
4E:53:50:4F:4F:B7
4E:53:50:4F:4F:B8
4E:53:50:4F:4F:B9
4E:53:50:4F:4F:BA
4E:53:50:4F:4F:BB
4E:53:50:4F:4F:BC
4E:53:50:4F:4F:BD
4E:53:50:4F:4F:BE
4E:53:50:4F:4F:BF
4E:53:50:4F:4F:C0
4E:53:50:4F:4F:C1
4E:53:50:4F:4F:C2
4E:53:50:4F:4F:C3
4E:53:50:4F:4F:C4
4E:53:50:4F:4F:C5
4E:53:50:4F:4F:C6
4E:53:50:4F:4F:C7
4E:53:50:4F:4F:C8
4E:53:50:4F:4F:C9
4E:53:50:4F:4F:CA
4E:53:50:4F:4F:CB
4E:53:50:4F:4F:CC
4E:53:50:4F:4F:CD
4E:53:50:4F:4F:CE
4E:53:50:4F:4F:CF
4E:53:50:4F:4F:D0
4E:53:50:4F:4F:D1
4E:53:50:4F:4F:D2
4E:53:50:4F:4F:D3
4E:53:50:4F:4F:D4
4E:53:50:4F:4F:D5
4E:53:50:4F:4F:D6
4E:53:50:4F:4F:D7
4E:53:50:4F:4F:D8
4E:53:50:4F:4F:D9
4E:53:50:4F:4F:DA
4E:53:50:4F:4F:DB
4E:53:50:4F:4F:DC
4E:53:50:4F:4F:DD
4E:53:50:4F:4F:DE
4E:53:50:4F:4F:DF
4E:53:50:4F:4F:E0
4E:53:50:4F:4F:E1
4E:53:50:4F:4F:E2
4E:53:50:4F:4F:E3
4E:53:50:4F:4F:E4
4E:53:50:4F:4F:E5
4E:53:50:4F:4F:E6
4E:53:50:4F:4F:E7
4E:53:50:4F:4F:E8
4E:53:50:4F:4F:E9
4E:53:50:4F:4F:EA
4E:53:50:4F:4F:EB
4E:53:50:4F:4F:EC
4E:53:50:4F:4F:ED
4E:53:50:4F:4F:EE
4E:53:50:4F:4F:EF
4E:53:50:4F:4F:F0
4E:53:50:4F:4F:F1
4E:53:50:4F:4F:F2
4E:53:50:4F:4F:F3
4E:53:50:4F:4F:F4
4E:53:50:4F:4F:F5
4E:53:50:4F:4F:F6
4E:53:50:4F:4F:F7
4E:53:50:4F:4F:F8
4E:53:50:4F:4F:F9
4E:53:50:4F:4F:FA
4E:53:50:4F:4F:FB
4E:53:50:4F:4F:FC
4E:53:50:4F:4F:FD
4E:53:50:4F:4F:FE
4E:53:50:4F:4F:FF

switch back to putty session and

cd /jffs

vi nzone.macs

press Insert key to change mode

right click to paste macs

press Esc to switch modes

type :wq
press enter

(if you get an error here about read only file system means you need to initialize (clean) the jffs or enable it and initialize it from the router administration page).

Note (the first mac ending in 00 is missing because that's what my primary eth1 real wireless interface is using, the virtual interface wl0.1 (w L ZERO . 1) is always +1 the real interface for this solution.

As soon as the macs are in the nzone.macs file the street passes should start rolling in (they did for me) since we ran the nzone (without sh) script earlier which turned on the cron job.
Run it again if you need to here:

sh nzone
(again no 'sh')

You can watch the cycling by typing:

ifconfig eth1
ifconfig wl0.1

(that's double-u ell zero dot one)

and seeing the mac addresses change. I believe it is set to about every two minutes.

type exit (exit) to leave the tty session.

I rebooted the router at this point (Administration tab -> Reboot router (at bottom)). The startup script will recopy the /jffs/nzone.macs to /tmp/nzone.macs (just reading from jffs not writing to it each time). This works fetching the macs from local flash storage rather than trying to get non-working wget to work.

Also tested when all the macs get used (they get an 'x' in front of them) that the script will recopy the jffs macs back to the /tmp/nzone.macs to make them unused again. So once it randomly cycle through them all it will start again and randomly choose new macs. MACs aren't repeated and only used once per full cycle. The author who made this did an incredibly awesome job and I love the simplicity of just marking the used ones and randomly choosing a new mac automatically!

So for the virtual interface:
I noticed that the virtual interface always followed the real interface and would only update if the real interface did. So this method makes the real interface change and causes the virtual one to go along for the ride. Separated networks, one device, still have encrypted wireless and Nintendo homepasses all in one device. I can't take credit for the script. In fact, I've broken it a bit but it works fine. The broken part is the BASE256 argument means nothing and you can't choose BASE16 or the others. The servers which gave out those macs aren't available anymore? So I just have the list of the base256 ones. Good enough for me. It survives rebooting and doesn't need to worry about dns hosted servers going down. Feel free to modify it if you need to for your own use. You can add/delete or change the macs list to your liking. I originally created it using excel to make a decimal list, converted it to hex using an excel function and then using notepad++ to prefix the beginning mac address to it.

Now's a good time to set up the mac filter (router administration page, wireless tab -> mac filter).

Check Administration -> Management tab, Cron should be enabled (probably reads '* * * * * root sh /tmp/nzone BASE256' the BASE256 part doesn't do anything because we're using the hardcoded macs from /jffs/nzone.macs that get copied to /tmp/nzone.macs so changing BASE256 won't affect anything. To change the macs just edit the /jffs/nzone.macs file using putty telnet and vi editor (right click paste from windows)).

Check Administration -> Commands, startup command should read:
echo -e "#!/bin/sh\nURL=https://notehub.org/xoa8w/export\nMACS=/tmp/nzone.macs\nSPDELAY=480\nMACNUM=0\n[ -f \$MACS ] && MACNUM=\$(grep -v x \$MACS | wc -l) && DELAY=\$(((\$(date +%s)-\$(date -r \$MACS +%s))/60))\n[ \$MACNUM = 0 ] && NEWMACS=\$(cat '/jffs/nzone.macs')\n[ \$(echo -n \"\$NEWMACS\" | wc -c) != 0 ] && echo \"\$NEWMACS\" > \$MACS && MACNUM=\$(cat \$MACS | wc -l)\n[ -z \$DELAY ] && DELAY=\$SPDELAY\n[ \$MACNUM = 0 ] && sed -ri \"s/x(.*)/\\\\1/\" \$MACS && MACNUM=\$(grep -v x \$MACS | wc -l)\nMACTOTAL=\$(cat \$MACS | wc -l)\n[ \$MACNUM = 0 ] || ([ \$MACTOTAL -lt \$SPDELAY ] && [ \$DELAY -lt \$((\$SPDELAY/\$MACTOTAL)) ]) && exit\nRANDOM=\$(head /dev/urandom | hexdump -d | head -n 1 | cut -c 11-15 | sed -r \"s/0*(.*)/\\\\1/\")\nMAC=\$(grep -v x \$MACS | head -n \$((\$RANDOM%\${MACNUM}+1)) | tail -n 1 | cut -d , -f 1)\nMAC2=\$(grep -v x \$MACS | head -n \$((\$RANDOM%\${MACNUM})) | tail -n 1 | cut -d , -f 1)\nsed -ri s/\$MAC/x\$MAC/ \$MACS\nifconfig wl0.1 down\nifconfig eth1 down\nifconfig eth1 hw ether \$MAC2\nifconfig wl0.1 hw ether \$MAC\nifconfig eth1 up\nifconfig wl0.1 up\nstopservice cron\nstartservice cron\n" > /tmp/nzone; chmod +x /tmp/nzone; mkdir -p /tmp/etc/config; echo -e "#!/bin/sh\nCRONJOBS=\$(nvram get cron_jobs)\nif echo \"\$CRONJOBS\" | grep -q nzone; then\n if echo \"\$CRONJOBS\" | grep nzone | grep -qe '^#'; then\n nvram set cron_jobs=\"\$(echo \"\$CRONJOBS\" | sed -r \"s/^#+(.*?nzone.*?)\$/\\\\1/\")\"\n else\n nvram set cron_jobs=\"\$(echo \"\$CRONJOBS\" | sed -r s/^[^#+].*?nzone.*?\$/#\\&/)\"\n fi\n stopservice cron\n startservice cron\nfi\n" > /tmp/etc/config/nzone.sesbutton; chmod +x /tmp/etc/config/nzone.sesbutton

And if you run command: 'cat /tmp/nzone' (without the quotes), the resulting output should be (on ddwrt):
#!/bin/sh
URL=https://notehub.org/xoa8w/export
MACS=/tmp/nzone.macs
SPDELAY=480
MACNUM=0
[ -f $MACS ] && MACNUM=$(grep -v x $MACS | wc -l) && DELAY=$((($(date +%s)-$(date -r $MACS +%s))/60))
[ $MACNUM = 0 ] && NEWMACS=$(cat '/jffs/nzone.macs')
[ $(echo -n 0 ] &&$NEWMACS=$(cat | wc -c) != 0 ] && echo Y=$((($NEWMACS%s)-$( > $MACS && MACNUM=$(cat $MACS | wc -l)
[ -z $DELAY ] && DELAY=$SPDELAY
[ $MACNUM = 0 ] && sed -ri ELAY
MACTOTAL=$(cat $MACS | wc -l)
[ $MACNUM = 0 ] || ([ $MACTOTAL -lt $SPDELAY ] && [ $DELAY -lt $(($SPDELAY/$MACTOTAL)) ]) && exit
RANDOM=$(head /dev/urandom | hexdump -d | head -n 1 | cut -c 11-15 | sed -r MACTOTs/0*(.*)/ /xit
MAC=$(grep -v x $MACS | head -n $(($RANDOM%${MACNUM}+1)) | tail -n 1 | cut -d , -f 1)
MAC2=$(grep -v x $MACS | head -n $(($RANDOM%${MACNUM})) | tail -n 1 | cut -d , -f 1)
sed -ri s/$MAC/x$MAC/ $MACS
ifconfig wl0.1 down
ifconfig eth1 down
ifconfig eth1 hw ether $MAC2
ifconfig wl0.1 hw ether $MAC
ifconfig eth1 up
ifconfig wl0.1 up
stopservice cron
startservice cron

The install script was found here:
https://gist.github.com/jthigpen/9962024/revisions
originally was found here:
http://homepass.info/
http://gbatemp.net/threads/how-to-have-a-homemade-streetpass-relay.352645/page-10
(v2 of the script stopped working for me. I think it was around 2013 or so when it worked fine to about 2014 sometime.)
Duke_srg I believe is the original author of the script.

Once downside to having the main eth1 wireless cycle too is that every time it cycles every two mins or so the wireless will freeze for a few seconds or web pages may timeout. It might be possible to set a specific cron execute time so slow this down if you wish in the cron tab.

I hope this helps get your ddwrt homepasses working again...with added optional bonus of virtual interface :D
 
Last edited by arcadesdude,
  • Like
Reactions: tonyrayo

TheFran

New Member
Newbie
Joined
Jun 16, 2011
Messages
4
Trophies
0
XP
114
Country
Serbia, Republic of
I'm using a Windows 7 PC with a TP-Link 722 WLAN adapter and I'm trying to set up an access point.

I've spent some time setting up a standard hostednetwork, but Windows doesn't allow setting an unsecured one, and apparently on later firmwares (I have 11.0) you can not have a NZ@stuff or attwifi recognized as a nintendo zone if it's secured.

What I did is download Virtual Router Manager, then NBA Homepass (2.x).

I set up a hostednetwork, then let NBAH automatically override the hosted network settings.

That let my console automatically connect:

http://i.imgur.com/Fr16Mso.png

For some reason, it only recognized as a peer when the lid was open, which is apparently the opposite of how homepasses should work.

Then NBAH restarted my wi-fi adapter to change the mac.

At that point, hosted network just stops working. Permanently. The wifi miniport has a yellow exclamation sign in the device manager that says "it cannot be started: code 10" and restarting hostednetwork with netsh says it's not in the correct state. The only reliable fix i found is to completely delete and reinstall the device's drivers.


Obviously, I got zero streetpasses out of the entire ordeal. What do? How fix?

It would be good if I could get an ethernet connection working at the same time, since I did that entire thing with my ethernet cable unplugged.
 
Last edited by TheFran,

srwgin

Well-Known Member
Member
Joined
Aug 13, 2013
Messages
520
Trophies
0
XP
425
Country
China
my router is TP-Link TL-WR703N v1
CPU Model Atheros AR9330
Firmware Version DD-WRT v3.0-r30534 std (09/01/16)
because GFW problem in china
dynu not work here
and I can not use arcadesdude script
because my firmware no jffs

then I found this http://automac.webatu.com/rand/main.php
but after change mac address and reboot AP
Wireless Channel always unknown
anyone help
----------
problem solved
go back to Firmware: DD-WRT v24-sp2 (03/25/13) std
then use script http://automac.webatu.com/rand/main.php
maybe Wireless Channel always unknown is a bug in Firmware Version DD-WRT v3.0-r30534 std (09/01/16)
 
Last edited by srwgin,

Eurasiam

Well-Known Member
Member
Joined
Sep 11, 2009
Messages
120
Trophies
0
XP
487
Country
United States
Can anyone give some advice? I had homepass set up years ago but now with the newest update, there's a use for it once again. But unlike in the past, I'm stuck with two wireless networks and i can't seem to get it going. I got virtual router up but i can't get mac changer to do anything with it. Any advice for someone with this kind of set up?
 

doogie

Active Member
Newcomer
Joined
Feb 11, 2007
Messages
44
Trophies
0
XP
316
Country
United States
I had streetpass setup and working couple of months ago. But testing it today and now not working.
my setup was added a Linksys dd-wrt router to my network. I was manual changing the mac address from google list. Worked fine.
Reading above seem there was an update or something. So what do I need to do to get it working again?

What I mean by not working is leaving 3ds on all day but no green flashing light. router is working I connect 3ds to it and get out on internet. Been trying attwifi and NZ@McD1.

Thanks
 
Last edited by doogie,

vexhash

Well-Known Member
Member
Joined
Nov 27, 2015
Messages
114
Trophies
0
Age
28
Location
Moscow
XP
106
Country
Serbia, Republic of
I've set up hotstop from guide #1, my 3ds got annoying nintendo zone icon in home menu, but i don't get any streetpasses. Why is so? I've tried several mac addresses and it's no use.
 

srwgin

Well-Known Member
Member
Joined
Aug 13, 2013
Messages
520
Trophies
0
XP
425
Country
China
if your 3ds is latest firmware
you can use router script with ssid attwifi and no secure
If you use adapter you can use NbaHomePass.exe
 

vexhash

Well-Known Member
Member
Joined
Nov 27, 2015
Messages
114
Trophies
0
Age
28
Location
Moscow
XP
106
Country
Serbia, Republic of
Welp, I made it work. Now I need someone to share eon ticket from pokemon oras with me. If someone has one - please, pm me.
Also, does anybody know how to hide this nintendo zone app? I didn't have it before and I don't really need it.
 
Last edited by vexhash,

Lyomak

Well-Known Member
Member
Joined
Jun 24, 2009
Messages
436
Trophies
1
Age
39
Location
Bogotá
Website
twitch.tv
XP
389
Country
Colombia
Hi, is there a viable way to use homepass on a Windows 10 laptop and the TPLink TL-WN722N ver. 1.0 wireless adapter? I was able to use it for smashhax, but I can't make it work for homepass and I tried also some tutorials on Youtube and the Glaciergaming website. Also, I tested some vmware images that I saw here, also with the fixes. I don't know what else to do.
Also, I tried with ddwrt on my old router but I get the /tmp/nzone.sh:not found thing using @duke_srg command.
 
Last edited by Lyomak,

DinkyBoo

Well-Known Member
Newcomer
Joined
May 11, 2016
Messages
60
Trophies
0
Age
37
XP
101
Country
Ive been trying to use nbahomepass 2.0.1 on my laptop windows 10 and it says it cant find the virtual wifi adapter so ive given up on tring to get the damn thing to work.
is there a method on android marshmallow to get a streetpass homepass working? eveytime i try to type in google aup to date method all i get is all stuff that dont work
 

Dtoid Jed

New Member
Newbie
Joined
Apr 15, 2015
Messages
1
Trophies
0
Age
37
Location
Columbus, Ohio
XP
80
Country
United States
I used to have something with MacCycle setup on Windows 8, but now I'm trying to get a set it and forget it function for windows 10, and having trouble.

NBAHomepass requires a wifi connection, and widows 10 refused to connect to wifi if you have ethernet. Otherwise my connection disconnects constantly as it cycles MACs. Is there a way to configure this like before where my wifi adapter is dedicated to street pass, my 3DS can use it for wifi, and it doesn't mess with windows 10's ethernet connection?
 

vexhash

Well-Known Member
Member
Joined
Nov 27, 2015
Messages
114
Trophies
0
Age
28
Location
Moscow
XP
106
Country
Serbia, Republic of
I still need help with eon ticket from pokemon oras. If someone has one and also have set up homepass - please, pm me.
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
    K3Nv2 @ K3Nv2: Watching the fallout series it is pretty decent