SoftAP test fails

Hi All,

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 but I can’t telnet to

Other people have made this work, I must be missing something.
Can anybody give me a clue?


var SoftAPSetup = require('softap-setup');
var sap = new SoftAPSetup({protocol:'http'});
console.log("Networks Found:");
sap.scan(function (err, dat) {
    if (err) {
    else {

Here’s my output…

"C:\Program Files (x86)\JetBrains\WebStorm 11.0.3\bin\runnerw.exe" "C:\Program Files (x86)\nodejs\node.exe" test-softap.js
Networks Identified:
{ [Error: connect ECONNREFUSED]
  errno: 'ECONNREFUSED',
  syscall: 'connect',
  address: '',
  port: 80 }
Process finished with exit code 0

Is this all your code?

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

Yep, that’s all my code :-). I just wanted to write a simple test that connected to the Photon.

But I’m not really sure if this code SHOULD work. That’s my question…

Have you joined your computer to the photon’s WiFi network?

Yes I have.

What version of system firmware are you using on the photon?

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.

Ugh, I should have thought of that :-). Thanks…

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 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

you’re certain your PC’s wifi is connected to the photon’s softAP network? Is the photon connected to any other hardware?