Skip to content

Device setup: Phone - device Wi-Fi connection failure. #96

@IgnacioBasallote

Description

@IgnacioBasallote

Hi,

I have an issue in the "Choose your XX device" screen during the device setup. When I select the device network to connect my phone into it, the app pops up the progress dialog, but it will never leave this screen. I have been going through your code to see what is causing this problem and finally, I figured out that the phone is connecting/disconnecting until the variable discoverProcessAttempts reaches "MAX_NUM_DISCOVER_PROCESS_ATTEMPTS". Then, the phone gets blocked on this screen.

This effect is caused by the phone itself. In this case, the phone detects that the device network does not have an internet connection and then, the phone decides to connect to any other registered existing network that really does. If one explicitly disables all the registered existing Wi-Fi networks, this problem vanishes.

So, having a look in your code from the version (io.particle:devicesetup:0.6.3), I found that you are using the WifiConfiguration class and the priority field, which is set to 999999 giving maximum priority to device's network (ApConnector.java). However, I have seen that this field is deprecated (https://developer.android.com/reference/android/net/wifi/WifiConfiguration.html#priority).

Could the problem be here perhaps? Maybe the phone does not really prioritize the device's network after all and that's why it is connecting/disconnecting all the time.

This issue happens on a Xiaomi Mi 9T.

I am looking forward to your response.

Thanks in advance!
Nacho

Metadata

Metadata

Assignees

No one assigned

    Labels

    DeviceSetupLibIssues specific to the Device Setup Librarybug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions