Photon SoftAP mode - mobile cannot obtain address

@mdma (@MORA), I will post to you an unpopulated PCB to enable you to reproduce the fault.

All you need to do to reproduce the issue is sit the Photon on the board (have covered the pads with sticky tape so as to allow you to do this without shorting the module).

I have the Particle address as

             320 Alabama Street # 2
             San Francisco, CA 94110
             United States

Let me know if this is not the case.

I think there will be numbers of people who will appreciate this issue being resolved!

Best wishes - @umd

Or is the address

  1400 Tennessee St., #4
  San Francisco, CA 94107

??

@MORA, note the two addresses I guessed at are wrong! @mdma can let you know what it is.

We have developed a PCB (different to the original one mentioned at the start of this ticket) that we solder the Photon module to.

Have come up to the same problem as first outlined in this ticket which is that mobile devices (HTC ONE and iPad) cannot connect to the Photon in SoftAP mode.

The mobile WiFi connection process displays the following:

Connecting...
Saved
Connecting...
Avoided poor internet connection

The IP address was "unavailable"

On an iPad, WiFi connection displays:

"Security Recommendation"
"No Internet Connection"

The IP Address allocated was 169.254.193.5, in other words it did not obtain an address from the Photon otherwise it would have been on the 192.168.0 subnet.

Am hoping that this is something that can be fixed in firmware....

That’s also an issue raised earlier here
iOS 10 rejects a Photon in setup
iOS 10 and SoftAP

And I haven’t heard anything regarding solutions so far.

@ScruffR, I can report that a Photon module with headers sitting on a prototyping bread board works fine with SoftAP (Android mobile and iPad) , whereas soldered to my PCB doesn’t.

So there seems to be some subtle ** hardware issue **, most likely the radio because signal strength is excellent, but DHCP is not working when sitting or soldered to PCB.

Am going to enable the new logger functionality so that we may trace the system messages within setup() and compare a good outcome with a bad. Back soon!

@UMD, could you try with a uFL antanna? (not as solution but as test scenario)

@ScruffR, don’t have one unfortunately for WiFi.

Tried the antenna that came with the Electron (Hexa Band Cellular), but no improvement.

No joy with the logging - looks the same (except for timings - bad Photon is quicker....).

Here is the log from the Photon with the issue:

0000003667 [hal.wlan] INFO: Using internal antenna
0000003869 [system] INFO: Network Connect: SPARK_CLOUD_CONNECT && !network.connected()
0000003869 [system] INFO: ready(): 0; connecting(): 0; listening(): 0; WLAN_SMART_CONFIG_START: 0
0000003869 [system] INFO: ARM_WLAN_WD 1
0000005413 [system] INFO: ARM_WLAN_WD 2
0000005413 [hal.wlan] INFO: Bringing WiFi interface up with DHCP
0000005437 [system] INFO: CLR_WLAN_WD 1, DHCP success
0000005439 [system] INFO: Cloud: connecting
0000005826 [system] INFO: Resolved host device.spark.io to 52.91.48.237
0000006078 [system] INFO: connected to cloud 52.91.48.237:5683
0000006080 [system] INFO: Cloud socket connected
0000007320 [comm] INFO: Hanshake: completed
0000007333 [system] INFO: Cloud connected
0000009035 [system] INFO: ready(): 1; connecting(): 0; listening(): 0; WLAN_SMART_CONFIG_START: 0

And here is the log from the okay Photon:

