Tutorial [HOW-TO] Have a homemade Streetpass Relay

  • Thread starter Thread starter dicamarques
  • Start date Start date
  • Views Views 2,174,476
  • Replies Replies 7,502
  • Likes Likes 27

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.
Well, that was the working output for Debian version! Can you check AP availability with 3DS now?
Or just comment all nmcli and rfkill calls in nzone and check if it is working now?

It doesn't work (the output I sent to you saying the kernel error made syslog to throw all the repeated errors of the previous log).

About commenting nmcli and rfkill calls in nzone... there's only one call to rfkill at L20. Commented and launched:
23:01:29 ~/homepass$ sudo /usr/local/sbin/nzone start BASE16
starting nzone
net.ipv4.ip_forward = 1
Configuration file: /etc/wlan0_hostap.conf
Failed to update rate sets in kernel module
Using interface wlan0 with hwaddr 4e:53:50:4f:4f:42 and ssid 'NZ@McD1'

Same error and it doesn't work at all, sorry :(
 
I have to test it a few more but here is a script with what we've been talking, duke_srg, to be able to do the homepass thing in Ubuntu:
https://github.com/serginator/homepass
Probably it will need some quick fixes, tomorrow if I have some spare time I'll re-test it again, it's a pain in the ass uninstall everything to launch the script to install everything again hehe.
Pull Requests are welcome! :)
 
I use the Sanoxy Wifi Repeater method. And that had worked fine for me after I changed the ssid to the NZ@mcd1 a few months back. But after the recent updates It stopped working. I've tried back to the attwifi with no encrytpion, and NZ@mcD1 with no encryption to no avail. Does anybody have any ideas?


