LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Mobile
User Name
Password
Linux - Mobile This forum is for the discussion of all topics relating to Mobile Linux. This includes Android, Tizen, Firefox OS, Sailfish OS, Maemo, MeeGo, Ubuntu Mobile, WebOS, Open Mobile Alliance and other similar projects and products.
A reminder that LQ now has a dedicated Android sister site: AndroidQuestions.org

Notices



Reply
 
Search this Thread
Old 08-30-2009, 03:14 PM   #1
joel.bourquard
LQ Newbie
 
Registered: Aug 2009
Posts: 7

Rep: Reputation: 0
Unhappy Please help, I need to sync a HTC Hero with my Linux laptop...


Hi,

I need to sync (at least) the contacts between Evolution (on Gentoo) and my HTC Hero.

Currently I've created a temporary "Google" address book in Evolution and copy-paste stuff manually from my real address book to it. This is only one-way, from Evolution to phone, and doesn't preserve all fields. It really sucks.

For this reason, I think I *need* native sync. I already used "msynctool" with a Nokia N82 that supported SyncML. Now afaik I can't use SyncML with HTC Hero, so I installed "synce" which is now registered as an opensync plugin:

~ $ msynctool --listplugins
Available plugins:
python-sample
synce-opensync-plugin
google-calendar
evo2-sync
syncml-http-server
syncml-http-client
syncml-obex-client
file-sync

~/.opensync/group2 $ msynctool --showgroup htchero-evolution
Group: htchero-evolution
Member 1: evo2-sync
(...doesn't matter...)

Member 2: synce-opensync-plugin
No Configuration found: Plugin is not configured

~/.opensync/group2 $ msynctool --configure htchero-evolution 2
This plugin has no options and does not need to be configured


Well this is nice, but now I need to get synce to work.

I would prefer to do everything through Wi-Fi but I think I need to configure the pairing through USB first - is this correct ?

First I enabled the relevant (I hope) kernel options, and did:

modprobe usbnet rndis-host usbserial ipaq ppp_async
/etc/init.d/iptables stop
sync-engine

Then I plug the HTC Hero and... nothing. In dmesg I see the phone registers as a storage device, but nothing else. The sync-engine daemon says nothing when I plug the USB cable.

Also I tried running "synce-matchmaker" but it needs an established connection to continue.

After spending a few hours running in circles and up/downgrading udev and hal, I tried this:

* cat /proc/bus/usb/devices > /tmp/before
* (plug the device)
* cat /proc/bus/usb/devices > /tmp/after

In the HTC "normal mode" which should allow "mass storage" and "sync", here is the diff:

--- /tmp/before 2009-08-30 16:42:02.000000000 +0200
+++ /tmp/after 2009-08-30 16:42:18.000000000 +0200
@@ -31,3 +31,14 @@
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms
+
+T: Bus=01 Lev=01 Prnt=01 Port=06 Cnt=01 Dev#= 19 Spd=480 MxCh= 0
+D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
+P: Vendor=0bb4 ProdID=0c01 Rev= 1.00
+S: Manufacturer=HTC
+S: Product=Android Phone
+S: SerialNumber=HT989L903341
+C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr=256mA
+I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
+E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

=> It really seems the HTC hero shows no other services beside "mass storage" device ?

Here's what dmesg says:
Aug 30 22:00:57 killdozer usb 1-6: new high speed USB device using ehci_hcd and address 7
Aug 30 22:00:57 killdozer usb 1-6: configuration #1 chosen from 1 choice
Aug 30 22:00:57 killdozer scsi5 : SCSI emulation for USB Mass Storage devices
Aug 30 22:00:57 killdozer usb-storage: device found at 7
Aug 30 22:00:57 killdozer usb-storage: waiting for device to settle before scanning
Aug 30 22:01:02 killdozer scsi 5:0:0:0: Direct-Access HTC Android Phone 0100 PQ: 0 ANSI: 2
Aug 30 22:01:02 killdozer sd 5:0:0:0: Attached scsi generic sg2 type 0
Aug 30 22:01:02 killdozer usb-storage: device scan complete
Aug 30 22:01:02 killdozer sd 5:0:0:0: [sdb] Attached SCSI removable disk


OK, so Linux didn't see any functionality except for the mass storage part. So now, I try to enable the "wireless connection sharing" mode (see article: Using the HTC Hero as a USB modem) and then I get:

--- /tmp/before 2009-08-30 17:06:08.000000000 +0200
+++ /tmp/after 2009-08-30 17:06:37.000000000 +0200
@@ -31,3 +31,16 @@
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms
+
+T: Bus=01 Lev=01 Prnt=01 Port=06 Cnt=01 Dev#= 24 Spd=480 MxCh= 0
+D: Ver= 2.00 Cls=02(comm.) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
+P: Vendor=0bb4 ProdID=0ffe Rev= 1.00
+S: Manufacturer=HTC
+S: Product=Android Phone
+S: SerialNumber=HT989L903341
+C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=256mA
+I:* If#= 0 Alt= 0 #EPs= 1 Cls=02(comm.) Sub=02 Prot=ff Driver=rndis_host
+E: Ad=84(I) Atr=03(Int.) MxPS= 64 Ivl=32ms
+I:* If#= 1 Alt= 0 #EPs= 2 Cls=0a(data ) Sub=00 Prot=00 Driver=rndis_host
+E: Ad=04(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E: Ad=85(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

=> The Hero displayed a message saying that "mass storage" and "sync" are both disabled in this mode. I see the block device doesn't appear anymore (as expected), but now we get two RNDIS services ?? Why two services, and why no RNDIS in the other (ie: the "storage + sync") mode ? I mean, RNDIS is used by the ActiveSync protocol, right ?

And dmesg says:

Aug 30 22:05:23 killdozer usb 1-7: new high speed USB device using ehci_hcd and address 16
Aug 30 22:05:23 killdozer usb 1-7: configuration #1 chosen from 1 choice
Aug 30 22:05:23 killdozer scsi9 : SCSI emulation for USB Mass Storage devices
Aug 30 22:05:23 killdozer usb-storage: device found at 16
Aug 30 22:05:23 killdozer usb-storage: waiting for device to settle before scanning
Aug 30 22:05:23 killdozer usb 1-7: USB disconnect, address 16
Aug 30 22:05:24 killdozer usb 1-7: new high speed USB device using ehci_hcd and address 17
Aug 30 22:05:24 killdozer usb 1-7: configuration #1 chosen from 1 choice
Aug 30 22:05:24 killdozer usb0: register 'rndis_host' at usb-0000:00:13.2-7, RNDIS device, fe:c7:0b:e1:06:84


PS:
- I have kernel 2.6.30-gentoo-r5, kernel config attached.
- the USB vendor/device ID for my HTC Hero: 0bb4:0c01

Please advise, as I really don't know what to do !

Thanks in advance
Attached Files
File Type: txt linux-config.txt (65.1 KB, 2 views)

Last edited by joel.bourquard; 08-30-2009 at 04:31 PM.
 
Old 08-31-2009, 03:42 PM   #2
joel.bourquard
LQ Newbie
 
Registered: Aug 2009
Posts: 7

Original Poster
Rep: Reputation: 0
Here's something new: I just read the PDF manual which states that I need to enable the "USB Debug" feature on the phone in order to sync.

With this enabled, I get a new endpoint on the device:

--- /tmp/before 2009-08-31 21:34:06.000000000 +0200
+++ /tmp/after 2009-08-31 21:34:49.000000000 +0200
@@ -31,3 +31,17 @@
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms
+
+T: Bus=01 Lev=01 Prnt=01 Port=05 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
+D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
+P: Vendor=0bb4 ProdID=0c02 Rev= 1.00
+S: Manufacturer=HTC
+S: Product=Android Phone
+S: SerialNumber=HT989L903341
+C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=256mA
+I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
+E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=(none)
+E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms


It's a bit better. Then I did:

modprobe ipaq vendor=0x0bb4 product=0x0c02

And now I have:

--- /tmp/before 2009-08-31 21:34:06.000000000 +0200
+++ /tmp/after 2009-08-31 22:02:07.000000000 +0200
@@ -31,3 +31,17 @@
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms
+
+T: Bus=01 Lev=01 Prnt=01 Port=05 Cnt=01 Dev#= 2 Spd=480 MxCh= 0
+D: Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
+P: Vendor=0bb4 ProdID=0c02 Rev= 1.00
+S: Manufacturer=HTC
+S: Product=Android Phone
+S: SerialNumber=HT989L903341
+C:* #Ifs= 2 Cfg#= 1 Atr=80 MxPwr=256mA
+I:* If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
+E: Ad=01(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=42 Prot=01 Driver=ipaq
+E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=0ms
+E: Ad=82(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms

At last ! So I got back to trying sync-engine:

~ $ sync-engine -vDEBUG
SynCE sync-engine starting up
2009-08-31 22:04:15,593 DEBUG syncengine : running main loop
2009-08-31 22:04:15,598 DEBUG syncengine : creating SyncEngine object
2009-08-31 22:04:15,606 INFO engine.syncengine.kernel : __init__: connected device found
2009-08-31 22:04:15,609 DEBUG syncengine : installing signal handlers

Connected device found. Cool !

But I can't get further:

~ $ synce-matchmaker status
** Message: Device /org/freedesktop/Hal/devices/usb_device_bb4_c02_HT989L903341_if1_serial_usb_0 not fully set in Hal, skipping
** Message: Odccm is not running, ignoring
[synce_info_from_file:91] unable to open file: /home/joel/.synce/active_connection
[rapi_context_connect:444] Failed to get connection info
[main:115] Failed to initialize RAPI

What should I do now ?

Last edited by joel.bourquard; 08-31-2009 at 04:08 PM.
 
Old 10-03-2009, 11:59 PM   #3
zalzadore
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Rep: Reputation: 0
Hey Joel,
Sorry to see that no one has posted a reply. I have just bought a Hero myself and am also interested in Syncing functionality with Linux.

Did you get any further with this?

Thanks,
Adam
 
Old 10-07-2009, 04:27 PM   #4
joel.bourquard
LQ Newbie
 
Registered: Aug 2009
Posts: 7

Original Poster
Rep: Reputation: 0
Hi zalzadore,

No, unfortunately I didn't get any further using HTC Sync. After talking to a few Android developers, I'm now convinced that the HTC Sync app on the Hero is really useless for syncing with Linux.

Now, I'm looking at syncing Evolution (on Linux) with my gmail contacts, which are (obviously) constantly in sync with the Hero.

With opensync I could (in theory) sync Evolution with GMail, using the new syncml interface provided by gmail.

But so far, I'm doing a crude one-way sync from Evolution to my device, by creating a Google address book in Evolution, and copy-pasting all my contacts from the main address book into it.

Hopefully we will come up with a great method. But this isn't it yet.

Have you found other ways ?
 
Old 10-08-2009, 12:21 AM   #5
zalzadore
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Rep: Reputation: 0
Joel,
Sounds complicated. I decided to go the Google address book route. Still haven't got it working 100% but its good enough for the moment anyway. Seems to want to make 5 entries for some contacts, LOL. Good luck with it.
 
Old 11-02-2009, 12:19 PM   #6
stoggy
Member
 
Registered: Jun 2008
Location: Dallas, TX
Distribution: Slackware and FC
Posts: 107

Rep: Reputation: 20
I dont know if this helps but ... I have never had a cell phone but seeing these android devices, I guess i'm interested now. Let us know how it goes please.


thunderbird can with sync contacts with gmail with : https://addons.mozilla.org/en-US/thunderbird/addon/6095

i guess they work both ways, I can create contacts in tbird or gmail and they end up in the others contact list. delete and so forth.

I dont think tbird works better then evolution but i like its looks better.
 
Old 01-03-2010, 09:27 AM   #7
turfreijer
LQ Newbie
 
Registered: Aug 2005
Posts: 2

Rep: Reputation: 0
dissapointing

It's really dissapointing that HTC makes a phone with Android and there is no app for syncing with Linux.......
I can't understand it also.
 
Old 01-12-2010, 06:33 AM   #8
yurique
LQ Newbie
 
Registered: Jan 2010
Distribution: openSUSE/Arch
Posts: 1

Rep: Reputation: 0
Quote:
Originally Posted by zalzadore View Post
Joel,
Sounds complicated. I decided to go the Google address book route. Still haven't got it working 100% but its good enough for the moment anyway. Seems to want to make 5 entries for some contacts, LOL. Good luck with it.
You can go to Contacts/Groups - Menu/Synchronize groups and deselect "All contacts" group there. Now only "My contacts" and other groups you select will be synced.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Set up laptop as network gateway for HTC Hero kenneho Linux - Networking 3 08-29-2009 12:58 PM
to sync files from network to linux laptop Henry_1 Linux - General 2 06-12-2006 07:46 PM


All times are GMT -5. The time now is 07:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration