Phone not found as target

I am trying to connect to my android phone over Wifi but it is not detected. Using the awesome “Target Discovery Log” in 2.0 I get some more info than from 1.0 (allthough it works in neither). The error I am getting in the log is:

[http://192.168.0.1:5000/Public_UPNP_gatedesc.xml] timed out getting XML description

If I visit the url in my browser I can see the xml-file.
I have tried all the usual stuff, restarting dmengine on the phone, restarting Defold, connecting/reconnecting to Wifi.

I am on Mac OSX 10.10.5, Samsung S6 Edge, Android 6.0.1 and using Defold 1.2.93.

EDIT: Used an old phone and it works on that, so maybe it is this bug. With the old phone I am still seeing the same error message, but the phone is found anyway.

EDIT 2: Just realised, when installing dmengine.apk on the S6 it says that the app does not require any permissions, which seems odd to me

1 Like

I think the permission system has changed in Android 6.0. I believe that apps specifically request permissions while running and need a specific feature that is guarded by a permission, for instance when you select a feature in an app where you need to select someone from contacts or select a picture from an album.

Hmm… Ok, haven’t noticed that - but shouldn’t dmengine at least then need the INTERNET permission for SSDP?

No, android.permission.INTERNET has a normal protection level and according to the documentation:

“If an app declares that it needs a normal permission, the system automatically grants the permission to the app.”

1 Like

Ok, so then that is not the problem. Could it be the Marshmallow-bug that is not entirely fixed?

Yes, that could be one reason. @jakob.pogulis, any ideas?

If I recall correctly, the “Marshmallow problem” was because since Android 6.0 it’s no longer possible to retrieve the MAC from an application. When we failed to retrieve the MAC we bailed from the SSDP function, @Johan_Beck-Noren fixed this. There could of course be some corner case we didn’t account for, but I’m more inclined to believe that this is something else.

Yes, it could be something network related. @Johan, would you mind trying the same thing when you’re on another wifi network, perhaps at a friends house, a café or maybe if you drop by us here at King and say hi?

I will try another network - allthough with my old phone it works on the wifi where it is not working on the S6

Hmm, yeah, that is weird though… @Johan_Beck-Noren, do you have any ideas?

Nothing obvious comes to mind… From the symptoms it sure sounds like the issue with SSDP and android 6+ we saw before and fixed in 1.2.90, but it could of course be caused by something else entirely. I can try and have a look and see if anything comes up.