Most recent edit on 2006-11-11 13:17:06 by ElieDeBrauwer
Additions:
Oh yeah, I also played around with wammu which is a graphical shell around gammu but it only implements the sms reading functions and such. What I really wanted was a way to fetch some images I took. (image000 -> image007 in the directory listing above). So it might be a good time to start playing with OBEX (OBject EXchange). So a first try was installing openobex-apps which contains irxfer:
That's all for now ;)
In case of questions or comments you can contact Elie De Brauwer at elieNO@SPAMde-brauwer.be without the NO and the SPAM.
Deletions:
Oh yeah, I also played around with wammu which is a graphical shell around gammu but it only implements the sms reading functions and such. What I really wanted was a way to fetch some images I took. (Image000 -> Image007 in the directory listing above). So it might be a good time to start playing with OBEX (OBject EXchange). So a first try was installing openobex-apps which contains irxfer:
That's all for now ;)
Edited on 2006-11-11 13:16:08 by ElieDeBrauwer
Additions:
Oh yeah, I also played around with wammu which is a graphical shell around gammu but it only implements the sms reading functions and such. What I really wanted was a way to fetch some images I took. (Image000 -> Image007 in the directory listing above). So it might be a good time to start playing with OBEX (OBject EXchange). So a first try was installing openobex-apps which contains irxfer:
root@lapedb:/home/edb# irxfer
Waiting for files
Unknown event!
................HEADER_LENGTH = 16136
put_done() Skipped header 42
put_done() Skipped header 44
Filename = Image000.jpg
Wrote Image000.jpg (16136 bytes)
That's all for now ;)
Oldest known version of this page was edited on 2006-11-11 12:57:33 by ElieDeBrauwer []
Page view:
Linux meets the Nokia 6020
Another cellphone to play with, the Nokia 6020 has a built in infrared port, and so has my laptop so this page will contain the results of me playing with both. This mythical laptop is running Ubuntu Edgy but nothing extraordinary will happen on it so most things can easily be adapted to work on other distributions and version as well. The first thing we need to do is get infrared working on the laptop. Which is only a matter of installing
irda-utils
edb@lapedb:~$ dpkg -l irda-utils
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii irda-utils 0.9.16-11ubunt IrDA management and handling utilities
Which gives us the following binaires and initscripts to play with:
edb@lapedb:~$ dpkg -L irda-utils | grep bin
/usr/sbin
/usr/sbin/irattach
/usr/sbin/findchip
/usr/sbin/irdadump
/usr/sbin/irdaping
/usr/sbin/irnetd
/usr/sbin/irpsion5
edb@lapedb:~$ dpkg -L irda-utils | grep init.d
/etc/init.d
/etc/init.d/irda-utils
/etc/init.d/irda-setup
So if everything goes well you will be able to do a
/etc/init.d/irda-utils start which will be loading the modules and getting everything up and running. You will notice
ifconfig shows an extra interface:
irda0 Link encap:IrLAP HWaddr 9a:ea:ad:xx
UP RUNNING NOARP MTU:2048 Metric:1
RX packets:5459 errors:0 dropped:0 overruns:0 frame:0
TX packets:18210 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:8
RX bytes:87813 (85.7 KiB) TX bytes:223333 (218.0 KiB)
And you are already able to sniff the link, tcpdump isn't extremely willing to do this, but wireshark (former ethereal) is:
No. Time Source Destination Protocol Info
11 3.172203 0x0000670C 0x9AEAADxx IrLAP U F, func=XID, "Nokia 6020"
Frame 11 (27 bytes on wire, 27 bytes captured)
IrDA Link Access Protocol
Address Field: 0xfe
Control field: U F, func=XID (0xBF)
Information Field
Format Identifier: 0x01
Source Device Address: 0x0000670c
Destination Device Address: 0x9aeaadxx
Discovery Flags: 0x01
Version Number: 0x00
IrDA Link Management Protocol
Service Hints: B125 (PnP Compatible, Modem, Fax, Telephony, IrCOMM, OBEX)
Character Set: 0x00
Device Nickname: Nokia 6020
Great isn't it ? Some other nice place to look is
/proc/net/irda :
edb@lapedb:/proc/net/irda$ for i in * ; do echo ">>>>>"$i"<<<<<"; cat $i; done
>>>>>discovery<<<<<
IrLMP: Discovery log:
nickname: Nokia 6020, hint: 0xb125, saddr: 0x9aeaadxx, daddr: 0x0000670c
>>>>>ircomm<<<<<
>>>>>irias<<<<<
LM-IAS Objects:
name: Device, id=0
- Attribute name: "IrLMPSupport", value[IAS_OCT_SEQ]: octet sequence (3 bytes)
- Attribute name: "DeviceName", value[IAS_STRING]: "lapedb"
>>>>>irlap<<<<<
irlap0 state: LAP_QUERY
device name: irda0, hardware name: ttyS1
caddr: 0xbe, saddr: 0x9aeaad46, daddr: 0x00670c
win size: 1, win: 1, line capacity: 960, bytes left: 960
tx queue len: 0 win queue len: 0 rbusy: FALSE mbusy: FALSE
retrans: 0 vs: 6 vr: 4 va: 5
qos bps maxtt dsize winsize addbofs mintt ldisc comp
tx 9600 0 64 1 12 0 0
rx 9600 0 64 1 12 0 0
>>>>>irlmp<<<<<
Unconnected LSAPs:
lsap state: LSAP_DISCONNECTED, slsap_sel: 0x0, dlsap_sel: 0xff, (IrIAS srv)
Registered Link Layers:
lap state: LAP_STANDBY, saddr: 0x9aeaadxx, daddr: 0xffffffff, num lsaps: 0
Connected LSAPs:
>>>>>irttp<<<<<
edb@lapedb:/proc/net/irda$
Mainly the discovery file is the most interesting one. Another tool to see what is going 'over the air' is
irdadump:
root@lapedb:/home/edb# irdadump
10:50:08.850771 xid:cmd 9aeaadxx > ffffffff S=6 s=0 (14)
10:50:08.934772 xid:rsp 9aeaadxx< 0000670c S=6 s=0 Nokia 6020 hint=b125 [ PnP Modem Fax Telephony IrCOMM IrOBEX ] (27)
10:50:08.938776 xid:cmd 9aeaadxx > ffffffff S=6 s=1 (14)
10:50:09.026749 xid:cmd 9aeaadxx > ffffffff S=6 s=2 (14)
10:50:09.114796 xid:cmd 9aeaadxx > ffffffff S=6 s=3 (14)
10:50:09.202814 xid:cmd 9aeaadxx > ffffffff S=6 s=4 (14)
10:50:09.290797 xid:cmd 9aeaadxx > ffffffff S=6 s=5 (14)
10:50:09.378804 xid:cmd 9aeaadxx > ffffffff S=6 s=* lapedb hint=0400 [ Computer ] (22)
10:50:11.851144 xid:cmd 9aeaadxx > ffffffff S=6 s=0 (14)
10:50:11.934977 xid:rsp 9aeaadxx < 0000670c S=6 s=0 Nokia 6020 hint=b125 [ PnP Modem Fax Telephony IrCOMM IrOBEX ] (27)
10:50:11.939058 xid:cmd 9aeaadxx > ffffffff S=6 s=1 (14)
10:50:12.027012 xid:cmd 9aeaadxx > ffffffff S=6 s=2 (14)
10:50:12.114992 xid:cmd 9aeaadxx > ffffffff S=6 s=3 (14)
10:50:12.203099 xid:cmd 9aeaadxx > ffffffff S=6 s=4 (14)
10:50:12.291022 xid:cmd 9aeaadxx > ffffffff S=6 s=5 (14)
10:50:12.379052 xid:cmd 9aeaadxx > ffffffff S=6 s=* lapedb hint=0400 [ Computer ] (22)
16 packets received by filter
And you can use
irdaping to ping you cellphone, mind that the address should be prefixed by
0x or converted to decimal:
root@lapedb:/home/edb# irdaping 0x670c
IrDA ping (0x0000670c on irda0): 32 bytes
32 bytes from 0x0000670c: irda_seq=0 time=104.13 ms.
32 bytes from 0x0000670c: irda_seq=1 time=104.15 ms.
32 bytes from 0x0000670c: irda_seq=2 time=104.10 ms.
32 bytes from 0x0000670c: irda_seq=3 time=104.38 ms.
32 bytes from 0x0000670c: irda_seq=4 time=104.17 ms.
32 bytes from 0x0000670c: irda_seq=5 time=104.12 ms.
32 bytes from 0x0000670c: irda_seq=6 time=104.12 ms.
32 bytes from 0x0000670c: irda_seq=7 time=104.44 ms.
Now the next step, doing something with the phone ;). Something I did on my laptop manually was a
modprobe ircomm I created a
~/.gammurc which looks like:
edb@lapedb:~$ cat .gammurc
[gammu]
port = /dev/ttyS1
connection = irda
The
/dev/ttyS1 is something I read in the irda-utiles initscript.
edb@lapedb:~$ gammu --identify
Manufacturer : Nokia
Model : 6020 (RM-30)
Firmware : 04.50 C (19-12-05)
Hardware : 5051
IMEI : 3597490xxxxxx
Original IMEI : 359749/00/xxxxxx/x
Manufactured : 07/2006
Product code : 0538990
UEM : 400
edb@lapedb:~$ gammu --monitor 1
Press Ctrl+C to break...
Entering monitor mode...
Enabling info about incoming SMS : No error.
Enabling info about incoming CB : Function not implemented. Help required.
Enabling info about calls : No error.
Enabling info about USSD : No error.
SIM phonebook : Used 032, Free 068
Dialled numbers : Used 006, Free 006
Received numbers : Used 008, Free 004
Missed numbers : Used 001, Free 011
Own numbers : Used 001, Free 002
Phone phonebook : Used 000, Free 500
ToDos : Used 0
Calendar : Used 0
Battery level : 14 percent
Network level : 90 percent
SIM SMS status : 18 used, 0 unread, 20 locations
Phone SMS status : 1 used, 0 unread, 150 locations, 21 templates
Network state : home network
Network : 206 10 (Mobistar, Belgium), LAC 32C8, CID 1DB8
Name in phone : "Mobistar"
Leaving monitor mode...
edb@lapedb:~$ gammu --getrootfolders
c:\1 - C (Permanent_memory)
a: - A (Permanent_memory 2)
edb@lapedb:~$ gammu --getfolderlisting c:\\1
c:/2;Folder;"Gallery";S
c:/4;Folder;"Hidden";PHS
c:/11;Folder;"Messages";S
c:/16;Folder;"VoiceSystem";S
c:/5;Folder;"java";S
edb@lapedb:~$ gammu --getfolderlisting a:
a:/FIM_perm_id;File;"FIM_perm_id";"Wed 08 Nov 2006 05:39:44 PM ";1142;H
a:/FIM_fixed_id;File;"FIM_fixed_id";"Sat 01 Jan 2005 12:00:00 AM ";404;H
a:/predeftemp;Folder;"predeftemp";RHS
a:/serviceapplication;Folder;"serviceapplication";HS
a:/predefcalendar;Folder;"predefcalendar";RHS
a:/predefsyncml;Folder;"predefsyncml";RHS
a:/HTTP;Folder;"HTTP";RHS
a:/predeffiledownload;Folder;"predeffiledownload";HS
a:/predefmessages;Folder;"predefmessages";RS
a:/User Content Package mobistar_be;File;"User Content Package mobistar_be";"Tue 07 Sep 2004 04:07:00 PM ";45;PRH
a:/predefomadm;Folder;"predefomadm";HS
a:/predefhiddenfolder;Folder;"predefhiddenfolder";RHS
a:/predefinfofolder;Folder;"predefinfofolder";RHS
a:/predefgallery;Folder;"predefgallery";RS\
Argl, this phones memory is filled with rubbish, I tried to get a full listing but it always seemed to time out. But the beginning looked like (warning not for the faint of heart):
db@lapedb:~$ gammu --getfilesystem
SFolder "C (Permanent_memory)"
S |-- Folder "Gallery"
HS | |-- Folder "PBwv"
HS | | |-- Folder "PBwvpreload"
HS | |-- Folder "Received"
HS | |-- Folder "drm_rights"
P HS |-- Folder "Hidden"
H | |-- "MMpushMMconnectionMMregistryMMfile.reg"
H | |-- "MMpushMMtimerMMregistryMMfile.reg"
H | |-- "ÂÂjavaÂmidletÂregÂattribÂlistÂfileÂÂ"
H | |-- "ÂÂjavaÂmidletÂregÂsuiteÂattribÂfileÂÂ"
H | |-- "ÂÂjavaÂmidletÂregÂsuiteÂcontentsÂfileÂÂ"
H | |-- "ÂÂjavaÂmidletÂregÂsuiteÂlistÂfileÂÂ"
S |-- Folder "Messages"
S | |-- Folder "DRAFTS"
S | |-- Folder "INBOX"
S | |-- Folder "OUTBOX"
S | |-- Folder "SENT"
S |-- Folder "VoiceSystem"
S | |-- Folder "Models"
S | |-- Folder "Prompts"
S |-- Folder "java"
S | |-- Folder "applications"
S | | |-- Folder "cnv_C"
| | | |-- "cnv_en_de_es-ES_fr_it_tr-TR_nl-NL_pt-PT.jad"
P | | | |-- "cnv_en_de_es-ES_fr_it_tr-TR_nl-NL_pt-PT.jar"
S | |-- Folder "email"
S | | |-- Folder "emcl2_C_man_enc_selection_eur"
P | | | |-- "S.rms"
| | | |-- "emcl2_en_de_es-ES_fr_it_tr-TR_nl-NL_pt-PT.jad"
P | | | |-- "emcl2_en_de_es-ES_fr_it_tr-TR_nl-NL_pt-PT.jar"
| | | |-- "reserved_rms.rms"
S | |-- Folder "games"
S | | |-- Folder "bkg2_C"
| | | |-- "bkg2_en_de_es-ES_fr_it_tr-TR_nl-NL_pt-PT.jad"
P | | | |-- "bkg2_en_de_es-ES_fr_it_tr-TR_nl-NL_pt-PT.jar"
S | | |-- Folder "bowl_C"
| | | |-- "bowl_en_de_es-ES_fr_it_tr-TR_nl-NL_pt-PT.jad"
P | | | |-- "bowl_en_de_es-ES_fr_it_tr-TR_nl-NL_pt-PT.jar"
S | | |-- Folder "raci_C"
P | | | |-- "HallOfFame.rms"
P | | | |-- "RACI.rms"
| | | |-- "raci_en_de_es-ES_fr_it_tr-TR_nl-NL_pt-PT.jad"
P | | | |-- "raci_en_de_es-ES_fr_it_tr-TR_nl-NL_pt-PT.jar"
S | | |-- Folder "staq_C"
P | | | |-- "HallOfFame.rms"
P | | | |-- "StaqqerState.rms"
| | | |-- "staq_en_de_es-ES_fr_it_tr-TR_nl-NL_pt-PT.jad"
P | | | |-- "staq_en_de_es-ES_fr_it_tr-TR_nl-NL_pt-PT.jar"
S | |-- Folder "imclient"
S | |-- Folder "java SMS"
Folder "A (Permanent_memory 2)"
H |-- "FIM_perm_id"
H |-- "FIM_fixed_id"
RHS |-- Folder "predeftemp"
HS |-- Folder "serviceapplication"
RHS |-- Folder "predefcalendar"
RHS |-- Folder "predefsyncml"
RHS |-- Folder "HTTP"
| |-- Folder "cache"
RHS | |-- Folder "cookie"
RHS | |-- Folder "opmenu"
HS |-- Folder "predeffiledownload"
R S |-- Folder "predefmessages"
R S | |-- Folder "predefdrafts"
R S | |-- Folder "predefsent"
R S | |-- Folder "predefoutbox"
R S | |-- Folder "predefinbox"
PRH |-- "User Content Package mobistar_be"
HS |-- Folder "predefomadm"
| |-- "USER_DATA"
| |-- Folder "01"
| | |-- "HLOG"
| | |-- Folder "19"
| | | |-- "01"
| | |-- Folder "07"
| | | |-- "01"
| | |-- Folder "01"
| | | |-- "02"
| | | |-- "01"
| | |-- Folder "04"
| | | |-- "01"
| | |-- Folder "03"
| | | |-- "02"
| | | |-- "01"
| | |-- Folder "02"
| | | |-- "02"
| | | |-- "01"
HS | |-- Folder "PRECFG"
RHS |-- Folder "predefhiddenfolder"
RHS | |-- Folder "predefmenus"
RHS | |-- Folder "predefwvlogos"
RHS | |-- Folder "predefvoiceprompts"
RHS | |-- Folder "predefvoicemodels"
RHS | |-- Folder "predefpbimgs"
HS | |-- Folder "predefdrmrights"
| |-- "Startup & Shutdown.jpg"
RHS | |-- Folder "predefWVPreload"
| | |-- "wv4.gif"
| | |-- "wv3.gif"
| | |-- "wv2.gif"
| | |-- "wv1.gif"
RHS |-- Folder "predefinfofolder"
| |-- "SuiteConf.xml"
R S |-- Folder "predefgallery"
HS | |-- Folder "predefthemeactive"
| | |-- "themes.ini"
| | |-- Folder "themes_setup1"
| | | |-- "theme_descriptor.xml"
| | | |-- "small_thumbnail.gif"
| | | |-- "Pattern.mid"
| | | |-- "large_thumbnail.gif"
| | | |-- "flow_w.jpg"
| | | |-- "flow_s.gif"
HS | |-- Folder "predefthemepreview"
| | |-- Folder "Thumbnails"
| | | |-- "268435473_large_thumbnail.gif"
| | | |-- "268435473_small_thumbnail.gif"
| | | |-- "268435470_large_thumbnail.gif"
| | | |-- "268435470_small_thumbnail.gif"
| | | |-- "268435463_large_thumbnail.gif"
| | | |-- "268435463_small_thumbnail.gif"
| | | |-- "268435462_large_thumbnail.gif"
| | | |-- "268435462_small_thumbnail.gif"
| | | |-- "268435461_large_thumbnail.gif"
| | | |-- "268435461_small_thumbnail.gif"
RHS | |-- Folder "predefreceived"
R S | |-- Folder "predefrecordings"
R S | |-- Folder "predefvideos"
R S | |-- Folder "predefphotos"
| | |-- "Image007.jpg"
| | |-- "Image006.jpg"
| | |-- "Image005.jpg"
| | |-- "Image004.jpg"
| | |-- "Image003.jpg"
| | |-- "Image002.jpg"
| | |-- "Image001.jpg"
| | |-- "Image000.jpg"
R S | |-- Folder "predefthemes"
| | |-- "Flow.nth"
R | | |-- "Architect.nth"
| | |-- "Flower.nth"
| | |-- "Lines.nth"
| | |-- "Horizons.nth"
R S | |-- Folder "predefgraphics"
| | |-- "Screensaver.jpg"
| | |-- "Mobistar Final.jpg"
| | |-- "Wave.gif"
| | |-- "Travel.gif"
| | |-- "Greetings.gif"
| | |-- "Gift.gif"
| | |-- "Grid.gif"
| | |-- "Coffee.gif"
| | |-- "Birthday.gif"
| | |-- "Screen1.gif"
| | |-- "UrbanSkyline.jpg"
| | |-- "OrangePassion.jpg"
| | |-- "Moon.gif"
| | |-- "Luminescence.jpg"
| | |-- "Goldfish.jpg"
| | |-- "Getaway.jpg"
| | |-- "Form.jpg"
| | |-- "Flower.jpg"
| | |-- "Dots.jpg"
| | |-- "Cubes.gif"
| | |-- "Canoes.jpg"
R S | | |-- Folder "predefpresencelogo"
| | | |-- "Pres_10.gif"
| | | |-- "Pres_09.gif"
| | | |-- "Pres_08.gif"
| | | |-- "Pres_07.gif"
| | | |-- "Pres_06.gif"
| | | |-- "Pres_05.gif"
| | | |-- "Pres_03.gif"
| | | |-- "Pres_04.gif"
| | | |-- "Pres_02.gif"
| | | |-- "Pres_01.gif"
R S | | |-- Folder "predefframes"
| | | |-- "Frame10.gif"
| | | |-- "Frame09.gif"
| | | |-- "Frame08.gif"
| | | |-- "Frame07.gif"
| | | |-- "Frame06.gif"
| | | |-- "Frame05.gif"
| | | |-- "Frame04.gif"
| | | |-- "Frame03.gif"
| | | |-- "Frame02.gif"
| | | |-- "Frame01.gif"
R S | | |-- Folder "predefcliparts"
| | | |-- "Clip-art10.gif"
| | | |-- "Clip-art09.gif"
| | | |-- "Clip-art08.gif"
| | | |-- "Clip-art07.gif"
| | | |-- "Clip-art06.gif"
| | | |-- "Clip-art05.gif"
| | | |-- "Clip-art04.gif"
| | | |-- "Clip-art03.gif"
| | | |-- "Clip-art02.gif"
| | | |-- "Clip-art01.gif"