Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
HOWTO: bitpim + lg vx4400
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
nutate
n00b
n00b


Joined: 27 Aug 2002
Posts: 11

PostPosted: Thu Jan 29, 2004 6:19 pm    Post subject: HOWTO: bitpim + lg vx4400 Reply with quote

Hi, I just got bitpim working with my phone, and I'd like to share how I did it. Bitpim is a utility to sync your phone and backup your contacts and calendar, etc. bitpim can be installed from an rpm, which just requires you to install the rpm ebuild then install it. You can also use the CVS version (it's a bit nicer), but it takes some work that I don't want to get into here.

First, make sure your kernel has the following enabled
Code:

USB support ->
  <M>   USB Modem (CDC ACM) support [not needed?]
  USB Serial Converter support ->
    <M> USB Serial Converter support
      [*]   USB Generic Serial Driver (NEW) [not needed?]
      <M>   USB Prolific 2303 Single Port Serial Driver (NEW)

Then recompile your kernel in one of two ways:

    Gutsy method, no reboot needed:
    Code:

    make dep && make modules && make modules_install


or

    Safer, standard, 'best-practices' method, use if you've done a make clean:
    Code:

    make dep && make bzImage && make modules && make modules_install

    Then put your kernel in place on /boot however you like to, using cp or make install, and reboot.

