Tux

...making Linux just a little more fun!

Talkback:133/tag.html

[ In reference to "The Monthly Troubleshooter: The USB Subsystem" in LG#133 ]


Mon, 4 Dec 2006 10:30:41 +0200

Hi,

Is there any common way to communicate with USB devices which aren't mass storage - like Motorola mobile phones, some Canon photo cameras and so on?

thanks, Vitaly


Top    Back


Rick Moen [rick at linuxmafia.com]
Mon, 4 Dec 2006 01:01:16 -0800

Quoting Vitaly Karasik (Vitaly.Karasik@Kayote.com):

> Is there any common way to communicate with USB devices which aren't
> mass storage - like Motorola mobile phones, some Canon photo cameras and
> so on?

On USB cameras: I don't have much experience with this, but rumour has it that software using gPhoto2 is your best bet: http://www.gphoto.org/

E.g., even Canon photo cameras can be talked to using PTP, which is essentially a sort of serial protocol over USB. (Canon have been entirely uncooperative, being essentially the NVidia / Broadcom of camera companies.)

You might want to start here: http://www.gphoto.org/doc/manual/FAQ.html#FAQ-camera-support

Motorola 'phones and Linux are something I've only just started contemplating, having just bought a Motorola RAZR V3, myself -- which turns out to itself use Linux + embedded Java + Qtopia Core, at least reportedly.

KMobileTools looks promising, plus a number of the other bookmarks in this collection: http://del.icio.us/ll350/Razr But I'll have to first find a cable to connect to my RAZR V3's mini-USB connector, something I've never seen before.

I've been sort of out of the Tamagotchi-surrogate gadget market for a while. E.g., my last cellular 'phone was coal-fired. (That's my story, and I'm sticking to it.)


Top    Back


Kapil Hari Paranjape [kapil at imsc.res.in]
Mon, 4 Dec 2006 16:59:17 +0530

Hello,

On Mon, 04 Dec 2006, Rick Moen wrote:

> Quoting Vitaly Karasik (Vitaly.Karasik@Kayote.com):
> 
> > Is there any common way to communicate with USB devices which aren't
> > mass storage - like Motorola mobile phones, some Canon photo cameras and
> > so on?
> 
> Motorola 'phones and Linux are something I've only just started
> contemplating, having just bought a Motorola RAZR V3, myself -- which
> turns out to itself use Linux + embedded Java + Qtopia Core, at least
> reportedly.

I just got a Razr V3 recently and had a number of difficulties with setting it up using Linux. For what it is worth here are my experiences. (Note that the V3i is an entirely different beast!)

1. The USB cable. This works with the recent(?) cdc-acm driver as a serial device (/dev/ttyACM0 for me). It cannot be used as a USB-storage device and mounted---worse luck.

(a) It doesn't work too well with "gammu". It seems that Motorola changed the AT+Cxxx command sequence "a bit". What you can do is download the phonebook with "--backup" but this is only for local storage since re-upload fails.

(b) "moto4lin" is a Qt-based program that works fine for editing the filesystem (up/down loading photos/music etc but not the phonebook!). It can also edit the "SEEM" which looks dangerous so I haven't tried it yet. You can also upload Java applications but I haven't done that either.

2. Bluetooth. This need a firmware upgrade (I was within the warranty period when I asked for one so it was free) to R374_G_0E.42.10R_A (at least; I noticed somewhere that _B,_C, etc are available). Even after this it was not entirely smooth sailing.

(a) Bluetooth connects with bluez-utils. It was a bit tricky for me (=command-line-type!). This needed a file /var/lib/bluetooth/<local_address>/pincodes containing entries like <phone_address> 12345678 The 12345678 is the "initial shared secret" used between your phone and the computer. The file can be deleted after establishing a connection the first time.

(b) "obexftp" and "obexfs" can be used to access all the audio/pictures/video that you create (but not the others; you need "moto4lin" for that). However, this leads to corrupt {down,up}loads. The situation was worse with a Mac that Sudeshna uses.

(c) "obexpushd" and "ussp-push" are inherently less secure programs and are difficult to "batchify" but those are the ones that currently work for me to download and upload files without corruption.

(d) "gammu" with "bluerfat" (which is AT commands over RFCOMM) work fine for the phonebook. This is because the phone seems to use standard AT+Cxxx commands over this interface---wierd that it doesn't over the cable! I am able to edit the phone book and even use my computer keyboard as a remote keyboard instead of the phone keyboard. Can't access multimedia data over this interface though.

3. Still to try (but will not try soon since I've already wasted two weeks on this!).

(a) Haven't yet tried to connect to the net using the phone. In principle, the difficulty here is not with the phone but with the service providers instructions---I still haven't managed to decode them---Indlish anyone?

(b) Haven't yet tried to unlock the pre-installed "Web sessions". This can be done by editing the SEEM according to various web sites. It doesn't have to be done yet since I am able to edit everything except the name of these sessions. That is enough to use the phone browser to "browse the web".

(c) Install Java applications and get them to work. I created some room by deleted all those keyboard damaging games that were installed but haven't got further than that.

(d) Re-write "moto4lin" as a command-line program. Why should one need to use Qt for a task like this?

Hope this helps,

Kapil. --


Top    Back


Kapil Hari Paranjape [kapil at imsc.res.in]
Mon, 4 Dec 2006 20:58:57 +0530

Hello,

On Mon, 04 Dec 2006, Kapil Hari Paranjape wrote:

> 1. The USB cable. This works with the recent(?) cdc-acm driver as a
> serial device (/dev/ttyACM0 for me). It cannot be used as a
> USB-storage device and mounted---worse luck.
> 
>         (a) It doesn't work too well with "gammu". It seems that
>         Motorola changed the AT+Cxxx command sequence "a bit". What
>         you can do is download the phonebook with "--backup" but
>         this is only for local storage since re-upload fails.

Oops. Apparently, this too was a bug with the firmware. The cited experience with "gammu" was prior to firmware upgrade. Now "gammu" works fine with the USB cable (for phonebook backup/recovery).

Regards,

Kapil. --


Top    Back


Benjamin A. Okopnik [ben at linuxgazette.net]
Mon, 4 Dec 2006 09:04:19 -0500

Hi, Vitaly -

You're probably unaware of this, but you sent your message in an HTML format. This doubled the size of your message without any benefit in return, and will create extra work for our Mailbag editor.

Please change your mailer's settings to stop it from doing this. For more info, please see <http://expita.com/nomime.html>.

On Mon, Dec 04, 2006 at 10:30:41AM +0200, Vitaly Karasik wrote:

> 
>    Hi,
> 
>    Is there any common way to communicate with USB devices which aren't mass
>    storage - like Motorola mobile phones, some Canon photo cameras and so on?

I used a Motorola phone for years as my main method of Net access; the standard module that deals with USB modems such as my Nextel phone is 'cdc_acm'. Setting it up is fairly easy; most of the advice in the article is still applicable, and the PPP setup is no big deal. Here's the config from my '/etc/ppp/peers/cell':

-detach		# I like to see the PPP messages on my xterm
noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/cell-hs"
# Turn off LCP negotiation!!!
local
# passive
crtscts
/dev/ttyACM0
57600
defaultroute
replacedefaultroute
noproxyarp
usepeerdns
And here is '/etc/chatscripts/cell-hs':

ATZ
OK ATQ0&K3
OK ATDTS=2
Not much to it.

As to cameras, most of them are treated as mass storage devices. I've had a Minolta, a Canon, and an Olympus, and I'm able to mount any of them (I no longer have the Minolta Dimage, but it worked fine when I did.) I do have to say, though, that I've never been able to get any of them to work with 'gphoto' - not that I've tried very hard; I just mount them and do whatever I need with the images.

-- 
* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *

Top    Back


Vitaly Karasik [Vitaly.Karasik at Kayote.com]
Mon, 4 Dec 2006 16:35:55 +0200

> Hi, Vitaly -
> 
> You're probably unaware of this, but you sent your message in 
> an HTML format. This doubled the size of your message without 
> any benefit in return, and will create extra work for our 
> Mailbag editor.
> 
> Please change your mailer's settings to stop it from doing 
> this. For more info, please see <http://expita.com/nomime.html>.

I know that HTML emails are bad thing, but I was under impression that I (my Outlook)use RTF, not HTML format. Next time I'll send old good plain text email using "mail" :-| Thanks! Vitaly


Top    Back


Kapil Hari Paranjape [kapil at imsc.res.in]
Tue, 5 Dec 2006 09:47:00 +0530

Hello,

On Mon, 04 Dec 2006, Benjamin A. Okopnik wrote:

> I used a Motorola phone for years as my main method of Net access; the
> standard module that deals with USB modems such as my Nextel phone is
> 'cdc_acm'. Setting it up is fairly easy; most of the advice in the
> article is still applicable, and the PPP setup is no big deal. Here's
> the config from my '/etc/ppp/peers/cell':

Ben inspired me to try out my own phone .. and .. it works with GPRS. I followed the (clear and concise) instructions at:

http://artm-friends.at/rm/bluetooth-gprs-suse10-RAZRv3-rm-HOWTO.txt Note that you usually need a username/password pair from your phone service provider to actually use the connection.

I think GPRS is a bit faster than the serial connection but that may be the effect of momentary exhuberance on my part.

> As to cameras, most of them are treated as mass storage devices. I've
> had a Minolta, a Canon, and an Olympus, and I'm able to mount any of
> them (I no longer have the Minolta Dimage, but it worked fine when I did.) 
> I do have to say, though, that I've never been able to get any of them
> to work with 'gphoto' - not that I've tried very hard; I just mount
> them and do whatever I need with the images.

Unfortunately, not all cameras present themselves as storage devices. The VGA camera on my Motorola RAZR is one such. I haven't yet tried it with "gphoto" though since "moto4lin" or "bluetooth+obex" works as explained earlier.

Regards,

Kapil. --


Top    Back


Rick Moen [rick at linuxmafia.com]
Mon, 4 Dec 2006 01:09:27 -0800

----- Forwarded message from Vitaly Karasik <Vitaly.Karasik@Kayote.com> -----

Date: Mon, 4 Dec 2006 11:04:20 +0200
From: Vitaly Karasik <Vitaly.Karasik@Kayote.com>
To: Rick Moen <rick@linuxmafia.com>
Subject: RE: [TAG] Talkback:133/tag.html (The Monthly Troubleshooter: The USB Subsystem)
Thanks! Vitaly


Top    Back