P2 new board can't setup WiFi

Received 2 off new board prototype using P2 (made from a reel of 600) - initial setup using website on chrome setup.particle.io (OS 5.8.0) appeared to be working fine and then neither P2 would connect to WiFi. Initial scan presented correctly but would not connect. A re-scan then found no available APs. Retries same result. The only way to get available APs is to view is to repeat setup. Is this a device OS issue (with 5.8.X) or have I got a full reel of duds?

Hi @armor just to confirm, these are custom boards you're trying to configure with the P2 module? If so, that adds a lot of additional variables into the mix.

Have you validated the design? Do you have any log output?

@ericpietrowicz Correct custom board - the P2 connections and power supply follow the P2 first board schematic / reference design. I understand that there are a lot of variables. The board has been designed by a professional electronic design engineering firm.

I am assessing whether there are any known issues with OS 5.8.0 or potentially with the P2 module - these were acquired a while ago but the moisture indicators were good when the bag was opened. It is weird that both devices will not connect to WiFi - which means the setup can't complete. I haven't tried flashing a custom/test firmware yet - not sure that is possible if not setup?

Do you have a Photon 2 development board available that you can test your network with?

Does your custom design have a USB port or debugging pins broken out so you can view startup logs and attempt to program test firmware locally?

@armor, working with @friedl_1977 on a P2 design, we found out the hard way that the P2 won't always reset correctly on power up. So much so that Particle added a reset chip to the Photon2 design. Something like this:

https://www.mouser.co.za/datasheet/2/115/DIOD_S_A0003132693_1-2512618.pdf

In all cases where a power-up resulted in a "hung" P2, hitting the reset button always got it back to "normal" operation.

3 Likes

I have many Photon2 development boards and they all setup fine - the whole P2 board design has been prototyped using Photon2 and an own made first P2 board design from @rickkas7.

@peekay123 This is very useful but I am unclear whether this explains why 2 boards have experienced a failure to connect to the WiFi. As mentioned I have built a first P2 board and have not seen the issue you mentioned.

It does appear that the P2 is very sensitive to power supply. The original design we used a Linear Voltage regulator to go from 5V / backup LiPo battery voltage to 3V3 and we saw brownouts on startup and WiFi connection so swap to the switching regulator used in the first P2 board.

I am very disappointed that Particle have been unwilling to open the power supply design as used on the Photon2 - which clearly would help all of us trying to develop products using the P2.

@rickkas7 Could you help on this please?

I flashed a very simple sketch to the board using Device OS 5.8.2.
The loop just waits 1000mS and then does a Log.info("Hello world");
Uses SYSTEM_THREAD(ENABLED) and SYSTEM_MODE(AUTOMATIC).

This is the output after a reset that stops once the error is logged.

0000004423 [app] INFO: Hello, World!
0000005432 [app] INFO: Hello, World!
0000006440 [app] INFO: Hello, World!
0000007449 [app] INFO: Hello, World!
0000008458 [app] INFO: Hello, World!
0000009467 [app] INFO: Hello, World!
0000010476 [app] INFO: Hello, World!
0000011485 [app] INFO: Hello, World!
0000012493 [app] INFO: Hello, World!
0000013034 [hal] INFO: WiFi off
0000013042 [system.listen.ble] ERROR: Failed to restore user configuration.

It's not clear what's happening. That's a non-fatal error when exiting provisioning mode, and it's only a log and shouldn't affect the operation of loop.

The original problem looks power-related to me. Connecting to Wi-Fi is the highest current usage during normal operation. It's unclear why repeating setup solved the problem, however. Perhaps a brownout when writing the flash? In any case, this is all just random guessing.

@rickkas7 Many thanks - I have got a few things to work on. Any other diagnostics you could recommend running?

I have found that my board will operate if powered from a LiPo battery. By also connecting the microUSB I was able to setup and load wifi credentials. However, at this point the LED is continuously flashing green. To get the device to connect I had to remove the USB from my computer and press the reset button. The device then connected to wifi and the cloud. I will look at the schematic and see if I can see why this might be. Thanks for your help to all who have replied.

Problem understood - the P2 has a massive in rush current when starting the WiFi or BLE - need to add a lot more capacitors before and after the 3V3 voltage regulator and a supervisor IC on the reset. Please tell me if the data sheet for the P2 mentions this?

1 Like