Hello,
I am running into a problem with the new script.
It sometimes loops for ever, though there is a real location in the answer:
"longitude":xxxxxxxxxxxxxxx,"latitude":xxxxxxxxxxxxxxx,
but it continues the loop
...
Parsing 1 devices...
Waiting for location...
updateDevices...
…
(See enclosed debug code below.)
I think this is due to the loops condition
while($this->devices[$device_num]->locationFinished != 1)
which will loop because the answer is
though there is a real location mentioned in the answer (which seems to come from wifi positioning).
Any ideas how to solve this problem?
Has this something to do with the positionType Wifi?
Has this something to do with impossible GPS positioning due to location inside a building and using WiFi positioning as alternative?
Many thanks & bye
Raven
Ps:
a) Would be very neat to also be able to use your class to get attributes like:
- "positionType":"Wifi" (What's the other? GPS?)
- "preferredLanguage"
- "tzCurrentName"
- "validRegion":true (What would be an invalid region? ;-))
b) In the new version you are using the "deviceUDID" zero'ed. Shouldn't we try to use our own id? How do we get our id? Any ideas?
--cut here debug code--
Getting partition...
URL: https://fmipmobile.me.com/fmipservice/device/MobileMeUserID/initClient
POST DATA: {"clientContext":{"appName":"FindMyiPhone","appVersion":"1.1","buildVersion":"99","deviceUDID":"0000000000000000000000000000000000000000","inactiveTime”:xxxxxxxxxxx,"osVersion":"4.2.1","personID":0,"productType":"iPad1,1"}}
updateDevices...
URL: https://p01-fmipmobile.me.com/fmipservice/device/MobileMeUserID/initClient
POST DATA: {"clientContext":{"appName":"FindMyiPhone","appVersion":"1.1","buildVersion":"99","deviceUDID":"0000000000000000000000000000000000000000","inactiveTime”:xxxxxxxxxxx,"osVersion":"4.2.1","personID":0,"productType":"iPad1,1"}}
updateDevices Returned: {"statusCode":"200","content":[{"isLocating":true,"b":yyyyyy,"remoteWipe":null,"location":{"timeStamp":xxxxxxxx,"positionType":"Wifi","horizontalAccuracy":100.0,"locationFinished":false,"longitude":xxxxxx,"latitude":xxxxxx,"isOld":false},"a":"Charging","deviceModel":"FourthGen","deviceStatus":"203","remoteLock":null,"msg":null,"locationEnabled":true,"id":" xxxxxxxxxxxxxxx","thisDevice":false,"deviceDisplayName":"iPhone 4","name":"iPhone","deviceClass":"iPhone","features":{"MSG":true,"CWP":false,"REM":false,"LCK":true,"SND":true,"KEY":false,"LOC":true,"WIP":true}}],"userPreferences":{"lastUpdatedTime":xxxxxxxxxxxxxxx,"webPrefs":{"id":"web_prefs","selectedDeviceId":"Xxxxxxxxxxxxxxx"},"builder":null},"serverContext":{"prefsUpdateTime":xxxxxxxxxxxxxxx,"maxDeviceLoadTime":60000,"authToken":"Xxxxxxxxxxxxxxx","classicUser":false,"sessionLifespan":900000,"deviceLoadStatus":"200","preferredLanguage":"xx-xx","lastSessionExtensionTime":null,"clientId":"Xxxxxxxxxxxxxxx","timezone":{"tzCurrentName":"Xxxxxx","previousTransition":xxxxxx,"previousOffset":xxxxxx,"currentOffset":xxxxxx,"tzName":"Xxxxxx"},"callbackIntervalInMS":10000,"validRegion":true,"maxLocatingTime":90000,"hasDevices":true,"prsId":xxxxxxxxxxxxxxx}}
Parsing 1 devices...
Waiting for location...
updateDevices...
URL: https://p01-fmipmobile.me.com/fmipservice/device/MobileMeUserID/initClient
POST DATA: {"clientContext":{"appName":"FindMyiPhone","appVersion":"1.1","buildVersion":"99","deviceUDID":"0000000000000000000000000000000000000000","inactiveTime”:xxxxxxxxxxx,"osVersion":"4.2.1","personID":0,"productType":"iPad1,1"}}
updateDevices Returned: {"statusCode":"200","content":[{"isLocating":true,"b":yyyyyy,"remoteWipe":null,"location":{"timeStamp":xxxxxx,"positionType":"Wifi","horizontalAccuracy":100.0,"locationFinished":false,"longitude":xxxxxxxxxxxxxxx,"latitude":xxxxxxxxxxxxxxx,"isOld":false},"a":"Charging","deviceModel":"FourthGen","deviceStatus":"203","remoteLock":null,"msg":null,"locationEnabled":true,"id":"Xxxxxxxxxxxxxxx","thisDevice":false,"deviceDisplayName":"iPhone 4","name":"iPhone","deviceClass":"iPhone","features":{"MSG":true,"CWP":false,"REM":false,"LCK":true,"SND":true,"KEY":false,"LOC":true,"WIP":true}}],"userPreferences":{"lastUpdatedTime":xxxxxxxxxxxxxxx,"webPrefs":{"id":"web_prefs","selectedDeviceId":"Xxxxxxxxxxxxxxx"},"builder":null},"serverContext":{"prefsUpdateTime":xxxxxxxxxxxxxxx,"maxDeviceLoadTime":60000,"authToken":"Xxxxxxxxxxxxxxx","classicUser":false,"sessionLifespan":900000,"deviceLoadStatus":"200","preferredLanguage":"xx-xx","lastSessionExtensionTime":null,"clientId":"Xxxxxxxxxxxxxxx","timezone":{"tzCurrentName":"Xxxxxx","previousTransition":xxxxxx,"previousOffset":xxxxxx,"currentOffset":xxxxxx,"tzName":"Xxxxxx"},"callbackIntervalInMS":10000,"validRegion":true,"maxLocatingTime":90000,"hasDevices":true,"prsId":xxxxxxxxxxxxxxx}}
Parsing 1 devices...
Waiting for location...
updateDevices...
URL: https://p01-fmipmobile.me.com/fmipservice/device/MobileMeUserID/initClient
POST DATA: {"clientContext":{"appName":"FindMyiPhone","appVersion":"1.1","buildVersion":"99","deviceUDID":"0000000000000000000000000000000000000000","inactiveTime”:xxxxxxxxxxx,"osVersion":"4.2.1","personID":0,"productType":"iPad1,1"}}
updateDevices Returned: {"statusCode":"200","content":[{"isLocating":true,"b":yyyyyy,"remoteWipe":null,"location":{"timeStamp":xxxxxx,"positionType":"Wifi","horizontalAccuracy":100.0,"locationFinished":false,"longitude":xxxxxxxxxxxxxxx,"latitude":xxxxxxxxxxxxxxx,"isOld":false},"a":"Charging","deviceModel":"FourthGen","deviceStatus":"203","remoteLock":null,"msg":null,"locationEnabled":true,"id":"Xxxxxxxxxxxxxxx","thisDevice":false,"deviceDisplayName":"iPhone 4","name":"iPhone","deviceClass":"iPhone","features":{"MSG":true,"CWP":false,"REM":false,"LCK":true,"SND":true,"KEY":false,"LOC":true,"WIP":true}}],"userPreferences":{"lastUpdatedTime":xxxxxxxxxxxxxxx,"webPrefs":{"id":"web_prefs","selectedDeviceId":"Xxxxxxxxxxxxxxx"},"builder":null},"serverContext":{"prefsUpdateTime":xxxxxxxxxxxxxxx,"maxDeviceLoadTime":60000,"authToken":"Xxxxxxxxxx","classicUser":false,"sessionLifespan":900000,"deviceLoadStatus":"200","preferredLanguage":"xx-xx","lastSessionExtensionTime":null,"clientId":"Xxxxxxxxxx","timezone":{"tzCurrentName":"Xxxxxx","previousTransition":xxxxxx,"previousOffset":xxxxxx,"currentOffset":xxxxxx,"tzName":"Xxxxxx"},"callbackIntervalInMS":10000,"validRegion":true,"maxLocatingTime":90000,"hasDevices":true,"prsId":xxxxxxxxxxxxxxx}}
Parsing 1 devices...
Waiting for location...
updateDevices...
URL: https://p01-fmipmobile.me.com/fmipservice/device/MobileMeUserID/initClient