Wednesday, December 26, 2007

Absolutely brilliant: AlienBBC

I posted earlier my discovery of the Squeezebox, which streams audio files on your laptop to your audio system, in my case the Bose system, over your WiFi home network.

That is truly wonderful, but only works for files resident on the host computer. What about Internet audio streams?

Well, as usual if you ask the question "what will it take" rather than "can I" you get an answer that works. In this case it is

AlienBBC


http://www.x2systems.com/AlienBBC/

It is absolutely brilliant. It captures the BBC streaming audio and routes
it to the SlimServer, where it appears as the first entry on {Internet
Radio}

AlienBBC is a plugin for SlimServer/SqueezeCenter, the software platform used by the Slim Devices line of networked music players.

It is primarily designed to allow the user to listen to BBC Radio streams but also adds the ability to listen to any RealAudio stream. Currently, it is capable of parsing and playing the following resources:

* All the main BBC Radio 'Live' streams
* The BBC 'Listen Again' Audio on Demand content
* All Available BBC Radio 2 Content
* All Available BBC Radio 4 Content
* The BBC7 Audio Archive
* The Available BBC Local Radio Stations
* Radio 5 Live Audio Archive
* Some of the ABC Content (Australian Broadcasting Corporation)
* A number of other streams, suggested by AlienBBC Users

In addition, the code will also parse any 'AlienBBC Playlists' (formerly 'AlienStream' playlists) available, and provides a more robust environment for the playing of those streams.

AlienBBC functions on Linux, MacOS/X, and Windows platforms.

There were some startup problems. Archived files were truncating after
about five minutes of play, while live play files were not.

Going on line at the slimserver forums:

http://forums.slimdevices.com/

led to a dialog that solves the problem. Depending on your version, there
are various "*convert.conf" files containing a *-bandwidth 100000* command
line option. Deleting these solves the problem.

In my case it was


/usr/local/slimserver/slimserver-convert.conf

I backed this up and then made the recommended -bandwidth option deletion.

And then the world was at peace.

Happy Boxing Day.

Sunday, December 23, 2007

Getting it together: Bluetooth file system

Heh. This was initially posted as a reference to the BLEUtooth system...

Shows my bias. Sorry about that, make it BLUEtooth.

I seem to be spending an inordinate amount of time trying to get things sorted away and in place. Very much a whack-a-mole kind of existence.


This fall I got a new cellphone after several years, a Nokia E90. Truly sweet. It can take a microSD chip and act as a thumbdrive. In doing so you have to disable the rest of the phone so that it works only as a thumbdrive on the end of a tether.

Bummer.


Of course I want more: Technicolor Mental Telepathy.

OK, can't go there yet, but how about a Christmas wishlist? How about a wireless mounting that will let me do all normal things without all the wire and tether and other folderol?

===========================
It turns out that you need three things:

the FUSE kernel module

the openftp project

the openfs project

With those you can accomplish exactly the desired outcome.

I plugged the following into Google:

mount bluetooth file system as drive

and immediately found FUSE:

http://fuse.sourceforge.net/wiki/index.php/

FUSE is a system that adds a module to the Linux kernel to enable file mounting and transfer with various arcane systems, including the Nokia Bluetooth system.

Further googling led me to OpenOBEX:

http://sourceforge.net/projects/openobex/

which provides the infrastructure, in particular the openfs system:

http://sourceforge.net/project/showfiles.php?group_id=8960&package_id=178407

This in turn depends on obexftp. SuSE 10.2 offers obexftp on its distribution disk, but not the compilation headers, so you need to download the original source from the site above.

You will also need the development package for python, since obexftp in turn depends on that.

Some excellent references include:

http://www.siltala.net/2007/07/25/mounting-a-nokia-phone-a-little-bit-easier/
http://davesource.com/Solutions/20070520.T-Mobile-Nokia-E65-Ubuntu-Linux.html#obexfs

-----
I know this sounds complicated, but it is progressively so and very doable.