0000003673 [hal.wlan] INFO: Using internal antenna
0000003675 [system] INFO: Network Connect: SPARK_CLOUD_CONNECT && !network.connected()
0000003676 [system] INFO: ready(): 0; connecting(): 0; listening(): 0; WLAN_SMART_CONFIG_START: 0
0000003676 [system] INFO: ARM_WLAN_WD 1
0000011802 [system] INFO: ARM_WLAN_WD 2
0000011802 [hal.wlan] INFO: Bringing WiFi interface up with DHCP
0000011826 [system] INFO: CLR_WLAN_WD 1, DHCP success
0000011828 [system] INFO: Cloud: connecting
0000011839 [system] INFO: Resolved host device.spark.io to 54.173.1.44
0000012094 [system] INFO: connected to cloud 54.173.1.44:5683
0000012094 [system] INFO: Cloud socket connected
0000013350 [comm] INFO: Hanshake: completed
0000013362 [system] INFO: Cloud connected
0000015065 [system] INFO: ready(): 1; connecting(): 0; listening(): 0; WLAN_SMART_CONFIG_START: 0

@UMD, @ScruffR, We had identical issue with surface mounted Photon. You need to remove ground loops on the board which somehow interact with the wifi module making the DHCP not working. I will post our board design for inspiration.

1 Like

@dfarny, spooky ground loops.... See the picture with this post above:

What I am hoping for is some sort of software work around to this issue. Everything else work fine, including WiFi comms.

@ScruffR, finally got a proper patch antenna (Adafruit 2.4GHz Mini Flex) to perform the experiment as you suggested some weeks ago.

Have first repeated the experiment with the “bad” Photon (ie Photon on PCB) without the patch antenna - it did not serve an address (as expected).

With the patch antenna, an address was served and I could connect using a HTC One.

Do you think this is fixable via firmware?

I doubt that’s fixable via firmware, but @BDub might know better.
I’ve got a Photon that just doesn’t like connecting - it always takes ages no matter what FW or system. I’ve even swapped chip antennas between two devices, but the stubbord device was just as stubborn and the good one just as good.
No clue what’s wrong with the one :confused:

@ScruffR, am thinking that it could be fixable because other than the SoftAP issue, it connects a.ok to WiFi and communicates with the cloud.

I sent a PCB to @mdma so that he can reproduce the fault back in April 2016.

I also noticed this issue with a surface mount photon and custom pcb

The problem is random. Sometimes it work well, sometime less. But it always work with my laptop.

Sometimes I’m not able to connect with my android phone, and if I try with an iphone, it works.

Wifi always work well and connect easily to the cloud.

Try setting antenna selection to AUTO.

STARTUP(WiFi.selectAntenna(ANT_AUTO)); // continually switches at high speed between antennas

The problems started popping up after particle changed the default to ANT_INTERNAL, so in some cases changing back to AUTO allows your board to be used.

And since you can set a static IP and allow the softAP process to complete, while the board runs perfectly for months on end, its obviously something than can be fixed or improved in software, but not much interest from particle in the matter.

I shipped a board to norway as requested so they had a sample of a board which showed the problems, but never heard back :confused:

2 Likes

Would love an update to this issue, we have installed 100s of the older photons (with 4 random letters in the softAP instead of 6) no problem. Now we have just made 200 more, exactly the same circuit, but now getting “couldn’t get IP address” issues!!! Please help, this is really bad for us.
Clearly an update to firmware caused this, specifically changing the startup antenna to internal.

Context?
Where does that message from?
What version were you using before, which now?

@Dan.s, are you using an external or internal antenna? If internal, try an external one and report back (of course setting WiFi.selectAntenna() appropriately).

I have not touched SoftAP since way back then, now much preferring to use USB serial configuration.

Message appears similar to the exact way everyone else has experienced in this thread - that’s why I’m responding to this one instead of creating a new thread!
The previous working version was 0.6.3 where the softAP had 4 random letters in it after “Photon-”, whilst the new version has 6 letters. I don’t have one of the new ones in front of me so cannot say specifically which version it comes with, I think it was v0.8.0 which first introduced this.

@UMD yes we use an external antenna on all our units, and our firmware has the appropriate startup command to select it. However our firmware only gets installed once it is connected online! It is fine once this happens.
The factory installed firmware really ought to allow both onboard and external antenna by default. What was wrong with leaving it as STARTUP(WiFi.selectAntenna(ANT_AUTO)) ?
USB serial configuration is a no-go as it is a customer facing product.