Showing posts with label Tutorial. Show all posts
Showing posts with label Tutorial. Show all posts

Monday, November 9, 2009

Bitpim & Bluetooth Under Ubuntu Karmic

Last week, I gleefully installed Ubuntu 9.10, the Karmic Koala, on a new laptop. One of the first things on my to-do list was getting Bitpim set up so I could transfer ringtones & contacts between my laptop and my cell phone (a Verizon Wireless LG Dare).

To accomplish this, I looked up an old tutorial I had followed a while back for setting everything up on my old desktop machine.

I have found that a couple of things have changed since that guide has written, so I thought it would be worthwhile to post an updated version and share my findings.

Getting Started

Everything in this tutorial is possible under Karmic without installing any packages that aren't installed by default (except for Bitpim, of course).

This works for my LG Dare (Firmware version 05) and should work for many/most/all other Verizon LG phones that support the proper Bluetooth profiles -- possibly many more beyond that.

Just to keep things relatively short, we will assume that you have already managed to pair your phone with your computer.

Unless otherwise specified, assume any commands I ask you to issue will be done in Terminal.

Step 1: Find your phone's MAC address

The easiest way to do this is to browse the device via Nautilus: from the Bluetooth icon in the Gnome Panel, choose your device and then choose Browse Files. This will open a new Nautilus window and your phone's MAC address will be displayed in the address bar in the format obex://[mac:address:here]/.

Step 2: Find the channel used by the Bluetooth Serial Port service

Issue the command: sdptool browse mac:address:here.

My Dare uses Channel 5 for Serial Port as shown here:

Service Name: Serial Port
Service RecHandle: 0x10006
Service Class ID List:
  "Serial Port" (0x1101)
Protocol Descriptor List:
  "L2CAP" (0x0100)
  "RFCOMM" (0x0003)
    Channel: 5

Note: Some phones may not show anything labeled "Serial Port". In the case of my old phone (an LG VX9900), for example, I used the BT DIAG service instead and it worked. If you don't have a Serial Port section, you may have to try another service instead (but no guarantees it works).


Step 3: Create an RFCOMM binding by editing the appropriate config file

Open the config file by running: gksudo gedit /etc/bluetooth/rfcomm.conf

Uncomment the rfcomm0 section (remove the # from each line) and change it to look like this:

rfcomm0 {
    # Automatically bind the device at startup
    bind yes;

    # Bluetooth address of the device
    device mac:address:here;
    # RFCOMM channel for the connection
    channel 5;

    # Description of the connection
    comment "Needed by BitPim";
}


Step 4: Make sure your bluetooth bindings are added at startup

Due to a bug in 9.10, the rfcomm bindings that we specified above (in rfcomm.conf) will probably be ignored at startup. Reply #5 in the LP bug report provides a workaround for this issue. The instructions there are written for users who have upgraded to 9.10-- on my fresh 9.10 installation however, I needed only to follow step 3, which I will repeat here.

Open rc.local (gksudo gedit /etc/rc.local) and add the line:

rfcomm bind yes

Above the last line (which should say exit 0).

Step 5: Restart the Bluetooth service


Issue the commands:

sudo /etc/init.d/bluetooth stop
sudo /etc/init.d/bluetooth start

Note: running sudo /etc/init.d/bluetooth restart did not work for me: this caused the BT service to stop, but it wouldn't start again on its own. I had to issue "start" to get it to start again.

Step 6: Start Bitpim and check available com ports


Start Bitpim and go into Settings, then click the Browse... button to the right of "Com Port". You should see "Bluetooth (/dev/rfcomm0) listed under Available Ports. If you do, you are all set! You can now start reading/writing your phone data using Bitpim. If not, you may have done something wrong. Double check your work above and try again before continuing.

Step 7: Have fun hacking away at your phone!

If you have any questions or run into problems, please be as specific as possible when asking for help.

Thanks to:

Ars Technica
Tony

Thursday, April 23, 2009

Howto: sync music to your Verizon Wireless cell phone using Amarok!


NOTE:
You may notice that this same tutorial exists on the Ubuntu Forums. That's because I wrote it! This is a re-posting of that tutorial. So not to worry, no one is being ripped off. Scout's honor.




I have found that there is a dearth of information on ways to get music onto cell phones under Linux, so I'm hoping this tutorial will help many of you out there. I have tested this method and verified that it works with my LG Dare from Verizon Wireless as well as my girlfriend's LG Chocolate II (also from VZW). This method will probably work with Verizon's other BREW handsets (just about everything they sell that isn't a smartphone) because the music player software is very similar across the board but again, I've only tested using the two phones mentioned above. VZW phones are the focus of this tutorial.

As to be expected, VZW provide no support for anything other than Windows and leave users of other OSes in the cold (and even their Windows solution is god-awful). My phone never even recognized MP3 files that I manually copied over to the proper folder on the memory card either. Even if that did work, who wants to manually copy over songs one by one? I created a playlist and wanted to send the playlist to the phone without a lot of copying and pasting.