This is happening to me tonight, and oddly, NZ@McD1 is connecting to the German NZone with the usual "wrong country" (I think, I don't read German) message.
 
Ok, so I'm having a very unique problem...
I never updated to the new firmware because I don't trust new updates, and seeing how the last one broke attwifi, I didn't want to take my chances with a new update breaking NZ@McD1.

So just to start off, I am still on Firmware version 9.2.0-20U.

I am using the windows 7/8 method of maintaining a homepass with the MACycle application made by Team Fail. I do not use the prime MACs - I use my own MAC list, built by myself - and me and my friend use that list to just streetpass each other as many times a day as we want. (usually around 20-50 a day).

My reasons for doing this are essentially that we just want to streetpass each other continually, with no-one else involved. The reasons are really not important though....

Now, this method was working until just a few hours ago - working flawlessly, in fact - but since around 8:23 PM USA Eastern Standard Time (EST), the relay has officially stopped working, and I can't figure out why....

Remember - I am STILL ON 9.2.0-20U ..... AND I am using NZ@McD1. Now, being the windows method, this does use encyption, but that shouldn't matter because I'm not using the firmware that recently broke that. So I ask the brilliant minds here... WTF happened? ..... I checked the firmware, and I have not auto-updated... I checked the home screen, and the Nintendo Zone appears to be available... Any ideas anyone?
 
I switched to the new .exe yesterday and homepass was working normally. Tonight I've had nzone.exe running for about two hours and haven't received a single streetpass. I've rebooted multiple times, redownloaded the .exe and run 'nzone reload'. I've double checked the contents of 'nzone.macs', as well. The program is running, schtasks is working, wifi is broadcasting as 'ConsoleNintendo3DS' and changing macs as expected, NintendoZone is working on my 3DS; everything is set up exactly as it should be but no streetpass.

Is anyone else experiencing this? I see SpidersPrey and a couple of others are experiencing a similar issue with the previous method. I hope it's just a glitch and Nintendo hasn't started blocking our BASE* lists..

*edit*
nzone is working again! Sounds like it was just a glitch on Nintendo's side :)
 
Stopped receiving Street Passes earlier today on my DD-WRT router as well. I think it was around 6-7pm Eastern.

Edit: nevermind! Back to getting passes around midnight. Strange.
 
I didn't get any tags after 4pm in my country. I think it's because of my crappy connection, but maybe there's something wrong.

And also, I'm not able to enter the eShop, and I also can't use my Web browser on the 3DS, it gives me this message:

"Error code 003-3301
This service is not available in your location. Please use another service."

I saw this message for the first time yesterday, but I was still able to get tags. But not until now. I'm kind of worried. But at least I was able to get all of the puzzle pieces and the Eon Ticket.
 
"Error code 003-3301
This service is not available in your location. Please use another service."

Just changed my DD-WRT router to no security with MAC filtering, and that message comes up when testing the connection with NZ@McD1. Trying with attwifi (no security w/ MAC filtering) successfully connects, but neither is giving Streetpasses. Hmmmm...
 
Ok. I decided to reformat my computer.
It seemed to be a good idea, because maccheck and nzone seem to be working... on the PC side.
I still can't get street passes.
I've tried deleting MS Mini virtual network, the hidden network. That one gets reinstalled. Is there a step I'm missing?
 
2All: This night streetpass data exchenge looks like week, inly 89/99 for Pokemon and 13/20 for Tekken. So something really was not good on Nintendo side. Don't change your setups rught now, it's not on your side, keep cycling.

It doesn't work (the output I sent to you saying the kernel error made syslog to throw all the repeated errors of the previous log).
About commenting nmcli and rfkill calls in nzone... there's only one call to rfkill at L20. Commented and launched:
Same error and it doesn't work at all, sorry :(
What do you mean "at all" - was mac changed? is hostapd and dnsmasq running? Because, I repeat, the same errors was on Debian but everything is worked fine. Using ap-hotspot you're launching the same hostapd/dnsmasq but you actually don't see the ouptut errors because ap-hotspot is daemonized.


I have to test it a few more but here is a script with what we've been talking, duke_srg, to be able to do the homepass thing in Ubuntu:
https://github.com/serginator/homepass
Probably it will need some quick fixes, tomorrow if I have some spare time I'll re-test it again, it's a pain in the ass uninstall everything to launch the script to install everything again hehe.
Pull Requests are welcome! :)
Please don't multiply entitiies! The first thing to try should be altering nzone with ap-hotspot start/stop instead of hostapd/kill hostapd and removing network manager start/stop and rfkill which is not used in ap-hotspot at all. Just like that:
Code:
#!/bin/sh
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
WLINT=wlan0
WLMAC=c4:85:08:1c:cf:6e
WLSSID=NZ@McD1
EXTINT=eth0
#HOSTAPDCONF=/etc/${WLINT}_hostap.conf
HOSTAPDCONF=/etc/ap-hotspot.conf
#HOSTAPDPID=/var/run/${WLINT}_hostapd.pid
HOSTAPDPID=/tmp/hotspot.pid
DNSMASQPID=/var/run/${WLINT}_dnsmasq.pid
DNSPORT=53
fuser -s $DNSPORT/tcp && DNSPORT=0
CRON="sudo crontab"
JOBS=$($CRON -l)
URL=http://nintendozone.no-ip.org?
MACS=/tmp/${0##*/}.macs
SPDELAY=480
MACNUM=0
setwl (){
#    [ -f $HOSTAPDPID ] && (kill $(cat $HOSTAPDPID); rm -f $HOSTAPDPID)
#    rfkill unblock wlan
#    service network-manager stop
    ap-hotspot stop
    sleep 5
    ifconfig $WLINT down hw ether $1 up
#    service network-manager start
    sed -ri "s/^bssid=.*/bssid=$1/;s/^ssid=.*/ssid=$2/" $HOSTAPDCONF
#    hostapd -B -P $HOSTAPDPID $HOSTAPDCONF
    ap-hotspot start
}
case "$1" in
start)
    echo starting ${0##*/}>&2
    [ -f $DNSMASQPID ] || [ -f $HOSTAPDPID ] && echo Already running && exit
    dnsmasq -i $WLINT -x $DNSMASQPID -F 192.168.23.50,192.168.23.150,255.255.255.0,12h -p $DNSPORT
    sysctl -w net.ipv4.ip_forward=1
    iptables -t nat -I POSTROUTING -o $EXTINT -j MASQUERADE
    iptables -I FORWARD -i $WLINT -j ACCEPT
    ifconfig $WLINT 192.168.23.1 up
    sed -ri "s/^bssid=.*/bssid=$WLMAC/;s/^ssid=.*/ssid=$WLSSID/" $HOSTAPDCONF
    hostapd -B -P $HOSTAPDPID $HOSTAPDCONF
    if [ -z $2 ]; then
        echo "$JOBS" | sed -r "s:#*(.*$0.*):\1:" | $CRON -
    else
        echo "$JOBS" | grep -v $0 | sed "\$a* * * * * $0 $2" | $CRON -
    fi
;;
stop)
    echo stopping ${0##*/}>&2
    setwl $WLMAC $WLSSID
    echo "$JOBS" | sed -r "s:#*(.*$0.*):#\1:" | $CRON -
    ifconfig $WLINT down
    [ -f $DNSMASQPID ] && (kill $(cat $DNSMASQPID); rm -f $DNSMASQPID)
    [ -f $HOSTAPDPID ] && (kill $(cat $HOSTAPDPID); rm -f $HOSTAPDPID)
    iptables -t nat -D POSTROUTING -o $EXTINT -j MASQUERADE
    iptables -D FORWARD -i $WLINT -j ACCEPT
;;
toggle)
    if $($0 status); then
        $0 stop
    else
        $0 start
    fi
