December 8, 2016
This was originally posted on my medium but has been backported into this blog.
Here in Japan, every phone provider gives you access to their WiFi Hotspots when you sign up. They are great! They cover areas where your LTE might get a bit wonky and make sure you’re not eating all of your data right away.
Sadly though if you’ve ever been to Tokyo, the free WiFi spots that are available here (be it in Starbucks or other cafes) are… just not very good. Most of them are powered by Wi2 and while not necessarily bad, I never saw this many disconnects with any other provider. You constantly have to re-connect to the hotspot because all of a sudden everything stops working. Most of the time when you’re in the middle of something very important like browsing cat pictures or finishing that last 1% of a download.
Wi2 also offers a dirt-cheap WiFi plan that costs 400 yen ($4) a month and has pretty good coverage given what you pay for it. It’s my go-to recommendation when someone asks me which service to use, though it suffers from the same problems mentioned above.
Alternatives are the docomo tourist WiFi or some other services that charge you per hour, but why do I have to pay more when I already pay for my phone contract which includes SoftBank WiFi?
Just connecting to SoftBank WiFi on my Mac is giving me a error message. Who would have expected that.
“Aha!” he thought, “they are just filtering by User Agent!”. Open is the developer menu in Safari and the User Agent switched to SoftBank and sure enough, the message changed! Now telling me to go to “sbwifi.jp”. Though when trying to navigate it…
When connecting with my phone to the same WiFi hotspot, it immediately authenticated me without asking for any details. So maybe it’s using the Mac address?
I authenticated on the WiFi hotspot, copied the Mac address to my Mac, spoofed it and disconnected my phone at roughly the same moment as my Mac starts connecting.
sudo ifconfig eth0 hw ether 00:01:02:03:04:05
This little trick usually gets most of the WiFi hotspots that are mobile only restricted. The phone disconnects and the Mac re-connects with the same hardware identifier the phone used. The WiFi spot thinks the phone just re-connected and all is good.
But on this one… it didn’t work. Hrrmm!
Something else is needed and I’m not ready yet to give up!
So, a naive filtering to show the login page happens based on User-Agent. My phone is directly authenticated. So it’s probably some sort of certificate for authentication.
There is an iOS app which does authentication for you, but it only works from iOS 9 up. There must be another way.
On my phone, I manually navigated to sbwifi.jp, clicked the blue button and yup, I receive a SMS with a link I should click on.
Clicking the link and, sure enough, it downloads a certificate file to install on my iPhone!
All I have to do is get this certificate on my Mac and I should be good. I copied the link to my Mac and…! Nothing. The link only works out of the SoftBank network and not through WiFi. Dang it.
What we got so far:
So how do I get the profile on my Mac? The iPhone doesn’t let me download and share it through email and my Mac can’t download it. Just doesn’t work.
Luckily though, nowadays we can just enter the SoftBank network on our Mac! How? Through our phone of course!
To enable tethering on SoftBank iPhones you have to ‘purchase’ the tethering option through my.softbank.jp. Currently though that’s free for 2 years, so just enable it, wait a little bit and the “Personal Hotspot” option pops up in the settings.
Creating a hotspot… connecting to it… and….
Let’s try it again. UA switched to ‘iPhone’, navigating to sbwifi.jp, clicking the button and… yup there it is, the SMS to the profile. Copied to the Mac, clicked on it
Luckily macOS is compatible with iPhone configuration profiles out of the box so we can go ahead and natively install it without any issues.
Now all we have to do is disconnect from our iPhone, make sure the iPhone doesn’t automatically connect to SoftBank Wifi at the same time, connect to 0001softbank and tada! We have blazing fast internet :)
If you have any comments or feedback for me, please feel free to reach out over on Twitter @dvcrn