Particle photon as an Access Point and web browser as a client!

I found we can set Particle photon as an Soft AP, but i did not find any method how should we proceed this. Other threads related to this are really confusing. I found something Wifi.accessPoint(), but this method is not in firmware. Please tell me how to do it.

Have you given the docs a shot?
https://docs.particle.io/reference/firmware/photon/#softap-http-pages

1 Like
  1. I tried hitting http://192.168.0.1/index.html from my laptop browser which is connected to photon in SoftAP mode But no response is received.

  2. Another thing is that how js scripts like following will be executed :-

var SoftAPSetup = require(‘softap-setup’);
var sap = new SoftAPSetup({ protocol: ‘http’ });

sap.deviceInfo(callback);
function callback(err, dat) {
if (err) { throw err; }
console.log(“Device ID: %s, claimed: %s”, dat.id, dat.claimed ? “yes” : “no”);
};

  1. Is there any get and post implementation OR ad-hoc connection example between photon and any other devicce ?

Hi,

I have made my particle photon as an SoftAP using SoftAPHTTP pages tutorials. I can hit photon ip 192.168.0.1 from my laptop browser which is connected to particle photon in ad-hoc mode. Is it possible to run loop on particle photon in listening mode ? How can we send data from laptop or any other device to particle photon when partilce photon is a SoftAP/server and vice versa. Please share example if anyone has. It will be very helpful.

You might be able to run the loop() with SYSTEM_THREAD(ENABLED) but no guarantee that it’ll work reliably.
The real thing should come with v0.6.0

We are planning for UDP broadcasting in ad-hoc mode. Is it possible with current scenario ?

Can particle photon support TCP and UDP communication when particle photon is acting as an Soft AP ?

I am also interested in this. Wondering if it’s possible to connect to the Photon-XXXX network and then communicate with it using TCP or HTTP commands to interact with running application firmware?

Yes, that’s the way how the SoftAP setup page does work to provide WiFi credentials, but you need to consider that you are in Listening Mode at that time, so you have some restrictions - for instance you have no cloud or internet connectivity at that time. And the Photon is also limited how many clients can be serviced concurrently.

But 0.6.0 should bring the SoftAP capabilities out of the confined realm of Listening Mode into the standard application frame.

Is this feature released yet?

Nope, the app level SoftAP got pushed to 0.8.0 AFAIK