This method may work with other phones as well-- so if you have luck with your phone, please post your results and comments in this thread.

For the purpose of this tutorial, we will assume that you already have Amarok and have scanned your collection into the library. We will be using Amarok 1.4.10, the last 1.x release, since as of this writing Amarok 2 does not offer mobile device support. I have verified everything listed here under Ubuntu Intrepid, but other variants should work as well.

What you will need:
-External Memory Card (sorry, no way to do this with the phone's internal memory AFAIK)
-Card Reader
-AmaroK 1.4.10 (currently available in the repositories)

What you will NOT need:
-USB Cable/driver
-VZW's Rhapsody crapware
-DRM-protected music. Sorry, but DRM-protected files are outside the scope of this tutorial.


Ok, down to business!


Part A: Make sure your memory card is set up properly

1. Formatting
The phone expects a specific set of folders on the memory card in order to handle media properly (my_music, my_pix, my_flix, etc). If you have just bought a memory card, you may need to format it in order to ensure that these folders exist. The easiest way to do this is to insert the card into your phone and then just turn the phone off and back on again. The phone will probably create the folders for you at this point.

2. Mount the card
Insert your memory card into your card reader and mount it, then check the mount point if you don't know it already by navigating to it in Nautilus and checking the address shown (usually something similar to /media/disk/ ). Open the card and make sure the folders mentioned above exist. If not, create them manually.

Part B: Configure your memory card as a media device in Amarok

1. Choose Settings - Configure Amarok - Media Devices

2. Choose Add Device...
You will be presented with 3 options:
-"Select the plugin to use with this device:" -> Choose Generic Audio Player
-"Enter a name for this device (required):" -> Name the device whatever you like
-"Enter the mount point of the device, if applicable": -> Enter the mount point from Part A, step 2
Click OK

3. Click the Devices tab, then click the gears icon (to the right of the Transfer button) to configure additional settings for the device:
-Ignore pre&post-disconnect commands, transcoding options
-Leave all checkboxes at defaults (all unchecked)
-Song location: This part is important. You must tell Amarok to place the files in the my_music folder in the phone. Configure the filenames however you please but make sure that the files will NOT be nested in any folders underneath my_music. For example if you leave it at the defaults, Amarok will create a hierarchy of my_music/artistname/albumname/filename.mp3. If you sync using this hierarchy, the phone won't see your music when you are finished.

The path asked for here is relative to the root directory of the memory card (e.g. /media/disk/ in this example) so you don't need to specify the path to the card. The format I use is simply: my_music/%artist-%title.%filetype.
Click OK

Part C: Sync your tunes

1. Under the Collection or Playlists tab, choose the songs or playlists you want to sync, right-click and choose transfer to device or sync to device.

2. In the Devices tab, Choose audio player you set up in part B from dropdown at the top of the Devices section, then choose Connect.

3. Click the Transfer button and watch your music sync!

4. Once the transfer has completed, click the Disconnect button, unmount the disk in Nautilus, remove it from the reader and insert it into your phone.

5. Start your phone's music player. There should be a one-time initialization where it reads through the track info and loads up your songs. Once you see that, you know the phone has successfully recognized the music on your memory card.

6. Enjoy your music!


That's really all there is to it. Once you have done the initial setup, just repeat Part C to sync/resync additional music as you please. If you find alternative methods or find any issues with this tutorial, please post a reply. I will update this post as necessary.

Troubleshooting:
If your phone does not see your music, check that your
If you have issues, please post as much info as you can, including:
-The symptom you ran into (such as "my phone doesn't see my music")
-Whether you received any errors from Amarok (and if so, what the errors are)
-Wireless carrier and phone brand/model
-Phone software version: where this can be found depends on the phone. For example on my LG Dare, I find this under Main Menu->Settings&Tools->Phone Info->SW/HW Version. My firmware version is VX970V05.

I can't guarantee I'll be able to help, but having worked for the big "V" for 3 years (not anymore, thank goodness) I have a fair amount of phone-savvy and I'll help if I am able.

Notes:

1. The tracks I transferred were all mp3 files with data stored in ID3 tags. I have not experimented with other formats.
2. Album Art embedded in the ID3 tag will be read by the phone's music player automatically! This seems to be the only way to get artwork onto the phone in a format that the phone will recognize.
3. The phone didn't recognize any of my genre tags, although it did pick up on Artist/Album/Song Title.
4. Make sure not to use nesting of files under my_music - they must ALL be in my_music and NO other subfolders.
5. As I mentioned, I used this method to sync a playlist I created from my library on my desktop to my phone, but the playlist itself did not end up being visible in the phone's music player. This wasn't a big deal to me, so I left it at that.

Further Reading: Howardforums.com is an excellent source of information for cell phone enthusiasts. You will be able to find a lot of related info such as how your music player works, other known tricks, etc. Couldn't hurt to read up on your phone!