At the end you have a system that will easily mount the phone as a drive, from which you can open , copy, move, rename, delete, and execute files directly without having to fumble around with wires and more especially not have to disable one part or another of the phone to access the information.

Here are some example routines that make it a single keyword snap:

===========================================================
mnt_obex
will mount the phone as /mnt/nokia_e90/:

#! /bin/bash
#
# License: LGPL v3+ (see the file LICENSE)
# (c)2001-2008 C. Andrews Lavarre
# email : alavarre@ids.net
#
########################################################################
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# The GNU General Public License is posted at #
# http://www.gnu.org/licenses/gpl.txt #
# You may also write to the Free Software Foundation, Inc., #
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #
########################################################################

# This routine was modified 071223 by C. A. Lavarre (Andy).
# It mounts the Nokia E90 as a drive at /mnt/nokia_e90
# Usage:
# mnt_obex
# Mount the phone as a directory
obexfs -b00:01:02:03:04:05 -B11 /mnt/nokia_e90/

Obviously, you will substitute your own drives vice /mnt/nokia_e90, MAC address for 00:01:02:03:04:05 and your channel for 11 in the -B parameter. Look at the references for more detail.

===========================================================
umnt_obex
will unmount the phone

#! /bin/bash
#
# License: LGPL v3+ (see the file LICENSE)
# (c)2001-2008 C. Andrews Lavarre
# email : alavarre@ids.net
#

########################################################################
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# The GNU General Public License is posted at #
# http://www.gnu.org/licenses/gpl.txt #
# You may also write to the Free Software Foundation, Inc., #
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #
########################################################################

# This routine was modified 071223 by C. A. Lavarre (Andy).
# It unmounts the Nokia E90 as a drive at /mnt/nokia_e90
# Usage:
# umnt_obex
# Unmount the phone as a directory
fusermount -u /mnt/nokia_e90/

===========================================================


open_todos
will bring up the ToDo list spreadsheet directly from the phone

#! /bin/bash
#
# License: LGPL v3+ (see the file LICENSE)
# (c)2001-2008 C. Andrews Lavarre
# email : alavarre@ids.net
#

########################################################################
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# The GNU General Public License is posted at #
# http://www.gnu.org/licenses/gpl.txt #
# You may also write to the Free Software Foundation, Inc., #
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #
########################################################################

# This routine was modified 071223 by C. A. Lavarre (Andy).
# It mounts the Nokia E90 as a drive at /mnt/nokia_e90
# then opens the todo.xls file from Nokia 2G with oocalc for refinement
# Arguments:
# Usage:
# open_todos
# Mount the phone as a directory
mnt_obex
# Copy the file to the Desktop so that it will be backed up
cp /mnt/nokia_e90/E:/action/todos.xls /Desktop/
# Call CALC to modify
oocalc /mnt/nokia_e90/E:/action/todos.xls &

===========================================================

close_todos
will save the spreadsheet to both the Desktop and the phone and then unmount the phone.

#! /bin/bash
#
# License: LGPL v3+ (see the file LICENSE)
# (c)2001-2008 C. Andrews Lavarre
# email : alavarre@ids.net
#

########################################################################
# This program is free software; you can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 3 of the License, or #
# (at your option) any later version. #
# #
# This program is distributed in the hope that it will be useful, #
# but WITHOUT ANY WARRANTY; without even the implied warranty of #
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
# GNU General Public License for more details. #
# #
# The GNU General Public License is posted at #
# http://www.gnu.org/licenses/gpl.txt #
# You may also write to the Free Software Foundation, Inc., #
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA #
########################################################################

# This routine was modified 071223 by C. A. Lavarre (Andy).
# It closes the todo.xls file from Nokia 2G and saves it to the /Desktop
# then unmounts the Nokia E90 as a drive at /mnt/nokia_e90
# Usage:
# close_todos

# Copy the file to the Desktop so that it will be backed up
cp /mnt/nokia_e90/E:/action/todos.xls /Desktop/

# Unmount the phone as a directory
fusermount -u /mnt/nokia_e90

===========================================================