I know there are many posting relating to SoftApSetup JS but I am wondering my approach is wrong hosting softapsetup-js on my server. Here is exactly what I have:
- npm install softapsetup-js
- put device on listening mode (blinking blue)
- run this code to get device info:
module.exports = function device_info(){
var SoftAPSetup = require(‘softap-setup’);
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”);
};
}
I get TCP socket timed out error. I am running the web server on localhost:3000. I tried changing the port 80 to 3000 in the index.js file in softapsetup-js node module but no success. Can someone point out to me what I am doing wrong?