Thinkpad R40, Gentoo, IrDA, Obexftp

kategorie: howto
publikoval: robo
datum a čas: 11-10-2005 18:42:13

My wife got herself new phone, it's SonyEricsson K700 with almost 40MB memory, builtin camera and many other functions which are probably built to suck the battery. I'm long-time owner of Ericsson T39 which some people call "the last of the Phones". Unfortunately I haven't had time to make my T39 and Thinkpad play together. Now it's time.

BIOS

Very important thing is that you have Infrared enabled in your BIOS and I *think* you should have Serial port enabled too (I guess you are not going to screw anything if you enable it).

Kernel config

Currently I use 2.6.13-suspend2-r4 and it's configured like this (simple 'grep IR .config'):

CONFIG_IRDA=m
# CONFIG_IRLAN is not set
CONFIG_IRNET=m
CONFIG_IRCOMM=m
CONFIG_IRDA_ULTRA=y
CONFIG_IRDA_CACHE_LAST_LSAP=y
CONFIG_IRDA_FAST_RR=y
# CONFIG_IRDA_DEBUG is not set
# SIR device drivers
CONFIG_IRTTY_SIR=m
# Old SIR device drivers
CONFIG_IRPORT_SIR=m
# FIR device drivers
# CONFIG_USB_IRDA is not set
# CONFIG_SIGMATEL_FIR is not set
CONFIG_NSC_FIR=m
# CONFIG_WINBOND_FIR is not set
# CONFIG_TOSHIBA_FIR is not set
# CONFIG_SMC_IRCC_FIR is not set
# CONFIG_ALI_FIR is not set
# CONFIG_VLSI_FIR is not set
# CONFIG_VIA_FIR is not set

Setup

You need to install irda-utils package, so:

$ emerge irda-utils

Insert nsc-ircc module:

$ modprobe nsc-ircc dongle_id=0x09 io=0x2f8 irq=3

Now chcek what happened with dmesg:

$ dmesg

Module parameters are necessary (at least in my case) because without them module gets loaded but doesn't work. dmesg output without paramters:

nsc-ircc, Found chip at base=0x02e
nsc-ircc, driver loaded (Dag Brattli)
IrDA: Registered device irda0
nsc-ircc, Found dongle: HP HSDL-1100/HSDL-2100

dmesg output with parameters:

nsc-ircc, Found chip at base=0x02e
nsc-ircc, driver loaded (Dag Brattli)
IrDA: Registered device irda0
nsc-ircc, Using dongle: IBM31T1100 or Temic TFDS6000/TFDS6500

You need the latter one if you want to continue.

Now insert ircomm-tty module which loads ircomm module as dependency:

$ modprobe ircomm-tty
$ dmesg
IrCOMM protocol (Dag Brattli)

Let's start irda service. This needs to be configured first - edit /etc/conf.d/irda. Mine is here:

IRDA=yes
IRDADEV=irda0
DISCOVERY=yes

And start it:

$ /etc/init.d/irda start

Test it!

The first program to test the setup with is irdadump, simply start it:

$ irdadump

On your phone start IrDA and put it where your sensor is, then you should see something like this:

