abhay123lp / tunesremote-plus

Automatically exported from code.google.com/p/tunesremote-plus
0 stars 0 forks source link

Multiple TunesRemote+ pairing with the same iTunes overwrite each other's records #85

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Q. What Android hardware device do you own?  (HTC Hero, Samsung Galaxy,
etc)

A: Samsung Galaxy S II

Q. On what Android operating system version? (2.1, 2.2, Honeycomb 3.0.1
etc)

A: 2.3.7

Q. What DACP server, OS, and version? (OSX iTunes 10.1.2, Windows 7
MonkeyTunes 1.5.1 etc)

A: iTunes 10.5.2

Q. What TunesRemote+ version? (found on Menu->More->About)

A: 2.4.2

Please provide any additional information below.

To reproduce, use two devices running TunesRemote+. I managed to reproduce this 
also with emulator + one Galaxy S II.

1. Pair device #1 with iTunes - everything works normally.
2. Close TunesRemote+, re-open it - check that everything works normally.
3. Pair device #2 with same iTunes
4. Device #1 will lose connection (if not, close + kill it and re-open; it will 
ask to re-pair).

If you re-pair device #1, device #2 will lose the pairing and so on.

Not familiar enough with the protocol to know why this happens, but had a quick 
go at:
1. Change the 'pair id' from 0000000000000001 to something unique - no go.
2. Change the device/remote name to something unique (both in RemN and 
PAIRING_RAW) - also no go.

Original issue reported on code.google.com by oefr...@gmail.com on 24 Dec 2011 at 7:54

GoogleCodeExporter commented 8 years ago
Hmmm.  Yeah the remote name definitely does not matter it is just text.

How about in PairingActivity.java this line...

      pairservice = ServiceInfo.create(LibraryActivity.REMOTE_TYPE, "0000000000000000000000000000000000000006", PairingServer.PORT, 0, 0, values);

The hard coded "000000000000000000000000000000006" was from Jeff Sharkey's 
original code and I have not touched it.

Original comment by mellowaredev on 25 Dec 2011 at 5:04

GoogleCodeExporter commented 8 years ago
Hi,

Changing the string "000...06" to another (like "000...07") improved this issue.
I do not know the meaning of this string, but it seems that it should be 
different for every device.

Thanks.

Original comment by kya...@gmail.com on 2 Jun 2012 at 2:56

GoogleCodeExporter commented 8 years ago
I wonder if we should randomize it?   I think it has always been that string 
since I inherited this project.   My guess is it needs to be unique every time? 
 Can you try that and see if it causes any other issues?

Let me know or send me a patch and I will fix it.

Original comment by mellowaredev on 2 Jun 2012 at 3:22

GoogleCodeExporter commented 8 years ago
OK what I tried to do was using this stack overflow post get a 40 digit unique 
ID for each device.  this is essentially what the iPhone is doing to identify a 
device uniquely.

http://stackoverflow.com/questions/2785485/is-there-a-unique-android-device-id

Can you try the BETA I posted here?

http://code.google.com/p/tunesremote-plus/downloads/list

Original comment by mellowaredev on 4 Jun 2012 at 12:12

GoogleCodeExporter commented 8 years ago
Was anyone able to test this fix?

Original comment by mellowaredev on 8 Jun 2012 at 2:19

GoogleCodeExporter commented 8 years ago
2.5.0 Released to Android Market

Original comment by mellowaredev on 4 Jul 2012 at 2:35