Artikel getaggt mit IrDA

Linux Kernel 2.6.27 vs. IrDA

Schade, geht nicht: http://bugzilla.kernel.org/show_bug.cgi?id=11795#c3

Tags: ,

Mobilfon via IrDA mounten

Mit obexftp, obexfs und fuse läßt sich ein Mobil-Telephon sogar in’s Filesystem einhängen.

Nachdem das Telephon erreichbar ist, braucht’s eine Kernel Einstellung:

File systems  --->
        <M> Filesystem in Userspace support

und die Installation der Pakete:

$ sudo emerge sys-fs/fuse
$ sudo emerge app-mobilephone/obexftp
$ sudo emerge sys-fs/obexfs

Schnell noch die Verbindung getestet (ggf. mehrmals probieren):

$ gammu --identify
$ obexftp -i -l

Schon läßt sich das Telephon via obexfs & fuse mounten:

$ obexfs -i mountpoint
$ ls -l mountpoint
$ fusermount -u mountpoint

Vorsicht! Während das Telephon gemountet ist, funktioniert gammu nicht!

Tags: , , , , ,

Hotplug USB IrDA Dongle (gentoo Linux)

Udev can help to get rid of the ugly $ sudo irattach irda0 -s in my previous blog post.

I added the following udev rule:

$ cat /etc/udev/rules.d/95-usb-irda.rules
# Connect the IRDA USB Dongle
# see http://de.gentoo-wiki.com/Udev_Rules
# use "$ lsusb -v" to get the details about the dongle
ACTION=="add", BUS=="usb", SYSFS{manufacturer}==" Sigmatel Inc ", SYSFS{product}==" IrDA/USB Bridge", NAME="%k", RUN+="/usr/local/bin/usb-irda-add.sh"
# ACTION=="remove", BUS=="usb", SYSFS{idVendor}=="066f", SYSFS{idProduct}=="4200", RUN+="/usr/local/bin/usb-irda-remove.sh"

combined with the script

# cat /usr/local/bin/usb-irda-add.sh
#!/bin/sh
# Init script for /etc/udev/rules.d/95-usb-irda.rules
# modprobe ircomm_tty
irattach irda0 -s
# http://osdir.com/ml/drivers.gnokii/2003-09/msg00014.html
echo 115200 > /proc/sys/net/irda/max_baud_rate

and voila, the dongle hotplugs.

What’s puzzling me, is that /var/log/messages shows multiple identical entries:

Oct  3 22:06:17 sifr irattach: executing: '/sbin/modprobe irda0'
Oct  3 22:06:17 sifr irattach: executing: 'echo sifr > /proc/sys/net/irda/devname'
Oct  3 22:06:17 sifr irattach: executing: '/sbin/modprobe irda0'
Oct  3 22:06:17 sifr irattach: executing: 'echo 1 > /proc/sys/net/irda/discovery'
Oct  3 22:06:17 sifr irattach: executing: '/sbin/modprobe irda0'
Oct  3 22:06:17 sifr irattach: executing: 'echo sifr > /proc/sys/net/irda/devname'
Oct  3 22:06:17 sifr irattach: Starting device irda0
Oct  3 22:06:17 sifr irattach: executing: 'echo 1 > /proc/sys/net/irda/discovery'
Oct  3 22:06:17 sifr irattach: executing: 'echo sifr > /proc/sys/net/irda/devname'
Oct  3 22:06:17 sifr irattach: executing: '/sbin/modprobe irda0'
Oct  3 22:06:17 sifr irattach: Starting device irda0
Oct  3 22:06:17 sifr irattach: executing: 'echo 1 > /proc/sys/net/irda/discovery'
Oct  3 22:06:17 sifr irattach: executing: 'echo sifr > /proc/sys/net/irda/devname'
Oct  3 22:06:17 sifr irattach: Starting device irda0
Oct  3 22:06:17 sifr irattach: executing: 'echo 1 > /proc/sys/net/irda/discovery'
Oct  3 22:06:17 sifr irattach: Starting device irda0

and that unplugging doesn’t unload the kernel modules, despite the script

$ cat /usr/local/bin/usb-irda-remove.sh
#!/bin/sh
# Removal script for /etc/udev/rules.d/95-usb-irda.rules
rmmod ircomm_tty ircomm stir4200 irda crc_ccitt

Tags: , ,

Nokia 6610 & Linux (gentoo stable, amd64)

Auch von einem Linux Rechner aus kann man auf Mobiltelefone zugreifen, allerdings sind ein paar Vorbereitungen nötig. Siehe dazu auch die Gentoo IrDA Anleitung.

Ausgangspunkt ist ein Nokia 6610 Mobilfon, ein Gentoo AMD64 stable Rechner und ein Cytronix IR-USB Dongle.

Zunächst wollen ein paar Kernel Einstellungen gesetzt sein:

Networking  --->
        <M> IrDA (infrared) subsystem support  --->
           <M> IrCOMM protocol
        Infrared-port device drivers  --->
             <M> IrDA USB dongles
             <M> SigmaTel STIr4200 bridge (EXPERIMENTAL)

Damit die Module automatisch geladen werden:

$ cat /etc/modprobe.d/irda
alias irda0 stir4200
$ sudo update-modules

Ein paar Pakete installieren:

$ sudo emerge irda-utils gammu

und gammu einstellen:

$ cat ~/.gammurc
[gammu]
name = Nokia 6610
# port=/dev/ircomm0
connection = irdaphonet
synchronizetime = yes
# rsslevel = teststable
startinfo = yes
usephonedb = yes
# UsePhoneDB=yes

Das Telephon noch auf Infrarot lauschen lassen, und schon sollte es klappen:

$ sudo irattach irda0 -s;sleep 10;gammu --identify
INFO: there is later testing Gammu (1.20.94 instead of 1.20.0) available!
Manufacturer         : Nokia
Model                : 6610 (NHL-4U)
Firmware             : 5.52 C (19-09-03)
Hardware             : 0660
IMEI                 : 352927001317658
Original IMEI        : 352927/00/131765/8
Manufactured         : 11/2003
Product code         : 0510460
UEM                  : 8

Das war’s.

Jetzt läßt sich per gammu das Telephon inspizieren, z.B.

$ gammu getfilesystem
    c:/1.   SFolder "C (Permanent_memory)"
    c:/5.  HS |-- Folder "Empf. Dateien"
    c:/2.   S |-- Folder "Galerie"
    c:/3.   S |    |-- Folder "Bilder"
   c:/37.     |    |    |-- "Cell.jpg"
   c:/40.     |    |    |-- "Clock.jpg"
   c:/39.     |    |    |-- "Crisp.jpg"
...

Tags: , , , ,