After either step, install nvidia/alsa mods as they will have been overwritten, kernel 2.6 users will probably just have to redo the nvidia drivers (as soon as there's an ebuild for them :) )

At this point, bitpim should work for root, but you want it to work for your user. So, in /etc/devfsd.conf or in it's own file /etc/devfs.d/usbcell put the line:
Code:

REGISTER    ^usb/tts/0$  PERMISSIONS root.usb 660

and add yourself to the usb group and restart X (or make sure usb shows up when you type groups from the console)... This doesn't seem ideal to me, but it works. (ie it could step on your toes if you have another usb serial device.)

Then as root still:
kill -HUP `pidof devfsd`

You can also make a /etc/hotplug/usb/usbcell script as per the bitpim instructions, but I didn't have any luck. It can't seem to find the the phone device, so then it won't do anything. If you use the converter chip devId, then you get it to chown /proc/bus/usb/00x/00x which I'm not sure is necessary. You might as well do it, though. The
script I have as /etc/hotplug/usb/usbcell
Code:

#!/bin/bash
if [ "${ACTION}" = "add" ] && [ -f "${DEVICE}" ]
then
    /usr/bin/logger -t $0 "chowning $DEVICE"
    if [ -f /var/run/console.lock ]
    then
        CONSOLEOWNER=`cat /var/run/console.lock`
    elif [ -f /var/lock/console.lock ]
    then
        CONSOLEOWNER=`cat /var/lock/console.lock`
    else
        CONSOLEOWNER=
    fi
    if [ -n "$CONSOLEOWNER" ]
    then
        chmod 0000 "${DEVICE}"
        chown "$CONSOLEOWNER" "${DEVICE}"
        chmod 0600 "${DEVICE}"
    fi
fi


And add this line to /etc/hotplug/usb.usermap
Code:

usbcell 0x0003 0x067b 0x2303 0 0 0 0 0 0 0 0 0

note that that is the id for:
ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port
as it shows up in lsusb. If for some reason you are using
some other chip, you will need to compile that module, and
make changes to the usb.usermap reflecting the proper ids.
The bitpim instructions say to put in the usb id for the phone, but for some reason I can't get that to really work right.

With that, bitpim should work, auto detect your plugged in phone, etc. If it doesn't download anything on the first try, try again. Also, it will throw an exception if you try to download an empty calendar, this is fixed in CVS.

If I have time, I'll try to throw together an ebuild, possibly coinciding with the 0.7 release.

Please respond with any comments, questions.

-Rich
Back to top
View user's profile Send private message
SirronD
Tux's lil' helper
Tux's lil' helper


Joined: 05 Jun 2002
Posts: 100
Location: Oakland, CA

PostPosted: Tue Jun 15, 2004 6:11 pm    Post subject: bitpim fails for me Reply with quote

Hi. I'm trying to get bitpim to work but it always fails for me with
Code:

sirron@honu40 sirron $ bitpim
Traceback (most recent call last):
  File "bp.py", line 57, in ?
  File "gui.py", line 31, in ?
  File "guiwidgets.py", line 40, in ?
  File "comdiagnose.py", line 21, in ?
  File "bitflingscan.py", line 16, in ?
  File "bitfling/client.py", line 17, in ?
  File "bitfling/xmlrpcstuff.py", line 47, in ?
  File "bitfling/paramiko_bp/__init__.py", line 70, in ?
  File "bitfling/paramiko_bp/transport.py", line 32, in ?
  File "bitfling/paramiko_bp/rsakey.py", line 25, in ?
  File "/usr/lib/python2.3/site-packages/Crypto/PublicKey/RSA.py", line 256, in ?
    error = _fastmath.error
AttributeError: 'module' object has no attribute 'error'


I don't have any idea where to go from here. I don't see any posts via google with any similar problems with bitpim.

Any help you can share to get it working would be appreciated.

My guess is some python package is missing. I verified that I have pycrypto-1.9_alpha6 and logging-0.4.7. Is there anything else I may need to get started?

Thanks

Sirron
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2859
Location: Omnipresent

PostPosted: Wed Jul 07, 2004 10:06 am    Post subject: Reply with quote

EBUILDS

app-misc/bitpim-0.7.15 (against CVS HEAD at the moment) --

Code:
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Header: $

# Package doesn't use distutils
inherit python

DESCRIPTION="This program allows you to view and manipulate data on LG VX4400/VX6000 and many Sanyo Sprint mobile phones"
HOMEPAGE="http://www.bitpim.org/"
SRC_URI=""
LICENSE="GPL-2"

# Source is distributed only by CVS
# We will check out a particular revision
ECVS_AUTH="pserver"
ECVS_SERVER="cvs.sourceforge.net:/cvsroot/${PN}"
ECVS_MODULE="${PN}"
#ECVS_BRANCH="BITPIM_${PV//./_}"
ECVS_BRANCH="HEAD"
MY_PV="BITPIM_${PV//./_}"
ECVS_USER="anonymous"
ECVS_PASS=""
ECVS_CVS_OPTIONS="-dP"

inherit cvs

SLOT="0"
KEYWORDS="~x86"
IUSE="crypt usb evo"

# Exact dep for wxpython ok since they've moved onto 2.5.x
DEPEND=">=dev-lang/python-2.3
                =dev-python/wxpython-2.4.2.4
                dev-python/pyserial
                dev-python/dsv
                crypt? ( dev-python/paramiko )
                usb? ( >=dev-lang/swig-1.3.19 dev-libs/libusb sys-devel/gcc )"

S=${WORKDIR}/${ECVS_MODULE}

src_compile() {
        # USB stuff
        if [ `use usb` ]; then
                cd native/usb
                sh ./build.sh
        fi

        # Everything else is pure Python

        # Apply vendor tag
        cd ${S}
        cp version.py version.py.orig
        #SPAT="s/^vendor=\"official\"/vendor=gentoo-cvs-${ECVS_BRANCH}/"
        SPAT="s/^vendor=\"official\"/vendor=\"gentoo-cvs-${MY_PV}\"/"
        cat version.py.orig | sed $SPAT > version.py
}

# To copy a whole directory; where is this in Portage lib?
docpr() {
        target=${D}/$INSDESTTREE
        [ ! -d $target ] && install -d $target
        for dir in $@; do
                cp -rv $dir $target
                # delete CVS cruft
                cruft=$(find $target -name CVS -type d)
                cruft="$cruft $(find $target -name build.*)"
                rm -rfv $cruft
        done
}

# Default source install is for static release, so we do
# everything ourselves
src_install() {
        # Enter source dir
        cd ${S}

        # Install files into right place
        #
        # BitPim is a self-contained app, so jamming it into
        # Python's site-packages might not be worthwhile.  We'll
        # Put it in its own home, and add the PYTHONPATH in the
        # wrapper executables below.
        export RLOC=/usr/lib/${PF}  # export for use later
        insinto $RLOC

        # Main Python source
        doins *.py
        docpr ./resources ./help

        # Native products
        insinto $RLOC/native
        doins ./native/*.py
        docpr native/qtopiadesktop
        [ `use evo` ] && docpr native/evolution
        [ `use usb` ] && docpr native/usb

        # Bitfling
        if [ `use crypt` ]; then
                FLINGDIR="${RLOC}/bitfling"
                insinto $FLINGDIR
                cd bitfling
                doins *.py
                cd ${S}
        fi

        # NOTE: docs are old, so skipping them

        # Creating scripts
        echo "#!/bin/sh" >> ${T}/bitpim
        echo "export PYTHONPATH=\"$RLOC:$PYTHONPATH\""
        echo "exec python ${RLOC}/bp.py bitpim" >> ${T}/bitpim
        dobin ${T}/bitpim
        if [ `use crypt` ]; then
                echo "#!/bin/sh" >> ${T}/bitfling
                echo "export PYTHONPATH=\"$RLOC:$PYTHONPATH\""
                echo "exec python ${RLOC}/bp.py bitfling" >> ${T}/bitfling
                dobin ${T}/bitfling
        fi

}

pkg_postinst() {
        # Optimize in installed directory
        python_mod_optimize ${ROOT}/${RLOC}

        # Helpful message re. support
        einfo "For support from the developers, please post to"
        echo "       bitpim-user@lists.sourceforge.net"
}


which depends on

dev-python/dsv-1.4.0 --

http://bugs.gentoo.org/show_bug.cgi?id=57323

and if you use bitfling, dev-python/paramiko-0.9h --

http://bugs.gentoo.org/show_bug.cgi?id=57324


ChangeLog:

* 20040716
- Fix critical USB installation bug
- Other little things

* Pre 20040716
- Fix Qt typo in bitpim ebuild
- Fix documentation, CVS metadata bugs in bitpim ebuild
_________________
Personal overlay | Simple backup scheme


Last edited by Hypnos on Fri Jul 16, 2004 8:28 pm; edited 4 times in total
Back to top
View user's profile Send private message
SirronD
Tux's lil' helper
Tux's lil' helper


Joined: 05 Jun 2002
Posts: 100
Location: Oakland, CA

PostPosted: Wed Jul 07, 2004 3:17 pm    Post subject: Ebuilds worked for me! Reply with quote

I just tried your ebuilds, and I have bitpim working. The ebuilds worked.

Thanks.

I am using a Sanyo PM8200 camera phone from sprint, and I have sucessfully gotten the phone data from my phone (phonebook, and photos)

There is one minor issues with bitpim itself, and I'll check out their bugzilla to see if the issue I have is already reported.

bitpim issue - This phone can associate a photo with a phonebook entry. When I receive a call, the photo of the caller is displayed (if I have a photo). When retrieving the phonebook and associated photos, the photos are not not showing with the correct entry.

I have not yet tried uploading back to this phone.
Back to top
View user's profile Send private message
link
Tux's lil' helper
Tux's lil' helper


Joined: 31 May 2002
Posts: 116
Location: California

PostPosted: Thu Jul 08, 2004 6:42 am    Post subject: Reply with quote

These ebuilds installed fine, and bitpim runs okay. I can't seem to get the data connection working though. I have a USB-cable for the phone. It goes straight from the USB port to the phone. What kernel modules do I need for that? (I had it working once before, though with my friend's USB->phone cable)

lsusb output:
Code:
Bus 003 Device 002: ID 1004:6000 LG Electronics, Inc.
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000

_________________
Peace love and penguins
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2859
Location: Omnipresent

PostPosted: Thu Jul 08, 2004 4:25 pm    Post subject: Reply with quote

link wrote:
These ebuilds installed fine, and bitpim runs okay. I can't seem to get the data connection working though. I have a USB-cable for the phone. It goes straight from the USB port to the phone. What kernel modules do I need for that? [...]

I believe: cdc-acm, pl2303, usbserial

Again, I don't even have my data cable yet, so I'm speculating ...
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
SirronD
Tux's lil' helper
Tux's lil' helper


Joined: 05 Jun 2002
Posts: 100
Location: Oakland, CA

PostPosted: Thu Jul 08, 2004 4:34 pm    Post subject: here is how I got my connection working Reply with quote

I use hotplug to load the proper kernel modules for me. When I plug in the cable to my phone the module acm is loaded, and my cable is available at /dev/usb/acm/0 (the "0" will change depending on which usb ports are available)

My phone is a sanyo pm8200.

Originally it was only available to root, so I added the following lines to my /etc/devfsd.conf file

Code:

# My stuff to make USB accessable to all
REGISTER ^usb/.*$    PERMISSIONS root.usb  0777


Then I added my users that need access to the usb group

Hope this helps

fyi - I uploaded some ringtones into my phone. It worked perfectly. :-)
Back to top
View user's profile Send private message
link
Tux's lil' helper
Tux's lil' helper


Joined: 31 May 2002
Posts: 116
Location: California

PostPosted: Sun Jul 11, 2004 5:34 am    Post subject: Reply with quote

I figured it out. You can't use the straight USB cable. You have to have the cable with the serial converter in it (the little blob). Its Radio Shack catalog number 17-783. Found that in the bitpim help.
_________________
Peace love and penguins
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2859
Location: Omnipresent

PostPosted: Thu Jul 15, 2004 11:33 pm    Post subject: Reply with quote

link wrote:
I figured it out. You can't use the straight USB cable. You have to have the cable with the serial converter in it (the little blob). Its Radio Shack catalog number 17-783. Found that in the bitpim help.

I'm having the same problem; any success with the Radio Shack cable?

UPDATE: Nevermind, the ebuild I was using was buggy -- wasn't installing the USB code.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
jherm
n00b
n00b


Joined: 25 Apr 2004
Posts: 9

PostPosted: Sun Aug 22, 2004 7:13 pm    Post subject: Re: bitpim fails for me Reply with quote

SirronD wrote:
Hi. I'm trying to get bitpim to work but it always fails for me with
Code:

sirron@honu40 sirron $ bitpim
Traceback (most recent call last):
  File "bp.py", line 57, in ?
  File "gui.py", line 31, in ?
  File "guiwidgets.py", line 40, in ?
  File "comdiagnose.py", line 21, in ?
  File "bitflingscan.py", line 16, in ?
  File "bitfling/client.py", line 17, in ?
  File "bitfling/xmlrpcstuff.py", line 47, in ?
  File "bitfling/paramiko_bp/__init__.py", line 70, in ?
  File "bitfling/paramiko_bp/transport.py", line 32, in ?
  File "bitfling/paramiko_bp/rsakey.py", line 25, in ?
  File "/usr/lib/python2.3/site-packages/Crypto/PublicKey/RSA.py", line 256, in ?
    error = _fastmath.error
AttributeError: 'module' object has no attribute 'error'


I don't have any idea where to go from here. I don't see any posts via google with any similar problems with bitpim.

Any help you can share to get it working would be appreciated.

My guess is some python package is missing. I verified that I have pycrypto-1.9_alpha6 and logging-0.4.7. Is there anything else I may need to get started?

Thanks

Sirron


I'm having the same problem, has anyone figured this out?
_________________
make install, not war.
Back to top
View user's profile Send private message
jherm
n00b
n00b


Joined: 25 Apr 2004
Posts: 9

PostPosted: Sun Aug 22, 2004 9:03 pm    Post subject: Re: bitpim fails for me Reply with quote

jherm wrote:
SirronD wrote:
Hi. I'm trying to get bitpim to work but it always fails for me with
Code:

sirron@honu40 sirron $ bitpim
Traceback (most recent call last):
  File "bp.py", line 57, in ?
  File "gui.py", line 31, in ?
  File "guiwidgets.py", line 40, in ?
  File "comdiagnose.py", line 21, in ?
  File "bitflingscan.py", line 16, in ?
  File "bitfling/client.py", line 17, in ?
  File "bitfling/xmlrpcstuff.py", line 47, in ?
  File "bitfling/paramiko_bp/__init__.py", line 70, in ?
  File "bitfling/paramiko_bp/transport.py", line 32, in ?
  File "bitfling/paramiko_bp/rsakey.py", line 25, in ?
  File "/usr/lib/python2.3/site-packages/Crypto/PublicKey/RSA.py", line 256, in ?
    error = _fastmath.error
AttributeError: 'module' object has no attribute 'error'


I don't have any idea where to go from here. I don't see any posts via google with any similar problems with bitpim.

Any help you can share to get it working would be appreciated.

My guess is some python package is missing. I verified that I have pycrypto-1.9_alpha6 and logging-0.4.7. Is there anything else I may need to get started?

Thanks

Sirron


I'm having the same problem, has anyone figured this out?


# emerge gmp

Took me a couple hours to figure this one out, hope it helps.
_________________
make install, not war.
Back to top
View user's profile Send private message
drumz
Apprentice
Apprentice


Joined: 10 Nov 2002
Posts: 213

PostPosted: Thu Sep 02, 2004 1:33 am    Post subject: Reply with quote

I'd like to post my success and info on this topic too.

0. Doing the research, I purchased the cable from radio shack that used the prolific 2303 chip, so I went into my kernel config and under USB under serial enabled it as a module. Compiled/installed the kernel. (I use genkernel, hotplug, etc. Yes, I'm lazy. I want stuff that 'just works'.)

1. I downloaded the rpm version (after emerging rpm <yuck>) and installed it (bitpim).

2. I plugged my cable in and saw the proper module (pl2303) getting loaded - hooray, it's seeing the hardware. Trying to run bitpim I recieved the same vague errors others posted here, emerging gmp solved that problem (thanks jherm!)

3. It worked perfectly as root, but for a normal user it wouldn't - indicating a perm problem. As SirronD posted (thanks!), I added the following to /etc/devfsd.conf file:

REGISTER ^usb/.*$ PERMISSIONS root.usb 0777

Now it works fine. I can download/upload from the phone (phone numbers, ringtones tested so far). Bitpim still has some quirks in it's user interface, but at least now I can sync the phone and backup the data for only the cost of a cable and a little bit of time.

Phone: LG vx4500
Bitpim version: 0.7.17
Kernel version: 2.6.7
Platform: x86
Cable: Radio Shack part# 17-792 (Future Dial Cable #19)
Back to top
View user's profile Send private message
funkmankey
Guru
Guru


Joined: 06 Mar 2003
Posts: 304
Location: CH

PostPosted: Thu Sep 23, 2004 12:17 am    Post subject: Reply with quote

so far I have gotten bitpim working under osx with my audiovox 8610 and a radio shack "#19" cable (17-792, technically for vx6000) and of course the latest prolific drivers (http://www.viewcon.net/driver/rs11/imac.sit)

eventually I would like to get it working in gentoo, but I am too drunk right now.

someone should really post an ebuild to bugzilla, bitpim is waycool.

carry on.
_________________
I've got the brain, I'm insane, you can't stop the power
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2859
Location: Omnipresent

PostPosted: Thu Sep 23, 2004 1:02 am    Post subject: Reply with quote

funkmankey wrote:
so far I have gotten bitpim working under osx with my audiovox 8610 and a radio shack "#19" cable (17-792, technically for vx6000) and of course the latest prolific drivers (http://www.viewcon.net/driver/rs11/imac.sit)

eventually I would like to get it working in gentoo, but I am too drunk right now.

someone should really post an ebuild to bugzilla, bitpim is waycool.

carry on.

bitpim's development is too rapid for inclusion into Portage.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
Hypnos
Advocate
Advocate


Joined: 18 Jul 2002
Posts: 2859
Location: Omnipresent

PostPosted: Sun Mar 13, 2005 10:42 am    Post subject: Reply with quote

Dear all,

Some updates regarding bitpim:

* I can't keep up with bitpim in ebuilds, so follow their instructions for installing via RPM:
- emerge rpm lib-compat
- download the RPM from bitpim.org, then do "rpm -U <rpm file>"

* If you are using the straight USB cable (as opposed to the Radio Shack cable with the Prolific chip)(**), you might see that bitpim only sees the ACM modem interface, and not the diagnostic interface specific to your phone (i.e., BitPim complains it can't find a "candidate" port when device selection is set to automatic). This is because the libusb native to your Gentoo installation is not being loaded properly. How to fix:
- Do "ldd /usr/lib/bitpim-<version>/native.usb._libusb.so", and see what version libusb is missing
- Make a soft-link with that name to your actual libusb.so in /usr/lib; run "ldconfig" as root
- Now, when you launch bitpim and go to the device browser, you should see the modem and diagnostic interfaces specific to your phone. If you use the hotplug rule/script in the BitPim help, the diagnostic interface should be operable by the desired users. The ttyACM0 device create by the ACM driver needs a udev rule for changing its permissions, but I have found this to conflict with hotplug's operation. :(

(**) Note that the BitPim help discourages using a straight USB cable for the LG VX4400, but I am using the LG VX6000 with the charging straight USB cable. Other phones, e.g. Sanyo, also use a straight USB cable.

I'm posting this because the bitpim devs no longer provide support on questions regarding "talking to the phone." I hope this is useful!

EDIT 3/13/05: Including Roger Binn's (BitPim dev) corrections
EDIT 3/14/05: One more correction, regarding device permissions.
_________________
Personal overlay | Simple backup scheme
Back to top
View user's profile Send private message
KWhat
Guru
Guru


Joined: 04 Sep 2005
Posts: 549
Location: Los Angeles

PostPosted: Fri Jan 06, 2006 1:07 am    Post subject: Reply with quote

ok my problem was i never emerged libusb.... now it works like a champ
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum