Much ado about scripting, Linux & Eclipse: card subject to change

Showing posts sorted by relevance for query w810i. Sort by date Show all posts
Showing posts sorted by relevance for query w810i. Sort by date Show all posts

2007-04-19

DRM Packaging for Linux

In order to put .mp3s on my new SE W810i phone as ringtunes, I have to convert them first to .dm files. This is a pain, but it could be worse. So, I found SonyEricsson's DRM Packager, installed it, and it works great. Unfortunately, they only provide this tool for Windows and Mac.

So, naturally, it was time to write a Linux implementation. ;-)


Setting up the DRM Packager for use with Linux is easy. Packaging is faster on a native Windows system (seconds instead of milliseconds), but then you have to actually boot Windows, so overall it's still faster.

I'm currently using the following tools for converting MP3s to ringtunes:

  1. mp3 slicing: kwave sound editor, part of KDE (save as uncompressed .wav files)
  2. mpeg compression: lame or sneetchalizer (.mp3 or .mp4)
  3. DRM packaging: Sony Ericsson's DRM Packager tool -- details below (.dm)
  4. copying files to device: Konqueror, part of KDE (drag and drop from hard drive to usb device)

DRM packaging

  1. Download 'DRM Packager 1.35 - Windows' from Sony Ericsson's site.
  2. Install from Executable (using WINE) to default location, eg: ~/.wine/drive_c/Program Files/Sony Ericsson/DRM Packager/.
  3.   wine ~/DRMPackager-1.35-Windows.exe
  4. If your WINE instance doesn't use z: as the drive for the filesystem root (/), edit drmpack.sh and change to s: or whatever your WINE wants.
  5.   rootDir="z:"; # wine directory mapping
  6. Run drmpack.sh to convert a single file or recurse through a directory of .mp3 & .mp4 files, in order to generate .dm files. For syntax help, run w/o commandline options or read the source.
  7.   nickb@nickbdesk:~/ringtunes $ ./drmpack.sh tunes
    
      Processing directory /home/nickb/ringtunes/tunes ...
      Creating /home/nickb/ringtunes/tunes/neuroticfish_shortcommercial.dm ...
      Creating /home/nickb/ringtunes/tunes/neuroticfish_theyrecomingtotakemeaway.dm ...
      Creating /home/nickb/ringtunes/tunes/placebo_runningupthathill.dm ...
      Creating /home/nickb/ringtunes/tunes/placebo_postblue.dm ...
  8. If you prefer a GUI, use DRM Packager.desktop to launch the GUI tool using WINE, then browse for files to add to the GUI, and click 'Create DRM Content'. For Sony Ericsson W810i, DO NOT CHANGE THE DEFAULT SETTINGS! You can launch the GUI from the commandline with:
  9.   wine "c:\Program Files\Sony Ericsson\DRM Packager\DRMPackagerGUI.exe"
  10. If the GUI won't open, try copying MSVCP60.DLL into the DRM Packager install folder. If you don't have a Windows machine handy to grab this file from, Google for a site like http://www.dll-files.com/dllindex/dll-files.shtml?msvcp60 you trust and download it from there.

Tested with:

  • Sony Ericsson W810i phone
  • Sony Ericsson DRMPackager-1.35-Windows.exe
  • WINE 0.9.9-0ubuntu2
  • MEPIS Linux 6.0 (based on Kubuntu 6.06LTS)
  • Windows XP Pro SP2
  • Thinkpad T60p

2007-04-15

My new toy

Decided to make the switch from my crazy-old cellphone to a new one this week, and it arrived yesterday to the usual chorus of barking at the front door.

I'm now the proud owner of a Sony Ericsson W810i, complete w/ 1G of storage for MP3s. Very cool phone; better than my nearly-dead 256M K-BYTE MP3 player. I've only made one actual call on it so far, and the fact that it doesn't come with an actual audio-in jack (2.5 or 3.5mm) is a bit of a turn-off, but it works great for games and music, and sports a 2MP still and video camera.

