+1 vote
by (370 points)
edited by

Hi,

We are trying to use the Neo 3 Pro System Interfaces (Unity XR SDK) and we are having some trouble with the callbacks.

We followed the documentation to initialize and bind the System Service and wish to use the ControlSetAutoConnectWIFI interface, but we're seeing two problems:

1) The service bind callback will sometimes run, and other times it won't (when it doesn't, we don't see the "Bind sucess" message on the logs):

system bind callback

2) The ControlSetAutoConnectWIFI callback that should indicate success or failure never runs, what are we doing wrong here?

connect wifi callback

Thank you for any help you can provide.

1 Answer

0 votes
by (55.5k points)
selected by
 
Best answer

Dear developer,

Could you please send your demo project to our email address? Please also write down your PUI version and the Unity version you use and named by the title of this question. We will check it.

pico_devanswers@bytedance.com

by (370 points)

We've created a small test project were the problem still occurs and sent it to the given email address. I'll update the post when we get an answer.

by (55.5k points)

We have checked our mailbox but couldn't find your email. Would you mind sending it again? Our email address: pico_devanswers@bytedance.com

by (370 points)

Just re-sent, this time from a gmail email address to increase the odds of you receiving it. Thank you for your help.

by (370 points)

Can you please confirm that you've got the email?

by (55.5k points)

Hi,

Sorry for the late response. We tested your demo on our device.

For the first issue, sorry to say that we didn't successfully reproduce it. We see the "Bind sucess" message on the logs in every test (fifteen times). However, maybe you could set the Execution Order to avoid this issue:
enter image description here

For the second issue, you need to add the following function that ensure correct invocation of callbacks:

private void BoolCallback(string value)
{
    if (PXR_Plugin.System.BoolCallback != null) PXR_Plugin.System.BoolCallback(bool.Parse(value));
    PXR_Plugin.System.BoolCallback = null;
}
private void IntCallback(string value)
{
    if (PXR_Plugin.System.IntCallback != null) PXR_Plugin.System.IntCallback(int.Parse(value));
    PXR_Plugin.System.IntCallback = null;
}
private void LongCallback(string value)
{
    if (PXR_Plugin.System.LongCallback != null) PXR_Plugin.System.LongCallback(int.Parse(value));
    PXR_Plugin.System.LongCallback = null;
}
private void StringCallback(string value)
{
    if (PXR_Plugin.System.StringCallback != null) PXR_Plugin.System.StringCallback(value);
    PXR_Plugin.System.StringCallback = null;
}

Especially the BoolCallback according to your needs.

However, according to our tests, the callback can be called normally when the wifi connection is successful. But sorry to say that when the wifi connection fails (for example , the wrong password) , the callback is not called successfully. We have reported this issue to our R&D team. And we will categorize this issue as a "Issue Tracker" and will keep tracking it. Sorry for the inconvenience.

by (370 points)

Thank you for your help! We'll try to hack some other way of figuring out if the internet connection failed, and will keep following the issue tracker.

by (39.2k points)

Dear developer,
The SDK version currently online supports getting networking feedback results, which you can try using Pico Unity Integration SDK V2.0.5.

...