I'm a newbie that's trying to get a basic test to work. I recently bought a Photon and I have it running in setup mode (blinking blue). I've switched my wifi connection to the Photon (I'm using Windows 7). I'm using the softap-setup node module and running the code below in node. Below my code is the output, basically the SoftAPSetup library can't connect. When my wifi connection is connected to the Photon I can ping 192.168.0.1 but I can't telnet to 192.168.0.1:80.
Other people have made this work, I must be missing something.
Can anybody give me a clue?
Thanks....
var SoftAPSetup = require('softap-setup');
var sap = new SoftAPSetup({protocol:'http'});
console.log("Networks Found:");
sap.scan(function (err, dat) {
if (err) {
console.log(err);
}
else {
console.log(dat);
}
});
if i’m not wrong you have to obtain your photons public key (at least prior to it beeing configured) - i’m not sure if that counts for the scan function too
I’ve using Putty to connect to COM4. The only commands it responds to are ‘w’ (wifi setup), ‘s’, ‘i’, and ‘f’ (flash I guess).
It doesn’t respond to ‘v’.
Could you tell the version from the output of the ‘s’ command?
You may well have a version of firmware that doesn’t have HTTP support, such as 0.4.0 the factory default firmware. I suggest upgrading your system firmware using the cli.
OK, I have updated my Photon firmware to the latest version. Now when I put the Photon into listening mode, connect with Putty, and type ‘v’ I get “system firmware version: 0.4.9”. So that’s good.
And now I can at least telnet to port 192.168.0.1:80 when the Photon is in listening mode.
However, the code in my original post still does not work, though the results are somewhat different.
Here’s what I get now.
Anybody got any suggestions?
"C:\Program Files (x86)\JetBrains\WebStorm 11.0.3\bin\runnerw.exe" "C:\Program Files (x86)\nodejs\node.exe" test-softap.js
Networks Found:
[Error: HTTP timed out]
{ [Error: socket hang up] code: 'ECONNRESET' }
Process finished with exit code 0