all I get is, "saving to device" and it just stays on that screen forever.
I took a look at the OakSoftAP code. It shouldn't be staying on that screen forever...it should either proceed or give you an error, so I suspect there's a bug in SoftAP code. If you open the Javascript console in your browser (hit F12), does it happen to log any errors while it's "saving to device"?
A few other thoughts:
- What Wifi security mode are you using, e.g WEP, WPA, WPA2? (if it's something unusual, the Oak might possibly have a problem with it)
- How many characters are in your passcode? (if it's more than 63 characters, that might be problematic too)
If your ssid and passcode actually have been saved to the device, then you can manually force the next step. First, make sure you're connected to the ACORN_nnnnnn wifi network, then in a web browser, go to the url:
http://192.168.0.1/connect-apThis is what OakSoftAP is supposed to do, and the Oak is supposed to respond by rebooting and connecting to the new wifi network. Does your wifi router provide a list of connected devices? If so, that's a good way to confirm whether or not the Oak sucessfully connected.
If this doesn't work, you can manually set the ssid and passcode, but it's quite involved because the Oak expects the passcode to be encrypted. Here's what to do:
(I'm assuming you're running Windows. If not, let me know.)
1. Download and install
Git for Windows version 2 or later if you don't have it already, then open a Git Bash Shell and type the commands below (We don't actually use git itself, but it provides all the tools needed in one easy to install package).
2. Connect to the ACORN_nnnnnn wifi network
3. Get your Oak's public key by running the following commands (the public key is needed to encrypt the wifi passcode):
mkdir ~/OakDebugging
cd ~/OakDebugging
curl -s http://192.168.0.1/public-key | sed 's/^.*"b":"\([^"]*\)".*$/\1/' | xxd -r -p - > oak_pubkey.der
4. Encrypt your wifi passcode with the following command:
echo -n "YourPasscodeHere" | openssl rsautl -pubin -keyform DER -inkey oak_pubkey.der -encrypt -pkcs | xxd -p - | tr -d '\n'
This will print out a string of hexadecimal digits something like this:
a3f0a0d1819647fdc792ad74955af52115a89f387b2b9af06331a7f0402cf9d7d6dea4a608a1f5ee05bab62cb0261c283d875fd2852cfcad67b30f66ca1424f2d15adba60c701a6ebe47a49c2a584dc36f2e334e98a4bc5bafa0302903330835e50c553f4633b82e3e0a7fab7e7b19b0f4df4a5fc77043e6f5262aa30d0a3c02
(FYI, every time you run this command, the hexadecimal digits will be different - this is a normal consequence of the encryption process)
5. Copy and paste into the url below your wifi ssid (in place of YourSSID) and the string of hexadecimal digits (in place of the ones above). Then copy and paste the completed url into your web browser.
http://192.168.0.1/configure-ap?plain={"ssid":"YourSSID","pwd":"a3f0a0d1819647fdc792ad74955af52115a89f387b2b9af06331a7f0402cf9d7d6dea4a608a1f5ee05bab62cb0261c283d875fd2852cfcad67b30f66ca1424f2d15adba60c701a6ebe47a49c2a584dc36f2e334e98a4bc5bafa0302903330835e50c553f4633b82e3e0a7fab7e7b19b0f4df4a5fc77043e6f5262aa30d0a3c02","sec":1}
This sets the SSID and passcode on your Oak. If it's successful, you should see {"r":0} in your browser. If there's an error, it should be {"r":-1}.
6. Finally, click this url to tell your Oak to reboot and try to connect to the new wifi network:
http://192.168.0.1/connect-ap(Note that this process only sets the wifi ssid and passcode. It will not work for the first setup of a new Oak as OakSoftAP does other things such as initiate a firmware update and negotiate a claim with the Particle Cloud.)