;;
restart)
    $0 stop
    $0 start
;;
reload|force-reload)
    echo ${0##*/} MAC lists reloaded>&2
    rm -f $MACS
;;
status)
    if $(echo "$JOBS" | grep $0 | grep -qe '^#'); then
        echo ${0##*/} is not running>&2
        exit 1
    else
        echo ${0##*/} is running>&2
        exit 0
    fi
;;
*)
    [ -f $MACS ] && MACNUM=$(grep -v ^x $MACS | wc -l) && DELAY=$((($(date +%s)-$(date -r $MACS +%s))/60))
    [ $MACNUM = 0 ] && NEWMACS=$(wget -q -O - $URL$1)
    [ $(echo -n "$NEWMACS" | wc -c) != 0 ] && echo "$NEWMACS" > $MACS && MACNUM=$(cat $MACS | wc -l)
    [ $MACNUM = 0 ] && sed -ri "s/^x//" $MACS && MACNUM=$(grep -v ^x $MACS | wc -l)
    MACTOTAL=$(cat $MACS | wc -l)
    [ $MACNUM = 0 ] || ([ $MACTOTAL -lt $SPDELAY ] && [ ${DELAY:-$SPDELAY} -lt $(($SPDELAY/$MACTOTAL)) ]) && exit
    RANDOM=$(head /dev/urandom | hexdump -d | head -n 1 | sed -r "s/^([0-9]+ +0{0,4})+//")
    MAC=$(grep -v ^x $MACS | head -n $(($RANDOM%${MACNUM}+1)) | tail -n 1)
    sed -ri "s/^$MAC/x&/" $MACS
    SSID=$(echo $MAC | cut -d , -f 2 -s)
    MAC=$(echo $MAC | cut -d , -f 1)
    : ${SSID:=$WLSSID}
    setwl $MAC $SSID
;;
esac
#6

If it works, comment the sleep and check. After that several lines in ap-hotspot must be commented and checked step-by step
- all iptables manipulations, we need the same packet routing after MAC change and it is not affected with that.
- all dnsmasq manipulations, the reason is the same
- hostapd service start/stop while adding hostapd kill
After one of those steps the script may stop to work, and we should investigate the issue in that case.
 
shadowdogg try this and show me the output:
ifconfig $(nvram get wl0_ifname)
killall hostapd
ifconfig hw $(nvram get wl0_ifname) down hw ether 00:11:22:33:44:55 up
hostapd -B -P /var/run/$(nvram get wl0_ifname)_hostapd.pid /tmp/$(nvram get wl0_ifname)_hostap.conf
ifconfig $(nvram get wl0_ifname)

Telnet seemed to work fine for whatever reason. SSH it didn't. Looks a neat new script. However, why does it always have 1 or #1 after a while in the cron? on management cron on web gui?

Then:

root@3ds-relay:~# /tmp/nzone.sh BASE16,GBATEMP
-sh: /tmp/nzone.sh: not found

except

root@3ds-relay:/tmp# /tmp/nzone start
starting nzone

So then I have to reinstall it again?
 
Telnet seemed to work fine for whatever reason. SSH it didn't. Looks a neat new script. However, why does it always have 1 or #1 after a while in the cron? on management cron on web gui?
So where is the output? Does hwddr changed and AP restarted?
 
So where is the output? Does hwddr changed and AP restarted?

Sorry I forgot to say I managed to get it working but it only works for a while, I'll still output it now though.

root@3ds-relay:/tmp# ifconfig $(nvram get wl0_ifname)
ath0 Link encap:Ethernet HWaddr 34:AF:2C:EA:DF:34
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:403 errors:0 dropped:0 overruns:0 frame:0
TX packets:690 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:148836 (145.3 KiB) TX bytes:257477 (251.4 KiB)

root@3ds-relay:/tmp# killall hostapd
root@3ds-relay:/tmp# ifconfig hw $(nvram get wl0_ifname) down hw ether 00:11:22:
33:44:55 up

root@3ds-relay:/tmp# hostapd -B -P /var/run/$(nvram get wl0_ifname)_hostapd.pid
/tmp/$(nvram get wl0_ifname)_hostap.conf

root@3ds-relay:/tmp# ifconfig $(nvram get wl0_ifname)
ath0 Link encap:Ethernet HWaddr 34:AF:2C:EA:DF:34
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:403 errors:0 dropped:0 overruns:0 frame:0
TX packets:709 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:148836 (145.3 KiB) TX bytes:259007 (252.9 KiB)
 
What do you mean "at all" - was mac changed? is hostapd and dnsmasq running? Because, I repeat, the same errors was on Debian but everything is worked fine. Using ap-hotspot you're launching the same hostapd/dnsmasq but you actually don't see the ouptut errors because ap-hotspot is daemonized.


I meant it didn't worked, didn't create the hotspot.

About your code, it creates the hotspot now, I just tweaked two or three lines, this one works. I can't start commenting ap-hotspot here and there to find the difference, sorry, at least not today. The "stop" was calling setwl which calls "ap-hotspot start" again, so I added the stop too, it's dirty because it will stop, start and stop, but it works. I guess if using ap-hotspot maybe a little refactor could be nice in your script and separate the start/stop from the mac change, so you could call in the stop method just the "ap-hotspot stop" and the set of the old mac. I'll use for the moment mine, it's simple and it works, it's just a mac cycler which launches ap-hotspot so... :)

Code:
#!/bin/sh
export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
WLINT=wlan0
WLMAC=c4:85:08:1c:cf:6e
WLSSID=NZ@McD1
EXTINT=eth0
#HOSTAPDCONF=/etc/${WLINT}_hostap.conf
HOSTAPDCONF=/etc/ap-hotspot.conf
#HOSTAPDPID=/var/run/${WLINT}_hostapd.pid
HOSTAPDPID=/tmp/hotspot.pid
DNSMASQPID=/var/run/${WLINT}_dnsmasq.pid
DNSPORT=53
fuser -s $DNSPORT/tcp && DNSPORT=0
CRON="sudo crontab"
JOBS=$($CRON -l)
URL=http://nintendozone.no-ip.org?
MACS=/tmp/${0##*/}.macs
SPDELAY=480
MACNUM=0
setwl (){
#    [ -f $HOSTAPDPID ] && (kill $(cat $HOSTAPDPID); rm -f $HOSTAPDPID)
#    rfkill unblock wlan
#    service network-manager stop
    ap-hotspot stop
#    sleep 5
    ifconfig $WLINT down hw ether $1 up
#    service network-manager start
    sed -ri "s/^bssid=.*/bssid=$1/;s/^ssid=.*/ssid=$2/" $HOSTAPDCONF
#    hostapd -B -P $HOSTAPDPID $HOSTAPDCONF
    ap-hotspot start
}
case "$1" in
start)
    echo starting ${0##*/}>&2
    [ -f $DNSMASQPID ] || [ -f $HOSTAPDPID ] && echo Already running && exit
    dnsmasq -i $WLINT -x $DNSMASQPID -F 192.168.23.50,192.168.23.150,255.255.255.0,12h -p $DNSPORT
    sysctl -w net.ipv4.ip_forward=1
    iptables -t nat -I POSTROUTING -o $EXTINT -j MASQUERADE
    iptables -I FORWARD -i $WLINT -j ACCEPT
    ifconfig $WLINT 192.168.23.1 up
    sed -ri "s/^bssid=.*/bssid=$WLMAC/;s/^ssid=.*/ssid=$WLSSID/" $HOSTAPDCONF
    hostapd -B -P $HOSTAPDPID $HOSTAPDCONF
    if [ -z $2 ]; then
        echo "$JOBS" | sed -r "s:#*(.*$0.*):\1:" | $CRON -
    else
        echo "$JOBS" | grep -v $0 | sed "\$a* * * * * $0 $2" | $CRON -
    fi
;;
stop)
    echo stopping ${0##*/}>&2
    setwl $WLMAC $WLSSID
    echo "$JOBS" | sed -r "s:#*(.*$0.*):#\1:" | $CRON -
    ifconfig $WLINT down
    [ -f $DNSMASQPID ] && (kill $(cat $DNSMASQPID); rm -f $DNSMASQPID)
#    [ -f $HOSTAPDPID ] && (kill $(cat $HOSTAPDPID); rm -f $HOSTAPDPID)
    iptables -t nat -D POSTROUTING -o $EXTINT -j MASQUERADE
    iptables -D FORWARD -i $WLINT -j ACCEPT
    ap-hotspot stop
;;
toggle)
    if $($0 status); then
        $0 stop
    else
        $0 start
    fi
;;
restart)
    $0 stop
    $0 start
