![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
Hello, Unregistered You are browsing a READ only archive of the main support categories pre 4/21/2008. You will not be able to post or reply any threads in this section.
Ubuntu 9.10 is out!!!
When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu. The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely. |
|
General Help All your general support questions for Ubuntu, Kubuntu, Edubuntu and Xubuntu. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
A Carafe of Ubuntu
![]() Join Date: Jun 2005
Beans: 101
|
How to Connect to a WM5/WM6 Device with USB and sync with Evolution or Kontact
For Feisty Users:
* After upgrading to Feisty my rndis no longer works when I connect my device I get ipaq instead of rndis so I used this guide to compile the latest kernel (2.6.22) Remember to patch your kernel: Code:
cd /usr/src/linux wget http://synce.svn.sourceforge.net/svnroot/synce/trunk/patches/linux-2.6.22-rndis_host-wm5.patch patch -p1 < linux-2.6.22-rndis_host-wm5.patch Code:
wget http://www.kernel.org/pub/linux/kernel/v2.6/patch-2.6.22.1.bz2 bzcat patch-2.6.22-1.bz2 |patch -p1 You would get a window will lots of options about the kernel, remember to select your processor type etc for better performance. If you have nvidia card: Under "Processor type and features" turn "Paravirtualization Support" OFF http://www.synce.org/index.php/Conne...-rndis-lite%29 - Reminds us to enable these options: CONFIG_USB_USBNET=y CONFIG_USB_NET_CDCETHER=y CONFIG_USB_NET_RNDIS_HOST=y Search for "ipaq" and disable it, its for older pocket pc like WM 2002, 2003... Follow the instruction on this guide to finish compiling the kernel and install... Reboot and reinstalled nvidia or ati drivers using a program called envy (works for both nvidia and ati cards). ... Hope it works for you too... Follow the rest of the guide... The purpose of this guide is to allow newer WM5 devices like HTC Wizard, Prophet to connect to Ubuntu Edgy 6.10 and be able to share files, install stuff. This guide will take about one hour to complete, depending on your skills etc. First, let's install synce-trayicon. It won't work yet, but when we're done, it will give you a tray icon like this: When you connect your device, you should see this: Code:
wget http://kuci.org/~teddy/ubuntu/synce-software-manager_0.9.0-2_i386.deb wget http://kuci.org/~teddy/ubuntu/synce-trayicon_0.9.0-2_i386.deb sudo dpkg -i synce-software-manager_0.9.0-2_i386.deb sudo dpkg -i synce-trayicon_0.9.0-2_i386.deb sudo ln -si /usr/lib/libgtop-2.0.so.7 /usr/lib/libgtop-2.0.so.2 Code:
synce-trayicon unplug your device and run this command: Code:
ls /dev > /tmp/before Code:
ls /dev > /tmp/after diff /tmp/before /tmp/after http://ubuntuforums.org/showthread.php?t=136257 Otherwise Code:
sudo lshw -businfo | grep usb I have a Prophet and before connecting my device it gives me: Code:
usb@1 usb1 bus UHCI Host Controller usb@2 usb2 bus UHCI Host Controller usb@2:2 bus Logitech BT Mini-Receiver usb@2:2.2 input Logitech BT Mini-Receiver usb@2:2.3 input Logitech BT Mini-Receiver usb@3 usb3 bus UHCI Host Controller usb@4 usb4 bus EHCI Host Controller Code:
usb@1 usb1 bus UHCI Host Controller usb@1:2 generic Generic RNDIS usb@2 usb2 bus UHCI Host Controller usb@2:2 bus Logitech BT Mini-Receiver usb@2:2.2 input Logitech BT Mini-Receiver usb@2:2.3 input Logitech BT Mini-Receiver usb@3 usb3 bus UHCI Host Controller usb@4 usb4 bus EHCI Host Controller Code:
sudo apt-get install libglib2.0-dev libusb-dev build-essential autoconf automake1.9 libtool libgnet-dev libhal-dev libhal-storage-dev libdbus-glib-1-dev subversion linux-headers-`uname -r` python-dbus Code:
cd svn checkout https://synce.svn.sourceforge.net/svnroot/synce/trunk/libsynce svn checkout https://synce.svn.sourceforge.net/svnroot/synce/trunk/librapi2 svn checkout https://synce.svn.sourceforge.net/svnroot/synce/trunk/odccm svn checkout https://synce.svn.sourceforge.net/svnroot/synce/trunk/synce-gnome Code:
cd libsynce/ ./bootstrap ./configure --enable-desktop-integration make sudo make install cd .. Code:
apt-cache search packagename Code:
apt-cache search packagename | grep packagename Code:
sudo apt-get install packagename Next: Code:
echo "/usr/local/lib" | sudo tee -a /etc/ld.so.conf sudo ldconfig cd librapi2/ ./bootstrap ./configure make sudo make install cd .. Code:
cd odccm/ autoreconf -i ./configure make sudo make install sudo cp data/dbus/odccm.conf /etc/dbus-1/system.d/ cd .. http://www.synce.org/index.php/Windows_Mobile_2005_HCL I have a Prophet (Dopod 818 Pro) usb-rndis should work, but usb-rndis-lite is the newer driver and that's what I will be using: Code:
svn co https://svn.sourceforge.net/svnroot/synce/trunk/usb-rndis-lite cd usb-rndis-lite/ make sudo ./clean.sh sudo make install cd .. Code:
sudo apt-get install libhal-dev libhal-storage-dev svn co https://svn.sourceforge.net/svnroot/synce/trunk/usb-rndis-ng cd usb-rndis-ng/ ./autogen.sh ./configure --enable-hal make sudo make install cd .. If it all works out, unplug and plug in your device, then do this: Code:
sudo dhclient3 rndis0 DHCPREQUEST on rndis0 to 255.255.255.255 port 67 DHCPACK from 169.254.2.1 bound to 169.254.2.2 -- renewal in 1267550 seconds. I got an ip, great! now test out odccm by entering this: Code:
sudo odccm -f then enter: Code:
pls If it doesn't work, or you have firestarter installed, do this: Code:
sudo chmod u+w /etc/firestarter/user-pre gksudo gedit /etc/firestarter/user-pre Code:
$IPT -A INPUT -i rndis0 -j ACCEPT $IPT -A OUTPUT -o rndis0 -j ACCEPT Code:
sudo chmod u-w /etc/firestarter/user-pre http://www.synce.org/index.php/SynCE_Tools So we have a connection, but we still need to make this useful, we need to install synce-gnome, which displays a bubble when your device is connected and disconnected, and you can also execute commands etc... Code:
svn co https://synce.svn.sourceforge.net/svnroot/synce/trunk/oleavr-files/synce-gnome cd synce-gnome/src python test.py We want enable browsing via nautilus, so we need to do this: Code:
sudo apt-get install librapi2 librapi2-dev librapi2-tools librra0 librra0-dev librra0-tools libsynce0 libsynce0-dev synce-dccm synce-serial libgnomevfs2-dev gcc-3.3 Code:
cd /usr/lib sudo ln -s libsynce.so.0.0.0 libsynce.so sudo ln -s librapi.so.2.0.0 librapi.so Code:
cd ~ export CC=/usr/bin/gcc-3.3 svn co https://svn.sourceforge.net/svnroot/synce/trunk/gnomevfs cd gnomevfs/ ./bootstrap ./configure make sudo make install Code:
ls /usr/bin/gcc-* export CC=/usr/bin/gcc-4.1 sudo gedit /etc/gnome-vfs-2.0/modules/default-modules.conf Code:
synce: libsyncevfs Code:
synce:/// Code:
gksudo gedit /etc/init.d/odccm Code:
#! /bin/sh
# /etc/init.d/odccm
#
# Script d'initiation du daemon odccm
# http://www.synce.org
PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/local/sbin
test -x /usr/local/sbin/odccm || exit 0
. /lib/lsb/init-functions
case "$1" in
start)
log_daemon_msg "Starting odccm service"
if start-stop-daemon --start --exec /usr/local/sbin/odccm ; then
log_end_msg 1
exit 1
fi
log_end_msg 0
;;
stop)
log_daemon_msg "Stopping odccm service"
start-stop-daemon --stop --exec /usr/local/sbin/odccm ;
log_end_msg 0
;;
restart)
$0 stop
sleep 2
$0 start
;;
*)
log_action_msg "Usage: /etc/init.d/odccm {start|stop|restart}"
exit 1
;;
esac
exit 0
Code:
sudo chmod +x /etc/init.d/odccmsudo update-rc.d odccm defaults Next we copy that synce-gnome to: Code:
cd sudo cp synce-gnome /usr/src/ sudo chown -R root.root /usr/src/synce-gnome Code:
python /usr/share/synce-gnome/src/test.py Code:
gksudo gedit /usr/share/synce-gnome/src/test.py Code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import dbus
import dbus.glib
import gtk
import os
class TestApp:
def __init__(self):
self.devices = {}
bus = dbus.SystemBus()
self.bus = bus
proxy_obj = bus.get_object("org.synce.odccm", "/org/synce/odccm/DeviceManager")
mgr = dbus.Interface(proxy_obj, "org.synce.odccm.DeviceManager")
mgr.connect_to_signal("DeviceConnected", self.device_connected_cb)
mgr.connect_to_signal("DeviceDisconnected", self.device_disconnected_cb)
session_bus = dbus.SessionBus()
notif_obj = session_bus.get_object("org.freedesktop.Notifications", "/org/freedesktop/Notifications")
self.notify_iface = dbus.Interface(notif_obj, "org.freedesktop.Notifications")
for obj_path in mgr.GetConnectedDevices():
self._add_device(obj_path, False)
def device_connected_cb(self, obj_path):
self._add_device(obj_path, True)
def device_disconnected_cb(self, obj_path):
if obj_path in self.devices:
device = self.devices[obj_path]
self.notify_iface.Notify("SynCE", 0, "", "PDA disconnected", "'%s' just disconnected." % device.name, [], {}, 3000)
del self.devices[obj_path]
p = os.popen('killall synce-trayicon')
def _add_device(self, obj_path, just_connected):
device = CeDevice(self.bus, obj_path)
self.devices[obj_path] = device
if just_connected:
p = os.popen('killall synce-trayicon')
self.notify_iface.Notify("SynCE", 0, "", "PDA connected", "A %s %s '%s' just connected." % \
(device.model_name, device.platform_name, device.name), [], {}, 3000)
ODCCM_DEVICE_PASSWORD_FLAG_SET = 1
ODCCM_DEVICE_PASSWORD_FLAG_PROVIDE = 2
class CeDevice:
def __init__(self, bus, obj_path):
self.obj_path = obj_path
dev_obj = bus.get_object("org.synce.odccm", obj_path)
dev = dbus.Interface(dev_obj, "org.synce.odccm.Device")
self.name = dev.GetName()
self.platform_name = dev.GetPlatformName()
self.model_name = dev.GetModelName()
self.dev_iface = dev
dev.connect_to_signal("PasswordFlagsChanged", self.password_flags_changed_cb)
self._print_debug()
self._password_flags_changed()
def _print_debug(self):
dev = self.dev_iface
print "Created CeDevice with obj_path=\"%s\"" % self.obj_path
print " GetIpAddress:", dev.GetIpAddress()
print " GetGuid:", dev.GetGuid()
print " GetOsVersion:", dev.GetOsVersion()
print " GetName:", dev.GetName()
print " GetVersion:", dev.GetVersion()
print " GetCpuType:", dev.GetCpuType()
print " GetCurrentPartnerId:", dev.GetCurrentPartnerId()
print " GetId:", dev.GetId()
print " GetPlatformName:", dev.GetPlatformName()
print " GetModelName:", dev.GetModelName()
print " GetPasswordFlags:", dev.GetPasswordFlags()
def password_flags_changed_cb(self, added, removed):
print "password_flags_changed_cb: added=0x%08x removed=0x%08x" % (added, removed)
self._password_flags_changed()
def _password_flags_changed(self):
flags = self.dev_iface.GetPasswordFlags()
if flags & ODCCM_DEVICE_PASSWORD_FLAG_PROVIDE:
authenticated = False
while not authenticated:
dlg = EntryDialog(None, "Password required",
"The PDA '%s' is password-protected. Enter password:" % self.name,
True)
if dlg.run() == gtk.RESPONSE_ACCEPT:
authenticated = self.dev_iface.ProvidePassword(dlg.get_text())
dlg.destroy()
class EntryDialog(gtk.Dialog):
def __init__(self, parent, title, text, password=False):
gtk.Dialog.__init__(self, title, parent,
gtk.DIALOG_MODAL | gtk.DIALOG_DESTROY_WITH_PARENT,
(gtk.STOCK_OK, gtk.RESPONSE_ACCEPT,
gtk.STOCK_CANCEL, gtk.RESPONSE_REJECT))
label = gtk.Label(text)
label.set_alignment(0.0, 0.5)
self.vbox.pack_start(label, False)
self._label = label
entry = gtk.Entry()
entry.set_visibility(not password)
self.vbox.pack_start(entry, False, True, 5)
self._entry = entry
self.show_all()
def get_text(self):
return self._entry.get_text()
TestApp()
gtk.main()
Note: - You need to plug and unplug your device after you login for the tray icon to light up Now to sync with Evolution or Kontact, there is 3 options: 1. Use the SyncEngine - http://www.synce.org/index.php/SyncEngine 2. sync with Scheduleworld and Evolution using the syncevolution engine. 3. sync with a local Funambol server installed locally no internet connection required. No matter which option you pick, there is going to be some work envolved 1. Please follow the guide: http://www.synce.org/index.php/SyncEngine to get SynEngine going... 2. If you have wifi or a unlimited gprs connection, Scheduleworld is a free service and might be a good way to go, since you can sync anywhere on the go and supports google, google calendar, evolution etc. I will complete this how to at a later time... Please follow this guide if you plan to sync with ScheduleWorld http://www.sjoerdmulder.nl/wordpress/?p=4 I hope someday, all this will be built in to ubuntu so that connect and sync with a pocket pc is easy. Please help by sending feedback and suggestions. More Reading: http://www.lvivier.info/SynceFS/ - an application allowing to mount pocketPC like a remote filesystem (deb for ubuntu available).
__________________
Last edited by edmondt; July 11th, 2007 at 01:54 PM.. Reason: Added how to. |
|
|
|
|
|
#2 |
|
Just Give Me the Beans!
![]() Join Date: May 2005
Beans: 45
|
Re: How to Connect to a WM5 Device with USB
Man is that a lot of work!
I think I'll wait until this is more plug and play... Ubuntu has spoiled me. I expect stuff to just sort of work now. |
|
|
|
|
|
#3 |
|
Spilled the Beans
![]() Join Date: Feb 2007
Beans: 14
|
Re: How to Connect to a WM5 Device with USB
thanks fr all the hard work put in. i got this far...
I got an ip, great! now test out odccm by entering this: Code: sudo odccm -f and then terminal just seemed to stop. and i'm not sure what to do. any help would be greatly appreciated. regards darren |
|
|
|
|
|
#4 |
|
5 Cups of Ubuntu
![]() Join Date: Feb 2007
Beans: 15
|
Re: How to Connect to a WM5 Device with USB
having the same problem here.. device is HTC Tytn (Hermes)
|
|
|
|
|
|
#5 |
|
A Carafe of Ubuntu
![]() Join Date: Jun 2005
Beans: 101
|
Re: How to Connect to a WM5 Device with USB
Try it with just "sudo odccm" and then type "pls" and see if you have a directory listing...
If it works then skip "odccm -f", it is only used for testing... |
|
|
|
|
|
#6 |
|
Spilled the Beans
![]() Join Date: Feb 2007
Beans: 14
|
Re: How to Connect to a WM5 Device with USB
When I get to :
Code:
sudo dhclient3 rndis0 Code:
[17182098.320000] usb 4-6.4: new full speed USB device using ehci_hcd and address 12 [17182098.420000] usb 4-6.4: configuration #1 chosen from 1 choice [17182098.504000] rndis_host 4-6.4:1.0: RNDIS_MSG_QUERY(0x01010101) failed, -110 [17182098.504000] rndis_host: probe of 4-6.4:1.0 failed with error -110 Thanks David |
|
|
|
|
|
#7 |
|
Spilled the Beans
![]() Join Date: Feb 2007
Beans: 14
|
Re: How to Connect to a WM5 Device with USB
so near and yet...
thanks for the info/advice with odccm -f. managed to move on and received the following message darren@desktop:~$ sudo cp synce-gnome /usr/src/ cp: omitting directory `synce-gnome' and then i ground to a halt. would really appreciate your support. regards darren |
|
|
|
|
|
#8 |
|
Spilled the Beans
![]() Join Date: Feb 2007
Beans: 14
|
Re: How to Connect to a WM5 Device with USB
also (really not splitting hairs but it caught me out for a while) i think this is a typo...
should sudo chmod +x /etc/init.d/odccmsudo update-rc.d odccm defaults actually say sudo chmod +x /etc/init.d/odccm sudo update-rc.d odccm defaults smile darren |
|
|
|
|
|
#9 | |
|
A Carafe of Ubuntu
![]() Join Date: May 2005
Location: Sweden
Beans: 91
Ubuntu 9.04 Jaunty Jackalope
|
Re: How to Connect to a WM5 Device with USB
Quote:
Anyone? |
|
|
|
|
|
|
#10 | |
|
First Cup of Ubuntu
![]() Join Date: Mar 2007
Location: Beijing, China
Beans: 3
Ubuntu Karmic Koala (testing)
|
Re: How to Connect to a WM5 Device with USB
Hi!
Thanks a lot for the long post and detailed process. There is a typo starting from the section: Quote:
The cp command should have -R in order to copy the sub-directories as well and there is a problem as you copy those files to /usr/src/... but then all the other commands and copy and paste are based on /usr/share/... instead. So the startup script won't work, the edit of test.py won't work and so on. Now I almost got everything "working" except that pls gives me: Code:
** (process:6368): WARNING **: No devices connected to odccm pls: Unable to initialize RAPI: An unspecified failure has occurred Any idea about what could be wrong? Thanks |
|
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|