12:20:24.177307 xid:cmd 86a5183b > ffffffff S=6 s=* ivanka hint=0400 [ Computer ] (22) 
12:20:26.650702 xid:cmd 86a5183b > ffffffff S=6 s=0 (14) 
12:20:26.738745 xid:cmd 86a5183b > ffffffff S=6 s=1 (14) 
12:20:26.826794 xid:cmd 86a5183b > ffffffff S=6 s=2 (14) 
12:20:26.914850 xid:cmd 86a5183b > ffffffff S=6 s=3 (14) 
12:20:26.987299 xid:rsp 86a5183b < 2f014302 S=6 s=3 T39 hint=9124 [ PnP Modem IrCOMM IrOBEX ] (20)
12:20:27.002897 xid:cmd 86a5183b > ffffffff S=6 s=4 (14) 
12:20:27.090944 xid:cmd 86a5183b > ffffffff S=6 s=5 (14) 
12:20:27.178994 xid:cmd 86a5183b > ffffffff S=6 s=* ivanka hint=0400 [ Computer ] (22) 
12:20:29.652389 xid:cmd 86a5183b > ffffffff S=6 s=0 (14) 
12:20:29.740434 xid:cmd 86a5183b > ffffffff S=6 s=1 (14) 
12:20:29.828483 xid:cmd 86a5183b > ffffffff S=6 s=2 (14) 
12:20:29.916545 xid:cmd 86a5183b > ffffffff S=6 s=3 (14) 
12:20:29.988980 xid:rsp 86a5183b < 2f014302 S=6 s=3 T39 hint=9124 [ PnP Modem IrCOMM IrOBEX ] (20)
12:20:30.004584 xid:cmd 86a5183b > ffffffff S=6 s=4 (14) 
12:20:30.092629 xid:cmd 86a5183b > ffffffff S=6 s=5 (14) 
12:20:30.180682 xid:cmd 86a5183b > ffffffff S=6 s=* ivanka hint=0400 [ Computer ] (22)

Allright we have our phone recognized.

For other tests you can try minicom (emerge minicom):

$ minicom -s /dev/ircomm0

T39

Unfortunatelly minicom (or any other application, gnokii for example) hangs my connection so I have to unload IrDA modules and load them again but I can't get any further anyway. So this is stopper for T39. In dmesg I can see this:

irlap_adjust_qos_settings(), Detected buggy peer, adjust mtt to 10us!
IrLAP, no activity on link!
IrLAP, no activity on link!
IrLAP, no activity on link!
IrLAP, no activity on link!

I've read a lot of posts about similar problems. The best resource is probably this (search 't39'). Didn't help. But I read that some people were successful with it so try! I gave up.

K700

minicom worked you can write 'AT' there and phone should respond with 'OK'. The whole reason to this was to get photos and movies off of the phone. Let's emerge obexftp which allows you to access phone files:

$ emerge obexftp

Now try to list directories on the phone:

$ obexftp -i -l
No custom transport
Connecting...done
Receiving (null)... <?xml version=″1.0″ encoding=″UTF-8″?>
<!DOCTYPE folder-listing SYSTEM ″obex-folder-listing.dtd″>
<!--
 XML Coder, Dec  2 2004, 01:53:12, (C) 2001 Sony Ericsson Mobile Communications AB 
-->
<folder-listing version=″1.0″><folder name=″Obrazky″/>
<folder name=″Zvuky″/>
<folder name=″Schemata″/>
<folder name=″Videosoubory″/>
<folder name=″Jine″/>
</folder-listing>
done
Disconnecting...done

Sample session should get you idea how to obtain files you want:

$ obexftp -i -l Obrazky
No custom transport
Connecting...done
Receiving Obrazky...\<?xml version=″1.0″ encoding=″UTF-8″?>
<!DOCTYPE folder-listing SYSTEM ″obex-folder-listing.dtd″>
<!--
 XML Coder, Dec  2 2004, 01:53:12, (C) 2001 Sony Ericsson Mobile Communications AB 
-->
<folder-listing version=″1.0″><parent-folder/>
<file name=″Obrazek_18.jpg″ size=″20668″/>
<file name=″Obrazek_14.jpg″ size=″17988″/>
<file name=″Obrazek_9 (1).jpg″ size=″14724″/>
<file name=″Obrazek_8.jpg″ size=″21320″/>
<file name=″Domino.gif″ size=″20970″/>
<file name=″Screensaver.gif″ size=″7471″/>
<file name=″Shutdown.gif″ size=″153977″/>
<file name=″Startup.gif″ size=″188375″/>
<file name=″Autumn.gif″ size=″17660″/>
<file name=″Flirty.gif″ size=″3461″/>
<file name=″Ladybird.gif″ size=″26803″/>
<file name=″Love.gif″ size=″2810″/>
<file name=″Retro Choir.jpg″ size=″13702″/>
<file name=″Snowboard.gif″ size=″2900″/>
<file name=″Sony Ericsson.gif″ size=″65302″/>
<file name=″Wind Chimes.jpg″ size=″10164″/>
<file name=″Winter.gif″ size=″14331″/>
<folder name=″camera_semc″/>
</folder-listing> done Disconnecting...done $ obexftp -i -l Obrazky camera_semc No custom transport Connecting...done Receiving Obrazky...\<?xml version=″1.0″ encoding=″UTF-8″?> <!DOCTYPE folder-listing SYSTEM ″obex-folder-listing.dtd″> <!-- XML Coder, Dec 2 2004, 01:53:12, (C) 2001 Sony Ericsson Mobile Communications AB --> <folder-listing version=″1.0″><parent-folder/> <file name=″Obrazek_18.jpg″ size=″20668″/> <file name=″Obrazek_14.jpg″ size=″17988″/> <file name=″Obrazek_9 (1).jpg″ size=″14724″/> <file name=″Obrazek_8.jpg″ size=″21320″/> <file name=″Domino.gif″ size=″20970″/> <file name=″Screensaver.gif″ size=″7471″/> <file name=″Shutdown.gif″ size=″153977″/> <file name=″Startup.gif″ size=″188375″/> <file name=″Autumn.gif″ size=″17660″/> <file name=″Flirty.gif″ size=″3461″/> <file name=″Ladybird.gif″ size=″26803″/> <file name=″Love.gif″ size=″2810″/> <file name=″Retro Choir.jpg″ size=″13702″/> <file name=″Snowboard.gif″ size=″2900″/> <file name=″Sony Ericsson.gif″ size=″65302″/> <file name=″Wind Chimes.jpg″ size=″10164″/> <file name=″Winter.gif″ size=″14331″/> <folder name=″camera_semc″/>
</folder-listing> done Receiving camera_semc...|<?xml version=″1.0″ encoding=″UTF-8″?> <!DOCTYPE folder-listing SYSTEM ″obex-folder-listing.dtd″> <!-- XML Coder, Dec 2 2004, 01:53:12, (C) 2001 Sony Ericsson Mobile Communications AB --> <folder-listing version=″1.0″><parent-folder/> <file name=″Obrazek(22).jpg″ size=″150074″/> <file name=″Obrazek(21).jpg″ size=″141690″/> <file name=″Obrazek(20).jpg″ size=″6869″/> <file name=″Obrazek(19).jpg″ size=″7643″/> <file name=″Obrazek(18).jpg″ size=″5748″/> <file name=″Obrazek(17).jpg″ size=″7714″/> <file name=″Obrazek(16).jpg″ size=″5926″/> <file name=″Obrazek(15).jpg″ size=″6310″/> <file name=″Obrazek(14).jpg″ size=″6429″/> <file name=″Obrazek(13).jpg″ size=″5246″/> <file name=″Obrazek(12).jpg″ size=″6059″/> <file name=″Obrazek(10).jpg″ size=″12057″/> <file name=″Obrazek(6).jpg″ size=″7220″/> <file name=″Obrazek(3).jpg″ size=″69317″/> <file name=″Obrazek(9).jpg″ size=″77353″/> <file name=″Obrazek(5).jpg″ size=″91445″/> <file name=″Obrazek(1).jpg″ size=″91820″/> <file name=″Obrazek(8).jpg″ size=″69335″/> <file name=″Obrazek(7).jpg″ size=″92984″/> <file name=″Obrazek(4).jpg″ size=″66515″/> <file name=″Obrazek(2).jpg″ size=″47749″/> </folder-listing> done Disconnecting...done $ obexftp -i -c Obrazky camera_semc -g Obrazek\(1\).jpg No custom transport Connecting...done Sending Obrazky... Sending Obrazky... done Sending camera_semc... Sending camera_semc... done Receiving Obrazek(1).jpg...|done Disconnecting...done

Useful Links

Přidej příprcek:






SPAM
28-02-2006 01:40:36 Σ B @ 16794 #^

SPAM [RAW]

m4
13-10-2005 18:17:05 Σ B @ 10530 #^

me se prave zda ze nokie ho ma nejvychytnejsi..aspon model 6310i nemel konkurenta. na kazdem telefonu najdes slabinu...nicmene muzu posuzovat jenom ze skusenosti , panasonic,siemens,nokie.

robo
13-10-2005 17:15:59 Σ B @ 10521 #^

ja sem mel tu nokii na sluzebce, myslim 6230 nebo co a jako jo, dobrej telefen - fotak, radio, co si clovek vzpomene, i dobra klavesnice, jen byl problem, ze nokia ma ovladani, na ktery nejsem zvyklej
ale nezabranilo mi to usoudit, ze Ericsson ma ovladani lip zmaknuty

fotky z te nokie [onyon.net] [onyon.net] [onyon.net]

toNic
13-10-2005 17:05:35 Σ B @ 10520 #^

je tezky vybrat, zatim davam na dojem toho, co sem mel v ruce a 700i mi prisla nejlepsi az na klavesnici, ale tu ma dneska na <> pulka mobilu (druha ma na <> zase neco jinyho).
No nic koupim radsi novou vydli na kolo a je po ptakach

m4
13-10-2005 16:42:19 Σ B @ 10519 #^

aha sem prehledl ze fotak, karta a hudba je vyhodou :D

m4
13-10-2005 16:41:07 Σ B @ 10518 #^

mam nokii 6230i a splnuje vsechno co ches toniku, ale nevim kolik stoji..nicmene uz je to vyvonena vecika.


btw robo e t39 ma moznost externi karty? a prehravani mp3?

robo
13-10-2005 16:19:43 Σ B @ 10515 #^

vsechny tvoje pozadavky na telefon splnuje muj Ericsson T39 uz notnou davku let starej a je pravda, ze moc telefonu tohle proste nezvlada

stejne to ti vyrobci takhle delaji schvalne - to abys mel kam prejit (=na vyssi model) az budes chtit novej telefon

toNic
13-10-2005 16:18:50 Σ B @ 10514 #^

ovsem tohle je vyvonenost [mobil.idnes.cz]

toNic
13-10-2005 16:17:04 Σ B @ 10513 #^

... anebo technologicky postup znehodnoti mobil ... napr. site treti generace (WCDMA 2100 MHz)

toNic
13-10-2005 16:14:13 Σ B @ 10512 #^

zajimava alternativa by byl tenhle manasek [mobil.idnes.cz]
Napadla me jeste jedna nesporna nevyhoda tehle kompletu ... kdyz odejde mobil, je tim padem v <> i fotak a musica, kdyz jsou 3 pristroje oddelene odejde vetsinou jen jeden (pokud ti vsechny tri jako nahodou neuklouznou v koupelne)

toNic
13-10-2005 16:03:51 Σ B @ 10511 #^

... fotak, karta a musica jsou vyhodou ... jen za tyhle veci bych dal cca 10000,-, takze kdyz to bude v rozumny kvalite na mobilu v tyhle cene tak mam vlastne ostatni funkce uplne zadarmo! :-)

toNic
13-10-2005 16:00:58 Σ B @ 10510 #^

co ja chci od mobila, tak aby - se z nej dalo telefonovat :), aby vydrzela baterka a i normalne se dokazal mobil s temer vyblitou baterii chovat jako inteligent a ne jako <> (tzn. nekdo vola a v tu ranu je mobil vybitej a ty v hajzlu .. to je normalni u ty mi panasracky). dal inteligentni budik (lze nastavit dny a hodiny) ktery ma volbu na prodlouzeni (tedy zamacknuti neni totalni konec, ale za 5 minut buzeni pokracuje).
No a fotek a karta jsou vyhodou.
Za to co jsem napsal do pozadavku nehodlam dat vic nez 2000,- u novyho, jenze 90% mobilu nedokaze uspokojit ani tohle malo, hlavne ze maji fotak 0,3 MP, ktery je totalne na nic

vana
13-10-2005 15:30:59 Σ B @ 10509 #^

a potom este zrno pri iso200 a viac... s cim nakoniec nie som az tak spokojny - iso400 nie je vhodne na ine nez webove zmenseniny a 200 sa da...

vana
13-10-2005 15:29:38 Σ B @ 10508 #^

pardon nie digi hladaciku ale display... hladacik to ma opticky, samozrejme nie je to zrkadlovka... ten hladacik nepouzivam

vana
13-10-2005 15:28:27 Σ B @ 10507 #^

ja mam malicky isus40 fotak s malinkou optikou a foti squelle podla mna... ma male cocky, ale su z nejakych keramickych materialov z vyskokym indexom lomu, takze vraj preto moze byt ta optika mensia ko zvycajne... kresbu ma podla mna krasnu... na to aky je maly... samozreme kuaBov fotak to nikdy nebude co sa tyka kresby, ale zato ma krajsie fotky ako kopec automatov typu (ultra)zoom

pri vybere som pozeral
- na kvalitu vystupu
- kvalitu a rychlost digitalneho hladaciku
- rychlost snimania
- rozmery a vaha
- svetelnost
- "manualne" nastavenia

robo
13-10-2005 14:15:51 Σ B @ 10502 #^

vec se ma tak, ze sice je tam 2MBPix sensor, ale je to malinky zarizeni a jako takovy proste nemuze mit kvalitni optiku a na optice zalezi nejvice

podle me je to ale individualni, proste bych si prosel na webu vzorky fotek z tohohle telefonomobilu a rozhodl se jestli mi vyhovujou

toNic
13-10-2005 13:57:53 Σ B @ 10499 #^

proc sunt? to me zajima, nerad bych na to prisel s osobni zkusenosti. co bys doporucil jinyho ?

robo
13-10-2005 10:43:25 Σ B @ 10478 #^

kvalitni fotak to ma co se tyce porovnani s ostatnimi telefony, jinak je to sunt

toNic
13-10-2005 10:11:58 Σ B @ 10472 #^

to nevim, ale nevadi mi to. nechci si ho koupit kvuli edge, ale kvuli tomu, ze : ma kartu = prenos dat, ma kvalitni fotak (kvalitni bych podtrhl) a ja nechci dalsi krabicku co zvladne temer to sami, a predevsim se me tam libi ten soft. co postradam u jinych jsem na nem nasel a to je pro me to nej kriterium, protoze design a schopnosti bez dobryho ovladani jsou na <>

jirIN
12-10-2005 12:31:06 Σ B @ 10451 #^

tonic sice to asi potrebovat nebudes, ale proc do takeho stroje nenarvou EDGE?

robo
12-10-2005 12:01:02 Σ B @ 10450 #^

nevim vo tom, ze by k tomu byl kabel
ale umi to bluetooth, coz je nejvetsi pohoda, bohuzel BT mam jen na pracovnim kompu, coz uz takova pohoda neni

toNic
12-10-2005 11:47:23 Σ B @ 10447 #^

proc si delat zivot slozitejsi?, kdyz to jde pres kabel :-P ... nedodavaj standart s tim mobilem? ja si napisu jeziskovi o 750-ku tak by me to zajimalo, bo IrDA nemam ... no a vlastne ani nevim co na to rekne jezisek

slon
12-10-2005 11:21:04 Σ B @ 10446 #^

hmm tak z tohohle sem fakt odvazanej