;;
reload|force-reload)
    echo ${0##*/} MAC lists reloaded>&2
    rm -f $MACS
;;
status)
    if $(echo "$JOBS" | grep $0 | grep -qe '^#'); then
        echo ${0##*/} is not running>&2
        exit 1
    else
        echo ${0##*/} is running>&2
        exit 0
    fi
;;
*)
    [ -f $MACS ] && MACNUM=$(grep -v ^x $MACS | wc -l) && DELAY=$((($(date +%s)-$(date -r $MACS +%s))/60))
    [ $MACNUM = 0 ] && NEWMACS=$(wget -q -O - $URL$1)
    [ $(echo -n "$NEWMACS" | wc -c) != 0 ] && echo "$NEWMACS" > $MACS && MACNUM=$(cat $MACS | wc -l)
    [ $MACNUM = 0 ] && sed -ri "s/^x//" $MACS && MACNUM=$(grep -v ^x $MACS | wc -l)
    MACTOTAL=$(cat $MACS | wc -l)
    [ $MACNUM = 0 ] || ([ $MACTOTAL -lt $SPDELAY ] && [ ${DELAY:-$SPDELAY} -lt $(($SPDELAY/$MACTOTAL)) ]) && exit
    RANDOM=$(head /dev/urandom | hexdump -d | head -n 1 | sed -r "s/^([0-9]+ +0{0,4})+//")
    MAC=$(grep -v ^x $MACS | head -n $(($RANDOM%${MACNUM}+1)) | tail -n 1)
    sed -ri "s/^$MAC/x&/" $MACS
    SSID=$(echo $MAC | cut -d , -f 2 -s)
    MAC=$(echo $MAC | cut -d , -f 1)
    : ${SSID:=$WLSSID}
    setwl $MAC $SSID
;;
esac
#6
 
TheCocoCici follow Before anything else link at the first post of the thread

Hi Duke,

Is it really necessary to use the script for Windows users when having 9.4 ? I was using until macshift (+Virtual Router) until now

Damn Nintendo with their 9.4, now only my 9.2 and 7.x can streetpass :(

(My 9.4 appears quickly on Virtual Router devices list then vanish)
 
2All: This night streetpass data exchenge looks like week, inly 89/99 for Pokemon and 13/20 for Tekken. So something really was not good on Nintendo side. Don't change your setups rught now, it's not on your side, keep cycling.
Thanks, it's working for me now! Was still getting the "not available in your area" message with SSID broadcast disabled, but after enabling SSID broadcast, Streetpasses are working again (NZ@McD1, no security w/ MAC filtering), in case this helps anyone.
 
Status
Not open for further replies.

Site & Scene News

Popular threads in this forum