The first app I had to install was of course Gmail. Being a linux geek, the second was MidpSSH which worked fantastically within a couple minutes (except when I wanted to use an ssh key instead of user/password login, and discovered that OpenSSH doesn't appear to support DSS.) Actually, it was user error. I had MidpSSH configured to use SSH1, not SSH2, so it wasn't even trying to send the key. Anyway, re-RTFM a few hours later solved the problem. I can now ssh to my home machine from my phone! Config steps:

  1. Configure SSH settings to prefer SSH2 and to use Public Keys
  2. Create a session, configured to use your Public Key
  3. Copy your phone's public key to your destination host's ~/.ssh/authorized_hosts file
  4. If necessary, enable debug mode on the destination host's sshd instance by editing /etc/ssh/sshd_config and setting LogLevel DEBUG, then restarting the daemon with /etc/init.d/ssh restart
  5. Connect!

2008-01-29

HOWTO: Bluetooth for Linux

Connecting a Thinkpad T60p to a Sony DR-BT30Q Headset

A month or so ago, I scored a Sony Wireless Stereo Headset (DR-BT30Q) with my accumulated Aeroplan miles. Then, when they arrived, I discovered to my dismay that while my SonyEricsson W810i supports Bluetooth 2.0, is DOES NOT support A2DP (Advanced Audio Distribution Profile) or AVRCP (Audio Video Remote Control Profile). So, while I can use 'em to answer the phone, I can't use them to listen to music on my Walkman-branded MP3-playing phone. Last I checked, SE had no intention of publishing updated firmware or any other way of installing these profiles onto existing phones. Way to go, SE.

Anyway, tonight, in a burst of insomnia, I decided to try to install the BlueZ stack on my Thinkpad and try to get these things working. To my pleasant surprise, it worked! Here's the process:

  1. Install bluez & utils
    apt-get install bluez bluez-utils bluez-firmware bluez-hcidump bluetooth bluez-audio kdebluetooth python-bluez
  2. Install a bluez-friendly audio player, like audacious.
    apt-get install audacious
  3. Install Thinkpad button support.
    apt-get install tpb
  4. (Re)start the bluetooth radio -- I tried /etc/init.d/bluetooth restart but it was Fn-F5 that actually turned on the radio. (This is why I needed tpb.)
  5. I ran a2dp.sh a few times, but it never managed to find my device's MAC address.
  6. I then tried to play with hcitool and dbus-send to manually connect to the headset, but that failed miserably. I did however, find the headset's MAC address.
  7. I manually added my device's bluetooth address into ~/.asoundrc, but that also didn't help.
  8. I noticed that the ~/.a2dp/a2dp.py script (created in step 5) was missing the MAC address, so I added it by hand.
  9. I started up K-Menu > System > Settings > kbluetooth and played around with that a little -- no luck.
  10. I started up audacious (and configured it to use bluetooth).
  11. I loaded up the latest episode of Real Synthetic Audio and started it playing.
  12. NOW, finally, I was prompted to authenticate my bluetooth radio with the headset. I entered the standard code, 0000, and voom -- wireless audio! Now all I need is a spiritual awakening, I suppose. :D

2008-11-22

If you type Google into Google you will break the internet...

While that may not be true, searching for a blog search with Google can yield rather loud effects:


Query for divbyzero.com/search/labels/w810i

2009-01-02

Blackberry Bold + MidpSSH + Mutt = Mail Over VPN

Got a new Blackberry Bold 9000 for Xmas. Typical of Rogers, I was overcharged for it, and all the freebies I had quoted to me on the phone have yet to arrive. I'm told I'll be credited back the surcharge, but I won't see that until February.

Anyway, customer service infractions aside, setting up Gmail, TwitterBerry, Facebook, Google Talk, Windows Live Messenger, Yahoo! Messenger, and of course Blackberry Messenger was a snap. Tried to use the internal mail client for Gmail but it doesn't respect my filters so I get the flashing light notification for every bit of spam, rather than just the interesting mail I want to see.

Setting up IRC was a little tricky, but thanks to Opera Mini and mibbit.com, I can more or less check Freenode channels on the go. Not ideal, but tolerable.

But the real challenge was getting access to my corporate mail, since we're not running a BES server, and thanks to all the supported options, there are over 5,000 possible ways to configure Cisco VPN access on a Blackberry. I'm not that patient.

Instead, I decided to try using MidpSSH 1.7.3 to connect into my laptop (which is already connected to the VPN), then use Mutt 1.5.18 to connect over IMAP to the mail server. Because I'm connecting to a local IP within my home LAN, I set the SSH session's Connection Type to WiFi, rather than Default, BES, or TCP/IP. In order to avoid having to key in a password every time I connect to the laptop, I set up an SSH key and shared that with my laptop.

If I want to have this solution work when I'm not at home, I'll have to expose my laptop to the outside world, and connect using Connection Type = Default to that public IP address instead of my more secure internal one. Still, it's a step in the right direction.

Incidentally, this tip might help, if you're having network access problems:

Options > Advanced Options > TCP > APN: "internet.com" (no username or password) [1], [2]

Now I just have to teach myself all the keyboard commands for Mutt. I tried using MidpSSH on my previous phone, a SonyEricsson W810i, but it's nearly impossible to do anything without a full keyboard.

If you're thinking of doing something like this, here are some handy links for setting up Mutt to connect to IMAP and to send mail via SMTP.

Is there a better way to VPN over BIS for IMAP mail? If so, feel free to share your solution here or via email with nickboldt(at)rogers(dot)blackberry(dot)net.

2008-11-22

Is there a MIDP 2.0 Music Player that does Ogg?

Having switched from ubuntu to Fedora and from .mp3 to .ogg and .flac, I've been looking for a player for my Sony Ericsson W810i... at least until such time as I finally settle on a Blackberry.

Here's what I've tried...

  • jorbis 0.0.17 - unusable UI (won't play); sources provided (no precompiled binary) won't compile with anything less than JDK 1.3; my phone requires CDC-1.1/MIDP 2.0, so this one's a non-starter
  • jOggPlayer 1.1.6s - works on linux with .ogg; ugly UI; won't compile locally with CDC-1.1 (no JApplet class) or JVM 6.0 (missing kiwi.io.* classes in source bundle); precompiled binary won't install on phone
  • jlGui 3.0 - works on linux with .mp3 and .ogg; WinAmp-skinnable; requires JDK 1.4 (won't install on phone)
  • jlGui 2.x - requires JDK 1.3
Does anyone know of a good .ogg or .flac player for MIDP 2.0 devices? None of the ones I tried above work.