Quite a while ago I backed the Kickstarter campaign for the Black Swift and did receive it. However I didn’t really do anything with it, and by the time I received it it was already renamed to Unwired One. I played with it once in January 2017 and back then had huge problems getting the WiFi to work. Turns out factory default the internal IP it uses for LAN is 192.168.1.1 which is the same as most routers your home network is configured with. Fast forward to November 2017 when I had an idea for a project (which I’m describing here) and I again totally forgot about this bug. So I’ll be documenting it here for prosperity as the original Unwired One forums are offline :(

Preparation

Fixing the WiFi

First join the built-in WiFi Unwired One this is an unprotected access point. Then grab a Terminal and SSH in, username root password admin.

We have to change the lan interface to not be on 192.168.1.1 but something else.

$ ssh root@192.168.0.254
$ vi /etc/config/network # or nano, whichever you prefer

Make the following changes:

Original:

config interface 'lan'
        option ifname 'eth1'
        option force_link '1'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1' # change this line!
        option netmask '255.255.255.0'

New:

config interface 'lan'
        option ifname 'eth1'
        option force_link '1'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.5.1'
        option netmask '255.255.255.0'

Save the file, and do /etc/init.d/network restart or simply a reboot.

Upgrading the Firmware

When the device comes back online, let’s do an upgrade of the firmware, as mine was still running the BARRIER BREAKER (Barrier Breaker, r47068) 2015-10-15 13:09:30 release. The latest one you can find here: openwrt-ar71xx-generic-unwone-squashfs-sysupgrade.bin. The manual says you can do a wget directly on the device, this however didn’t work for me so I just copied to the file via SCP to the device, be sure to do this to the /tmp dir as that’s the memory mounted device tmpfs drive.

$ scp openwrt-ar71xx-generic-unwone-squashfs-sysupgrade.bin 192.168.0.254:/tmp
$ ssh 192.168.0.254
$ sysupgrade -v /tmp/openwrt-ar71xx-generic-unwone-squashfs-sysupgrade.bin # add the -n flag to reset to factory defaults

After this it will reboot and come back online with CHAOS CALMER (Chaos Calmer, r49404) 2016-08-16 00:18:25.

Joining the WiFi

Now we can simply follow the Instructions from the Manual but to rehash I’ll give the gist here.

  • Go to 192.168.0.254 with a browser
  • In the menu bar hover Network and then click Wifi
  • Hit the Scan button
  • Find your network, click Join Network
  • Fillout your password, and assign the lan firewall zone.
  • Hit save, wait for the next page to load and click Save and Apply
  • Wait for it to come back up joining your WiFi, at this point you’ll be kicked off the Unwired One network.

Now login to your router to see which new DHCP lease was given off to the device, or use a Bonjour Browser to find it.

SSH Refused

If you’re locked out of your Unwired One by SSH but can access the WebUI, the UI solution might work too. It’s written below.

I had the case I got locked out of the SSH but not the WebUI, on inspecting the logs I saw the following:

authpriv.warn dropbear[3222]: Failed loading /etc/dropbear/dropbear_ecdsa_host_key
authpriv.warn dropbear[3222]: Failed listening on '22': Error listening: Address already in use
authpriv.info dropbear[3222]: Early exit: No listening ports available.

Which led me to believe the Dropbear configuration was broken, so I went over to the System -> Administration interface and added a second SSH port (in my case I used 222) on an unspecified network.

On further inspection I noticed that sshd was running:

root@UnwiredOne:~# netstat -anp
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:2222            0.0.0.0:*               LISTEN      3934/dropbear
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      2532/sshd

After doing a /etc/init.d/sshd stop and an /etc/init.d/dropbear restart I was suddenly able to login again to my Unwired One.

My current /etc/config/dropbear now looks like this.

config dropbear
        option PasswordAuth 'on'
        option Port '22'

config dropbear
        option PasswordAuth 'on'
        option Port '2222'

Disabling SSHD from the UI

  • System -> Startup
  • Click Enable for sshd
  • Click Stop for sshd
  • Click Restart for Dropbear