You are here

HOWTO: Debian SID + BitPim + LG VX5300 + Bluetooth

AttachmentSize
File bitpim-lgvx5300.patch_.sh3.21 KB
File bluepim.sh184 bytes

Been meaning to post this one for a while, but gah life is busy. As regular readers know, I upgraded my cellphone recently to an LG VX5300. I found out only after I got it home that it had only been out a week. Thus, there is currently no standard USB cable available, and no BitPim support. This means that there is no obvious way to get pictures taken with the lovely phonecam off the phone and onto my Linux box, or even to back up the onboard phonebook…

Fortunately, with a bunch of help from the web and from various local gurus, I was able to get it all to work. Fob


Note: You could destroy everything on your phone and void your warranty, so please don't follow these instructions.

The basic strategy is to use a slightly-hacked BitPim to talk Bluetooth to the phone. I assume that everything starts out-of-the-box unconfigured. If this is not the case, be careful: some of the instructions given here could damage your existing configuration.

Here's how:

  1. Turn off Bluetooth on your phone. MENU-rt-rt-7-off
  2. Get Bluetooth hardware for the Linux box. If you don't already have some kind of BT HW, I recommend a USB dongle as portable, compatible, and cheap. I used a Cables Unlimited 100M, which I bought at Fry's for about $25, but almost any USB 2.0 HS BT adapter should work out of the box on any modern Linux distro.
  3. Set up Bluetooth kernel and devices for the Linux box. If you build your own kernels, go turn on all the relevant-looking Bluetooth options and install.
  4. Get the Bluetooth stack for the Linux box. You'll want to make sure you have USB 2.0 EHCI working. Then you install the Bluez BT stack. In Debian SID, this is a matter of
    apt-get install bluez-utils
    /etc/init.d/bluetooth start
    
    Do not install any other Bluez packages, as they may misconfigure you.
  5. Set up devices for udev. If you are running udev, you will need to make sure that it is clued in. Run
    /etc/init.d/udev stop
    /etc/init.d/udev start
    
    to get the hotplug stuff working.
  6. Plug in the adapter. Plug in your USB adapter. After a few seconds, the light on my adapter starts to blink, indicating that the stack has been inited.
  7. If it doesn't seem to be working, it could be any of a million things. The first thing to try is a complicated dance, which appears to be especially necessary when the adapter is connected through an external USB hub—weird, but there it is:

    1. Unplug the adapter.
    2. rmmod hci_usb
      modprobe hci_usb
      
    3. Replug the adapter.
    4. If it still didn't work, unplug and replug the adapter again. Try a different port this time.
    Always watch /var/log/syslog and /var/log/messages carefully for signs of trouble; for example, my USB lineprinter has been known to confuse things.

  8. Configure bluez. Edit /etc/bluetooth/hcid.conf . It should be mostly OK, but make sure that it is set to security mode "auto", that the default link mode is "accept", and that you pick something different than "1234" for the default passkey (although 4 decimal digits is still recommended). Give the device some host-independent name like "BT dongle" so that you can move the adapter from machine to machine without confusing things. Now reset everything by running
    /etc/init.d/bluetooth stop
    rm -rf /var/lib/bluetooth/*
    /etc/init.d/bluetooth start
    
  9. Pair the phone and the dongle. This has been really twitchy for me; fortunately you only have to make it work once.
    1. As you know by now, the BT menu on the phone is menu-rt-rt-7 . Go there, and turn on BT for the phone.
    2. From there, go to settings-2 and turn discovery mode on. For the next 60 seconds, your phone will be exposed to the world.
    3. Quickly go back to the bluetooth menu and select "Add New Device".
    4. When the phone finishes scanning, it should find the adapter and offer you the option to pair with it. Quickly say yes.
    5. The phone will prompt you for the passkey. Quickly enter the key you set earlier.
    6. If all goes well (ha) you should get a message from the phone saying you've paired. If not, try again, tweaking various things. I'm serious; this is all fragile as heck, so don't give up.
  10. Obtain the latest BitPim source. You'll want to see the BitPim home page for current info, but for me it works to do
    svn co https://svn.sourceforge.net/svnroot/bitpim/trunk/bitpim
    
  11. Patch the BitPim source to work with the LG VX5300. BitPim doesn't yet officially support the VX5300. I have written a horrid little patch script that will add support. Since the VX5300 seems to be essentially identical to the supported VX8300 except for some identification strings, I just changed the strings. Yuck. Run the supplied shell script in the bitpim source root directory.
  12. Get an rfcomm connection to the phone. This basically involves the use of the hcitool and rfcomm utilities from Bluez, and is documented well elsewhere on the net. I have a little helper script I have written to automate the process. You will need to replace the bogus BT MAC address in the script with the MAC address of your phone. You can get this by going to settings-1 in the Bluetooth menu on the phone. Alternatively, you can get it by putting the phone in Discovery mode and running "hcitool scan". In any case, once you've patched the shell script, run it. If all goes well, it will silently start an rfcomm connection to your phone in the background. (If the script fails, try turning off Bluetooth, turning off your phone, unplugging your adapter, then turning on the phone, turning on Bluetooth, and replugging your adapter. Then run the script again. This got it for me when doing a walkthrough; my phone was screwed up. In fact, the phone gets screwed up quite easily, so don't be shy about all this.)
  13. Run the modified BitPim. Go to the bitpim source directory and
    cd src
    sudo python bp.py
    
    Once BitPim is up and running, go to the Settings dialog (wrenches icon at top) and select LG VX5300 as your phone and /dev/rfcomm0 as your communications port. Then exit, and
    sudo chown -R $USER $HOME/.bitpim-files
    
    just to make sure that you haven't screwed up permissions. Then restart BitPim as yourself
    python bp.py
    and click the Get Phone Data icon (right-facing green arrow and phone). This will bring up a task dialog that is fairly self-explanatory, except that to get images from the phone (my common task) you choose "wallpaper". When you click "OK", BitPim should grind for a really long time, with a status bar at the bottom.
  14. Save images from BitPim and erase the phone. Open Media/Images in the list on the left side of BitPim. You should see the pictures from your phone! Now right-click on Images, and you will see a popup menu that will let you save all the images. I think it's easier to clear the images from the phone once they're saved from the phone menu: camera_button-MY_PIX-options-8. Alternatively, you can use the popup to clear all images, then upload data to phone in replace mode.

And there you have it. In just a few simple steps you can download stuff from your LG VX5300.

By the way, I do not recommend upgrading your LG VX5300 firmware. Verizon has a long history of preventing downloads from their phones. If I'd realized how bad they were about this, I probably would have switched carriers back to Cingular this time around. Oh well—it's fun while it lasts.

Last, but not least: no, I won't help you if you get stuck :-). This whole process is a nightmare, and I spend many hours stuck on my own. I apologize for any defects in these instructions; while I'll be happy to hear about them and try to correct them, I think I've typed enough on this topic now to last me a while.

Group/Project: 

Comments

I broke my phone and it's all your fault. Just kidding. I was talking big talk last night (almost said bit talk, nearly punny) about being cool like you soon... instead it's wearing me down, all the "this whole process is a nightmare" and "here's what I did, worked for me, but you could brick your otherwise nice phone" stuff. Yet another thing our kids will laugh at us about someday (we all hope).

Nice job with the hack action! I've seen what you come up with and can attest to it's functionality. Have you measured the transfer speed moving pictures off the phone? How about ringtones, kids love the ringtones.

When it comes to fragility and complexity, BT seems only slightly better than IrDA. (Why is the "r" in IrDA conventionally lowercase? It's not like you abbreviate infrared as "Ir"?) It's too bad, but that's where we are. It's also why BT almost died; too bad it didn't finish the job and get replaced with something better.

I haven't measured, but I'd say the phone takes about 15 seconds to move a 640x480 JPEG. Terrifying.

Looks like you can move ringtones on and off, although I haven't tried yet. I almost always have my phone on vibrate anyhow, so that I won't accidentally bug somebody. Dilbert: "I don't want to cure it, I just want to move it!"

I was happy to find this patch, but cannot apply it on my iMac. Someone else had tested it as well and has commented on the SourceForge.net site with bitpim developers.

I think I speak for many when I ask you to submit this code to the bitpim folks so it can be implemented in a (near, I hope) future release.

I like the phone, but would like it better if it will listen and respond to bitpim.

Thanks for your consideration...

Hi There,
Any chance on getting this working on windows? Have the bitpim people looked into your patch?

Thanks!
Michael

It's just that it's hard to build BitPim for Windows. The BitPim folks have the patch, and are, I believe, planning to include it.

Thanks for taking the time to post this. It works. Bitpim now has support for the vx5300 phone. Thanks!

Hope it works well enough for us both to get our pictures off our phones. I'm about due. Fob

I was just playing with my VX8600 and I got stuck getting it to work with bitpim until I stumbled across your post. Great work! I'm just glad I didn't have to patch the bitpim source tree. Smile

Thanks man.
This worked (or at least gave me access to the file system) on an LG CX8600. Had been beating my head against my desk for hours trying to figure this out.

The new release of bitpim (oct 5, 2007), has no problem working on the VX5300. No risk for your phone, no bluetooth, no problem!!!

The BitPIM folks took my VX5300 patches some time ago and got them more right and merged them. That part seems great. If you're going to try to connect with Bluetooth rather than with a USB cable as I now do, something here may still be helpful, so I'll leave it up for now…

Thanks that have a werry meny info for me