Releases: particle-iot/softap-setup-js
v4.1.0
v4.0.2
- #17 change license from LGPL to Apache 2.0
- #13 default timeout increase from 2s to 8s for TCP
- #13 TCP response can be spread over multiple packets
- #24 Configuration defaults move into SoftAP class so they are available for TCP and HTTP
- #18 Device ID change to lowercase
- #23 deviceInfo request was failing with timeout
SoftAP Setup v3.0 — Browsers!
Browsers, Browsers, Browsers!
This release includes a major refactor by @brewnerd which enables the easy browserification of the library via browserify. His generous contribution also includes an example of browser-based usage. Excerpt below:
Browserify
Install browserify:
npm install -g browserify
From the softap-setup-js code directory, run:
browserify softap.js -s SoftAPSetup -o softap-browser.js
Example:
<!doctype html>
<html lang="en">
<head></head>
<body>
<script src="softap-browser.js"></script>
<script>
var sap = new SoftAPSetup();
sap.deviceInfo(callback);
function callback(err, dat) {
if (err) { throw err; }
console.log("Device ID: %s, claimed: %s", dat.id, dat.claimed ? "yes" : "no");
};
</script>
</body>
</html>
If you find this release useful, don't hesitate to thank @brewnerd for the awesome work! 🎉
CORS Bugfix
Thanks to a contribution by @indraastra, POST requests are now sent without an OPTIONS 'preflight' request.
SoftAP Setup v2.0
tl;dr — HTTP-based SoftAPSetup! Browsers!
Version 2.0 of the SoftAP Setup JS library enables the use of HTTP as the protocol for the SoftAPSetup client, unlocking the potential for browser-based setup of Particle devices. The README has been updated to show an example of how to utilize HTTP as the protocol for your SoftAPSetup client.
HTTP support for SoftAP Setup is only available on device firmware version 0.4.2 or later.
Please take this into consideration and ensure that your device firmware is up-to-date, or use TCP if HTTP is not necessary. This release is in preparation for an upcoming firmware release which will include the necessary changes to enable fully browser-based wireless setup of Particle devices. There is currently a known bug in version 0.4.4 of the device firmware when using HTTP to issue the 'configure-ap' command. The Photon will blink red and reset without sending a response to the request, but will still connect with the AP credentials you provide. This will be fixed in an upcoming release, and your devices will auto-update to a firmware version that fully supports HTTP setup.