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
-
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.
-
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â);
};
- 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