From 5d49fe8eea4e11457b4f9904eb0d5db435679841 Mon Sep 17 00:00:00 2001 From: jankratochvil <> Date: Sun, 17 Mar 2002 20:30:04 +0000 Subject: [PATCH] This commit was manufactured by cvs2svn to create branch 'decode'. Cherrypick from uc 2002-02-18 02:07:04 UTC jankratochvil 'This commit was manufactured by cvs2svn to create branch 'uc'.': COPYING Docs/Makefile Docs/default/3210/nse8/pictures/picture1.nlm Docs/default/3210/nse8/pictures/picture2.nlm Docs/default/3210/nse8/pictures/picture3.nlm Docs/default/3210/nse8/startup.nlm Docs/default/3210/nse9/pictures/picture1.nlm Docs/default/3210/nse9/pictures/picture2.nlm Docs/default/3210/nse9/pictures/picture3.nlm Docs/default/3210/nse9/pictures/picture4.nlm Docs/default/3210/nse9/startup.nlm Docs/default/3310/TwojaEra Docs/default/3310/pictures/picture1.nlm Docs/default/3310/pictures/picture10.nlm Docs/default/3310/pictures/picture11.nlm Docs/default/3310/pictures/picture12.nlm Docs/default/3310/pictures/picture13.nlm Docs/default/3310/pictures/picture14.nlm Docs/default/3310/pictures/picture2.nlm Docs/default/3310/pictures/picture3.nlm Docs/default/3310/pictures/picture4.nlm Docs/default/3310/pictures/picture5.nlm Docs/default/3310/pictures/picture6.nlm Docs/default/3310/pictures/picture7.nlm Docs/default/3310/pictures/picture8.nlm Docs/default/3310/pictures/picture9.nlm Docs/default/6150/caller/colleagues.nlm Docs/default/6150/caller/family.nlm Docs/default/6150/caller/friends.nlm Docs/default/6150/caller/other.nlm Docs/default/6150/caller/vip.nlm Docs/default/6150/startup.nlm Docs/default/6210/caller/colleagues.bmp Docs/default/6210/caller/family.bmp Docs/default/6210/caller/friends.bmp Docs/default/6210/caller/other.bmp Docs/default/6210/caller/vip.bmp Docs/default/6210/picture/picture1.nlm Docs/default/6210/picture/picture10.nlm Docs/default/6210/picture/picture2.nlm Docs/default/6210/picture/picture3.nlm Docs/default/6210/picture/picture4.nlm Docs/default/6210/picture/picture5.nlm Docs/default/6210/picture/picture6.nlm Docs/default/6210/picture/picture7.nlm Docs/default/6210/picture/picture8.nlm Docs/default/6210/picture/picture9.nlm Docs/default/6210/startup.bmp Docs/default/sounds/readme Docs/default/sounds/ring2.txt Docs/default/sounds/ringtones/9th_Symphony Docs/default/sounds/ringtones/Attraction Docs/default/sounds/ringtones/Auld_Lang_Syne Docs/default/sounds/ringtones/Bach_nr_3 Docs/default/sounds/ringtones/Badinerie Docs/default/sounds/ringtones/Barn_dance Docs/default/sounds/ringtones/Baroque Docs/default/sounds/ringtones/Basic_rock Docs/default/sounds/ringtones/Bee Docs/default/sounds/ringtones/Bossanova Docs/default/sounds/ringtones/Bounce Docs/default/sounds/ringtones/Brave_Scotland Docs/default/sounds/ringtones/Bumblebee Docs/default/sounds/ringtones/Charleston Docs/default/sounds/ringtones/Chase Docs/default/sounds/ringtones/Cicada Docs/default/sounds/ringtones/Circles Docs/default/sounds/ringtones/City_bird Docs/default/sounds/ringtones/Cladoceran Docs/default/sounds/ringtones/Classical Docs/default/sounds/ringtones/Dawn Docs/default/sounds/ringtones/Dizzy Docs/default/sounds/ringtones/Do-mi-so Docs/default/sounds/ringtones/Elise Docs/default/sounds/ringtones/Entertainer Docs/default/sounds/ringtones/Etude Docs/default/sounds/ringtones/Fly Docs/default/sounds/ringtones/Fool about Docs/default/sounds/ringtones/Four_seasons Docs/default/sounds/ringtones/Frantic Docs/default/sounds/ringtones/Frog Docs/default/sounds/ringtones/Fuga Docs/default/sounds/ringtones/Funfair Docs/default/sounds/ringtones/Fusion Docs/default/sounds/ringtones/Get_cool Docs/default/sounds/ringtones/Going_up Docs/default/sounds/ringtones/Grande_valse Docs/default/sounds/ringtones/Groovy_blue Docs/default/sounds/ringtones/Happy_return Docs/default/sounds/ringtones/Helan Docs/default/sounds/ringtones/HipHop Docs/default/sounds/ringtones/Hopping_down Docs/default/sounds/ringtones/Hunt Docs/default/sounds/ringtones/Hurdy-gurdy Docs/default/sounds/ringtones/Improvisation Docs/default/sounds/ringtones/Indifference Docs/default/sounds/ringtones/Intro Docs/default/sounds/ringtones/Jingle_bells Docs/default/sounds/ringtones/Jumping Docs/default/sounds/ringtones/Kick Docs/default/sounds/ringtones/Knick-knack Docs/default/sounds/ringtones/Knock_again Docs/default/sounds/ringtones/Knock_knock Docs/default/sounds/ringtones/Lamb Docs/default/sounds/ringtones/Left_hand Docs/default/sounds/ringtones/Liszt Docs/default/sounds/ringtones/Low Docs/default/sounds/ringtones/Mangrove Docs/default/sounds/ringtones/Marry Docs/default/sounds/ringtones/Matilda Docs/default/sounds/ringtones/Menuet Docs/default/sounds/ringtones/Merry_Xmas Docs/default/sounds/ringtones/Mexican_Hat_Dance Docs/default/sounds/ringtones/Moon & clouds Docs/default/sounds/ringtones/Mosquito Docs/default/sounds/ringtones/Mozart40 Docs/default/sounds/ringtones/Nokia_tune Docs/default/sounds/ringtones/Ode_to_Joy Docs/default/sounds/ringtones/Orient Docs/default/sounds/ringtones/Persuasion Docs/default/sounds/ringtones/Piano_concerto Docs/default/sounds/ringtones/Playground Docs/default/sounds/ringtones/Polite Docs/default/sounds/ringtones/Polka Docs/default/sounds/ringtones/Polska Docs/default/sounds/ringtones/Progress Docs/default/sounds/ringtones/Reveille Docs/default/sounds/ringtones/Right_Hand Docs/default/sounds/ringtones/Ring_ring Docs/default/sounds/ringtones/Robo_N1X Docs/default/sounds/ringtones/Rocket Docs/default/sounds/ringtones/Salsa Docs/default/sounds/ringtones/Samba Docs/default/sounds/ringtones/Samba_rumble Docs/default/sounds/ringtones/Scifi Docs/default/sounds/ringtones/Siren Docs/default/sounds/ringtones/Songette Docs/default/sounds/ringtones/Sunny_walks Docs/default/sounds/ringtones/Swan_Lake Docs/default/sounds/ringtones/Tango Docs/default/sounds/ringtones/Tangoed Docs/default/sounds/ringtones/Tap dance Docs/default/sounds/ringtones/Tchaikovsky Docs/default/sounds/ringtones/That_is_it Docs/default/sounds/ringtones/The_Buffoon Docs/default/sounds/ringtones/Tick_tick Docs/default/sounds/ringtones/Toreador Docs/default/sounds/ringtones/Trio Docs/default/sounds/ringtones/Tripod Docs/default/sounds/ringtones/Valkyrie Docs/default/sounds/ringtones/Walze_Brillant Docs/default/sounds/ringtones/William_Tell Docs/default/sounds/sms/SMS_Ancending Docs/default/sounds/sms/SMS_Beep_once Docs/default/sounds/sms/SMS_Special Docs/default/sounds/sms/SMS_Standard Docs/developers/gnokii/CodingStyle Docs/developers/other/ringtones.txt Docs/developers/other/sniffs/irda/tools/fcs/fcs.c Docs/developers/other/sniffs/irda/tools/fcs/fcs.h Docs/developers/other/sniffs/irda/tools/include/irda.h Docs/developers/other/sniffs/irda/tools/include/irlap.h Docs/developers/other/sniffs/irda/tools/intercept/Makefile Docs/developers/other/sniffs/irda/tools/intercept/irda_intercept.c Docs/developers/other/sniffs/sniffing.txt Docs/developers/protocol/readme Docs/en_US/gnokii/xgnokii/sms/sms.gif Docs/en_US/gsm/cables/cable1.gif Docs/en_US/gsm/cables/cable2.gif Docs/en_US/gsm/cables/switch.gif Docs/en_US/gsm/netmon/3210_09.gif Docs/en_US/gsm/netmon/3210_092.gif Docs/en_US/gsm/netmon/3210_10.gif Docs/en_US/gsm/netmon/net_mon1.gif Docs/en_US/gsm/netmon/net_mon2.gif Docs/en_US/gsm/netmon/net_mon3.gif Docs/en_US/gsm/netmon/nm_01.gif Docs/en_US/gsm/netmon/nm_02.gif Docs/en_US/gsm/netmon/nm_03.gif Docs/en_US/gsm/netmon/nm_04.gif Docs/en_US/gsm/netmon/nm_05.gif Docs/en_US/gsm/netmon/nm_06.gif Docs/en_US/gsm/netmon/nm_07.gif Docs/en_US/gsm/netmon/nm_08.gif Docs/en_US/gsm/netmon/nm_09.gif Docs/en_US/gsm/netmon/nm_10.gif Docs/en_US/gsm/netmon/nm_11.gif Docs/en_US/gsm/netmon/nm_12.gif Docs/en_US/gsm/netmon/nm_14.gif Docs/en_US/gsm/netmon/nm_15.gif Docs/en_US/gsm/netmon/nm_3210.gif Docs/en_US/gsm/netmon/nm_32102.gif Docs/en_US/gsm/netmon/nm_3310.gif Docs/en_US/gsm/netmon/nm_5110.gif Docs/en_US/gsm/netmon/nm_6150.gif Docs/en_US/gsm/netmon/nm_6190.gif Docs/en_US/gsm/netmon/nm_6210.gif Docs/en_US/gsm/netmon/nm_6310.gif Docs/en_US/gsm/netmon/nm_7110.gif Docs/en_US/gsm/netmon/nm_8210.gif Docs/en_US/gsm/netmon/nm_8310.gif Docs/en_US/gsm/netmon/nm_9110.gif Docs/en_US/gsm/netmon/nm_9210.gif Docs/en_US/gsm/tip.gif Docs/examples/axelf.txt Docs/examples/gnokiirc Docs/examples/logos/gnokii.nol Docs/examples/logos/gnokii.xpm Docs/examples/logos/gnokii2.nol Docs/examples/logos/magic Docs/examples/netmon/netmonitordata_6110_433.dat Docs/examples/netmon/netmonitordata_6150_413.dat Docs/examples/netmon/netmonitordata_6150_522.dat Docs/examples/netmon/nmd_commands.dat Docs/examples/ppp/options Docs/examples/ppp/pap-secrets Docs/examples/ppp/ppp-6210-modem Docs/examples/ppp/ppp-FILES Docs/examples/ppp/ppp-gnokii Docs/examples/ppp/ppp-hscsd Docs/examples/ppp/ppp-on Docs/man/gnokii.1 Docs/man/gnokiid.8 Docs/man/mgnokiidev.8 Docs/man/todologo.1 Docs/man/xgnokii.1x INSTALL Makefile Makefile.global.in common/Makefile common/data/at-emulator.c common/data/datapump.c common/data/rlp-common.c common/data/rlp-crc24.c common/data/virtmodem.c common/devices/tekram.c common/devices/unixirda.c common/devices/winserial.c common/gsm-calendar.c common/gsm-phonebook.c common/gsm-wap.c common/protocol/at.c common/protocol/fbusirda.c config/config.guess config/config.sub config/install-sh configure.in getopt/Makefile getopt/getopt.c getopt/getopt.h getopt/getopt1.c getopt/win32/getopt.c getopt/win32/getopt.h gnokii.spec gnokii/Makefile gnokiid/Makefile gnokiid/gnokiid.c include/data/at-emulator.h include/data/datapump.h include/data/rlp-common.h include/data/rlp-crc24.h include/data/virtmodem.h include/devices/device.h include/devices/linuxirda.h include/devices/tekram.h include/devices/unixirda.h include/devices/unixserial.h include/devices/winserial.h include/files/cfgreader.h include/files/midifile.h include/gsm-calendar.h include/gsm-coding.h include/gsm-datetime.h include/gsm-networks.h include/gsm-phonebook.h include/gsm-sms.h include/gsm-wap.h include/misc.h include/misc_win32.h include/newmodules/newat.h include/protocol/at.h include/protocol/fbusirda.h include/protocol/mbus.h mgnetd/Makefile mgnetd/mg_demo_client/Makefile mgnetd/mg_demo_client/mg_demo_client.c mgnetd/mg_demo_client/mg_net_api.c mgnetd/mg_demo_client/mg_net_api.h mgnetd/mg_demo_client/mg_net_api.txt mgnetd/mgnetd.c mgnetd/mgnetd.h mgnetd/readme.txt mkinstalldirs packaging/Debian/README.debian packaging/Debian/changelog.in packaging/Debian/conffiles packaging/Debian/control packaging/Debian/copyright packaging/Debian/docs packaging/Debian/menu packaging/Debian/postinst packaging/Debian/preinst packaging/Debian/rules packaging/RedHat/gnokii.spec.in packaging/Slackware/SlackBuild.in packaging/Slackware/disk packaging/make_dist po/Makefile.in.in po/POTFILES.in po/cs.po po/de.po po/et.po po/fi.po po/it.po po/nl.po po/pl.po po/sk.po utils/Makefile utils/mgnokiidev.c utils/sendsms utils/todologo win32_makefile/clean.bat win32_makefile/dll_vc6/GnokiiAPI.PRJ win32_makefile/dll_vc6/GnokiiAPI.dep win32_makefile/dll_vc6/GnokiiAPI.dsw win32_makefile/dll_vc6/clean.bat win32_makefile/dll_vc6/fcopy.BAT win32_makefile/fcopy.bat win32_makefile/gnokii_vc6/clean.bat win32_makefile/gnokii_vc6/debug.bat win32_makefile/gnokii_vc6/gnokii.mak win32_makefile/gnokii_vc6/release.bat win32_makefile/gui_delphi/Project1.cfg win32_makefile/gui_delphi/logosring.dfm win32_makefile/gui_delphi/logosring.pas win32_makefile/gui_delphi/netmon.dfm win32_makefile/gui_delphi/netmon.pas win32_makefile/gui_delphi/smscedit.dfm win32_makefile/gui_delphi/smscedit.pas win32_makefile/mversion.js xgnokii/Makefile xgnokii/VERSION xgnokii/xgnokii.c xgnokii/xgnokii.h xgnokii/xgnokii_calendar.c xgnokii/xgnokii_calendar.h xgnokii/xgnokii_cfg.c xgnokii/xgnokii_cfg.h xgnokii/xgnokii_common.c xgnokii/xgnokii_common.h xgnokii/xgnokii_contacts.h xgnokii/xgnokii_data.c xgnokii/xgnokii_data.h xgnokii/xgnokii_dtmf.c xgnokii/xgnokii_dtmf.h xgnokii/xgnokii_logos.h xgnokii/xgnokii_lowlevel.c xgnokii/xgnokii_lowlevel.h xgnokii/xgnokii_netmon.c xgnokii/xgnokii_netmon.h xgnokii/xgnokii_sms.h xgnokii/xgnokii_speed.c xgnokii/xgnokii_speed.h xgnokii/xgnokii_xkeyb.c xgnokii/xgnokii_xkeyb.h xgnokii/xgnokii_xring.c xgnokii/xgnokii_xring.h xgnokii/xpm/6110mini.xpm xgnokii/xpm/BCard.xpm xgnokii/xpm/Black_point.xpm xgnokii/xpm/Caller.xpm xgnokii/xpm/Caller_logo.xpm xgnokii/xpm/Check.xpm xgnokii/xpm/Delete.xpm xgnokii/xpm/Dial.xpm xgnokii/xpm/Display.xpm xgnokii/xpm/Duplicate.xpm xgnokii/xpm/Edit.xpm xgnokii/xpm/Edit_flip_horizontal.xpm xgnokii/xpm/Edit_flip_vertical.xpm xgnokii/xpm/Edit_invert.xpm xgnokii/xpm/Flip.xpm xgnokii/xpm/Forward.xpm xgnokii/xpm/Green_pixel.xpm xgnokii/xpm/Green_point.xpm xgnokii/xpm/Invert.xpm xgnokii/xpm/Names.xpm xgnokii/xpm/New.xpm xgnokii/xpm/NewBD.xpm xgnokii/xpm/NewCall.xpm xgnokii/xpm/NewMeet.xpm xgnokii/xpm/NewRem.xpm xgnokii/xpm/Op.xpm xgnokii/xpm/Open.xpm xgnokii/xpm/Operator_logo.xpm xgnokii/xpm/Read.xpm xgnokii/xpm/Reply.xpm xgnokii/xpm/Save.xpm xgnokii/xpm/Send.xpm xgnokii/xpm/SendSMS.xpm xgnokii/xpm/Startup.xpm xgnokii/xpm/Startup_logo.xpm xgnokii/xpm/Tool_brush.xpm xgnokii/xpm/Tool_filled_rectangle.xpm xgnokii/xpm/Tool_line.xpm xgnokii/xpm/Tool_rectangle.xpm xgnokii/xpm/alarm.xpm xgnokii/xpm/background.xpm xgnokii/xpm/info.xpm xgnokii/xpm/logo.xpm xgnokii/xpm/phone.xpm xgnokii/xpm/quest.xpm xgnokii/xpm/sim.xpm xgnokii/xpm/sms.xpm xgnokii/xpm/stop.xpm Cherrypick from uc 2002-03-17 20:30:02 UTC jankratochvil 'This commit was manufactured by cvs2svn to create branch 'uc'.': Docs/default/sounds/ringtones/Canter Docs/default/sounds/ringtones/Carioca Docs/default/sounds/ringtones/City_Slicker Docs/default/sounds/ringtones/Croak Docs/default/sounds/ringtones/Electric_eel Docs/default/sounds/ringtones/Hummingbird Docs/default/sounds/ringtones/Hurry_up Docs/default/sounds/ringtones/Jitters Docs/default/sounds/ringtones/Languor Docs/default/sounds/ringtones/Private_eye Docs/default/sounds/ringtones/Side_step Docs/default/sounds/ringtones/Speedy Docs/default/sounds/ringtones/Tingle Docs/default/sounds/ringtones/Toreador1 Docs/default/sounds/ringtones/Transylvania Docs/default/sounds/ringtones/Treadmill Docs/default/sounds/ringtones/Tweet win32_makefile/dll_vc6/Script1.rc win32_makefile/dll_vc6/resource.h win32_makefile/gui_delphi/backup.dfm win32_makefile/gui_delphi/backup.pas win32_makefile/gui_delphi/backup2.dfm win32_makefile/gui_delphi/backup2.pas win32_makefile/gui_delphi/pbkedit2.dfm win32_makefile/gui_delphi/pbkedit2.pas win32_makefile/gui_delphi/wapbook.dfm win32_makefile/gui_delphi/wapbook.pas Cherrypick from mygnokii 2002-02-28 02:40:35 UTC short '\r\n -> \n': Docs/developers/gnokii/gettext-howto Docs/developers/gnokii/gnokii.txt Docs/developers/gnokii/packaging-howto Docs/developers/gnokii/untitled.txt Docs/developers/other/RE RE.txt Docs/developers/other/dmcp/addsms Docs/developers/other/dmcp/readme Docs/developers/other/dmcp/removesms Docs/developers/other/sniffs/Telefonbucheditor7110.txt Docs/developers/other/sniffs/irda/info.txt Docs/developers/protocol/n6110.txt Docs/developers/protocol/n7110.txt Docs/developers/protocol/nokia.txt Docs/en_US/gnokii/config.htm Docs/en_US/gnokii/faq.htm Docs/en_US/gnokii/gnokii-6210-7110-IrDA Docs/en_US/gnokii/gnokii.htm Docs/en_US/gnokii/phones.htm Docs/en_US/gnokii/todologo Docs/en_US/gnokii/xgnokii/calendar/index.htm Docs/en_US/gnokii/xgnokii/contacts/index.htm Docs/en_US/gnokii/xgnokii/dtmf/index.htm Docs/en_US/gnokii/xgnokii/main/index.htm Docs/en_US/gnokii/xgnokii/netmon/index.htm Docs/en_US/gnokii/xgnokii/sms/index.htm Docs/en_US/gnokii/xgnokii/speeddial/index.htm Docs/en_US/gnokii/xgnokii/xkeyb/index.htm Docs/en_US/gsm/cables/cables.htm Docs/en_US/gsm/codes/codes.htm Docs/en_US/gsm/compare/1.htm Docs/en_US/gsm/compare/compare.htm Docs/en_US/gsm/compare/index.htm Docs/en_US/gsm/compare/null.htm Docs/en_US/gsm/firmware/firm12.htm Docs/en_US/gsm/firmware/firm3.htm Docs/en_US/gsm/firmware/firm5.htm Docs/en_US/gsm/firmware/firm6_1.htm Docs/en_US/gsm/firmware/firm6_2.htm Docs/en_US/gsm/firmware/firm7.htm Docs/en_US/gsm/firmware/firm8.htm Docs/en_US/gsm/firmware/firm9.htm Docs/en_US/gsm/firmware/firmware.htm Docs/en_US/gsm/irda/irda.htm Docs/en_US/gsm/logos/logos.htm Docs/en_US/gsm/netmon/faq_net0.htm Docs/en_US/gsm/netmon/faq_net1.htm Docs/en_US/gsm/netmon/faq_net2.htm Docs/en_US/gsm/netmon/faq_net3.htm Docs/en_US/gsm/netmon/faq_net4.htm Docs/en_US/gsm/netmon/faq_net5.htm Docs/en_US/gsm/netmon/faq_net6.htm Docs/en_US/gsm/netmon/net_spis.htm Docs/en_US/gsm/sms/sms.htm Docs/en_US/index.htm Docs/en_US/styl.css Docs/examples/test.vcs Docs/pl_PL/mygnokii.htm Docs/pl_PL/styl.css common/devices/device.c common/files/gsm-filetypes.c common/files/midifile.c common/gsm-coding.c common/gsm-datetime.c common/newmodules/n7110.c common/newmodules/newat.c common/newmodules/sniff/sniff.c common/protocol/mbus.c gnokii/gnokii.h include/files/gsm-filetypes.h include/newmodules/n6110.h include/newmodules/n7110.h include/newmodules/sniff/sniff.h readme win32_makefile/dll_vc6/GnokiiAPI.def win32_makefile/dll_vc6/GnokiiAPI.dsp win32_makefile/dll_vc6/gnokiiapi.c win32_makefile/dll_vc6/gnokiiapi.h win32_makefile/gui_delphi/Calendar.dfm win32_makefile/gui_delphi/Calendar.pas win32_makefile/gui_delphi/GnokiiAPI.pas win32_makefile/gui_delphi/Project1.dof win32_makefile/gui_delphi/Project1.dpr win32_makefile/gui_delphi/mainunit.dfm win32_makefile/gui_delphi/mainunit.pas win32_makefile/gui_delphi/pbkedit.dfm win32_makefile/gui_delphi/pbkedit.pas win32_makefile/gui_delphi/smsedit.dfm win32_makefile/gui_delphi/smsedit.pas Cherrypick from ats 2002-02-28 02:40:34 UTC short '\r\n -> \n': Docs/CREDITS VERSION common/gsm-api.c common/gsm-bitmaps.c common/gsm-networks.c common/gsm-ringtones.c common/gsm-sms.c include/gsm-api.h include/gsm-bitmaps.h include/gsm-common.h include/gsm-ringtones.h xgnokii/xgnokii_contacts.c xgnokii/xgnokii_logos.c xgnokii/xgnokii_sms.c --- COPYING | 30 + Docs/CREDITS | 111 + Docs/Makefile | 70 + Docs/default/3210/nse8/pictures/picture1.nlm | Bin 0 -> 262 bytes Docs/default/3210/nse8/pictures/picture2.nlm | Bin 0 -> 262 bytes Docs/default/3210/nse8/pictures/picture3.nlm | Bin 0 -> 262 bytes Docs/default/3210/nse8/startup.nlm | Bin 0 -> 538 bytes Docs/default/3210/nse9/pictures/picture1.nlm | Bin 0 -> 262 bytes Docs/default/3210/nse9/pictures/picture2.nlm | Bin 0 -> 262 bytes Docs/default/3210/nse9/pictures/picture3.nlm | Bin 0 -> 262 bytes Docs/default/3210/nse9/pictures/picture4.nlm | Bin 0 -> 262 bytes Docs/default/3210/nse9/startup.nlm | Bin 0 -> 538 bytes Docs/default/3310/TwojaEra | 1 + Docs/default/3310/pictures/picture1.nlm | Bin 0 -> 262 bytes Docs/default/3310/pictures/picture10.nlm | Bin 0 -> 262 bytes Docs/default/3310/pictures/picture11.nlm | Bin 0 -> 262 bytes Docs/default/3310/pictures/picture12.nlm | Bin 0 -> 262 bytes Docs/default/3310/pictures/picture13.nlm | Bin 0 -> 262 bytes Docs/default/3310/pictures/picture14.nlm | Bin 0 -> 262 bytes Docs/default/3310/pictures/picture2.nlm | Bin 0 -> 262 bytes Docs/default/3310/pictures/picture3.nlm | Bin 0 -> 262 bytes Docs/default/3310/pictures/picture4.nlm | Bin 0 -> 262 bytes Docs/default/3310/pictures/picture5.nlm | Bin 0 -> 262 bytes Docs/default/3310/pictures/picture6.nlm | Bin 0 -> 262 bytes Docs/default/3310/pictures/picture7.nlm | Bin 0 -> 262 bytes Docs/default/3310/pictures/picture8.nlm | Bin 0 -> 262 bytes Docs/default/3310/pictures/picture9.nlm | Bin 0 -> 262 bytes Docs/default/6150/caller/colleagues.nlm | Bin 0 -> 136 bytes Docs/default/6150/caller/family.nlm | Bin 0 -> 136 bytes Docs/default/6150/caller/friends.nlm | Bin 0 -> 136 bytes Docs/default/6150/caller/other.nlm | Bin 0 -> 136 bytes Docs/default/6150/caller/vip.nlm | Bin 0 -> 136 bytes Docs/default/6150/startup.nlm | Bin 0 -> 538 bytes Docs/default/6210/caller/colleagues.bmp | Bin 0 -> 230 bytes Docs/default/6210/caller/family.bmp | Bin 0 -> 230 bytes Docs/default/6210/caller/friends.bmp | Bin 0 -> 230 bytes Docs/default/6210/caller/other.bmp | Bin 0 -> 230 bytes Docs/default/6210/caller/vip.bmp | Bin 0 -> 230 bytes Docs/default/6210/picture/picture1.nlm | Bin 0 -> 262 bytes Docs/default/6210/picture/picture10.nlm | Bin 0 -> 262 bytes Docs/default/6210/picture/picture2.nlm | Bin 0 -> 262 bytes Docs/default/6210/picture/picture3.nlm | Bin 0 -> 262 bytes Docs/default/6210/picture/picture4.nlm | Bin 0 -> 262 bytes Docs/default/6210/picture/picture5.nlm | Bin 0 -> 262 bytes Docs/default/6210/picture/picture6.nlm | Bin 0 -> 262 bytes Docs/default/6210/picture/picture7.nlm | Bin 0 -> 262 bytes Docs/default/6210/picture/picture8.nlm | Bin 0 -> 262 bytes Docs/default/6210/picture/picture9.nlm | Bin 0 -> 262 bytes Docs/default/6210/startup.bmp | Bin 0 -> 782 bytes Docs/default/sounds/readme | 45 + Docs/default/sounds/ring2.txt | 799 ++++ Docs/default/sounds/ringtones/9th_Symphony | Bin 0 -> 188 bytes Docs/default/sounds/ringtones/Attraction | Bin 0 -> 189 bytes Docs/default/sounds/ringtones/Auld_Lang_Syne | Bin 0 -> 356 bytes Docs/default/sounds/ringtones/Bach_nr_3 | Bin 0 -> 255 bytes Docs/default/sounds/ringtones/Badinerie | Bin 0 -> 785 bytes Docs/default/sounds/ringtones/Barn_dance | Bin 0 -> 171 bytes Docs/default/sounds/ringtones/Baroque | Bin 0 -> 184 bytes Docs/default/sounds/ringtones/Basic_rock | Bin 0 -> 221 bytes Docs/default/sounds/ringtones/Bee | Bin 0 -> 49 bytes Docs/default/sounds/ringtones/Bossanova | Bin 0 -> 212 bytes Docs/default/sounds/ringtones/Bounce | Bin 0 -> 97 bytes Docs/default/sounds/ringtones/Brave_Scotland | Bin 0 -> 360 bytes Docs/default/sounds/ringtones/Bumblebee | Bin 0 -> 461 bytes Docs/default/sounds/ringtones/Canter | Bin 0 -> 208 bytes Docs/default/sounds/ringtones/Carioca | Bin 0 -> 176 bytes Docs/default/sounds/ringtones/Charleston | Bin 0 -> 156 bytes Docs/default/sounds/ringtones/Chase | Bin 0 -> 68 bytes Docs/default/sounds/ringtones/Cicada | Bin 0 -> 94 bytes Docs/default/sounds/ringtones/Circles | Bin 0 -> 109 bytes Docs/default/sounds/ringtones/City_Slicker | Bin 0 -> 194 bytes Docs/default/sounds/ringtones/City_bird | Bin 0 -> 43 bytes Docs/default/sounds/ringtones/Cladoceran | Bin 0 -> 108 bytes Docs/default/sounds/ringtones/Classical | Bin 0 -> 269 bytes Docs/default/sounds/ringtones/Croak | Bin 0 -> 54 bytes Docs/default/sounds/ringtones/Dawn | Bin 0 -> 135 bytes Docs/default/sounds/ringtones/Dizzy | Bin 0 -> 112 bytes Docs/default/sounds/ringtones/Do-mi-so | Bin 0 -> 47 bytes Docs/default/sounds/ringtones/Electric_eel | Bin 0 -> 268 bytes Docs/default/sounds/ringtones/Elise | Bin 0 -> 125 bytes Docs/default/sounds/ringtones/Entertainer | Bin 0 -> 338 bytes Docs/default/sounds/ringtones/Etude | Bin 0 -> 77 bytes Docs/default/sounds/ringtones/Fly | Bin 0 -> 46 bytes Docs/default/sounds/ringtones/Fool about | Bin 0 -> 414 bytes Docs/default/sounds/ringtones/Four_seasons | Bin 0 -> 346 bytes Docs/default/sounds/ringtones/Frantic | Bin 0 -> 232 bytes Docs/default/sounds/ringtones/Frog | Bin 0 -> 54 bytes Docs/default/sounds/ringtones/Fuga | Bin 0 -> 209 bytes Docs/default/sounds/ringtones/Funfair | Bin 0 -> 181 bytes Docs/default/sounds/ringtones/Fusion | Bin 0 -> 87 bytes Docs/default/sounds/ringtones/Get_cool | Bin 0 -> 74 bytes Docs/default/sounds/ringtones/Going_up | Bin 0 -> 84 bytes Docs/default/sounds/ringtones/Grande_valse | Bin 0 -> 72 bytes Docs/default/sounds/ringtones/Groovy_blue | Bin 0 -> 198 bytes Docs/default/sounds/ringtones/Happy_return | Bin 0 -> 58 bytes Docs/default/sounds/ringtones/Helan | Bin 0 -> 199 bytes Docs/default/sounds/ringtones/HipHop | Bin 0 -> 101 bytes Docs/default/sounds/ringtones/Hopping_down | Bin 0 -> 140 bytes Docs/default/sounds/ringtones/Hummingbird | Bin 0 -> 565 bytes Docs/default/sounds/ringtones/Hunt | Bin 0 -> 51 bytes Docs/default/sounds/ringtones/Hurdy-gurdy | Bin 0 -> 260 bytes Docs/default/sounds/ringtones/Hurry_up | Bin 0 -> 53 bytes Docs/default/sounds/ringtones/Improvisation | Bin 0 -> 83 bytes Docs/default/sounds/ringtones/Indifference | Bin 0 -> 122 bytes Docs/default/sounds/ringtones/Intro | Bin 0 -> 54 bytes Docs/default/sounds/ringtones/Jingle_bells | Bin 0 -> 222 bytes Docs/default/sounds/ringtones/Jitters | Bin 0 -> 309 bytes Docs/default/sounds/ringtones/Jumping | Bin 0 -> 89 bytes Docs/default/sounds/ringtones/Kick | Bin 0 -> 115 bytes Docs/default/sounds/ringtones/Knick-knack | Bin 0 -> 209 bytes Docs/default/sounds/ringtones/Knock_again | Bin 0 -> 40 bytes Docs/default/sounds/ringtones/Knock_knock | Bin 0 -> 40 bytes Docs/default/sounds/ringtones/Lamb | Bin 0 -> 243 bytes Docs/default/sounds/ringtones/Languor | Bin 0 -> 69 bytes Docs/default/sounds/ringtones/Left_hand | Bin 0 -> 329 bytes Docs/default/sounds/ringtones/Liszt | Bin 0 -> 738 bytes Docs/default/sounds/ringtones/Low | Bin 0 -> 37 bytes Docs/default/sounds/ringtones/Mangrove | Bin 0 -> 95 bytes Docs/default/sounds/ringtones/Marry | Bin 0 -> 243 bytes Docs/default/sounds/ringtones/Matilda | Bin 0 -> 179 bytes Docs/default/sounds/ringtones/Menuet | Bin 0 -> 211 bytes Docs/default/sounds/ringtones/Merry_Xmas | Bin 0 -> 134 bytes Docs/default/sounds/ringtones/Mexican_Hat_Dance | Bin 0 -> 223 bytes Docs/default/sounds/ringtones/Moon & clouds | Bin 0 -> 144 bytes Docs/default/sounds/ringtones/Mosquito | Bin 0 -> 39 bytes Docs/default/sounds/ringtones/Mozart40 | Bin 0 -> 259 bytes Docs/default/sounds/ringtones/Nokia_tune | Bin 0 -> 70 bytes Docs/default/sounds/ringtones/Ode_to_Joy | Bin 0 -> 261 bytes Docs/default/sounds/ringtones/Orient | Bin 0 -> 161 bytes Docs/default/sounds/ringtones/Persuasion | Bin 0 -> 118 bytes Docs/default/sounds/ringtones/Piano_concerto | Bin 0 -> 135 bytes Docs/default/sounds/ringtones/Playground | Bin 0 -> 96 bytes Docs/default/sounds/ringtones/Polite | Bin 0 -> 63 bytes Docs/default/sounds/ringtones/Polka | Bin 0 -> 271 bytes Docs/default/sounds/ringtones/Polska | Bin 0 -> 272 bytes Docs/default/sounds/ringtones/Private_eye | Bin 0 -> 349 bytes Docs/default/sounds/ringtones/Progress | Bin 0 -> 146 bytes Docs/default/sounds/ringtones/Reveille | Bin 0 -> 282 bytes Docs/default/sounds/ringtones/Right_Hand | Bin 0 -> 150 bytes Docs/default/sounds/ringtones/Ring_ring | Bin 0 -> 56 bytes Docs/default/sounds/ringtones/Robo_N1X | Bin 0 -> 70 bytes Docs/default/sounds/ringtones/Rocket | Bin 0 -> 44 bytes Docs/default/sounds/ringtones/Salsa | Bin 0 -> 215 bytes Docs/default/sounds/ringtones/Samba | Bin 0 -> 96 bytes Docs/default/sounds/ringtones/Samba_rumble | Bin 0 -> 198 bytes Docs/default/sounds/ringtones/Scifi | Bin 0 -> 92 bytes Docs/default/sounds/ringtones/Side_step | Bin 0 -> 371 bytes Docs/default/sounds/ringtones/Siren | Bin 0 -> 115 bytes Docs/default/sounds/ringtones/Songette | Bin 0 -> 84 bytes Docs/default/sounds/ringtones/Speedy | Bin 0 -> 338 bytes Docs/default/sounds/ringtones/Sunny_walks | Bin 0 -> 173 bytes Docs/default/sounds/ringtones/Swan_Lake | Bin 0 -> 313 bytes Docs/default/sounds/ringtones/Tango | Bin 0 -> 99 bytes Docs/default/sounds/ringtones/Tangoed | Bin 0 -> 101 bytes Docs/default/sounds/ringtones/Tap dance | Bin 0 -> 316 bytes Docs/default/sounds/ringtones/Tchaikovsky | Bin 0 -> 800 bytes Docs/default/sounds/ringtones/That_is_it | Bin 0 -> 102 bytes Docs/default/sounds/ringtones/The_Buffoon | Bin 0 -> 117 bytes Docs/default/sounds/ringtones/Tick_tick | Bin 0 -> 108 bytes Docs/default/sounds/ringtones/Tingle | Bin 0 -> 253 bytes Docs/default/sounds/ringtones/Toreador | Bin 0 -> 202 bytes Docs/default/sounds/ringtones/Toreador1 | Bin 0 -> 485 bytes Docs/default/sounds/ringtones/Transylvania | Bin 0 -> 340 bytes Docs/default/sounds/ringtones/Treadmill | Bin 0 -> 363 bytes Docs/default/sounds/ringtones/Trio | Bin 0 -> 61 bytes Docs/default/sounds/ringtones/Tripod | Bin 0 -> 134 bytes Docs/default/sounds/ringtones/Tweet | Bin 0 -> 54 bytes Docs/default/sounds/ringtones/Valkyrie | Bin 0 -> 404 bytes Docs/default/sounds/ringtones/Walze_Brillant | Bin 0 -> 217 bytes Docs/default/sounds/ringtones/William_Tell | Bin 0 -> 171 bytes Docs/default/sounds/sms/SMS_Ancending | Bin 0 -> 206 bytes Docs/default/sounds/sms/SMS_Beep_once | Bin 0 -> 43 bytes Docs/default/sounds/sms/SMS_Special | Bin 0 -> 69 bytes Docs/default/sounds/sms/SMS_Standard | Bin 0 -> 41 bytes Docs/developers/gnokii/CodingStyle | 235 + Docs/developers/gnokii/gettext-howto | 102 + Docs/developers/gnokii/gnokii.txt | 69 + Docs/developers/gnokii/packaging-howto | 60 + Docs/developers/gnokii/untitled.txt | 42 + Docs/developers/other/RE RE.txt | 66 + Docs/developers/other/dmcp/addsms | 19 + Docs/developers/other/dmcp/readme | 148 + Docs/developers/other/dmcp/removesms | 5 + Docs/developers/other/ringtones.txt | 115 + .../other/sniffs/Telefonbucheditor7110.txt | 19 + Docs/developers/other/sniffs/irda/info.txt | 12 + Docs/developers/other/sniffs/irda/tools/fcs/fcs.c | 62 + Docs/developers/other/sniffs/irda/tools/fcs/fcs.h | 30 + .../other/sniffs/irda/tools/include/irda.h | 183 + .../other/sniffs/irda/tools/include/irlap.h | 242 + .../other/sniffs/irda/tools/intercept/Makefile | 72 + .../sniffs/irda/tools/intercept/irda_intercept.c | 613 +++ Docs/developers/other/sniffs/sniffing.txt | 21 + Docs/developers/protocol/n6110.txt | 859 ++++ Docs/developers/protocol/n7110.txt | 703 +++ Docs/developers/protocol/nokia.txt | 279 ++ Docs/developers/protocol/readme | 2 + Docs/en_US/gnokii/config.htm | 632 +++ Docs/en_US/gnokii/faq.htm | 356 ++ Docs/en_US/gnokii/gnokii-6210-7110-IrDA | 96 + Docs/en_US/gnokii/gnokii.htm | 1654 +++++++ Docs/en_US/gnokii/phones.htm | 208 + Docs/en_US/gnokii/todologo | 52 + Docs/en_US/gnokii/xgnokii/calendar/index.htm | 18 + Docs/en_US/gnokii/xgnokii/contacts/index.htm | 18 + Docs/en_US/gnokii/xgnokii/dtmf/index.htm | 18 + Docs/en_US/gnokii/xgnokii/main/index.htm | 18 + Docs/en_US/gnokii/xgnokii/netmon/index.htm | 21 + Docs/en_US/gnokii/xgnokii/sms/index.htm | 23 + Docs/en_US/gnokii/xgnokii/sms/sms.gif | Bin 0 -> 7878 bytes Docs/en_US/gnokii/xgnokii/speeddial/index.htm | 18 + Docs/en_US/gnokii/xgnokii/xkeyb/index.htm | 18 + Docs/en_US/gsm/cables/cable1.gif | Bin 0 -> 7188 bytes Docs/en_US/gsm/cables/cable2.gif | Bin 0 -> 21597 bytes Docs/en_US/gsm/cables/cables.htm | 130 + Docs/en_US/gsm/cables/switch.gif | Bin 0 -> 10147 bytes Docs/en_US/gsm/codes/codes.htm | 136 + Docs/en_US/gsm/compare/1.htm | 20 + Docs/en_US/gsm/compare/compare.htm | 21 + Docs/en_US/gsm/compare/index.htm | 210 + Docs/en_US/gsm/compare/null.htm | 6 + Docs/en_US/gsm/firmware/firm12.htm | 358 ++ Docs/en_US/gsm/firmware/firm3.htm | 1704 +++++++ Docs/en_US/gsm/firmware/firm5.htm | 457 ++ Docs/en_US/gsm/firmware/firm6_1.htm | 666 +++ Docs/en_US/gsm/firmware/firm6_2.htm | 1472 +++++++ Docs/en_US/gsm/firmware/firm7.htm | 983 +++++ Docs/en_US/gsm/firmware/firm8.htm | 1843 ++++++++ Docs/en_US/gsm/firmware/firm9.htm | 511 +++ Docs/en_US/gsm/firmware/firmware.htm | 704 +++ Docs/en_US/gsm/irda/irda.htm | 25 + Docs/en_US/gsm/logos/logos.htm | 38 + Docs/en_US/gsm/netmon/3210_09.gif | Bin 0 -> 319 bytes Docs/en_US/gsm/netmon/3210_092.gif | Bin 0 -> 356 bytes Docs/en_US/gsm/netmon/3210_10.gif | Bin 0 -> 385 bytes Docs/en_US/gsm/netmon/faq_net0.htm | 696 +++ Docs/en_US/gsm/netmon/faq_net1.htm | 503 +++ Docs/en_US/gsm/netmon/faq_net2.htm | 2405 ++++++++++ Docs/en_US/gsm/netmon/faq_net3.htm | 2418 ++++++++++ Docs/en_US/gsm/netmon/faq_net4.htm | 2144 +++++++++ Docs/en_US/gsm/netmon/faq_net5.htm | 2281 ++++++++++ Docs/en_US/gsm/netmon/faq_net6.htm | 2852 ++++++++++++ Docs/en_US/gsm/netmon/net_mon1.gif | Bin 0 -> 702 bytes Docs/en_US/gsm/netmon/net_mon2.gif | Bin 0 -> 154 bytes Docs/en_US/gsm/netmon/net_mon3.gif | Bin 0 -> 152 bytes Docs/en_US/gsm/netmon/net_spis.htm | 136 + Docs/en_US/gsm/netmon/nm_01.gif | Bin 0 -> 323 bytes Docs/en_US/gsm/netmon/nm_02.gif | Bin 0 -> 229 bytes Docs/en_US/gsm/netmon/nm_03.gif | Bin 0 -> 404 bytes Docs/en_US/gsm/netmon/nm_04.gif | Bin 0 -> 346 bytes Docs/en_US/gsm/netmon/nm_05.gif | Bin 0 -> 408 bytes Docs/en_US/gsm/netmon/nm_06.gif | Bin 0 -> 230 bytes Docs/en_US/gsm/netmon/nm_07.gif | Bin 0 -> 224 bytes Docs/en_US/gsm/netmon/nm_08.gif | Bin 0 -> 345 bytes Docs/en_US/gsm/netmon/nm_09.gif | Bin 0 -> 240 bytes Docs/en_US/gsm/netmon/nm_10.gif | Bin 0 -> 151 bytes Docs/en_US/gsm/netmon/nm_11.gif | Bin 0 -> 266 bytes Docs/en_US/gsm/netmon/nm_12.gif | Bin 0 -> 180 bytes Docs/en_US/gsm/netmon/nm_14.gif | Bin 0 -> 239 bytes Docs/en_US/gsm/netmon/nm_15.gif | Bin 0 -> 238 bytes Docs/en_US/gsm/netmon/nm_3210.gif | Bin 0 -> 392 bytes Docs/en_US/gsm/netmon/nm_32102.gif | Bin 0 -> 398 bytes Docs/en_US/gsm/netmon/nm_3310.gif | Bin 0 -> 395 bytes Docs/en_US/gsm/netmon/nm_5110.gif | Bin 0 -> 374 bytes Docs/en_US/gsm/netmon/nm_6150.gif | Bin 0 -> 394 bytes Docs/en_US/gsm/netmon/nm_6190.gif | Bin 0 -> 386 bytes Docs/en_US/gsm/netmon/nm_6210.gif | Bin 0 -> 490 bytes Docs/en_US/gsm/netmon/nm_6310.gif | Bin 0 -> 517 bytes Docs/en_US/gsm/netmon/nm_7110.gif | Bin 0 -> 511 bytes Docs/en_US/gsm/netmon/nm_8210.gif | Bin 0 -> 394 bytes Docs/en_US/gsm/netmon/nm_8310.gif | Bin 0 -> 383 bytes Docs/en_US/gsm/netmon/nm_9110.gif | Bin 0 -> 392 bytes Docs/en_US/gsm/netmon/nm_9210.gif | Bin 0 -> 399 bytes Docs/en_US/gsm/sms/sms.htm | 157 + Docs/en_US/gsm/tip.gif | Bin 0 -> 268 bytes Docs/en_US/index.htm | 52 + Docs/en_US/styl.css | 46 + Docs/examples/axelf.txt | 1 + Docs/examples/gnokiirc | 176 + Docs/examples/logos/gnokii.nol | Bin 0 -> 1028 bytes Docs/examples/logos/gnokii.xpm | 303 ++ Docs/examples/logos/gnokii2.nol | Bin 0 -> 1028 bytes Docs/examples/logos/magic | 14 + Docs/examples/netmon/netmonitordata_6110_433.dat | 455 ++ Docs/examples/netmon/netmonitordata_6150_413.dat | 600 +++ Docs/examples/netmon/netmonitordata_6150_522.dat | 596 +++ Docs/examples/netmon/nmd_commands.dat | 5 + Docs/examples/ppp/options | 7 + Docs/examples/ppp/pap-secrets | 1 + Docs/examples/ppp/ppp-6210-modem | 11 + Docs/examples/ppp/ppp-FILES | 6 + Docs/examples/ppp/ppp-gnokii | 9 + Docs/examples/ppp/ppp-hscsd | 13 + Docs/examples/ppp/ppp-on | 9 + Docs/examples/test.vcs | 40 + Docs/man/gnokii.1 | 196 + Docs/man/gnokiid.8 | 63 + Docs/man/mgnokiidev.8 | 49 + Docs/man/todologo.1 | 57 + Docs/man/xgnokii.1x | 39 + Docs/pl_PL/mygnokii.htm | 974 ++++ Docs/pl_PL/styl.css | 46 + INSTALL | 54 + Makefile | 208 + Makefile.global.in | 77 + VERSION | 1 + common/Makefile | 92 + common/data/at-emulator.c | 729 +++ common/data/datapump.c | 167 + common/data/rlp-common.c | 2069 +++++++++ common/data/rlp-crc24.c | 106 + common/data/virtmodem.c | 345 ++ common/devices/device.c | 464 ++ common/devices/tekram.c | 113 + common/devices/unixirda.c | 216 + common/devices/winserial.c | 493 +++ common/files/gsm-filetypes.c | 2245 ++++++++++ common/files/midifile.c | 1321 ++++++ common/gsm-api.c | 827 ++++ common/gsm-bitmaps.c | 303 ++ common/gsm-calendar.c | 162 + common/gsm-coding.c | 483 ++ common/gsm-datetime.c | 88 + common/gsm-networks.c | 482 ++ common/gsm-phonebook.c | 162 + common/gsm-ringtones.c | 1036 +++++ common/gsm-sms.c | 1020 +++++ common/gsm-wap.c | 255 ++ common/newmodules/n7110.c | 3674 ++++++++++++++++ common/newmodules/newat.c | 1935 ++++++++ common/newmodules/sniff/sniff.c | 234 + common/protocol/at.c | 195 + common/protocol/fbusirda.c | 362 ++ common/protocol/mbus.c | 480 ++ config/config.guess | 1298 ++++++ config/config.sub | 1375 ++++++ config/install-sh | 251 ++ configure.in | 528 +++ getopt/Makefile | 28 + getopt/getopt.c | 753 ++++ getopt/getopt.h | 133 + getopt/getopt1.c | 184 + getopt/win32/getopt.c | 758 ++++ getopt/win32/getopt.h | 127 + gnokii.spec | 147 + gnokii/Makefile | 84 + gnokii/gnokii.h | 280 ++ gnokiid/Makefile | 72 + gnokiid/gnokiid.c | 128 + include/data/at-emulator.h | 97 + include/data/datapump.h | 38 + include/data/rlp-common.h | 182 + include/data/rlp-crc24.h | 27 + include/data/virtmodem.h | 37 + include/devices/device.h | 63 + include/devices/linuxirda.h | 211 + include/devices/tekram.h | 64 + include/devices/unixirda.h | 41 + include/devices/unixserial.h | 44 + include/devices/winserial.h | 7 + include/files/cfgreader.h | 52 + include/files/gsm-filetypes.h | 102 + include/files/midifile.h | 1 + include/gsm-api.h | 545 +++ include/gsm-bitmaps.h | 60 + include/gsm-calendar.h | 61 + include/gsm-coding.h | 36 + include/gsm-common.h | 327 ++ include/gsm-datetime.h | 42 + include/gsm-networks.h | 59 + include/gsm-phonebook.h | 103 + include/gsm-ringtones.h | 196 + include/gsm-sms.h | 292 ++ include/gsm-wap.h | 64 + include/misc.h | 125 + include/misc_win32.h | 21 + include/newmodules/n6110.h | 218 + include/newmodules/n7110.h | 147 + include/newmodules/newat.h | 79 + include/newmodules/sniff/sniff.h | 32 + include/protocol/at.h | 37 + include/protocol/fbusirda.h | 40 + include/protocol/mbus.h | 44 + mgnetd/Makefile | 69 + mgnetd/mg_demo_client/Makefile | 57 + mgnetd/mg_demo_client/mg_demo_client.c | 186 + mgnetd/mg_demo_client/mg_net_api.c | 292 ++ mgnetd/mg_demo_client/mg_net_api.h | 104 + mgnetd/mg_demo_client/mg_net_api.txt | 142 + mgnetd/mgnetd.c | 556 +++ mgnetd/mgnetd.h | 93 + mgnetd/readme.txt | 46 + mkinstalldirs | 40 + packaging/Debian/README.debian | 6 + packaging/Debian/changelog.in | 14 + packaging/Debian/conffiles | 1 + packaging/Debian/control | 11 + packaging/Debian/copyright | 16 + packaging/Debian/docs | 20 + packaging/Debian/menu | 1 + packaging/Debian/postinst | 3 + packaging/Debian/preinst | 4 + packaging/Debian/rules | 64 + packaging/RedHat/gnokii.spec.in | 136 + packaging/Slackware/SlackBuild.in | 70 + packaging/Slackware/disk | 6 + packaging/make_dist | 38 + po/Makefile.in.in | 216 + po/POTFILES.in | 22 + po/cs.po | 2554 +++++++++++ po/de.po | 3185 ++++++++++++++ po/et.po | 3791 ++++++++++++++++ po/fi.po | 2559 +++++++++++ po/it.po | 4052 +++++++++++++++++ po/nl.po | 2643 +++++++++++ po/pl.po | 3310 ++++++++++++++ po/sk.po | 3579 +++++++++++++++ readme | 78 + utils/Makefile | 57 + utils/mgnokiidev.c | 96 + utils/sendsms | 458 ++ utils/todologo | 102 + win32_makefile/clean.bat | 20 + win32_makefile/dll_vc6/GnokiiAPI.PRJ | 14 + win32_makefile/dll_vc6/GnokiiAPI.def | 77 + win32_makefile/dll_vc6/GnokiiAPI.dep | 2 + win32_makefile/dll_vc6/GnokiiAPI.dsp | 297 ++ win32_makefile/dll_vc6/GnokiiAPI.dsw | 29 + win32_makefile/dll_vc6/Script1.rc | 109 + win32_makefile/dll_vc6/clean.bat | 21 + win32_makefile/dll_vc6/fcopy.BAT | 2 + win32_makefile/dll_vc6/gnokiiapi.c | 448 ++ win32_makefile/dll_vc6/gnokiiapi.h | 114 + win32_makefile/dll_vc6/resource.h | 15 + win32_makefile/fcopy.bat | 35 + win32_makefile/gnokii_vc6/clean.bat | 17 + win32_makefile/gnokii_vc6/debug.bat | 6 + win32_makefile/gnokii_vc6/gnokii.mak | 435 ++ win32_makefile/gnokii_vc6/release.bat | 6 + win32_makefile/gui_delphi/Calendar.dfm | 229 + win32_makefile/gui_delphi/Calendar.pas | 251 ++ win32_makefile/gui_delphi/GnokiiAPI.pas | 622 +++ win32_makefile/gui_delphi/Project1.cfg | 35 + win32_makefile/gui_delphi/Project1.dof | 86 + win32_makefile/gui_delphi/Project1.dpr | 36 + win32_makefile/gui_delphi/backup.dfm | 103 + win32_makefile/gui_delphi/backup.pas | 59 + win32_makefile/gui_delphi/backup2.dfm | 118 + win32_makefile/gui_delphi/backup2.pas | 295 ++ win32_makefile/gui_delphi/logosring.dfm | 51 + win32_makefile/gui_delphi/logosring.pas | 42 + win32_makefile/gui_delphi/mainunit.dfm | 3998 +++++++++++++++++ win32_makefile/gui_delphi/mainunit.pas | 4639 ++++++++++++++++++++ win32_makefile/gui_delphi/netmon.dfm | 48 + win32_makefile/gui_delphi/netmon.pas | 46 + win32_makefile/gui_delphi/pbkedit.dfm | 54 + win32_makefile/gui_delphi/pbkedit.pas | 39 + win32_makefile/gui_delphi/pbkedit2.dfm | 198 + win32_makefile/gui_delphi/pbkedit2.pas | 138 + win32_makefile/gui_delphi/smscedit.dfm | 125 + win32_makefile/gui_delphi/smscedit.pas | 87 + win32_makefile/gui_delphi/smsedit.dfm | 2294 ++++++++++ win32_makefile/gui_delphi/smsedit.pas | 328 ++ win32_makefile/gui_delphi/wapbook.dfm | 64 + win32_makefile/gui_delphi/wapbook.pas | 62 + win32_makefile/mversion.js | 28 + xgnokii/Makefile | 102 + xgnokii/VERSION | 1 + xgnokii/xgnokii.c | 2481 +++++++++++ xgnokii/xgnokii.h | 67 + xgnokii/xgnokii_calendar.c | 1524 +++++++ xgnokii/xgnokii_calendar.h | 18 + xgnokii/xgnokii_cfg.c | 221 + xgnokii/xgnokii_cfg.h | 28 + xgnokii/xgnokii_common.c | 332 ++ xgnokii/xgnokii_common.h | 77 + xgnokii/xgnokii_contacts.c | 3433 +++++++++++++++ xgnokii/xgnokii_contacts.h | 181 + xgnokii/xgnokii_data.c | 129 + xgnokii/xgnokii_data.h | 20 + xgnokii/xgnokii_dtmf.c | 336 ++ xgnokii/xgnokii_dtmf.h | 18 + xgnokii/xgnokii_logos.c | 1739 ++++++++ xgnokii/xgnokii_logos.h | 39 + xgnokii/xgnokii_lowlevel.c | 1000 +++++ xgnokii/xgnokii_lowlevel.h | 192 + xgnokii/xgnokii_netmon.c | 579 +++ xgnokii/xgnokii_netmon.h | 28 + xgnokii/xgnokii_sms.c | 1662 +++++++ xgnokii/xgnokii_sms.h | 22 + xgnokii/xgnokii_speed.c | 662 +++ xgnokii/xgnokii_speed.h | 18 + xgnokii/xgnokii_xkeyb.c | 295 ++ xgnokii/xgnokii_xkeyb.h | 18 + xgnokii/xgnokii_xring.c | 554 +++ xgnokii/xgnokii_xring.h | 38 + xgnokii/xpm/6110mini.xpm | 68 + xgnokii/xpm/BCard.xpm | 26 + xgnokii/xpm/Black_point.xpm | 13 + xgnokii/xpm/Caller.xpm | 50 + xgnokii/xpm/Caller_logo.xpm | 31 + xgnokii/xpm/Check.xpm | 25 + xgnokii/xpm/Delete.xpm | 36 + xgnokii/xpm/Dial.xpm | 34 + xgnokii/xpm/Display.xpm | 115 + xgnokii/xpm/Duplicate.xpm | 36 + xgnokii/xpm/Edit.xpm | 37 + xgnokii/xpm/Edit_flip_horizontal.xpm | 26 + xgnokii/xpm/Edit_flip_vertical.xpm | 26 + xgnokii/xpm/Edit_invert.xpm | 26 + xgnokii/xpm/Flip.xpm | 24 + xgnokii/xpm/Forward.xpm | 24 + xgnokii/xpm/Green_pixel.xpm | 6 + xgnokii/xpm/Green_point.xpm | 13 + xgnokii/xpm/Invert.xpm | 46 + xgnokii/xpm/Names.xpm | 21 + xgnokii/xpm/New.xpm | 45 + xgnokii/xpm/NewBD.xpm | 47 + xgnokii/xpm/NewCall.xpm | 41 + xgnokii/xpm/NewMeet.xpm | 41 + xgnokii/xpm/NewRem.xpm | 43 + xgnokii/xpm/Op.xpm | 50 + xgnokii/xpm/Open.xpm | 47 + xgnokii/xpm/Operator_logo.xpm | 27 + xgnokii/xpm/Read.xpm | 41 + xgnokii/xpm/Reply.xpm | 24 + xgnokii/xpm/Save.xpm | 45 + xgnokii/xpm/Send.xpm | 50 + xgnokii/xpm/SendSMS.xpm | 24 + xgnokii/xpm/Startup.xpm | 50 + xgnokii/xpm/Startup_logo.xpm | 32 + xgnokii/xpm/Tool_brush.xpm | 26 + xgnokii/xpm/Tool_filled_rectangle.xpm | 24 + xgnokii/xpm/Tool_line.xpm | 24 + xgnokii/xpm/Tool_rectangle.xpm | 24 + xgnokii/xpm/alarm.xpm | 36 + xgnokii/xpm/background.xpm | 247 ++ xgnokii/xpm/info.xpm | 73 + xgnokii/xpm/logo.xpm | 369 ++ xgnokii/xpm/phone.xpm | 27 + xgnokii/xpm/quest.xpm | 86 + xgnokii/xpm/sim.xpm | 27 + xgnokii/xpm/sms.xpm | 159 + xgnokii/xpm/stop.xpm | 85 + 544 files changed, 127556 insertions(+) create mode 100644 COPYING create mode 100644 Docs/CREDITS create mode 100644 Docs/Makefile create mode 100644 Docs/default/3210/nse8/pictures/picture1.nlm create mode 100644 Docs/default/3210/nse8/pictures/picture2.nlm create mode 100644 Docs/default/3210/nse8/pictures/picture3.nlm create mode 100644 Docs/default/3210/nse8/startup.nlm create mode 100644 Docs/default/3210/nse9/pictures/picture1.nlm create mode 100644 Docs/default/3210/nse9/pictures/picture2.nlm create mode 100644 Docs/default/3210/nse9/pictures/picture3.nlm create mode 100644 Docs/default/3210/nse9/pictures/picture4.nlm create mode 100644 Docs/default/3210/nse9/startup.nlm create mode 100644 Docs/default/3310/TwojaEra create mode 100644 Docs/default/3310/pictures/picture1.nlm create mode 100644 Docs/default/3310/pictures/picture10.nlm create mode 100644 Docs/default/3310/pictures/picture11.nlm create mode 100644 Docs/default/3310/pictures/picture12.nlm create mode 100644 Docs/default/3310/pictures/picture13.nlm create mode 100644 Docs/default/3310/pictures/picture14.nlm create mode 100644 Docs/default/3310/pictures/picture2.nlm create mode 100644 Docs/default/3310/pictures/picture3.nlm create mode 100644 Docs/default/3310/pictures/picture4.nlm create mode 100644 Docs/default/3310/pictures/picture5.nlm create mode 100644 Docs/default/3310/pictures/picture6.nlm create mode 100644 Docs/default/3310/pictures/picture7.nlm create mode 100644 Docs/default/3310/pictures/picture8.nlm create mode 100644 Docs/default/3310/pictures/picture9.nlm create mode 100644 Docs/default/6150/caller/colleagues.nlm create mode 100644 Docs/default/6150/caller/family.nlm create mode 100644 Docs/default/6150/caller/friends.nlm create mode 100644 Docs/default/6150/caller/other.nlm create mode 100644 Docs/default/6150/caller/vip.nlm create mode 100644 Docs/default/6150/startup.nlm create mode 100644 Docs/default/6210/caller/colleagues.bmp create mode 100644 Docs/default/6210/caller/family.bmp create mode 100644 Docs/default/6210/caller/friends.bmp create mode 100644 Docs/default/6210/caller/other.bmp create mode 100644 Docs/default/6210/caller/vip.bmp create mode 100644 Docs/default/6210/picture/picture1.nlm create mode 100644 Docs/default/6210/picture/picture10.nlm create mode 100644 Docs/default/6210/picture/picture2.nlm create mode 100644 Docs/default/6210/picture/picture3.nlm create mode 100644 Docs/default/6210/picture/picture4.nlm create mode 100644 Docs/default/6210/picture/picture5.nlm create mode 100644 Docs/default/6210/picture/picture6.nlm create mode 100644 Docs/default/6210/picture/picture7.nlm create mode 100644 Docs/default/6210/picture/picture8.nlm create mode 100644 Docs/default/6210/picture/picture9.nlm create mode 100644 Docs/default/6210/startup.bmp create mode 100644 Docs/default/sounds/readme create mode 100644 Docs/default/sounds/ring2.txt create mode 100644 Docs/default/sounds/ringtones/9th_Symphony create mode 100644 Docs/default/sounds/ringtones/Attraction create mode 100644 Docs/default/sounds/ringtones/Auld_Lang_Syne create mode 100644 Docs/default/sounds/ringtones/Bach_nr_3 create mode 100644 Docs/default/sounds/ringtones/Badinerie create mode 100644 Docs/default/sounds/ringtones/Barn_dance create mode 100644 Docs/default/sounds/ringtones/Baroque create mode 100644 Docs/default/sounds/ringtones/Basic_rock create mode 100644 Docs/default/sounds/ringtones/Bee create mode 100644 Docs/default/sounds/ringtones/Bossanova create mode 100644 Docs/default/sounds/ringtones/Bounce create mode 100644 Docs/default/sounds/ringtones/Brave_Scotland create mode 100644 Docs/default/sounds/ringtones/Bumblebee create mode 100644 Docs/default/sounds/ringtones/Canter create mode 100644 Docs/default/sounds/ringtones/Carioca create mode 100644 Docs/default/sounds/ringtones/Charleston create mode 100644 Docs/default/sounds/ringtones/Chase create mode 100644 Docs/default/sounds/ringtones/Cicada create mode 100644 Docs/default/sounds/ringtones/Circles create mode 100644 Docs/default/sounds/ringtones/City_Slicker create mode 100644 Docs/default/sounds/ringtones/City_bird create mode 100644 Docs/default/sounds/ringtones/Cladoceran create mode 100644 Docs/default/sounds/ringtones/Classical create mode 100644 Docs/default/sounds/ringtones/Croak create mode 100644 Docs/default/sounds/ringtones/Dawn create mode 100644 Docs/default/sounds/ringtones/Dizzy create mode 100644 Docs/default/sounds/ringtones/Do-mi-so create mode 100644 Docs/default/sounds/ringtones/Electric_eel create mode 100644 Docs/default/sounds/ringtones/Elise create mode 100644 Docs/default/sounds/ringtones/Entertainer create mode 100644 Docs/default/sounds/ringtones/Etude create mode 100644 Docs/default/sounds/ringtones/Fly create mode 100644 Docs/default/sounds/ringtones/Fool about create mode 100644 Docs/default/sounds/ringtones/Four_seasons create mode 100644 Docs/default/sounds/ringtones/Frantic create mode 100644 Docs/default/sounds/ringtones/Frog create mode 100644 Docs/default/sounds/ringtones/Fuga create mode 100644 Docs/default/sounds/ringtones/Funfair create mode 100644 Docs/default/sounds/ringtones/Fusion create mode 100644 Docs/default/sounds/ringtones/Get_cool create mode 100644 Docs/default/sounds/ringtones/Going_up create mode 100644 Docs/default/sounds/ringtones/Grande_valse create mode 100644 Docs/default/sounds/ringtones/Groovy_blue create mode 100644 Docs/default/sounds/ringtones/Happy_return create mode 100644 Docs/default/sounds/ringtones/Helan create mode 100644 Docs/default/sounds/ringtones/HipHop create mode 100644 Docs/default/sounds/ringtones/Hopping_down create mode 100644 Docs/default/sounds/ringtones/Hummingbird create mode 100644 Docs/default/sounds/ringtones/Hunt create mode 100644 Docs/default/sounds/ringtones/Hurdy-gurdy create mode 100644 Docs/default/sounds/ringtones/Hurry_up create mode 100644 Docs/default/sounds/ringtones/Improvisation create mode 100644 Docs/default/sounds/ringtones/Indifference create mode 100644 Docs/default/sounds/ringtones/Intro create mode 100644 Docs/default/sounds/ringtones/Jingle_bells create mode 100644 Docs/default/sounds/ringtones/Jitters create mode 100644 Docs/default/sounds/ringtones/Jumping create mode 100644 Docs/default/sounds/ringtones/Kick create mode 100644 Docs/default/sounds/ringtones/Knick-knack create mode 100644 Docs/default/sounds/ringtones/Knock_again create mode 100644 Docs/default/sounds/ringtones/Knock_knock create mode 100644 Docs/default/sounds/ringtones/Lamb create mode 100644 Docs/default/sounds/ringtones/Languor create mode 100644 Docs/default/sounds/ringtones/Left_hand create mode 100644 Docs/default/sounds/ringtones/Liszt create mode 100644 Docs/default/sounds/ringtones/Low create mode 100644 Docs/default/sounds/ringtones/Mangrove create mode 100644 Docs/default/sounds/ringtones/Marry create mode 100644 Docs/default/sounds/ringtones/Matilda create mode 100644 Docs/default/sounds/ringtones/Menuet create mode 100644 Docs/default/sounds/ringtones/Merry_Xmas create mode 100644 Docs/default/sounds/ringtones/Mexican_Hat_Dance create mode 100644 Docs/default/sounds/ringtones/Moon & clouds create mode 100644 Docs/default/sounds/ringtones/Mosquito create mode 100644 Docs/default/sounds/ringtones/Mozart40 create mode 100644 Docs/default/sounds/ringtones/Nokia_tune create mode 100644 Docs/default/sounds/ringtones/Ode_to_Joy create mode 100644 Docs/default/sounds/ringtones/Orient create mode 100644 Docs/default/sounds/ringtones/Persuasion create mode 100644 Docs/default/sounds/ringtones/Piano_concerto create mode 100644 Docs/default/sounds/ringtones/Playground create mode 100644 Docs/default/sounds/ringtones/Polite create mode 100644 Docs/default/sounds/ringtones/Polka create mode 100644 Docs/default/sounds/ringtones/Polska create mode 100644 Docs/default/sounds/ringtones/Private_eye create mode 100644 Docs/default/sounds/ringtones/Progress create mode 100644 Docs/default/sounds/ringtones/Reveille create mode 100644 Docs/default/sounds/ringtones/Right_Hand create mode 100644 Docs/default/sounds/ringtones/Ring_ring create mode 100644 Docs/default/sounds/ringtones/Robo_N1X create mode 100644 Docs/default/sounds/ringtones/Rocket create mode 100644 Docs/default/sounds/ringtones/Salsa create mode 100644 Docs/default/sounds/ringtones/Samba create mode 100644 Docs/default/sounds/ringtones/Samba_rumble create mode 100644 Docs/default/sounds/ringtones/Scifi create mode 100644 Docs/default/sounds/ringtones/Side_step create mode 100644 Docs/default/sounds/ringtones/Siren create mode 100644 Docs/default/sounds/ringtones/Songette create mode 100644 Docs/default/sounds/ringtones/Speedy create mode 100644 Docs/default/sounds/ringtones/Sunny_walks create mode 100644 Docs/default/sounds/ringtones/Swan_Lake create mode 100644 Docs/default/sounds/ringtones/Tango create mode 100644 Docs/default/sounds/ringtones/Tangoed create mode 100644 Docs/default/sounds/ringtones/Tap dance create mode 100644 Docs/default/sounds/ringtones/Tchaikovsky create mode 100644 Docs/default/sounds/ringtones/That_is_it create mode 100644 Docs/default/sounds/ringtones/The_Buffoon create mode 100644 Docs/default/sounds/ringtones/Tick_tick create mode 100644 Docs/default/sounds/ringtones/Tingle create mode 100644 Docs/default/sounds/ringtones/Toreador create mode 100644 Docs/default/sounds/ringtones/Toreador1 create mode 100644 Docs/default/sounds/ringtones/Transylvania create mode 100644 Docs/default/sounds/ringtones/Treadmill create mode 100644 Docs/default/sounds/ringtones/Trio create mode 100644 Docs/default/sounds/ringtones/Tripod create mode 100644 Docs/default/sounds/ringtones/Tweet create mode 100644 Docs/default/sounds/ringtones/Valkyrie create mode 100644 Docs/default/sounds/ringtones/Walze_Brillant create mode 100644 Docs/default/sounds/ringtones/William_Tell create mode 100644 Docs/default/sounds/sms/SMS_Ancending create mode 100644 Docs/default/sounds/sms/SMS_Beep_once create mode 100644 Docs/default/sounds/sms/SMS_Special create mode 100644 Docs/default/sounds/sms/SMS_Standard create mode 100644 Docs/developers/gnokii/CodingStyle create mode 100644 Docs/developers/gnokii/gettext-howto create mode 100644 Docs/developers/gnokii/gnokii.txt create mode 100644 Docs/developers/gnokii/packaging-howto create mode 100644 Docs/developers/gnokii/untitled.txt create mode 100644 Docs/developers/other/RE RE.txt create mode 100644 Docs/developers/other/dmcp/addsms create mode 100644 Docs/developers/other/dmcp/readme create mode 100644 Docs/developers/other/dmcp/removesms create mode 100644 Docs/developers/other/ringtones.txt create mode 100644 Docs/developers/other/sniffs/Telefonbucheditor7110.txt create mode 100644 Docs/developers/other/sniffs/irda/info.txt create mode 100644 Docs/developers/other/sniffs/irda/tools/fcs/fcs.c create mode 100644 Docs/developers/other/sniffs/irda/tools/fcs/fcs.h create mode 100644 Docs/developers/other/sniffs/irda/tools/include/irda.h create mode 100644 Docs/developers/other/sniffs/irda/tools/include/irlap.h create mode 100644 Docs/developers/other/sniffs/irda/tools/intercept/Makefile create mode 100644 Docs/developers/other/sniffs/irda/tools/intercept/irda_intercept.c create mode 100644 Docs/developers/other/sniffs/sniffing.txt create mode 100644 Docs/developers/protocol/n6110.txt create mode 100644 Docs/developers/protocol/n7110.txt create mode 100644 Docs/developers/protocol/nokia.txt create mode 100644 Docs/developers/protocol/readme create mode 100644 Docs/en_US/gnokii/config.htm create mode 100644 Docs/en_US/gnokii/faq.htm create mode 100644 Docs/en_US/gnokii/gnokii-6210-7110-IrDA create mode 100644 Docs/en_US/gnokii/gnokii.htm create mode 100644 Docs/en_US/gnokii/phones.htm create mode 100644 Docs/en_US/gnokii/todologo create mode 100644 Docs/en_US/gnokii/xgnokii/calendar/index.htm create mode 100644 Docs/en_US/gnokii/xgnokii/contacts/index.htm create mode 100644 Docs/en_US/gnokii/xgnokii/dtmf/index.htm create mode 100644 Docs/en_US/gnokii/xgnokii/main/index.htm create mode 100644 Docs/en_US/gnokii/xgnokii/netmon/index.htm create mode 100644 Docs/en_US/gnokii/xgnokii/sms/index.htm create mode 100644 Docs/en_US/gnokii/xgnokii/sms/sms.gif create mode 100644 Docs/en_US/gnokii/xgnokii/speeddial/index.htm create mode 100644 Docs/en_US/gnokii/xgnokii/xkeyb/index.htm create mode 100644 Docs/en_US/gsm/cables/cable1.gif create mode 100644 Docs/en_US/gsm/cables/cable2.gif create mode 100644 Docs/en_US/gsm/cables/cables.htm create mode 100644 Docs/en_US/gsm/cables/switch.gif create mode 100644 Docs/en_US/gsm/codes/codes.htm create mode 100644 Docs/en_US/gsm/compare/1.htm create mode 100644 Docs/en_US/gsm/compare/compare.htm create mode 100644 Docs/en_US/gsm/compare/index.htm create mode 100644 Docs/en_US/gsm/compare/null.htm create mode 100644 Docs/en_US/gsm/firmware/firm12.htm create mode 100644 Docs/en_US/gsm/firmware/firm3.htm create mode 100644 Docs/en_US/gsm/firmware/firm5.htm create mode 100644 Docs/en_US/gsm/firmware/firm6_1.htm create mode 100644 Docs/en_US/gsm/firmware/firm6_2.htm create mode 100644 Docs/en_US/gsm/firmware/firm7.htm create mode 100644 Docs/en_US/gsm/firmware/firm8.htm create mode 100644 Docs/en_US/gsm/firmware/firm9.htm create mode 100644 Docs/en_US/gsm/firmware/firmware.htm create mode 100644 Docs/en_US/gsm/irda/irda.htm create mode 100644 Docs/en_US/gsm/logos/logos.htm create mode 100644 Docs/en_US/gsm/netmon/3210_09.gif create mode 100644 Docs/en_US/gsm/netmon/3210_092.gif create mode 100644 Docs/en_US/gsm/netmon/3210_10.gif create mode 100644 Docs/en_US/gsm/netmon/faq_net0.htm create mode 100644 Docs/en_US/gsm/netmon/faq_net1.htm create mode 100644 Docs/en_US/gsm/netmon/faq_net2.htm create mode 100644 Docs/en_US/gsm/netmon/faq_net3.htm create mode 100644 Docs/en_US/gsm/netmon/faq_net4.htm create mode 100644 Docs/en_US/gsm/netmon/faq_net5.htm create mode 100644 Docs/en_US/gsm/netmon/faq_net6.htm create mode 100644 Docs/en_US/gsm/netmon/net_mon1.gif create mode 100644 Docs/en_US/gsm/netmon/net_mon2.gif create mode 100644 Docs/en_US/gsm/netmon/net_mon3.gif create mode 100644 Docs/en_US/gsm/netmon/net_spis.htm create mode 100644 Docs/en_US/gsm/netmon/nm_01.gif create mode 100644 Docs/en_US/gsm/netmon/nm_02.gif create mode 100644 Docs/en_US/gsm/netmon/nm_03.gif create mode 100644 Docs/en_US/gsm/netmon/nm_04.gif create mode 100644 Docs/en_US/gsm/netmon/nm_05.gif create mode 100644 Docs/en_US/gsm/netmon/nm_06.gif create mode 100644 Docs/en_US/gsm/netmon/nm_07.gif create mode 100644 Docs/en_US/gsm/netmon/nm_08.gif create mode 100644 Docs/en_US/gsm/netmon/nm_09.gif create mode 100644 Docs/en_US/gsm/netmon/nm_10.gif create mode 100644 Docs/en_US/gsm/netmon/nm_11.gif create mode 100644 Docs/en_US/gsm/netmon/nm_12.gif create mode 100644 Docs/en_US/gsm/netmon/nm_14.gif create mode 100644 Docs/en_US/gsm/netmon/nm_15.gif create mode 100644 Docs/en_US/gsm/netmon/nm_3210.gif create mode 100644 Docs/en_US/gsm/netmon/nm_32102.gif create mode 100644 Docs/en_US/gsm/netmon/nm_3310.gif create mode 100644 Docs/en_US/gsm/netmon/nm_5110.gif create mode 100644 Docs/en_US/gsm/netmon/nm_6150.gif create mode 100644 Docs/en_US/gsm/netmon/nm_6190.gif create mode 100644 Docs/en_US/gsm/netmon/nm_6210.gif create mode 100644 Docs/en_US/gsm/netmon/nm_6310.gif create mode 100644 Docs/en_US/gsm/netmon/nm_7110.gif create mode 100644 Docs/en_US/gsm/netmon/nm_8210.gif create mode 100644 Docs/en_US/gsm/netmon/nm_8310.gif create mode 100644 Docs/en_US/gsm/netmon/nm_9110.gif create mode 100644 Docs/en_US/gsm/netmon/nm_9210.gif create mode 100644 Docs/en_US/gsm/sms/sms.htm create mode 100644 Docs/en_US/gsm/tip.gif create mode 100644 Docs/en_US/index.htm create mode 100644 Docs/en_US/styl.css create mode 100644 Docs/examples/axelf.txt create mode 100644 Docs/examples/gnokiirc create mode 100644 Docs/examples/logos/gnokii.nol create mode 100644 Docs/examples/logos/gnokii.xpm create mode 100644 Docs/examples/logos/gnokii2.nol create mode 100644 Docs/examples/logos/magic create mode 100644 Docs/examples/netmon/netmonitordata_6110_433.dat create mode 100644 Docs/examples/netmon/netmonitordata_6150_413.dat create mode 100644 Docs/examples/netmon/netmonitordata_6150_522.dat create mode 100644 Docs/examples/netmon/nmd_commands.dat create mode 100644 Docs/examples/ppp/options create mode 100644 Docs/examples/ppp/pap-secrets create mode 100755 Docs/examples/ppp/ppp-6210-modem create mode 100644 Docs/examples/ppp/ppp-FILES create mode 100644 Docs/examples/ppp/ppp-gnokii create mode 100644 Docs/examples/ppp/ppp-hscsd create mode 100644 Docs/examples/ppp/ppp-on create mode 100644 Docs/examples/test.vcs create mode 100644 Docs/man/gnokii.1 create mode 100644 Docs/man/gnokiid.8 create mode 100644 Docs/man/mgnokiidev.8 create mode 100644 Docs/man/todologo.1 create mode 100644 Docs/man/xgnokii.1x create mode 100644 Docs/pl_PL/mygnokii.htm create mode 100644 Docs/pl_PL/styl.css create mode 100644 INSTALL create mode 100644 Makefile create mode 100644 Makefile.global.in create mode 100644 VERSION create mode 100644 common/Makefile create mode 100644 common/data/at-emulator.c create mode 100644 common/data/datapump.c create mode 100644 common/data/rlp-common.c create mode 100644 common/data/rlp-crc24.c create mode 100644 common/data/virtmodem.c create mode 100644 common/devices/device.c create mode 100644 common/devices/tekram.c create mode 100644 common/devices/unixirda.c create mode 100644 common/devices/winserial.c create mode 100644 common/files/gsm-filetypes.c create mode 100644 common/files/midifile.c create mode 100644 common/gsm-api.c create mode 100644 common/gsm-bitmaps.c create mode 100644 common/gsm-calendar.c create mode 100644 common/gsm-coding.c create mode 100644 common/gsm-datetime.c create mode 100644 common/gsm-networks.c create mode 100644 common/gsm-phonebook.c create mode 100644 common/gsm-ringtones.c create mode 100644 common/gsm-sms.c create mode 100644 common/gsm-wap.c create mode 100644 common/newmodules/n7110.c create mode 100644 common/newmodules/newat.c create mode 100644 common/newmodules/sniff/sniff.c create mode 100644 common/protocol/at.c create mode 100644 common/protocol/fbusirda.c create mode 100644 common/protocol/mbus.c create mode 100755 config/config.guess create mode 100755 config/config.sub create mode 100755 config/install-sh create mode 100644 configure.in create mode 100644 getopt/Makefile create mode 100644 getopt/getopt.c create mode 100644 getopt/getopt.h create mode 100644 getopt/getopt1.c create mode 100644 getopt/win32/getopt.c create mode 100644 getopt/win32/getopt.h create mode 100644 gnokii.spec create mode 100644 gnokii/Makefile create mode 100644 gnokii/gnokii.h create mode 100644 gnokiid/Makefile create mode 100644 gnokiid/gnokiid.c create mode 100644 include/data/at-emulator.h create mode 100644 include/data/datapump.h create mode 100644 include/data/rlp-common.h create mode 100644 include/data/rlp-crc24.h create mode 100644 include/data/virtmodem.h create mode 100644 include/devices/device.h create mode 100644 include/devices/linuxirda.h create mode 100644 include/devices/tekram.h create mode 100644 include/devices/unixirda.h create mode 100644 include/devices/unixserial.h create mode 100644 include/devices/winserial.h create mode 100644 include/files/cfgreader.h create mode 100644 include/files/gsm-filetypes.h create mode 100644 include/files/midifile.h create mode 100644 include/gsm-api.h create mode 100644 include/gsm-bitmaps.h create mode 100644 include/gsm-calendar.h create mode 100644 include/gsm-coding.h create mode 100644 include/gsm-common.h create mode 100644 include/gsm-datetime.h create mode 100644 include/gsm-networks.h create mode 100644 include/gsm-phonebook.h create mode 100644 include/gsm-ringtones.h create mode 100644 include/gsm-sms.h create mode 100644 include/gsm-wap.h create mode 100644 include/misc.h create mode 100644 include/misc_win32.h create mode 100644 include/newmodules/n6110.h create mode 100644 include/newmodules/n7110.h create mode 100644 include/newmodules/newat.h create mode 100644 include/newmodules/sniff/sniff.h create mode 100644 include/protocol/at.h create mode 100644 include/protocol/fbusirda.h create mode 100644 include/protocol/mbus.h create mode 100644 mgnetd/Makefile create mode 100644 mgnetd/mg_demo_client/Makefile create mode 100644 mgnetd/mg_demo_client/mg_demo_client.c create mode 100644 mgnetd/mg_demo_client/mg_net_api.c create mode 100644 mgnetd/mg_demo_client/mg_net_api.h create mode 100644 mgnetd/mg_demo_client/mg_net_api.txt create mode 100644 mgnetd/mgnetd.c create mode 100644 mgnetd/mgnetd.h create mode 100644 mgnetd/readme.txt create mode 100644 mkinstalldirs create mode 100644 packaging/Debian/README.debian create mode 100644 packaging/Debian/changelog.in create mode 100644 packaging/Debian/conffiles create mode 100644 packaging/Debian/control create mode 100644 packaging/Debian/copyright create mode 100644 packaging/Debian/docs create mode 100644 packaging/Debian/menu create mode 100644 packaging/Debian/postinst create mode 100644 packaging/Debian/preinst create mode 100755 packaging/Debian/rules create mode 100644 packaging/RedHat/gnokii.spec.in create mode 100644 packaging/Slackware/SlackBuild.in create mode 100644 packaging/Slackware/disk create mode 100755 packaging/make_dist create mode 100644 po/Makefile.in.in create mode 100644 po/POTFILES.in create mode 100644 po/cs.po create mode 100644 po/de.po create mode 100644 po/et.po create mode 100644 po/fi.po create mode 100644 po/it.po create mode 100644 po/nl.po create mode 100644 po/pl.po create mode 100644 po/sk.po create mode 100644 readme create mode 100644 utils/Makefile create mode 100644 utils/mgnokiidev.c create mode 100644 utils/sendsms create mode 100644 utils/todologo create mode 100644 win32_makefile/clean.bat create mode 100644 win32_makefile/dll_vc6/GnokiiAPI.PRJ create mode 100644 win32_makefile/dll_vc6/GnokiiAPI.def create mode 100644 win32_makefile/dll_vc6/GnokiiAPI.dep create mode 100644 win32_makefile/dll_vc6/GnokiiAPI.dsp create mode 100644 win32_makefile/dll_vc6/GnokiiAPI.dsw create mode 100644 win32_makefile/dll_vc6/Script1.rc create mode 100644 win32_makefile/dll_vc6/clean.bat create mode 100644 win32_makefile/dll_vc6/fcopy.BAT create mode 100644 win32_makefile/dll_vc6/gnokiiapi.c create mode 100644 win32_makefile/dll_vc6/gnokiiapi.h create mode 100644 win32_makefile/dll_vc6/resource.h create mode 100644 win32_makefile/fcopy.bat create mode 100644 win32_makefile/gnokii_vc6/clean.bat create mode 100644 win32_makefile/gnokii_vc6/debug.bat create mode 100644 win32_makefile/gnokii_vc6/gnokii.mak create mode 100644 win32_makefile/gnokii_vc6/release.bat create mode 100644 win32_makefile/gui_delphi/Calendar.dfm create mode 100644 win32_makefile/gui_delphi/Calendar.pas create mode 100644 win32_makefile/gui_delphi/GnokiiAPI.pas create mode 100644 win32_makefile/gui_delphi/Project1.cfg create mode 100644 win32_makefile/gui_delphi/Project1.dof create mode 100644 win32_makefile/gui_delphi/Project1.dpr create mode 100644 win32_makefile/gui_delphi/backup.dfm create mode 100644 win32_makefile/gui_delphi/backup.pas create mode 100644 win32_makefile/gui_delphi/backup2.dfm create mode 100644 win32_makefile/gui_delphi/backup2.pas create mode 100644 win32_makefile/gui_delphi/logosring.dfm create mode 100644 win32_makefile/gui_delphi/logosring.pas create mode 100644 win32_makefile/gui_delphi/mainunit.dfm create mode 100644 win32_makefile/gui_delphi/mainunit.pas create mode 100644 win32_makefile/gui_delphi/netmon.dfm create mode 100644 win32_makefile/gui_delphi/netmon.pas create mode 100644 win32_makefile/gui_delphi/pbkedit.dfm create mode 100644 win32_makefile/gui_delphi/pbkedit.pas create mode 100644 win32_makefile/gui_delphi/pbkedit2.dfm create mode 100644 win32_makefile/gui_delphi/pbkedit2.pas create mode 100644 win32_makefile/gui_delphi/smscedit.dfm create mode 100644 win32_makefile/gui_delphi/smscedit.pas create mode 100644 win32_makefile/gui_delphi/smsedit.dfm create mode 100644 win32_makefile/gui_delphi/smsedit.pas create mode 100644 win32_makefile/gui_delphi/wapbook.dfm create mode 100644 win32_makefile/gui_delphi/wapbook.pas create mode 100644 win32_makefile/mversion.js create mode 100644 xgnokii/Makefile create mode 100644 xgnokii/VERSION create mode 100644 xgnokii/xgnokii.c create mode 100644 xgnokii/xgnokii.h create mode 100644 xgnokii/xgnokii_calendar.c create mode 100644 xgnokii/xgnokii_calendar.h create mode 100644 xgnokii/xgnokii_cfg.c create mode 100644 xgnokii/xgnokii_cfg.h create mode 100644 xgnokii/xgnokii_common.c create mode 100644 xgnokii/xgnokii_common.h create mode 100644 xgnokii/xgnokii_contacts.c create mode 100644 xgnokii/xgnokii_contacts.h create mode 100644 xgnokii/xgnokii_data.c create mode 100644 xgnokii/xgnokii_data.h create mode 100644 xgnokii/xgnokii_dtmf.c create mode 100644 xgnokii/xgnokii_dtmf.h create mode 100644 xgnokii/xgnokii_logos.c create mode 100644 xgnokii/xgnokii_logos.h create mode 100644 xgnokii/xgnokii_lowlevel.c create mode 100644 xgnokii/xgnokii_lowlevel.h create mode 100644 xgnokii/xgnokii_netmon.c create mode 100644 xgnokii/xgnokii_netmon.h create mode 100644 xgnokii/xgnokii_sms.c create mode 100644 xgnokii/xgnokii_sms.h create mode 100644 xgnokii/xgnokii_speed.c create mode 100644 xgnokii/xgnokii_speed.h create mode 100644 xgnokii/xgnokii_xkeyb.c create mode 100644 xgnokii/xgnokii_xkeyb.h create mode 100644 xgnokii/xgnokii_xring.c create mode 100644 xgnokii/xgnokii_xring.h create mode 100644 xgnokii/xpm/6110mini.xpm create mode 100644 xgnokii/xpm/BCard.xpm create mode 100644 xgnokii/xpm/Black_point.xpm create mode 100644 xgnokii/xpm/Caller.xpm create mode 100644 xgnokii/xpm/Caller_logo.xpm create mode 100644 xgnokii/xpm/Check.xpm create mode 100644 xgnokii/xpm/Delete.xpm create mode 100644 xgnokii/xpm/Dial.xpm create mode 100644 xgnokii/xpm/Display.xpm create mode 100644 xgnokii/xpm/Duplicate.xpm create mode 100644 xgnokii/xpm/Edit.xpm create mode 100644 xgnokii/xpm/Edit_flip_horizontal.xpm create mode 100644 xgnokii/xpm/Edit_flip_vertical.xpm create mode 100644 xgnokii/xpm/Edit_invert.xpm create mode 100644 xgnokii/xpm/Flip.xpm create mode 100644 xgnokii/xpm/Forward.xpm create mode 100644 xgnokii/xpm/Green_pixel.xpm create mode 100644 xgnokii/xpm/Green_point.xpm create mode 100644 xgnokii/xpm/Invert.xpm create mode 100644 xgnokii/xpm/Names.xpm create mode 100644 xgnokii/xpm/New.xpm create mode 100644 xgnokii/xpm/NewBD.xpm create mode 100644 xgnokii/xpm/NewCall.xpm create mode 100644 xgnokii/xpm/NewMeet.xpm create mode 100644 xgnokii/xpm/NewRem.xpm create mode 100644 xgnokii/xpm/Op.xpm create mode 100644 xgnokii/xpm/Open.xpm create mode 100644 xgnokii/xpm/Operator_logo.xpm create mode 100644 xgnokii/xpm/Read.xpm create mode 100644 xgnokii/xpm/Reply.xpm create mode 100644 xgnokii/xpm/Save.xpm create mode 100644 xgnokii/xpm/Send.xpm create mode 100644 xgnokii/xpm/SendSMS.xpm create mode 100644 xgnokii/xpm/Startup.xpm create mode 100644 xgnokii/xpm/Startup_logo.xpm create mode 100644 xgnokii/xpm/Tool_brush.xpm create mode 100644 xgnokii/xpm/Tool_filled_rectangle.xpm create mode 100644 xgnokii/xpm/Tool_line.xpm create mode 100644 xgnokii/xpm/Tool_rectangle.xpm create mode 100644 xgnokii/xpm/alarm.xpm create mode 100644 xgnokii/xpm/background.xpm create mode 100644 xgnokii/xpm/info.xpm create mode 100644 xgnokii/xpm/logo.xpm create mode 100644 xgnokii/xpm/phone.xpm create mode 100644 xgnokii/xpm/quest.xpm create mode 100644 xgnokii/xpm/sim.xpm create mode 100644 xgnokii/xpm/sms.xpm create mode 100644 xgnokii/xpm/stop.xpm diff --git a/COPYING b/COPYING new file mode 100644 index 0000000..049061c --- /dev/null +++ b/COPYING @@ -0,0 +1,30 @@ +GNOKII - A Linux/Unix toolset and driver for the Nokia 3x10/8110/51x0/61x0 + Copyright (C) 1999 Hugh Blemings & Pavel Janík ml. + +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 2 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. + +You should have received a copy of the GNU General Public License along with +this program; if not, write to the Free Software Foundation, Inc., 59 Temple +Place - Suite 330, Boston, MA 02111-1307, USA. + +You can contact authors by mail at + +hugh@linuxcare.com Pavel.Janik@suse.cz +Hugh Blemings Mgr. Pavel Janík, SuSE CR, s.r.o. +PO Box 234 Pod Pekárnami 338/12 +Belconnen ACT 2616 190 00 Praha 9 +Australia Czech Republic + +We would be delighted to receive a postcard from you if you use gnokii but +this is not a requirement of these licence terms! :) + +Any trademarks in this or other gnokii documents/files are the property of +their respective owners. diff --git a/Docs/CREDITS b/Docs/CREDITS new file mode 100644 index 0000000..7193775 --- /dev/null +++ b/Docs/CREDITS @@ -0,0 +1,111 @@ +- Credits - + +Thank you to, in no particular order... + +* Everyone on the gnokii mailing list for their interest + and input into the project. + +* Pavel Janík ml. for the majority of work on gnokii 6110 series + support, spelling corrections and miscellaneous code cleanups. + +* Serge Odinokov for 6110 series authentication protocol and + example Delphi RLP code. Many thanks... + +* Nick Lamb for operator logos, CLI uploading and AT*C command support. + +* Francois Dessart, Brendan O'Dea, Tony Lindstrom, Steffan Henke + and Cobus Van Eeden for dumps (and in some cases interpretation!) + of unknown messages, bug reports and prompt feedback of being + able to build new releases. + +* Staffan Ulfberg for taking care of the website and for instigating + the 6110 project which has now been merged with the gnokii effort. + +* Martin Hamilton for looking after the mailing list. + +* Tim Potter for some of the ideas that are now incorporated in gnokii + to provide multiple model support and config file code. + +* Paul Mackerras and Andrew Tridgell for discussions about pseudo + ttys, setuid programs and such. Tridge kindly reviewed the + mgnokiidev.c code. + +* Richard Kalton for his excellent page about Nokia 6110 protocol. + +* Colin Paton for his mail with subject "Dumps of phone<>PC traffic". + It helped a lot. + +* Juan Altmayer Pizzorno for his help with MBUS/FBUS and other + debugging. + +* Gary Reuter for his help when looking for a bug in phone numbers, + for the set-time function debugging. + +* Jiri Meloun for voice calling. + +* Emilio Brambilla for SMS notification fixes, setdatetime implementation + and typing GSM_Default_Alphabet. + +* Pawe³ Kot for EnterPIN on 6110 Series changes and other things. + +* Konstantinos Agouros for gnokii-perl module. + +* Czech Linux Users' group for it's CVS server which hosted our + development repository. + +* Goran Dokic, Samuli Sorvakko and anonymous for gettext files for + Dutch, Finnish and German translations. + +* Marcel Holtmann for RLP FCS code and misc stuff. + +* Chris Kemp for logo stuff and a big part of the RLP code. + +* Andrew Kozin for the model 640 support (NMT 450 network). + +* Karel Zak for his enthusiasm (and patches) for the autoconf stuff. + +* Harri Yli-Torkko for investigative work & code on the 3810/8110. + +* Stano Meduna for misc code and build process work. + +* Alfred Nurnberger for some information on the 5160/6160 MBUS + protocol. + +* Alessandro Zummo for reset and getopts code. + +* Mark Looi for Cell Broadcast code - based on protocol decoded by + Colin Paton + +* Sebastian Zagrodzki and Jacek Fiok for Polish .po file + +* Lucy for making pizza and putting up with Hugh disappearing to + work on this. Rachael for new parent induced insomnia... + +* Last not least: Mirka for allowing Pavel to work on gnokii + and for _great_ gnokii operator logos... + +* Hendrik Spohr for getting 7110 functions and DLR-3 to work (one small step + for Hendrik, big step for (my)gnokii :-)) + +* Balazs Nagy for frames list and long hacker's work... + +* Ladislav Michl & Manfred Jonsson for support for various AT phones... + +* Manfred Jonsson for idea of programming, which looks for me good + +* Michael Hund for many improvements and progress in 7110/6210 source... + +* Ralf Thelen for very required by many, many people patch and getting + infrared sockets to work -> small changes, few days of hard searching :-). + Also sms stuff is OK now + +* Gabriele Zappi for many 6210 improvements and big calendar source + +* Andrea Scopece for 61xx source for netmonitor and other improvements + +* ....and other people, who reported me bugs or want(ed) to use mygnokii + and help me in making it the best ! + +We tried to mentioned everyone who contributed to gnokii project but we +might to forgot someone. If anyone does feel that we missed him and his +name should be mentioned here do not hesitate to contact us :-) diff --git a/Docs/Makefile b/Docs/Makefile new file mode 100644 index 0000000..8dd1724 --- /dev/null +++ b/Docs/Makefile @@ -0,0 +1,70 @@ +# +# Makefile for the xGNOKII tool suite. +# + +TOPDIR=.. +include $(TOPDIR)/Makefile.global + +HELP1_DIR = en_US +HELP11_DIR = pl_PL +HELP2_DIR = examples +HELP3_DIR = default + +GNOKII1_MAN1 = "man/gnokii.1" +GNOKII1_MAN2 = "man/todologo.1" +GNOKII8_MAN1 = "man/gnokiid.8" +GNOKII8_MAN2 = "man/mgnokiidev.8" +XGNOKII_MAN = "man/xgnokii.1x" + +all: + @echo + +makelib: + @echo + +install: + $(INSTALL) -d $(docdir) + + ( cd $(HELP1_DIR); \ + $(FIND) . -type d \! -path "*CVS*" \ + -exec $(INSTALL) -d $(docdir)/en_US/{} \; ; \ + $(FIND) . -type f \! -path "*CVS*" \ + -exec $(INSTALL) -m 0444 {} $(docdir)/en_US/{} \; \ + ) + ( cd $(HELP11_DIR); \ + $(FIND) . -type d \! -path "*CVS*" \ + -exec $(INSTALL) -d $(docdir)/pl_PL/{} \; ; \ + $(FIND) . -type f \! -path "*CVS*" \ + -exec $(INSTALL) -m 0444 {} $(docdir)/pl_PL/{} \; \ + ) + + ( cd $(HELP2_DIR); \ + $(FIND) . -type d \! -path "*CVS*" \ + -exec $(INSTALL) -d $(docdir)/examples/{} \; ; \ + $(FIND) . -type f \! -path "*CVS*" \ + -exec $(INSTALL) -m 0444 {} $(docdir)/examples/{} \; \ + ) + ( cd $(HELP3_DIR); \ + $(FIND) . -type d \! -path "*CVS*" \ + -exec $(INSTALL) -d $(docdir)/default/{} \; ; \ + $(FIND) . -type f \! -path "*CVS*" \ + -exec $(INSTALL) -m 0444 {} $(docdir)/default/{} \; \ + ) + $(INSTALL) -m 0444 CREDITS $(docdir) + $(INSTALL) -m 0444 ../COPYING $(docdir) + $(INSTALL) $(GNOKII1_MAN1) $(man1dir) + $(INSTALL) $(GNOKII1_MAN2) $(man1dir) + $(INSTALL) $(GNOKII8_MAN1) $(man8dir) + $(INSTALL) $(GNOKII8_MAN2) $(man8dir) + if [ "x$(HAVE_XGNOKII)" = xyes ]; then \ + ($(INSTALL) $(XGNOKII_MAN) $(xmandir)) \ + fi + @echo "done" + +clean: + $(RM) *~ + +depend dep: + @echo + +.PHONY: all install clean dep depend diff --git a/Docs/default/3210/nse8/pictures/picture1.nlm b/Docs/default/3210/nse8/pictures/picture1.nlm new file mode 100644 index 0000000000000000000000000000000000000000..85aee075cb79fb60d702a0181b0ce27b3e619d07 GIT binary patch literal 262 zcmW;GJqiLb5Cz~DR!O0_mKMR)*2+!`!PY`O!=Ay)E_(wn;9b-UY-K5!3-|*TE-E{| z%s?g|GvSf-ay2js7S2G+X}19z#jI;i5hir&BoG-|va5(EtXzLYf%GO9A|IvxQN}mt zzJK2d7y=)M1RLtLJ{*V-pMnp6sy-Yb1OLGz>fJmX00aKumAzmbJQ2tEaF^?$|M&s_ z{5X~V!~gh!{{A=@)kpu}06c#HCH>Dn0000#fJd+nJ{%wb|HKX03_pGV1OLLm@(dsT z0T1`h*Q!7t=Kv3njJ5JWkAtud9|qsrAP0l+2Rs{f@f>5p@CP_0U(kRd;J^dCwX67H z0Qdj{oEHA9008g+2aW?*{XhZW01plT+wXu6zyJ;h0PniM9{>OV4*`AO&<+3q03HI@ M?O6u^0010Ye literal 0 HcmV?d00001 diff --git a/Docs/default/3210/nse8/pictures/picture3.nlm b/Docs/default/3210/nse8/pictures/picture3.nlm new file mode 100644 index 0000000000000000000000000000000000000000..4db41a382ed76d2b1f753fed2246c6f41f70294b GIT binary patch literal 262 zcmW-bu}T9$5Qe|KY;l}dtb$+>bT2B#%3u-Fxp!QlqN0$-PJIlk

BiK0`vReS{=d zzJ+;&6c!f3I-7x+`I!0nXKt>pt!i=JR)CjWhXx}sFlZO4Ml;T3QmJfns}Z>PygMG2 z0=>?5{a#v7DjQY}CV^3RtfaxEnfQ?-Nng7YuSr;B0x6U#LQf2N{`pus!>NC1t;{Xt z@srd`DI_;=+7;%}e+@kP;5RH*we0L!2+PX39dq(Md#Egj`O({M(XmX4lRamr^QdV& Y_xmA)zb90G?cA30ZZ40DJBUX3A2W12zW@LL literal 0 HcmV?d00001 diff --git a/Docs/default/3210/nse8/startup.nlm b/Docs/default/3210/nse8/startup.nlm new file mode 100644 index 0000000000000000000000000000000000000000..a339ef62ae783d90424a29491f730f8874233900 GIT binary patch literal 538 zcmebC@l{}CVhAx{WIzK6a6aP)<_0K-{{izq28ItHp8b8s|NsAkm~8+5Gt`5beAWN| zF)#y}lRORI|NrBu4iaT~ejliZ{rmq9DwE~y|9h&;UkuXr@BjY>2ED`oKdfs0{r~?{ z$9Kp7U0`6p{{Q#~_W$o27(&?A|9Sn}F7N-!00!3oKN1S;-~SV0Sit@NBNyAe|9?Fb zfcBhnQDl&>n8eV)UVqeRR$gC`=LUwZ|C6S=3IuY7I53F+*IBaZYRHw<3QW#_f~0)B zmU(*yDA@m7bvbRT(Uvs}gzx_k;hE`m);l=h&i{YPAJcAvMDy$a{r?vgzIJtZ!FQks z|F7MYb#2oG5bOV{yW6&IdjMu`TOA!89ROnfiY|NgcIyTZD?E2??6%tpK&J2SyzlRB z=Uw>!|M$MNx1+X~?*?jH_xgYB|NHyi7Tn-E+`xD^;qV3f4HfK%85j;7Je(l*;RQ30 zdARxT1NjRTjL!TY4znG0<}Uc*aG3wYA^yWavLeBm|H1+J!|m-KeiShCeK^E-xPg7c riwb6-TA(q^AAZy@gG~T2>p;wdhvXlA_)*UcwCw?i334w45M}}ZR#hpR literal 0 HcmV?d00001 diff --git a/Docs/default/3210/nse9/pictures/picture1.nlm b/Docs/default/3210/nse9/pictures/picture1.nlm new file mode 100644 index 0000000000000000000000000000000000000000..95192e6bae06b0d1baa0adfa6306a6d8e9ec55f6 GIT binary patch literal 262 zcmV+h0r~z;OidsG0{}=I0shvaL_z?nw*S|=05T9BMO$0?)SQ7uKM-N<|64u)5I+C_ zf49{>7y=)M1RLtLJ{*V-pMnp6sy-Yb1OLGz>fJmX00aKumAzmbJQ2tEaF^?$|M&s_ z{5X~V!~gh!{{A=@)kpu}06c#HCH>Dn0000#fJd+nJ{%wb|HKX03_pGV1OLLm@(dsT z0T1`h*Q!7t=Kv3njJ5JWkAtud9|qsrAP0l+2Rs{f@f>5p@CP_0U(kRd;J^dCwX67H z0Qdj{oEHA9008g+2aW?*{XhZW01plT+wXu6zyJ;h0PniM9{>OV4*`AO&<+3q03HI@ M?O6u^0010Ye literal 0 HcmV?d00001 diff --git a/Docs/default/3210/nse9/pictures/picture2.nlm b/Docs/default/3210/nse9/pictures/picture2.nlm new file mode 100644 index 0000000000000000000000000000000000000000..64f67a89cba7b8d63d818681395e982220364c3e GIT binary patch literal 262 zcmXw!F;2r^427Sa3=t|25EEj^z>XNYJ5>e-K$WT=u~e-XGH?m3OhquTW~5SW^m{-vWkG@-lzwftRnp_epaQL0Q&YX{<-l9VfeV_4 zLd)oL6JIK%Ws($xpx$u?M9HChEHpk7ocpig*3>(%%Xk2;4T;H&5JhG-z|}HiWwIkg+2KkV*!kgX zc6%Vx!h(;1xq-jFoq?~S!iKT`0N>|!8NMGsDwyXV;D6jMBmeWqXZD>3_}lw!oUGcC1=wFyCflMa2Be5{pa~K$y z8Q2&Y8yJ{EP?>Ye=UL9FPI3W?njO2HyX|%YP(QOBf@uI^R=xp>GR`ZzZ8=8*XciO{ J9)Pj%&;X6-TiyTw literal 0 HcmV?d00001 diff --git a/Docs/default/3310/TwojaEra b/Docs/default/3310/TwojaEra new file mode 100644 index 0000000..81b0548 --- /dev/null +++ b/Docs/default/3310/TwojaEra @@ -0,0 +1 @@ +Twoja Era:d=8,o=6,s=N,b=160,l=0:g5,c,g,2f,2e,2p,p,g5,c,g,2f,2e,2p,4p,h5,g5,2d.5,4p,2p,p,g5,c,g,2f,2e,2p,p,g5,c,g,2f,2e,2p,4p,h5,g5,2d.5,4p \ No newline at end of file diff --git a/Docs/default/3310/pictures/picture1.nlm b/Docs/default/3310/pictures/picture1.nlm new file mode 100644 index 0000000000000000000000000000000000000000..c1a4ec2050225ee06a2b7f5a107a2671099c5192 GIT binary patch literal 262 zcmXxcF-ikb6oujcWyZV^BTRyY5Mf@xK-__qNtr^$CB#y)1;HV)v~UGFMQ|HVVc{;c zv=jvyQ096j!B-qU?!E7voty?2G2M5-0YRy^%V>ih(|_F6@NUH#t@|P8^<;Y%7wen$ zvJ694K>O7OtIq&iPxi=8EqX$AoX V4hVyX!2rSlnhaqu)In)n6aaIy7(W02 literal 0 HcmV?d00001 diff --git a/Docs/default/3310/pictures/picture11.nlm b/Docs/default/3310/pictures/picture11.nlm new file mode 100644 index 0000000000000000000000000000000000000000..01f76e0e82d33f273ee6c6e5062072e0b7358dd1 GIT binary patch literal 262 zcmebC@l{}CX7G?7#t3O4U}O}XkY<}*sxDv09z_i0e1%6 MVGJ;*f>dGy05^UU1ONa4 literal 0 HcmV?d00001 diff --git a/Docs/default/3310/pictures/picture12.nlm b/Docs/default/3310/pictures/picture12.nlm new file mode 100644 index 0000000000000000000000000000000000000000..d7cc9a4882d114c95575e7eefca17d7cf51ecd29 GIT binary patch literal 262 zcmebC@l{}CX7G?i z?7SAa{sstx!TkWpK!!OC$`4q8H1i(z2@gP)vd^f1ID;7|2zD4q8Q7^H1`YrKJ}w`e literal 0 HcmV?d00001 diff --git a/Docs/default/3310/pictures/picture13.nlm b/Docs/default/3310/pictures/picture13.nlm new file mode 100644 index 0000000000000000000000000000000000000000..6fc50c65e0ada73d7b8ef3adadea87c915159b2e GIT binary patch literal 262 zcmXBOK?=e!5QX7CCW|bjWLZII>$-|yk9T5b^HQ^vm zsbK@%x+)Tu1B=4pzH&L?<8+oe0(LsN<&Ci!PIJI$dKd)KCE`(F=Owp#!r=SQ23#Wn NT9 `wexfIq*{8xH^g literal 0 HcmV?d00001 diff --git a/Docs/default/3310/pictures/picture14.nlm b/Docs/default/3310/pictures/picture14.nlm new file mode 100644 index 0000000000000000000000000000000000000000..698ec61a7e7c051ba19ba4238be7d2cbe5f2de6c GIT binary patch literal 262 zcmebC@l{}CX7G?mNWE^8XJ&80`NWAPoNh z5SjrlW&i&HM5z8h#2m)||NlT0!BxZcv%^e;s$lqET@Pk5KHksV0Aew|-|-v5cwq4v P%wYI$QGWm^gBt(<&Rr(I literal 0 HcmV?d00001 diff --git a/Docs/default/3310/pictures/picture2.nlm b/Docs/default/3310/pictures/picture2.nlm new file mode 100644 index 0000000000000000000000000000000000000000..1cb9c6dc8add950265cfd7fb01b35865fd8df38b GIT binary patch literal 262 zcmebC@l{}CX7G?D~q!`%mGw>LI7?wQ`1UNv9)KW|6dPcFfiEv1K)!`?ArtwI1eAN zXO}QO|Nn@c0Yl(J11`oS2L4qmxHfPxhJ-qVhK3q&FmkK{0fX{?AA$VPkb?JrAAtl` LJYZm84GjeV)(TFl literal 0 HcmV?d00001 diff --git a/Docs/default/3310/pictures/picture3.nlm b/Docs/default/3310/pictures/picture3.nlm new file mode 100644 index 0000000000000000000000000000000000000000..d72fdaf0aa1aaa4b73b1b7eee2a5df8a10d163c8 GIT binary patch literal 262 zcmebC@l{}CX7G?-aA;&=U^vGVz|hge!oc9i6u`*I1Z1eNOkk3f0op3SvVbMirhu_nmDhQIMA^Me2(2bc27LfL!1r{=VPMS@I|W|<}f)yVKSHolsF z{?oEQ<&{T;>eOuJ14aIE)rg49<1f5q@eV}!{LQ}eUpMJ%Y^z50qrgVMbT2B#%3u-Fxp!QlqN0$-PJIlk

BiK0`vReS{=d zzJ+;&6c!f3I-7x+`I!0nXKt>pt!i=JR)CjWhXx}sFlZO4Ml;T3QmJfns}Z>PygMG2 z0=>?5{a#v7DjQY}CV^3RtfaxEnfQ?-Nng7YuSr;B0x6U#LQf2N{`pus!>NC1t;{Xt z@srd`DI_;=+7;%}e+@kP;5RH*we0L!2+PX39dq(Md#Egj`O({M(XmX4lRamr^QdV& Y_xmA)zb90G?cA30ZZ40DJBUX3A2W12zW@LL literal 0 HcmV?d00001 diff --git a/Docs/default/3310/pictures/picture7.nlm b/Docs/default/3310/pictures/picture7.nlm new file mode 100644 index 0000000000000000000000000000000000000000..85aee075cb79fb60d702a0181b0ce27b3e619d07 GIT binary patch literal 262 zcmW;GJqiLb5Cz~DR!O0_mKMR)*2+!`!PY`O!=Ay)E_(wn;9b-UY-K5!3-|*TE-E{| z%s?g|GvSf-ay2js7S2G+X}19z#jI;i5hir&BoG-|va5(EtXzLYf%GO9A|IvxQN}mt zzJK2d)t1gkC7J?8$yx7@UrpppiY~fFtPJDxqDyiaPB{q2l$#VpO5cMb@-=)^@^7wYs&=lQ{mr`|7Bp-^PeBzU&A1BLVSPW<@G-exE83_ zG4OvcI3Vx9^Jhv!`EvuV2Fah literal 0 HcmV?d00001 diff --git a/Docs/default/6150/caller/colleagues.nlm b/Docs/default/6150/caller/colleagues.nlm new file mode 100644 index 0000000000000000000000000000000000000000..6346bc4596f3581e199a8a108444eac58e85ce24 GIT binary patch literal 136 zcmebC@l{}CWboi)WU&A6g8>9;j__N68O0KeGr)`zWrheaBSq$b2ZX_3paEuNFmON^ p9tE3(BZ3=3GZ?Tz888X}CJYI? literal 0 HcmV?d00001 diff --git a/Docs/default/6150/caller/friends.nlm b/Docs/default/6150/caller/friends.nlm new file mode 100644 index 0000000000000000000000000000000000000000..1ae5a1d10f5e6f158313fc48027fa469e5e5a3cd GIT binary patch literal 136 zcmebC@l{}CWboi)WPpPQ%nf`X4zmPLf?)%Y!NMXS;NSpca0DrJOi=(b1OlB}MFc<$ oMh8{~2*X1a!sv8yRRW6?x*wGRF*ul%I~qW`;O4+hW`NlR069$%T>t<8 literal 0 HcmV?d00001 diff --git a/Docs/default/6150/caller/other.nlm b/Docs/default/6150/caller/other.nlm new file mode 100644 index 0000000000000000000000000000000000000000..df7878167db6b93457cb3d9ccc73949180f32a4f GIT binary patch literal 136 zcmebC@l{}CWboi)WPk$+7)vDq!eUdI0AX;#84@rN2AG;Uh!O?{rw2ED`oKdfs0{r~?{ z$9Kp7U0`6p{{Q#~_W$o27(&?A|9Sn}F7N-!00!3oKN1S;-~SV0Sit@NBNyAe|9?Fb zfcBhnQDl&>n8eV)UVqeRR$gC`=LUwZ|C6S=3IuY7I53F+*IBaZYRHw<3QW#_f~0)B zmU(*yDA@m7bvbRT(Uvs}gzx_k;hE`m);l=h&i{YPAJcAvMDy$a{r?vgzIJtZ!FQks z|F7MYb#2oG5bOV{yW6&IdjMu`TOA!89ROnfiY|NgcIyTZD?E2??6%tpK&J2SyzlRB z=Uw>!|M$MNx1+X~?*?jH_xgYB|NHyi7Tn-E+`xD^;qV3f4HfK%85j;7Je(l*;RQ30 zdARxT1NjRTjL!TY4znG0<}Uc*aG3wYA^yWavLeBm|H1+J!|m-KeiShCeK^E-xPg7c riwb6-TA(q^AAZy@gG~T2>p;wdhvXlA_)*UcwCw?i334w45M}}ZR#hpR literal 0 HcmV?d00001 diff --git a/Docs/default/6210/caller/colleagues.bmp b/Docs/default/6210/caller/colleagues.bmp new file mode 100644 index 0000000000000000000000000000000000000000..35e78d0baf1090a6fa14a32856e38585a0b9c888 GIT binary patch literal 230 zcmZ?reZ~L*c0fu4h&_Oq4~Q9o5Cm2L@e5`MW&*N7IPFXtkVFP7P!2ngUJhkT9bjPK zg0T5>HZU+4Kn&zvsq=wh0YsellJ^G2g-~&ZNgKeX1EqKwR5mbtgsNfS*idz_5zOJ0 n5!k>O1y!&70H_|y7GT)GxDmqUf5BY95CYN5!2b6G0}BHH?VB7C literal 0 HcmV?d00001 diff --git a/Docs/default/6210/caller/family.bmp b/Docs/default/6210/caller/family.bmp new file mode 100644 index 0000000000000000000000000000000000000000..481a31142396dfd9aa87c0e850300566f01fea95 GIT binary patch literal 230 zcmZ?reZ~L*c0fu4h&_Oq4~Q9o5Cm2L@e5`MW&*N7IPFXtkVFQ;5DsHQ0$h~ozy<~e zPY9PKQG$UX8N%i;;$dK5fv^Q6*ccd=L)Z#DKwG#VYzH>R1_lF&0|M9>4lpn*084lR n*<1%3!EEIohXW853=A?A4;vW%{|AdRu+L{;*Z`9O34H(nO4t}E literal 0 HcmV?d00001 diff --git a/Docs/default/6210/caller/friends.bmp b/Docs/default/6210/caller/friends.bmp new file mode 100644 index 0000000000000000000000000000000000000000..bc246e6a020a3a52e83180351c893e85e0f7bac2 GIT binary patch literal 230 zcmZ?reZ~L*c0fu4h&_Oq4~Q9o5Cm2L@e5`MW&*N7IPFXtkVFP-5Dq_s90S902;1O5 zVgtiH2-`uS!GQs)rd^OhfnfnyoRPmvMu2f4*dj)bE+ql5=|H;$ych%+SRiT`xEKT~ p4mN@~jI3ND0t_1=4r>(@QDBIIutDZC3PIQ)dl{i>!0riQ000Nj7YzUa literal 0 HcmV?d00001 diff --git a/Docs/default/6210/caller/other.bmp b/Docs/default/6210/caller/other.bmp new file mode 100644 index 0000000000000000000000000000000000000000..da3b928fbd82d2a91506e25c681ae1915f49c9de GIT binary patch literal 230 zcmZ?reZ~L*c0fu4h&_Oq4~Q9o5Cm2L@e5`MW&*N7IPFXtkVFQ;U=HJd=KnBJ2-_1$ zJQ<120#Wu4q<%S63)4Ra1}+HO@(++UfH=T~!2-xx0G4nmaAEjzpb^6EaDj_k0NJ_+ VA>s@j77Vs*U?mI;1wfjS0RY8p9uNQk literal 0 HcmV?d00001 diff --git a/Docs/default/6210/caller/vip.bmp b/Docs/default/6210/caller/vip.bmp new file mode 100644 index 0000000000000000000000000000000000000000..08dfc56512c12b6eae8045d992773abf7e8f4ffe GIT binary patch literal 230 zcmZ?reZ~L*c0fu4h&_Oq4~Q9o5Cm2L@e5`MW&*N7IPFXtkVFP-5DuGM1p~u!D4WNC zf#Dt!8>)sMB)$M5&dX!Rz_<`%5igH1#B`t(m>q=>=RVj7)*#UXRKo(%3t}@u)qusJ S=Gfk=V_3Tnq8_9Y$OZtI^A>6V literal 0 HcmV?d00001 diff --git a/Docs/default/6210/picture/picture1.nlm b/Docs/default/6210/picture/picture1.nlm new file mode 100644 index 0000000000000000000000000000000000000000..4db41a382ed76d2b1f753fed2246c6f41f70294b GIT binary patch literal 262 zcmW-bu}T9$5Qe|KY;l}dtb$+>bT2B#%3u-Fxp!QlqN0$-PJIlk

BiK0`vReS{=d zzJ+;&6c!f3I-7x+`I!0nXKt>pt!i=JR)CjWhXx}sFlZO4Ml;T3QmJfns}Z>PygMG2 z0=>?5{a#v7DjQY}CV^3RtfaxEnfQ?-Nng7YuSr;B0x6U#LQf2N{`pus!>NC1t;{Xt z@srd`DI_;=+7;%}e+@kP;5RH*we0L!2+PX39dq(Md#Egj`O({M(XmX4lRamr^QdV& Y_xmA)zb90G?cA30ZZ40DJBUX3A2W12zW@LL literal 0 HcmV?d00001 diff --git a/Docs/default/6210/picture/picture10.nlm b/Docs/default/6210/picture/picture10.nlm new file mode 100644 index 0000000000000000000000000000000000000000..7dca99b874e3e78977932ed0b9d9b2711e11abee GIT binary patch literal 262 zcmebC@l{}CX7G?u_nmDhQIMA^Me2(2bc27LfL!1r{=VPMS@I|W|<}f)yVKSHolsF z{?oEQ<&{T;>eOuJ14aIE)rg49<1N2_u*$LU@dNfB%#EQ8JD(q5|G~hZ#1Q$sf%yX? z0|SH2c?M>n0SpW>_ZS!-fEavt7#I$K7$B8kAtr$Yi(?WD3_vY2j+|iUXE-3K&dwyj z@Zs}@LXJDvc)Zlbr2m)Ex0K}{y1{eSU9Vt_Z literal 0 HcmV?d00001 diff --git a/Docs/default/6210/picture/picture4.nlm b/Docs/default/6210/picture/picture4.nlm new file mode 100644 index 0000000000000000000000000000000000000000..546dcd6f148f96d32e78fd59d99186b02e93f772 GIT binary patch literal 262 zcmebC@l{}CX7G?<{Er0w0oi}*|NjS~`~TnB|AtD*L+Sq*jDPm^5V=3qKzcufje|T> z4>I-R@&8+ajQ{_?T>f7PW_-K-@2?$D;K#GufB(n&|NsBX@8<9S(d+;J{~b5?`~U0j zfeb&}_y5m>82Yw%OaFiW|Nrwk%e|$4ftG$>GI{_1|9^oZTdxB}>i+-#X$oT0GcYig Jhy$hY0RX4$+_wM# literal 0 HcmV?d00001 diff --git a/Docs/default/6210/picture/picture5.nlm b/Docs/default/6210/picture/picture5.nlm new file mode 100644 index 0000000000000000000000000000000000000000..d525fec840460b72daf045eed50aab2987b54853 GIT binary patch literal 262 zcmZY3F-k*05XSNMu&|I|8apAmg`H@ZLOp;MDFq8ln-m+#0k*Rcf(H;yB`HKUsd5Ct zsJoI%M3+~XMK_zj^FlhO`F=A~%pC0P*YlOEv6=I~=GV(vKrMAx<}r-1^y8g0CnkL- z3!mEiXWvqo)#i+N0ina=czfNDD!rucHz>?2&6}qlqi|+_Yh9GKsMEEVBQ##kDy=zs zn&@9$21Z!(^&SjGgj=&ErwT|Pk~lf{;1>u{z9Bk7xu9@N7I3ap;s?P{mV;W`wRhhp RdQcVQ=fe_pL6+@Q{{SOW%tZhI literal 0 HcmV?d00001 diff --git a/Docs/default/6210/picture/picture6.nlm b/Docs/default/6210/picture/picture6.nlm new file mode 100644 index 0000000000000000000000000000000000000000..27588ddcb0b57e612cc05c2c19b00db1f68be526 GIT binary patch literal 262 zcmXAjAxi{N6otR%bDZ%ZI>-dWqE8SRHMp$74Tez+gQ!fIrr9F0#U}W`W*P+h+GJSF zA{&f0qs1`EB8Wd=#A9>BSSZPur~G$8$jd76i3Hl8%IuMp-RnqC`p`CZ7Hci7D@ g->&9<_3W;A3KVTyYA0yFjR9h;2f=}=P7&E&H zw|MX5-rSj4%;p^zGEE$R%6?prsQjiUKAEYnKN|Q6nyR8PEnmWcUTokax+N&b7S%+a z;2vn9A@Ye0RuJ9@AcbXWpw1w*g?(6;u!i#;GOn=cz{u?&FG3M{gg literal 0 HcmV?d00001 diff --git a/Docs/default/6210/picture/picture8.nlm b/Docs/default/6210/picture/picture8.nlm new file mode 100644 index 0000000000000000000000000000000000000000..3db6fcaf48d0a00fc2c503fe9cd252adc7a12d60 GIT binary patch literal 262 zcmX}kF-ikL7{&4T?GQE~WGxge!X{XyQ*4Y?8Vd`R#S2Iv2gm_}JCGF7%79?ELhulF zJDqKgkencvD=zc=#v-r!@h{%p&23inKCl>^w+!DL7WwiZ=1R-s@;KpIae0Cczkzvig#mw9&4(Yz zw>2~S!Udcvtl|&S$78Ah literal 0 HcmV?d00001 diff --git a/Docs/default/6210/picture/picture9.nlm b/Docs/default/6210/picture/picture9.nlm new file mode 100644 index 0000000000000000000000000000000000000000..0081da63d940aba8c90a0283380f403c51239cda GIT binary patch literal 262 zcmX|(y$!-J5QWc1Zc;##bVyi;BJu>3CZeDKY{toWkY^d Ull3bP6>1g#Ok6i|PXO2F2PK0%CjbBd literal 0 HcmV?d00001 diff --git a/Docs/default/6210/startup.bmp b/Docs/default/6210/startup.bmp new file mode 100644 index 0000000000000000000000000000000000000000..0365bd6625e5f05c7e0d27063a81b92086484c65 GIT binary patch literal 782 zcmbu7OK1~O6ozjSr190n;vx&ln3`a9r4*%tHn9&30VxzGVqLUd*o9?CHzh9AJA`7W z3WcI8H{H1Clncp+x0~hZ6hyTuZ&OLJ&4yWgO ztAknUrn7@QLcUD4(PQePow09JW17(N*xHzNhyPKsIKjHO-OaZ-k}D(3bHCLSECNY+ z)bLDnpI|m(MjSG{%mF-d5<3i`r3IMsSa~7g0^}~MURV)`?^%6>Vvx9M^%to9-_p&X z{wGuTg>}SK@NB(=QW;v)s5i^tX^sLaPzz?cfikiZz+;H3r7UGK`}O*RX7f#jxT2N{ z`X{}zWmf9Llec5biy2}V`+74IH#C#6msfLJn)M4nN{ee!%F1I`Ql(U0wSsbPO_j#A zm>F!wrCd6-oJSRSqNEqsqo>EQ<0y7sT)*`~I(7kjuMbF)l1k<51K5me(bdI;J0fex zs-h@MqByj`j%GJRQbbYanUC+h6z@iqr9hM&8mJ&Wx z$sqVfzZ(MdMw=_UTMdW#dtkf&8Xtv!Zh+=h>|n%+gXigkw^z?~t{~iZMBtE}(}!#D z&-TvD0ExaNK#OMk3RKM%nDRN2m%(UbO+92T M*#bJezu}+n9}S1W3IG5A literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/readme b/Docs/default/sounds/readme new file mode 100644 index 0000000..dd59e7a --- /dev/null +++ b/Docs/default/sounds/readme @@ -0,0 +1,45 @@ +In subdirs there are original ringtones and SMS tones +from various Nokia phones. They're saved in special +binary format used in phone's firmware. You can download them to your phone, +if it has downloadable ringtone(s) - use +"gnokii --setbinringtone file [location]". I tested Nokia 6150 5.22 and it was +OK. I hope, that Nokia will not change this format and you will be able to +use it with new phones too (update: 3310 seems to have different format). + +I also noticed, that with Nokia 6150 some ringtones required small changes +(inserting space (0x20 char) after name displayed in phone's menu). +Maximal length of names for this phone is 12 chars (that's why "Moon & clouds" +is only "Moon & cloud", "Mexican Hat Dance" -> "Mexican Dance", +"Piano concerto" -> "Piano concer", "WalzeBrillant" -> "WalzeBrilla") + +I wasn't also to restore Badinerie, Tchaikovsky, +Entertainer, Valkyrie, Four seasons, Auld lang syne, Bumblebee, +Brave Scotland, Liszt, Hungarian, Left Hand +(I had it in the file - it was no problem to save +it), because it was too long (ringtones in phone's firmware in flash +can be infinitely long, downloadable not - frame can be 317 chars long +only)... I had to short name in "Swan Lake" to "Swan" because of it... + +In Get_Cool,Sunny_Walks,Tick tick ringtones there is and error - small +"pyk" on the end. It's not my fault, it was made by Nokia... + +Similiary Hopping-down seems to cut (next Nokia fault ?)... + +PS. I didn't compared many of these ringtones with original phones. +If there are differences, please let me know (my files could be broken too) + +PS2. I tried to understand this format, but I didn't make it at all (too small +free time, etc.). Here are some observations: + +Format is used by 0x40/0x9e and 0x40/0xa0 frames. General format is: + +0x00,0x01,0xa0(0x9e),location,0x00,0xc1,0x01,?,name,0x00,0x00,0x02, +commands and tones?each probably in two bytes?,0x0b + +where: location=0x00,0x01,etc. + name=name in ASCII displayed in menu + +If phone doesn't find 0xc1,0x01,? bytes in 7,8,9 byte, don't display ringtone +name and treat them (if there are next) as ringtone contenst + +Marcin-Wiacek@Topnet.PL \ No newline at end of file diff --git a/Docs/default/sounds/ring2.txt b/Docs/default/sounds/ring2.txt new file mode 100644 index 0000000..e91f6a6 --- /dev/null +++ b/Docs/default/sounds/ring2.txt @@ -0,0 +1,799 @@ +http://www.gsmcity.de/cgi-bin/ultimatebb.cgi?ubb=get_topic&f=1&t=001084&counterhit=yes +03.09.2001 19:00 + + can i change the original ringtones on 5110? i've heard that + with datasuite u can change the ringtones. pls let me know + regards + -------------------- + ---I'M UNIQUE AND SO IS MY PHONE--- + -- sms,logos,soft,ringtones and many more free -- + + + Posts: 247 | From: Bucharest,Romania | Registered: May 2001 | + IP: + + azywerks + Newbie + + posted 09 June 2001 18:58 + + No. + You can add/change 1 ringtone (Received tone) for a 61XX phone + using Datasuite though. + + aCe + + + IP: + + mrENigma + Moderator + + Member # 4409 + Member Rated: + posted 09 June 2001 19:01 + + + TOO BAD!!!! + IS ANY WAY TO DO THIS? ON ANY NOKIA HANDY??? + -------------------- + ---I'M UNIQUE AND SO IS MY PHONE--- + -- sms,logos,soft,ringtones and many more free -- + + + Posts: 247 | From: Bucharest,Romania | Registered: May 2001 | + IP: + + azywerks + Newbie + + posted 09 June 2001 19:48 + + Except for the downloaded ringtones which is available to most + nokia phones(GSM) except 5110, no. + Maybe if you can understand the two byte(i guess, or was it + four) sequence for the tones notation in the PPM section and + have it manually changed to a tone of your desire then your + probably half way there. + The other half would then be spent on how to get your phone to + accept the new PPM package you've just made without causing + any problems like Contact Service, sim locks, and Network + Access. Heck, I can't even change just the simple "Insert" + from "Insert SIM Card" to tresnI without causing my phone to + display Contact Service. Must have some security data + elsewhere. + + Anyway, we'll keep on trying. + + aCe + + + IP: + + zizo + Freak Poster + + Member # 2631 + Member Rated: + posted 10 June 2001 00:32 + + Hi mrENigma! + U can not change a ringtone on your phone, U have only I think + 2 byte free memory there u can recive one ringtone on it. + Good luck! + -------------------- + /Z + + + Posts: 102 | From: Sweden | Registered: Nov 2000 | IP: + + mrENigma + Moderator + + Member # 4409 + Member Rated: + posted 10 June 2001 20:44 + + even if i erase some of them? 10 originals for one of mine + it's kind a stupid can't do this.... + -------------------- + ---I'M UNIQUE AND SO IS MY PHONE--- + -- sms,logos,soft,ringtones and many more free -- + + + Posts: 247 | From: Bucharest,Romania | Registered: May 2001 | + IP: + + Ice Dragon + Freak Poster + + Member # 3365 + Member Rated: + posted 14 June 2001 03:23 + + + quote: + + Originally posted by mrENigma: + even if i erase some of them? 10 originals for one of mine + it's kind a stupid can't do this.... + + + Well, I have a post of this a while (months) ago. + It's not possible to ADD TONES to the Nokia 5110 but it is + possible to CHANGE TONES on the Nokia 5110. + Well, changing RING TONES is a bit hard but changing ALERT + TONES is relatively easier to do. + Of course us all Nokia users can add ring tones to phone like + the 61xx, 6210, 3210, 33xx, etc. but I bet most of our alert + tones are all the same. + The beep, the standard (which is a dit-dit tone), the special + (which is a dit-dit-dit-dat-dat-dit-dit-dit, which is actually + a Morse code for "SMS"), and the ascending (which is actualy a + Morse code for "connecting people") are the same to all Nokia + phones unless there is one I don't know about. + Anyway, have any of you once experienced when on a crowd when + a SMS message came and most people around you have Nokia + phones (riding a bus for example or on a bar). + Some of us would check their phone if it was for them, like I + did. + So I changed my standard tone which is a dit-dit to dit-dat to + sound differently. And my special tone from + dit-dit-dit-dat-dat-dit-dit-dit to + dat-dit-dit-dit-dat-dit-dit-dit (which sounds like "Who let + the dogs out" with dit-dit-dit at the end). So when I myself + received a message, I know that it's for me coz I only have to + take note of the tone. + Too bad, Viper stopped his research with the NFREE project. I + have been inquiring about the checksums but he's no longer + responding. So I guess I have to do this on my own. + I'm coming up with a software to change the ringtone on the + 5110, just like I came up with the soft for changing the alert + tone on my 5110. Imagine, we have 30 changeable ringtones on + our Nokia, not just the 5110 but also with the 3210, 33xx, + 51xx, 61xx, 62xx, 7110, 82xx, 88xx, etc. + The info about this is not for free of course. Anyone + experimenting with his Nokia can come with a way to change the + fixed ringtones and alert tones on his phone. + BTW, the ringtones can be found on the PPM part of the phone. + Regards... + [ 15 June 2001 06:43: Message edited 1 time, lastly by Ice + Dragon ] + -------------------- + "Keyboard not found. Press F1 to continue." + ICQ#:97427188 + ------------------- + Send me private messages if any, no kinky stuff though. :-) + + + Posts: 171 | From: Bacolod, Philippines | Registered: Feb 2001 + | IP: + + azywerks + Newbie + + posted 14 June 2001 18:05 + + Yo Ice! Could you share with me the search values for the SMS + tones. Pleazzee. + BTW, have you tried changing the words in our PPM package (i.e + "Insert" in Insert SIM card to something else). I've tried + even simply reversing Insert to tresnI so as not to get any + checksum problems but still I get the CS. + Maybe their using a different method of calculation (CRC + perhaps) or they have a compare module elsewhere? + Just wondering, + aCe + + + IP: + + Leeloo + Major Poster + + Member # 2809 + Rate Member posted 16 June 2001 13:31 + + If the ringtones are saved in the ppm pack, and you get cs + when trying to change places of some letters in ppm.....what + happens in the phon when you download a new ringtone ? + does it recalculate the cs for ppm itself ? + I thought these ringtones where saved in a area without any cs + check. + /Leeloo + + + Posts: 46 | From: Sweden | Registered: Dec 2000 | IP: + + azywerks + Newbie + + posted 17 June 2001 20:27 + + The downloaded tones aren't stored in your PPM, they are + stored in your EEPROM. It is in the EEPROM where checksum + recalculation takes place. + The tones that are in the PPM are the static tones (i.e Ring + Ring, Mosquito). + The SMS alert tones on the other hand (according to ICE + DRAGON) are located at the MCU portion of your flash. + Hope this clears up the confusion. + Regards, + aCe + + + IP: + + Ice Dragon + Freak Poster + + Member # 3365 + Member Rated: + posted 03 July 2001 04:11 + + + quote: + + Originally posted by aZyWeRks: + Yo Ice! Could you share with me the search values for the + SMS tones. Pleazzee. + BTW, have you tried changing the words in our PPM package + (i.e "Insert" in Insert SIM card to something else). I've + tried even simply reversing Insert to tresnI so as not to + get any checksum problems but still I get the CS. + Maybe their using a different method of calculation (CRC + perhaps) or they have a compare module elsewhere? + Just wondering, + aCe + + + + Yo aCe! Here's the hex values particularly for the Special and + Ascending alerts tones. + Using flash from a 5110v5.30C: + For Special (morse code for "SMS"): + 5A0C,400C,5A0C,400C,0AFE,5A0C, + 4025,0A01,5A25,400C,5A25,4025, + 0AFE,5A0C,400C,5A0C,400C,5A0C + So it sounds like: + dit-dit-dit dat-dat dit-dit-dit + "5A0C" is a "dit" with a duration of 0C + "5A25" is a "dat" with a duration of 25 + "400C" is a pause with a duration of 0C + "4025" is a pause with a duration of 25 + "0AFE" is.... I don't know what this means, let me know + For Ascending (morse code for "connecting people"): + 5A25,400C,5A0C,0AFE,400C,5A25,400C,5A0C,4025,0A01, + 5A25,400C,5A25,0AFE,400C,5A25,4025, + 5A25,400C,5A0C,4025, + 5A25,400C,5A0C,4025, + 5A0C,4025, + 5A25,400C,5A0C,400C,5A25,400C,5A0C,4025, + 5A25,4025, + 5A0C,400C,5A0C,4025, + 5A25,400C,5A0C,4025, + 5A25,400C,5A25,400C,5A0C,4064 + 5A0C,400C,5A25,400C,5A25,400C,5A0C,4025 + 5A0C,4025 + 5A25,400C,5A25,400C,5A25,4025 + 5A0C,400C,5A25,400C,5A25,400C,5A0C,4025 + 5A0C,400C,5A25,400C,5A0C,400C,5A0C,4025 + 5A0C,4025 + So it sounds like: + dat-dit-dat-dit dat-dat-dat dat-dit dat-dit dit + dat-dit-dat-dit dat dit-dit dat-dit dat-dat-dit + dit-dat-dat-dit dit dat-dat-dat dit-dat-dat-dit + dit-dat-dit-dit dit + Again: + "5A0C" is a "dit" with a duration of 0C + "5A25" is a "dat" with a duration of 25 + "400C" is a pause with a duration of 0C + "4025" is a pause with a duration of 25 + "4064" is a pause with a duration of 64 (long pause) + "0A01" and "0AFE" are.... I don't know what these means, let + me know + Correct me if I'm wrong, I think "0A01" and "0AEF" is a system + pause to let the user interrupt the beeping. for sure, it's + not a checksum. + On other phone models: + Read a full flash from any model of Nokia phone (from 3210, + 33xx, 51xx, 61xx, 62xx, 7110, 82xx, 88xx) and use these search + strings on a hex editor (I use HexWorks): + For alert tones: 8005020A01 + Following hex values after these hex are actual alert tones + For ringtones: 0905020A01 or 0A05020A01 + Hex values following after these hex are not necessarily ring + tones but you can see the names of the ring tones and + following them are their ringtone values. Just see for + yourself what I mean. + Can I ask one-thing? If any of you find these info + interesting, please rate me + Thanks and best regards... + P.S. Oh, about changing the "Insert" to "tresnI" in PPM won't + work. + You see, checksum calculation in PPM is not done by + byte-addition (byte added to another byte) but by + word-addition (two bytes added to the next two bytes). + Let's take "Insert" as an example: + Letter - Hex value - Decimal + I 49 73 + n 6E 110 + s 73 115 + e 65 101 + r 72 114 + t 74 116 + In a byte-to-byte addition, the resulting checksum should be: + hex 275, decimal 629 + And it would be equal to the checksum of "tresnI" + But in a word-to-word addition, checksum is computed in + byte-pairs, therefore taking "In" as one word or hex + equivalent to 496E, decimal 18798 + So if we are to add them in words: + Letters - Hex values - Decimal + In 496E 18798 + se 7365 29541 + rt 7274 29300 + The checksum should be: hex 2F47 or decimal 12103. + Now with "tresnI", the first two letter pair would be "tr" + with a hex equivalent to 7472, decimal 29810. + So if we are to add them in words: + Letters - Hex values - Decimal + tr 7472 29810 + es 6573 25971 + nI 6E49 28233 + The checksum should be: hex 482E or decimal 18478. + Therefore, changing "Insert" to "tresnI" would yield a + "Contact Service" error. + Again, I only ask one favor. If any of you find these info + interesting, please rate me + Cheers... + [ 03 July 2001 04:43: Message edited 1 time, lastly by Ice + Dragon ] + -------------------- + "Keyboard not found. Press F1 to continue." + ICQ#:97427188 + ------------------- + Send me private messages if any, no kinky stuff though. :-) + + + Posts: 171 | From: Bacolod, Philippines | Registered: Feb 2001 + | IP: + + mrENigma + Moderator + + Member # 4409 + Member Rated: + posted 03 July 2001 08:06 + + i'm confuse a little bit, but i think that i learn something. + and when release software to do this pls let me know 'cause i + want to get ride off those stupid ringtones. + thx again and keep in touch. + -------------------- + ---I'M UNIQUE AND SO IS MY PHONE--- + -- sms,logos,soft,ringtones and many more free -- + + + Posts: 247 | From: Bucharest,Romania | Registered: May 2001 | + IP: + + qtboy + Major Poster + + Member # 3427 + Rate Member posted 03 July 2001 13:03 + + yo ice!!! + da bes ka gid migs bah! + pakopyahon mo na lang ko kung matapos na imo + program. hehehe + + + Posts: 46 | From: davao city, philippines | Registered: Feb + 2001 | IP: + + mrENigma + Moderator + + Member # 4409 + Member Rated: + posted 03 July 2001 13:53 + + yo qtboy......... english pls + -------------------- + ---I'M UNIQUE AND SO IS MY PHONE--- + -- sms,logos,soft,ringtones and many more free -- + + + Posts: 247 | From: Bucharest,Romania | Registered: May 2001 | + IP: + + brittnee + Insane Poster + + Member # 2085 + Rate Member posted 03 July 2001 16:06 + + nice job, i would just like to ask if i should have the same + number of dits and dats as to avoid contact service? + salamat + + Posts: 94 | Registered: Sep 2000 | IP: + + Ice Dragon + Freak Poster + + Member # 3365 + Member Rated: + posted 04 July 2001 04:17 + + + quote: + + Originally posted by brittnee: + nice job, i would just like to ask if i should have the same + number of dits and dats as to avoid contact service? + salamat + + + Not necessarily. + Let's take the Standard alert tone (Morse code for "M") as an + example (using the 5110v5.30C flash): + 5519, 400A, 5519, 400A + So it sounds like "dat-dat" + 5519 - is a "dat" with a duration of 19 + 400A - is a pause with a duration of 0C + We could change it to: + 550C, 400A, 5526, 400A + So it sounds like "dit-dat" + Take note that we subtracted hex 0D from the first 5519 and + added it to the second 5519 to compensate the values so we + wont have a contact service message. + Here's a more interesting one. Change the Standard alert tone + (5519,400A, 5519,400A) to something like this: + 5B19, 4005, 4F19, 400F + So it sounds like high-note-dat, low-note-dat + Or to something like: + 4C0C, 4005, 5E25, 400F + So it sounds like low-note-dit, high-note-dat + Notice that we subtracted duration values from the first pause + and add it to the next pause, and so with the first tone to + the second tone. + Sometimes I get an error when I subtract values from the pause + and add it to the tone. Or vice versa. It won't work. + So the following won't work in changing Special alert (morse + code for "SMS"): + 5A0C,400C,5A0C,400C,0AFE,5A0C,4025, + 0A01,5A25,400C,5A25,4025,0AFE, + 5A0C,400C,5A0C,400C,5A0C + That sounds like: + dit-dit-dit dat-dat dit-dit-dit + "5A0C" is a "dit" with a duration of 0C + "5A25" is a "dat" with a duration of 25 + "400C" is a pause with a duration of 0C + "4025" is a pause with a duration of 25 + "0AFE" is.... I don't know what this means, let me know + Into a variation of "Let's go": + 5A0C,4025,5A0C,4025,0AFE, + 5A0C,400C,0A01,5A0C,400C,5A0C,400C,0AFE,5A0C,4025, + 5A0C,4025,5A0C + That sounds like: + dit-dit dit-dit-dit-dit dit-dit + "5A0C" is a "dit" with a duration of 0C + "400C" is a pause with a duration of 0C + "4025" is a pause with a duration of 25 + "0AFE" is.... I don't know what this means, let me know + It wont work because we subtract values from pause and add it + to the tone. + So that's that. I'm still studying the behaviour for the + default ringtones. + Sure I can change some values without incurring a "Contact + Service" but the tones won't make any sense. + Anyway, I would know who reads this forum in my area when I + start hearing a different alert tone around here. + P.S. If you find some info here to be interesting, I only ask + one thing: please rate me + BR + -------------------- + "Keyboard not found. Press F1 to continue." + ICQ#:97427188 + ------------------- + Send me private messages if any, no kinky stuff though. :-) + + + Posts: 171 | From: Bacolod, Philippines | Registered: Feb 2001 + | IP: + + brittnee + Insane Poster + + Member # 2085 + Rate Member posted 04 July 2001 17:16 + + very nice indeed, i've change the alert tone of my 6210, still + looking for the standard tone, but i found the special tone + which is the one i change, thanks a lot!!!! + + Posts: 94 | Registered: Sep 2000 | IP: + + Ice Dragon + Freak Poster + + Member # 3365 + Member Rated: + posted 05 July 2001 03:50 + + + quote: + + Originally posted by brittnee: + very nice indeed, i've change the alert tone of my 6210, + still looking for the standard tone, but i found the special + tone which is the one i change, thanks a lot!!!! + + + + On a 6210: + As always, before tinkering with your phone flash, make a full + backup of your phone flash if you haven't yet. + Let's assume you don't have a full backup of your phone flash. + 1. Read the flash address 00200000 to 00600000. + 2. Copy the \flasher\flash.out to \nk_files\6210full.fls + 3. Use a hex editor (I suggest Hexworks), open the + \nk_files\6210full.fls and do the following to obtain a full + flash without the EEPROM: + WARNING: If you notice the file contains FF00,FF00 from + beginning to end, DO NOT PROCEED because this is a bad read + flash. + 3.1 Go to address 3FC000 (this is equivalent to flash address + 005FC000) + 3.2 Press Shift-Ctrl-Home. This will highlight the data from + offset 00000000 to 003FC000. Release the keys. + 3.3 Press Ctrl-C. This will copy the highlighted data to the + clipboard or memory. + 3.4 Press Ctrl-N. This will create an empty file. + 3.5 Press Ctrl-V. you will be asked "Are you sure you want to + insert?", select "Ok". + This will copy the previously highlighted data to the new + file. + 3.6 Save the file as "my6210.fls" + 4. Make a copy of the flash that contains the alert tones. + 4.1 Still using the hex editor, open the file "my6210.fls" + 4.2 Go to offset 350000. Press Shift-Ctrl-Home. This will + highlight the data from offset 00000000 to 003FC000. Release + the keys. + 4.3 Press Del. You will be asked "Are you sure you want to + delete?". Press "Ok". This will delete the data from 0 to + 350000. + 4.4 Go to offset 10000. Press Shift-Ctrl-End. This will + highlight the data from offset 10000 to the end of file. + 4.5 Press Del. You will be asked "Are you sure you want to + delete?". Press "Ok". This will leave you a 64k data from 0 to + 10000 (which is equivalent to flash address 00550000 to + 00560000). + 4.6 Save the file as \nk_files\6210al.fls + 5. Copy \nk_files\6210al.fls to \nk_files\alert.fls + 6. Open the \nk_files\alert.fls with a hex editor (I use + Hexworks). + 7. Use the search string "8005020A01". + First stop should be the Special alert tone. + You will notice that there's "SMSS.......S.p.e.c.i.a.l" before + it. + Pressing F3 will take you to the next found string. This is + the Standard alert. You will notice that there's + "SMS.......S.t.a.n.d.a.r.d" before it. + Again pressing F3 will take you to the next found string. This + is the Ascending alert. You will notice that there's + "SMSL.......L.o.n.g. .l.o.u.d" before it. + Don't forget when you flash it back, you should use alert.fls + as source and the address should be 00550000. + Assuming you have flashed it back to the correct address and + it shows a "Contact Service", you may have incorrectly + modified your alert tone. If this happens, proceed to number 5. + If you want to flash it back to its original alert tones, + flash it back with 6210al.fls at address 00550000. + But if it still has a Contact Service, flash it back with a + my6210.fls starting from address 00200000. This should restore + your original flash without the EEPROM part. + This procedure is a little bit for advanced flasher users. If + you don't know what you're doing, don't try it out. You have + yourself to blame if something pukes up. + Hmmm... I guess few people are interested in what I'm posting + here. Out of more than 100 readers since my first posting in + this thread, only 2 person rated me. + Oh well, all I'm asking is: rate me please + ----------------- + Misqouted qoutes: + "Don't judge the book without its cover" + "Birds flock together on the same feather" + "Don't cross the bridge when you get there" + "There's no water under the bridge" + -------------------- + "Keyboard not found. Press F1 to continue." + ICQ#:97427188 + ------------------- + Send me private messages if any, no kinky stuff though. :-) + + + Posts: 171 | From: Bacolod, Philippines | Registered: Feb 2001 + | IP: + + nuggie + Junior Member + + Member # 3304 + Member Rated: + posted 05 July 2001 13:34 + + I've tryed to do this like that : + 1.make a full backup 002 to 006 (6210) + 2.edit with hexworkshop and change the SMS alert + 3.try to correct checksums with NK1.2 to avoid Contact Service + 4.put flash back to phone + 5.works fine + Ice Dragon: does point 3 make any sense? + [ 05 July 2001 13:38: Message edited 3 times, lastly by nuggie ] + + + Posts: 27 | From: Westcoast, Poland | Registered: Feb 2001 | + IP: + + Ice Dragon + Freak Poster + + Member # 3365 + Member Rated: + posted 06 July 2001 03:07 + + + quote: + + Originally posted by nuggie: + I've tryed to do this like that : + 1.make a full backup 002 to 006 (6210) + 2.edit with hexworkshop and change the SMS alert + 3.try to correct checksums with NK1.2 to avoid Contact + Service + 4.put flash back to phone + 5.works fine + Ice Dragon: does point 3 make any sense? + + + + Not only "sense" (cents), but also dollars... heh..heh...heh... + I did that already but it always take a long wait to write the + whole modified flash back to the phone. + With a 5110v530C flash, I also tried cutting the first part of + the modified flash (flash address 00200000-00210000), write it + back to the phone, then cut the last part of the modified + flash (002F0000-00300000) back to the phone so it would take a + much lesser time. + The one I posted earlier is also to let our members reader + learn a little bit about the alert and ring tones in the + flash, and the possibility of changing them. Although I + believe that our members here know more than I do. + Cheers to you... and best regards to all + [ 06 July 2001 03:10: Message edited 1 time, lastly by Ice + Dragon ] + -------------------- + "Keyboard not found. Press F1 to continue." + ICQ#:97427188 + ------------------- + Send me private messages if any, no kinky stuff though. :-) + + + Posts: 171 | From: Bacolod, Philippines | Registered: Feb 2001 + | IP: + + aZyWeRks + Freak Poster + + Member # 3170 + Member Rated: + posted 06 July 2001 15:56 + + Man, thanks a lot for the values. I'll try it. + And about the word addition information. I'll try to make a + workaround on this if I have enough time. I've been off the + internet for a time. + Thanks a lot man. You're great. + + Regards, + aCe + -------------------- + http://getit.at/azywerks + + + Posts: 131 | From: I.C., R.P. | Registered: Jan 2001 | IP: + + koloksky + Freak Poster + + Member # 718 posted 07 July 2001 00:26 + + hi, + That is really cool!! thanks IceDragon! + u deserve a + regards + + + Posts: 156 | Registered: Nov 1999 | IP: + + nuggie + Junior Member + + Member # 3304 + Member Rated: + posted 14 July 2001 20:23 + + Ice Dragon: + Look here at the ringtone info. + web page + [ 14 July 2001 20:26: Message edited 2 times, lastly by nuggie + ] + + + Posts: 27 | From: Westcoast, Poland | Registered: Feb 2001 | + IP: + + Rayborg + Newbie + + Member # 5357 + Rate Member posted 19 July 2001 14:37 + + How does it works with a Nokia 3310? + I think there are other HexValues, but I´m not able to find + them! Please help me! + + Posts: 8 | From: Germany | Registered: Jul 2001 | IP: + + Ice Dragon + Freak Poster + + Member # 3365 + Member Rated: + posted 23 July 2001 03:32 + + + quote: + + Originally posted by Rayborg: + How does it works with a Nokia 3310? + I think there are other HexValues, but I´m not able to find + them! Please help me! + + + Still use the search string: "8005020A01". + First stop should be the Special alert tone. + You will notice that previously the tones have 5A0C, 400C, + 5A25, 400C values. With the 3310, it uses the 5B0C, 400C, + 5A25, 400c values. + "5B0C" is a "dit" with a duration of 0C + "5B25" is a "dat" with a duration of 25 + "400C" is a pause with a duration of 0C + "4025" is a pause with a duration of 25 + Pressing F3 will take you to the next found string. This is + the Standard alert. It uses the 5619, 400A, 5618, 400A values. + "5619" is a "dit" with a duration of 19 + "400A" is a pause with a duration of 0A + Again pressing F3 will take you to the next found string. This + is the Ascending alert. It uses the 5B0C, 400C, 5B25, 400C + values. + "5B0C" is a "dit" with a duration of 0C + "5B25" is a "dat" with a duration of 25 + "400C" is a pause with a duration of 0C + "4025" is a pause with a duration of 25 + The alert tones on the 3310 reside in the MCU part of the full + flash. + Best regards and cheers... + [ 23 July 2001 03:45: Message edited 1 time, lastly by Ice + Dragon ] + -------------------- + "Keyboard not found. Press F1 to continue." + ICQ#:97427188 + ------------------- + Send me private messages if any, no kinky stuff though. :-) + + diff --git a/Docs/default/sounds/ringtones/9th_Symphony b/Docs/default/sounds/ringtones/9th_Symphony new file mode 100644 index 0000000000000000000000000000000000000000..5c15561d7c037e91ff888fda30bf5baf6486b13d GIT binary patch literal 188 zcmZQz;9=CUEXhy^uFNgS$j_@}U|{;g$;H?s-T;JL|60Y{#XH2g7(rwgklz91w*vXS z;yoz*7NBT5SUre^Tb_%n6{xcZr~;%PX!1XhdCfq66OaVz{MU>_9-^)ZsDg`&i_am2 Gof`n)l{H-e literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Attraction b/Docs/default/sounds/ringtones/Attraction new file mode 100644 index 0000000000000000000000000000000000000000..87acb08a408bcd4a2fbaf5b0b91b65d899081dc9 GIT binary patch literal 189 zcmZQz;9=BpEGa2UOfJdH&tqU<`oqb^IE&vwj_V&Qv%^F-FmERREPk$k4&FeK3N|h- v2Y!$!cPIBuAO_KMxZ$!unK?j_d0caY)Ya*!d` lJZ$Pv+{W!-(*t$~72L+{P{YOO0P-U{(2a9oY=;H$3M?!QN^GV1DNY0r1R5!lR1B0jGfHme_OBRzq6cM~X{u-( z#a>CXhHnlpx^2{1tcr1zKzHrI6z*9Np+3EDs%b;Tk3;?6wC#-$B)uk@F&<&QpuYsL GU9Ml6VoZJj literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Badinerie b/Docs/default/sounds/ringtones/Badinerie new file mode 100644 index 0000000000000000000000000000000000000000..75f6dd6068824db4acd1f592c2ba47ac28d0d555 GIT binary patch literal 785 zcmX9+!H&}~5Um?pCvFO`SJ7N*ZuE@``K*%uQDoGa%W4jD~6w}xnNhpl4T34+K)!j z^L+#FdbXWy^Lm7hKy=6nZ*lLFp_gZykV&ux6+=TCsngz)3BZRJ=0e6?edHvMUM1B= z#btQkfdMxs;c`POFmb01`?Kd2nW17}jXJ@0=rDp2+X3E?IiIknHK_sFV~zuB8K|+Q zIa~O`3Db#3YRXo62~W{LqPaIt6Of|GWUsZx?NA7EoDYsmTJQ&Y!@v;kubEw*G^?Qw zjxZ~!1J?dCxub8l!0PCq&~@}ZZ11CovZ{B~B-@LU*>+BL3eYmbmjxCV z(OojYK;oDY%HjkZ?gH+z*5GE4E0L5Vcqe$GTyMvb literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Barn_dance b/Docs/default/sounds/ringtones/Barn_dance new file mode 100644 index 0000000000000000000000000000000000000000..5b5f46bc0d5564dfdbfe495e31d126cfbd9b455e GIT binary patch literal 171 zcmZQz;9=BpN-WA#NJ-2~PGw+V`oqb^*e~V4+ziC+K->kyT>m>vzN z0i#h=&H$+d66_$n0Ep)UG05CGK+MHBTNG@DDAzw23uuZc$ke%fvyB|sr;0kL0L=s1 ZGXrEZP@`oqb}#Kl<8kqbExI|$I9f8!p6nrV8qT10CpKJuK)l5 literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Bee b/Docs/default/sounds/ringtones/Bee new file mode 100644 index 0000000000000000000000000000000000000000..1199357ec5ddb3d00869929811311e8c01425e4f GIT binary patch literal 49 ucmZQz;9=BpN=;QzU|?YS!^y?S${NKM&&I~}&tbj8dM+*pBV-{-c5VRJr3owm literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Bossanova b/Docs/default/sounds/ringtones/Bossanova new file mode 100644 index 0000000000000000000000000000000000000000..89eda9feeee2f4acb045cb42c287c87ee475cc8c GIT binary patch literal 212 zcmWkoO$vfQ6n2CxpN?5Zm{8O%M4BsnbQ3R-3!#I!8J;8NL1XB(_!i&qdqI$@=Gpaq z`|959H3-6QY`3hPo;0c1kVojYsGV^kDJ~I{pUhMVPuOtiDpJ;1$=QYohvA6G7Ff9x zHqx)9pG-9pCtv}oMY2o8gq%}k+#t3YwAD!M9dc9DoV;wOP|FSx=eUsi{FkDUupeU- YqYA17g-t kCa!<1%;C(TOl+(I;Y>g(oSBQ!A)M=TGd&kf7>Ob)c$aObAs|fG@U;I2#arv literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Bumblebee b/Docs/default/sounds/ringtones/Bumblebee new file mode 100644 index 0000000000000000000000000000000000000000..ba733a14aeb69dc5d30d661bc2b9582fa2c1ab60 GIT binary patch literal 461 zcmY+9OAf*?3`83?h+z)k3$SCu0gw|F4Dr+Kd@neIq5(RKcfS(VaVLBWYG-ZeG@jeOUP0 P!rc~`oW~|+8OrJcbX71M literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Carioca b/Docs/default/sounds/ringtones/Carioca new file mode 100644 index 0000000000000000000000000000000000000000..30de51d617f92456bc3a26a8dccde9f5a0a3bdf7 GIT binary patch literal 176 zcmZQz;9=BpPAtmIPflcDVEV(!%EZOk!R)}p_0K^D3ria;CIwZY&Bn#W#W;o8fg7lt wpNnxivjY>5#lgimnb|>#>mQIW#l<)Y&IXA>#6WtcFay;B<%!ibg_)fj0D_<>5&!@I literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Charleston b/Docs/default/sounds/ringtones/Charleston new file mode 100644 index 0000000000000000000000000000000000000000..bfbd4a133b0f9845c7b60aea1b8eafef6cf54d13 GIT binary patch literal 156 zcmZQz;9=Bp&PXiENi8nP&tqU<`oqb^IFrYLXEqSSXs&+{)=X6gNiN1|K$+=445PXJ zL0HqkveUu3K=Lzrxc)&@&IGFmnG4g$^^c3o!Ml;CnWvSfji-aBi>I5Xm#3d+BF`kA MDL|8_^RROR02d}F^Z)<= literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Chase b/Docs/default/sounds/ringtones/Chase new file mode 100644 index 0000000000000000000000000000000000000000..39e47eae19daad001c87d8fe0c6c7cca3cc280ed GIT binary patch literal 68 zcmZQz;9=Bp&PXgyWnf_X!^y=sk$V>ROdy^HrMdp0iSTnVIz(~(V`XyaXXD~>P-W)^ E0Ah&|f&c&j literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Cicada b/Docs/default/sounds/ringtones/Cicada new file mode 100644 index 0000000000000000000000000000000000000000..4c3b45778800a1708210c882e092211223751b93 GIT binary patch literal 94 zcmZQz;9=Bp&P+~BNmO89VEV&3o5_I{iuX9240tqdr#ZTaN=c#FQ(zfh?32x0oi8Ow%7XmB=jLw@0ZWsheTy#(u7p wN^ik}4F`k^FP;>7ZU5(Ki9{Ia8MMQS9f2;Y(xjsCm^NAq4})kN0`OIqzt3SG0RR91 literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/City_Slicker b/Docs/default/sounds/ringtones/City_Slicker new file mode 100644 index 0000000000000000000000000000000000000000..3bc8ed863237c0a38bdf0f0529ed35ee6d8ac0d5 GIT binary patch literal 194 zcmXwxy$XV07==B)f_$IhAX#gRTT@r?LZf4s5DijOw6q8fMo1=>`I8x4Xh>!?ox?c~ zkD~N2o_d?@Xtwg^%f(tz)R&O(wF8A(NeQL&q*|~gn;LgixS>ShFoi1HrC{~XW)#zz z9#nPgk3){k*|%h_b8Fq9w2IG$D^ipDvI%gp*p8jnf|H2os7F?8CZhX@4WD=rpiS`5 QhXhY#BPF}v#;$I>0l!=_f&c&j literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/City_bird b/Docs/default/sounds/ringtones/City_bird new file mode 100644 index 0000000000000000000000000000000000000000..9869c95dd8fa0b07b0b0002911ba61afcd9d55cb GIT binary patch literal 43 zcmZQz;9=Bp&Mc`^NXjfqQD9(T`oqb^IE&wbot1eO{|sF=u73{exwstGvvUIg)8`64 literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Cladoceran b/Docs/default/sounds/ringtones/Cladoceran new file mode 100644 index 0000000000000000000000000000000000000000..e767324d2337e696c4d69887a59eac9f1be62b79 GIT binary patch literal 108 zcmZQz;9=Bp&PhzkPfjgL%wu3+`oqb^$jUU0*@1C75YGVOnLs=Xh-U-w93Y+x#B5yu R95y>_=HhZNCQ>;&Hvl1R7sLPn literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Classical b/Docs/default/sounds/ringtones/Classical new file mode 100644 index 0000000000000000000000000000000000000000..8c399a6dfa712b1251220707886c6f886ec9645c GIT binary patch literal 269 zcmXYr!3o1K3`MP6Lezj)=l~tU&`Cm1h1@bkLnscWC3M(gqNn5_o{;>$96~R*`#4O~ z^D&Iq5So9d@`*``6UYY()g8A+AHF*!kRVLEC%rb9Y-OE?}%1Az4oY8qNP zdInyMyqWkgv#_$sE{8qcUR4%nHx_BW_h#n( zD7DAwl4t4tc1@32mMax~cY+SDjn$q7N>r$+Ce*rN757HNtj9n#pw!GUM{Q*F4AS_0 zd+1Tn2{b*mI9{L=81pv!Kr{OkBPu$9af>H=aiJQ2jeqC_nvuG}!%rYo^P#i)7ymc) VvOh6h|LY*IXK^AnSvs3+%?~V~KWzX2 literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Elise b/Docs/default/sounds/ringtones/Elise new file mode 100644 index 0000000000000000000000000000000000000000..b7061ecade2075fca3753d9b1ddcc37c8a477efb GIT binary patch literal 125 zcmW-ZJq~~{2!)G_5nbOcJOqnJaWHXn?$E)8ruN3B5gZ^N?}rc;TDSAK_7H}5VrqE6 x-FJh6siN4OB^oDWW0holyW5K}yWWhw;lre;?jZ|Pgr$3i8mIr4y3T@e{s42-BEUq3ogjOuTWmmq z<41!*#8iqhtUz`xJ1ktS6r{JfpTpxOGu2QfRiWUe=Q91u8(wf0)=7NjZFFOnuYvM9@$a0T@#GY1aFAxG?SO5S3 literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Etude b/Docs/default/sounds/ringtones/Etude new file mode 100644 index 0000000000000000000000000000000000000000..fe6775d9ef32fecc004debd74aa6124446667b12 GIT binary patch literal 77 zcmZQz;9=BpEh$Y&Wnf_X!^y=sgMSwPbRg#XHx)=u2C*0?!dPH2uq@*YIR`nee-1WW Oj6nR4i_5`=of`lnKopq( literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Fly b/Docs/default/sounds/ringtones/Fly new file mode 100644 index 0000000000000000000000000000000000000000..3f5987e3ad448559e76257c88834fa839890ac17 GIT binary patch literal 46 zcmZQz;9=Bp%c)dQU|?YS!^y?S%G%E{frHIKkd<{Jh{5%bmB}H6jf=~{h@Be%wV(&t literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Fool about b/Docs/default/sounds/ringtones/Fool about new file mode 100644 index 0000000000000000000000000000000000000000..4278722fc5c1d516075d550936c16b1e677beb73 GIT binary patch literal 414 zcmcIgF%H5o42-QvsDUL*1xtlgvGE8``~zmBF7Sv@T1Dx15#pSb0VGBS>vHzlKF639 z?GIgd-X2fg^4qAXUzbO)_VjHnlkq*@0Gu6^A5%=8qkN`O;`)x7_$*~1oEtUaZqjaDs>B< ZFPRBc}**mf$p2+;HR}%}7Ud>LnZC z_vkza$q_YcN?@;(&79`R$weKrOSVGcsWOt@gtaKEUsz7}@hsb#G>Wr6WtN4ZOxcUN hrIt_DUxy~Ip+|pz>n{c@xm5ggol`v!%jc#i-8 literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Frantic b/Docs/default/sounds/ringtones/Frantic new file mode 100644 index 0000000000000000000000000000000000000000..1047a979b602e3652d37388f9b1f562e45f4fd84 GIT binary patch literal 232 zcmZQz;9=BpD@x2O$xLQoVEV(!#W+pMfq5D?1atj^^Pr;Bp)xRf3Xneuh`AW209Al^ zU<_q*{hJMB%>;_h24Z9yqMwTqXb;rnY1~}@ka$p0m_0BWyM2>@swYZ;^n+Lqa`P;J SF8asHbm8~VI_OLJ9cjHm+SL! zckZxstNd5JZ^A&J6$rOet~z literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Fusion b/Docs/default/sounds/ringtones/Fusion new file mode 100644 index 0000000000000000000000000000000000000000..d8795d1705eb02eb0b0991c5a22b41c05879bf87 GIT binary patch literal 87 zcmZQz;9=BpD=p5<&r@JvVEV&3S;|3pqO5}e7h|6+*FOiwZg~gUiJ}gi6ZyFq`{jWm nd_7W~!d+5ajNQUq|9Yf)h5O{V7~3^Kkn3MN7Z;a<8ap=tx#Jc+ literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Get_cool b/Docs/default/sounds/ringtones/Get_cool new file mode 100644 index 0000000000000000000000000000000000000000..87c9c85dce8d12a471b75e6149c5782df8688dc0 GIT binary patch literal 74 zcmZQz;9=BpPc2bM&d<+bU|{;g$;H?s(4){NFhPOq-(-au0y6|=2}~E5q2Qpv#W+h~ b7Eok5P-d#aWP!;7Qw1goOa{qtv2z0e_SzJb literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Going_up b/Docs/default/sounds/ringtones/Going_up new file mode 100644 index 0000000000000000000000000000000000000000..687f69415eff5d46d4e8b466df693d681bafd02e GIT binary patch literal 84 zcmZQz;9=Bp&(F+DS12uDU|{;g$;H^r-O3HZ?O@!&&GoOHyMwz6jC+7|4>uQMACTqD<@)Ck#l;B3AezfTmz^5`n-vxA literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Grande_valse b/Docs/default/sounds/ringtones/Grande_valse new file mode 100644 index 0000000000000000000000000000000000000000..d882865333c5969ca95e2173ab9efb0881632b6a GIT binary patch literal 72 zcmZQz;9=BpFG|cyNmVFI%qdP~U|{;g$;H^m-^1S`-zLxXubaPiwi|ej_V&Q zTMNH~92=5Cpr8Yz10yRN&HefYp0{?WNqG?bK VQ$QNT9M~uDPm)6z%=M3*8vuM-H532< literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Happy_return b/Docs/default/sounds/ringtones/Happy_return new file mode 100644 index 0000000000000000000000000000000000000000..14ece84082dd73b15f6f89d785e436b834d59b1c GIT binary patch literal 58 zcmZQz;9=D9NGvF*R47UXaE2J literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Helan b/Docs/default/sounds/ringtones/Helan new file mode 100644 index 0000000000000000000000000000000000000000..5bce4d64aa08c65003cbf27bb29bf2f8117586bb GIT binary patch literal 199 zcmZQz;9=D9NX<#iV_;zV!^OziZ!^iJJBsUHKc53*KYuU31Ai}&1;+ebj8Gnbzg#y^ zrdyZm9~YMcKU5E6zZ_USKi5B?I*?9~8XKT4xo){$xi%oL4J_9t2h|UfN5}w8hs)>! fO$FjfKs?EcO#`ZiV30dNtmzQ@YuUL01CldZ literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/HipHop b/Docs/default/sounds/ringtones/HipHop new file mode 100644 index 0000000000000000000000000000000000000000..b0ea0b673650f1e0365c0043b0764b063496b474 GIT binary patch literal 101 zcmXBJF$#b%429uT2x8)%)k!jVh>pFAlRZo+gwUHxu__P#;d=mUIMSKZl{bLtUYbOq o(1d#A#;%U06b$PtQpam*=))Y#XGJ0x{?(B})pyiKnJDfvKU|<2u>b%7 literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Hopping_down b/Docs/default/sounds/ringtones/Hopping_down new file mode 100644 index 0000000000000000000000000000000000000000..f6d4bed5c4ad2566abae4e54dab64b861c41107a GIT binary patch literal 140 zcmZQz;9=D9$S)|!%u82D$uG}iU|{;g$;CK@a{^~Cr-KaFKM<=M!~%--LsqYGY+-Ho5989AkNMW0PN|0bpQYW literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Hunt b/Docs/default/sounds/ringtones/Hunt new file mode 100644 index 0000000000000000000000000000000000000000..4f87ea0ec5ba62345f5b6c451175f1eb3985fbc4 GIT binary patch literal 51 zcmZQz;9=D9D9tNjU|{;g$;!mV*vj9@55ipkdVnMdvvDyx*l_)Gn9arIV8hN003<65 A$^ZZW literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Hurdy-gurdy b/Docs/default/sounds/ringtones/Hurdy-gurdy new file mode 100644 index 0000000000000000000000000000000000000000..329175ae10f420ca1d35659f4ddd54674a4159bc GIT binary patch literal 260 zcmZQz;9=D9C@o5<)J+GG3=B+vIBWPF_*t2n+3VRI_&eBJfFzi$$A%%q&c!&3eYQM8 zoa^6ou;OX_Q;)$-E+PVD5CO|D?p9eI10o05s>=W2ws%Nv$ kVxNg&_AH>;5L2c=&BpDH8a*yX2Vbs#4mDg{4tng|0R7ZMod5s; literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Hurry_up b/Docs/default/sounds/ringtones/Hurry_up new file mode 100644 index 0000000000000000000000000000000000000000..fa89fcd1609938bbdacaf482ba6bf61581396f8e GIT binary patch literal 53 zcmZQz;9=D9C@m_gR46TAU|{;g$;CLErsd) E0bfN7@Bjb+ literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Improvisation b/Docs/default/sounds/ringtones/Improvisation new file mode 100644 index 0000000000000000000000000000000000000000..8ed2373b7067f89a6872b878e03a7022a4fbc0fa GIT binary patch literal 83 zcmZQz;9=D9%q=L&FUu@WEXmBzV_;zV!^y?iFVrj4D%1|d9YEYA#PzQSNHzi4O+e8m ZpePq(7m#cK@*05rW}pf#E{AFC+yLeq7l!}< literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Indifference b/Docs/default/sounds/ringtones/Indifference new file mode 100644 index 0000000000000000000000000000000000000000..a2ba420c2df618ebe1e771c43c29801db0e8e3bf GIT binary patch literal 122 zcmZQz;9=D9%uC5kOG_|Bf! ztU+Q9%v}GVVybOGIWERNp!z7cX@Mh zIp}gRb^~R=Sk-~Oo7;gI#0KjG^1Fb1pbnr&2MCJ+MS!@&8>EjI8;CQ%7icyJcZ19Z N;x>@^Tn?)2+yL!rHVOa$ literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Jitters b/Docs/default/sounds/ringtones/Jitters new file mode 100644 index 0000000000000000000000000000000000000000..5d53494f3cf06651a1311a9194d3a63cbb6ff4e7 GIT binary patch literal 309 zcmY+9!4APd5QaOgRozxN*mrR75Oek(4zBb_B1kx(+7+63Q<26$+mbp=b|>@y|9sHyc;u2Mc@G}V>oEQR2aZcD literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Jumping b/Docs/default/sounds/ringtones/Jumping new file mode 100644 index 0000000000000000000000000000000000000000..3c3035d2abc3ebb97a2a4bccb7143de83b4f963e GIT binary patch literal 89 zcmZQz;9=D9D$Om(%u8orVEV(!#aJicV9*7`T>m-+S_K>g+QDQKkOh(hiPQ-+gGr#s Zza}8B0nFoKbO`7A=kSh;%R!Z$8vxBL71#g( literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Kick b/Docs/default/sounds/ringtones/Kick new file mode 100644 index 0000000000000000000000000000000000000000..67f208f31f47ba1bf973128f45f71f650619ebeb GIT binary patch literal 115 zcmZQz;9=D9&P>i$U|?YS!^y?iB<8?Ai^+i(gt`7TKzK4-jCCmDwPFscT#PVvAU$~0 U>T)qUgme9Kc*n)%pvuk-0K@$nng9R* literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Knick-knack b/Docs/default/sounds/ringtones/Knick-knack new file mode 100644 index 0000000000000000000000000000000000000000..a42ddc19486821148dc1e735d3f0d48b8e89af86 GIT binary patch literal 209 zcmZQz;9=D9&dW^B*3HgKOwMLtVEV(!#aP4Kzzo7%{~UN`GtJ;};F-%bQxZf^0pflj z=3;DM?f|Oj0IP9en!z+1C_0mAuH+mr3!)aJs)pHtr5UIagz=fz%-jQ1(}UMMh$+oL QTl>Kn%gC3=B+vIJp>EnP)LO$g^?%b9l$a<)F&W4FJ8g2}1w? literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Lamb b/Docs/default/sounds/ringtones/Lamb new file mode 100644 index 0000000000000000000000000000000000000000..783af357904ff8b335ed5dac8c16aa515aa433ff GIT binary patch literal 243 zcmZQz;9=D9Nz6@BU|?YS!^y?iC+Wb`!{NZ(#pA%k^{)p+GWG#UR^~b;2PQTo2G>83 zI7kIpEhC79O%+T|lp;{d3sE#pR&N&J6(R CBrW#< literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Languor b/Docs/default/sounds/ringtones/Languor new file mode 100644 index 0000000000000000000000000000000000000000..554d129c48cfd523496b57b9411a8dd447613dc4 GIT binary patch literal 69 zcmZQz;9=D9Nz6+x%`akLVEV(!#Xm*LfoX~q7vnUODe4o{x&A?EFuxzd2g*8lbNzF8 L$HnDf#Lf)>iE|T$ literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Left_hand b/Docs/default/sounds/ringtones/Left_hand new file mode 100644 index 0000000000000000000000000000000000000000..1e4aea1a2b997cf13516949f7d656e189f2b680b GIT binary patch literal 329 zcmZ9HF$=;l6ogZUs;SeP9bDY}5%~e`&Vq`QldB+#SgMZR9^m zXW!g3(_)sLZ9csiB(j}Tzg8-zYHGTHMk~k_SD35;7StW(JO6#6A^Pr4Rp6dBp~3`{ UZh*c7S8xGma015#t~~UM4{oDM%K!iX literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Liszt b/Docs/default/sounds/ringtones/Liszt new file mode 100644 index 0000000000000000000000000000000000000000..c0848a1c75c5fda5b91540e30a28ae05b22e3d10 GIT binary patch literal 738 zcmZva&2F1O5Xa4ecVWP!Ipqm*X`(*EJV0Nh=k`=NRVbEXN1<4%6UBl9ea{N@H*1bP zjAy;`|CpI&wW^Z)&tJZN|F&AWzuTY%k;j~C_z^Tb7V4WIiRKNJhTBFow1tRfyN#x8 zsb1z?p;;@Mw-vXdzAYlo?=~e-0WCtdUQ6?kncuKQFFKjFc|@P+XinUs?onSa zImnD_wkvhbt#8P5;`Z0-I`jLuM-USR}fd7ygvzi`umcbe*`2uIym z8xn5%YNrZ6x*#WSrq11a1vjdlOEMf(jhl_tg^6oKqUB6s>B5c1jFsWTMSJw>CsFx> z?r+{r!;~|3P(NP%Vz&dkWP|=S&ia(=`c&|$?2%0*KSA&=5g{}Ey8j~Zkfil|C&VMs Ne3H4j;S0SBU|?YS!^y?SDpJkTz{1A$kCoY>mW_+cL6w~w0CkN9J^%m! literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Mangrove b/Docs/default/sounds/ringtones/Mangrove new file mode 100644 index 0000000000000000000000000000000000000000..7ff92bf3f02f2e0ab3b750436a4a667c9b3f1c57 GIT binary patch literal 95 zcmZQz;9=D9P0UL#$}dZ0U|{;gIh)ae8H)EfoZw83 zI7kIpEhC79O%+T|lp;{d3sE#pR&N&J6%g C$1Y|7 literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Matilda b/Docs/default/sounds/ringtones/Matilda new file mode 100644 index 0000000000000000000000000000000000000000..64820f7190592366f258aef06fbaf8b7379b56a8 GIT binary patch literal 179 zcmZQz;9=D9O)SaGNl9d2VEV(!#n_?Yz}z7O#XxqeHrKyiAl(ZT1K}PZyGt8YU6(dY z2iLz2?KaU?(Pj-UE(hjD(PmLD##WFiK%F4m3}iP0O$5obiZ+VYi8hEf0>!u(YqT4I cB4FJ>bzJ|zDnUAcxY5Uf8)#m*LpVD(08yeV@Bjb+ literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Menuet b/Docs/default/sounds/ringtones/Menuet new file mode 100644 index 0000000000000000000000000000000000000000..11dc80073e621498898408d87bf010e3bcf24c1e GIT binary patch literal 211 zcmZQz;9=D9P0cG!En#5#!^y?isoW&U^{+*+O|V@M#&ZyCQs!dpRtAdv>lEx3>;=m7 zfz^R!xZ0IFfvVdCTY%ziU{xSC&>Y4_xM@v-ZOSdm4nT8Aw*j~LEy`_R*ER_@3O2cM KaXBcna{~ZF|2n|{ literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Merry_Xmas b/Docs/default/sounds/ringtones/Merry_Xmas new file mode 100644 index 0000000000000000000000000000000000000000..d90d05b52efd88f75ee5dff5f5fdf89411bc56e6 GIT binary patch literal 134 zcmZQz;9=D9O)V;_REWq;EM{O}`oq~J<{-w!*bgN8#U=uApBUG_9v}~fxfmw`c@xDZ zgJrq?^#OSxJrI49fvm}5Q^2xZ|3IdI^mTDNaDy-xV~_4c-9BBQOq4^rLlhU6gDyKa E086|hrT_o{ literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Mexican_Hat_Dance b/Docs/default/sounds/ringtones/Mexican_Hat_Dance new file mode 100644 index 0000000000000000000000000000000000000000..3bb9482aec1d73a4070e92cd48870ce1ab77d2b3 GIT binary patch literal 223 zcmX|(JqiLb5QP&PakP0i5Yk%i0j3nhLo8xpV`bqHl%R?0{@`6D_>xtNNrvxz^Nd;8 z)pmbA?CRrkU7w7Zyk{O_BNQGHlFIM28filo3XN#KG!%EF9^p^3c`I%}bm|85Y#z|! z$&r-v2=5dZT$y;|wOO@QwOzGKm5Z@w8rQ#`X%613 zOhC43zc-Kv6bH(Av!My7_5hW)1C={W11Sb6;riDOGze%INHId7NwrS30jRhcr1%{d JmxCQUHvma{EN%b* literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Mosquito b/Docs/default/sounds/ringtones/Mosquito new file mode 100644 index 0000000000000000000000000000000000000000..deb3678688d9411d3e4edbfc7f5f80847d37beae GIT binary patch literal 39 ucmZQz;9=D9%`Yx2%`C}hU|{;g$;HUZ8pRXK!^ZW`VVc78Kb$dJy=aW*Z`s|w8>WO^kYEO1^WD+~JI#HyV9Hg1vG|5YBG!|`SYaI&;1?c!g zV?hNB#TEeif(kekZGZ>ifFds_3LF_F?EmPAB~K=xj04YbM^3yDQt*=zS$em%H&!=Q X=9P`znl`sS-YE+Tf|EYyoO+=<@dBT^B@*ek}IAbAP2|2kf R6phWeV_q5C)qY!AH5c(jF+TtR literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Persuasion b/Docs/default/sounds/ringtones/Persuasion new file mode 100644 index 0000000000000000000000000000000000000000..f6d5aacb557502373183b0ea26e21b3835a4a33c GIT binary patch literal 118 zcmZQz;9=AWNG&QZO)SpL&tqU<`oqOIiQhq&>z~6?hovC)RQ{R#llZy*adA29aoEGf Z$ja2qKaqbrKO0C8CInH&MwA>oHvq>LATIy_ literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Piano_concerto b/Docs/default/sounds/ringtones/Piano_concerto new file mode 100644 index 0000000000000000000000000000000000000000..826bfa622895e9c93c7b99935d7c4d9cc16745cf GIT binary patch literal 135 zcmZQz;9=AW$V|-3S4hs!OHM6fU|{;g$;H?y-zMK8&-Jg#j*GD^j_V(g&Daj4+vFSN zo8;?(qAg$^7h^qGwo$%bz7|Qe6C^6_z}x~f2WT2tZMS?Ukj={8!q&>h1~Ss2)}fY* J%OQoG8vw3OC%^yz literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Playground b/Docs/default/sounds/ringtones/Playground new file mode 100644 index 0000000000000000000000000000000000000000..55660c40d2319e975bc8070e9a7539d9728bac8a GIT binary patch literal 96 zcmZQz;9=AW$VseBFUl{?OJQJO`oqb^*v9X`55mnr%=NDW$^(nYIoNP9&IF2p@HDXe YY$y*bBFDw(5YF|_;T;#3gAqG70D`6$?EnA( literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Polite b/Docs/default/sounds/ringtones/Polite new file mode 100644 index 0000000000000000000000000000000000000000..a4fa533ef81a035e442488a4b3292765efe2b7a4 GIT binary patch literal 63 zcmZQz;9=AW$j`|vNmXEAVEV(!#W;&&BF8Kau73`DxVV5A$Y*5+iLil$Kmx4nASFO9 GJ2wFJZV)m6 literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Polka b/Docs/default/sounds/ringtones/Polka new file mode 100644 index 0000000000000000000000000000000000000000..1db9c2a1955cee663d6f4565fc9beaa67f5341c0 GIT binary patch literal 271 zcma)0O9}!p3~d}7F$%dscJ4ev7de7E*RB=3i3}|>3@ybQdIBlF>KwpL)8u`f+tcxM zzg;iRt=`-9iYZB!B(qGywY{T6F-#MtaoGc~C_x5!;6C8T6g7a!b<_yWq>alo>jW>Z z$y=X1lXeF3_b!IGc!mG+yhmKT2+Z6ZpaBx#0&HQEOG4jZJHe& zj<@Uma&DUTy;-$PQIbTNWfCs+9VLiinlO#a?tumIGROn>0Y9do9!xHy252U&T&7tk zcyWo&`skRStHRg9$bF#68#s@?`l=EPJR?oqew&`7r^E zuQ*Nq*=64wErVkpo0*cOi|w!i@{s=Bk<;Xg)lhMh0!gu4ysYlE_g*FJy&$2`07qxQ LNmm!Cr0ClTnEXyA literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Progress b/Docs/default/sounds/ringtones/Progress new file mode 100644 index 0000000000000000000000000000000000000000..bb14b8d73071590d1893e805936ce922774b8458 GIT binary patch literal 146 zcmZQz;9=AWD9TSSN-ZvCU|{;g$;DVL&>+wxP%Y33#7zRt0$l%KA~2eZ5he#0`PU9q l4da1ixfnruVIm+CLFORqgQx+is1|T=;QGhK<#2$V8vsvgCz${M literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Reveille b/Docs/default/sounds/ringtones/Reveille new file mode 100644 index 0000000000000000000000000000000000000000..5dc251caa073c5b9da4d6e1aeb82214fd31a4f66 GIT binary patch literal 282 zcmZQz;9=AWN-ayx%*jb*U|{;g*~;a>#l_eKB>T7=Kr|yr1jy#%`iD&vT@1wMV(e3J z-~zG0rV*tNYy*b9Q2k~OT&%1h6>MCL6M;s9m|%l&z93r{69Mssk0fs<5=>Px# literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Right_Hand b/Docs/default/sounds/ringtones/Right_Hand new file mode 100644 index 0000000000000000000000000000000000000000..8bfcd75872a91b8f19796a9a8e892d4b08e8d149 GIT binary patch literal 150 zcmZQz;9=AW%1qBFQSeC2OJQJO`oq~TZ>z@N-50KT+%*EIc M%k>XvZY?`E0M!g7Q~&?~ literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Ring_ring b/Docs/default/sounds/ringtones/Ring_ring new file mode 100644 index 0000000000000000000000000000000000000000..f6384ad2bd7262e19f5d50351a9b54d112bd9978 GIT binary patch literal 56 zcmZQz;9=AW%FIhwC;|}-3=B+vIJp>ESsU3q+1a@MIY=ULSeYDZ*|@kIRN1)!MI{R5 literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Robo_N1X b/Docs/default/sounds/ringtones/Robo_N1X new file mode 100644 index 0000000000000000000000000000000000000000..c3fbec7518ac003b499fb52398a5fd35b1c3ac5d GIT binary patch literal 70 zcmZQz;9=AW%1_Ey@H32HU|{;g$;HUZ(#bTFiOoS|nn;7lOp$64u73_1T#W5Nc7w=)-wu0 literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Salsa b/Docs/default/sounds/ringtones/Salsa new file mode 100644 index 0000000000000000000000000000000000000000..0ff501563f62362941e85ff9613b8af64361baa6 GIT binary patch literal 215 zcmW+wNeaS15X?-BNqVw_n1dLNf*{`X0rdx8kh?b@A;>U8$af`J2Nt4^j?ROq|(-424+a05qDN8vtHpI;sEw literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Scifi b/Docs/default/sounds/ringtones/Scifi new file mode 100644 index 0000000000000000000000000000000000000000..473e160b8e9c8dd1ecf3149538e4f63f9b397570 GIT binary patch literal 92 zcmZQz;9=AWPR>lrWME+W!^y=sMYURz>)&L_8o^0|wY(E~>v*^rCvewu^>Z|E^szUx w_p&#!asBIIYi8?aYhmqTZDs9bZDVB>=wNPVX5(UX2-wIhBb~J5tz`BicU}$T=1+64 zWdu!6cAA=Xk_r9^mx9ncqOYg}7lBJkR4v<8 q%9d)G2Y5wK^T0bKs2qY~4>R^2OmK1E-vXB*DLT!~Ks+6Yx&F-nk~4vL77)({;yFOf NMxt^qE(cY1ZU9$%7a;%u literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Songette b/Docs/default/sounds/ringtones/Songette new file mode 100644 index 0000000000000000000000000000000000000000..1dfca101e131feef71589f24fbfad46bb98cc235 GIT binary patch literal 84 zcmZQz;9=AW&d*CvEh$N5U|{;g$;H?t)GpK{)Ct60s$Bm%g_?oH;< X16Lu$^$*1B0m^j>adA0#vvUIg!mt*l literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Speedy b/Docs/default/sounds/ringtones/Speedy new file mode 100644 index 0000000000000000000000000000000000000000..0743a0d4ed4603771d0233842adb29216ed712fd GIT binary patch literal 338 zcmZQz;9=AWE=WyHsbpYa`oqb^*e&3|)CPCvj_V(YjSvH= zf{1}wQ$Rd2&6;Eiw4KR;sUL{@fVc;U$u*0Mk&5n8Ms-&&)NS2Bx{Jx-As3f}5j!^k D&jd_P literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Sunny_walks b/Docs/default/sounds/ringtones/Sunny_walks new file mode 100644 index 0000000000000000000000000000000000000000..bc5020bb6595b0855d85590964ec22397815c37c GIT binary patch literal 173 zcmX|)F$%&!5Jh*j5XWgPe&+!^#PlgWfpsK}hKJ(tp4?*Mc zbZeT&;eNi<*AP~pZ4bkQ9tqAQvE_6%b;z9X#DEqZd9k=p`Xc+Adt1xwydLOwbR~XW f!-!08YJ1U&f1 z!BQQ%5%eON2fslZtT-;6U6rlWU#QkgS{>0)gGQ@=MGU~gm*Op01_(I;sX_E19}T+* z@ttkbw``-CU^>OdE0zQov6@BaW=YGi5v literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Tango b/Docs/default/sounds/ringtones/Tango new file mode 100644 index 0000000000000000000000000000000000000000..291a160be6276a2231f22e52da7a97d4007dfcf4 GIT binary patch literal 99 zcmZQz;9=AWNz6;nXJBCZ!^y>1C*mN|1jNli+$zHL&tY*bZyj$vuY(9krdFg*(197E X3ZlY6qz$A>!=aXo%Rv=WEju>=jAR!Z literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Tangoed b/Docs/default/sounds/ringtones/Tangoed new file mode 100644 index 0000000000000000000000000000000000000000..e40a7621467605401dd3acce922554b01135da61 GIT binary patch literal 101 zcmZQz;9=AWNz6;nPfcN9VEV(!#aJieAkqZH%|P5L!u8K#aV>8hZ#}Pr2uP+@q)yO* Z8KMfJ!a<}Bq)Nk~mW#_l6;mxcHvre!7vul{ literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Tap dance b/Docs/default/sounds/ringtones/Tap dance new file mode 100644 index 0000000000000000000000000000000000000000..b03ac5aa7107d142db738ea94e11590448461b6e GIT binary patch literal 316 zcma)2!41MN42&aHDTaLV;oAWi!b7k?1$+^ER23mKjo1|-Yy+*t1M!G_@}1A;7_)-S zwmmib_P9GV#@PD;Vet4Mcdf||o?NVH-7!v#2d)TNdBK@`>CKBaD_?c~RUe zUlh+?2ub_AkM(DdKu$EBrSQ`Jk&9=3^#UCocHV^df%M1?I*!Nk0qTk3K< zd}IEtHc+QLQpE|I7veo<-5IK(Mt02OECCDTz$@Sq=`bH6u?|WHWf2tpd8x_@>>D7q zgtCNE;u2T@??A1}CA@ZE#IH3bOemTy6HYKkui09y79;1#AxEZ@KGNH3kJ{Gf;8LmT zt%pC?ja9aSUnsvmWU~Rpe#AUk1JpIPfud4HsDcUlDo%OH`uxd8)OV literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/That_is_it b/Docs/default/sounds/ringtones/That_is_it new file mode 100644 index 0000000000000000000000000000000000000000..dbd398f2878d32c04a9e1ba2f76d056f7c6a5eb6 GIT binary patch literal 102 zcmZQz;9=AW$w(|wFILDbQDk6X`oqb^IEB+erk~S+6ND!M*j1C1{{~Y#k{o~?tP-W)^0NjijCIA2c literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/The_Buffoon b/Docs/default/sounds/ringtones/The_Buffoon new file mode 100644 index 0000000000000000000000000000000000000000..1d9b67c633b63b7d8386ca48c0ab73167e63e823 GIT binary patch literal 117 zcmZQz;9=AW$w*ajDosnv&(C9EVEV&Z&*Q+{BgVTToD5+Ja4}9m7Gnp>0>v6x9Jqii&bf>;89~^A0}D%p3n()MjKQk8 zx&0CtR2dW)cz_l$&1G@`8OA%GaRDO;JAj=9=Yiz-;5-h9n)!?loDPe*xExg3xdD@U BJ*EHv literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Toreador b/Docs/default/sounds/ringtones/Toreador new file mode 100644 index 0000000000000000000000000000000000000000..ba2007ae2894b467613d27b48576c0384d26310f GIT binary patch literal 202 zcmXYqu?+$-3`G+fgvkOPARUz_NPjI0Acgv*8{mY9fvzP0< z+;4GSj5&NyU@L9DI_T_!(*esq%T`pI0)j1+_m6QUdI*QUP5?@Cgr0H3ibXEQjI7(= u`=pWCnO^=a*==gV8Z`nN#PyL;zj%hin1)iL@`UT2MOkRl{w}TYc>V#th&lQI literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Toreador1 b/Docs/default/sounds/ringtones/Toreador1 new file mode 100644 index 0000000000000000000000000000000000000000..03088e58e1c927750e807a178a310cda461dc419 GIT binary patch literal 485 zcmb`Dy$ZrG6onH(i&x=pj>QLXad*f=_yU5?g-%^XYHMvNzOMw&5kq4KCx?%lahi%uu?$|ZF&aKZTu7{^+Jw-zvpja9y|OZAE3TV%zE4Y!*% zD!#+q4%q=#UqiJWt38wlU>s`SUeG5@hbK6Q5g%@)R{HIk6XR`>JNk=%?%Sg`-3Pe$ f9WaXhsd}n(T7pWQ^32`EHoH1?srZ>IT#+nZzSeKX literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Transylvania b/Docs/default/sounds/ringtones/Transylvania new file mode 100644 index 0000000000000000000000000000000000000000..4e3e49f5e8f35f6fcdcdee2265084b72d5770bb0 GIT binary patch literal 340 zcmYL^J#NBK5QIIii5OCbTTpQV_q1HVB~nBYBqUlK^RO|-4q(imxM*ZCeg@I)emncE z*7H8mAN>TA>HK>ZOvZudng0$Eq2M12ZkW*jV*Tz@i1dh?X%jiN$k60iuaT-cxkF((_4th zb~Y~($z!q7mAgr_wc{QKIWm+CpB~H5c|v{GT(*oLBG1LdPZEkPVPz{F+v>9&E1CQO NYtkRKl|TIGJ^-u(USt3O literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Treadmill b/Docs/default/sounds/ringtones/Treadmill new file mode 100644 index 0000000000000000000000000000000000000000..61d520c7bde85f65f3b0483f13dd927ad667d87e GIT binary patch literal 363 zcmb`DK?=e!5JmGxsCA5p*AQ2pVD@gkfS?PZZajq`T4;l%dQ~a@DXv^8xcEut=aYGv z5F!@q<8HG(?294(hO%+s0KW`mjYm}fJy%>y#I{;@JU N6tHn|IjFL80|0JG3#tGB literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Tripod b/Docs/default/sounds/ringtones/Tripod new file mode 100644 index 0000000000000000000000000000000000000000..ffa23402ea89220295d6aa7a5efbb2859495cabe GIT binary patch literal 134 zcmZQz;9=AWDatI!PhntS`oqb^IE!-{=VVR?8LodI)l)_JFMs8a!}=BWMzVhI*74x{bT0_ E0Bj)*d;kCd literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Valkyrie b/Docs/default/sounds/ringtones/Valkyrie new file mode 100644 index 0000000000000000000000000000000000000000..924d87a42d048d56bf3ecbcad886f8f7bf6660ca GIT binary patch literal 404 zcmX|-%}#?r6osMf%)nSv7^MER@dfhWwzP`M_JwJKg=oq?FOv?!AM}SdjAhmBZ1ZA!}NNco4QU(~? z2!YF>Y^HrEH^bZt2p2=uOp9N7hKqu!W$M;gYQNwXH|J%aMoej@p&Jb6gMk<86(%mH zSJp97#~z$&zruKX+qZCRx0PgQt2bC^zyGQX(jC2=qIn>jNS8q$A!V~2 zy=3LS?$UF_Kn79@zQwOLzRc-|FNCM-XDm literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/Walze_Brillant b/Docs/default/sounds/ringtones/Walze_Brillant new file mode 100644 index 0000000000000000000000000000000000000000..fbd67bb9cf6354026305a6ce7142418af0283dd7 GIT binary patch literal 217 zcma)$F$zL45JVFj$to68+ivFpEQ6P@{-A}B%F+`k8bU(wwDNH_Uch3*%dqSl=hl9A zoYL)lxL#74oLhW?`1>}77cz>l+=7yD~Q=p&I+DB$SaC kB_WUeFN4y6Cr7-!!@w2~ULOW)XKl>DJo7Iin|NBTzPgG$kN^Mx literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/ringtones/William_Tell b/Docs/default/sounds/ringtones/William_Tell new file mode 100644 index 0000000000000000000000000000000000000000..ae397b56f6f373585ad13b56019229033f57c4b9 GIT binary patch literal 171 zcmZQz;9=AW&&)Y(*dMg`MLgq>;c&Uq$?aMfX1k@a{~Z-+aX5@o?2U K)Ut8$aRUGiybkFA literal 0 HcmV?d00001 diff --git a/Docs/default/sounds/sms/SMS_Standard b/Docs/default/sounds/sms/SMS_Standard new file mode 100644 index 0000000000000000000000000000000000000000..fa145891fd4db92824e855502210ca451fa5d549 GIT binary patch literal 41 tcmZQz;9=AWE=kNwNi0fXU|{;o)xgTc#TY8-zy-ow{~W^Exazt1xB y) { + ... + } else { + .... + } + +Rationale: K&R. + +Also, note that this brace-placement also minimizes the number of empty +(or almost empty) lines, without any loss of readability. Thus, as the +supply of new-lines on your screen is not a renewable resource (think +25-line terminal screens here), you have more empty lines to put +comments on. + + + Chapter 3: Naming + +C is a Spartan language, and so should your naming be. Unlike Modula-2 +and Pascal programmers, C programmers do not use cute names like +ThisVariableIsATemporaryCounter. A C programmer would call that +variable "tmp", which is much easier to write, and not the least more +difficult to understand. + +HOWEVER, while mixed-case names are frowned upon, descriptive names for +global variables are a must. To call a global function "foo" is a +shooting offense. + +GLOBAL variables (to be used only if you _really_ need them) need to +have descriptive names, as do global functions. If you have a function +that counts the number of active users, you should call that +"count_active_users()" or similar, you should _not_ call it "cntusr()". + +Encoding the type of a function into the name (so-called Hungarian +notation) is brain damaged - the compiler knows the types anyway and can +check those, and it only confuses the programmer. No wonder MicroSoft +makes buggy programs. + +LOCAL variable names should be short, and to the point. If you have +some random integer loop counter, it should probably be called "i". +Calling it "loop_counter" is non-productive, if there is no chance of it +being mis-understood. Similarly, "tmp" can be just about any type of +variable that is used to hold a temporary value. + +If you are afraid to mix up your local variable names, you have another +problem, which is called the function-growth-hormone-imbalance syndrome. +See next chapter. + + + Chapter 4: Functions + +Functions should be short and sweet, and do just one thing. They should +fit on one or two screenfuls of text (the ISO/ANSI screen size is 80x24, +as we all know), and do one thing and do that well. + +The maximum length of a function is inversely proportional to the +complexity and indentation level of that function. So, if you have a +conceptually simple function that is just one long (but simple) +case-statement, where you have to do lots of small things for a lot of +different cases, it's OK to have a longer function. + +However, if you have a complex function, and you suspect that a +less-than-gifted first-year high-school student might not even +understand what the function is all about, you should adhere to the +maximum limits all the more closely. Use helper functions with +descriptive names (you can ask the compiler to in-line them if you think +it's performance-critical, and it will probably do a better job of it +that you would have done). + +Another measure of the function is the number of local variables. They +shouldn't exceed 5-10, or you're doing something wrong. Re-think the +function, and split it into smaller pieces. A human brain can +generally easily keep track of about 7 different things, anything more +and it gets confused. You know you're brilliant, but maybe you'd like +to understand what you did 2 weeks from now. + + + Chapter 5: Commenting + +Comments are good, but there is also a danger of over-commenting. NEVER +try to explain HOW your code works in a comment: it's much better to +write the code so that the _working_ is obvious, and it's a waste of +time to explain badly written code. + +Generally, you want your comments to tell WHAT your code does, not HOW. +Also, try to avoid putting comments inside a function body: if the +function is so complex that you need to separately comment parts of it, +you should probably go back to chapter 4 for a while. You can make +small comments to note or warn about something particularly clever (or +ugly), but try to avoid excess. Instead, put the comments at the head +of the function, telling people what it does, and possibly WHY it does +it. + + + Chapter 6: You've made a mess of it + +That's OK, we all do. You've probably been told by your long-time Unix +user helper that "GNU emacs" automatically formats the C sources for +you, and you've noticed that yes, it does do that, but the defaults it +uses are less than desirable (in fact, they are worse than random +typing - a infinite number of monkeys typing into GNU emacs would never +make a good program). + +So, you can either get rid of GNU emacs, or change it to use saner +values. To do the latter, you can stick the following in your .emacs file: + +(defun linux-c-mode () + "C mode with adjusted defaults for use with the Linux kernel." + (interactive) + (c-mode) + (c-set-style "K&R") + (setq c-basic-offset 8)) + +This will define the M-x linux-c-mode command. When hacking on a +module, if you put the string -*- linux-c -*- somewhere on the first +two lines, this mode will be automatically invoked. Also, you may want +to add + +(setq auto-mode-alist (cons '("/usr/src/linux.*/.*\\.[ch]$" . linux-c-mode) + auto-mode-alist)) + +to your .emacs file if you want to have linux-c-mode switched on +automagically when you edit source files under /usr/src/linux. + +But even if you fail in getting emacs to do sane formatting, not +everything is lost: use "indent". + +Now, again, GNU indent has the same brain dead settings that GNU emacs +has, which is why you need to give it a few command line options. +However, that's not too bad, because even the makers of GNU indent +recognize the authority of K&R (the GNU people aren't evil, they are +just severely misguided in this matter), so you just give indent the +options "-kr -i8" (stands for "K&R, 8 character indents"). + +"indent" has a lot of options, and especially when it comes to comment +re-formatting you may want to take a look at the manual page. But +remember: "indent" is not a fix for bad programming. + + + Chapter 7: Configuration-files + +For configuration options (arch/xxx/config.in, and all the Config.in files), +somewhat different indentation is used. + +An indention level of 3 is used in the code, while the text in the config- +options should have an indention-level of 2 to indicate dependencies. The +latter only applies to bool/tristate options. For other options, just use +common sense. An example: + +if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then + tristate 'Apply nitroglycerine inside the keyboard (DANGEROUS)' CONFIG_BOOM + if [ "$CONFIG_BOOM" != "n" ]; then + bool ' Output nice messages when you explode' CONFIG_CHEER + fi +fi + +Generally, CONFIG_EXPERIMENTAL should surround all options not considered +stable. All options that are known to trash data (experimental write- +support for file-systems, for instance) should be denoted (DANGEROUS), other +Experimental options should be denoted (EXPERIMENTAL). diff --git a/Docs/developers/gnokii/gettext-howto b/Docs/developers/gnokii/gettext-howto new file mode 100644 index 0000000..c24e67d --- /dev/null +++ b/Docs/developers/gnokii/gettext-howto @@ -0,0 +1,102 @@ +1. What do I need? + +- a reasonably recent version of GNU gettext (e.g. 0.10.35) + Check the version using e.g. msgfmt -V + +- autoconf + +- gnokii distribution :-) + +- if you have the variable LINGUAS in the environment + (most Red Hats have, no idea about other distributions), + unset it + + +2. How to make gnokii.pot file? + +gnokii.pot file is a collection of all localizable strings +in the gnokii package. It will be generated automagically +and is included in the standard distribution package. + +If you need to regenerate it, goto "po" directory, +remove gnokii.pot and say + + make gnokii.pot + + +3.1 How to start translating for a new language? + +First, you would like to contact the authors or write +to the mailing list - maybe there already is someone +working on this translation. + +If you get the OK from the maintainer, there are several +steps to do: + +- add the code of your language to the ALL_LINGUAS line + in the configure.in file + + Caution: the language code may differ from the country + code, e.g. czech language is cs, Czech Republic is cz + +- run autoconf to recreate configure script + +- reconfigure the package (./configure) + +- in the po directory, copy gnokii.pot to .po + +- start translating + + +3.2 How to merge existing translations with the updated gnokii.pot? + +This is simple. Rename the old file and use msgmerge to create +an updated one: + + mv cs.po cs.po.bak + msgmerge -o cs.po cs.po.bak gnokii.pot + + +4. How to generate a .mo file + +When you say make in the po directory, all existing +translations will be generated. The suffix will be .gmo. + +If you want to do this manually, use the msgfmt utility, e.g. + + msgfmt -o cs.mo -v cs.po + + +5. How to install the files + +Again, the makefile takes care of this. Simply use (as root) + + make install + +in the po directory. If you want to do this manually (and/or +for your language only), move the .mo file to +/usr/share/locale//LC_MESSAGES/gnokii.mo + + +I'm from Czech republic, so I did (well, I did not, but if you would +like to localize gnokii, you should :-): + + cd po + make gnokii.pot + cp gnokii.pot cs.po + + msgfmt -o cs.mo -v cs.po + make + make install + +And now: + +SnowWhite:/tmp/gnokii$ export LC_MESSAGES=cs_CZ +SnowWhite:/tmp/gnokii$ ./gnokii --version +GNOKII Version 0.3.1 Copyright (C) Hugh Blemings 1999. + Kompilace: 19:09:02 Mar 13 1999 pro model 6110 na portu /dev/ttyS0 +SnowWhite:/tmp/gnokii$ + +The second line is in czech language :-) There are some problems - for +example with "Mar" which is substitute by the C preprocessor. + diff --git a/Docs/developers/gnokii/gnokii.txt b/Docs/developers/gnokii/gnokii.txt new file mode 100644 index 0000000..f24e690 --- /dev/null +++ b/Docs/developers/gnokii/gnokii.txt @@ -0,0 +1,69 @@ +NOTE for command line gnokii: + +--netmonitordata + + we have used two data structure, defined in gnokii.h : + + PARAM_INFO_MON wich is a single linked recursive list of pointers, + each pointers contain the complete description of one netmonitor param. + + /////////////////////////////////////////////////////////////////////// + // start->next->next->next-> ...->next->NULL + // | | | | + // V V V V + // par0 par1 par2 parN + /////////////////////////////////////////////////////////////////////// + + OUT_INFO_MON, contains parameters as specified + from the command line and an array of data pointers requested by user, + each one point to a single PARAM_INFO_MON + for optimization reason, also we filled in one array of required screen. + + + this the block diagram of program: + + PARAM_INFO_MON *info: + OUT_INFO_MON *out: + + netmonitordata() + + check for -S option, assign filename + + check for -I option, assign filename + + autodetect_phonemodel_phone_version() This is TO DO + + info = get_min_param_info() // nedeed here, so later we can check args param + + // here we check command line arguments + if -I option + + for each line + do + parse_check(f_argc, f_argv, info, file, line) + done + else + parse_check(argc, argv, info, NULL, 0) + fi + + + // HERE, ALL IS CHECKED + + // here we make OUT_INFO_MON + if -I option + + for each line + do + out = parse_process(f_argc, f_argv, info, file, line) + + nmd_output(out) + + free(out) + done + else + out = parse_process(argc, argv, info, NULL, 0) + + nmd_output(out) + + free(out) + fi diff --git a/Docs/developers/gnokii/packaging-howto b/Docs/developers/gnokii/packaging-howto new file mode 100644 index 0000000..988ee92 --- /dev/null +++ b/Docs/developers/gnokii/packaging-howto @@ -0,0 +1,60 @@ + + Common information: + + For more install/compilation information see the INSTALL file. + + (!) Makefiles support make install prefix= + for package building. You can use it example in for .spec: + + ./configure --prefix=/usr + make install prefix=$RPM_BUILD_ROOT/usr + + (You not need create any dirs - all make make install.) + + For a installation procedure is used 'make install' or + 'make install prefix=', and all outputs from this routine must be + correct. Please, not make any correction in your package specific + build system (example use 'cp' in package routines - .spec - + it is job for Makefiles). Write more different routines for + instalation is good way to hell... + + 'make install' not install documentation, because for this use + any distribution itself routines. If you want install docs via + Makefile you must type 'make install-docs' + + Debian: + + 1/ Add new lines to Debian/changelog and set corect verion in this + file. + + 2/ Check files: rules, menu, docs + + 3/ Well, because gnokii's debian directory is in subdirectory + 'packaging' and it is total non-standard for Debian package + building system, you must firstly type in top directory: + + # ln -s packaging/Debian debian + + 3/ In source type: + + # debian/rules binary + # debian/rules clean + + 4/ Delete symlink + + # rm debian + + + + FreeBSD: + + + + RedHat: + + + + + + Win32: + \ No newline at end of file diff --git a/Docs/developers/gnokii/untitled.txt b/Docs/developers/gnokii/untitled.txt new file mode 100644 index 0000000..f06a8f6 --- /dev/null +++ b/Docs/developers/gnokii/untitled.txt @@ -0,0 +1,42 @@ +Subject: RE: Xgnokii in win32 ? +Date: Mon, 29 Nov 1999 08:45:31 +0100 +From: Acquadro Daniele +To: marcinw0@poczta.onet.pl +CC: gnokii + +Hi , +gtk for windows can be donloaded from www.gtk.org. On the left there's a +link to GTK+ on win32 (on the bottom of the page). + +To compile xGnokii, using VC ide, you have to create a new win32 CONSOLE +application (NOT a win32 application) and then add the libraries. +TO COMPILE you need those libraries +gdk-1.3.lib +gtk-1.3.lib +glib-1.3.lib + + bye + Daniele +> -----Original Message----- +> From: Marcin Wiacek [SMTP:marcinw0@poczta.onet.pl] +> Sent: domenica 28 novembre 1999 22.50 +> To: GNU Nokia mailing List +> Subject: Xgnokii in win32 ? +> +> +> Hi, +> +> I want to know only, where can I get GTK libraries for win32 (they're +> required for compiling xgnokii) from ? +> +> Or maybe somebody will write on the list/some WWW page, what to do to +> compile xgnokii in win32 (how to replace GTK libraries with win procedures +> - +> I think, it will be better) ? +> +> ...maybe I shouldn't ask for it, but it isn't written in gnokii source... +> +> Regards, +> +> Marcin +> diff --git a/Docs/developers/other/RE RE.txt b/Docs/developers/other/RE RE.txt new file mode 100644 index 0000000..aa25178 --- /dev/null +++ b/Docs/developers/other/RE RE.txt @@ -0,0 +1,66 @@ +Do: Markus Plail +Temat: RE: RE: + + +Hi, + +> Sorry for the confusion. I wrote the subject (getsms for 6210) in +> the CC field. +No problem :-) + +> So this is what I want to try, in linux btw. U wrote that u can +> give some information on that topic. +OK. Good. + +First of all, you HAVE to understand, how/where are created all phone functions. Look into n7110.c for N7110_Functions. This is our structure for each function - getting SMS, etc. You have pointers to each function sending request. + +Example: N6110_NetMonitor for netmonitor function. + +If each function (let's say N6110_NetMonitor) you send frame for phone: +----------------------------- + unsigned char req[] = { 0x00, 0x01, 0x7e, 0x00 }; + + GSM_Error error; + + error=N6110_EnableExtendedCommands(0x01); + if (error!=GE_NONE) return error; + + CurrentNetmonitor=Screen; + + req[3]=mode; + + return N6110_SendMessageSequence + (20, &CurrentNetmonitorError, 4, 0x40, req); +--------------------------- +In req you prepare it (see 6110.txt/7110.txt for frame for netmonitor and compare it with req). + +First (this is specific for netmonitor and some other) need to send something, we call EnableExtendedCommands - we must send special frame and wait for answer. And ONLY after it phone will answer with 0x40 frames. For SMS in 6210 it's not required. + +After it we set pointer to structure given by user (pointers are declared in gsm-api.c & gsm-api.h): CurrentNetmonitor=Screen; + +Prepare frame send to phone... + +And use N6110_SendMessageSequence -> first is, how long we can wait for phone answer (20), next: what variable is used to see, if phone answered (I will later describe more - variable created in gsm-api.c & gsm-api.h), how many bytes in req, frame type and req. + +That's all here. + +All answers are handled in N7110_DispatchMessage + +In example look for: + + fprintf(stdout, _("Message: Netmonitor menu %d received:\n"), MessageBuffer[3]); + +You copy formatted answer to structure pointed by CurrentNetmonitor (in example) and set CurrentNetmonitorError to GE_NONE (it makes, that N6110_SendMessageSequence returns: NO error). That's all. +-------------------- +If you understand, let's start: + +1.need to make new N7110_GetSMSFolders similiar to N6110_GetSMSFolders (send frame - it's described in 7110.txt: "Get folder names", wait for answer and return it) and set N7110_Functions to point on it (in line 127). + +After it we will be able to make "real" getsms... + +Any questions ? + +Pozdrowienia/Best Regards +-- +Marcin Wiacek -> mailto:marcinwiacek@topnet.pl http://marcin-wiacek.topnet.pl (http://www.fkn.pl/marcinw) -> netmonitor, firmware, mygnokii (GSM & Nokia) +http://www.mds.mdh.se/~cel95eig/mygnokii/ & http://grumble.zereau.com/gnokii/ & http://reinhold.bachrain.de/ -> mygnokii mirrors \ No newline at end of file diff --git a/Docs/developers/other/dmcp/addsms b/Docs/developers/other/dmcp/addsms new file mode 100644 index 0000000..bc4b0bf --- /dev/null +++ b/Docs/developers/other/dmcp/addsms @@ -0,0 +1,19 @@ +//SCKL1584 +BODY: +IA: +OPER ariel +Link up +N + +M SMS ++6421XXXXXX/+6421YYYYYY +6:LINKUP +-- +IA: +OPER ariel +Link down +N + +M SMS ++6421XXXXXX/+6421YYYYYY +8:LINKDOWN diff --git a/Docs/developers/other/dmcp/readme b/Docs/developers/other/dmcp/readme new file mode 100644 index 0000000..9d9aefe --- /dev/null +++ b/Docs/developers/other/dmcp/readme @@ -0,0 +1,148 @@ + +1.see Smart Messaging 2.0 for info, what the DMCP is + +2.I didn't have success in changing menus via cable (without sending SMS). + Here is example foogle funtion. You will see only "Nokia service update failed" +------------------------------------ +int foogle(char *argv[]) +{ + GSM_NetworkInfo NetworkInfo; + int i; + + char buffer[100]= { 0x0c, 0x01, + 0x06, /* User Data Header Length */ + 0x05, /* IEI: application port addressing scheme, 16 bit address */ + 0x04, /* IEDL (IED length ?) */ + 0x15, /* destination address: high byte */ + 0x84, /* destination address: low byte */ + 0x00, /* originator address: high byte */ + 0x00}; /* originator address: low byte */ + + int MSGLEN=9; + + /* Initialise the code for the GSM interface. */ + + fbusinit(NULL); + + buffer[MSGLEN++]='B'; + buffer[MSGLEN++]='O'; + buffer[MSGLEN++]='D'; + buffer[MSGLEN++]='Y'; + buffer[MSGLEN++]=':'; + buffer[MSGLEN++]=10; + buffer[MSGLEN++]='I'; + buffer[MSGLEN++]='A'; + buffer[MSGLEN++]=':'; + buffer[MSGLEN++]=10; + buffer[MSGLEN++]='O'; + buffer[MSGLEN++]='P'; + buffer[MSGLEN++]='E'; + buffer[MSGLEN++]='R'; + buffer[MSGLEN++]=' '; + buffer[MSGLEN++]='a'; + buffer[MSGLEN++]='l'; + buffer[MSGLEN++]=10; + buffer[MSGLEN++]='L'; + buffer[MSGLEN++]='i'; + buffer[MSGLEN++]='n'; + buffer[MSGLEN++]='k'; + buffer[MSGLEN++]=10; + buffer[MSGLEN++]='N'; + buffer[MSGLEN++]=10; + buffer[MSGLEN++]=10; + buffer[MSGLEN++]='M'; + buffer[MSGLEN++]=' '; + buffer[MSGLEN++]='S'; + buffer[MSGLEN++]='M'; + buffer[MSGLEN++]='S'; + buffer[MSGLEN++]=10; + buffer[MSGLEN++]='+'; + buffer[MSGLEN++]='4'; + buffer[MSGLEN++]='8'; + buffer[MSGLEN++]='6'; + buffer[MSGLEN++]='0'; + buffer[MSGLEN++]='2'; + buffer[MSGLEN++]='9'; + buffer[MSGLEN++]='5'; + buffer[MSGLEN++]='1'; + buffer[MSGLEN++]='1'; + buffer[MSGLEN++]='1'; + buffer[MSGLEN++]='1'; + buffer[MSGLEN++]='/'; + buffer[MSGLEN++]='+'; + buffer[MSGLEN++]='4'; + buffer[MSGLEN++]='8'; + buffer[MSGLEN++]='6'; + buffer[MSGLEN++]='0'; + buffer[MSGLEN++]='2'; + buffer[MSGLEN++]='9'; + buffer[MSGLEN++]='5'; + buffer[MSGLEN++]='1'; + buffer[MSGLEN++]='1'; + buffer[MSGLEN++]='1'; + buffer[MSGLEN++]='1'; + + for (i=0;iSendMessage(MSGLEN, 0x12, buffer); + GSM->GetNetworkInfo(&NetworkInfo); //need to make something + + + GSM->Terminate(); + + return 0; +} +----------------------------------- +3.to change via SMS - read parts of email sent by Martin Lucina [mato@kotelna.sk] +----------------------------------- + +1. First of all, use the OPER (Operator) services rather than the Nokia + services. There's probably no reason why you couldn't use either but + there may be extra hooks in the phone firmware regarding Nokia + services that I don't know about. + +2. Make sure that "Operator access number 1" and "Operator access number + 2" are set correctly in the services menu. The former should be set + to the SMS centre the messages you send are going to come from + (important, send yourself a test message and check it's details, some + operators set the sending SMSC number to one different from the one + you originally sent the message to). The latter should be the number + of the MS you are sending the SMS from. + +3. Don't send the messages as binary NBS messsages using the UDH. I + haven't been able to get this method to work and besides, the //SCK + compatibility header works just fine. + + Also, while I haven't seen this, it's possible that if you send a + message in binary format, the destination MS will reply in binary + format. This makes the reply useless if you are sending from another + NBS-aware phone, since the NBS router will most likely silently + discard it (or try to forward it to the phones TTML/DMCP server, + which won't help either). + + If you send the messages as text, the replies I've seen also come + back as text so you can retrieve them from the phone in the normal + fashion. + +One caveat I've noticed with sending NBS messages using the //SCK +compatibility header is that the NBS grammar in the Nokia SM spec +version 2 contradicts the grammar in the original Intel NBS spec. Nokia +says you can using either a newline or space as the delimiter after +"//SCK", it turns out that you _must_ use a space (as stated in the +Intel spec). Of course you can still stick a newline in afterwards. + +I have attached a test file that will add two menu items that send SMS +messages to your services menu. I send this to the phone using + +$ sendsms +6421XXXXXX < addsms + +[...] + +Cheers, + +-- +Martin Lucina http://www.kotelna.sk/mato/ Wellington, New Zealand +I've always been mad I know I've been mad like the most of us are +Pretty hard to explain why you're a madman even if you're not mad diff --git a/Docs/developers/other/dmcp/removesms b/Docs/developers/other/dmcp/removesms new file mode 100644 index 0000000..06a47ab --- /dev/null +++ b/Docs/developers/other/dmcp/removesms @@ -0,0 +1,5 @@ +//SCKL1584 +BODY: +IR: +OPER ariel +Link up diff --git a/Docs/developers/other/ringtones.txt b/Docs/developers/other/ringtones.txt new file mode 100644 index 0000000..c896658 --- /dev/null +++ b/Docs/developers/other/ringtones.txt @@ -0,0 +1,115 @@ +Subject: Ringtones +Date: Wed, 2 Feb 2000 13:32:47 -0000 +From: "Mike Bradley" +To: "GNU Nokia mailing List" + +Does anyone know anything about the ringtone IDs in the group info? It +seems that all the various handsets have different ID codes and different +sets of tones. Is there any order to all this? Here's what I've got: + +RINGTONEDESC +eNam +100 + + 0x10, "Preset", + 0x11, "Custom", + 0x12, "Ring ring", // + 0x13, "Low", // + 0x14, "Fly", + 0x15, "Mosquito", // + 0x16, "Bee", // + 0x17, "Intro", + 0x18, "Etude", + 0x19, "Hunt", + 0x1a, "Going up", + 0x1b, "City bird", // + 0x1e, "Chase", + 0x20, "Scifi", + 0x23, "Do-mi-so", // + 0x24, "Robo N1X", + 0x27, "Playground", + 0x2b, "That's It!", + 0x2f, "Grande valse", // + 0x30, "Helan", + 0x31, "Fuga", + 0x32, "Menuet", + 0x33, "Ode to Joy", + 0x34, "Elise", // + 0x35, "Mozart 40", // + 0x36, "Piano Concerto", // + 0x37, "William Tell", + 0x38, "Badinerie", // + 0x39, "Polka", + 0x3a, "Attraction", // + 0x3c, "Polite", + 0x3d, "Persuasion",// + 0x43, "Tick tick",// + 0x44, "Samba",// + 0x46, "Orient",// + 0x47, "Charleston",// + 0x49, "Jumping",// + + 0x00, "??" +}; + +// the following are also on the 8850 +//Trio +//Knock knock +//Cicada +//Kick +//Dawn +//Buffoon +//Barn dance +//Basic rock +//Groovy blue +//Frantic +//Baroque +//Entertainer +//Indifference +//Swan Lake +//Tchaikovsky +//Liszt +//Bounce + +RINGTONEDESC +eNam +100 + + 0xff, "Default", + 0x2c, "That's It!", + 0x2d, "Siren", + 0x2e, "Tripod", + 0x2f, "Ring ring", + 0x30, "Low", + 0x31, "Intro", + 0x32, "Bee", + 0x33, "Etude", + 0x34, "Polite", + 0x35, "Persuasion", + 0x36, "Attraction", + 0x37, "Bumblebee", + 0x38, "Menuet", + 0x39, "Grande valse", + 0x3a, "Ode to Joy", + 0x3b, "Mozart 40", + 0x3c, "Elise", + 0x3d, "William Tell", + 0x3e, "Charleston", + 0x3f, "Helan", + 0x40, "Left Hand", + 0x41, "Right Hand", + 0x42, "Happy Birthday", + 0x43, "Playground", + 0x44, "Fuga", + 0x45, "Chase", + 0x46, "Classical", + 0x47, "Hungarian", + 0x48, "Valkyrie", + 0x49, "Badinerie", + 0x4a, "Bach #3", + 0x4b, "Swan Lake", + 0x4c, "Tchaikovsky", + 0x4d, "Samba", + 0x4e, "Mosquito", + 0x00, "??" +}; diff --git a/Docs/developers/other/sniffs/Telefonbucheditor7110.txt b/Docs/developers/other/sniffs/Telefonbucheditor7110.txt new file mode 100644 index 0000000..2ca658c --- /dev/null +++ b/Docs/developers/other/sniffs/Telefonbucheditor7110.txt @@ -0,0 +1,19 @@ +Od: owner-gnokii@net.lut.ac.uk w imieniu Bernhard Mähr [Bernhard.Maehr@GMX.at] +Wysłano: 25 listopada 2000 17:06 +Do: gnokii@net.lut.ac.uk +Temat: Telefonbucheditor 7110 + +For everyone who trys to decode the 7110 FBUS protocol a tip: +If in the Windows-Registry HKEY_LOCAL_MACHINE\SOFTWARE\moosy.development\TBE7110 +the String Data is replaced with a Binary with the name Data the program shows a +error message at the begin but it also enables a option debug. This option +displays a second window showing the trace of the FBUS. So it should be easier +to decode the protocol. So it is possible to see the communiction while loading +the phone numbers, adresses,... and also syncronizing the calendar. + +I know it is a little bit unfair, don't tell me that. + +I hope this is useful for someone + +Bernhard Mähr + diff --git a/Docs/developers/other/sniffs/irda/info.txt b/Docs/developers/other/sniffs/irda/info.txt new file mode 100644 index 0000000..ca030f9 --- /dev/null +++ b/Docs/developers/other/sniffs/irda/info.txt @@ -0,0 +1,12 @@ +To irda sniffs use irda_intercept.tgz +(http://www.dev-thomynet.de/nokworld/noktrace/index.html or tools directory +- unpacked source is there) from Thomas Schneider + +how to use it: +you MUST stop irda support ('rcirda stop' fur SUSE) +to free the infrared tty port. +just type irda_intercept and you should see +irda packages of port /dv/ttyS1 (hardcoded in source). +The tool writes also to file 'out.trc'. +Use this file to decode: 'gnokii --decodefile out.trc' +(mygnokii have to be compiled with debug) diff --git a/Docs/developers/other/sniffs/irda/tools/fcs/fcs.c b/Docs/developers/other/sniffs/irda/tools/fcs/fcs.c new file mode 100644 index 0000000..60fc687 --- /dev/null +++ b/Docs/developers/other/sniffs/irda/tools/fcs/fcs.c @@ -0,0 +1,62 @@ +/********************************************************************* + * + * Filename: fcs.c + * Version: 0.1 + * Description: fcs calculation routines + * Status: Experimental. + * Author: Dag Brattli + * Created at: Mon Aug 4 20:40:53 1997 + * Modified at: Sat Jul 17 08:43:59 1999 + * Modified by: Thomas Schneider + * Sources: crc.h by Dag Brattli in + * linux-irda-project, + * ppp.c by Michael Callahan + * Al Longyear + * + ********************************************************************/ + +#include "fcs.h" + +__u16 irda_fcs16_table[256] = +{ + 0x0000, 0x1189, 0x2312, 0x329b, 0x4624, 0x57ad, 0x6536, 0x74bf, + 0x8c48, 0x9dc1, 0xaf5a, 0xbed3, 0xca6c, 0xdbe5, 0xe97e, 0xf8f7, + 0x1081, 0x0108, 0x3393, 0x221a, 0x56a5, 0x472c, 0x75b7, 0x643e, + 0x9cc9, 0x8d40, 0xbfdb, 0xae52, 0xdaed, 0xcb64, 0xf9ff, 0xe876, + 0x2102, 0x308b, 0x0210, 0x1399, 0x6726, 0x76af, 0x4434, 0x55bd, + 0xad4a, 0xbcc3, 0x8e58, 0x9fd1, 0xeb6e, 0xfae7, 0xc87c, 0xd9f5, + 0x3183, 0x200a, 0x1291, 0x0318, 0x77a7, 0x662e, 0x54b5, 0x453c, + 0xbdcb, 0xac42, 0x9ed9, 0x8f50, 0xfbef, 0xea66, 0xd8fd, 0xc974, + 0x4204, 0x538d, 0x6116, 0x709f, 0x0420, 0x15a9, 0x2732, 0x36bb, + 0xce4c, 0xdfc5, 0xed5e, 0xfcd7, 0x8868, 0x99e1, 0xab7a, 0xbaf3, + 0x5285, 0x430c, 0x7197, 0x601e, 0x14a1, 0x0528, 0x37b3, 0x263a, + 0xdecd, 0xcf44, 0xfddf, 0xec56, 0x98e9, 0x8960, 0xbbfb, 0xaa72, + 0x6306, 0x728f, 0x4014, 0x519d, 0x2522, 0x34ab, 0x0630, 0x17b9, + 0xef4e, 0xfec7, 0xcc5c, 0xddd5, 0xa96a, 0xb8e3, 0x8a78, 0x9bf1, + 0x7387, 0x620e, 0x5095, 0x411c, 0x35a3, 0x242a, 0x16b1, 0x0738, + 0xffcf, 0xee46, 0xdcdd, 0xcd54, 0xb9eb, 0xa862, 0x9af9, 0x8b70, + 0x8408, 0x9581, 0xa71a, 0xb693, 0xc22c, 0xd3a5, 0xe13e, 0xf0b7, + 0x0840, 0x19c9, 0x2b52, 0x3adb, 0x4e64, 0x5fed, 0x6d76, 0x7cff, + 0x9489, 0x8500, 0xb79b, 0xa612, 0xd2ad, 0xc324, 0xf1bf, 0xe036, + 0x18c1, 0x0948, 0x3bd3, 0x2a5a, 0x5ee5, 0x4f6c, 0x7df7, 0x6c7e, + 0xa50a, 0xb483, 0x8618, 0x9791, 0xe32e, 0xf2a7, 0xc03c, 0xd1b5, + 0x2942, 0x38cb, 0x0a50, 0x1bd9, 0x6f66, 0x7eef, 0x4c74, 0x5dfd, + 0xb58b, 0xa402, 0x9699, 0x8710, 0xf3af, 0xe226, 0xd0bd, 0xc134, + 0x39c3, 0x284a, 0x1ad1, 0x0b58, 0x7fe7, 0x6e6e, 0x5cf5, 0x4d7c, + 0xc60c, 0xd785, 0xe51e, 0xf497, 0x8028, 0x91a1, 0xa33a, 0xb2b3, + 0x4a44, 0x5bcd, 0x6956, 0x78df, 0x0c60, 0x1de9, 0x2f72, 0x3efb, + 0xd68d, 0xc704, 0xf59f, 0xe416, 0x90a9, 0x8120, 0xb3bb, 0xa232, + 0x5ac5, 0x4b4c, 0x79d7, 0x685e, 0x1ce1, 0x0d68, 0x3ff3, 0x2e7a, + 0xe70e, 0xf687, 0xc41c, 0xd595, 0xa12a, 0xb0a3, 0x8238, 0x93b1, + 0x6b46, 0x7acf, 0x4854, 0x59dd, 0x2d62, 0x3ceb, 0x0e70, 0x1ff9, + 0xf78f, 0xe606, 0xd49d, 0xc514, 0xb1ab, 0xa022, 0x92b9, 0x8330, + 0x7bc7, 0x6a4e, 0x58d5, 0x495c, 0x3de3, 0x2c6a, 0x1ef1, 0x0f78 +}; + +unsigned short fcs_calc( __u16 oldfcs, __u8 *buf, int len) { + __u16 fcs = oldfcs; + + while ( len--) + fcs = IR_FCS(fcs, *buf++); + return (fcs); +} diff --git a/Docs/developers/other/sniffs/irda/tools/fcs/fcs.h b/Docs/developers/other/sniffs/irda/tools/fcs/fcs.h new file mode 100644 index 0000000..721be89 --- /dev/null +++ b/Docs/developers/other/sniffs/irda/tools/fcs/fcs.h @@ -0,0 +1,30 @@ +/********************************************************************* + * + * Filename: fcs.h + * Version: + * Description: fcs routines for irda + * Status: Experimental. + * Author: Dag Brattli + * Created at: Mon Aug 4 20:40:53 1997 + * Modified at: Sat Jul 17 08:43:59 1999 + * Modified by: Thomas Schneider + * Sources: crc.h by Dag Brattli in + * linux-irda-project + * + ********************************************************************/ + +#ifndef FCS_H +#define FCS_H + +#include + +#define INIT_FCS 0xffff /* Initial FCS value */ +#define GOOD_FCS 0xf0b8 /* Good final FCS value */ + +#define IR_FCS(fcs, byte)((fcs >> 8)^irda_fcs16_table[ (fcs^byte) & 0xff]) + +unsigned short fcs_calc( __u16 oldfcs, __u8 *buf, int len); + +extern __u16 irda_fcs16_table[]; + +#endif diff --git a/Docs/developers/other/sniffs/irda/tools/include/irda.h b/Docs/developers/other/sniffs/irda/tools/include/irda.h new file mode 100644 index 0000000..59ec63b --- /dev/null +++ b/Docs/developers/other/sniffs/irda/tools/include/irda.h @@ -0,0 +1,183 @@ +/********************************************************************* + * + * Filename: irda.h + * Version: + * Description: irda-specific defines + * Status: Experimental. + * Author: Thomas Schneider + * Created at: + * Modified at: + * Modified by: Thomas Schneider + * + * Copyright (c) 1999 Thomas Schneider, All Rights Reserved. + * + * 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 2 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. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * IN NO EVENT SHALL THOMAS SCHNEIDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THOMAS SCHNEIDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THOMAS SCHNEIDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER + * IS ON AN "AS IS" BASIS, AND THOMAS SCHNEIDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR + * MODIFICATIONS. + * + * This material is provided "AS-IS" and at no charge. + * + ********************************************************************/ + +#ifndef __NOKTRACE_IRDA_H +#define __NOKTRACE_IRDA_H + +#include + + +/* + * service hints + * ------------- + * - first byte + */ +#define PNP_COMP 0x00 +#define PDA_PALM 0x01 +#define COMPUTER 0x02 +#define PRINTER 0x03 +#define MODEM 0x04 +#define FAX 0x05 +#define LAN 0x06 +#define EXTENS 0x07 + + +/* + * output-defines + * -------------- + */ +#define OUT_ALL 0x01 +#define OUT_IRLAP 0x02 +#define OUT_IRLMP 0x03 +#define OUT_HIGH_LEVEL 0x04 + +#define OUT_FORM_LINE 0x01 +#define OUT_FORM_STEP 0x02 + +#define OUT_SCREEN 0x01 +#define OUT_FILE 0x02 + +/* + * some types + */ +typedef unsigned char BYTE; +typedef unsigned char U8 ; +typedef unsigned short U16 ; +typedef unsigned int U32 ; + +/* + * some structs + */ +typedef struct +{ + U16 length; + U16 a_offset; + BYTE buf[4096]; +} RAW_FRAME; + +typedef struct +{ + U16 bof_length; + BYTE * bof; + BYTE a; + BYTE c; + U16 info_length; + BYTE * info; + U32 fcs; /* must be U32 because escaped fcs */ + BYTE eof_length; + BYTE * eof; + BYTE esc_nr; /* all ce's - include also esc_fcs */ + BYTE esc_fcs; /* nr of ce's in fcs */ + U16 computed_fcs; +} IRLAP_FRAME; + +typedef struct +{ + U16 bof_length; + BYTE * bof; + BYTE a; + BYTE c; + U16 info_length; + BYTE * info; + U32 fcs; /* must be U32 because escaped fcs */ + BYTE eof_length; + BYTE * eof; + BYTE esc_nr; /* all ce's - include also esc_fcs */ + BYTE esc_fcs; /* nr of ce's in fcs */ + U16 computed_fcs; +} IRLAP_RAW_FRAME; + +typedef struct +{ + U8 cmd; + U8 dlsap_sel; + U8 slsap_sel; + U16 info_length; + U8 * info; +} IRLMP_FRAME; + +typedef struct +{ + BYTE baud_rate_master; + BYTE baud_rate_client; + BYTE baut_rate_connection; + BYTE state; +} NEGOTATION_PARAM; + +typedef struct +{ + BYTE irlap_state; + BYTE irlmp_state; + U32 p_src_adr; /* primary - source address */ + U32 s_src_adr; /* secondary - source address */ + U8 conn_adr; /* connection address */ +} CONNECTION; + +typedef struct +{ + U32 prim_nr_bytes; /* bytes from primary station */ + U32 sec_nr_bytes ; /* bytes from secomdary station */ + U32 prim_fcs_errors; /* nr of fcs-errors from prim. */ + U32 sec_fcs_errors; /* nr of fcs-errors from sec. */ + U32 prim_frames; /* frames from primary */ + U32 sec_frames; /* frames from secondary */ + U32 prim_esc_nr; /* nr of ecsapes from primary */ + U32 sec_esc_nr; /* nr of escapes from secondary */ +} CONNECT_STATISTIC; + +typedef struct +{ + BYTE deep; /* deep of output (L2, L3, ... */ + BYTE form; /* kind of output (line, steps) */ + BYTE bit_output; /* if output as bits */ + BYTE dest; /* file, screen */ + FILE input_fd; /* input FILE */ + GString infile_name; /* name of input-file */ + FILE output_file; /* output FILE */ + GString outfile_name; /* name of input-file */ +} OUTPUT_PARAMS; + + +#endif /* __NOKTRACE_IRDA_H */ + diff --git a/Docs/developers/other/sniffs/irda/tools/include/irlap.h b/Docs/developers/other/sniffs/irda/tools/include/irlap.h new file mode 100644 index 0000000..bd4a11d --- /dev/null +++ b/Docs/developers/other/sniffs/irda/tools/include/irlap.h @@ -0,0 +1,242 @@ +/********************************************************************* + * + * Filename: irlap.h + * Version: + * Description: in this file you can only find define´s for parts + * of the irlap-layer. If you want read the typedef´s + * for struct´s look into irda.h + * Status: Experimental. + * Author: Thomas Schneider + * Created at: + * Modified at: + * Modified by: Thomas Schneider + * + * Copyright (c) 1999 Thomas Schneider, All Rights Reserved. + * + * 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 2 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. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * IN NO EVENT SHALL THOMAS SCHNEIDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THOMAS SCHNEIDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THOMAS SCHNEIDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER + * IS ON AN "AS IS" BASIS, AND THOMAS SCHNEIDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR + * MODIFICATIONS. + * + * This material is provided "AS-IS" and at no charge. + * + ********************************************************************/ +/* + * in this file you can only find define´s for parts + * of the irlap-layer. If you want read the typedef´s + * for struct´s look into irda.h + */ + +#ifndef __IRLAP_H +#define __IRLAP_H + +#include + + +#define IRDA_XBOF 0xFF +#define IRDA_BOF 0xC0 +#define IRDA_EOF 0xC1 + +/* + * IrLAP-OFFSETS + * ------------- + */ +#define IRLAP_A_OFF 0x00 +#define IRLAP_C_OFF 0x01 +#define IRLAP_I_OFF 0x02 + +/* + * IrLAP-DEFINES + * ------------- + */ +#define IRLAP_XBOF 0xFF +#define IRLAP_BOF 0xC0 +#define IRLAP_EOF 0xC1 +#define IRLAP_CE 0x7D +#define IRLAP_ESC IRLAP_CE + +#define IRLAP_ESC_MASK (~0xDF) + +#define IRLAP_A_LENGTH 1 +#define IRLAP_C_LENGTH 1 +#define IRLAP_FCS_LENGTH 2 +#define IRLAP_EOF_LENGTH 1 + +#define IRLAP_C_MASK 0x03 +#define IRLAP_U_FRAME 0x03 +#define IRLAP_S_FRAME 0x01 +#define IRLAP_PF_BIT_MASK (~0xEF) +#define IRLAP_PF_BIT_CLR_MASK (~0x10) +#define IRLAP_Nr_CLR_MASK 0x1F + +/* + * IRLAP U cmd/response + * -------------------- + * - all defines use a cleared P/F-Bit + * (irlap_frame -> c & IRLAP_PF_BIT_CLR_MASK) + * - page 26 in IrLAP-spec + * - if no _CMD or _RSP name is _CMD_RSP (e.g. 0x83) + */ +#define IRLAP_SNRM_RNRM 0x83 +#define IRLAP_DISC_RD 0x43 +#define IRLAP_UI_UI 0x03 +#define IRLAP_XID_CMD 0x2F +#define IRLAP_TEST_TEST 0xE3 +#define IRLAP_UA_RSP 0x63 +#define IRLAP_FRMR_RSP 0x87 +#define IRLAP_DM_RSP 0x0F +#define IRLAP_XID_RSP 0xAF + +/* + * IRLAP S cmd/response + * -------------------- + * - all defines use a cleared P/F-Bit and cleared Nr + * (irlap_frame -> c & IRLAP_PF_BIT_CLR_MASK & IRLAP_Nr_CLR_MASK) + * - page 32 in IrLAP-spec + * - for both (cmd and response) the same mask is defined + */ +#define IRLAP_RR 0x01 +#define IRLAP_RNR 0x05 +#define IRLAP_REJ 0x09 +#define IRLAP_SREJ 0x0D + + +/* + * irlap-connection-states + * ----------------------- + * - negotation defines are also conn-states + */ +#define IRLAP_DISC 0x00 /* disconnected */ +#define IRLAP_NDM 0x01 /* normaldisconnect mode */ +#define IRLAP_NRM 0x02 /* normal response mode */ + +/* + * negotation-defines + * ------------------ + */ +/* negotation-states */ +#define NEG_SNRM_OK 0x01 +#define NEG_WAIT_FOR_UA 0x02 +#define NEG_UA_OK 0x03 +#define NEG_COMPLETE 0x04 + +#define B576000 576000 +#define B1152000 1152000 + +#define IRLAP_SNRM_SRC_ADR 0x00 /* src in SNRM */ +#define IRLAP_SNRM_DEST_ADR 0x04 /* dest in SNRM */ +#define IRLAP_SNRM_CONN_ADR 0x08 /* connection-adr in SNRM */ +#define IRLAP_UA_SRC_ADR 0x00 /* src in UA */ +#define IRLAP_UA_DEST_ADR 0x04 /* dest in UA */ +#define IRLAP_NEG_SNRM_PARAM_OFF 0x09 /* src(U32) dest(U32) adr(8) */ +#define IRLAP_NEG_UA_PARAM_OFF 0x08 /* src(U32) dest(U32) */ +#define IRLAP_NEG_BPS_PI 0x01 /* IrLAP page 39 */ +#define IRLAP_PI_LENGTH 1 /* no more longer used */ +#define IRLAP_PL_LENGTH 1 /* no more longer used */ + +/* + * defines for decode xid-cmd + * -------------------------- + */ +#define XID_C_FI_OFFSET 0x00 /* offset for format identifier (U8) */ +#define XID_C_SRC_ADR_OFF 0x01 /* offset for source address (U32) */ +#define XID_C_DEST_ADR_OFF 0x05 /* offset for dest address (U32) */ +#define XID_C_DISC_F_OFF 0x09 /* offset for discovery flags (U8) */ +#define XID_C_SLOT_NR_OFF 0x0A /* offset for slot number (U8) */ +#define XID_C_VERSION_OFF 0x0B /* offset for version (U8) */ +#define XID_C_DISC_I_OFF 0x0C /* offset for discovery information */ +#define XID_C_FLAG_TRUE 0x01 /* flags in cmd only if FI == 0x01 */ +#define XID_C_F_SLOT_MASK 0x03 /* mask for slot numbers in di-flag */ +#define XID_C_F_NEW_ADR_M 0x04 /* mask for new device-address-gen. */ +#define XID_C_LAST_SLOT 0xFF /* nr. for last slot in xid-cmd */ +#define XID_C_DISC_I_M_L 0x20 /* max length of discovery info */ +#define XID_C_DI_S_H_OFF 0x0C /* 1. service hint offset in disc-inf */ +#define XID_C_DI_S_H_EX_M 0x07 /* serv.hint extent. mask in disc_inf */ + +/* + * defines for decode xid-rsp + * -------------------------- + */ +#define XID_R_FI_OFFSET 0x00 /* offset for format identifier (U8) */ +#define XID_R_SRC_ADR_OFF 0x01 /* offset for source address (U32) */ +#define XID_R_DEST_ADR_OFF 0x05 /* offset for dest address (U32) */ +#define XID_R_DISC_F_OFF 0x09 /* offset for discovery flags (U8) */ +#define XID_R_SLOT_NR_OFF 0x0A /* offset for slot number (U8) */ +#define XID_R_VERSION_OFF 0x0B /* offset for version (U8) */ +#define XID_R_DISC_I_OFF 0x0C /* offset for discovery information */ +#define XID_R_FLAG_TRUE 0x01 /* flags in rsp only if FI == 0x01 */ +#define XID_R_F_SLOT_MASK 0x03 /* mask for slot numbers in di-flag */ +#define XID_R_F_NEW_ADR_M 0x04 /* mask for new device-address-gen. */ +#define XID_R_LAST_SLOT 0xFF /* nr. for last slot in xid-cmd/rsp */ +#define XID_R_DISC_I_M_L 0x20 /* max length of discovery info */ +#define XID_R_DI_S_H_OFF 0x0C /* 1. service hint offset in disc-inf */ +#define XID_R_DI_S_H_EX_M 0x07 /* serv.hint extent. mask in disc_inf */ +#define XID_R_SNIFF_FRAME 0xFFFFFFFF /* dest address for sniffing */ + +/* + * defines for snrm-cmd + * -------------------- + */ +#define SNRM_CMD_RESET_LEN 0x00 /* no i-field is present */ +#define SNRM_EST_CONNECT_ADR 0xFF /* conn.adr. in case con.establish */ +#define SNRM_C_SRC_ADR_OFF 0x00 /* offset for source address (U32) */ +#define SNRM_C_DEST_ADR_OFF 0x04 /* offset for dest address (U32) */ +#define SNRM_C_N_C_ADR_OFF 0x08 /* new conn. adr. offset (U8) */ +#define SNRM_C_NEG_OFF 0x09 /* negotation-fields offset */ +#define SNRM_BPS_PI 0x01 /* bps-pi */ +#define SNRM_MAX_TAT_PI 0x82 /* max. turn around time pi */ +#define SNRM_DATA_SIZE_PI 0x83 /* data size pi */ +#define SNRM_WIN_SIZE_PI 0x84 /* window size pi */ +#define SNRM_ADD_BOF_PI 0x85 /* addition BOFs pi */ +#define SNRM_MIN_TAT_PI 0x86 /* min. turn around time pi */ +#define SNRM_LD_TT_PI 0x08 /* link disc./threshold time pi */ + +/* + * defines for ua-rsp-frame + * ------------------------ + */ +#define UA_CONNECT_MIN_LENGTH 0x0E /* 14 are min length to use the frame + * for response to snrm used to + * establish a connection - look at + * page 39 - negotation: type 0 params + * must be negotiated at both stations + * bps and link disc/threshold time - + * in this case also src and dest are + * used ( 4 + 4 + 3 + 3), page 31 */ +#define UA_WITH_SRC_DST_LEN 0x08 /* ua len with src and dest */ +#define UA_SRC_ADR_OFF 0x00 /* offset for source address (U32) */ +#define UA_DEST_ADR_OFF 0x04 /* offset for dest address (U32) */ +#define UA_NEG_OFF 0x08 /* negotation-fields offset */ +#define UA_BPS_PI 0x01 /* bps-pi */ +#define UA_MAX_TAT_PI 0x82 /* max. turn around time pi */ +#define UA_DATA_SIZE_PI 0x83 /* data size pi */ +#define UA_WIN_SIZE_PI 0x84 /* window size pi */ +#define UA_ADD_BOF_PI 0x85 /* addition BOFs pi */ +#define UA_MIN_TAT_PI 0x86 /* min. turn around time pi */ +#define UA_LD_TT_PI 0x08 /* link disc./threshold time pi */ + + +#endif /* __IRLAP_H */ + diff --git a/Docs/developers/other/sniffs/irda/tools/intercept/Makefile b/Docs/developers/other/sniffs/irda/tools/intercept/Makefile new file mode 100644 index 0000000..5737602 --- /dev/null +++ b/Docs/developers/other/sniffs/irda/tools/intercept/Makefile @@ -0,0 +1,72 @@ +# +#/********************************************************************* +# * +# * Filename: Makefile +# * Version: +# * Description: Makefile for irda_intercept +# * Status: Experimental. +# * Author: Thomas Schneider +# * Created at: Thomas Schneider +# * Modified at: Sun Jul 18 12:03:03 1999 +# * Modified by: Thomas Schneider +# * +# * Copyright (c) 1999 Thomas Schneider, All Rights Reserved. +# * +# * 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 2 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. +# * +# * You should have received a copy of the GNU General Public License +# * along with this program; if not, write to the Free Software +# * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +# * +# * IN NO EVENT SHALL THOMAS SCHNEIDER BE LIABLE TO ANY PARTY FOR +# * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES +# * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN +# * IF THOMAS SCHNEIDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +# * DAMAGE. +# * +# * THOMAS SCHNEIDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, +# * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +# * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER +# * IS ON AN "AS IS" BASIS, AND THOMAS SCHNEIDER HAS NO OBLIGATION TO +# * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR +# * MODIFICATIONS. +# * +# * This material is provided "AS-IS" and at no charge. +# * +# ********************************************************************/ + +# +# Serial port for communication +# + +MODEMDEVICE=-DMODEMDEVICE="\"/dev/ttyS1\"" + +COMMON=-Wall -O2 \ + ${MODEMDEVICE} + +all: irda_intercept + + +irda_intercept: irda_intercept.o ../fcs/fcs.o + cc ${COMMON} \ + `gtk-config --cflags` `gtk-config --libs`\ + irda_intercept.o ../fcs/fcs.o\ + -o irda_intercept + +irda_intercept.o: irda_intercept.c ../include/irda.h ../include/irlap.h + cc ${COMMON} \ + `gtk-config --cflags` \ + -c irda_intercept.c + +../fcs/fcs.o: ../fcs/fcs.c ../fcs/fcs.h + cc ${COMMON} \ + `gtk-config --cflags` \ + -c $*.c -o $@ diff --git a/Docs/developers/other/sniffs/irda/tools/intercept/irda_intercept.c b/Docs/developers/other/sniffs/irda/tools/intercept/irda_intercept.c new file mode 100644 index 0000000..1381418 --- /dev/null +++ b/Docs/developers/other/sniffs/irda/tools/intercept/irda_intercept.c @@ -0,0 +1,613 @@ +/********************************************************************* + * + * Filename: irda_intercept.c + * Version: + * Description: intercept irda-traffic incl. negotation and write + * output to a file + * Status: Experimental. + * Author: Thomas Schneider + * Created at: + * Modified at: + * Modified by: Thomas Schneider + * + * Copyright (c) 1999 Thomas Schneider, All Rights Reserved. + * + * 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 2 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. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * IN NO EVENT SHALL THOMAS SCHNEIDER BE LIABLE TO ANY PARTY FOR + * DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES + * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN + * IF THOMAS SCHNEIDER HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH + * DAMAGE. + * + * THOMAS SCHNEIDER SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING, + * BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND + * FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER + * IS ON AN "AS IS" BASIS, AND THOMAS SCHNEIDER HAS NO OBLIGATION TO + * PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR + * MODIFICATIONS. + * + * This material is provided "AS-IS" and at no charge. + * + ********************************************************************/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "../include/irda.h" +#include "../include/irlap.h" +#include "../fcs/fcs.h" + +#define INIT_BAUDRATE B9600 + +#define _POSIX_SOURCE 1 /* POSIX compliant source */ + +#define INITIAL_TIMEOUT 15 +#define DEFAULT_TIMEOUT 5 + +#define OUTFILE_SUFFIX ".trc" +#define DEFAULT_OUTFILE "out"OUTFILE_SUFFIX + +static int initfdflags = -1; /* Initial file descriptor flags */ +static struct termios old_port_sets; /* old port-termios for restore */ + +int port_fd; + +NEGOTATION_PARAM negotation_param; +CONNECTION connection; + +static speed_t speed_list[8] = { B2400, B9600, B19200, B38400, + B57600, B115200, B576000, B1152000 }; +static const char *speed_name[] = { "2400", "9600", "19200", "38400", + "57600", "115200", "576000", "1152000"}; + +/* + * negotation + * ---------- + * - in negotation set new device speed + */ +void negotation ( IRLAP_FRAME * irlap_frame ) +{ + BYTE cmd = irlap_frame -> a & 0x01; + speed_t new_speed = 0; + int i = 0; + int m = 0; + struct termios set; + BYTE tmp = 0; + + /* + * snrm-frame + * ---------- + * - 4 src + * - 4 dest + * - 1 new connection address + * - 1 pi + * - 1 pl + * - [pl] pv + * ua-frame + * -------- + * - 4 src + * - 4 dest + * - 1 pi + * - 1 pl + * - [pl] pv + */ + + if ( cmd ) { + /* + * SNRM - CMD + * ---------- + * - in IrLAP (V. 1.1) page 27 + * - U32 : src-dev-adr + * - U32 : dest-dev-adr + * - U8 : connection address + * - start of neg. params + */ + if ( irlap_frame -> info_length < ( IRLAP_NEG_SNRM_PARAM_OFF +3 ) ) { + printf ("\t==> IrLAP: in SNRM-CMD no Info! <==\n"); + } else { + memcpy ( &connection.p_src_adr, + &(irlap_frame -> info[IRLAP_SNRM_SRC_ADR]), + sizeof(connection.p_src_adr)); + memcpy ( &connection.s_src_adr, + &(irlap_frame -> info[IRLAP_SNRM_DEST_ADR]), + sizeof(connection.s_src_adr)); + connection.conn_adr = irlap_frame -> info[IRLAP_SNRM_CONN_ADR]; + if ( irlap_frame -> info[IRLAP_NEG_SNRM_PARAM_OFF] == + IRLAP_NEG_BPS_PI ) { + /* really bps-parameter-identifier */ + if ( irlap_frame -> info[IRLAP_NEG_SNRM_PARAM_OFF + 1] == 1 ) { + negotation_param.baud_rate_master = + irlap_frame -> info [IRLAP_NEG_SNRM_PARAM_OFF + 2]; + negotation_param.state = NEG_WAIT_FOR_UA; + } else { + printf ("\t==> IrLAP: SNRM-CMD: speed in 2 bytes! <==\n"); + printf ("\t\t==> IrLAP: my max. speed is 115.2 kbps! <==\n"); + negotation_param.baud_rate_master = + irlap_frame -> info [IRLAP_NEG_SNRM_PARAM_OFF + 3]; + } + } else { + printf ("\t==> IrLAP: SNRM-CMD: " + "No baud rate dictate in 1. byte! <==\n"); + } + } + } else { + /* UA -rsp */ + negotation_param.baud_rate_client = irlap_frame -> info [10]; + negotation_param.state = NEG_UA_OK; + + /* now compute the new speed */ + tmp = + negotation_param.baud_rate_master & negotation_param.baud_rate_client; + if ( tmp & 0x01 ) { + new_speed = speed_list[i]; + m = 0; + } + for ( i=1; i < 7; i++) { + tmp = tmp >> 1; + if ( tmp & 0x01 ) { + new_speed = speed_list[i]; + m = i; + } + } + if ( m > 5 ) { + /* not defined as B... on my system */ + printf ("Sorry: Required speed (%s baud) not supported!\n", + speed_name[m]); + } else { + printf ("New speed is: %s\n", speed_name[m]); + /* now set the new speed */ + tcgetattr (port_fd, &set); + cfsetospeed(&set, new_speed); + cfsetispeed(&set, new_speed); + tcsetattr(port_fd, TCSANOW, &set); + tcgetattr(port_fd, &set); + if ( (cfgetospeed(&set) != new_speed) || + (cfgetispeed(&set) != new_speed) ) { + printf ("New speed is not set!\n"); + } + } + } +} + +/* + * decode_irlap_frame + * ------------------ + * - decode the irlap-c-field + */ +void decode_irlap_frame ( IRLAP_FRAME * irlap_frame) +{ + BYTE cmd = irlap_frame -> a & 0x01; + BYTE poll = irlap_frame -> c & (IRLAP_PF_BIT_MASK); + BYTE adr = (irlap_frame -> a) >> 1; + + switch ( irlap_frame -> c & IRLAP_C_MASK ) { + case IRLAP_U_FRAME: + printf ("U-Frame:\tAdr: %02X Nr: %02X ", adr, + (irlap_frame -> c & 0xE0) >> 5); + printf ("P/F: %X \t\t", poll >> 4); + switch (irlap_frame -> c & IRLAP_PF_BIT_CLR_MASK ) { + case IRLAP_SNRM_RNRM: + /* SNRM cmd/RNRM response */ + if ( cmd ) { + printf ("SNRM cmd\n"); + switch (connection.irlap_state) { + case IRLAP_DISC: + printf ("\t==> IrLAP in DISC but SNRM-CMD? <==\n"); + break; + case IRLAP_NDM: + printf ("\t==> Start IrLAP - negotation <==\n"); + negotation ( irlap_frame ); + break; + case IRLAP_NRM: + printf ("\t==> IrLAP in NRM but SNRM-CMD? <==\n"); + break; + default: + printf ("\t==> IrLAP in not defined state but SNRM-CMD? <==\n"); + } + } else { + printf ("RNRM response\n"); + } + break; + case IRLAP_DISC_RD: + /* DISC cmd/RD response */ + if ( cmd ) { + printf ("DISC cmd\n"); + } else { + printf ("RD response\n"); + } + break; + case IRLAP_UI_UI: + /* UI cmd/UI response */ + if ( cmd ) { + printf ("UI cmd\n"); + } else { + printf ("UI response\n"); + } + break; + case IRLAP_XID_CMD: + /* XID cmd */ + printf ("XID cmd\n"); + if ( connection.irlap_state == IRLAP_DISC ) { + connection.irlap_state = IRLAP_NDM; + printf ("\t==> Set IrLAP-state to:" + "NDM (normal disconnected mode) <==\n"); + } + break; + case IRLAP_TEST_TEST: + /* Test cmd/response */ + if ( cmd ) { + printf ("TEST cmd\n"); + } else { + printf ("TEST response\n"); + } + break; + case IRLAP_UA_RSP: + /* UA response */ + printf ("UA response\n"); + switch (connection.irlap_state) { + case IRLAP_DISC: + printf ("\t==> IrLAP in DISC but UA-RESPONSE? <==\n"); + break; + case IRLAP_NDM: + if ( negotation_param.state == NEG_WAIT_FOR_UA ) { + printf ("\t==> Continue IrLAP - negotation! <==\n"); + negotation ( irlap_frame ); + } else { + printf ("\t==> IrLAP in NDM but not wait for negotation! <==\n"); + } + break; + case IRLAP_NRM: + printf ("\t==> UA: IrLAP was/is in NRM ... <==\n"); + break; + default: + printf ("\t==> IrLAP in not defined state but UA-RESPONSE? <==\n"); + } + break; + case IRLAP_FRMR_RSP: + /* FRMR response */ + printf ("FRMR response\n"); + break; + case IRLAP_DM_RSP: + /* DM response */ + printf ("DM response\n"); + break; + case IRLAP_XID_RSP: + /* XID response */ + printf ("XID response\n"); + break; + default: + /* unknown cmd/response */ + printf ("Unknown IrLAP-U-Frame\n"); + } /* end of irlap-u-frames */ + break; + case IRLAP_S_FRAME: + printf ("S-Frame:\tAdr: %02X Nr: %02X ", adr, + (irlap_frame -> c & 0xE0) >> 5); + printf ("P/F: %X \t\t", poll >> 4); + switch ( irlap_frame -> c & + (IRLAP_PF_BIT_CLR_MASK & IRLAP_Nr_CLR_MASK) ) { + case IRLAP_RR: + /* RR command/response */ + if ( cmd ) { + printf ("RR cmd\n"); + } else { + printf ("RR response\n"); + } + break; + case IRLAP_RNR: + /* RNR cmd/response */ + printf ("RNR cmd/response\n"); + break; + case IRLAP_REJ: + /* REJ cmd/response */ + printf ("REJ cmd/response\n"); + break; + case IRLAP_SREJ: + /* SREJ cmd/response */ + printf ("SREJ cmd/response\n"); + break; + default: + /* unknown cmd/response */ + printf ("Unknown IrLAP-S-Frame\n"); + } /* end of irlap-s-frames */ + break; + default: + printf ("I-Frame:\tAdr: %02X Nr: %02X ", adr, + (irlap_frame -> c & 0xE0) >> 5); + printf ("\tP/F: %X\t", poll >> 4); + printf ("Ns: %02X \t", (irlap_frame -> c & 0x0E) >> 1); + printf ("Information\n"); + } +} + +/* unwrap_raw_frame + * ---------------- + * - put raw-frame-datas in irlap-frame + */ +void unwrap_raw_frame ( RAW_FRAME * raw_frame ) +{ + IRLAP_FRAME irlap_frame; + BYTE * info_ptr; + + bzero ( &irlap_frame, sizeof(irlap_frame) ); + + irlap_frame.a = raw_frame -> buf[IRLAP_A_OFF]; + irlap_frame.c = raw_frame -> buf[IRLAP_C_OFF]; + irlap_frame.fcs = raw_frame -> buf [(raw_frame -> length) -2] << 8; + irlap_frame.fcs |= raw_frame -> buf [(raw_frame -> length) -1]; + + irlap_frame.info_length = raw_frame -> length - + IRLAP_A_LENGTH - IRLAP_C_LENGTH - IRLAP_FCS_LENGTH; + + info_ptr = g_malloc ( irlap_frame.info_length * sizeof (BYTE) ); + memcpy ( info_ptr, &(raw_frame -> buf[IRLAP_I_OFF]), + irlap_frame.info_length); + irlap_frame.info = info_ptr; + decode_irlap_frame ( &irlap_frame ); + g_free(info_ptr); + + printf ("IrLAP: FCS: %04X \n\n", irlap_frame.fcs ); + +} + +/* + * cleanup_termios + * --------------- + * - call on some signals from signalhandler + * - before end set the original setting + */ +void cleanup_termios ( int signal ) +{ + tcsetattr(port_fd, TCSANOW, &old_port_sets); + exit (0); +} + +/* + * init_port + * --------- + * - get original port-settings and store it + * - set new port-settings + */ +void init_port ( void ) +{ + struct termios new_port_sets; + + /* get the original settings and store it for restore */ + tcgetattr( port_fd, &old_port_sets); + + /* init new settings */ + bzero(&new_port_sets, sizeof(new_port_sets)); + new_port_sets.c_cflag = INIT_BAUDRATE | CRTSCTS | CS8 | CLOCAL | CREAD; + new_port_sets.c_iflag = IGNBRK | IGNPAR; + new_port_sets.c_oflag = 0; + + /* set input mode (non-canonical, no echo,...) */ + new_port_sets.c_lflag = 0; + + /* inter-character timer unused x0.1s */ + new_port_sets.c_cc[VTIME] = 0; + /* blocking read until 5 chars received */ + new_port_sets.c_cc[VMIN] = 1; + + /* set the port now */ + tcflush(port_fd, TCIFLUSH); + tcsetattr(port_fd, TCSANOW, &new_port_sets); +} + +/* + * main + * ---- + * - output-file and port open + * - get/set port settings + * - dataread-loop + */ +int main( int argc, char * argv[] ) +{ + struct sigaction sact; /* signalhandle */ + GString *outfile_name = g_string_new(DEFAULT_OUTFILE); /* outfile name */ + FILE *outfile; /* outfile FILE */ + fd_set ready; /* for select */ + struct timeval timeout; /* select-timeout */ + int no_timeout = 1; /* timeout reached */ + int nr_read = 0; /* byte readed */ + unsigned char in_buffer[255]; /* temp. buffer */ + RAW_FRAME raw_frame; /* a raw frame */ + int is_inframe = FALSE; /* loop in frame */ + int frame_complete = FALSE; /* frame complete */ + int done = 0; /* loop control */ + int i = 0; /* for-index */ + int nr_of_bytes = 0; /* total bytes */ + int nr_of_frames = 0; /* total frames */ + int irlap_bytes = 0; /* w/o BOF etc. */ + BYTE must_escaped = FALSE; /* after CE = 0x07 */ + U16 fcsrx = INIT_FCS; /* for fcs-comput. */ + BYTE nr_esc = 0; /* nr of CE's */ +//CONNECT_STATISTIC statistic; /* statistic */ +//OUTPUT_PARAMS output_params; /* output-control */ + + /* + * Open the serial device + */ + if ( (port_fd = open( MODEMDEVICE, O_NONBLOCK | O_RDWR)) < 0 ) { + printf ( "Failed to open %s!\n", MODEMDEVICE); + exit(1); + } + + /* + * get/set device fd flags + */ + if ( (initfdflags = fcntl( port_fd, F_GETFL)) == -1 ) { + printf ( "Couldn't get device fd flags for: %s!", MODEMDEVICE); + exit(1); + } + initfdflags &= ~O_NONBLOCK; + fcntl( port_fd, F_SETFL, initfdflags); + + init_port(); + + /* + * set signal-handler + */ + sact.sa_handler = cleanup_termios; + sigaction( SIGHUP, &sact, NULL); + sigaction( SIGINT, &sact, NULL); + sigaction( SIGPIPE, &sact, NULL); + sigaction( SIGTERM, &sact, NULL); + + /* + * Set device for non-blocking reads. + */ + if ( fcntl( port_fd, F_SETFL, initfdflags | O_NONBLOCK) == -1) { + printf ("Couldn't set device to non-blocking mode (%s)!\n", MODEMDEVICE); + exit(1); + } + + /* + * output-file-handling + */ + if ( argc < 2 ) { + printf ("Use default OutPutFile: %s\n", outfile_name -> str); + } else { + g_string_assign(outfile_name, argv[1]); + g_string_append(outfile_name, OUTFILE_SUFFIX); + printf ("Use OutPutFile: %s\n", outfile_name -> str); + } + if ( (outfile = fopen( outfile_name -> str, "wb")) == NULL ) { + printf ("Failed to open OutPutFile: %s\n", outfile_name -> str); + exit (1); + } + + /* + * initial timeout + * --------------- + * - wait 15 seconds + */ + timeout.tv_sec = INITIAL_TIMEOUT; + timeout.tv_usec = 0; + + /* + * init raw-frame, negotation-struct, connection + */ + bzero(&raw_frame, sizeof(raw_frame)); + bzero(&negotation_param, sizeof(negotation_param)); + bzero(&connection, sizeof(connection)); + + /* hope we have no irda traffic in moment */ + connection.irlap_state = IRLAP_DISC; + + /* + * now make the data-read-loop + */ + do { + FD_ZERO(&ready); + FD_SET(port_fd, &ready); + no_timeout = select(port_fd + 1, &ready, NULL, NULL, &timeout); + if ( FD_ISSET(port_fd, &ready) ) { + /* data on port - returns after 16 chars have been input */ + nr_read = read(port_fd, in_buffer, 16); + nr_of_bytes = nr_of_bytes + nr_read; + if ( nr_read >= 1 ) { + /* write all readed bytes to file */ + fwrite( in_buffer, 1, nr_read, outfile); + /* process every single byte */ + for (i=0; i < nr_read; i++) { + if (raw_frame.length < (4096-1) ) { + switch ( in_buffer[i] ) { + case IRLAP_XBOF: + if ( is_inframe ) { + /* + * no - its not a XBOF we are inside a frame + * broadcast in xid for example + */ + irlap_bytes++; + fcsrx = IR_FCS(fcsrx, in_buffer[i]); + is_inframe = TRUE; + raw_frame.buf[raw_frame.length] = in_buffer[i]; + } + break; + case IRLAP_BOF: + is_inframe = TRUE; + break; + case IRLAP_EOF: + frame_complete = TRUE; + is_inframe = FALSE; + break; + case IRLAP_CE: + must_escaped = TRUE; + is_inframe = TRUE; + nr_esc++; + break; + default: + is_inframe = TRUE; + if ( must_escaped ) { + fcsrx = IR_FCS(fcsrx, (in_buffer[i] ^ IRLAP_ESC_MASK) ); + raw_frame.buf[raw_frame.length] = + (in_buffer[i]^IRLAP_ESC_MASK); + must_escaped = FALSE; + } else { + fcsrx = IR_FCS(fcsrx, in_buffer[i]); + raw_frame.buf[raw_frame.length] = in_buffer[i]; + } + irlap_bytes++; + } + raw_frame.length = irlap_bytes; + if ( frame_complete ) { + /* now raw-frame is complete */ + if ( fcsrx != GOOD_FCS ) { + printf (" **** !!! FCS-ERROR !!! ****\n"); + } else { + unwrap_raw_frame ( &raw_frame ); + } + nr_of_frames++; + /* reset all to defaults */ + raw_frame.length = 0; + raw_frame.a_offset = 0; + frame_complete = FALSE; + fcsrx = INIT_FCS; + nr_esc = 0; + irlap_bytes = 0; + } + } + } + } else { + printf ("No data to read - why?\n"); + done = 1; + } + } + /* + * reset timeout - wait 5 seconds + */ + timeout.tv_sec = DEFAULT_TIMEOUT; + timeout.tv_usec = 0; + if ( ! no_timeout ) { + printf ("TimeOut!\nConnection summary:\n-------------------\n"); + printf ("Total nr of received bytes : %i\n", nr_of_bytes); + printf ("Total nr of received frames: %i\n", nr_of_frames); + done = 1; + } + } while ( ! done ); + + g_string_free(outfile_name, TRUE); + fclose (outfile); + tcsetattr(port_fd, TCSANOW, &old_port_sets); + exit(0); +} diff --git a/Docs/developers/other/sniffs/sniffing.txt b/Docs/developers/other/sniffs/sniffing.txt new file mode 100644 index 0000000..e109bdb --- /dev/null +++ b/Docs/developers/other/sniffs/sniffing.txt @@ -0,0 +1,21 @@ + +All this software was created from observating other programs - what they +send to/from phone. There two methods to dump transmission: + +1.hardware + + You have to connect RxD (or TxD) and GND pin from the COM port, you use with + phone, to the second COM port. Then you run soft, which will show, what is + received by second port (now in win32 with enabled debug it can be + "gnokii --sniff port") + + TIP: if you want to sniff MBUS, connect RxD (everything, what goes from + TxD is repeated on RxD) + +2.software + + You run emulator of OS, where program work. Then using emulator functions + see, what is send (emulator is between phone and program, isn't it ?). + +When you have transmission, try to find some identical sequences. If you will +have them, try to find each frame format... \ No newline at end of file diff --git a/Docs/developers/protocol/n6110.txt b/Docs/developers/protocol/n6110.txt new file mode 100644 index 0000000..afd92e4 --- /dev/null +++ b/Docs/developers/protocol/n6110.txt @@ -0,0 +1,859 @@ + +Last update 23.02.2002 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Assembled by + Balazs Nagy (js@lsc.hu) + Harri Yli-Torkko (hyt@surfeu.fi) + Alfred R. Nurnberger + Hugh Blemings + Mike Bradley + Odinokov Serge + Pavel Janik + BORBELY Zoltan (bozo@andrews.hu) + Pawel Kot + Marcin Wiacek (Marcin-Wiacek@TOPNET.PL) + ... and other members of gnokii mailing list + and authors of some WWW pages. + +The data provided is for information purposes only. +Some of the frames might be hazardous to your phone. Be careful!!! +We do not take any responsibility or liability for damages, etc. + +NOTE: this information isn't (and can't be) complete. If you know anything +about features not listed here or you noticed a bug in this list, please +notify us via e-mail. Thank you. + +Document describing frames used in +GSM/PCN Nokia 6110 and derivatives (Nokia 6130, 6150, 6190, 5110, 5130, 5150, +5190, 3210, 3310) +Correct format is FBUS version 2/Direct IRDA/MBUS version 2 +(see nokia.txt for protocol details): + + List: + +0x00: Monitoring values + r monitoring value {+0x01, 0x01, block... } + where block: 0x5e, 0x05, 0x7a(?), 0xd0(?), 0x85(?), 0x02, percentHI, percentLO + Battery percent level + 0x5e, 0x0c, 0x52(?), 0x4b(?), 0x6f(?), 0x02, voltageHI, voltageLO + Battery standby voltage + ............ +0x01: Call Information + s Make call { 0x0001, "number", type, block } + where type: + 0x01 - data call + 0x05 - voice call + block: + data call (non digital lines): + 0x02,0x01,0x05,0x81,0x01,0x00,0x00,0x01,0x02,0x0a, + 0x07,0xa2,0x88,0x81,0x21,0x15,0x63,0xa8,0x00,0x00 + data call (digital lines): + 0x02,0x01,0x05,0x81,0x01,0x00,0x00,0x01,0x02,0x0a, + 0x07,0xa1,0x88,0x89,0x21,0x15,0x63,0xa0,0x00,0x06, + 0x88,0x90,0x21,0x48,0x40,0xbb + voice call: + 0x01, 0x01, 0x05, 0x81/0x00, sendnum, 0x00, 0x00, 0x01 + where: + sendnum (own number sending): + 0x01: preset (depends on network) + 0x03: on + 0x02: off + r Call going msg { 0x0002 } + r Call in progress { 0x0003, seqnr } + r Remote end hang up { 0x0004, seqnr, ?, error (like in netmon in 39) } + r incoming call alert { 0x0005, seqnr, numlen, "number", namelen, "name" } + s Answer call part 2 { 0x0006, seqnr, 0x00 } + r answered call { 0x0007, seqnr } + s Hang up { 0x0008, seqnr, 0x85 } + r terminated call { 0x0009, seqnr } + r call msg { 0x000a, seqnr } + r call held { 0x0023, seqnr, 0x01 } + r call resumed { 0x0025, seqnr, 0x01 } + r Send DTMF/voice call { 0x0040} + s Answer call part 1 { 0x0042,0x05,0x01,0x07,0xa2,0x88,0x81,0x21,0x15,0x63,0xa8,0x00,0x00, + 0x07,0xa3,0xb8,0x81,0x20,0x15,0x63,0x80 } + s Sent after issuing { 0x0042,0x05,0x81,0x07,0xa1,0x88,0x89,0x21,0x15,0x63,0xa0,0x00,0x06, + data call 0x88,0x90,0x21,0x48,0x40,0xbb,0x07,0xa3, + (digital lines) 0xb8,0x81,0x20,0x15,0x63,0x80 } + s Sent after issuing { 0x0042,0x05,0x01,0x07,0xa2,0xc8,0x81,0x21,0x15,0x63,0xa8,0x00,0x00, + data call 0x07,0xa3,0xb8,0x81,0x20,0x15,0x63,0x80, + (non digital lines) 0x01,0x60 } + s Send DTMF { 0x0050, length, {ascii codes for DTMF}, 0x01 } + + Note: + to make data call (non digital lines): + 1.send "Make call" for non digital lines + 2.send "Sent after issuing data call (non digital lines)" + to make data call (digital lines): + 1.send "Answer call part 1" + 2.send "Sent after issuing data call (digital lines)" + 3.send "Make call" for digital lines + to answer call: + 1.send "Answer call part 1" + 2.send "Answer call part 2" + +0x02: SMS handling + s Send SMS message { 0x0001, 0x02, 0x00 (SEND REQUEST), ... } + r Message sent { 0x0002 } + r Send failed { 0x0003, ?, ?, error (like in netmon in 65)} + s Get SMS message { 0x0007, 0x02, location, 0x01, 0x64 } + s Initiate connection { 0x000d, 0x00, 0x00, 0x02 } + r Initiate ACK { 0x000e, 0x01 } + r SMS message received { 0x0010, ...... } (whole message) + s Set CellBroadcast { 0x0020, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01 } + for enable cell broadcast ? + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } + for disable cell broadcast ? + r Set CellBroadcast OK { 0x0021, 0x01 } + r Read CellBroadcast { 0x0023, ?, ?, ?, channel, ?, message... } ? + s Set SMS center { 0x0030, 0x64, priority, checksum? ,0?, format, + validity, {DefaultRecipient no.}[12], + {SMScenter no.}[12], {SMSC name}, 0x00} + where tel.no.[12]: {len, type, {number(BCD)}} + type: 0x81: normal + 0x91: + (international) + 0xd0: alphanumeric + format: 0x00: text + 0x22: fax + 0x24: voice + 0x25: ERMES + 0x26: paging + 0x31: X.400 + 0x32: email + validity: 0x0b: 1 hour + 0x47: 6 hours + 0xa7: 24 hours + 0xa9: 72 hours + 0xad: 1 week + 0xff: max.time + r Set SMS center OK { 0x0031 } + r Set SMS center error { 0x0032, reason } + s Get SMS center { 0x0033, 0x64, priority } + r SMS center received { 0x0034, priority, checksum?, format, 0x00?, + validity, {DefaultRecipient no.}[12], + {SMScenter no.}[12], {SMSC name}, 0x00} + tel.no[12]: {len, type, {number(BCD)}} + where priority, checksum, type, validity, + tel.no.[12]: see 0x02/0x0030 + r SMS center error recv { 0x0035, reason } +0x03: Phonebook functions + s Get mem location { 0x0001, memtype, location, 0 } + where memory: + 0x01: telephone and SIM phonebook (in one) + 0x02: telephone phonebook + 0x03: SIM phonebook + 0x04: SIM fixdialling-phonebook (?) + 0x05: Own numbers + 0x07: Dialled numbers + 0x08: Missed calls + 0x09: Received calls + 0x0b: voice mailbox (location not important) + r mem location recvd { 0x0002, 0x00,namelen,"name",numlen,"number",groupID, 0x01?, yearLO, yearHI, month, day, hour, minute, sec. } + Note: in 3310 all entries have null name ("feature" of bug ?) + r mem loc error recvd { 0x0003, errtype } + where errtype: 0x7d: invalid memory type + s Set mem location { 0x0004, memtype,location,namelen,"Name",numlen,"number",groupID } + r mem set OK { 0x0005 } + r mem set error { 0x0006, errtype } + where errtype: 0x7d: name is too long + s Mem status request { 0x0007, memtype } + r Mem status recvd { 0x0008, memtype, free, used } + r Mem status error recv { 0x0009, errtype } + where errtype: 0x6f: mem status error + 0x7d: invalid memory type + 0x8d: waiting for pin + s Get caller group data { 0x0010, groupID } + r Get caller group data { 0x0011, groupID, size, "Name", ringtoneID, graphic_on?1:0, lenHI, lenLO, OTABitmap (72x14 logo) } + r Get call.group error { 0x0012, reason } + where reason: 0x7d: invalid location + s Set caller group data { 0x0013, groupID, size, "Name", ringtoneID, graphic_on?1:0, lenHI, lenLO, OTABitmap (72x14 logo) } + r Set caller group OK { 0x0014 } + r Set call.group error { 0x0015, reason } + where reason: 0x7d: invalid location + s Get speed dial { 0x0016, index(1-9) } + r Get speed dial OK { 0x0017, mem.type, location } + where mem.type: 0x02: ME (== 0 if not stored) + 0x03: SIM + location: memory location (== 0 if not stored) + r Get speed dial error { 0x0018 } + s Set speed dial { 0x0019, index(1-9), mem.type, location } + r Set speed dial OK { 0x001a } + r Set speed dial error { 0x001b } +0x04: Phone Status + s Phone status { 0x0001 } + r Phone status { 0x0002, mode, signal str, ???, pwr, batt.level } + where mode: 1: registered within the network + 2: call in progress + 3: waiting for pin + 4: powered off + pwr: 1: AC/DC + 2: battery + s Request Phone ID { 0x0003 } + r RequestPhone ID { 0x0004, 0x01,"NOKIA""imei", 0, "model", 0, "prod.code", 0, "HW", 0, "firmware", 0x00, 0x01 } +0x05: Profile settings + s Set profile feature { 0x0010, 1, nr, feature, a, 1 } + where nr: see 0x05/0x0013 + feature: see 0x05/0x0014 + a: see 0x05/0x0014 + r Set profile feat. OK { 0x0011, 1 } + s Get profile feature { 0x0013, 1, nr, feature, 1 } + where nr is profile number (general=0, silent, meeting, outdoor, pager, car, headset=6) + feature: see 0x05/0x0014 + r Get profile feature { 0x0014, 1, nr, feature, 4, a, b, c, d, 1 } + + Note: For Nokia 3330 settings num 0x00 .. 0x09 can be assigned + separately to each profile (0x00 .. 0x05), but rest are common + to all profiles. + + Features and answers (in a, b, c, d form): + 0x00: keypad notes (in Nokia 33x0 feature 0x00) + xx, 1, 0, 2 + xx: 0xff: off + 0x00: level 1 + 0x01: level 2 + 0x02: level 3 + 0x01: lights (? only in car profile) (what number in Nokia 3310 ?) + xx, 0, 0, 1 + xx: 0x00: off + 0x??: on (maybe 0x01) + 0x02: incoming call alert (in Nokia 33x0 feature 0x01) + xx, 1, 0, 7 + xx: 1: ringing, + 2: beep once, + 3: unknown + 4: off + 5: ring once + 6: ascending + 7: caller groups (see feature #0x08) + 0x03: ringing tone (in Nokia 33x0 feature 0x02) + xx, 0, 0, 0 + xx: 0x12: ring ring + 0x13: low + etc + 0x04: ringing volume (in Nokia 33x0 feature 0x03) + xx, 0, 0, 0 + xx: level 1 (0x06) - level 5 (0x0a) + 0x05: message alert tone (in Nokia 33x0 feature 0x04) + xx, 1, 0, 4 + xx: 0: no tone + 1: standard + 2: special + 3: beep once + 4: ascending + 0x06: vibration (in Nokia 33x0 feature 0x05) + xx: 0: off + 1: on + 2: Vibrate first + 0x07: warning and game tones (in Nokia 33x0 feature 0x06 called warning tones) + xx, 4, 0, 4 + xx: 0xff: off + 0x04: on + 0x07: screen saver - Nokia 33x0 + xx: 1: on + 0: off + 0x08: incoming caller groups (what number in Nokia 3310 ?) + xx, 0, 0, 0 + xx: 1: family + 2: VIP + 4: friends + 8: collegues + 16: other + 0x08: Screen saver -> Timeout (Nokia 33xx): + 0x00 = 5 sec + 0x01 = 20 sec + .... + + 0x09: automatic answer (what number in Nokia 3310 ?) + xx, 0, 0, 1 + xx: 0x00: off + 0x01: on + + 0x09: Screen saver -> Screen saver (Nokia 33xx): + 0x00 ... 0x0d = Number of picture image + + 0x0a: ???: + ...: ???: + 0x15: ???: Read only? + + 0x16: ???: + 0x00 = ??? + 0x01 = ??? + + 0x17: Phone book -> Options -> Memory in use (Nokia 3330): + 0x00 = Phone + 0x01 = SIM card + + 0x18: Settings -> Phone settings -> Network selection (Nokia 3330): + 0x00 = Automatic + 0x01 = Manual + + 0x19 Settings -> Call settings -> Automatic redial(Nokia 3330): + 0x00 = Off + 0x01 = On + + 0x1a: Settings -> Call settings -> Speed dialling (Nokia 3330): + 0x00 = Off + 0x01 = On + + 0x1b: Settings -> Call settings -> Own number sending (Nokia 3330): + 0x00 = Set by network + 0x01 = On + 0x02 = Off + + 0x1c: Settings -> Phone settings -> Cell info display (Nokia 3330): + 0x00 = Off + + 0x1d: Phone book -> Options -> Type of view (Nokia 3330): + 0x00 = Name list + 0x01 = Name, number + 0x02 = Large font + + 0x1e: Settings -> Phone settings -> Language (Nokia 3330): + 0x00 = English + 0x07 = Dansk + 0x08 = Svenska + 0x09 = Suomi + 0x0c = Turcke + 0x0e = Norsk + 0x10 = Automatic + + 0x32 = Reboots ME (3330) + + 0x1f: ???: Read only? (3330) + + 0x20: Messages -> Message settings -> Common -> Reply via same centre (N3330): + 0x00 = No + 0x01 = Yes + + 0x21: Messages -> Message settings -> Common -> Delivery reports (3330): + 0x00 = No + 0x01 = Yes + + 0x22: Clock -> Clock settings -> Show/Hide clock (3330): + 0x00 = Show + 0x01 = Hide + + 0x23: Clock -> Clock settings -> Time format (N3330): + 0x00 = 24-hour + 0x01 = 12-hour + + 0x24: Select profile (N3330): + 0x00 = General + 0x01 ... 0x05 = rest of them + + 0x25: ???: Read only? (N3330) + + 0x26: Settings -> Phone settings -> Confirm SIM service actions (N3330): + 0x00 = Not asked + 0x01 = Asked + + 0x27: Messages -> Write messages -> Options -> Dictionary (N3330): + 0x00 = Off + 0x01 = English + 0x0a = Suomi + + 0x28: Messages -> Message settings -> Common -> Character support (N3330): + 0x00 = Automatic + 0x01 = GSM alphabet + 0x02 = Unicode + + 0x29: Startup logo settings (N33x0): + 0x00 = Your own uploaded logo + 0x01 = Nokia + 0x02 = Draft HUMAN technology(tm) + 0x03 = Itineris + + 0x2a:???: 0x00 = ??? 0x01 = ??? (N3330) + + 0x2b: ???: 0x00 = ??? 0x01 = ??? (N3330) + + 0x2c: ???: Read only? (N3330) + + 0x2d: Clock -> Auto update of date and time (N3330): + 0x00 = Off + 0x01 = Confirm first + 0x02 = On + + s Get welcome message { 0x0016 } + r Get welcome message { 0x0017, no.of blocks, { block } * } + where block: { id, {blockspecific} } + id: 1: startup logo { y, x, picture (coding?) } + 2: welcome note { len, "message" } + 3: operator msg { len, "message" } + s Set welcome message { 0x0018, no.of blocks, { block } * } + where block: see 0x05/0x0017 + r Set welcome OK { 0x0019, 0x01 } + s Get profile name { 0x001a, nr } + where nr: see 0x05/0x0013 + r Profile name { 0x001b, 1, 1, 3, flen, nr, len, {text} } + where nr: see 0x05/0x0013 + len: text length + flen len + len(nr, len) = len + 2 + Note: in Nokia 3310 name is in Unicode + s ??? { 0x001c } + r ??? { 0x001d, 0x93 } + s Set oplogo { 0x0030, location, MCC1, MCC2, MNC, lenhi=0x00, lenlo=0x82, OTABitmap } + r Set oplogo OK { 0x0031 } + r Set oplogo error { 0x0032, reason } + where reason: 0x7d invalid location + s Get oplogo { 0x0033, location } + where location: 1 (doesn't seem to matter) + r Get oplogo { 0x0034, location, MCC1, MCC2, MNC, lenhi=0x00, lenlo=0x82, OTABitmap } + r Get oplogo error { 0x0035, reason } + where reason: 0x7d invalid location + s Set ringtone { 0x0036, location,0x00,0x78, ringtone packed according to SM2.0} + r Set ringtone OK { 0x0037 } + r Set ringtone error { 0x0038, reason } + where reason=0x7d, when not supported location + s Get services settings { 0x0080, setting (2 bytes) } + where: setting: 0x02,0x00=Nokia access number 1 + 0x02,0x01=Operator access number 1 + 0x01,0x00=Personal bookmark 1 settings (name only ?) + 0x01,0x01=? + 0x02,0x02=? + r Get services sett.OK { 0x0081, .... } + r Get services sett.err { 0x0082, 0x7b } +0x06: Calling line restriction/Call forwarding etc + r Get call divert { 0x0001, 0x02, x, 0x00, divtype, 0x02, calltype, y, z, 0x0b, number, 0x00...0x00, timeout (byte 45) } + s Set call divert { 0x0001, 0x03, 0x00, divtype, calltype, 0x01, number(packed like in SMS), 0x00 ... 0x00, + length of number (byte 29), 0x00 ... 0x00, timeout (byte 52), 0x00, 0x00, 0x00} + NOTE: msglen=0x37 + where timeout: + 0x00: not set ? + 0x05: 5 second + 0x0a: 10 second + 0x0f: 15 second + 0x14: 20 second + 0x19: 25 second + 0x1e: 30 second + where divtype: + 0x02: all diverts for all call types ? + Found only, when deactivate all diverts for all call types (with call type 0x00) + 0x15: all calls + 0x43: when busy + 0x3d: when not answered + 0x3e: if not reached + calltype: + 0x00: all calls (data, voice, fax) + 0x0b: voice calls + 0x0d: fax calla + 0x19: data calls + s Deactivate calldiverts{ 0x0001, 0x04, 0x00, divtype, calltype, 0x00 } + where divtype, calltype: see above + s Get call diverts { 0x0001, 0x05, 0x00, divtype, calltype, 0x00 } + where divtype, calltype: see above + r Get prepaid(?) info { 0x0005, ?,?,?,length,message(packed like in 7bit SMS)} +0x07: + s ??? { 0x0022, ? (1&2 sounds OK) } + r ??? OK { 0x0023, ?,?,? } + r ??? error { 0x0024, reason } + s ??? { 0x0025, ??? } + r ??? OK { 0x0026, ??? } + r ??? error { 0x0027, reason } +0x08: Security codes + s Change code { 0x0004, code, "current", 0x00, "new", 0x00 } + where code: 1: security code (5 chars) + 2: PIN (4 chars) + 3: PIN2 (4 chars) + 4: PUK (8 chars) + 5: PUK2 (8 chars) + s Status request { 0x0007, 0x01 } + r pin recvd { 0x0008, accepted } + where accepted: 0x0c (or 0x06): OK + code: waiting for (0x08/0x0004) code + s entering code { 0x000a, code, "code", 0x00 } + where code: see 0x08/0x0004 +0x09: SIM login + r login { 0x0080 } + r logout { 0x0081 } +0x0a: Network status + s Key duplication on/off{ 0x0044, on? 0x01: 0x02 } + s get used network { 0x0070 } + r network registration { 0x0071, ?,?,?,length,netstatus,netsel,cellIDH,cellIDL,lacH,lacL,netcode,netcode,netcode } +0x0c: Keys + s Get key assignments { 0x0040, 0x01 } + r Get key assignments { 0x0041, {key '1'}, 0x00, {key '2'} ... {key '0'}, 0,0,0, {symbols}, 0 } + where {key '0'} => ' ', '0' + s Press key { 0x0042, press: 0x01; release: 0x02, button, 0x01 } + where button: 0x01 - 0x09: 1-9 + 0x0a: 0 + 0x0b: # + 0x0c: * + 0x0d: Power + 0x0e: Pick up phone + 0x0f: Hang + 0x10: Volume + + 0x11: Volume - + 0x17: Up + 0x18: Down + 0x19: Menu + 0x1a: Names + 0x1B onwards: don't know but they do produce + a beep and light up the keypad as if + a key had been pressed. + r Press key ack { 0x0043, press/release/error(0x05) } + s ??? { 0x0044 } + r ??? ack { 0x0045, 0x01 } +0x0d: Status + r Display { 0x0050, 0x01, y, x, len, "string"(unicode) } + s Status request { 0x0051 } + r Status { 0x0052, no. of byte pairs, {byte pair} } + where {byte pair}: {cmd, 1:off 2:on} + cmd: 1: call in progress + 2: ??? + 3: have unread sms + 4: voice call active + 5: fax call active + 6: data call active + 7: key lock active + 8: is SMS storage full + s Display status { 0x0053, 1:on 2:off } + (will send displayed messages with x,y coordinates) + r Display status ack { 0x0054, 1 } +0x11: Phone clock & alarm + s set date and time { 0x0060, 1,1,7,yearh,yearl,month,mday,hour,min,0x00 } + r date and time set { 0x0061 } + s get date and time { 0x0062 } + r date and time recvd { 0x0063,date_set?,time_set?,?,?,yearh,yearl,month,mday,hour,min,second } + where: date_set & time_set==0x01 - set + 0x00 - not set, ?,?,yearh,yearl,month,mday,hour,min,second + not available in frame + s set alarm { 0x006b, 1,32,3,0x02(on-off),hour,min,0x00 } + r alarm set { 0x006c } + s get alarm { 0x006d } + r alarm received { 0x006e,?,?,?,?,alrm(==2:on),hour,min } +0x12: Connect to NBS port (61xx only ?) + s Send {+0x0c, 0x01, UDH header, data} + (without 0,1 header -- for oplogo, cli, ringtone etc upload) + where: UDH header = 0x06, 0x05, 0x04,destporth,destportl,srcporth,srcportl +0x13: Calendar notes + s Write calendar note { 0x0064, 0x01, 0x10, length, type, yearH, yearL, month, day, hour, timezone, + alarm?(alarm yearH, yearL, month, day, hour, timezone): (0,0,0,0,0,0), + textlen, "text" } + r Write cal.note report { 0x0065, return } + where return: 0x01: ok + 0x73: failure + 0x81: calendar functions busy. Exit Calendar menu and try again + s Calendar notes set { 0x0066... } + r Calendar note recvd { 0x0067, 0x01, ?, length, type, yrH,yrL,mon,day,hr,tz,alrm yrH,yrL,mon,day,hr,tz,textlen, "text" } + r Cal.note recvd error { 0x0067, err } + where err: 0x93: not available + (0x01: OK) + other: error + s Delete cal.note { 0x0068, location } + r Del. cal.note report { 0x0069, err } + where err: 0x01: OK + 0x93: cannot delete +0x14: SMS funcs + s Write SMS to SIM { 0x0004, .... } + s Mark SMS as read { 0x0007, 0x02, location, 0x00, 0x64 } + r SMS message frame rcv { 0x0008,subtype,?,num,?,BCD(smscenter)...} 20->type, 22->status + where type: 0x06: delivery report + status: 0x00: delivered + 0x30: pending + 0x46: failed + 0x09: reading failed + subtype: 0x02: invalid mem type + 0x07: empty SMS location + 0x0c: no access to memory (no PIN in card, etc.) + s Delete SMS message { 0x000a, 0x02, location } + r Delete OK { 0x000b } + s SMS status request { 0x0036, 0x64 } + r SMS status { 0x0037,?,?,?,?,?,?,msgnumber,unread } + r SMS status error { 0x0038 } +0x3f: WAP + s Enable WAP frames { 0x0000} + r Enable WAP frames { 0x0002, 0x01} + + s ?? { 0x0003} + r ?? { 0x0004} + + s Get WAP bookmark { 0x0006, 0x00, location} + where location: 0 - 14 + r Get WAP bookmark { 0x0007, 0x00, name_len, name(unicode), + url_len, url(unicode), 0x01,0x80,0x00[7]} + r Get WAP bookmark err { 0x0008, error } + where error: + 0x00(?)invalid position + 0x01 user inside "Bookmarks" menu. Must leave it + 0x02 invalid/too high/empty location + + s Set WAP bookmark { 0x0009, 0xff, 0xff, name_len, name(unicode), + url_len, url(unicode), 0x01,0x80,0x00[7] } + Note: bookmark is added to the first free location. + r Set WAP bookmark OK {+0x01, 0x36, 0x0a, block } + where block: + 0x0a, location_of_just_written_bookmark(?), + 0x00, next_free_location(?) + r Set WAP bookmark err {+0x01, 0x36, 0x0b, error } + where error: + 0x04 - memory is full + 0x01 - we are in the bookmark menu + 0x00 - unknown reason for now ;( + +? s Delete WAP bookmark { 0x000c, 0x00, location } + where: location = 0-14 +? r Delete WAR bookmark OK{ 0x000d } +? r Delete WAPbookmark err{ 0x000e, 0x02 } + + s ?? { 0x000F} + r ?? { 0x0010, 0x00} + + s Get WAP settings 1 { 0x0015, location} + where location: 0x00 - 0x05 + r Get WAP settings 1 OK { 0x0016, title length, title (Unicode), URL length, URL(Unicode),con_type, ???[6 bytes],location, ???[5 bytes],security,...} + where: + con_type: 0x00 - temporary + 0x01 - continuous + location: when use "Get WAP settings 2 frame", must give it + security: 0x00 = no, 0x01 = yes + r Get WAP settings 1 err{ 0x0017, error } + where error: + 0x01 user inside "Settings" menu. Must leave it + 0x02 invalid/too high/empty location + + s Get WAP settings 2 { 0x001b, location} + where location: 0x00 - 0x1d (you get it in "Get WAP settings 1" frame) + r Get WAP settings 2 OK { 0x001c, 0x01, type, frame...} + where type : 0x00 - SMS bearer + frame: + service_num_len, service_num (Unicode), server_num_len, server_num(Unicode) + 0x01 - data bearer + frame: + auth, call_type, call_speed, ?, IP len, IP (Unicode), dialup len, dialup (Unicode), + user len, user (Unicode), password len, password (Unicode) + where auth: 0x00 - normal, 0x01 - secure + call_type: 0x00 - analogue, 0x01 - ISDN + call_speed: 0x00 - 9600, 0x01 - 14400 + 0x02 - USSD bearer + frame: type, service number len/IP len,service num (Unicode)/IP (Unicode),service code len, + service code (Unicode) + where type: 0x01 - service number, 0x00 - IP + r Get WAP settings 2 err{ 0x001d,error} + where: error=0x05 +0x40: Security commands + s ??? {+0x00, 0x00, 0x07, 0x11, 0x00, 0x10, 0x00, 0x00} + This frame hangs phone (N3310 4.02). Meaning unknown ! + s Open simlock 1 { 0x02, 0x03, 0x1f, 0x11, 0x01, 0x01, 0x10, 0x00} + r Open simlock 1 { 0x02 } + s ???(N6150) { 0x08, 0x00 } + r ???(N6150) { 0x08 } + s Enable extended cmds { 0x64, cmd } + where cmd: 0x00: off + 0x01: on + 0x02: enter service mode ? + 0x03: reset (doesn't ask for PIN again) + 0x04: reset (PIN is requested) + In 5110 makes reset without PIN + 0x06: CONTACT SERVICE!!! Don't try it! + s Reset phone settings { 0x65, value, 0x00 } + where value: 0x08 - reset UI (User Interface) settings + 0x38 - reset UI, SCM and call counters + r Reset phone settings { 0x65, 0x00 } + s Get IMEI { 0x66 } + r Get IMEI { 0x66, 0x01, IMEI, 0x00} + s (ACD Readings)?(N6150 { 0x68 } + r (ACD Readings)?(N6150 { 0x68, ... } + s Get Product Profile + Settings { 0x6a} + r Get Product Profile + Settings { 0x6a, 4bytes with Product Profile Settings } + s Set Product Profile + Settings { 0x6b, 4bytes with Product Profile Settings } + r Set Product Profile + Settings OK ? { 0x6b } + s Get code { 0x6e, code } + where code: see 0x08/0x0004 (only sec.code is allowed) + r Get code { 0x6e, code, allowed, allowed? (sec code (text)) } + where code: see 0x08/0x0004 + allowed: 0: no + 1: yes + s Set code { 0x6f, code, sec code(text), 0x00 } + where code: see 0x08/0x0004 + s Start monitoring { 0x70, block } + where block(N6150): + 0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xf9,0x76,0x65,0x20,0x00, + 0x00,0x00,0x00,0x00,0x18,0x26,0x15,0x7d,0x0a,0x00, + 0xf5,0x82,0x7f,0xff,0xff,0xff,0xff,0xff,0xff,0xff, + 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xf0,0x77,0x80, + 0x77,0x80,0xf2,0x82,0x20,0x20,0x20,0x20,0x20,0x20, + 0x20,0x20,0x20,0x20 + This block enables probably all possible monitorred parameters. + After it phone sends 0x00 message type values + s Break monitoring { 0x71 } + r Break monitoring { 0x71 } + s Reset Permanent + Counters (nm->test36) { 0x74, 0x01, 0x01, 0x0e } + r Reset Permanent + Counters (nm->test36) { 0x74 } + s Call commands { 0x7c, block } + where where: command, (values) + command: 0x01 + values: number(ASCII), 0x00 - makes voice call + command: 0x02 - answer call + command: 0x03 - release call + r Call commands { 0x7c, command } + s Netmonitor { 0x7e, field } + where: field: 00: next + F0: reset + F1: off + F2: field test menus + F3: developer menus + s Open simlock 2 { 0x81, 0x01, locknumber, 0x10, 0x10, 0x10, 0x10, 0x10 } + Note: sets simlock type to factory? + where locknumber: 1,2,4,8 + s Open simlock 2 { 0x81, 0x01, locknumber } + where locknumber: 1,2,4,8 + s Close simlock { 0x82, 0x01, locknumber, 0x00, 0x00, locksinfo(lock1,4,2,3), 0x00 } + where locknumber: 1,2,4,8 + r Close simlock { 0x82, the rest like in 0x40/0x8a } + s Get simlock info { 0x8a, 0x00} + r Get simlock info { 0x8a, 0x00, 0x01, lockstype, locksclosed, 0x00, 0x00, locksinfo(lock1,4,2,3), counter1,counter2,counter4,counter4,0x00 } + where: lockstype: bit1,bit2,bit3,bit4 - if set, selected lock is user lock + locksclosed: bit1,bit2,bit3,bit4 - if set, selected lock is closed + counter1 - counter4: counters for locks + s Set downloaded OpName { 0x8b, 0x00, MCC1, MCC2, MNC, Name, 0x00 } + r SetdownloadedOpNameOK?{ 0x8b, 0x00, 0x01 } + s Get downloaded OpName { 0x8c, 0x00 } + r Get downloaded OpName { 0x8c, 0x00, 0x01, MCC1, MCC2, MNC, Name, 0x00,...} + s Buzzer pitch { 0x8f, volume, hzLO, hzHI } + if volume and hz is 0, it's off + r Buzzer pitch { 0x8f} + s ACD Readings ? { 0x91, parameter?(0x02,0x03,0x04,0x05,0x07) } + r ACD Readings ? { 0x91, parameter?, value? } + s Sleep mode test { 0x92, 0x00, 0x00, howlong(2 bytes), enable } + where: enable == 0x01 - enable after test + 0x00 - don't enable after test + howlong (ms) = 0x07, 0xd0 = 2000 + s ???(N6150) { 0x98, 0x00 } + r ???(N6150) { 0x98, 0x00, 0x04 } + s Get bin ringtone { 0x9e, location } + where: location=0,1,etc. + r Get bin ringtone { 0x9e, location, error, contents... } + where location=0,1,etc. + error=0x0a, ringtone NOT available + 0x00, OK + s Set bin ringtone { 0xa0, location, 0x00, contenst... } + where: location=0,1,etc. + r Set bin ringtone { 0xa0, location, error } + where location=0,1,etc. + error=0x0a, ringtone NOT set + 0x00, ringtone set OK + r Get MSid { 0xb5, 0x01, 0x2f, msid, 0x25 } + s Get info about phone { 0xc8, 0x01 } + r Get info about phone { 0xc8, 0x01, 0x00, "V ", "firmware", 0x0a, "firmware date", 0x0a, "model", 0x0a, "(c) NMP.", 0x00 } + s Get MCU SW Checksum { 0xc8, 0x02 } + r Get MCU SW Checksum { 0xc8, 0x02, 0x00, checksum (4 bytes),0x00 } + s DPS External SW { 0xc7, 0x03 } + r DSP External SW { 0xc7, 0x03, 0x00, string,0x00 } + s Get HW { 0xc8, 0x05 } + r Get HW { 0xc8, 0x05, 0x00, HW version (4 bytes), 0x00 } + s Get "Made" Date { 0xc8, 0x05 } + r Get "Made" Date { 0xc8, 0x05, 0x00, date(4 bytes), 0x00 } + s Get DSP Internal SW { 0xc8, 0x09 } + r Get DSP Internal SW { 0xc8, 0x09, 0x00, version (1 bytes), 0x00 } + s Get PCI version { 0xc8, 0x0b } + r Get PCI version { 0xc8, 0x0b, 0x00, version, 0x00 } + s Get system ASIC { 0xc8, 0x0c } + r Get system ASIC { 0xc8, 0x0c, 0x00, string, 0x00 } + s Get COBBA { 0xc8, 0x0d } + r Get COBBA { 0xc8, 0x0d, 0x00, string, 0x00 } + s Get PLUSSA { 0xc8, 0x0e } + r Get PLUSSA { 0xc8, 0x0e, available, 0x00 } + where available: 0x01: not available + s Get CCONT { 0xc8, 0x0f } + r Get CCONT { 0xc8, 0x0f, available, 0x00 } + where available: 0x01: not available + s Get PPM version { 0xc8, 0x10 } + r Get PPM version { 0xc8, 0x10, 0x00, "V ", "firmware", 0x0a, "firmware date", 0x0a, "model", 0x0a, "(c) NMP.", 0x00 } + s Get PPM info { 0xc8, 0x12 } + r Get PPM info { 0xc8, 0x12, 0x00, PPM version ("B", "C", etc.), 0x00 } + s Set HW version { 0xc9, 0x05, version, 0x00 } + s Get Product Code { 0xca, 0x01 } + r Get Product Code { 0xca, 0x01, 0x00, number, 0x00 } + s Get Order Number { 0xca, 0x02 } + r Get Order Number { 0xca, 0x02, 0x00, string, 0x00 } + s Get Prod.Ser.Number { 0xca, 0x03 } + r Get Prod.Ser.Number { 0xca, 0x03, 0x00, number, 0x00 } + s Get Basic Prod.Code { 0xca, 0x04 } + r Get Basic Prod.Code { 0xca, 0x04, 0x00, number, 0x00 } + s Set Product Code { 0xcb, 0x01, product code, 0x00 } + s Set Order Number { 0xcb, 0x02, number, 0x00 } + s Set Prod.Ser.Number { 0xcb, 0x03, number, 0x00 } + s Get (original ?)IMEI { 0xcc, 0x01 } + r Get (original ?)IMEI { 0xcc, 0x01, IMEI, 0x00 } + s Get Manufacture Month { 0xcc, 0x02 } + r Get Manufacture Month { 0xcc, 0x02, 0x00, string, 0x00 } + s Get Purchare date { 0xcc, 0x04 } + r Get Purchare date { 0xcc, 0x04, 0x00, string, 0x00 } + s Set "Made" date { 0xcd, 0x02, string, 0x00 } + s Make "all" phone tests{ 0xce,0x1d,0xfe,0x23,0x00,0x00} + s Make one phone test { 0xce,0x1d,num1,num2,num3,num4} + Where num1-num4: 0x02,0x00,0x00,0x00; + 0x04,0x00,0x00,0x00; + 0x08,0x00,0x00,0x00; + 0x10,0x00,0x00,0x00; + 0x20,0x00,0x00,0x00; + 0x40,0x00,0x00,0x00; + 0x80,0x00,0x00,0x00; + 0x00,0x01,0x00,0x00; + 0x00,0x02,0x00,0x00; + 0x00,0x04,0x00,0x00; - "Power off" + No test for "Security data" + 0x00,0x10,0x00,0x00; + 0x00,0x20,0x00,0x00; + 0x00,0x40,0x00,0x00; + 0x00,0x80,0x00,0x00; + 0x00,0x00,0x01,0x00; + .... + 0x00,0x00,0x10,0x00; + s Result of phone tests { 0xcf } + r Result of phone tests { 0xcf, number of tests, results of next tests } + s ??? { 0xd1 } + r ???(N5110) { 0xd1, 0x00, 0x1d, 0x00, 0x01, 0x08, 0x00 } + s LCD Test { 0xd3, value } + where value: 0x03, 0x02 - 1'st test + 0x03, 0x01 - 2'nd test + 0x02, 0x03 - clears screen + s ACD Readings(N6150)? { 0xd4, 0x02, 0x00, 0x02, 0x00, 0x0e, 0x01} + r ACD Readings(N6150)? { 0xd4, 0x02, 0x00, 0x02, 0x00, 0x0e, 0x01, ?} + s Get EEPROM { 0xd4, 0x02, 0x00, 0xa0, locationLo, locationHi, numofbytes } + where: numofbytes - how many bytes to read + Note: Works ONLY in MBUS + r Get EEPROM { 0xd4, 0x02, 0x00, 0xa0, locationLo, locationHi, numofbytes, contest... } + where numofbytes - how many bytes available + contest - bytes with contests (if numofbytes != 0) +0x41: Snake game ? +0x47: + s Get Picture Image { 0x0001, location } + r Get Picture Image when contains sender number + { 0x0002, location, number(like in SMS), 0x00, len, text, 0x00, width, height, 0x01, bitmap } + NOTE: + Supports only 0x81 and 0x91 coding (NOT alphanumeric numbers!) + in sender without sender number + { 0x0002, location, 0x00, 0x00, 0x00, len, text, 0x00, width, height, 0x01, bitmap } + s Set Picture Image { 0x0003, frame...} + where frame: see 0x47/0x0002 + r Get/Set PictureImageOK{ 0x0004 } + r Set Picture Image err { 0x0005, error? } + where error=0x74 - wrong location ? +0x64: + s Phone ID request { 0x0010 } + r Phone ID recvd { 0x0011, "NOKIA", "imei", 0, "model", 0, "prod.code", 0, "HW", 0, "firmware", magic bytes x 4 ... } + s Accessory connection { 0x0012, 16x0x00, 'NOKIA&NOKIA accessory', 3x0x00 } (45 bytes) +0x7f: Acknowledge(FBUS/IRDA){+type, seq } + Acknowledge(MBUS)... +0xd0: + s Power on message seq1 {+04 } + r Power on message seq1 {+05 } +0xd1: + s Get HW&SW version { 0x0003, 0x00 } +0xd2: + r Get HW&SW version { 0x0003 "V " "firmware\n" "firmware date\n" + "model\n" "(c) NMP." } +0xda: ? (during playing 2 player snake) +0xf0: + s Send RLP frame {+0x00, 0xd9, ... } +0xf4: Power on message seq 2 diff --git a/Docs/developers/protocol/n7110.txt b/Docs/developers/protocol/n7110.txt new file mode 100644 index 0000000..2e051aa --- /dev/null +++ b/Docs/developers/protocol/n7110.txt @@ -0,0 +1,703 @@ + +Last update 16.02.2002 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Assembled by + Balazs Nagy (js@lsc.hu) + Marcin Wiacek (Marcin-Wiacek@TOPNET.PL) + Jens Bennfors + Michael Hund + Jay Bertrand + Gabriele Zappi + Markus Plail + Ralf Thelen + ... and other members of gnokii mailing list + and authors of some WWW pages. + +The data provided is for information purposes only. +Some of the frames might be hazardous to your phone. Be careful!!! +We do not take any responsibility or liability for damages, etc. + +NOTE: this information isn't (and can't be) complete. If you know anything +about features not listed here or you noticed a bug in this list, please +notify us via e-mail. Thank you. + +Document describing frames used in +GSM Nokia 6210 and derivatives (7110) +Correct format is FBUS version 2/Infrared/MBUS version 2 +(see nokia.txt for protocol details): + + List: + +0x00: Connect to NBS port ? + r Set ringtone {+0x7c,0x01,0x00,0x0d,0x06[6],0x78,ringtone packed according to SM2.0} + Seems not to work in MBUS! +0x01: Communication Status +? r Call msg { 0x0002 } +? r Call in progress { 0x0003, seqnr } +? r Remote end hang up { 0x0004, seqnr, ?, error (like in netmon in 39) } +? r incoming call alert { 0x0005, seqnr, numlen, "number", namelen, "name" } +? r answered call { 0x0007, seqnr } +? r terminated call { 0x0009, seqnr } +? r call msg { 0x000a, seqnr } + Note: in 6210 4.27 all msg from 0x01 seems to be unavailable +0x02: SMS handling + s Send SMS message { 0x0001, 0x02, 0x00 (SEND REQUEST), ... } + r Message sent { 0x0002 } + r Send failed { 0x0003, ?, ?, error (like in netmon in 65)} + s Incoming SMS info on { 0x000d, 0x00, 0x00, 0x02} + note: no info about Delivery Reports + r Incoming SMS info onOK{ 0x000e } + note: no info about Delivery Reports + r Incoming SMS infoonerr{ 0x000f, error } + where error: 0x0c - no PIN + r SMS message received { 0x0011, ...... } (whole message) + s Set CellBroadcast { 0x0020, 0x01, 0x01, 0x00, 0x00, 0x01, 0x01 } + for enable cell broadcast ? + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 } + for disable cell broadcast ? + r Set CellBroadcast OK { 0x0021, 0x01 } + r Read CellBroadcast { 0x0023, ?, ?, ?, channel, ?, message... } ? + s Set SMS center { 0x0030, 0x64, priority, checksum?, format, + validity[2], {DefaultRecipient no.}[12], + {SMScenter no.}[12], {SMSC name}, 0x00} + where tel.no.[12]: {len, type, {number(BCD)}} + type: 0x81: normal + 0x91: + (international) + 0xd0: alphanumeric + format: 0x00: text + 0x22: fax + 0x24: voice + 0x25: ERMES + 0x26: paging + 0x31: X.400 + 0x32: email + validity: 0x000b: 1 hour + 0x0047: 6 hours + 0x00a7: 24 hours + 0x00a9: 72 hours + 0x00ad: 1 week + 0x00ff: max.time + r Set SMS center OK { 0x0031 } + r Set SMS center error { 0x0032, reason } + s Get SMS center { 0x0033, 0x64, priority } + r SMS center received { 0x0034, priority, checksum?, type, + validity[2], {DefaultRecipient no.}[12], + {SMScenter no.}[12], {SMSC name}, 0x00 } + where priority, checksum, type, validity, + tel.no.[12]: see 0x02/0x0030 + r SMS center error recv { 0x0035, reason } + s?? { 0x0074} + r?? { 0x0075, 0xFF, 0x11, 0x98} + s?? { 0x008C} + r?? { 0x008D, 0x00} +0x03: Phonebook functions + s Get memory status { 0x0103, 0x02, memory type } + where: memory type - see 0x03/0x0107 + r Get memory status { 0x0104, 0x00, xL, 0x00[2], y1H, y1L, 0x10, + 0x00[2], z?, ymaxH, ymaxL, y2H, y2L, + 0x0d?, xH?, 0x00[2]? } + where y1: location (lowermost) + y2: no. of locations + ymax: maximum location no. + s Read memory { 0x0107, 0x01, 0x01, 0x00, 0x01, xH, xL, + yH, yL, 0x00, 0x00} + where x: memory type + 0x01: (256) Dialled numbers + 0x02: (512) Missed calls + 0x03: (768) Received calls + 0x05: (500) telephone phonebook + 0x06: (160) SIM phonebook + 0x07: (10/0) + 0x08: (1/0) + 0x09: (4) voice mailbox + 0x0e: (10) speed dials + 0x10: (5) caller groups + y: location + r Read memory error { 0x0108, 0x00, 0x01, + code,0x00, 0x00, z, error} + where code==0x0f + error: 0x34 - phonebook location not found + 0x3b - speed dial not assigned + r Read memory OK { 0x0108, 0x00, 0x01, + code,0x00, 0x00, z, xH, xL, yH, yL, 0x00, 0x00, 0x00, no.of blocks, { block } * } + where code: != 0x0f + y: location + z: generic block size + block: {id, 0, 0, blocksize, block no., + {contents}, 0x00} + id: 0x04 pointer to another memory location { 0xff?, yH, yL, xL,0x00[3] } + 0x07 name {len, (unicode)}, + 0x08 email + 0x09 postal + 0x0a note {len, (unicode)} + 0x0b number {type, 0x00[3], len, (unicode)} + 0x0c ringtone {ringtone no., 0, 0} + 0x13 date for a called list (DC, RC, etc.) + 0x1b caller group graphic {width, height, 0, 0 {bitmap}} + 0x1c caller group graphic on? {(1: yes, 0: no), 0, 0} + 0x1e caller group number {number, 0, 0} + type: 0x0a: General, + 0x03: Mobile (office ?), + 0x06: Work, + 0x04: Fax, + 0x02: Home (mobile ?) + s Set mem location { 0x010b, 0x00, 0x01, 0x01, 0x00, 0x00, z, + xH, xL, yH, yL, 0x00, 0x00, 0x00, + no.of blocks, { block }[no.of blocks] } + r Set mem location { 0x010c, 0?, 1?, code, 0?, 0?, z?, 0?, 0?, + yH, yL, xL } + where code: + 0x3d - wrong entry type + 0x3e - too much entries + s Delete mem location { 0x010f, 0x00, 0x01, 0x04, 0x00, 0x00, 0x0c, 0x01, 0xff, xH, xL, + yH, yL, 0x00, 0x00} + where x: location + y: memory type + r Delete mem location { 0x0110, 0x00, 0x00 } +0x06: Calling line restriction/Call forwarding etc + r Get call divert { 0x0001, 0x02, x, 0x00, divtype, 0x02, calltype, y, z, 0x0b, number, 0x00...0x00, timeout (byte 45) } + s Set call divert { 0x0001, 0x03, 0x00, divtype, calltype, 0x01, number(packed like in SMS), 0x00 ... 0x00, + length of number (byte 29), 0x00 ... 0x00, timeout (byte 52), 0x00, 0x00, 0x00} + NOTE: msglen=0x37 + where timeout: + 0x00: not set ? + 0x05: 5 second + 0x0a: 10 second + 0x0f: 15 second + 0x1e: 20 second + 0x14: 25 second + 0x19: 30 second + where divtype: + 0x02: all diverts for all call types ? + Found only, when deactivate all diverts for all call types (with call type 0x00) + 0x15: all calls + 0x43: when busy + 0x3d: when not answered + 0x3e: if not reached + calltype: + 0x00: all calls (data, voice, fax) + 0x0b: voice calls + 0x0d: fax calla + 0x19: data calls + s Deactivate calldiverts{ 0x0001, 0x04, 0x00, divtype, calltype, 0x00 } + where divtype, calltype: see above + s Get call diverts { 0x0001, 0x05, 0x00, divtype, calltype, 0x00 } + where divtype, calltype: see above +0x0a: Network status + s get used network { 0x0070 } + r get used network { 0x0071, available,?,?,length,netstatus,netsel,cellIDH, + cellIDL,lacH,lacL,MCC+MNC[3],{Opstr}, 4?, + len, xlen(78), ylen(21), 0, {bitmap} } + where {Opstr}: namelen, {operator name(unicode)} + len: {xlen, ylen, 0, {bitmap} + 2 + {bitmap}: bitmaplen, 0, 0, {OTA bitmap} + available: 0x02 if the logo following is valid, + 0x01 for no operator logo following + s get network status { 0x0081 } + r get network status { 0x0082, network%, 0x14? } + s set operator logo { 0x01a3 0x01, oplogo?, MCC+MNC[3], 0?,4?,len, + xlen(78),ylen(21), 0 (frames?), + {bitmap}*?, 0x00(padding) } + where len, {bitmap}: see 0x0a/0x0071 + r set operator logo OK { 0x01a4 } + s clear operator logo { 0x00af, x} + where x==0 to 4 + r clear operator logo { 0x00bf} +0x13: Calendar notes + s Add meeting note { 0x0001, body like in subtype 0x001a...} + r Add meeting note { 0x0002, location (2 bytes), status (2 bytes)} + s Add call note { 0x0003, body like in subtype 0x001a...} + r Add call note { 0x0004, location (2 bytes), status (2 bytes)} + s Add birthday note { 0x0005, location (2 bytes), entry type, 0x00, year of birth(2 bytes), + Month, Day, 0x00, 0x00, alarm (4 bytes), alarm type, length, text (Unicode)} + r Add birthday note { 0x0006, location (2 bytes), status (2 bytes)} + s Add reminder note { 0x0007, body like in subtype 0x001a...} + r Add reminder note { 0x0008, location (2 bytes), status (2 bytes)} + s Delete calendar note { 0x000b, location (2 bytes) } + r Delete calendar note { 0x000c, location (2 bytes), ?, ?, ?, ? } + s Get calendar note { 0x0019, location (2 bytes) } + r Calendar note recvd { 0x001a, location (2 bytes), entry type, 0x00, year (2 bytes), Month, Day, block} + where: entry type - 0x01 - Meeting, 0x02 - Call, 0x04 - Birthday, 0x08 - Reminder + block: for Meeting:{hour,minute,alarm (two bytes),recurrance (two bytes),len,0x00,string(unicode)} + where alarm=Number of minutes before the time of the meeting + that the alarm should be triggered: + For meetings with "No alarm"=0xFFFF (-1). + For "On time"=0x0000 + half an hour=0x001E, and so on. + Recurrance=in hours, between future occurances of this meeting. + If there is no repeat, this value is 0x0000. The special value 0xffff + means 1 Year! + for Call:{Hour,Minute,Alarm (as above),Recurrance (as above),namelen,numberlen, + name(unicode),number(unicode)} + for Reminder:{Recurrance (as above),len,0x00,string(unicode)} + for Birthday:{byte1,byte2,alarm(4 bytes),yearofbirth,alarmtype,len,string(unicode)} + byte1 and byte2 may vary (???). Usually are 0x00 both (but not always) + In Birthday, the Year in the common part, usually contains a strange year. + So, don't consider it as Year of note, neither year of BirthDay (for Year of + Birthday use the value described below). + where alarm=32-bit integer that is the number of seconds between the desired + alarm time and 11:59:58pm on the birthday.For "No Alarm", the value is + 0x0000FFFF (65535). + YearOfBirth=used instead of the one in the common part of the entry (see above) + but only when reading birthday entries. For storing entries, this field does + not exist. + AlarmType: 0x00 - Tone, 0x01 - Silent +? s??? { 0x0021 } +? r??? { 0x0022, 0x5A, 0x00 } +? s??? { 0x0025 } +? r??? { 0x0026, 0x04, 0x00 } +? s { 0x0029 } +? r { 0x002A, 0x04, 0x00 } + s Get first free pos { 0x0031 } + r Get first free pos { 0x0032, location (2bytes) } + s Get notes info { 0x003a, 0xFF, 0xFE} + r Get notes info { 0x003b, how many notes used (2 bytes), 0x01, 0x07, { two bytes with location for each note} *} +? s Get calendar note?? { 0x003E, location (2 bytes) } +? r Get calendar note?? { 0x003F, location (2bytes), ... } +0x14: + s Get Picture Image { 0x0007, location, number[2 bytes], 0x00, 0x64 } + r Get Picture Image { 0x0008, 0x07, location, number[2 bytes], 0x07, ??[38], + width, height, lenH, lenL, {bitmap}, 0x00, 0x00, text len, text(coded like in SMS)...} + r Get SMS failed { 0x0009, 0x02 }, + s Get SMS status { 0x0036, 0x64 } + r Get SMS Status { 0x0037, 0x05/0x03, 0x01, 0x00, 0x00, + a (2 octets), b (2 octets), c (2 octets), + d (2 octets), e (2 octets), 0x00 + where: + a - according to P.Kot: + Number of locations in "fixed" memory. These are all + Templates entries in my Nokias 6210 (NPE-3 (c) NMP V05.36 + 14-11-01, NPE-3 (c) NMP V05.27 01-08-01). + I can't remove any of Templates entries in my phone. + Marcin Wi¥cek: Rather not ! I don't agree. + I have 0x00, 0x0f and 10 templates and 3 SMS + and 10 Picture Images. + b - Number of used messages in phone memory. These + are messages manually moved from the other folders. + Picture messages are saved here. + c - Number of unread messages in phone memory. Probably + only smart messsages. + d - Number of used messages in SIM memory. These are + either received messages or saved into Outbox/Inbox. + Note that you *can't* save message into this memory + using 'Move' option. Picture messages are not here. + e - Number of unread messages in SIM memory + + s Set Picture Image { 0x0050, 0x07, location, number[2 bytes], 0x07, ??[38], + width, height, lenH, lenL, {bitmap}, 0x00, 0x00, text len, text(coded like in SMS)...} + std. size: 72x28 + r Set Picture Image { 0x0051, location, number[2 bytes], 0x07 } + s Set SMS name { 0x0083,folder,location(2bytes),name(Unicode),0x00 , 0x00} + r Set SMS name { 0x0084,folder,0x00, 0x00, name (Unicode),0x00,0x00} + s List Picture Images { 0x0096, location, 0x0f, 0x07 } + where location: + LM tries with 0x09, 0x11, 0x19, 0x21, 0x29, 0x31, 0x39, 0x41, 0x49 + Returned value with 0x21 + r List Picture Images { 0x0097, number of pictures[2 bytes], number1[2 bytes], number2[2 bytes], ..., } + s Write SMS to folder { 0x0104, status, folder ID, location(2 bytes), 0x02, 0x01, SMS stuff ... } + r Write SMS to folder { 0x0105, folder ID, location(2 bytes), 0x00 } + r Write SMS to folder { 0x0106, 0x02 (write failed errorcode ?) } + s Get SMS from folder { 0x0107, folderID, location(2 bytes), 0x01, 0x65, 0x01} + where: folderID - see 0x14/0x017B + r Get SMS from folder { 0x0108, status, folderID, 0x00, location, type, sender number,...} + + where: status=0x01 - reveived/read + 0x03 - received/unread + 0x05 - stored/sent + 0x07 - stored/not sent + + where: folderID - see 0x14/0x017B + + where: type=0x00 - received SMS + 0x01 - delivery report + 0x02 - stored SMS + 0x07 - picture message + s Delete SMS message { 0x010a, folderID, location(2 bytes), 0x01 } + r Delete SMS { 0x010b } + s Get folder status { 0x016b, folderID, 0x0F, 0x01} + where: folderID - see 0x14/0x017B + r Get folder status { 0x016c, number of entries (2 bytes), entry1number (2 bytes), entry2number(2 bytes), ....} + s Get folder names { 0x017A, 0x00, 0x00} + r Get folder names { 0x017B, number of strings, folderID, name1, 0x00, folderID, name2, 0x00, name3, 0x00,...} + where: folderID=0x08 - Inbox + 0x10 - Outbox + 0x18 - Archive + 0x20 - Templates + 0x29 - first "My folders" + 0x31 - second "My folders" + 0x39 - third -"- + and so on +0x17: + s Get Battery info { 0x0002 } + r Get Battery info { 0x0003, 0x0b, batt%, 0x14?, 0x01? } +0x19: Phone clock & alarm + + These frames are like the same frames subtypes in 0x11 in 6110 + + s set date and time { 0x0060, 1,1,7,yearh,yearl,month,mday,hour,min,0x00 } + r date and time set { 0x0061 } + s get date and time { 0x0062 } + r date and time recvd { 0x0063,date_set?,time_set?,?,?,yearh,yearl,month,mday,hour,min,second } + where: date_set & time_set==0x01 - set + 0x00 - not set, ?,?,yearh,yearl,month,mday,hour,min,second + not available in frame + s set alarm { 0x006b, 1,32,3,0x02(on-off),hour,min,0x00 } + r alarm set { 0x006c } + s get alarm { 0x006d } + r alarm received { 0x006e,?,?,?,?,alrm(==2:on),hour,min } + + These are new (?) + +? s ?? { 0x0083, id } +? r ?? { 0x0084, 0x01, 0x40, 0x03, id, 0x00, 0x00 } +? r ?? { 0x0084, 0x01, 0x40, 0x03, id, 0x00, 0x01 } +? r ?? { 0x0084, 0x01, 0x40, 0x03, id, 0x01, 0x00 } + where: id=0x27,0x2a,0x32,0x28,0x40 +0x1b: + s Get IMEI { 0x0001 } + r Get IMEI { 0x0002, {IMEI(ASCII)}, 0x00 } + s get HW&SW version { 0x0003, 0x01, 0x32 } + r get HW&SW version { 0x0004, "V " "firmware\n" "firmware date\n" + "model\n" "(c) NMP." 0x00 0xff[14] } +0x1f: + s ??? { 0x0010, 0x02, 0x00, 0xff, 0xff } + r ??? { 0x0011, length, 0x00, {block}[length] } + where block: { unicode letter[2], 0x0000, + 0x00, 0x55, ??, ?? } + s Set ringtone { 0x011f, 0x00, location, 0x00, name(Unicode), + ringtone(format the same to 0x40/0x019e and 0x40/0x01a0) } + where: location: 0x87 to 0x8b on N6210 + 0x74 to ... on N7110 + s Get ringtone { 0x0122, 0x00, location} + r Get ringtone { 0x0123, 0x00, location, name(Unicode), 0x00,...,0x00, 0x02,0xFC,0x09(ringtone contenst)} + r Get ringtone error { 0x0124, ...} +0x39: + s get profile feature { 0x0101, 0x01, 0x01, 0x01, number1, number2} + where number1: from 0x00 to 0x07 (for each profile ?) + number2: 0x00 - 0x09, 0x0A, 0x16 - 0x19, 0x1a - 0x1f, 0x20 - 0x29, 0x2a - 0x2c, 0xff + where 0x09: keypad tones 0x02: incoming call alert 0x03: ringtone number + 0x04: ringing volume + 0x05: message alert tone 0x06: vibra 0x07: warning tones 0x08: caller groups alert for 0x09: automatic answer + 0xff: name + r get profile feature { 0x0102, 0x01, 0x02, number2, block...} + for number2==0xff: (Profile Name) + block: 0x01, length, name(Unicode), 0x00, 0x00 + for number2==0x00: (Keypad Tones) + block: 0x01, 0x01, 0x01, Type, 0x01 + where: Type : 0x00 = Off + 0x01 to 0x03 = Level1 .. Level3 + for number2==0x02: (Incoming Call Alert) + block: 0x01, 0x01, 0x01, Type, 0x01 + where: Type : 0x00 = Ringing + 0x01 = Ascending + 0x02 = Ring Once + 0x03 = Beep Once + 0x05 = Off + for number2==0x03: (Ringtone Number) + block: 0x01, 0x01, 0x01, Number, 0x01 + where: Number : 0x40 to 0x62 - gives number of factory ringtone. The number of menu is + obtained by doing (Number - 0x3f); + where: Number : 0x89 to 0x8d - gives number of uploaded ringtone. The number of menu is + obtained by doing (Number - 0x65),while the uploaded ringtone number is + obtained by doing (Number - 0x88). + for number2==0x04: (Ringing volume) + block: 0x01, 0x??, 0x??, Volume, 0x01 + where: Volume : 0 = Level1 .. to 4 = Level5 + for number2==0x05: (Message Alert Tone) + block: 0x01, 0x01, 0x??, Type, 0x01 + where: Type : 0x00 = Off + 0x01 = Standard + 0x02 = Special + 0x03 = Beep Once + 0x04 = Ascending + for number2==0x06: (Vibration) + block: 0x01, 0x??, 0x??, Switch, 0x01 + where: Switch : 0 = Off, 1 = On + for number2==0x07: (Warning Tones) + block: 0x01, 0x??, 0x??, Switch, 0x01 + where: Switch : 0 = Off, 1 = On + for number2==0x08: (Caller groups Alert for) + block: 0x01, 0x??, 0x??, Callers, 0x01 + where: Callers : 0xff = All calls alert (Read below *) + 0x01 = Family + 0x02 = VIP + 0x04 = Friends + 0x08 = Colleagues + 0x10 = Others + All logical OR among groups are valid, so if you select from one phone's profile + alert for Friends and Collegues, a 0x0c will return (because 0x04 OR 0x08 = 0x0c). + (*) If Callers==0xff, means "Alert for All calls". Then, in this case, you don't + need to read other groups selection. + for number2==0x09: (Automatic answer) + block: 0x01, 0x??, 0x??, Switch, 0x01 + where: Switch : 0 = Off, 1 = On + N.B. This feature is valid for Handsfree and Headset profiles only! + s ??? { 0x0101, 0x04, 0x01, 0x01, 0xff, 0x03 } + r ??? { 0x0102, 0x01, 0x02, 0x03, 0x01, 0x01, 0x01, 0x85/0x087 } + + s ? { 0x0105} + r ? { 0x0106, 0x01, 0x04} +0x3f: WAP + s Enable WAP frames { 0x0000} + r Enable WAP frames { 0x0002, 0x01} + + s ?? { 0x0003} + r ?? { 0x0004} + + s Get WAP bookmark { 0x0006, 0x00, location} + where location: 0 - 14 + r Get WAP bookmark { 0x0007, 0x00, name_len, name(unicode), + url_len, url(unicode), 0x01,0x80,0x00[7]} + r Get WAP bookmark err { 0x0008, error } + where error: + 0x00(?)invalid position + 0x01 user inside "Bookmarks" menu. Must leave it + 0x02 invalid/too high/empty location + + s Set WAP bookmark { 0x0009, 0xff, 0xff, name_len, name(unicode), + url_len, url(unicode), 0x01,0x80,0x00[7] } + Note: bookmark is added to the first free location. + r Set WAP bookmark OK {+0x01, 0x36, 0x0a, block } + where block: + 0x0a, location_of_just_written_bookmark(?), + 0x00, next_free_location(?) + r Set WAP bookmark err {+0x01, 0x36, 0x0b, error } + where error: + 0x04 - memory is full + 0x01 - we are in the bookmark menu + 0x00 - unknown reason for now ;( + +? s Delete WAP bookmark { 0x000c, 0x00, location } + where: location = 0-14 +? r Delete WAR bookmark OK{ 0x000d } +? r Delete WAPbookmark err{ 0x000e, 0x02 } + + s ?? { 0x000F} + r ?? { 0x0010, 0x00} + + s Get WAP settings 1 { 0x0015, location} + where location: 0x00 - 0x05 + r Get WAP settings 1 OK { 0x0016, title length, title (Unicode), URL length, URL(Unicode),con_type, ???[6 bytes],location, ???[5 bytes],security,...} + where: + con_type: 0x00 - temporary + 0x01 - continuous + location: when use "Get WAP settings 2 frame", must give it + security: 0x00 = no, 0x01 = yes + r Get WAP settings 1 err{ 0x0017, error } + where error: + 0x01 user inside "Settings" menu. Must leave it + 0x02 invalid/too high/empty location + s Get WAP settings 2 { 0x001b, location} + where location: 0x00 - 0x1d (you get it in "Get WAP settings 1" frame) + r Get WAP settings 2 OK { 0x001c, 0x01, type, frame...} + where type : 0x00 - SMS bearer + frame: + service_num_len, service_num (Unicode), server_num_len, server_num(Unicode) + 0x01 - data bearer + frame: + auth, call_type, call_speed, ?, IP len, IP (Unicode), dialup len, dialup (Unicode), + user len, user (Unicode), password len, password (Unicode) + where auth: 0x00 - normal, 0x01 - secure + call_type: 0x00 - analogue, 0x01 - ISDN + call_speed: 0x00 - 9600, 0x01 - 14400 + 0x02 - USSD bearer + frame: type, service number len/IP len,service num (Unicode)/IP (Unicode),service code len, + service code (Unicode) + where type: 0x01 - service number, 0x00 - IP + r Get WAP settings 2 err{ 0x001d,error} + where: error=0x05 +0x40: Security commands +? s ???(N6150) { 0x08, 0x00 } +? r ???(N6150) { 0x08 } + s Enable extended cmds { 0x64, cmd } + where cmd: 0x00: off + 0x01: on + 0x03: reset (doesn't ask for PIN again) + 0x04: reset (PIN is requested) + In 5110 makes reset without PIN + 0x06: CONTACT SERVICE!!! Don't try it! + s Get IMEI { 0x66 } + r Get IMEI { 0x66, 0x01, IMEI, 0x00} + s (ACD Readings)?(N6150 { 0x68 } + r (ACD Readings)?(N6150 { 0x68, ... } + s Get Product Profile + Settings { 0x6a} + r Get Product Profile + Settings { 0x6a, 4bytes with Product Profile Settings } + s Set Product Profile + Settings { 0x6b, 4bytes with Product Profile Settings } + r Set Product Profile + Settings OK ? { 0x6b } + s Get code { 0x6e, code } + where code: see 0x08/0x0004 (no allowed code !) + r Get code { 0x6e, code, allowed, allowed? (sec code (text)) } + where code: see 0x08/0x0004 + allowed: 0: no + 1: yes +? s Reset Permanent +? Counters (nm->test36) { 0x74, 0x01, 0x01, 0x0e } +? r Reset Permanent +? Counters (nm->test36) { 0x74 } + s Call commands { 0x7c, block } + where where: command, (values) + command: 0x01 + values: number(ASCII), 0x00 - makes voice call + command: 0x02 - answer call + command: 0x03 - release call + r Call commands { 0x7c, command } + s Netmonitor { 0x7e, field } + where: field: 00: next + F0: reset + F1: off + F2: field test menus + F3: developer menus + s Get simlock info { 0x8a, 0x00} + r Get simlock info { 0x8a, 0x00, 0x01, lockstype, locksclosed, 0x00, 0x00, locksinfo(lock1,4,2,3), counter1,counter2,counter4,counter4,0x00 } + where: lockstype: bit1,bit2,bit3,bit4 - if set, selected lock is user lock + locksclosed: bit1,bit2,bit3,bit4 - if set, selected lock is closed + counter1 - counter4: counters for locks + s Buzzer pitch { 0x8f, volume, hzLO, hzHI } + if volume and hz is 0, it's off + r Buzzer pitch { 0x8f} + s ACD Readings ? { 0x91, parameter?(0x02,0x03,0x04,0x05,0x07) } + r ACD Readings ? { 0x91, parameter?, value? } +? s ???(N6150) { 0x98, 0x00 } +? r ???(N6150) { 0x98, 0x00, 0x04 } + s Get bin ringtone { 0x9e, location } + where: location=0,1,etc. + r Get bin ringtone { 0x9e, location, error, contents... } + where location=0,1,etc. + error=0x0a, ringtone NOT available + 0x00, OK + s Set bin ringtone { 0xa0, location, 0x00, contenst... } + where: location=0,1,etc. + r Set bin ringtone { 0xa0, location, error } + where location=0,1,etc. + error=0x0a, ringtone NOT set + 0x00, ringtone set OK +? r Get MSid { 0xb5, 0x01, 0x2f, msid, 0x25 } + s Get info about phone { 0xc8, 0x01 } + r Get info about phone { 0xc8, 0x01, 0x00, "V ", "firmware", 0x0a, "firmware date", 0x0a, "model", 0x0a, "(c) NMP.", 0x00 } + s Get MCU SW Checksum { 0xc8, 0x02 } + r Get MCU SW Checksum { 0xc8, 0x02, 0x00, checksum (4 bytes),0x00 } + s DPS External SW { 0xc7, 0x03 } + r DSP External SW { 0xc7, 0x03, 0x00, string,0x00 } + s Get HW { 0xc8, 0x05 } + r Get HW { 0xc8, 0x05, 0x00, HW version (4 bytes), 0x00 } + s Get "Made" Date { 0xc8, 0x05 } + r Get "Made" Date { 0xc8, 0x05, 0x00, date(4 bytes), 0x00 } + s Get DSP Internal SW { 0xc8, 0x09 } + r Get DSP Internal SW { 0xc8, 0x09, 0x00, version (1 bytes), 0x00 } + s Get PCI version { 0xc8, 0x0b } + r Get PCI version { 0xc8, 0x0b, 0x00, version, 0x00 } + s Get system ASIC { 0xc8, 0x0c } + r Get system ASIC { 0xc8, 0x0c, 0x00, string, 0x00 } + s Get COBBA { 0xc8, 0x0d } + r Get COBBA { 0xc8, 0x0d, 0x00, string, 0x00 } + s Get PLUSSA { 0xc8, 0x0e } + r Get PLUSSA { 0xc8, 0x0e, available, 0x00 } + where available: 0x01: not available + s Get CCONT { 0xc8, 0x0f } + r Get CCONT { 0xc8, 0x0f, available, 0x00 } + where available: 0x01: not available + s Get PPM version { 0xc8, 0x10 } + r Get PPM version { 0xc8, 0x10, 0x00, "V ", "firmware", 0x0a, "firmware date", 0x0a, "model", 0x0a, "(c) NMP.", 0x00 } + s Get PPM info { 0xc8, 0x12 } + r Get PPM info { 0xc8, 0x12, 0x00, PPM version ("B", "C", etc.), 0x00 } + s Set HW version { 0xc9, 0x05, version, 0x00 } + s Get Product Code { 0xca, 0x01 } + r Get Product Code { 0xca, 0x01, 0x00, number, 0x00 } + s Get Order Number { 0xca, 0x02 } + r Get Order Number { 0xca, 0x02, 0x00, string, 0x00 } + s Get Prod.Ser.Number { 0xca, 0x03 } + r Get Prod.Ser.Number { 0xca, 0x03, 0x00, number, 0x00 } + s Get Basic Prod.Code { 0xca, 0x04 } + r Get Basic Prod.Code { 0xca, 0x04, 0x00, number, 0x00 } + s Set Product Code { 0xcb, 0x01, product code, 0x00 } + s Set Order Number { 0xcb, 0x02, number, 0x00 } + s Set Prod.Ser.Number { 0xcb, 0x03, number, 0x00 } + s Get (original ?)IMEI { 0xcc, 0x01 } + r Get (original ?)IMEI { 0xcc, 0x01, IMEI, 0x00 } + s Get Manufacture Month { 0xcc, 0x02 } + r Get Manufacture Month { 0xcc, 0x02, 0x00, string, 0x00 } + s Get Purchare date { 0xcc, 0x04 } + r Get Purchare date { 0xcc, 0x04, 0x00, string, 0x00 } + s Set "Made" date { 0xcd, 0x02, string, 0x00 } + s Make "all" phone tests{ 0xce,0x1d,0xfe,0x23,0x00,0x00} + s Make one phone test { 0xce,0x1d,num1,num2,num3,num4} + Where num1-num4: 0x02,0x00,0x00,0x00; + 0x04,0x00,0x00,0x00; + 0x08,0x00,0x00,0x00; + 0x10,0x00,0x00,0x00; + 0x20,0x00,0x00,0x00; + 0x40,0x00,0x00,0x00; + 0x80,0x00,0x00,0x00; + 0x00,0x01,0x00,0x00; + 0x00,0x02,0x00,0x00; + 0x00,0x04,0x00,0x00; - "Power off" + No test for "Security data" + 0x00,0x10,0x00,0x00; + 0x00,0x20,0x00,0x00; + 0x00,0x40,0x00,0x00; + 0x00,0x80,0x00,0x00; + 0x00,0x00,0x01,0x00; + .... + 0x00,0x00,0x10,0x00; + s Result of phone tests { 0xcf } + r Result of phone tests { 0xcf, number of tests, results of next tests } +? s ??? { 0xd1 } +? r ???(N5110) { 0xd1, 0x00, 0x1d, 0x00, 0x01, 0x08, 0x00 } + s LCD Test { 0xd3, value } + where value: 0x03, 0x02 - 1'st test + 0x03, 0x01 - 2'nd test + 0x02, 0x03 - clears screen + s ACD Readings(N6150)? { 0xd4, 0x02, 0x00, 0x02, 0x00, 0x0e, 0x01} + r ACD Readings(N6150)? { 0xd4, 0x02, 0x00, 0x02, 0x00, 0x0e, 0x01, ?} + r Function of { 0xff, 0x8c } + 0x40 msgtype not + supported ? +0x78: + s Status confirm { 0x0201, 0x03 } + r Incoming call seq1 { 0x0102 0x0e 0x03 } + r Incoming call seq2 { 0x0102 0x7e 0x01 } +0x79: + s CarKit enable { 0x0201 0x01 0x62 0x00 } + r CarKit enabled { 0x0201 0x02 0x06 0x00 "V " {version} "\nHFU" + 0x00 } +0x7a: settings + r Set setting { 0x01eb, number, 0x00 } + s Set setting { 0x01ec, number, contents } + where for number: + 0x02 (startup text) : 0x00, text (Unicode) + 0x15 (startup logo) : 0x00, 0x00, 0x00, 0x04, + 0xc0, 0x02, 0x00, height, 0xc0, 0x03, 0x00, width, + 0xc0, 0x04, 0x03, 0x00, {bitmap} } + where width, height, {bitmap}: see 0x7a/0x01ed 0x15 + s Get setting { 0x01ee, number} + where number: 0x01 - 0x1e + 0x02: startup text + 0x15: startup logo + 0x1c: security code + r Get setting { 0x01ed,number, 0x00, contents} + where for number: + 0x02 (startup text) : 0x00, text (Unicode) + 0x15 (startup logo) : 0x00, 0x00, 0x00, 0x04, + 0xc0, 0x02, 0x00, height, 0xc0, 0x03, 0x00, width, + 0xc0, 0x04, 0x03, 0x00, {bitmap} } + where height: 60 (0x3c) or 65 + width: 96 (0x60) + {bitmap}: like other bitmaps but pixels + placed vertically. + 0x1c (security code): {code(ascii)}, 0x00 +0x7f: Acknowledge(FBUS/IRDA){+type, seq } + Acknowledge(MBUS)... +0xd0: + s Power on message seq1 {+04 } + r Power on message seq1 {+05 } +0xd1: + s Get HW&SW version { 0x0003, 0x00 } +0xd2: + r Get HW&SW version { 0x0003 "V " "firmware\n" "firmware date\n" + "model\n" "(c) NMP." } +0xf4: Power on message seq 2 diff --git a/Docs/developers/protocol/nokia.txt b/Docs/developers/protocol/nokia.txt new file mode 100644 index 0000000..965dc59 --- /dev/null +++ b/Docs/developers/protocol/nokia.txt @@ -0,0 +1,279 @@ + +Document describing protocol used in Nokia phones. + +The data provided is for information purposes only. +Some of the frames might be hazardous to your phone. Be careful!!! +We do not take any responsibility or liability for damages, etc. + +Last update 01.03.2001 +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +Assembled by + Balazs Nagy (js@lsc.hu) + Alfred R. Nurnberger + Hugh Blemings + Mike Bradley + Odinokov Serge + Pavel Janik + Pawe³ Kot + Marcin Wiacek (Marcin-Wiacek@TOPNET.PL) + Jens Bennfors + Michael Hund + Jay Bertrand + + Andrew Kozin + Pavel Machek + Diego Betancor + ... and other members of gnokii mailing list + and authors of some WWW pages. + +NOTE: this information isn't (and can't be) complete. If you know anything +about features not listed here or you noticed a bug in this list, please +notify us via e-mail. Thank you. + + Frame format for MBUS version 1: + + Request from Computer/Answer from Phone: + + { DestDEV, SrcDEV, FrameLength, MsgType, {block}, id, ChkSum } + + where DestDEV, SrcDEV: 0x00: phone + 0xf8: PC (wakeup msg) + 0xe4: PC (normal msg) + FrameLength: length of data frame. Maximal 0x78. Longer + frames are divided into smaller. + MsgType: see List + {block}: main frame + id: request identity number 1..n, incremented after + the request is accepted + ChkSum: XOR on frame's all numbers + + Ack from Phone: + + { DestDEV, 0x00, FrameLength, MsgType, {block} , id, ChkSum } + + where DestDEV: taken from original request packet + FrameLength: 0x7f, when DestDEV = 0xe4 + 0x7e, when DestDEV = 0xf8 + MsgType: see List. Present only, when DestDEV = 0xf8 + {block}: main frame. Present only, when DestDEV = 0xf8 + id: request identity number 1..?, corresponding + to the original request packet id + the request is accepted + ChkSum: XOR on frame's all numbers + + Update: description above according to the + http://www.gadgets.demon.co.uk/nokia21xx/protocol.html. + + Pavel Machek wrote: + 0x7e is actually registration acknowledge. Both have nothing to do + with DestDEV, except that special device needs to be used for + registration. + + Ack from Computer: + + { 0x00, SrcDEV, 0x7f, id, ChkSum } + + where SrcDEV: taken from response packet + id: request identity number 1..?, corresponding + to the response packet id + the request is accepted + ChkSum: XOR on frame's all numbers + + Port settings: + Speed 9600 bps, Bits 8, ParityOdd, Stop Bits 1, DTR and RTS logic 0 + + In the MBUS bus, the phone has only one connector for transmition and + reception. + + Because of this characteristics of the phone connector, every time that the + PC writes into the phone it is writing as well into its own Rx. So every + time the PC sends info into the phone it finds that same information in its + own Rx buffers, like a mirror copy. This should be discarded. + + The communications is made like an old cb radio, only one + talking at a time. Many transmission are made this way: + + + + + + + Some frames are sent from phone without asking for them + + You have to implement collision protocol. IE. you should listen for + what you are transmitting, and if it does not come back, you have + collision. + + You should wait for bus to be free for 3 miliseconds before normal + message, and for 2.5 miliseconds before acknowledge. You should wait + for acknowledge for 200 miliseconds, then retransmit. + + Frame format for FBUS version 1: + + { FrameID, FrameLength, MsgType, {block}, SeqNo, ChkSum } + + where FrameID: 0x01 Command frame from computer to Nokia + 0x02 ??? - Data call frame from computer to Nokia - ??? + 0x03 Data call frame from Nokia to computer + 0x04 Command frame from Nokia to computer + FrameLength: {block} + 2 + MsgType: see List + SeqNum: Sequence number of command in case where direction is + from ME to computer, the sequence number is + counting from 0x30 to 0x37 and resetting back to 0x30. + When direction is from computer to ME, + sequence number counts from 0x08 to 0x0f and resets back to 0x08. + It may not be required to be this way. + Sequence numbers are used in acknowledging commands. + ChkSum1: CRC = 0; + for (i = 0; i < (2 + CMD_LEN); i++) + CRC ^= frame[i]; + + Frame format for FBUS version 2/Direct IRDA: + + { FrameID, DestDEV, SrcDEV, MsgType, 0x00, FrameLength, {block}, FramesToGo, + SeqNo, PaddingByte?, ChkSum1, ChkSum2 } + + where FrameID: 0x1c: IR / FBUS + 0x1e: Serial / FBUS + DestDev, SrcDev: 0x00: mobile phone + 0x0c: TE (FBUS) [eg. PC] + MsgType: see List + FrameLength: {block} + 2 (+ 1 if PaddingByte exists) + FramesToGo: 0x01 means the last frame + SeqNo: [0xXY] + X: 4: first block + 0: continuing block + Y: sequence number + PaddingByte: 0x00 if FrameLength would be an odd number + anyways it doesn't exists + ChkSum1: XOR on frame's odd numbers + ChkSum2?: XOR on frame's even numbers + + Frame format for MBUS version 2: + + { FrameID, DestDEV, SrcDEV, MsgType, FrameLengthLO, FrameLengthHI, {block}, + SeqNo, ChkSum } + + where FrameID: 0x1f: Serial / M2BUS + DestDev, SrcDev: 0x00: mobile phone + 0x1d: TE (M2BUS) + 0x10: TE (M2BUS) (Service Software ?) + 0x04: Carkit? + 0x48: DLR3 cable? + 0xF8: unknown target? + 0xFF: global target? + MsgType: see List + FrameLength: {block} + SeqNo: sequence number + ChkSum: XOR on frame's all numbers + + Please note that M2BUS has only one checksum: XOR on frame[FrameID..SeqNo] + + Ack: + + { FrameID, DestDEV, SrcDEV, 0x7f, Id_SeqNo, ChkSum } + + where Id_SeqNo: Is the sequence number that you are + acknowleging (from the other part). + + Frame format for Infrared: + + { FrameID, DestDEV, SrcDEV, MsgType, FrameLengthLo, FrameLengthHi, {block}} + + where FrameID: 0x14 + DestDev, SrcDev: 0x00: mobile phone + 0x0c: TE [eg. PC] + MsgType: see List + FrameLength: {block} + + Frames list format: + + hex: Short description + x msg desc { ... } + 0xXX -> one byte + 0xXXYY -> two bytes (== 0xXX, 0xYY) + + where hex: message type + x: s=send (eg. to mobile), r=receive + { ... }: data after 0x00, 0x01 header + {+... }: raw data (without header) + +------------------------------------------------------------------------------- + +Misc (about MBUS version 2): + +0x4E commands: + (sent from a 5160i TDMA / 6160i TDMA / 6185 CDMA or 7110 GSM + phone to the uC in the DLR-3 cable) +DLR-3 req: + 1F 48 00 4E 00 02 01 XX SQ CS + frame sent from the phone to the DLR-3 cable + (after 15kOhm resistor detected betw. XMIC (3) and DGND (9).) + DSR,DCD,CTS flow control data is coded into the 2nd databyte + XX: bit.0=/CTS + bit.1=/DCD + bit.2=CMD/DATA + bit.3=DSR + bit.4-7=0 + +0x78 / 0x79 commands: + (used by handsfree carkit) Works also on GSM phones (5110 / 6110 / etc) +These commands are used by the Nokia Carkits to switch the phone audio path to +XMiC and XEAR , turn the phone on/off according to the car ignition, and +control the PA loudspeaker amplifier in the carkit and the car radio mute +output which silences the car radio during a call +mute status tone: + 1F 04 00 78 00 04 01 02 0E 00 SQ CS + status indication = disable carkit audio amplifier (no audio / no tone) +mute status tone: + 1F 04 00 78 00 04 01 02 0E 03 SQ CS + status indication = enable carkit audio amplifier (audio / tone present) +mute status call: + 1F 04 00 78 00 04 01 02 07 00 SQ CS + status indication = disable radio mute output (no call) +mute status call: + 1F 04 00 78 00 04 01 02 07 01 SQ CS + status indication = enable radio mute output (call active) +enable ???: + 1F 04 00 78 00 04 01 02 08 01 SQ CS + status indication = enable ??? sent to HFU-2 on power on + byte 9 (07,08,0E) seems to be a pointer to a memory location, + byte 10 is the data at this memeory location. +response from HFU: + 1F 00 04 78 00 03 02 01 03 SQ CS + response message from HFU-2 (use unknown) +go HF and IGN on: + 1F 00 04 79 00 05 02 01 01 63 00 SQ CS + enables carkit mode + turns phone on + req. mute status +go HF and IGN off: + 1F 00 04 79 00 05 02 01 01 61 00 SQ CS + enables carkit mode + powers phone off (1 min delay) + req. mute status +ext. HS Offhk: + 1F 00 04 79 00 05 02 01 01 23 00 SQ CS + enables carkit mode + external handset lifted (OFF-Hook) +ext. HS Onhk: + 1F 00 04 79 00 05 02 01 01 63 00 SQ CS + enables carkit mode + external handset put back (ON-Hook) + Ignition and Hook are coded into one byte + bit.0 = 0:on power on 1:when in operation + bit.1 = IGNITION STATUS + bit.2 = x can be 1 or 0 + bit.3 = 0 + bit.4 = 0 + bit.5 = 1 + bit.6 = Hook (inverted) + bit.7 = 0 +HFU-2 version: + 1F 00 04 79 00 12 02 01 02 06 00 56 20 30 36 2E 30 30 0A 48 46 55 32 00 SQ CS +for HFU-2: + 1F 04 00 DA 00 02 00 02 SQ CS + function unknown - sent from Nokia phone to HFU-2mute output (call active ) + +0xD0 commands: +init: + 1F 00 1D D0 00 01 04 SQ CS + sent by the Service Software or HFU-2 on startup +init resp: + 1F 1D 00 D0 00 01 05 SQ CS + response from phone to above frame diff --git a/Docs/developers/protocol/readme b/Docs/developers/protocol/readme new file mode 100644 index 0000000..1df354d --- /dev/null +++ b/Docs/developers/protocol/readme @@ -0,0 +1,2 @@ +This is part of files available in mygnokii_developer.tar.gz +available in http://marcin-wiacek.topnet.pl diff --git a/Docs/en_US/gnokii/config.htm b/Docs/en_US/gnokii/config.htm new file mode 100644 index 0000000..7724082 --- /dev/null +++ b/Docs/en_US/gnokii/config.htm @@ -0,0 +1,632 @@ + + + + + Configuration + + + + + +

Main page

+
Configuration
+ +


+ +

How to install it from the source ?
+


+ +

If you get the sources you need to create script +configure. You do it by typing: +

tfuj:~/gnokii-0.3.3pre5$ autoconf
+ +

If you get the sources from the tarball you don't need to do +this - configure is already made for you. For quick install do simply: +

tfuj:~/gnokii-0.3.3pre5$ ./configure
+tfuj:~/gnokii-0.3.3pre5$ make
+tfuj:~/gnokii-0.3.3pre5$ make install
+
+ +

But configure has some options. Except obvious +parameters as --prefix which specifies a path to install GNOKII, you +can specify one of the following: + +

+
--help +
Shows you list of available options
+
+
--enable-debug +
Turns on debugging. It's usefull especially for developers. But if you + find a bug in GNOKII, please compile the sources with debugging enabled and + send this output to the GNOKII mailing list. This is used by gnokii + program.
+
+
--enable-xdebug +
The same as above but used by xgnokii.
+
+
--enable-rlpdebug +
This option turns on debugging specific to the RLP stuff. Note, that it's + very important at the moment as this part of GNOKII is under the hardest + development.
+
+
--without-x +
Don't include X Window system support - xgnokii.
+
+
--enable-security +
Turns on some security functions:.... Use them with caution.
+
+
--enable-win32 +
Include MS Windows support. Yes, it really exists. ;-)
+
+
--with-model=MODEL, --with-port=PORT +
Specify the model of the phone (eg. 6150) and the port it is connected to + (eg. /dev/ttyS1). These values can be overwritten with ones from the config + files. +
+
+ +

The sample usage: +

tfuj:~/gnokii-0.3.3pre5$ ./configure --prefix=/usr2 --enable-debug --without-x \
+--enable-security --with-model=6130 --with-port=/dev/ttyS1
+
+ +

When the configure succeed, it shows options GNOKII +will be compiled with: +

    Host system:        linux-gnulibc1
+    Gnokii version:     0.3.3_pre5
+    Xgnokii version:    20000613
+    Phone model:        6130
+    Serial port:        /dev/ttyS1
+    X (GTK) support:    no
+    Debug:              yes
+    XDebug:             no
+    RLPDebug:           no
+    NLS:                yes
+    Security:           yes
+    Win32:               
+    Prefix:             /usr2
+
+ +

Now, the only thing left to do is just ro run: +

tfuj:~/gnokii-0.3.3pre5$ make
+tfuj:~/gnokii-0.3.3pre5$ make install
+
+ +

Finally, you have GNOKII installed in your system. And now REAL +FUN begins. :-) + +

How to install it from binaries ?
+


+ +

If you downloaded gnokii as a pre-built binary you should install +it in the conventional manner for the package type in question. +For example if you downloaded a .rpm file you can install it by +running the following as root. + +

rpm -i gnokii-0.3.2-i386.rpm + +

If you are using a Debian based system, you can use dpackage +to do the installation (FIXME - is this correct ?) + +

How to make connection with phone ?
+


+ +

There are three ways to make it: + +

    +
  • connecting phone with computer using cable. All phones allow to make it +(even 3210 - connector is inside). If you want to know more +about creating your own cable, read cables faq.
  • +
  • using IrDa port in phone and computer. Notice, that your computer +and phone must have it (only some series of Nokia phones has it - for example, +6110, 6150)
  • +
  • connecting to phone special device called "dongle" (it has IrDa port) +and making IrDa connection between it and phone. Current gnokii cas use +Tekram IRmate 210 - see patches
  • +
+ +

How to configure gnokii ?
+


+ +

First it to use --with-model and --with-port options for +configure script. But I do not recommend this. In my opinion these should be +removed from configure. Second disadvantage is that you can't use it when +you are installing a binary package. + +

So, will use better method :-). +You should copy the gnokiirc +file from the Docs/examples directory to your +home directory and name it gnokiirc or copy it into /etc directory +and name gnokiirc. + +

Using your favorite +editor ensure that the settings are correct for your system, +the sample file has details of the various options available. The most +difficult problem could be discovering model of your phone - go into +our firmware page +and try to use codes written in column +Firmware version code. If your phone will display something, +see model number on the third line, look on the +firmware page +again (for it) and read phone model then. + +

Note that you will need read/write permissions on whatever +serial port you specify in gnokiirc. You can now use gnokii +and xgnokii. + +

Of course, you don't have to make any config, if you will use +these config options. There are default: + +

+

+[global]
+port = /dev/ttyS0
+model = 6110
+connection = serial
+initlength = default
+bindir=/usr/local/sbin
+
+ +

How to configure infrared connection ?
+


+ +

+

    + +
  • Go into configuration of your IrDa port (the most often it's made in +BIOS, sometimes using program provided by computer's producer): + +

    +

      +
    • Enable it
    • +
    • Setup the COM-Port on which it should work. +Here are addresses: +
      ttyS0 (COM1): 3F8, IRQ: 4 +
      ttyS1 (COM2): 2F8, IRQ: 3 +
      ttyS2 (COM3): 3E8, IRQ: 4 +
      ttyS3 (COM4): 2E8, IRQ: 3 +
        +
    • +
    +
  • + +
  • Configure gnokii (see previous question) +setting type of connection to +infrared.
  • + +
  • If you are using linux, put linux-irda off (you can't use gnokii over infrared and +linux-irda at the same time - it means too, if you want use +linux-irda you must close all gnokii-applications what +use the infrared-port in moment). +
  • +
+ +

How to configure gnokii driver for data connection ?
+


+ +

After installing and configuring gnokii you should make another group +and allow mgnokiidev (it our virtual modem driver) +to use it. For example (if you have installed gnokii +into /usr/local): + +

+groupadd gnokii
+chown root:gnokii /usr/local/sbin/mgnokiidev
+chmod 4750 /usr/local/sbin/mgnokiidev
+ +

And now connect (FIRST EXAMPLE): + +

Then connect your phone to your PC and then run gnokiid: + +

[ first console ]
+tfuj:/home/pawel/gnokii# ./gnokiid/gnokiid 
+
+ +

If successful, you should see a message saying that mgnokiidev has been +run to create /dev/gnokii. If you're using a 5110/6110 series phone +you should hear a beep and see an "accessory connected" message on +the phone. If you're using a 3810 series phone you won't see anything +on the phones LCD. + +

And now: + +

+

+[ second console ]
+[- running minicom -]
+
+[ third console ]
+[- when connection is estabilished -]
+tfuj:/etc/ppp# /usr/sbin/pppd -d -detach /dev/gnokii 115200
+Using interface ppp0
+Connect: ppp0 <--> /dev/gnokii
+sent [LCP ConfReq id=0x1     ]
+rcvd [LCP ConfReq id=0x8e     < 11 04 05 f4> < 13 0d 01 70 69 65 6b 6e 61 2d 61 73 34>]
+sent [LCP ConfRej id=0x8e < 11 04 05 f4> < 13 0d 01 70 69 65 6b 6e 61 2d 61 73 34>]
+rcvd [LCP ConfNak id=0x1 ]
+sent [LCP ConfReq id=0x2    ]
+rcvd [LCP ConfReq id=0x8f    ]
+sent [LCP ConfAck id=0x8f    ]
+rcvd [LCP ConfAck id=0x2    ]
+sent [IPCP ConfReq id=0x1  ]
+sent [CCP ConfReq id=0x1   ]
+rcvd [IPCP ConfReq id=0x16  ]
+sent [IPCP ConfAck id=0x16  ]
+rcvd [IPCP ConfNak id=0x1 ]
+sent [IPCP ConfReq id=0x2  ]
+rcvd [LCP ProtRej id=0x90 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
+rcvd [IPCP ConfAck id=0x2  ]
+local  IP address 157.25.94.141
+remote IP address 157.25.75.129
+Terminating on signal 2.
+sent [LCP TermReq id=0x3 "User request"]
+rcvd [LCP TermAck id=0x3]
+Connection terminated.
+Connect time 5.6 minutes.
+Sent 30568 bytes, received 197133 bytes.
+tfuj:/etc/ppp# 
+
+ +

SECOND EXAMPLE (I used such scripts): + +

/home/pawel/.gnokiirc
+---------------------
+global]
+port = /dev/ttyS1
+model = 6110
+connection = serial
+initlength = 1
+
+/usr/sbin/ppp-gnokii
+--------------------
+#!/bin/sh
+LOCAL_IP=0.0.0.0       
+REMOTE_IP=0.0.0.0     
+NETMASK=255.255.255.0   
+DIALER_SCRIPT=/etc/ppp/ppp-gnokii
+exec /usr/sbin/pppd debug /dev/gnokii 115200 \
+$LOCAL_IP:$REMOTE_IP \
+connect $DIALER_SCRIPT
+
+/etc/ppp/ppp-gnokii
+-------------------
+#!/bin/sh
+/usr/sbin/chat -v                                       \
+        TIMEOUT         30                              \
+        ABORT           '\nBUSY\r'                      \
+        ABORT           '\nNO ANSWER\r'                 \
+        ABORT           '\nRINGING\r\n\r\nRINGING\r'    \
+        ABORT           '\nNO CARRIER\r'                \
+        ''              ATDT501808080                   \
+        CONNECT         ''
+
+/etc/ppp/options
+----------------
+-detach
+modem
+crtscts
+defaultroute
+asyncmap 0
+mtu 552
+mru 552
+
+/etc/ppp/pap-secrets
+--------------------
+ppp * ppp
+
+ +

Number 501808080 is an Internet access number for all Idea +Centertel (Polish GSM operator) abonents. With these files the only thing to do +is to run gnokiid and /usr/sbin/ppp-gnokii. Note that both: +/usr/sbin/ppp-gnokii and /etc/ppp/ppp-gnokii must be +executable files. At the moment you have to run ppp-gnokii as the +superuser unless the simple user has a permission to write to a pty +device. gnokiid must be run as the user belinging to gnokii +group. + +

+[ first console ]
+tfuj:~S /usr/sbin/gnokiid
+Initialising GSM
+Slave pty is /dev/ttyp9, calling /usr/sbin/mgnokiidev to create /dev/gnokii.
+
+[ second console ]
+tfuj:~# /usr/sbin/ppp-gnokii
+Serial connection established.
+Using interface ppp0
+Connect: ppp0 <--> /dev/gnokii
+Warning - secret file /etc/ppp/pap-secrets has world and/or group access
+sent [LCP ConfReq id=0x1     ]
+rcvd [LCP ConfReq id=0xbb     ]
+sent [LCP ConfAck id=0xbb     ]
+rcvd [LCP ConfNak id=0x1 ]
+sent [LCP ConfReq id=0x2    ]
+rcvd [LCP ConfAck id=0x2    ]
+Warning - secret file /etc/ppp/pap-secrets has world and/or group access
+sent [PAP AuthReq id=0x1 user="ppp" password="ppp"]
+rcvd [PAP AuthAck id=0x1 ""]
+Remote message: ^F
+sent [IPCP ConfReq id=0x1  ]
+sent [CCP ConfReq id=0x1   ]
+rcvd [IPCP ConfReq id=0x49  ]
+sent [IPCP ConfAck id=0x49  ]
+rcvd [IPCP ConfNak id=0x1 ]
+sent [IPCP ConfReq id=0x2  ]
+rcvd [IPCP ConfAck id=0x2  ]
+local  IP address 192.168.23.55
+remote IP address 192.168.9.2
+
+ +

THIRD EXAMPLE: + +

Use /dev/gnokii as a modem: + +

e.g. ppp session
+--------------- /etc/ppp/peers/demon-gnokii ---------------------
+/dev/gnokii 115200
+modem crtscts defaultroute
+connect 'chat -v ABORT BUSY ABORT ERROR ABORT "NO CARRIER" "" AT OK-AT-OK ATD02083389666 CONNECT'
+user XXXX.demon.co.uk
+noauth
+mtu 296
+debug
+----------------------------------------------------------------
+--------------- /etc/ppp/pap-secrets ---------------------------
+XXXX.demon.co.uk demon-gnokii
+----------------------------------------------------------------
+
+ +

Then "pppd call demon-gnokii" should connect +
('tail -f /var/log/messages' to see what is happening) + +

If a call terminates you should get 'NO CARRIER' and gnokiid should +continue to work, but this is early code and you may find you have to +Ctrl-C and restart gnokiid (especially if the phone says the terminal +connection has been lost) + +

AND ANOTHER EXAMPLE PPP SCRIPT FROM Jon Wikne: + +

+ +#!/bin/sh
+#
+# Script to launch PPP over a Nokia 5110 / 6110 mobile phone
+# 20-06-2000 -- Jon Wikne
+#
+### NOTE: "01234567" and "username" below must be replaced
+### with your actual ISP's phone number and your user name.
+#
+### NOTE 2: If you are calling an ISDN number or a digital
+### line you may also need ATS35=0 in the chat sequence.

+# Launch gnokiid....
+echo "Launching gnokiid... "
+/usr/local/sbin/gnokiid &

+# Wait for gnokiid to find the phone.
+sleep 7

+# Now, down to business!
+echo "Calling and starting pppd... "
+pppd /dev/gnokii 115200 debug connect \
+'chat -v ECHO ON ABORT BUSY ABORT ERROR ABORT "NO CARRIER" \
+"" AT OK ATDT01234567 CONNECT ""' \
+noipdefault ipcp-accept-local ipcp-accept-remote \
+user username

+# Some cleaning up to do....
+
+echo -n "Stopping gnokiid... "
+ps ax | awk 'BEGIN { prog="/usr/local/sbin/gnokiid"; ARGC=1 }
+{ if (prog == $5) { print $1 ; exit 0 } }' $1
+kill "$1"
+echo $1 +
+ +

Permission problem...
+


+ +
+> Now xgnokii want  to connecting.....  and some minutes later it's say:
+>  Gnokii serial_open: open: Permission denied
+> Couldn't open FB61 device: Permission denied
+
+you should set your /dev/ttySx to:
+
+crw-rw----    1 root     dialout    4,  65 Jul  5  2000 /dev/ttyS1
+
+and add yourself to the group dialout. or make a new group gnokii 
+and do the same thing for this group. see the gnokii doc about 
+this, especialy if you want to use gnokiid.
+
+ +

Xgnokii files missed...
+


+ +
+> > I start to configure:
+> > 
+> > elwinx:/usr/src/gnokii# ./configure  --prefix=/usr/local/
+> > 
+> > checking for X... (cached) libraries /usr/X11R6/lib, headers
+> > /usr/X11R6/include
+> > checking for X11/xpm.h... (cached) no
+> > configure: warning: Cannot find include X11/xpm.h
+> > configure: warning: Disabling xgnokii.
+
+ +

For Debian GNU/Linux 2.2 potato: + +

+

+> Do:
+> dpkg -S \*xpm.h
+> and show the result. You can't use xgnokii without libxpm.
+
+After I installed the xpm4g-dev_3.4k-5.deb xgnokii found my X
+
+My next Problem was the Program didn't find the gtk.h
+
+I installed this lib's
+libglib1.2-dev
+libgtk1.2-dev_1.2.7-1.deb
+
+and xgnokii are start up
+
+ +

For Redhat: + +

+

+On Red Hat 6.2 (or derived?)
+
+sloth:danielm[12]% locate xpm.h
+/usr/X11R6/include/X11/xpm.h
+sloth:danielm[13]% rpm -qf /usr/X11R6/include/X11/xpm.h
+xpm-devel-3.4k-2
+
+On Red Hat 7 (or derived?)
+
+mouth:danielm[4]% locate xpm.h
+/usr/X11R6/include/X11/xpm.h
+mouth:danielm[5]% rpm -qf /usr/X11R6/include/X11/xpm.h
+XFree86-devel-4.0.1-1
+
+ +

Infrared problem
+


+ +
+> I'm having trouble getting Gnokii to work with my Nokia 6110 using the
+> infrared connection. It works perfectly with the cable. When I run gnokii
+> as non-root I get the following output:
+> 
+> Added new section global
+> Adding key/value port//dev/ttyS3
+> Adding key/value model/6110
+> Adding key/value initlength/default
+> Adding key/value connection/infrared
+> Adding key/value bindir//usr/local/sbin/
+> Entering monitor mode...
+> Initialising GSM interface...
+> Starting IR mode...!
+> Couldn't open FB61 infrared device: Device or resource busy
+> Hmmm... GSM_LinkOK never went true. Quitting.
+> 
+> And if I run it as root it looks like this:
+> 
+> Added new section global
+> Adding key/value port//dev/ttyS3
+> Adding key/value model/6110
+> Adding key/value initlength/default
+> Adding key/value connection/infrared
+> Adding key/value bindir//usr/local/sbin/
+> Entering monitor mode...
+> Initialising GSM interface...
+> Starting IR mode...!
+> PC: 1c:00:0c:02:00:09:00:01:00:0d:00:00:02:01:40:00:52:06:
+> Timeout in IR-mode
+> PC: 1c:00:0c:02:00:09:00:01:00:0d:00:00:02:01:41:00:53:06:
+> Timeout in IR-mode
+> PC: 1c:00:0c:02:00:09:00:01:00:0d:00:00:02:01:42:00:50:06:
+> Timeout in IR-mode
+> PC: 1c:00:0c:02:00:09:00:01:00:0d:00:00:02:01:43:00:51:06:
+> Timeout in IR-mode
+> PC: 1c:00:0c:02:00:09:00:01:00:0d:00:00:02:01:44:00:56:06:
+> Timeout in IR-mode
+> Hmmm... GSM_LinkOK never went true. Quitting.
+> 
+> It makes no difference if IR-reception is activated or not (well maybe the
+> numbers are different, I haven't checked)
+> 
+> I have followed the Alessandro's beta-HOWTO which was posted June 22 2000
+> with the subject "Re: IR setup".
+> 
+> In /var/log/messages I have found the following:
+> 
+> Feb 18 23:34:16 bmw kernel: ircomm_tty: virtual tty driver for IrCOMM (
+> revision:Wed May 26 00:49:11 1999 ) 
+> Feb 18 23:34:16 bmw kernel: ttyS00 at 0x03f8 (irq = 4) is a 16550A 
+> Feb 18 23:34:16 bmw kernel: ttyS03 at 0x02e8 (irq = 3) is a 16550A 
+> 
+> I have tried both with and without the irda-module loaded (insmod
+> irda) but without luck.
+> 
+> I'm using a Fujitsu C325 Lifebook (labtop) and my Nokia 6110 is version
+> 4.33. Has anyone experienced problems like these and hopefully has found a
+> solution, or maybe just have some ideas for what I should try next.
+
+"I also had removed the Ethernet PCcard.
+That thing got assigned the _interrupt_ (irq 3) that the serial interface
+for the IR port needs. Without it gnokii works."
+
+Now I've got contact to my Nokia 6110 using the infrared port.
+
+ +

Answering data calls problem...
+


+ +
+> It seems like it's some sort of PacBell or Verizon thing, because I
+> get a ring when I try to dial a voice call, but when I dial from
+> minicom/gnokiid I get "NO CARRIER" ("Check Operator Services" on the
+> phone), and dialing in from the Palm still gets no ring.
+
+First we should know how operators manage data call services,
+is there any international standard (it would be, to make international data
+calls possible). I described, how it works with my operator (Plusgsm/PL)
+and I'm interesting if it's a worldwide standard for these services?
+Did somebody tried to make a cellular-to-cellular international data transfer ?
+
+In Plusgsm there are three kinds of data calls :
+1. OUTGOING CALLS. Service activation is free with no additional monthly charge.
+   For default this service is disabled, you have to call operator's helpdesk
+   to enable. With this service is possible to call:
+      a) any internet gate
+      b) WAP gate
+      c) any "private" computer with own transfer protocol
+      d) ?? send a fax ?? (with special fax software for cellular modem
+         included in NCDS)
+   1 minute charge is similar to voice calls. It's not allowed by the operator
+   to answer incoming data call.
+2. INCOMING CALLS. You have to pay for service activation (5$) and additional
+   monthly charge (10$). Then you will get a new SIM card with 2 phone numbers:
+   one for voice/sms and second one - for incoming data calls only.
+   1 min charge depends on the network from the call was initiated,
+   generally 1...2 times x voice call.
+3. FAX CALLS. Another payable service, not covered by above mentioned.
+   There is a special trick for incoming fax: it's stored in "FAX mailbox",
+   you can call this mailbox with standard fax machine
+   (or cellular modem connected to PC) to receive it.
+
+I guess your operator have similar restrictions for incoming data calls and
+here is your problem. Incoming call is recognized as a data type and rejected.
+It would be nice to know if it's rejected on the operator's software level or
+by the phone software (acc. to informations stored in the SIM).
+In the second case it's easier to omit these restrictions. But be careful !
+You will be treated by the law in the same way as if you try to hack
+Bill Gates credit card number ;-)  .
+
+ +

Xgnokii works, gnokii not...
+


+ +
+> 1. Why is it that xgnokii communicates perfectly with my 3210, while the
+> only thing that the command line gnokii does is:
+> GSM/FBUS init failed! (Unknown model ?). Quitting.
+> [cvd@sirius gnokii]$ ./gnokii --monitor
+> Opened configuration file /home/cvd/.gnokiirc
+> Added new section global
+> Adding key/value port//dev/ttyS1
+> Adding key/value model/3210
+> Adding key/value initlength/default
+> Adding key/value connection/serial
+
+Look into latest gnokiirc from /docs/default. "serial" setting for connection
+is not used from long time. Change to other actual parameter ("fbus" ?)...
+
+ + + + diff --git a/Docs/en_US/gnokii/faq.htm b/Docs/en_US/gnokii/faq.htm new file mode 100644 index 0000000..35850bc --- /dev/null +++ b/Docs/en_US/gnokii/faq.htm @@ -0,0 +1,356 @@ + + + + + GNOKII FAQ + + + + + +

Main page

+
GNOKII FAQ
+ +


+ +

What is gnokii ?
+


+ +

Generally, what is gnokii (G from GNU, NOKII from Nokia) ? + +

It is a name of project. The aim of it is to develop tools and drivers +for Nokia mobile phones. Of course, I think in this moment about really +different tools - for example, modem drivers, console tools, etc. +All created here software is released under the GNU +General Public License. Please see COPYING +for more details on license/copying issues, +the lack of warranty and where to send a postcard if you like gnokii :). +Anyway, our software works on many software (Linux, Free BSD, etc.) +and hardware (Intel, etc.) platforms... + +

What software applications are created in gnokii project ?
+


+ +
    + +
  • +The first application, gnokii, is a command line utility that was +originally provided to assist developers and interested users in +working with the low level API functions that were being developed. + +

    From these rather humble beginnings, it has evolved into a the main +command line tool of the suite. Many people now use it for +reading/writing phone book entries, sending and receiving SMS messages +etc. Ultimately it is intended that it will become a utility that +communicates with gnokiid to provide a command line interface to +the functionality provided by the gnokiid daemon. +
      +

  • + +
  • +The second application provided is xgnokii which as the name suggests +is a X-windows based application that provides a graphical interface +to your phone. Amongst other things, xgnokii allows you to read and +write phone book entries, read, write and send SMS messages, monitor +battery and received signal strength. + +

    At present xgnokii works directly with the phone, however in the +future it will more likely use the "side" interface of gnokiid. + +

    The main author of it is Jan Derfinak +
      +

  • + +
  • +The third part of the suite is gnokiid. gnokiid provides a +virtual modem interface, /dev/gnokii that looks like a regular +Hayes-AT compatible modem with the ETSI defined extensions for +GSM phones. What this means in practical terms is that you can +treat the /dev/gnokii device like an ordinary modem and use it +to make data calls from pppd or a terminal application like +minicom. + +

    +gnokiid is still under development, it's ultimate aim being to +act as a "master" daemon that interfaces with your phone on one +side and gnokii or xgnokii on the other. This "side" code is still +under discussion, particularly with respect to the most appropriate +choice of communication method (IPC, TCP/IP etc.) +
      +

  • + +
  • +The last application provided with the suite is mgnokiidev which is +used by gnokiid to create on demand a symbolic link between +/dev/gnokii and the pseudo tty used by gnokiid for the virtual +modem interface. It's operation is transparent under normal +usage as gnokiid takes care of calling it when required. +
  • + +
+ +

This project also inspired some people to write other software for Nokia. +For example: + +

+

    +
  • +There is a perlmodule available for gnokii. It gives access to all +the routines that are defined in gsm-common.h from a perl-program. It +is intended for application developers who want to use their favorite +language in interfacing the phone data with databases, ldap-directories +and (in the future) different calendar applications. It is written by +Konstantin Agouros +and support starts with revision 0.2.6-pre3 of gnokii. + +

    The homepage of this module is +http://www.agouros.de/gnokii +
      +

  • + +
  • +http://anders.fix.no/software/gnokline-1.0.tgz +and http://alamin.sourceforge.net - +software, which interprets received by connected Nokia phone SMSes and makes some things +
  • + +
+

Which phones are supported ?
+


+ +

You can also ask, what phones are supported ? All, you want :-) Really ! + +

At first, we were making in gnokii project modules +for Nokia 3810/8110 and 51x0/61x0 phones. Later users started to +write parts for other Nokia phones. And we hope to extend it to another +models: 7110, etc. Remember: it's even possible to write modules +for other than Nokia phones +too (just imagine: support for the most popular phones in one software !)... + +

Here is more detailed table with supported phones info... + +

You can also look into +registered gnokii users database +too see used by them phones... + +

What is compatibility with hardware ?
+


+ +

Generally, gnokii can work with all computers, which have serial port +(over cable). + +

If you want to use infrared, sometimes are small problems, because some +IrDa connectors are not compatible with some standards... + +

How can I get support for it ?
+


+ +

We our only people and we sometimes make mistakes. But don't worry: +support for gnokii is really great. At first, you can tell your problem +to all gnokii users (in May 2000 on the list there were subscribed about +1000 people). + +

The most often it's enough. If not, contact with authors: + +

When problem is connected with module for concrete phone, write to people +listed in answer for question Which phones are supported ?. +For other parts: Jan Derfinak +is responsible for xgnokii. + +

How to contact with gnokii users ?
+


+ +

Thanks to the efforts of +Martin Hamilton we have a Majordomo based mailing +list gnokii@net.lut.ac.uk. + +

You can subscribe by sending email to +gnokii-request@net.lut.ac.uk with the word subscribe in the body of the text. + +

+Note that the list is not a forum for discussion on how to obtain copies of +Nokia's proprietary software. +It is the primary discussion forum for the project. + +

Archive of the list + +

Does Nokia sponsors/supports this work ?
+


+ +

In the early stages of the project there were indications that +Nokia would provide some support for the project. Regrettably, these +negotiations stalled over the issue of binary versus open source +releases and the project has proceeded without official or unofficial +assistance. + +

How can I help with creating it ?
+


+ +

There are some things, you can do you gnokii: + +

+

    +
  • Tell us that you're interested, or that you would use the resulting +software or that you would be happy to test it out. + +

    The best method to make it is to adding yourself to the user database +at http://gnokii.org/users. +
      +

  • + +
  • +Give your input in discussions about the design and development of the suite +now that we are at that stage. In particular the best model of driver +interface will need to be discussed broadly to get the best result. +We've only had limited driver writing experience so if you've more, let us know! +
      +
  • + +
  • +Help examining the protocol and its differences between phone models. +
      +
  • + +
  • +Port the software to a new platform. Please tell us before you do so to ensure +that the port will integrate nicely into the source code tree. +
      +
  • + +
  • +Help us in writing our software or preparing help into it. +
  • +
+ +

Where to get latest versions ?
+


+ +

The source of gnokii aplications is in the CSV server. + +

We want to thank to Andrew Tridgell, Samba team for it... +and Czech Linux Users Group for hosting the original +CVS repository at cvs.linux.cz. + +

The server's address is pserver.samba.org. If you +are already familiar with CVS, set the CVSROOT to + +

:pserver:cvs@pserver.samba.org:/cvsroot + +

and use the password cvs for checking out the repository with the name +gnokii. + +

If you are not familiar with cvs, don't worry. It's very simple. +First, you need some of older gnokii releases (sources) - see for example +links in the end of this question. Unpack them to some directory. Then: + +

+

    + +
  • +For Unix/Linux +just install the cvs package for your distribution and follow these steps: + +

    +

      +
    • set your environmental variable CVSROOT. If you have bash (Bourne +Again Shell): + +

      export CVSROOT=:pserver:cvs@pserver.samba.org:/cvsroot + +

      If you have different shell, use different command (e.g. setenv). + +

        +

    • + +
    • Log in to the CVS server as anonymous reader by typing + +

      cvs login + +

      Use cvs as your password. + +

        +

    • + +
    • If you are logged in you are ready to checkout the latest sources: + +

      cvs co gnokii +

      +

    • +
    + +
  • + +
  • +for win32 and (WinCVS): + +

    +

      + +
    • +Go to the Admin/Preferences window +
    • + +
    • +In the "general" tab set CVSROOT to the cvs@pserver.samba.org:/cvsroot +and local mounted directory to the "passwd" file on the server +

      +

    • + +
    • Go to the Admin/Login window
    • + +
    • Enter cvs as the password

    • + +
    • Go to the Admin/Create/Checkout module
    • + +
    • Enter gnokii as module name and directory where have gnokii source +(WinCVS will + create a directory called gnokii under the one you specify)
    • +
    + +

    +

  • +
+ +

If you prefer, there is a WWW interface to the CVS server at +http://samba.org/cgi-bin/cvsweb/gnokii/. + +

Now you are on your own - you have the current sources on your disk +in the directory gnokii. If you are going to make substantial changes +and feel that they should be included into gnokii please mention it +on the list first to avoid duplicated effort. + +

If you would like to receive email when updates are made to the CVS +repository, just send email to +Hugh Blemings email to that effect +and you'll be added to the recipients list. + +

Another way to get almost latest (x)gnokii tools is to download it from +pages of authors: + +

+

+ +

Remember: it's still work in progress. It means, that we very often change it, +add new functions and correct our bugs (sometimes once a day :-))... So, +it's good to check it often... + + + + diff --git a/Docs/en_US/gnokii/gnokii-6210-7110-IrDA b/Docs/en_US/gnokii/gnokii-6210-7110-IrDA new file mode 100644 index 0000000..65e879d --- /dev/null +++ b/Docs/en_US/gnokii/gnokii-6210-7110-IrDA @@ -0,0 +1,96 @@ +Getting gnokii to work with a 6210 under linux +============================================== + +- Compile your kernel with IrDA support for your chipset. + +For me on my VAIO this was: +CONFIG_IRDA=m +CONFIG_IRCOMM=m +CONFIG_IRDA_OPTIONS=y +CONFIG_IRDA_DEBUG=y + +CONFIG_IRTTY_SIR=m + Use the emulation of serial port part of your IrDA chipset or... +CONFIG_NSC_FIR=m + Specify the one you have (I have a NSC 87338) + +- Reboot onto new kernel etc. +- Check your serial devices don't conflict with the ioport/irq that your + chipset driver will try to use: + setserial /dev/ttySX (where X is 0 -> 3) should give you the information + you need. + If you have a device that conflicts with your ioport/irq then you will + need to remove the serial driver's control over it with: + setserial /dev/ttySX uart none port 0 irq 0 + (where X is there relevant port mine is /dev/ttyS2) +- I used the chipset way to get IrDA working. + I needed: + options nsc-ircc dongle_id=0x09 + alias irda0 nsc-ircc + in /etc/modules.conf + Then just irattach irda0 -s 1 which *should* load all the modules you need + and start it doing irda discovery. + The modules I have loaded at this point are: nsc-ircc and irda. +- Run irdadump to see that it is indeed attempting to discover something. + You should see messages like: +15:24:07.380360 xid:cmd 0c57083d > ffffffff S=6 s=0 (14) +15:24:07.470333 xid:cmd 0c57083d > ffffffff S=6 s=1 (14) +15:24:07.560310 xid:cmd 0c57083d > ffffffff S=6 s=2 (14) +15:24:07.650283 xid:cmd 0c57083d > ffffffff S=6 s=3 (14) +15:24:07.740279 xid:cmd 0c57083d > ffffffff S=6 s=4 (14) +15:24:07.830279 xid:cmd 0c57083d > ffffffff S=6 s=5 (14) +15:24:07.920311 xid:cmd 0c57083d > ffffffff S=6 s=* langly hint=0400 [ Computer +] (22) +- Place the phone in front of it, enable the Infrared parts of it (Menu 90) + then it should change to be like: +15:26:07.380336 xid:cmd 0c57083d > ffffffff S=6 s=0 (14) +15:26:07.470288 xid:cmd 0c57083d > ffffffff S=6 s=1 (14) +15:26:07.560284 xid:cmd 0c57083d > ffffffff S=6 s=2 (14) +15:26:07.650281 xid:cmd 0c57083d > ffffffff S=6 s=3 (14) +15:26:07.740280 xid:cmd 0c57083d > ffffffff S=6 s=4 (14) +15:26:07.847192 xid:rsp 0c57083d < d10e0000 S=6 s=4 Nokia 6210 hint=b125 [ PnP Modem Fax Telephony IrCOMM IrOBEX ] (27) +15:26:07.830293 xid:cmd 0c57083d > ffffffff S=6 s=5 (14) +15:26:07.920283 xid:cmd 0c57083d > ffffffff S=6 s=* langly hint=0400 [ Computer +] (22) +- Now try using ircomm to talk to the phone. Try minicom /dev/ircomm0 (you + may need to setup a default profile for this port as the root user with + minicom -s /dev/ircomm0). +- This depends on your distribution having the right lines in modules.conf + for ircomm to be loaded: +alias tty-ldisc-11 irtty +alias char-major-160 irda0 +alias char-major-161 ircomm-tty + And your /dev/ircomm0 should be character device 161,0. + Debian testing/unstable gets this right. + If these don't work you may need to load ircomm and ircomm-tty manually. +- minicom /dev/ircomm0 should now work and AT commands should function. +- With a .gnokiirc modified as follows: + port = /dev/ircomm0 + model = 6210 + connection = irda + gnokii --monitor should now function. + + [huggie@langly ~]$ gnokii --monitor + Entering monitor mode... + RFLevel: 100 + Battery: 100 + SIM: Used 5, Free 85 + etc. + + Not all the functions for 6210 work yet seemingly. + +- If instead gnokii hangs then you may have a version of gnokii that still + has recv() in irda_open of common/devices/unixirda.c. Just comment out + that line, recompile and try again. + + +Simon Huggins +------------------------------------------------------------------------------ +big performance boost !! +I kompile my kernel (linux 2.4.7) with: +CONFIG_IRDA_OPTIONS=y +CONFIG_IRDA_CACHE_LAST_LSAP=y +CONFIG_IRDA_FAST_RR=y +this reduce reading phonebook from 150 to 20 seconds !!! + +Ralf Thelen [ralf@mythelen.de] diff --git a/Docs/en_US/gnokii/gnokii.htm b/Docs/en_US/gnokii/gnokii.htm new file mode 100644 index 0000000..2e00fd1 --- /dev/null +++ b/Docs/en_US/gnokii/gnokii.htm @@ -0,0 +1,1654 @@ + + + + + Command line gnokii FAQ + + + + + +

Main page

+
Command line gnokii FAQ
+ +


+ +

What is command line gnokii ?
+


+ +

It was first our testing tool. Now it can be used for making almost all things +possible with gnokii package (and this is the only available tool for win32). + +

Some general commands...
+


+ +
+
gnokii --help +
Displays GNOKII list of parameters: +
c:\> gnokii --help
+   usage: gnokii [--help|--monitor|--version]
+          gnokii --getmemory memory_type start [end] [-d]
+          gnokii --writephonebook [-i]
+          gnokii --getspeeddial number
+          gnokii --setspeeddial number memory_type location
+          gnokii --getsms memory_type start [end] [-f file]
+          gnokii --deletesms memory_type start [end]
+          gnokii --sendsms destination [--smsc message_center_number |
+                 --smscno message_center_index] [--long n] [-s] [-C n]
+                 [-8] [-v n] [-d]
+          ........
+
+
+ +
+
gnokii --version +
Displays GNOKII version and copyright information: +
c:\> gnokii --version      
+GNOKII Version 0.3.3-pre8-gold
+Copyright (C) Hugh Blemings , 1999, 2000
+Copyright (C) Pavel Janík ml. , 1999, 2000
+Built 10:36:05 Dec 10 2000 for 6110 on com2: 
+
+
+ +

Managing phonebook and other (dialed, misssed, answered, own, etc.) memories
+


+ +
+
gnokii --getmemory memory_type start [end] [-d] +
Reads specificed memory location from phone.. +

You can specify such memories: + +

+

    +
  • ME - Phone phonebook memory
  • +
  • SM - SIM card phonebook memory,
  • +
  • FD - Fixed dial numbers,
  • +
  • ON - Own numbers,
  • +
  • EN - Emergency numbers,
  • +
  • DC - Dialled numbers,
  • +
  • RC - Received numbers,
  • +
  • MC - Missed numbers,
  • +
  • LD - Last dialed
  • +
+ +

+With memories DC, EC, MC you will see assigned date (yes, with all Dialled, +Received, Missed numbers phone saves date and time too !). If you don't want +it, use -d option + +

Note: Locations start from 0 ! + +

Usage examples: + +

tfuj:~$ gnokii --getmemory SM 1 5
+Maja ERA;+48604xxxxxx;SM;1;1
+Dom;+4822xxxxxxx;SM;2;5
+Maja;+4822xxxxxxx;SM;3;1
+Iza;+48601xxxxxx;SM;4;5
+Ania;+48501xxxxxx;SM;5;0
+
+tfuj:~$ gnokii --getmemory ON 1 5
+DOM;+4822xxxxxxx;ON;1;5
+;;ON;2;5
+;;ON;3;5
+;;ON;4;5
+ON|5|Bad location or other error!(22)
+
+tfuj:~$ gnokii --getmemory EN 1 5
+Memory type EN not supported!
+
+tfuj:~$ gnokii --getmemory MC 1 5
+Maja IDEA;501xxxxxx;MC;1;5
+21.06.2000 21:32:52
+Maja IDEA;0501xxxxxx;MC;2;5
+21.06.2000 18:06:02
+;;MC;3;5
+11.06.2000 15:09:33
+;;MC;4;5
+11.06.2000 12:44:55
+;;MC;5;5
+10.06.2000 16:59:13
+
+ +

The meaning of the fields in the output: +

    +
  • + ME/SM/ON/FD/EN/LD: +
      +
    1. Name
    2. +
    3. Number
    4. +
    5. Memory type
    6. +
    7. Location in the memory
    8. +
    9. Group number
    10. +
    +
  • + DN/RC/MC: +
      +
    1. Name
    2. +
    3. Number
    4. +
    5. Memory type
    6. +
    7. Location in the memory
    8. +
    9. Group number
    10. +
    11. Date and time of the call
    12. +
    +
  • +
+ +

Possible errors: +

    +
  1. Bad location or other error!(22)
  2. +
  3. Memory type XX not supported!
  4. +
+ +
+ +
+
gnokii --writephonebook [-i] +
+Reads the data from the standard input and saves it in the SIM Card/phone +memory. The input data is in the format as described above (in desciption +for --getmemory parameter). + +

Usage examples: + +

+tfuj:~$ gnokii --writephonebook
+
+Girlfriend;+48501000000;ME;1;1
+Write Succeeded: memory type: int, loc: 1, name: Girlfriend, number: +48501000000
+
+tfuj:~$ echo "Very_long_name_longer_then_the_phone_can_save;some_string;ME;2;1" | gnokii --writephonebook
+Write Succeeded: memory type: int, loc: 2, name: Very_long_name_longer_then_the_phone_can_some_string, number: some_string
+
+tfuj:~$ echo "Girlfriend;+48501000000;ME;200;1" | gnokii --writephonebook
+Write FAILED(22): memory type: int, loc: 200, name: Girlfriend, number: +48501000000
+
+tfuj:~$ echo "Girlfriend;+48501000000;ME;3;10" | gnokii --writephonebook
+Write Succeeded: memory type: int, loc: 3, name: Girlfriend, number: +48501000000
+
+tfuj:~$ gnokii --getmemory ME 1 5
+Girlfriend;+48501000000;ME;1;1
+Very_long_name_l;//3/////2#4;ME;2;1
+Girlfriend;+48501000000;ME;3;10
+;;ME;4;5
+;;ME;5;5
+
+tfuj:~$ echo "Girlfriend;+48501000000;PP;3;10" | gnokii --writephonebook
+Format problem on line 1 [Girlfriend;+48501000000;PP;3;10]
+
+tfuj:~$ echo "some_nonsense_string" | gnokii --writephonebook
+tfuj:~$ 
+
+ +

Some notes: +

    +
  1. Remember that any existent entries in the phonebook will be overwritten + (must use [-i] option, if you don't want it - you will be asked then, if + you want overwrite or not)
  2. +
  3. Names and numbers are truncated by the phone when saving.
  4. +
+ +

Possible errors: +

    +
  1. Wrong location: Write FAILED(22)
  2. +
  3. Wring memoty type: Format problem on line n
  4. +
  5. Other errors: [no output] - this should be changed
  6. +
+ +
+ +
+
gnokii --getvoicemailbox +
Get voice mailbox number + +

Example: +

+
+
+
+ +

Speed dials
+


+ +
+
gnokii --getspeeddial number +
Reads from the phone a number assigned to a shotrcut key + +

Example: +

+tfuj:~$ gnokii --getspeeddial 1
+SpeedDial nr. 1: 3:0
+
+The output format: SpeedDial nr. key_number: memory_type:location. + +

On error output is empty. +

+ +
+
gnokii --setspeeddial number memory_type location +
Writes to the phone a number assigned to a shotrcut key. +You can use memory SM or ME. + +

Example: + +

+tfuj:~$ gnokii --setspeeddial 1 SM 1
+Succesfully written!
+
+tfuj:~$ gnokii --setspeeddial 1 PP 1    
+Unknown memory type PP!
+
+ +

...but there are still some bugs: + +

+tfuj:~$ gnokii --setspeeddial 1 SM 10000
+Succesfully written!
+
+tfuj:~$ gnokii --getspeeddial 1
+SpeedDial nr. 1: 3:16
+
+
+ +

SMS (Smart Messaging System)
+


+ +

If you don't know anything about SMS, please read our SMS FAQ. + +

+
gnokii --getsms memory_type start [end] [-f file] +
Reads SMS messages from the specified memory_type (it can +be phone's internal memory - ME - or SIM card - SM memory) starting at +start and ending at end. If end argument is not +present only one location - start - is read. + +

Examples: + +

tfuj:~$ gnokii --getsms SM 11
+11. Inbox Message (read)
+Date/time: 29/6/0 13:41:22 +0100
+Sender: 102 Msg Center: +48501200777
+Text:
+SMS OD: Mariusz, Wszystkiego najlepszego z okazji imienin! Mariusz
+
+tfuj:~$ gnokii --getsms SM 3
+3. Delivery Report (read)
+Sending date/time: 25/5/0 13:58:24 +0100
+Response date/time: 25/5/0 13:58:32 +0100
+Receiver: +48605000000 Msg Center: +48501200777
+Text: Delivered
+
+tfuj:~$ gnokii --getsms SM 5
+5. Outbox Message (not sent)
+Text: UU0i7eec
+
+tfuj:~$ gnokii --getsms SM 12
+GetSMS SM 12 failed!(4)
+
+tfuj:~$ gnokii --getsms SM 15
+15. Delivery Report (read)
+Sending date/time: 3/1/0 10:49:51 +0100
+Response date/time: 6/1/0 10:51:06 +0100
+Receiver: 1921681052342802 Msg Center: +48501200777
+Text: Failed
+
+tfuj:~$ gnokii --getsms SM 28
+SMS location SM 28 empty.
+
+tfuj:~$ gnokii --getsms SM 25 28
+25. Inbox Message (read)
+Date/time: 18/6/0 12:17:30 +0100
+Sender: 501 Msg Center: +48501200777
+Text:
+Liczba wiadomosci:1,nowych:1,faksow:0
+
+SMS location SM 26 empty.
+27. Inbox Message (read)
+Date/time: 21/6/0 19:45:11 +0100
+Sender: 123 Msg Center: +48501200777
+Text:
+Informujemy, ze wyslalismy do Panstwa fakture z terminem platnosci do 28.06.00. Dziekujemy za wybranie sieci Idea.
+
+SMS location SM 28 empty.
+
+tfuj:~$ gnokii --getsms SM 31
+Invalid location: SM 31
+
+
+
+ +
+
gnokii --deletesms memory_type start [end] +
+Deletes SMS messages from specified memory type (SM or ME) +starting at entry start and ending at end + +

Examples: + +

+
+
+ +
+
+gnokii --sendsms destination [--smsc message_center_number | +--smscno message_center_index] [--long n] [-s] [-C n] +[-8] [-v n] [-d] +[--enablevoice|--disablevoice|--enablefax|--disablefax| +--enableemail|--disableemail|--void] [--unicode] +
+Sends an SMS message to destination +via SMSC number given in message_center_number or SMSC number taken from +phone memory from address message_center_index. +If arguments --smsc and --smscno is ommited SMSC number is taken +from phone memory from location 1. Message text +is taken from standard input. + +

Meaning of optional parameters: +

    +
  • --smsc - specify SMSC set
  • +
  • --smscno - specify SMSC number
  • +
  • --long - reads n bytes and cut into Linked SMS +(only when contenst is longer than size of 1 SMS)
  • +
  • -s - set replying via the same centre
  • +
  • -C - specify SMS class
  • +
  • -8 - send as 8-bit SMS
  • +
  • -v - set validity
  • +
  • -d - you will receive delivery report
  • +
  • --enablevoice, --disablevoice, --enablefax, +--disablefax, --enableemail, --disableemail - +These switches makes, that SMS has different meaning and in some phones +will enable/disable voice/fax/email signs on phone's screen
  • +
  • --voidsms - +These switches makes, that SMS has different meaning and some phones +after receiving it won't +display anything on the screen, but it will make sound/enable vibra
  • +
  • --unicode - codes SMS as Unicode SMS. When put +'~' (tilde) char inside, phone will start/end +blinking text. When will put "{" char, +contents of SMS will be invisible in some phones.
  • +
+ +

Examples: + +

+gnokii --sendsms "+48601601601" < file
+
+
+Saves an SMS message in SIM. Message text is taken from stdin. + +
+
+gnokii --savesms destination|\"\" [--smsc +message_center_number] [--smscno message_center_index] +[--long n] [-r] [-i] [-s] [-C n] [-8] [-a] [-l] +[--enablevoice|--disablevoice|--enablefax|--disablefax| +--enableemail|--disableemail|--void|--hang|--bug] [--unicode] + +
+ +

Meaning of optional parameters: +

    +
  • --smsc - specify SMSC set
  • +
  • --smscno - specify SMSC number
  • +
  • --long - reads n bytes and cut into Linked SMS +(only when contenst is longer than size of 1 SMS)
  • +
  • -r - mark SMS as read/sent
  • +
  • -i - saves SMS to inbox
  • +
  • -s - set replying via the same centre
  • +
  • -C - specify SMS class
  • +
  • -8 - send as 8-bit SMS
  • +
  • -a - ask, when specify location and sms is already there
  • +
  • -l - specify location
  • +
  • --enablevoice, --disablevoice, --enablefax, +--disablefax, --enableemail, --disableemail - +These switches makes, that SMS has different meaning and in some phones +will enable/disable voice/fax/email signs on phone's screen
  • +
  • --voidsms - +These switches makes, that SMS has different meaning and some phones +after receiving it won't +display anything on the screen, but it will make sound/enable vibra
  • +
  • --hangsms - +This switch makes, that SMS has different meaning and in some phones +(like Nokia 5110) it will hang phone, when saved to Outbox and +you try to read it from phone's menu
  • +
  • --bug - +This switch makes, that SMS has different meaning and in some phones +(like Nokia 5110, 6150) has problems with this SMS, when try to read it +from phone's menu. It seems to be its firmware bug... +
  • +
  • --unicode - codes SMS as Unicode SMS. When put +'~' (tilde) char inside, phone will start/end +blinking text. When will put "{" char, +contents of SMS will be invisible in some phones.
  • +
+ +

Examples: + +

+gnokii --savesms "SavedSMS" -i < file
+
+
+ +
+
gnokii --getsmsc message_center_number +
show the SMSC number from location message_center_number. + +

Usage examples: + +

+tfuj:~$ gnokii --getsmsc 1
+1. SMS center (CENTERTEL) number is +48501200777
+Messages sent as Text
+Message validity is 72 hours
+
+tfuj:~$ gnokii --getsmsc 2
+2. SMS center () number is 
+Messages sent as Text
+Message validity is Unknown
+
+
+ +

Date/time and alarm
+


+ +
+
gnokii --getdatetime +
+Shows current date and time in the phone. + +

Example: + +

+tfuj:~$ gnokii --getdatetime
+Date: 2000/07/06
+Time: 23:50:43
+
+
+ +
+
gnokii --setdatetime [YYYY [MM [DD [HH [MM]]]]] +
+Set the date and the time of the phone. + +

Example: + +

+
+
+ +
+
gnokii --getalarm +
+Shows current alarm set in phone. + +

Example: + +

+
+
+ +
+
gnokii --setalarm HH MM +
+Set the alarm of the phone. + +

Example: + +

+
+
+ +

Calendar
+


+ +
+
gnokii --getcalendarnote index [-v] +
+Get the note with number index from calendar. It will be written in +vCalendar 1.0 format, when use -v option. + +

Example: + +

+tfuj:~$ gnokii --getcalendarnote 1
+   Type of the note: Reminder
+   Date: 2000-06-26
+   Time: 23:59:59
+   Text: GNOKII TEST
+
+tfuj:~$ gnokii --getcalendarnote 2
+The calendar note can not be read
+
+tfuj:~$ gnokii --getcalendarnote 1 -v
+BEGIN:VCALENDAR
+VERSION:1.0
+BEGIN:VEVENT
+CATEGORIES:MISCELLANEOUS
+SUMMARY:GNOKII TEST
+DTSTART:20000626T235959
+END:VEVENT
+END:VCALENDAR
+
+
+ +
+
gnokii --writecalendarnote vcardfile number +
+Write the note to calendar. + +

Example: + +

+
+
+ +
+
gnokii --deletecalendarnote index +
+Delete the note with number index from calendar. + +

Example: + +

+
+
+ +

+ +Netmonitor
+


+ +

If you don't know, what is this or how to use it, please read first +our Netmonitor manual. + +

+
gnokii --netmonitor {reset|off|field|devel|next|nr} +
+Setting/querying netmonitor mode. + +

Example: + +

+tfuj:~$ gnokii --netmonitor 0
+TMSI46963A06
+T321:  2/ 20
+PRP:5   0  0
+     0   784
+
+tfuj:~$ gnokii --netmonitor 1    
+ 784 -72 xxx
+ 0  0 x xxxx
+  29      29
+    CBCH
+
+tfuj:~$ gnokii --netmonitor 2
+ NO 2    B35
+ 16   x
+
+tfuj:~$ gnokii --netmonitor 3
+784 28-73 28
+781 19-82 19
+809 19-82 19
+     N  N
+
+tfuj:~$ gnokii --netmonitor 4
+778 12-89 12
+794 11-90 11
+774  8-93  8
+   N  N  N
+
+tfuj:~$ gnokii --netmonitor 5
+800-99-99-99
+xxxxxxxxxxxx
+xxxxxxxxxxxx
+   N xx xx
+
+tfuj:~$ gnokii --netmonitor 6
+26003  26002
+20420  26001
+26207  20810
+26203  20416
+
+tfuj:~$ gnokii --netmonitor 7
+E A H C I BR
+1 1 0 0 0 10
+
+tfuj:~$ gnokii --netmonitor 1000
+
+  NO TEST
+
+
+ +
+
gnokii --nm_collect [screen x] [screen y] [screen z] +
+This function is like --netmonitor, but: + +

+

    +
  • each screen is printed on one single line
  • +
  • it loop until user press CTRL-C, (like --monitor)
  • +
  • it output simultaneously 1, 2 or 3 netmonitor screen
  • +
+ +

Was originally developed for: + +

+

    +
  • comparing of data from differents screen.
  • +
  • log of netmonitor screen
  • +
+ +

It's easier and has less options than --netmonitordata, but +should work with every phone that has netmonitor enabled and +don't need any parameter specifications (like --netmonitordata, +which requires external file with info about parameters). + +

Author: Andrea Scopece + +

Example: + +

+
+
+ +
+
+gnokii --netmonitordata [-S file] [-I file] [-h] [-n n] [-ts n] [-tm n] +[-fs str] [-ls str] FLD1:FLD2:FLDn:... +
+ +

Meaning of parameters is: +

+

    +
  • -fs string - field separator, default " "
  • +
  • -ls string - line separator, default LF (CRLF for win32)
  • +
  • -ts seconds - seconds before of next output of data (min 1 s, +max 3600 s)
  • +
  • -tm milliseconds - milliseconds before of next output of data +(default 200 ms, min 200 ms, max 10000 ms)
  • +
  • -n times - stop data output after "times" cycle. + -ts and -tm are mutually exclusive
  • +
  • -h - no header output, (default yes)
  • +
  • DATE - output date, may be as normal YY-MM-DD
  • +
  • DATE-S - output date, may be as short MM-DD
  • +
  • DATE-L - output date, may be as long yyyy-mm-dd
  • +
  • TIME - output time, may be as normal hh:mm:ss
  • +
  • TIME-S - output time, may be as short hh:mm
  • +
  • TIME-L - output time, may be as long hh:mm:ss:cc
  • +
  •   + + + +
    PARAM1 +
    PARAM2 +
    PARAM3 +
    .... +
    PARAMn +
    +This is the name of a param as specified in file +info-mon/model/version +parameter names must be in this file, and are case sensitive. + +

    You can specify max 512 params at once. +

    +
  • + +
  • -S file - parameters of netmonitor screen +you can override the default specification +of netmonitor parameters, suppling a file here.
  • +
  • -I file - sequence of command line's argument +this is useful execute a series of different +operation, like calling: +
    gnokii --netmonitordata args_set_1 +
    gnokii --netmonitordata args_set_2 +
    gnokii --netmonitordata args_set_3 +
    gnokii --netmonitordata args_set_n +
    + +

    file contains arguments as normally specified +on command line, but: + +

    on every line you should specify -n n option +so processing can stop without user intervent, +and continue with next line args_set. + +

    May be useful to make some pre-made collection, +as one made for battery check poupose, as +anothor to monitor neighbor cells, and so on. + +

    Inside this file options -I and option -S +are silently ignored + +

    Line in this file may be max length 1024 +

  • +
+ +

Here is also note from author: + +

Checks of all arguments, and eventually files contents, are made +before start of data output. + +

Because of complexity of command line, phone spec, and eventually +command file, on error, you have datailed description of any error, + +

Also I attached here an examples of commands-file (see /Docs/examples) +that can run with: +mygnokii --netmonitordata -S netmonitordata_6150_413 -I nmd_commands + +

Users of same model but with other firmware version probably +should do very little work for an exact parameters specifications +of theirs phones. + +

Users of 5110 and 6110 probably should remove some parameters not +available, like parameters related to dual band. + +

Users of other phone models should write a new parameters-file: +some hints are available in file netmonitordata_6150_413. + +

If help is needed, please dump the screen, +(mygnokii --netmonitor 20 > screen_20.txt), +and send an e-mail to my address. + +

If available, check help screen by pressing '*' on phone +(during netmonitor session). + +

Scope of this work is monitoring some "user-interesting" +parameters, coming from differents screen, like battery charging +vs. time, cell ID and channel changes vs. signal strenght, ... + +

This is work in progress, so any input would be appreciated. + +

Author: Andrea Scopece + +

Example: + +

+gnokii --netmonitordata -S file RxL:LAC:CID
+
+gnokii --netmonitordata -S file -fs ";" RxL:LAC:CID
+
+
+ +

Logos and startup texts
+


+ +

If you don't know, what is logo, please read first our logos FAQ. + +

+
+gnokii --bitmapconvert source destination +
gnokii --bitmapconvert source destination op [network code] +
gnokii --bitmapconvert source destination caller [caller group number] +
gnokii --bitmapconvert source destination startup +
+
+Converts logo files. Supported formats: +NOL, NGG, NSL, NLM, BMP, OTA, XPM. +3'rd parameter allow to specify, what type should be destination +logo (when format allows for it). + +

Usage examples: + +

+
+
+ +
+
+gnokii --sendlogo op destination logofile network_code +[--smsc message_center_number] [--smscno message_center_index] +[-s] [-v n] [-d] +
gnokii --sendlogo caller destination logofile +[--smsc message_center_number] [--smscno message_center_index] +[-s] [-v n] [-d] +
+
+Send the logofile to destination as operator +or CLI logo. Optional parameters: + +

+

    +
  • --smsc - specify SMSC set
  • +
  • --smscno - specify SMSC number
  • +
  • -s - set replying via the same centre
  • +
  • -v - set validity
  • +
  • -d - you will receive delivery report
  • +
+ +

Usage examples: + +

+
+
+ +
+
+gnokii --savelogo op logofile network_code +[--smsc message_center_number] [--smscno message_center_index] +[-r] [-i] [-s] [-a] [-l] [--name name] +
gnokii --savelogo caller logofile +[--smsc message_center_number] [--smscno message_center_index] +[-r] [-i] [-s] [-a] [-l] [--name name] +
+
+Saves the logofile on SIM as operator +or CLI logo. Optional parameters: + +

+

    +
  • --smsc - specify SMSC set
  • +
  • --smscno - specify SMSC number
  • +
  • -r - mark as read
  • +
  • -i - save to inbox
  • +
  • -s - set replying via the same centre
  • +
  • -a - ask, when specify location and sms is already there
  • +
  • -l - specify location
  • +
  • --name - specify recipient/sender name instead of default
  • +
+ +

Usage examples: + +

+
+
+ +
+
+gnokii --setlogo op [logofile] [network code] +
gnokii --setlogo startup [logofile] +
gnokii --setlogo caller [logofile] [caller group number] [group name] +
gnokii --setlogo {dealer|text} [text] +
+
+Set caller, startup or operator logo or set (Dealer) welcome note. + +

In Nokia 6110/6130/6150 you will see menu in phone after using it... + +

Usage examples: + +

+
+
+ +
+
+gnokii --getlogo op [logofile] [network code] +
gnokii --getlogo startup [logofile] [network code] +
gnokii --getlogo caller [logofile][caller group number][network code] +
gnokii --getlogo {dealer|text} +
+
+Get caller, startup or operator logo or get (Dealer) welcome note. + +

Usage examples: + +

+
+
+ +

Ringtones
+


+ +
+
+gnokii --sendringtone destination ringtonefile +[--smsc message_center_number] [--smscno message_center_index] +[-s] [-v n] [-d] [--scale] + +
+Send the RTTL/OTT file to destination as ringtone. + +

+

    +
  • --smsc - specify SMSC set
  • +
  • --smscno - specify SMSC number
  • +
  • -s - set replying via the same centre
  • +
  • -v - set validity
  • +
  • -d - allow to receive delivery report, when send
  • +
  • --scale - saves scale info with all tones. It allow +to eliminate firmware bug in some Nokia phones.
  • +
+ +

Usage examples: + +

+
+
+ +
+
+gnokii --saveringtone ringtonefile +[--smsc message_center_number] [--smscno message_center_index] +[-r] [-i] [-s] [-a] [-l] [--name name] [--scale] + +
+Saves ringtone on SIM. + +

+

    +
  • --smsc - specify SMSC set
  • +
  • --smscno - specify SMSC number
  • +
  • -r - mark as read
  • +
  • -i - save to inbox
  • +
  • -s - set replying via the same centre
  • +
  • -s - set replying via the same centre
  • +
  • -a - ask, when specify location and sms is already there
  • +
  • -l - specify location
  • +
  • --name - specify recipient/sender name instead of default
  • +
  • --scale - saves scale info with all tones. It allow +to eliminate firmware bug in some Nokia phones.
  • +
+ +

Usage examples: + +

+
+
+ +
+
+gnokii --setringtone ringtonefile + [location] + +
+Set the RTTL/OTT as ringtone + +

In Nokia 6110/6130/6150 you will see menu in phone after using it... + +

Usage examples: + +

+
+
+ +
+
+gnokii --getbinringtone ringtonefile + [location] + +
+Gets downloadable ringtone and writes it in the special binary format +(it's not yes decoded - after making it this function can be unavailable). + +

Usage examples: + +

+
+
+ +
+
+gnokii --setbinringtone ringtonefile + [location] + +
+Sets downloadable ringtone. Ringtonefile is in format used by +--getbinringtone. Mygnokii contains some default Nokia phones +ringtones saved in this format. + +

Usage examples: + +

+
+
+ + +
+
+gnokii --ringtoneconvert source destination + +
+Converts ringtone files (RTTL, OTT) + +

Usage examples: + +

+
+
+ +
+
+gnokii --playringtone file + +
+Plays ringtone in phone + +

Usage examples: + +

+
+
+ +
+
+gnokii --composer ringtonefile + +
+Shows, how ringtone will look in Composer in phone...and how to enter it there... + +

Usage examples: + +

+
+
+ +
+
+gnokii --allringtones + +
+Shows names of ringtones in your phone (to test, if they're put into source) + +

Usage examples: + +

+
+
+ +

Backup/restore tool
+


+ +
+
+gnokii --backupsettings file [subformat] + +
+Writes various settings into one file + +

Supported formats: LMB (Logo Manager Backup - full support for +N61xx/51xx features; for N7110/6210 some things can be missed, when compare +to files saved by LM), +CSS (NCDS3 - only phonebook part), +CSV (subformats: ncds2, lm, ncds3_pl - some things missed for N7110/6210), +SCM (WinTesla) + + + +

Usage examples: + +

+
+
+ +
+
+gnokii --restoresettings file + +
+ +

+

    +
  1. restores various settings from one file
  2. +
  3. allow to write phonebooks and logos into separate files.
  4. +
+ +

Supported formats: LMB (Logo Manager Backup - full support for +N61xx/51xx features; for N7110/6210 some things can be missed, when compare +to files saved by LM), +CSS (NCDS3 - only phonebook part), +CSV (subformats: ncds2, lm, ncds3_pl - some things missed for N7110/6210), +SCM (WinTesla) + + + + +

Usage examples: + +

+
+
+ +

Profiles
+


+ +
+
+gnokii --getprofile [number] + +
+Show settings for selected(all) profile(s) + +

Usage examples: + +

+tfuj:~$ gnokii --getprofile 1
+1. "General"
+Incoming call alert: Ringing
+Ringtone number: 19
+Ringing volume: Level 3
+Message alert tone: Standard
+Keypad tones: Off
+Warning and game tones: On
+Vibration: On
+Caller groups: 0x00
+
+
+ +
+
+gnokii --setprofile number feature value + +
+Set profile feature + +

Possible features are: +

    +
  • callalert (Incoming call alert) +
    possible values are: +
      +
    • ringing (Ringing)
    • +
    • ascending (Ascending)
    • +
    • ringonce (Ring once)
    • +
    • beeponce (Beep once)
    • +
    • ringing (Ringing)
    • +
    • groups (Caller groups - not in N5110)
    • +
    • off,0 (Off)
    • +
    +
  • +
  • volume (Ringing volume) +
    possible values are: 1|2|3|4|5 +
  • +
  • keypad,keypadtone (Keypad tones) +
    possible values are: +
      +
    • 0,off (Off)
    • +
    • 1 (Level 1)
    • +
    • 2 (Level 2)
    • +
    • 3 (Level 3)
    • +
    +
  • +
  • smstone,messagetone,sms,message (Message alert tone) +
    possible values are: +
      +
    • 0,off (No tone)
    • +
    • standard (Standard)
    • +
    • special (Special)
    • +
    • beeponce,once (Beep once)
    • +
    • ascending (Ascending)
    • +
    +
  • +
  • warningtone,warning (Warning and game tones) +
    possible values are: 0|off|1|on +
  • +
  • vibra,vibration (Vibration) +
    possible values are: 0|off|1|on +
  • +
  • lights (Lights) +
    possible values are: +
      +
    • 0,off (Automatic)
    • +
    • 1,on (On)
    • +
    +
  • +
  • answer (Automatic answer) +
    possible values are: 0|off|1|on +
  • +
  • name - profile name (doesn't work in N5110) +
    value is new profile name +
  • +
  • ringtone (Ringing tone) +
    value is new ringing tone number +
  • +
  • groups - caller group name for profile +
    value is new caller group number +
  • +
+ +

Usage examples: + +

+
+
+ +

Security features
+


+ +

This functions are available ONLY, if gnokii was compiled with them ! + +

+
+gnokii --entersecuritycode PIN|PIN2|PUK|PUK2 + +
+Asks for the code and sends it to the phone + +

Usage examples: + +

+
+
+ +
+
+gnokii --getsecuritycodestatus + +
+Show if a security code is needed + +

Usage examples: + +

+
+
+ +
+
+gnokii --getsecuritycode PIN|PIN2|PUK|PUK2|SecurityCode + +
+Gets security code (only SecurityCode allowed !) + +

Usage examples: + +

+
+
+ +

Other functions
+


+ +
+
gnokii --monitor +
Runs gnokii in persistent communication state - displays all data +received from the phone to the stderr. Example session: + +
tfuj:~$ gnokii --monitor
+Entering monitor mode...
+Initialising GSM interface...
+RFLevel: 4
+Battery: 3
+Power Source: battery
+SIM: Used 42, Free 188
+Phone: Used 4, Free 46
+FD: Used 0, Free 20
+ON: Used 2, Free 3
+SMS Messages: UnRead 0, Number 26
+Network: IDEA Centertel (Poland), LAC: 00c8, CellID: 1024
+[...]
+
+
+ +
+
+gnokii --dialvoice number + +
+Initiate voice call from first number on SIM card. + +

Usage examples: + +

+
+
+ +
+
+gnokii --getdisplaystatus + +
+Shows what icons are displayed in phone's screen. + +

Usage examples: + +

+tfuj:~$ gnokii --getdisplaystatus    
+Call in progress: off
+Unknown: off
+Unread SMS: off
+Voice call: off
+Fax call active: off
+Data call active: off
+Keyboard lock: off
+SMS storage full: off
+
+
+ +
+
+gnokii --identify + +
+Get IMEI, model and revision +. In this moment doesn't work with MBUS connection +and Unix... + +

Usage examples: + +

+tfuj:~$ gnokii --identify    
+IMEI:     495502202470000
+Model:    NSK-3
+Revision: SW 4.11, HW2460
+
+
+ +
+
+gnokii --senddtmf string + +
+Sends DTMF sequence +. If you will start from "p" (Pause), phone will display +menu before sending it... + +

Usage examples: + +

+
+
+ +
+
+gnokii --presskeysequence sequence + +
+presses some keys in phone keyboard + +

Available keys: +

    +
  • 0..9
  • +
  • #
  • +
  • *
  • +
  • m (Menu)
  • +
  • n (Names)
  • +
  • p (Power)
  • +
  • g (Green)
  • +
  • r (Red)
  • +
  • +, - (Volume up or down)
  • +
  • u (Up arrow)
  • +
  • d (Down arrow)
  • +
  • w - 2 sec. pause (useful, when you simulate writing SMS)
  • +
+ +

Usage examples: + +

+
+
+ +
+
+gnokii --reset [soft|hard] + +
+Resets the phone. + You can use "soft" parameter (no question for PIN code - it's default) +or "hard" (phone will ask for PIN - of course, if you have it enabled in your card; +in some phones - for example N5110 - this type of reset will be like "soft") + +

Usage examples: + +

+
+
+ +
+
+gnokii --getphoneprofile + +
+Gets profile set normally with Product Profile Settings + +

Usage examples: + +

+
+
+ +
+
+gnokii --setphoneprofile feature value + +
+Set profile set normally with Product Profile Settings: + +

Features can be: + +

+

    +
  • "ALS" (Alternative Line Service) - values "0" or "1"
  • +
  • "HRData" (data transmission using Half Rate channels) - values "0" or "1"
  • +
+ +

Usage examples: + +

+
+
+ +
+
+gnokii --displayoutput + +
+Show texts displayed in phone's screen + +

Usage examples: + +

+tfuj:~$ gnokii --displayoutput
+Entering display monitoring mode...
+Accessory
+connected
+Names
+Menu
+23:59
+Messages
+Exit
+Select
+_
+Messages
+Exit
+Select
+_
+Call register
+Exit
+Select
+2
+Missed
+calls
+Back
+Select
+2-1
+Received
+calls
+Back
+Select
+2-2
+Dialled
+numbers
+Back
+Select
+2-3
+Erase recent
+call lists
+Back
+Select
+2-4
+Show call
+duration
+Back
+Select
+2-5
+Last call
+duration
+00:01:33
+Back
+2-5-1
+All calls'
+duration
+06:45:02
+Back
+2-5-2
+Received calls'
+duration
+02:49:38
+Back
+2-5-3
+Names
+Menu
+23:59
+...WAW... 
+POCZTA ELE
+...WAW... 
+Leaving display monitor mode...
+
+
+ +
+
+gnokii --getphoneprofile + +
+Gets Product Profile Settings from phone + +

Usage examples: + +

+
+
+ +
+
+gnokii --getoperatorname + +
+Get info about downloaded operator name + +

Usage examples: + +

+
+
+ +
+
+gnokii --setoperatorname code name + +
+Set downloaded operator name + +

Usage examples: + +

+
+
+ +

How to send SMS to multiple recipients using gnokii ?
+


+ +

+ +#!/bin/tcsh

+if ( $# == 0 ) then
+  echo "You must specify at least one recipient's number!"
+  exit 1
+endif

+echo -n "Enter SMS:"
+set sms="$<"

+foreach i ( $* )
+  echo "$sms" | gnokii --sendsms "$i"
+end +
+ + + + +

Sending script...
+


+ +

Author: oxana [rasqua@t-online.de] + +

+I use a simple perlscript to send sms from a daily generated file. The file +is generated by another script. + +

The script contains only one line like this "send following data : ++49179xxxxxxx Hallo Guillaume#Test#" + +

Where +49xxx the number, followed by text, # will be replaced with a +carriage return (\n) the string "send sms:" is only to prevent errors + +

I've modified the comments for english language ... the programm is very +simple (I'am perl-newbie too) but I hope you can read it. +I use this to send a daily status-sms to my phone. + +

+#!/usr/bin/perl
+use strict;
+while (1)                                               #example endlessloop
+{
+my ($strtosend, $valid, $rxnnummer, $smslaenge, $pid, $filename, $timeout);
+# (nummer is german for number, laenge is german for length)
+$filename = "/xxx/xxx/xxx/data/smstosend_data";                 # file with
+data
+$valid ="send sms:";
+# to prevent errors
+$timeout = 100;
+# timeout
+open(INPUT, "< $filename");                                              #
+or die "error opening: $!\n";           # hope here are no errors
+while()
+# if ok
+{
+$strtosend = $_;
+# copy input to strtosend
+if ($strtosend =~ /\A$valid/)
+# if $valid then
+{
+$strtosend = substr ($strtosend, index($strtosend,"+"));
+# cut all befor number (send sms:)
+if ($strtosend =~ /\+\d.*?\b/) {$rxnummer = $&} else {$rxnummer = 0};
+# all following numbers are phone-number and copy it to rxnummer (nummer is
+german for number)
+$strtosend =~ s/\+49179\d.*?\b\s//g;                                    #
+remove number
+$strtosend =~ s/\#/\n/g;
+# replace # by \n
+$smslaenge = length($strtosend);
+# check length
+$pid = open(FileHandle, "|gnokii --sendsms $rxnummer --long $smslaenge");#
+or die "Fehler bei fork: $!\n";     ### start gnokii and send sms
+print FileHandle "$strtosend\n";
+# send string to stdin
+select(undef,undef,undef,15);
+# i dont know
+close (FileHandle); # or die "Fehler bei close: $!\n";                #
+close gnokii
+close(INPUT);
+# close input-file
+unlink($filename);
+# remove input-file
+open(INPUT, ">> /xxx/xxx/xxx/smshistory_data") or die "error opening: $!\n";
+# open history for append
+print INPUT "\n",'-' x 80,"\n";
+# line with 80 "-"
+print INPUT ("send succeeded to : $rxnummer \nat :
+".localtime()."\n$strtosend \n");  # write text to file
+print INPUT "\n",'-' x 80,"\n";
+# line with 80 "-"
+close INPUT;
+# close file
+}
+else
+# if impossible (open file)
+{                                                                           
+  # do nothing
+}
+}
+select(undef,undef,undef,$timeout);
+# dont know
+}
+exit(0);
+# exit program
+
+ + + + diff --git a/Docs/en_US/gnokii/phones.htm b/Docs/en_US/gnokii/phones.htm new file mode 100644 index 0000000..69d7dfb --- /dev/null +++ b/Docs/en_US/gnokii/phones.htm @@ -0,0 +1,208 @@ + + + + + Supported phones + + + + + +

Main page

+
Supported phones
+ +


+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
ModelConnectionLogosRingtonesData callsNotes
640(mbus)???
3110serial?-?
3210serial/mbusstartup (static)/operator/pictureuploading-
3310serial/mbusstartup (static)/operator/pictureuploading only-Each memory note has null name
3810serial?-?
5110serial/mbus or ATGSM (with NCDS)operator-yes
5130serial/mbus or ATGSM (with NCDS)operator-yes
5160(mbus)?-?
6110serial/mbus/infrared or ATGSM (with NCDS)startup/operator/calleruploading/downloadingyes
6130serial/mbus/infrared or ATGSM (with NCDS)startup/operator/calleruploading/downloadingyes
6150serial/mbus/infrared or ATGSM (with NCDS)startup/operator/calleruploading/downloadingyes
6160(mbus)???
6185(mbus)???
6210serial/mbus/dlr3 or ATGSMstartup/operator/callernono
7110serial/mbus/dlr3 or ATGSMstartup/operator/callernono
8110serial?-?
8110iserial?incoming?
9000i??incoming?
+ +

Note: + +

+

    +
  • ? - not tested
  • +
  • incoming - you have to find another phone supported by mygnokii and +send ringtone/logo/etc. to this one
  • +
  • no - feature not supported by mygnokii
  • +
  • yes - feature supported by mygnokii
  • +
  • - - feature not supported by phone
  • +
+ +

In connection you have types, you should enter in gnokiirc and which will +work in phone. When its' in brackets, it means, that this of connection is supported, +but "connection" parameter in gnokiirc is not important. ATGSM means, that you +should use ATGSM "model" in gnokiirc. + + + diff --git a/Docs/en_US/gnokii/todologo b/Docs/en_US/gnokii/todologo new file mode 100644 index 0000000..d497d86 --- /dev/null +++ b/Docs/en_US/gnokii/todologo @@ -0,0 +1,52 @@ + + +todologo.perl GNOKII Tools todologo.perl + + +NAME + todologo.perl - Create operator logo that contains 3 lines of text + +SYNOPSIS + todologo.perl - - + +DESCRIPTION + The `todologo.perl' program is used to create three lines of text + that fits to the standard Nokia operator logo space (i.e. 72x14 + pixel space). This is achieved by using a proportional tiny font + which most elements have size of 3x4 pixels (some are thinner). + + The name comes from an original intention that this program is + used to create todo entries to one's mobile phone screen so that + those are always visible and thus in user's memory. But the tool + can just be used to print arbitrary text to the space provided + by an operator logo. + + The hand-crafted font currently supports the following characters: + abcdefghijklmnopqrstuvwxyz and 0123456789 + +OUTPUT + The standard `.nol' formatted operator logo is printed to + standard output. The header information of that output is taken + from `gnokii.nol' that is distributed with Gnokii -- so you most + probably need to give your operator code when uploading it to your + mobile phone. Use `Gnokii' or `Xlogos' to do the uploading. + +EXAMPLES + First example writes some todo entries to todo.nol: + + todologo.perl pick up kids - call wife - order chinese >todo.nol + + This last example writes some wisdom to the stdout: + + todologo.perl Never underestimate - the power of the dork - \ + side of the force + +SEE ALSO + Gnokii, Xlogos + +COPYING + This program is distributed under the GNU Public License. + + + +Gnokii Tools 25oct2000 diff --git a/Docs/en_US/gnokii/xgnokii/calendar/index.htm b/Docs/en_US/gnokii/xgnokii/calendar/index.htm new file mode 100644 index 0000000..7e8da59 --- /dev/null +++ b/Docs/en_US/gnokii/xgnokii/calendar/index.htm @@ -0,0 +1,18 @@ + + + + + Calendar + + + + + +

Main page

+
Calendar
+ +

FIX ME: we need description of Calendar window in xgnokii here... + + + + diff --git a/Docs/en_US/gnokii/xgnokii/contacts/index.htm b/Docs/en_US/gnokii/xgnokii/contacts/index.htm new file mode 100644 index 0000000..d506422 --- /dev/null +++ b/Docs/en_US/gnokii/xgnokii/contacts/index.htm @@ -0,0 +1,18 @@ + + + + + Contacts + + + + + +

Main page

+
Contacts
+ +

FIX ME: we need description of Contacts window in xgnokii here... + + + + diff --git a/Docs/en_US/gnokii/xgnokii/dtmf/index.htm b/Docs/en_US/gnokii/xgnokii/dtmf/index.htm new file mode 100644 index 0000000..ce9c9e3 --- /dev/null +++ b/Docs/en_US/gnokii/xgnokii/dtmf/index.htm @@ -0,0 +1,18 @@ + + + + + DTMF + + + + + +

Main page

+
DTMF
+ +

FIX ME: we need description of DTMF window in xgnokii here... + + + + diff --git a/Docs/en_US/gnokii/xgnokii/main/index.htm b/Docs/en_US/gnokii/xgnokii/main/index.htm new file mode 100644 index 0000000..f1b4aaa --- /dev/null +++ b/Docs/en_US/gnokii/xgnokii/main/index.htm @@ -0,0 +1,18 @@ + + + + + XGNOKII + + + + + +

Main page

+
XGNOKII
+ +

FIX ME: we need description of main xgnokii window here... + + + + diff --git a/Docs/en_US/gnokii/xgnokii/netmon/index.htm b/Docs/en_US/gnokii/xgnokii/netmon/index.htm new file mode 100644 index 0000000..32d6173 --- /dev/null +++ b/Docs/en_US/gnokii/xgnokii/netmon/index.htm @@ -0,0 +1,21 @@ + + + + + Netmon + + + + + +

Main page

+
Netmon
+ +

FIX ME: we need description of Netmon window in xgnokii here... + +

Related links: +
Netmonitor manual + + + + diff --git a/Docs/en_US/gnokii/xgnokii/sms/index.htm b/Docs/en_US/gnokii/xgnokii/sms/index.htm new file mode 100644 index 0000000..e9447b2 --- /dev/null +++ b/Docs/en_US/gnokii/xgnokii/sms/index.htm @@ -0,0 +1,23 @@ + + + + + SMS + + + + + +

Main page

+
SMS
+ +

+ +

FIX ME: we need description of SMS window in xgnokii here... + +

Related topics: +
SMS FAQ + + + + diff --git a/Docs/en_US/gnokii/xgnokii/sms/sms.gif b/Docs/en_US/gnokii/xgnokii/sms/sms.gif new file mode 100644 index 0000000000000000000000000000000000000000..c9869fc9312ea12929491d3347471d7b73b29456 GIT binary patch literal 7878 zcmV;%9y#GhNk%v~VJHF>0fYbm000000Duq>5GW`pNK8mjQ20<(P+(+WV7T~bXlQV7 zaBy^RczAete0YF(cz}R_h=_=gkdTm+keHa5xVX5$z`)Sd(Ae16@bK{X008)?Sor+- z|NsC0|NsC0|NsC0EC2ui04M?#0RRR5ASRAvX`X1Ru59bRa4gSsZQppV?|kq7z#9QG zDH@N+q;kn@I-k&}F+#0cuh^`1%k6r<;INnqDVxvew0g~MyWjA*d|rOo@A$la&+q&H zfPsR8goS}aQi+O-PGgRbkdcy+bd{Eun34 z$pGr>>;})&@bOvM^!4^<;Q9K74E_H900RmfNU)&6g9sBUOqlKfg@+Ii0B|>;-w<>L z*lC>jPM*gq_d<$1BcNo-GAI6Z-6^?;B_5ai@|c9liRQM2ICJXU$+M?Vg2^O0j0oTW zMT_Smq}#ZT;zunbqe`u$2PR9Kfv`TXsa2m<0l$8V9ZR;X*|PzYQ4so&?NJ67m1cxU zmjXvQRn`&!IVj2lB999Z#W#JnRDPTYI*XOo;a2Sg6K^YOx+ zlRr1^Ji6)Y*t45Pow_K*))-#Tjcu1=?Y+0t1Iit|{oks{Eq|6i|FZRe)9EW0$bA0u z==tT>+NG3@kYC^5Hp#mL# z7+Z+AlxU?sJ=GUrkJRy)qi6c%Xx)xs3ixH0Uh*iwfh8%>CW3D&Dd(JY)@i4lYOUth zGaQEJ;doP0bmgGkXm^m7T$Y)raRB*;=9Vi$`d_4LCKzX%Z(>?0o0qPcsi&33dFQC4 zmTIbzL1oxhQBMwG$5Kq)Md+*#7;5W{Hd3l$nrY@5qe+~03aXpK5-Td4GX)#!rfec> zV6x8wdn%C${#0x2wb*8>?Y7)@>+QGThAVEk4aFuAMb*0cfH>nYQx2`3+$!(90Zm)s zvG(RW?!Nr?>+in+2fQu2?K(3+x){9r%)$&eoF2Up&ztYW(N;`xg92x)@x~l?>~XdW zG%WJM2-`98$$~_zvY{8ZOeeI|ek}9MG}mmiz$cH4@X9F!J(Kip# z^V0qV?R3jXM=kZ#R9F2m0a$0P_10W>?e*7Shb{KlWS4FB*=VP&_S$T>?e^Pn$1V5V zbk}Y7+p*@Y_uhQ>?f2h+2QK*Fgcol3;fN=$_~MK=?)c-7M?Sa(lvi%~<(Ox#`R1H= z?)m5bpocE{=%kl!`st{ruKMb%x9KoK<`|Y^ruKVu1_wM`ezy~k<@WdBy z{PD;qul(}NH}CxO&_^%*^vDB1`3AFRul@Gickli8;D;~%_~e6cy#?5pum1Y%x9|S@ z@W(Gd_!69-{`~moumAr1_wWDzm#g3P07$?B8t{M!Oke^9h&}~6@PQDFpads~ItJd4 zf*8!81~6!&X+n8TF!(WOrZ)_$U@Yi5QQfc-3KuT!x*Yg9hbvl3wOxF z9{TWwo2%jGW|%_|im-C)D4hTI3qVbJwd?OsEc*Z%(k&AfDqaH!$MKHoKj+rAO6r~tPKZu5$f0&QN0zdRlT4*5x!6Zh z+VPHK9AG0k3CYoc@{&QMr5pVyL|Cr!m%!X$9~+6uST=B$HZ-LzH>u1*;_{g~^&l4@%&rFpa59XG+tW+VrM4&8bdz%F~|u^rt`#s!)eY z)S?>os7Ot!QkTlqrUG?@l8dTTr%KhTTJ@?}&8k+n%GJiP^s8VEX!XW=JOEVha%T;z zT3LF*L$>vkZ{=fL!--bYMRcurt>|1kSHHb-uCJv7Ea@0nIlm6^u6a$YK-1@d#yZxq zniK5kBr8L+1{Q^ejVxjn%h`J}R(B4lp=2{a+6+{Hua>1;09G4-97>V0p(Cs;JC^}t zcJ{Un{p@2MumRqhumBbqtpzGTT-4sLwH81w5?2cV4M_BY2#Bt9{-+yVe%94;q-_9p zNozUT;`Y1w{A}(*tHS~SceLCcF6K`A+{z(Wxgun)bAy{&${_#%_sws9@oQbny*0a( zD{Xq|3*G{UmvX$_?d_~*Uh9pvxauV#gz0p zfflo5IR?O%t!!W0fw^`Dnn0Po8`lxn*0ya)mBL#MrGNx6K^xey0%CxKnlzr|fPk!&~0* z#&nN8JY5jawws$2w!bG1!AK*N(tcG(!QYK=c`LlqvHkR5H%sx712D6J1bGfO{_G6r zjmIh{sK_Tva+BM9e<;sn%qz$8On+0|K!yTUh>;J>vQ^o#M%Z@#`Wv}Z~!Or&mb@i&QC0yI*PWQUo{dG>w zdriA50lw?~?|=`y;0I6m!W;hZh$pH<-;THoO2F}qkG$k3Px;DQ{_=tocb(wqMDs87A>SC717Zl3kZ`~2fE4*S~M{`R=fz3z9_Z>? z;v4_?$WOlVP49Z(8;>2S)*bMnUpsZQ-toj=zV^4z{qB4J_|30=ta|5sa$A4F=3j91 zk2ieUfB*gPkH7rqzr64#Tl(aezVnlv{{GxefB(PJeyc`*1XzFuc!1w$e*k!YsN#|NP+!Vel!?7JotJ+_=Hdxh443o z0jGXec!Lm#g;%JB!qbF0D1~4chGKYoRJesDh-^0)f&UkR=tn$WIEHW-hjN&D3OIg7 zh~o0xyQ{%47!n2M^1fu+bhorrpV4Sd41ujo>JP1*tm=>5v*JkPw-M#5j@9h<^R& zkptK)W8I(6^i-4Gu z-IaYpnUuchlgkK{O8J!js>qbNN0U%lm4_&mAc%$%DU+V(lveqbkcgG0NRm~!l3nPP zV40SMD3-&xk1`mNsn(6_N0n+>mzqeF+xU@Ic#!Tml1bQ=N11|lIhb6ePxj%?VNkC~Y&sFI6FgnY@D2??0ngp`_Dnn1{zomqtDmxPIF zk#mWbrWu=?iI>kqeQ{ZXHpqr(IE|Poo4zT3sQHtDNr=B$oEaFLO*x#}Xq?PhfXF$O zu-Tl_nSitzjL|ur*r|Qb$&$+1i`n^|+_#-%c%9%`p1miYw%42Hxt@Z!oYvW$@yMR? znVjAkp5!^7_?iBV_4%HoDVX{BpY6Gy+IgP_MB1KhB|t!$q)N)8;Mbx@`lL{rqf6R| zRBByTdZjU%rP)Y!Fy&wo>ZJ?{rm%=T2GylzYNBX*dMetc|M{lO2cvR2p>#Tvc6z60 zDy7C3r+g}(c}jYK8mQ|zsH0b?hFYG@mvj(%caWMung^VPg?)>PrIDJcn!2f++NqxU zsj=gVp#D0l8Z}onN2;g_OmQV~soJX5w5k!6c(OXHv|6jSdaJmatGa4buxeB3bE&{e zhB_yXu3D_C1gplHtm}lV%G#`|igq$}s?IvCETlKodac-+t=if-!P>2?M?!M&aN9br z5(KV&^Q-8ydSxn$>xzl(3Y7prSP(#EPgemOP_M*=u2`2)`)W};w^9FEa`9@e^{S@$ zs;}b{btk2;8^y3CS3mMfulagK2RlIhx;hRkQW)v*+X zvf=izl{2qT_j@C2q~W8o4QsL$MYF`lvXtYp_DX3lOR`L~M7<=fS$9eh^+|&yN<=F` z{*&o4Bsq zxy?jJjs#L|Yj!ksxj_54zSOyZt689Hw!7rI#LG#dt4tIWb%pCqwd+k<6uWFRyU0sS z#oM(FmAh)X5pb)y)>}%>ySe6OX^0z23gt_dM!QCfK@7{c(R96?^uAn_x2L=QzOQS$ z;Cs99Bv08}xjQSd_!_fv`?vb5yj?rE;TycwTfORwz7vGNwIof@i@hvFzjidVq06}x ze6#**wO`1)T1&tZ%(@C(w09&<2~55WoV+TWy7dLN5`4kW3%f7OOw@b9H!QynoU$D} zuX_c;Te`oaltiXWN2v6TTYNm#76A6 zxZA@!*S)<2zC6s-1I%OO z$;6z@(qqg%E6mFL%*(^f{DjQS^RD8zhPrvpB3YJN`Ic?j&DSiAwrPgr+<*>vkI}fU z=^U3@3C`&}Rmo?YOfi{%@Re;%wx@< zS%sjfgb$sA)3}l!jLvPjgav(tlvz9>*wAU1(Eu$~$T!j4oP+mhgbN7K7;T0uP0{KX zjVx_~6Ft*=S<|X%ga|FN&g_~7t(!LJJR@n-6)DskosRuXmi`fm)VPS!8vW564U$9c z)F@q5$JdGNc$;l#mL>SoG)U6lc+}ze(@4nFGA+~yIn+TNnzxhFee8Q#9nrW6)BsJ? zNH~pfZPbfd&|6K=hk4XjP18^x>6>Zt8U6G1S*Yq6N?<~@Zt(WvX zg0tP!N*&OixneVD*sU4b;Y{3m{nsQ3(raz5uB^}>Ezi5D+Qfs;r45pl9oYYDmQ2ms zz#ZMMZQar>gVuN5T5Z^2jo8K4+84>$U%lG{E!ne8{@SW3&y`)=eI4Isz1i*U+0KpK z;EmMNosOq1)z?kjuYJzno!aV6+q`YypgquVjocv}RaGt6>pj*{4co~r;1QYD{*2(d z9ohf9*LIEBsLkIyUEunt&(Fu?cMCW%@pm^)V<};?bTvF-M-D` z+FVvs>AoZBlz!>CW9gXwzUdpF>70J)o~}IBtmdSSn}ofNUT)!~ zzUHf5>i_7@77gaOP3qw6uI=26_B_`iJ?ng)-DH*8EpB?Do;(bVm|WfCVvX9Y9@=+J z;4CiK%KhJ0PV2@Vigrzc2@d7q9nhoB(b&Fyq5ji74b#Qm-j(@*&7R#~?$0=Wi`&iP z)2{8leuydk?SV+*z`mGyP3Pi1-?|RmC%x?0{M%Sq>kmlSR~_yf{h8%{gxL(<51;Ny z&FlfM;oI)yFRtV5zUQ{?(Dm((_nqWh9pdab-0fY_B){Tyj@@VImI=??i9F>)4&M!L zmp+_y^*t4vytbZ`pUP^F8m_>>lXijoKOi^c%nR)~%1^;^*F%=I;5Izx!M$ zm!41FwiEgSFYZxaJ*nR12p{XL?$^|J+_Jug`QF`NJ?=$m=I<^0w=UeZ{_kaf;oP5_ z{?3nuJ^7Y7-ur&%x2e}0zW(f)?)SkA_@6$Q-R|zf4*$oz)AO&E^>6>BH|!v=i6dE> zCz`4&+qy3t%QIcuH=gS|-}^4$w~_!XMo7@8R1zy2<5MV|QmfW0HmluoyHlbP`CKvq zPN>DJUbEZoH#{zvf{#hEu{n;;`~E**px_{2orM@)p4na+q2nWDq~zqIA!4E)+D;G- zfai#3C<&)1=;x?NY3k_-r>W~G>xOCxEa(gEY^`iA46JG>YwmAwvGFl-a-c1#N%Jl0 zO7Sjl@T+WUEwnDT?di zI}`r#N$ak`3Og*Z#j3$h1<5MAY_g0P`z*B4N;~Zf$TEAav(#$4Ew|m;YVEblX6r4v z<(hl$v8x?oM!4eIgf6`C$~$ij;I{iKz4_|9ufF!SJ8mcPEV>t~)}?dkr<5LvSEPa( zSZO#d5Hu;jQ)-vsQB+9-OpmAX$Dfq;t@)S49;?`k3jT%*@C_kLoa$+QG3FL@07lFk zeD%c#D$P&vd|bs-E~x0J;vt63DZ#mU*oh&^%!1Nvy4Ud+zRPvaK`Gc?i~hn9 zY@&B5uC-}jeP_vZ+G-6qHQRpIT{y@q&MZ>oT#9;M&uGSsB4SWK3@Fu0Uft~AA~V=E z)RyB6bm=b+P58+5O@1YeX!o5tm=-39x6v-04m#nQ6WTWDcQvoM$v$h@x*f0M8zV5K zIPG0%7@Qtpb!x%VB!c~*KJ^E`99uvpM;9n)Pi#y32vIc@_1beD%PV;k1l zzF2O)KA z6niS<#XL1pdn`L6AOoo{Dk3fiC&XIp1gXeHnv0Mk+QA`VmqJETvXaztq!%K&Jxg-3 zlb(bDTu$(sPm;2frsSjRTB8JZ{qdBpeB~LDrAoQ5GLf*nB`*18Emb_#)w8SQj8;7MA;eThp0Dh2b00$AvKXX3>`So2fJKC6C~NE76wd)(bG-& z&Nj!%rL%V9!J*G|Xia)yiD~v^-pg8M&j*FC2lI>pxMt$SO>S`hjCbT_;^2n6|9pvT z64aUcu9w46L6mLMyvGoq_nl!J6o|dK%$gvW53nRHF?-WVJcC(+fGProeJbe^r>D<^ z+L4$IZKszYSCHNr5uVOO-9Pu`LX@VbdPdTVL58Zl4{4BVcTAqqR#;J++3N`dCFuS* z6V$bdP)7>9DO;S9(HHjfdqliuAeH)(jD2)8M^x)lMW&t{_&{jl?{{Uobl1-n&#-H(GO;pte8$X4HMX0`qc-N^CegxZycR#~HEM68ml z+~qR2xz2qqbfYWX=~B14*1axvv#Z_ha<{wQ{VsUJE8g*vce%yA*BCCP-u1G#z3zQ4 zeB&$M`O>$(_PsBD^IMECxF9b6{V#w6EZ_kXxWEQJFoF}T-~}_d!47^fgd;5B2~)Vj z7EZ8!GpykabGXAE{xFC`EaDLxV*w^UF^W^HVigZy#V&p^jAJb08PmANHoh^AbFAYX z^SH-8{xOh)EaV{*xyU{Hl+0S1FbeJ8@=t)z$(w4q7rZbIZNq4!$1NbzkLoMo2k9q;5J~gUSt?E^? ky49|JHLPPT>siyf*0#Piu5+#HUGuuvzNWRQaUB8xJ0C}U!~g&Q literal 0 HcmV?d00001 diff --git a/Docs/en_US/gnokii/xgnokii/speeddial/index.htm b/Docs/en_US/gnokii/xgnokii/speeddial/index.htm new file mode 100644 index 0000000..a2a89f2 --- /dev/null +++ b/Docs/en_US/gnokii/xgnokii/speeddial/index.htm @@ -0,0 +1,18 @@ + + + + + Speed dial + + + + + +

Main page

+
Speed dial
+ +

FIX ME: we need description of Speed dial window in xgnokii here... + + + + diff --git a/Docs/en_US/gnokii/xgnokii/xkeyb/index.htm b/Docs/en_US/gnokii/xgnokii/xkeyb/index.htm new file mode 100644 index 0000000..91783e0 --- /dev/null +++ b/Docs/en_US/gnokii/xgnokii/xkeyb/index.htm @@ -0,0 +1,18 @@ + + + + + Keyboard + + + + + +

Main page

+
Keyboard
+ +

FIX ME: we need description of Keyboard window in xgnokii here... + + + + diff --git a/Docs/en_US/gsm/cables/cable1.gif b/Docs/en_US/gsm/cables/cable1.gif new file mode 100644 index 0000000000000000000000000000000000000000..dbe36cc64cedf2d3ba66cdba9d07af9b9388a185 GIT binary patch literal 7188 zcmV+v9P8spNk%w1VF&{C0J8u92nYxj6%{KhD>^zlMn*M)j$~<`XsWJk>%M6+ z%yezvc&_h!@BhG{a7Zi~kI1BQ$!t2GP-EdSXgIFetai)odcWYXcuX#v&*-#z&2GEj z@VI6BX3l9sR2?(6Ava=JGn6$XLj-H?g1_r4L1r3Q43I_=c01W`Cue#9DhPKkx)_<+T z4Gjhj0~7|Q1fBs74X4-X>MGRh?(ZQ92M-Cq1_ut`69x_h<_8PxO@T+S;DvSu6Bblp zKmvdX1sEi{G75m61qcXCxTLV-JB0ooLt107N`im^0#?<~cwk1u2PXxf6G<}~$eK8F z>fEX6CeNQhg9?4&bEwgyNRw75s2?Qt(Fz^Hb043M*rGRIW z0=<*Vo{dzwpM(bU?(9>5;&Ivu4>L=abXm1#zp+w3NX_7-fWrW+IyPNWc4ps@TD!iw z8B*nd5^75Zn8NhqQ^5K94n69D0s;m!rf@)7Lg*Q&Fb{WH{1M;))Is<4KGuZu$HY|N z?yd;|ZWWbRKXf4R)(LN@!TxkbF%qN_!+j?>fSX$5Em9sMpeZ2XD+p9bA%&k*sNsej zcDP{z?>&Z?ha{G0-(v)rsN#w&t|)_P7`Eskh!hO-fM+*qw_O2xFo1xK4=7jQ05Y0L z0E|U?cz|gIB? zY<9VTZw+Yli3B)qzzhK5T@cZ14~!!Las?KEW}I0rPyla;CJN$X05vM4b?1ZXSPo1~xe5 zAqUV0$a|thS3-WV{^(d*RTC_L%u5+4tAVAzgtr2LC@^aXC=J4dX(q)E;@nu)j^M2( z`K*vG2*up?>j=Vm>TV<83Og<(@+2@j+%0qA)ZFLI1m_HKW;_q#vo%9YQZ&iW4s$@lA=q3A&Wq@LDMy@4T}{=I zTwMao9;CJ;*C2RJ!pLivtS{M{m@N(3kf==p+a2Ub0NfwQJp$c-+r9I?ljt1{-;ek` z0^l5ghKvgShKqpsT`pAh}f=0Er{dLK<)_XA(*a# zY&4&cc?g@A-g)edOG3LYwl{)12)b9h&#EN+4zKIqK0TT2fgGPp@{BD1LGx{yL#Xep zAC70tVO!4^_JC*~&!7`D5E+oxmD*ha2Ji?1_ltPnb_@i-4(7_IISKf~Xz4Rq@gm{A z4-B9(21pH|25Y9Ojt|c-9E>!&b?Vy-`~J{C55iCs8$`eW0PsNB6az#A zkQe?i5+IEI{cr^zBq0HT_n9D8Pl0&LlnY5b_w0IW~5X;7~a$V_KP8_~~A{PPb1<-ck3 zAX@rAixN+##LDRQzG#?oJ_4wL;Hd~-y1tl_RH(QJBLEt5n8G|{iiWvBRRJS{n=*6| zNbP_Xf&`a&@dqxSQ|cd?szj$UVy2nkUq2ks!#JLT0r=C60vb?P5$FS|fe7mc+>{7d zE@_Vf`ITBv$5ys1(GPG{o)$#21r6W#ts?qh5m3ukOR|VB6fE08(6*@nW}=#g;XXux2L%k^x8@Ad zX(DT1VMC;J4{~OKqb;E36-3#wZlzL{ zA@SP)25?cfw)F?wM)yKf&F}nD=69UG6PRJG(l*h`~><@PV!RQE0x0 zi5sWxN0mGbt_~=V%NG^eEx?~JbNHH29tM_w#NS;IcoR6@g!}#jMg2?#E6m9O5G1-a zPXB_`J7V=MXnhG@PsG^&0ne#@2_E=biro0#CjVx);x)#2CNtdlE&u!jR4bY(Yz;DZ z`U&q{@O(x9p9R7v0r5M)d6-vQ1D-fI4c*d>%KlVH{LwG@^j}teL#*G**tZAYwE@SV zXb&K0Nkbpzln~?B0_C>|=eGjsHv<2+0qy5;;nEis_yG@i2ob0P6X;i(M-&0*0&(|r z<+XoA(|?7qff;ati@*S&uL>^TdRzhJ-I54=6ZvPM9`O7nh8xg8sUaMr^+sbMb1v|TB@lukfQzvuiu`7a5GRW(&_KGOR}SdQj+j_8pnT=5im=z$H&RL!AhXS#w6tk%U%vqh@>2Sb#i?}%g-T9s7d7USa zok_8sDNvr~>7D3l0_y&W6zqut?)je18J{IEpOa^i*;AYN37^Q>lK$B~02-kAIiMA( zoY8oo2x^@ANdo+76!kfk4*H;18KEOEp+ixjCUBn^nt>WB0vsw79$Eq*8lnv{qVXV> zvYCH;C0sIwk;JK@d%>b0P@+L`G6FCTjYNBuccC^q9ys~|Itmn1A}#B}h8Q4DC@Q2w z>Kdu>UdaIfLRpKDc{;trYJ+u3DH^4}0YmA*4+RASM~Z(ERU0hBHeL#)U^*ER6dKIn z05Xt_Svr>n!yp#tA8h)hH2S71njCuZ3YhePXUY>rkq^>DGu%=&3SdZZeb71rVjsR4Yl zsuLgqIJbG67?3B^`lr#6eAo0A{_f6 zSHiKxDXtI!T^6?;kQIEY0av=JP+A%K(+>v2x6n{m^>7QIArs5O0jDG(1;GtZBcoJ+3}o32 zzV%yf@{6B9mOZ4kSdk3OQZ?tnUn773K07F?BOBwO9VUsnYcq}na2a6Mqq_^b{>Wt_ zPymGyxhzl^vUg*llNY{FLG2+E)G<|KF<|kNkL{`fw~9J3+a zW6$A}Sp_7mfg9o>yBILOui&vIk|j=pWCifCAM#ox{3Ixx!YaJNEZo8_{K7EIA^C$E zP6;nDtRau`7$#YZX|2tl_FOuU;)hNI_pQs$Nk+u5e4S5ddU(qZpv1 zP`u28++Ct4dRf%ePF>U!h0Ys%U*@17=CBP~z13y4)n5J8TYWHKJ=SCm){RuwXr0z* zO$%6zp~V_O2@3-SY#Q`MUnr!{k1M{^GFAA)*H8`Bfrd$cJ=lb804I?@gq_%mz1WQ1 z*pA)Qa6Joc{h(}9Cvp7;dtxanjo07`xmb1!RYMr=?9-o23&L0elU)#VVpY_lXSPxd zBH|E+ff;iuG|JGlD>+Z5@pAdR0k{1afieLwdw?n(EHo6gQag+LtN{dIN1bf}tj7)C~#Noe%}44^xm|&0s8mh7sE^4@TUV5>Q|+R^B3nEGVE1{Ausr4 zC3n(YhB1On>@oiQuC^l3`~3+0T@W_nyhlkOVL~0aSF<#9+eL*y;tXZBXsNopj)7oF6sdf=>8cDLeg8cVC_B#?+yaNZk-RO zxU!+R9q`f6x7-`tUCshHZg%h*CE4-*6w2NK*=g<+;PB9Z?tFzOwgNdUH}HZ`@E>6D z&AIU$fVD^6+aOKV>b}<~F-0gLjyiu5wzmHBKL7LLNaxFj@!y&AI#2I9|B5irl`{YE zot^;)1V^31Dls7xD(?X-kI@)(>kZ%ZAy4yWL1xko-60+nSKqi9e-v2tlc&A(f$8AO0i~{7X3y4XKd^2;op7HEOw8~M7Fv4X^6iB80ZNos7401@$$g(7rKBKKl#=5x zAJenkuO)x=ZCw>4Xm?NaTJHgS?`bqm0iCWTgu(Buyl{Kw?DeyuqCY6lc!? zS$~!G(fFD=JL<>>bIj$YFB%m)zOc8?vSA3ID= z>A|A^ zX4CnEMy19?Vp=3#V~GjO@j88volmHl3Ih%Xi}r+mG!TcS!0=KW+{WzQuk;HP93+IQ zD%5~OT;%Wodr&Nj%xI`|_z6q_0BEQ&V6b~hKw#YHD{TTqU1e=OIxL-Z)gpV8r4$IL z!MJrGP^fAfBuHQYU}!VYJ*e7kJ)I3wji#<%g=M_8cB;)lu!3o5qrrgQP*_+(L|<6J z=vhdQHs9WuuE)=x!d}$Y{x9n0?U)L37XSo6co5-2h7BD)gcwocM2Ziu(EE4q-$sr> z_#yJwF-AZQ1qkTT;OhdNaw4OI#NzUTMwvA^ek=sjCI*rz6>!=h0020HJDKPVf>9q$ zqfM*fB!qNl&l3a+poAgSsn!@u^D%WAwiVPtTxC)XL!zAuvpd_K@QM$tSh|eJ3VPcS zEevJqGO(x%B(H|J_2vdf9O!PQ#2WU-I52>e4FZj`UaWc8@@7Ls`*Chm2FcF=03LxZ zI;HS7&8S@qS?p)<#>cOZVwTz3HX{c)E)+0epod?qgktZR{jc_JBgu7S_RDntVSD;Br!=P zEo1TlCs~#NT#L*IiJW{%J&jj)~O{`FF`jONr zTCgsIQ5Hbe0|uv1K(Y<=$1(Xubw0IX8&Mo`GoUG1$G*jTO* zsv>{?1(=~t0w%a%gAYd7--CE+5~cYVu1=wZOMCR4dbQPnP3l(AbzoNg(Ki|?O$>RX z1frFe76**e9gj$$jY7qzsAeSB%(vIr@o@}?VkwYvwBSnpFilqY9GQdr|f@VAIrPgMf zPX2X1`3Y~vqTIG_|BB8VpDYj9#BbT?Hrnp56fayPCN%~Ca_|@z+Htuok9;EomOy-y z$~(k7Wz7xaymOh@BOP!uGao#4)kTW&iqlIuJHp%1lYRD^an2&~Vs(-0;X}52sd+(_M9}4mV$zHwnS26$mS<-*v z{XNNG5~2W?@{THn z$H`XK1dp}ECGIemOJ4R;S}iC**QPd1Viwbw$3$i_mAOo2Hq)8Ugl06QIZbL-)0)@B WW;V6CO>TD6o8O$~000mH0028%N!}*_ literal 0 HcmV?d00001 diff --git a/Docs/en_US/gsm/cables/cable2.gif b/Docs/en_US/gsm/cables/cable2.gif new file mode 100644 index 0000000000000000000000000000000000000000..a455f1d613ae67072856b105492e8de09fc6886d GIT binary patch literal 21597 zcmV(yKURh z&f41A=jZ3|@9+2b_y7O@EC2ui00;tU0RRO45P%>=ptS1EyZ>M)jwE1N=80KXg}oW8 zy0SLSWUlXgzqOUrg>qA^S}$30xb!)n(5Q4ut%8_>)Z^jUdcWYXcuX#v&**R0(cQAa zZ7w%3_Oyi^HhMT!*a5(#zP5 zpP9qY&$!pn+2iEpzH3Nc1PejKb0-nRcMiuLIKbrq0gnD&Hc})&vcLfc2L=$>vN9yeEglQB)R(cQ&336C z1dvdN=FLhJkp(^FQy-mqKb1LnDS@QAE&yh3QAr@cMgRpS5F-?|*n_Mx8zvn~_My%S zvC2*&AVDiJ2_QAKc}a}p(v@ri#L?^W!GX4F&pjY8;BT9aZ(Az*JD31e2YefE2~c-k z;LDg3%E9!-Vj6#D>V*zQ7b{zo>PmeX5CE^%yIgqsmF+jcF#so{`W)R^u0&ML#QGvh zS5tAWFtPHCTv}(_-ILNXVqMpfWaNl1sC~ zWDGSdZeoh_NYB}D6{t~#i2l|Gb`2CD6JB&2*O35S{Kb|!sXZ`20q3^{A64S!LJ(d<{b9fM=itl1Csl7+17}*vL{z z%VHScN&89C;74+(`v+oO$aGR;=SE9axw3|Mff|%0^hv>Gcsg3Qung9wpcBxxVOY4L zh+i95Zso>H+yZIod5RpU8W#u{=0Iu_hSfk+JKdMDW*@>4Tu-8iHgi2e@&Tt)wLKUV zeu=U+m;k4~0~ui-sTXir84#=uu4Qy#YrKODkn?~vS!c67YBbYDJcvGp3|%9}W_Dwx zvGo-JEANCbCk+7TkCy?05;vGRUA>3Ner>cbohMhDqf<~aNw3E7E}c}a5zjIgt&y$xWt@32b%{PXE{5ZJejz>Hdh}cp!sJ+x9@P0@xMlF@+;gJ{~#e02sGWA1WA+>$54Z9+6UPLZc zwyKe-?hM7t*iv%z8{QR)9z59%B=tZpm=LD`rbNuT;KiiDOa)3rNhDbi2(?l?5q@k$ zrHsb#Hah}k7ripTiv}UNtC4A$x@rU1MCm*JY)F)+j9LP{fEBJN#*)Kw5)PfDm=?}b z4`ozMl8o8GGuBX;TAPsSJHu;x7@iN+4h=fyhuUVPkL* z7_P^yEHtze)C_|(L83rwVysO@(iP{v1Ve_tBc7(z89C?jBx1Plo|n|=TVnQ355^)N zXuM`Wz{%2^xRjjtfvJ;Hqt!d&lx8r^k6XDBp~x)tRt~V5Z`i_st2W|C6Tl@F$FR`0 zAOIr*N}Mt=COo{PYO94JtMy1)6i~DbI199BS!;6EEttd$LVIPT(4oviL`<#%{p@6V z8ao=`4t8={L4*df00|gj2T5p4OoK257__V{Sg-;IOu((x=%p&*SgAzR{sz*hX7C>k zd&^~?889{46OXN&%p%7b)zh5D3-bBp4tp|zlc6>Y2f!uB(uvI7+(EDYal`DuVMB8M z_GMU%L&N}sRjE3#Be>Z~iku0q)*Om!e!-OiPQ?NyIQYR3jxZL03tS0Xc)}WpVXQcq zO_O5ou3cm1c8dwu`v7n*k(s6AxMisG_9ner{Aqf7iME#&lA$ejfzmO?#o~vC6N?5ga#zLKxTSgcO-E8{kjQgZI;d4b zZUU)_xmQ&X~Ozs6hlTM1GSN$XY9|D6*zx?fz)Ibrc z!z`;`jyQ#l20^8K<<+gTaB>+a43sS=C79`?=V&~th)Iq(S8?cACc>L2DZX{B#DU9X zLyU^{%tj6oVkIk;TFks;X$_{EL^C!0hv!*W5>-?UF4ci!>?+N4DuL2ql$B{;970h* zW`mBa3u0P_MzT>`L}vjU7u3W^0<2gwS|6rER~wB#`O6E&aD5@Sq@iG0UcfK}Fi-th z#I9GqWGWIW2*qMInY^Hb)mGB%MjVvUT;P}rf1K3E&Xp3L{&YA$LF!Dn7nP^3gJ|EF zBL}tNzht;xLWBM05BbP+)Gi@A_k7&}EELd%P@p5yEl>VRPz2?~exPKf?HI?(OQN2| z%STS~5eEXo;y1-(E_R(AB=aU_Jw<|qPcVUFh&$xC)@>|lDjR~2cNg{9DW3_!sUC`r zFTxrPWL`Fk=k=Et`|K}o6lU;96qSAr;7Ip?%w;fToDz0FI?F+{7d3g{b|^@B-L8AR z&SHr;FPWF}H1=v;sMg(P_*0#y8tB;sy%LA#^%!)1dS*)fa^3{vic){ZzF)iy9asDE zJPpD7RkZRUw>r*PRk5?vOg*!F!;B9nZA&K*(gvZuP!wCxU`QXEUiyxnf^>Z(@%o73 zyju4&!h6YoAIUn`uH%|$MN-~Aa)obss9n{~ZvL}l{Ll?U-ht756Y{sJnIdaFcW-8K z2I-ehvu8l%=X#;WOk@^(Cn5^ep>EeDe=bB|t+xsI=O58yM!i6Lbf7Jh0U^T^ECA*R z_~%Fn_H5>CX9AOpeAQKJXDSSdgr4?x{h)Nx&Dg?NDF=&2pP)@*g4+mIg)^G>8Fhg00 zS+k~k1=k;AQG`gigcN3nWhiWjk}ttl5+_p^qY^C*hXyI=38#XG`$Z{s*d_qih5@sH z(?dVFF+*3uHlU||V32rPLo>zKd1LfW{_5c$Ei{DVFn%Yagov1mOsI!awFbq(GwN^v zL}P-aV>-D9e+M@!i0C$oxP(cVc#bG5kcf+506^dMED7}t_}`FrgR4qeEtdlHi7_&hrg9^FBpB{7>VfB6%-;V zo1u(gS9>1fjNCvs(i2Jn*9ciqHbGUA^*A8=bzcvOge2uax0qc&^GS#mE zI5i|Pkp-cSZwLlip%*IyFz>hijFyoiAo(S1$UsukkMGksHx~^8^$65xWIPFz^71+t zh6P&ZU}{nXyk$GDC6>HZ0njH^a?p!gNnr=bgTh#m#CTnwaE2Y(NMUAy7HJ9a^9KAD zVrwvySh)pRrT{YJbW#b8d|-rcnTO>8EsF(KE24ct=TI)Wl}cEWK)DY>$(S5Q4|utL zywPwVc_Ft%FKqC4(l8HBHV_)rZri4katSUEM-E7lJ=*4BSGjh2`4Ertm0yVhYbl0H z^O<}p2cZ%}o&bEL8ERDsIV?DoZ(#y$VTrv4CSL_)iO@`cftbj1O(;ls_9qP6Qwjg| zmtiEHa zDHm4ZgOB8KVd;1?z&f*Y1+t}`Z_!{e@B{~Nn-$ug?BG!+R~DytYz&$m)t5DK`9-bp zO0kG4Nr{8WaAc>#l<2rs^NBoekN`jj5Sqnjc{K>Ca07%XaF%328!!RF$pkl048=JP z)svhC@nw-oi2e##B$GrF=a@%Q&MKgar|V40#j3Qw1892SZ8@)t7&9s&m!wBklG^)5E0E z5)~>T0gH#J)ENj_p^P%r1_f|f#G+1xLr#K6b@r%p-11ZDVWB?iLd5!z5gDgA5gcY$ z6W)OWk9maWxRU7@mG1_qW8fxaRc#gXbtB4XHRU$$I-StyX08T4>uO#R=NM4&t-OY6 zN8=10YYu^9TaTFz&zc8`@Tj)2r4r^4_o|sDAf%njiH1i8c9#w)%JC~|KhHgVtE%aX=(hMkfgAY41^An{eYD*@HtQ;dO zwia3Y6MjM_8q)bRQaN{$i@2FuoiCZGa8kQTTcl=EQ1W3IK*M?c2_@>_njN~N51XNV zTDss77OONw%2`uUW{6f=SoD&psI~f<4R3j@_EoIaD3LY0F)I;X&mx0i0HERi z069uYvjkhYg$HW=#t@+>M%qgz+UtRhzyPcf0})mXLhxW&P#BO4Yy}*t;>!hxh=(W; zvsyU-Wa_*HYYA#oDJIv6P&yl?K^*0xwxBDwjnI^}X}yzoe4B%kVcBiiMaFUuP5uN1HP#n+?*_GKP|C^b1(Jl^^h%m&`lA7EGZ%aiL&zA+|Ojt;7b1 zp-a=|22CasA)%b~vZ&JNdfG-0R_Cua8eIa%!DaweCk!Ie(*TE)A2ke()$l~XsJtZH zKFv$IEnKhGkrQ;rpSl4~D;H8AaV2htOEcvx^{K0p399R$spP<>8fOUdxJLd3^uyQ? ztymbR5VScf`+&>K2PRCvlGJTA$$2h=jIq}gK7wvv6nFxb7$yWVQ8HL)0J2WpwGnk0 zE8ecl~NTN=(Xo+`-;fPf)xD5kf%ip}oeOGRu}w`$HE} z7%8JiQU*wCV}cN83=D}wr5bp?^#T~L%f4&NGN-5rcO1XIo4lr6rl2|(pz~`lY-1*v z9{0f4G*K>iz9v*cqBY0KIeJL?21z{1^4rFI{7gdR9#B#M zq^3T&y39$qt}z86>+%qg9K)M+5cM#}wztp3`~~BxF@ucJ@29@(g#N9O^UNQO)6z@{ z0>mtBkjz4O*JB8`k?aL*k z)x;Dv56+p#OAOMzZKgpe(WUlr38#;F1d%SuFzKA!%mA<`{#)FT3fTJW#-0igft#F2 zrXW!_!n&=;yuI0$b7lQ|P!4LNV9EpmEIUDf-sYf{5)7%a`-O^AFym_5M%EGvD$SLm zTc?np`JLTH&ELL_tXF4yq{xqK*bt+&nC1(&P*@Nq7`4jdje@Z7cA25;^NKNcA1zsQYP z=PASRz3s^XDUj042hSaM`qsu?@@;zZKYIS+VP1a-q4E3&1~B!9ujJ?S?S?t-%s5Z( zf`0Hk-w4taJCR!TR)6(apY>U90StBlEgqDxO}9KPJoMXSsV17aP4IyZ=4>DJY|_nI-^gfI7TU5a6!Py~(U2?XvW$2M$n zRrg%%PT%%WfB1O-_nPljB&O{zt_F_+Ws)7z%PK6P?AF*_@PeQCozENJ`}&c5-*xZU zLBSsFg!J#%AVLfvBLDebj`=1p`)1JK#806@ui4B~H^^l8_k(T0ZqKG_`J8&}gMa+f z5&PILZZI46f9t_b_VG(wE;=>Us{T*vIp6v{j{WM-{_C$4?;jY_bK#_~`#e=0gV)ik zzxIQE{q7F|Ps%Xu#aVCO{RhLa63fzY9>8QnVYPvMx!$t^qkJp?n2#UcS~ z0O0lE9eObAlCkM+1YUv+CY`Y5`Wv~GMx33tW~ruDzV^FtAn>6)+RP{hsFP92*i({P z&CceQH=D0_pO3e{fI*o6{`wC_?n0+ezkoDIwvU+vXC>YN(iah%M2hsJ0WrYKKt+h& zGNcf&EtLfV0qWd2vW;D-drmrX90ZVsNRTq8h4}ywC$L);l*!zwg%~f57DU1f=n)c- zh9iN6<7wx|gM>#GQf;Z|B~mW|1ON~a0PG&JWy^jI8(_d!wPK@QoC=JlkuWljvJyLh z>{zcz!s;~}Sny!KY&(HHc9$c+r7`>&s;a?Ax?n1=HjU;oGuN(FcBWtx*IHxIayJCU z>)2>i6pE=3C5pjy#3%hkVvf>pgN%?ERyNBj5E|z#adgiHT=ymIQPxlagkZ=J0iq#}-V`uo8M8^*cj zA5c0G;zZpffGw99VIg6~2JSeg!7ait1x0;w3F50tdgSdWpMbETj@3k2=duue8<9jQ z$g^!G8rT5CLm|mXVapBwq3Z{+4)Z7$Hb9~AfF0}jQiSTbw30>Eh?-Ft=^R+mrm02& zv5?^`s&fh=zf>laq~a{&MT0hQ^oG(}f#DGq&`bnMo(4pU$nrMqMbiwhoWMKTM71i= zZnUbe(479F%SSeUBz;gGP|ghJxCu0*b(&l(?eUUHK`8SJ`A!>_whJPpu}7@rC|1^X ze3Md8%~WwUIcar^H3Pdmtd*OR+}O}4fI$6)8yHBqAw5owZNxR4dc^=iik>hvhysQn zk4mM6XiqFI%p_RVQwBv_=c#I{H{6*Hwr1i>2@u$kOJY;^ zN&b-K^yjXU$DkT&i98L)jc?pyNXalN0hm?*3eXL{g3m@c?Sys8%_$e`{rShN??z&q zEe{Yo-D_-=z+MKTPIgjo(@cHuy!*yvY|UGqV68Ce6uaqQ8c-&_t|@0VXSI(IAbGI9 z@}_gvgci44j8hx}Q@l^V;6z}6m%Z&7{pM*AKkuc!JY0cPawsu%#dmZ91_!wYL*gfX@xoa^AED5cr34VZ)b3uhW`f83(6d+A2FN`n3!@yGTyLa zKa|kQ4uGE0SnVamh>m+8qZ-p}Pd0kspng2)0SZCKh&%I%KFZ`L@KHuPqcXwxs>s5o z5hPya;+g5J0Yv~6u8fytU?%GbjP*q29NtOcAR-96;q8MYZg7*{Ius?w{Oon3>dziW zqcAJdl0Gt`nh3Kvre;YBX23w&>=JYYOcqm<8c0u6Jh8q_3ZgcY2@qtmWS$Mt%^M(D z#{j}}LSjkC10du?>n>uGr6>k0%PUOs)R~sHcx9dM^wex9i3R_Cu2iJ{XoDnW2qu2j z(3m*v1euO80Iu-~D(NwhE2IM*x2;k&{Tr8e-e;Kt{eYc>Aq!f<0v3CHEr%HO3P;k> zfb%SFUy?Bnyk?V-C)z`9DJTYqu2(v6o@|)A^5;K^(!d6_!3Qe}7Kb|8na^eNf-(pX zES-b0lK5@~!JFKxQY1bHz(a5?LfJBdMK0kCbu%rkM?Gm8vrY)Gmjv{}`*cdi9IA3h z=lp4gLMh5!xgk9SMGq*8*cc~)fpm=k+&=Q?&_q&@Me=IsJRDI6JnXBg8<6D{VQEX8 zG4hml6$@R!*b^^+!HqlH201GU#JZZ0C%91G+t zi(JkcyPz=*?(d`s|Lb>(SK zRLoO=PF_GgB=&D-`>R}qDThN#q4Ij%Lt0Egt{8{|P5$~g;fWVoikr)bpV%O`zI^`p zyD89~gDJv2lD~H)iM=5!yjO<$+JIrYOaYYL}sGovDGclY#V&-54A(HW1zt?7>DcXa{AWx z0Ctc)B5coq6{`;&q;Xq}Ju;-Dw~F#4#~{Z>y8>6CS(5o|@SV+b9lI4@bShcDj}o49t;9lk95Ctbi#xf}ox;h#bopKlkxcBXSo&Lg8GV z?bWAtM6T-=y3NW#y3z#)HDjP$N7@wpvRkzR2%+FW=foG;wF0z*WYpGZ?1L7k&dF|x*vP9OV538W@7(7qe|+5jEpKb74Z1a2@g zC^{{HMwv;#mvNVFYeAWEC^Ezz0voyhPEftHr<_Keyz4=%U+~I)_L6;#I}wcpy%5?j z>Q76dX}vv_ppjDL>8o-EhVAN^wrzBZSwvud3^>JUB6RQ?a`i3!BCg|G_4ZNZG!!Ofg!nBz* zzKIs-xVADmq$}bt7jvf4xETHh3Wu80mg5M(g^M2?n2HNAk0>w%C~2+=86gM}g7m-x z;?n@5Lc+CzE!oP$tD!O6+JaGIit&KDzZnH8sv#7h1hoq7hvB)8|daqENzjWh2#Tu7@!ZU`khgU-bWD|vrA`7m-8i*Sk zMU1?iLdb%m3a9}`<`M(X0)vw(!w!MS2^hEVX-35&M%Y^ij+CnMo23Ryri^?=^Qk>t zumH*kl4=}Baxn=!+y1K_C_0+pnFG7UyLg)L`hqb)5FFI8?J$tp=);?YxIbOIq-NJUa?3QH*CZ9(}-=eCh|t&2%oS40Sd;7U`|+cFu+@=CZmWEdl8B3O;U3?GE=1Yggo5C zO-$?`0Xh@tV;OL4or$YQo@f_IsZB^+%u)={nScb+#JW>-su4TM55%+yrO*m3H1}gr z(gK2ffhn3J2jtw(Em5Y}RJOW0hoN(luyg>PB*VvX1Zye+`eaGX9K`Xw1>HDKS98bs zM7A4!E-M*G(<#VJpfOWxp8_i-M`S*xaRa41$a7<2@IGjBUNB)S1LpqFxtgEiX5ZEVbi zIZjO6hzIK4KN34t=2|kN>>R4(x|!Tt0rktSZcH-k$8w0 zh$&9wB2O*FE&a`BoYaYxhBV{=u02%jBU;$T>!r}UliBZQz^-;mw)X5Xc7?>kzA%>3G50z!Me%PW;EyIpEU>-^b}j^&q166(lC0NgMT1p(G!Wqgu{j4D!oH*y#kC zb-}{4*DBO~jR;ZLnuAbP83?9s5r##8j(RKtLnnh;C0MH)N^(Des8rCP!< zpx@ZmTDT*tTrBRI=S zeNN;12>ew6UyfH@?u-jjV_!z&Y1304Y=qQIWff!C89AFPM51cWQo|1(As!zB7-imDHP>8!5VC|gXH_> z?u8K{^Nr*&ke|^lGJcq2O)<}T5NQUjTnc2W%mU&R0S_wvmJ|w#Xld3iVBN!&+k)to zt78W}Qs0bvKd09#E-%#ug(_z69lq81ob#Fo0zzK899%p5vFz^fC?LLnJonI zY4`*mp2nT;2rxTP=5{=11R|Itg65WViaoA^&B{m$JQ$& zcO1$;<2yI3Y=dz$I?@weNE4z?yx-?;?f|moU&USxCktxGHp@m`&6ybzlCz{@ z$`E+ufbd)&Pgu&(u2y4%sS+&(n)IF|&0a@s?Z^JeCH11Ef)+fAmISkg3jlWNV~ClL zHSSfdx882qccg2#K#i(8va^+draS6{{*PiPy$$fz(|!x7+@Px9>yRNkmvA?ZwkUpr zz`$(;b6CS-tSH-7%&HqBcoeQOI-_XmmAI5(lGcUK%>?IGHb;3!Fn;CAGZwH8r$JWi zt?R6TjvMyez`>cJWoX%^K5tr@nlK1AnFG{=&YGDyIe{ph7v@AKS!RZ_!VY}fI(e-k zX8}nW@Oc2S)0~j-7H^Ms$7AG`ZINOkGwkgEQ$sB$`rYUdqleH1}<-ca`($irSwGSo3-?LK9e#b+lDr+pP*?W*QG@N-;KJIxkH>ZZ@tZ^}cDK26NFanPeP~+*Z$)g4fK|2!$oTxHDVv zewRjPO5d9{i}+jeq;tr&j>ZpE{^;_kGMKKNW?7jF!_IXlaXxPNLZJ&A-Jd=TBzwoe z@Jl@m79$O3f@rJCL;kS43O$BU;SpoBQH*@ zBH&+;8C!*NPfj)zxIN@xn}u>D;?!Ay=j2GykUiz!Lo^DvD9{fk*F$&scE1US1Ruq# zpp?AL6k(KX-WGv1LLuO(=j7KisHwcRpf2M&@mK*2x<=HWz&Mw=OgoWG5jT31A$-chXA3#A3#@%F5P;=nl3I?* z$AiwUPr1+!^Y~$u8MA(f8H`MIpWk}ZhxrJs7rSMRZkMGSmwE_za?)xqmQE57z%gyo z2LKtGsw)++uc$e0IzIL_1{=N+#0}s$02%8S4la(+aeY0Jvgh zwp29MnXG2o+P7ZD0arf8mh7gXPOtkJq6t!rgoz2AAL0dH;ssWU-eE?AV@1Qkf!@(& z!R6Z^V+IY;0p3R!$raCG79FI6T}v1REZL%kZ78U21?vN(h@5JcKmhT80Du57aln8H z7&J6j4#=d3w{tsDmXF zq%_bfBjJ~fRTBz+k+skdHdHSn@`J%DAQ&h^kg#&JO^Ke56VX*v)4>B23J43;E4hcC zDi$LcV(6u>Q<85k4Q?1kBtXgyJ20I3l+(@7CJrUg9C-}}#ho=`fFMMQ2uC_JVzSXn zQYwoBB?O^h33f@;vtM#TGB9YL+7(+R0IJu@s2A|K!@5!AHb*MViDfsP{N z1l|4u2^98a&TkRJTSM=){f>F^`Oo0Mp1=G9QhWdgOH;_v)CoA8R7euTDDoF<`eDG? ze45!%)hN25Df0(T|q|&PasCaFG4*i zULO=uIHXQmAhe_s)DV+QJ9XNLOfz&o38j`f^hsNl70qSCpe3?-h8_#zD8@cR?bQu+ z{=9(a<19etG8>Gj+4P}(ef%lme_TzqC5pDZ!e(rQd_bKcJT#Tp2vV#TSy8c|xrUlT zvgw6h&zTn}sw4t?&J3Rn5p0lzRKLJ*RQQ91^alP%Evm}aVS1m;p*FkPHE6AzgU5jhB{UX~KLIeCT0Fs|dHSD^8TG-{h z_$9oYj&L4fCQ(yzt3*!*QThDI9YKK48brM}--e9X^}1H0W%Gc9vlJnz z+)WHz2T&-9^auy&HXQ*1|KOGeJ=(gj(Qa!CE)VtabsLU+ebhJVPfrba;!+J$b2n$3 z{S4q|v=_M{dRWtAFp;5FErgaLjVZFCQ=y*N6{NmAgMYJLHD)Aatu^7b^K3!^&Y0jJ zQRD&_c~-Te9DLg!f4(is98l4-$QPt8JL;=HFYH+%FY^xm$`rG|04cf5N7))vg+_@$ zOg-p8-nell&dD!*#2eCK0;E1FJRyPCiyHiv*TDJxDlS2DSZ1u(py&P+t74G@it;=V z6Sa|#Uq_1$s${eQXKiC2d@CID{PQ*rwr*iHIf@A3v<*l!Wkrw>3ns=$j}QgLd=Wb@}R-sRK^FWW^1xjQVGZAn`Z57Xq#i33q2RbP$lF(_t8e2tmMZY z631a6(@Crf{(26U-2stN-| zBPXB-TEs+iW0M!SMDc^kQSJ!?tXK*GAh70XY^2Y0>O2=})jon^m2=HmMCBL>960JN zh5808eELNoI>#4yL6@@pM;fiDvxRV_>pSm?un*Gb{;r*2M047dhb-}e5|MF~sDgDR zL6THsLzqG(8`swHIkBX=vMfRw%ALuH6t+9TSvqy1Kb`6nbD8W97U`r6elm<<2MR?E zRTD=-aHN@THRw|z3ssg1E=+=OsBNXYhDpTLK`YeWfZ_@)ePC2Y65$_8FhKbb?}ep0 zh$94*F0A~pj(_G~cUsPX17poqQHrvzE{iVyCO|A37re~|AN0XI(*+Xv!rkTOn7}n? z$q9PA-w^X*$lX0bKnQt)_6-)sfMLZmbW;Mz%+bZ}4RLfI+!1@u@CZv3Uzf*A<0EKK z!K*cIWz7s(XAuDp#f(dVEl|t=eox2iw6BS&oad9ucfM-OB$orNOEVAv8FZlGp@Upz zGJhj>1Cc|M2h4~_1Fe#@L`Wi^%V0cfI=+>dF$O|96IqKovbjYeK&nOMReQL$Yu*uk ziS1=K1KJZ)#1d243DM~y+RARsAGpH}?wsNj9>nNov7zZc6pIboK>lyD;eF)^2VtDj zMg*_XYbw3~rk<#gkl;DY|HW`JTfkSgkR%#c+ywUjq6e9R2px6QOGH-a}b z&WfPAo-(gPZt%yBT-}5?+*j`0i|q%Dt(z`xuy>wN96`GkX#3OUHYvrR&vQf z9`w~sv{PmBdAFIJY6V(Ske9ryn@2kVapGXB|3><@9X#-%XPxUN_aq2&EpVj^99BTg z1N;`ks@$CrUvD0d>dUl$ebc;C-1anU-<|_| z>5lI;-s>Lu$X4!Ibf9fVS$$}D$7*gICH$;0&XkZrYU5}0pUUTc_s5HT@>_SkrkzoM zbdu~k<#6uU<4w^z;7%xT#{L_@zUh*DJJ1I=v)Swo&00EkebbPKz4M_T;<}m61s_n) zk`cXf^O}kV!c5SbfdDV7%>132;}(3@q6NmIz@p7=y}+ffDcmDW3jE{NPPl zC*X?`*o9{$o$kd|J%B(}h)vxjpJr5BO%##EElKLNmvewsx2=|z;FwiS)Txn3aq!zS zbb|h=NGqrd0G5E_C;^*w!TR}~=2@Nxgbi*~UTC=67(Lor6p4hH$@;0@$ix$u&{F(K zpP^uZ1=2>%u*$52mAc@7zytw(Z31_QiRHbYkiDP+(N{f)g_8-NCcOXz7FG(d7xSsq z>qP`#5urEf!!~dh{&M`nf)JD0h@r56gL`1#|MiR^2#Bkc$o5Iq_9ci5sFzwP24h6e zOypF!waA=YK~AZaB92=YAp_6(px_-xu9)Fxso@%~f(9;u5nxZcRKxgz9yUn=aA-i0 zq@lxk*x!j%mRW*gsL=xY4_ItN+>sUz?m!5wfDJYT1=5%mK3)rQq6XZC3KD?scp+gF zf)|_wj+i2Tag?D{0)C_t76PL4=^!&^Lw|fz4Y}Nq&tiV8sP4j2z%YZ%|PoAW}8{N~|0NPB@0B^g;vhVKJx<DUsGMk5+$C5q2=7mwjKKCEqVi z;4<(JU`bk5-p?=6M*7i5(M6o|S<%(y1=)l^qC8qAP92gs0|x$3xrkv?p48|Z!3PYG zg#i-SX;A=##9l&&?NAX(vVebZg-m+EVPac}NM%=i6D|l_lxbH_ZQ?nChh7AgEwW>f zZNPyc+GznrW>lukjUYW8rQ|4$*wvqJgdz%p-F}45L6{5~C<(5yjhl$0H&s|=Qj%q6 zK~nyn%x4T-?`RkMl|>+2Qd^eBD6|z1B)}LD00P7fVVP!BDdi0SAgV!04iru&+~)p? z4FE0yz1Sftn5Rcx0J;QL1lCVK@C8omNtaMc7DfCq$>2PQx%#g+qj!)ay3E@FVq z$RvKE$wD&MN;=q26k~(bN;SZgxsjW>sTH1Vk&f;tkM^jK-iiJ^Lslk_Z}!=KlH-0H zqd#nB`=P>#6h~jF!ZNNxCR76+Jg9LP04D%|Z%G8n)8VC#hA$;k$MU_sCX;e-`} zNBC()H~<0&f`7ng&%l(7c~k{-z$(7qar#Dk)WKISr{d^oQ0k4I%nPefqjim+sC}Y5 z-QN-+9G0pJB>6kJpji+uaTiBQ~RwJoq&&J&+XI!cw5P?lm{-0w6Km-LE ztcFpajS{DX8VQ0zM9k|Q7%2|=-+z|KxoXh}z!bdDU~rhl+lj?a#g=lRm*ZK(2p9lr zrP^^K>2r{3MX}!R`OOSe#dwx1Y-Ma1-N>vyDQwnL=xJSLc?%DKXC^dAk%)}x*Z^N> z?c3!cbET`tZbjXsffU$Wz?zDF?na%VqoG>Za+VioCcy!gLo$#;_H<#fDQ%Mm!B~_P z-slD?93j+>n$+r8FLojfhJa|^04Gqaf=~e$9wiBk12G*ceUOF{rH!WA29lu-&j!zg zjv%S_CTC^=qq)E+SV5~Y>3#8S4a6sbz)!Vu(yl#T%k7@vQA~*bnvUh2gaA;1XF^Jn z1n6w3*8*nXH!u=UKBRH(B#~NLe)>Y6kg6(LCMqhy+f@)9j(jpK>q=tq1w_m;KQ9hMs#JQyN0fc_JEY0p(Z}x zZ^%fOg>M}A?{w&fDR6_$Fx}B`ZRHcZ=2C@0YUJha!NQlwx<*q;khN#Y`RmtR3aCzfA~S$Zgx2#)@`R z+`=RuYzJwM93ZS^2tTSZF30{Z$)AMm;ntPjrPTbv5GLQjtI(k!6EFiQ2;Fe#w+1r* z9)i5=G1XiGy{MMdeRA=sW23$r&<&w@-P@*gDqU@g2z+RE1X~eDvWWD80J|>GdQMC@ zEf`yt0`}Nk05j0kje2#!I5Z!x;n-xLF*Gk%SfXJP7*#jbv6N{6N^I`)c}7q*Ln{)f zF3-=8DNrtgv-)A4Z0a!U5pp4e#8fqiz1k8a9R6JuziB_h=*L9?l92N~Q@~GD&dIh0 z)ly?WugeT^z_SG`FguDcTg5Mt^6Qy$N+F!W7Nz$%;Li*}!T3PI-bz!7bM!F@(SD{_ z&cee$3b;aUJ_kg%?>>ogXw3x#uPQ;*h(=F~ zNBT{Q(h&{-0^DZHVe6383BbhyMY8f1Jxqge{itSdHfMJ>7<`{v6N}~a{v?10bg4&+aJss&A~itc^qcf_z*e6Z1~f|? zOOhVQ8Ih&|Bw)usAL?ipb(DoPOrxJltt0)Q?SSE8HODvg1}$;ZdTbA$q@A|I`|Ul zP9Y?0Xdg^9`nWf>oDVp|bgHr%Y@vK!NC@nV4*-G4v_$_MgYKx-1F-k3ZgF!W=4tTE zZWybeBS#h#5=my{Xcz8^-Zt6l(~<=A3vA&a zE_+HGAi6vI3G7JaHK!g(jzTp4n=olNsH-2hZ)%Q9S-i5TxY`Csz!Bag{Gxl?kJn&5 zx0*A$a^Y(1$kN28B!#UvK?nwc?`kK5nA5aCySq?a6o;jVoiHYTj7Pp*c20anlibBy zd~)Rj66K+iTW5SxbbSCMNs_F`UhrL4C>u8>SDXl$)G#WRG)cpuG8*+EXeXP|4FlTE zPy%T08XjAu>0XdJ)`{NG|F{<5MDkq%KA6lJwR>pn4KY%g+pc7AImBzh#l}&D z7Ufjb1ILz(_99Y(2*U|BjvSy+f)V0bf3xzU6@Dyt&}Z=-5h#fjr{3><5`4N8?E~{3 za_P4;%DKUge*#`_Wexr{bg+A5b2gc?OxoF;mSIEj6h?SWi+gwR3eTOX(8YaJaNxc7 z`t!(QfV1lnF);{y2dWIm?Ds=xi3DCJzH#LjX}v^q-^Xx8vec$UDj(&;^s&__}#p-OcWW9nG-e!*erhfuIa#c8j|mmvTE0XY0% zQ{TT=>?1A+2mt;5;s*Q#1q>Vv1^@(?{^SA;{{&htbSx*b9*kUSHZ@kHl2SnRC`eJb zE>5SID4gzEfBy2qW^OgR@OF9C91Z{o}KE?vSxc! zk-I&z*jTPvD>7*>Dm6E^Szjk&ze~-b^ypDV^>v>;`|(<=x&%xZ02ieG@xnA^PKFwTG#g@JRNv}$<%lsjg@(by9E6^Fop zVJNt@Y7q=9aa1q6vQ3#e;HbwY3f_n>Cl{cS!#oU>OQ=1^a6zlKPK@}dyV@|AqmCMY zfuj<{HZ-s~R1%P&6OIV`N<0YwU_inNZ86}H2X7lMDPWqQ?Gio!h|atJay!Yj`iOeN zG-7;15P<8(@@_v5uqw<15=*r3!ef%6@uyDY;7`S&9&rfE5}6dkfdsar0Du%l>%z1C znHbp4%QWun0e~%%BBp@=iYhJ8-c+LC00H2LL7I1p^h6*Y-Lc2bFy*MjKQ|C?fz3W1 z>D1FtK@D{YLsCLhlSL>ImDExFuum#e&wK63PUf4#hCB=+ zjC;(5kZ}EJvP6~iFob%ka+fs>hRtOLty)~N0@L_4G2yE|F!%~3%}o@RCU+IHP%FF@ zO3X+PyvyRoZWs%I2i?#&!SP@qPz`^nW4U8k;{|e#FrO3`=F8Mv;6*L~SYZApq(1u* zfsYm*w~c)3cyg$s@|DT}k%?V!K&YPW%35}VG_l)8e|&=_cdy9gHS z$|Z@l3xJYGX5L;`4Bz|Zh5n^lkg>lrc^{uS4Sj;Jv5ce(YwO1;I{qUqqCkZY*BJl| zqN6T>kxvfgi%fnd!k1A_n0(Valq9Z69UU3(vTA)A);k!Hx7CnMThK~0nu1P{=}P1pp`|@P%u&!hbr}r zFgnm=5i<~>@o6z0^0H(bv3a-()rMcPJfQvR$gXf!fqw1ymK=>V9a9=ZbrV{}&xj*U zIL^{8A*3cub}>r1xiN;{X$v%NS*&`FQ)~H@1uoz977jT;p)(vqLqXTUgZ3?68?<3R z4RZiXHNae!>e9^svrdA3ZlZN_j5n>x(Ej}Ecq;f7b9|+mdj<#(`V^mEFnZA{h$)gs zfoL3UAjW{6)EP2FDLK1S!B8Dy89-3bB^t&kiLNZ08bHTU*_qQPNKAS7R4MOd5|E*` ztEeTdUtzW&Pm!uXkdOcbB_t6DNHjt&pEPUk4mVH!G+}j-UNDzYGGGP=@O2k6X@{1^ ziB+Q_bfheC3OIN((`S0YrjEkv+z1QKD$H)M#gab}yPO$>2wj;Q?|*p*%UirOPGUVxNp`mf>EMIFBVAd> zKH-4I1xaG{Rf&Ck&_3d%005PHQ7!#zBmn;33$$S{z+_s-UQD(GvE3oVWJ17T<7yWQ zMmUT=`V^G(U5-PxC=R?p=-~s-78_D25XbC@Ol%z>x92d;GPxqh4C_gmZ@O8TTg)7q z2%xkZIwV;Tw2aZ!xTb0%RUh;y2e*#u12#g`A)}&4NuUlOT!>m_q%4csGKkPm^&+&& zjHq;A0~L*U>oNv;2uH9guALsVGWC4sd-2iJa&6Tz7SrJpDd{{)3MF%IhZz_Vh-Sro zuoa4{=b6>ol?k@MsA)Z3l_h$SpBzUSCo?G0sU!}L%IBk z!F2Wlnq3=P_4!)Cal)i9kO1+ zzN{gqvL73pKKk$~Ke8G~tPTdlF;f7_-0a2;b`NlgO&~aXyUy;#Z@fV*?9$9ZkK`S% zq*PAHBM5jnSi@^^V%ba zTvb@zByc9q(prU_`3M&_{&;wTa7{Z!s!n$b@u+W9Z2$D|W?!?mC@ce<^|~*{JV`jx z8!YS43w7f-7pGv|jgVcQ%k^#o=_zk5d|=&re-~*JuC|%vbC3Pi0ctVhA>=R|Cwe;y zKRz2UvOZJ`9~~gy`JH zo+bSXjUmFMl8CMToGw5%1S17EPy~I!o$ycph-9jQrx^%N^Jwo2W^k>7j|Kn9I;Q6h zxa-k?N>-)_>}rQAnkJcG!wp>M7F0-4MoUN*Xvv~0|El2!HxI;E>pd!q1b4-RdeEeF z>MoMOdY(-VeN0-yq-qecuVgKH_~2Q1q!KxiN{FIB%D~|s>H6G@dcd&QxW=(oa7Y%y zb{tUYzKZCIZvM>T@2sJJlxGTsLIq3YemLuel0t<<;ZIDU(MB;)4Db~rOzgbD6&sNp z1duf_Wc~{4tG=*Z+M@(SY-u2{H`GojSa(qi9$o>Sc!zx#aI-j(Wu0Xq;VQU z2L+y^421rJ%REo7EK1Cr>mS6gJAwd9%tDp^DgsxH>gp|9T#+5WgD6fwjg;+m9!M9e zgu4R3Jg}h-^AQO5k(kiTbF>d+YUS0^1)jdqD%L?4e_}ii?E-pn6)|7{zV2q4M(~g+ z63MR$wqT9M;<`l4b6Bi2H0ru!t`kRc|6*}Wvc@0&&qSai7*cJ;){QEHZaHkEQee$< z7RUqU4y1|@3;3rPKd}<0aJ--~P-07Y>SGBALK*3!ebVwNb4Bbr`)NF5S`)Ab_`8uP1@Lt3k(PB(#I(&%gOBEFhZ=k{?J*FBnGf$EcKEkr%D8<#zSzT zvi>w@=Co1*5C9|iD_4dMX6$Vll0~jYWe|)HD1m}9k;-oF$}d={ib zP~ec>O4If%5+k?amfnFy8_>sSyFiPA9-zLL6<0vv^GW!mcs5CT^q#|7EL*gu{*$ko+B4!i0F+`DP z(JU_%KFA26g<1xyYRD!76aWs0WeLnjv=T+5WDf!IgsbST<6xBCWbFX?P%7L}{%MY^ z66b@nx{68`b4gE%|2`l@#H#>;XgS@aL=Wz6EMOEf$5Lh|9`S}1t}z#`cI z?VJo#O@*O$5{6c_W$qxqO!e7#=~hftEMj0g;s?5TlRx2$3$U>E3hD&pVzqLiPeYX) z0SXkwfIQCel7w|w8H?|NWB}?QM8Luw=|Sc~@d*ReT-!zQf)z0u5uLLB#}yOhd^jtT zc$ES3au;88Kk4kWv>SlwxiC!J&T<9FYc}g` zDI$&5>ATmxc{%}w^D4{qk^&C1O=x%lewiaifE(GXJ*RF0U ztWN6a%~uW9X_e4z6#^S4(yEwl9t0v-tpE^?K#=Iu(>SfXa^X)*t<)$1BtZdNK_f5> zbmT$~X@L!GMI_j+uJOY3W#ATJFP9|5>0X10fM}&8^d}4_7Kr|Wb{{(SEOe7`b8X+$ z^B?wt>e80vwsK`%mUbyNN!|t@okLu1OI@W!T`doIf8kM|<1-~P8G4HZ06{;+798@j zberp6n3rrDH)(h6AZx1d%vO7=vjT0GV!wA)X(bLPu0{z^WO5aC_|PamB)?`SzewQ{ zr$BGl>rLlYTkDn>UC@*eS7Qc2t_W#W@@y&A2GAY>kMQh&-Sh=BcTO7^PhbEpm*;~5 zi?m1qeIvMm+EW5@7dx1Nkd{ccO7=tRmL#x*JHYb-n^%AD0B?7~vK;Y&%TU8a zO8-iQ$U}w9=(oxDe5MzR6OD!0SjOI1P1YCqBvM1-M=W{HGnGwg z7N{3BvROwUYgILlrH^Wl_$h&wkUehJjD-h$7Zm@BM_B3RNXt~&cWLIs4WvhR8DdEe zS&;<_lpj-+J#H+ZV}PJUw8kPyY%i5<&jb3=V^wTDAn17AVgOVLF-e)A+?b8CfP@K| zB7|xKe?b?ZRhRt1FVBOan81a1xs7L5k)ijQ7m8-7a#vL2dCP)+Kbe{V!keG3n?v*# zhyXCa^E+GXbK8PaE=~3N_MPE5p5=L->A9ZmX8E4+nV#cw)26te{rR5(x`~nHJ@dJs z4f>!F8lDk}sZwP=9eSW|lc@;W5!(4v;BBGdDxo!cqdB^xJ-ToAIiN*)q)ED;2il!K gI;B+_p)nc~8rrQM+NC8rqE+vJ89Man+a literal 0 HcmV?d00001 diff --git a/Docs/en_US/gsm/cables/cables.htm b/Docs/en_US/gsm/cables/cables.htm new file mode 100644 index 0000000..a2f9fae --- /dev/null +++ b/Docs/en_US/gsm/cables/cables.htm @@ -0,0 +1,130 @@ + + + + + Cables FAQ + + + + + +

Main page

+
Cables FAQ
+ +


+ +

What cables are used for Nokia phones ?
+


+ +

Nokia phone can support three protocols of transmission over cable: + +

+

    +
  • M2BUS (called often simply MBUS) - 9600,N,...
  • +
  • FBUS - 115200
  • +
  • AT mode - 19600
  • +
+ +

You cable can support each of them...and phone must be compatible with it +(for example, CAN'T use DLR-3 with phone, which show "headset connected" +after connecting it)... + +

Schematics
+


+ +

Simple M2BUS (only) cable: +

+

Note: +
+

    +
  • 74HC04 must be in HC version
  • +
  • Dioda Zenera 3,2 V it required for phones different than 21xx, 3110
  • +
+ +

FBUS cable: +

+ +

Switch for M2BUS/FBUS for cable above: +

+ +

Cable for AT mode is unavailable here, because it needs programmed chip +and I don't know, what programm should be inside... + +

To make FBUS/MBUS cable you have to connect: +

+

    +
  • FBUS - GND, TX and RX
  • +
  • M2BUS - MBUS and GND
  • +
+ +

Phone connectors
+


+ + + +

What are original cables for Nokia phones ?
+


+ +

+

    +
  • DAU-3 (or DAU-3H) - cable for Nokia series 2100. +Sell with Nokia Cellularware (it isn't produced now). +
  • + +
  • +DAU-4S - cable for Nokia 3110 and all models in series 8100 (8110, 8110i, 8148 and 8148i). +Sell with Nokia Cellularware (it isn't produced now). +
  • + +
  • +DAU-4F - uniwersal (FBUS/M2BUS) cable without switch, +for Nokia 3110 and all models in series 8100 (8110, 8110i, 8148 and 8148i). +Sell with Nokia Cellular Data Suite 1.0 (it isn't produced now). +
  • + +
  • +DAU-9P - uniwersal (FBUS/M2BUS) cable without switch, for Nokia 51x0/61x0. +Sell with Nokia Cellular Data Suite 1.2 - 3.0a. +
  • + +
  • +DLR-1 - cable sell with Nokia 9000 Communicator. It can be used +to exchange date between phone and computer and installing software into phone. +It's M2BUS cable. +
  • + +
  • +DLR-2 - cable sell with Nokia 9110 Communicator. It can be used +to exchange date between phone and computer and installing software into phone. +It's M2BUS cable, but can't be used with programs working with this protocol (needs +some small changes - after them will not work original Communicator programms). + +
  • +DLR-3 and DLR-3P - cables for Nokia 7110/6210. Supports AT mode and FBUS. +FIXME: MBUS too ? +
  • +
+ +

Can I use DLR-3 cable with my phone ?
+


+ +

See post from gnokii maillist: + +

The dlr-3 CAN'T work with the older phones. this is because the +converter in the cable is powered by the phone. this is done by the +phone by raising the !mic-gnd! pin to vcc. if the cable doesn't +repond on the mbus after 1 second, the power is dropped. a older +phone doesn't do this, so the converter is unpowered. + +

To decide if a phone needs a dau-9 (the old one, powered by pc) or +the new one (dlr-3) simply connect a dlr-3 to the phone. if the +phone says "headset connected" it isn't capable of using a dlr-3 +and you have to change to a dau-9. + +


+ +

Page created from materials from www.fkn.pl + + + + diff --git a/Docs/en_US/gsm/cables/switch.gif b/Docs/en_US/gsm/cables/switch.gif new file mode 100644 index 0000000000000000000000000000000000000000..7181b5013b140f8c7dd1c529eb86475a218c5449 GIT binary patch literal 10147 zcmeI1_dnHt`2U};b8H94%lqAt*x(LzaAeS|NFoBKL!5(RsjG12>6c$Kt}=R0{6*R z$fQU*RzU@Wl+u?m^a4hS2Dh&05xLH~EuJ*3=_U!v#!&rCbstU@)hlwWX%R8ZmT-BK zXvkh+nsxT(%c)%UYo^5-557=^97NI3v8G6x<^@VnRaxX}W%AlypRTlNb(oI7Q}?0K zwJMyG?}y}E>($8sy{?OUb{(DzZ^G1-WtO^v4qFDgF3B$T!v7c=`EvGMdm}}BtNqCl zvsI6}^uu?jy*Dbeg^UNg?GM+-3eH`l+3P&mo-8!1)0b9L^qFjQ?O$(&|z4hX(g^IX%C>?=3e|qE5>e{dauo z_2YlN;bFm_wmw$flr0VmJ6@dr@W3VPLHMtaJEt)4I=vkx;tNj>Ci1t$EGFv5cV%)I zW%R6n(s4qr4gnJ{??rP0OmSfP)Mz$8hun*91`@^|j zMKxFRd>ePJ=KJ?bTr0RL12zlqZPsiR-B(ieq~@TrAmq}Z9K3R41Z%y@Vw8-kAIHnY zZ$D1gSMvfiM>RW@1wo&7iq2UPA`rSa95$<}D{DX1*3X=5RZ}XwL%i#r&Uk-rD2!o{ zs%l;R^!W*iW@Npt{2;HUX-Kqgw?+DsLw(I_d8xgpQ#8iD^aHS$)!;@dL}@5Q9Q90*dCr^h`3b=$$ZPk-KW{(+)Hn?QboEpG zAx0Lo8!Z#s0zklk96=3i_ODO@s+7K0XymwT-!jF1gCw5r<4=W2HjL<`2jc`He`rAj z1bj)ikW5HdF(Nac|F!jJ?iCM8jB_g%cU2ZK8j1D2T~;MIuFG-01jt5mj@;NZ<3#k$ z5|drlJcJDCC56AFW?p)^9=j<%gucU;6|9Y8yEQCgjeP<>w`@oT(~BClr{*+Mk+`#! z;no`Yw4vQJ89km+E2Ue>R0b8q8}_C$mI27J=Zn<3BJC&(OfvbXz%o(+iz0fb@3T+K zt70S{6>cXiQEbwKHaDD*h%g}3YrrsMKmb3eQh$Egj38cx0gE^t*o+0=!{8KUDNE}ShUWlH zZca(6_Yh;8dkA52#HnE*J~H>tObIFEiNE9&*EvGt3JoKr-)>f$Kn4oBXgSK7uH~=y zHqWiW`&YSS4t1mV;a<&>WvdVkY|mCPrC(B5aML*O;-pLo1S}dXK?=;I8`zF<;8xJn zRVvLif&hlVj}&oE{V~%)GG*nI-G>qQ$>LZ2mI2ubRugO-$STtYlTxnUaD9dDfwsc& zlq{$?>ln#NbcFRXmRpogbp3aI1dIb0c}KH*ao#dC`=N3>GI)US_v3W;0itGvKukam zq(&%brXweJ9)g$R;{#|-y9#9)R$)yL(eUza*ASC*jNkQ@5#F~$@^|VHS&8GM0MN}( z0vB8F+D&O~sRmjTQZNLVk#7GD$F`XDnAALf`cSr}vp?nG^}vrp<|ZW-1Ekaq-|n|O zTzz-e0B0_jWn2W&9n-L2>CLqqdPQ+OP9!z=u+xk6=K<0&{Ogsq(8o$$x#{H_Ftwd; zgy~%pBCM5gPSFoy@tQZ%3YD!(RYo<5O zGXMEN{aU%8VsA5iYMppx}ECXyO{n!Vx!*iXBF|wLcaCct*`IcC-r;+WrYee zjE<+Kcs?IpxghY`<;CR8h{Jaor=@iJuT!&y^LK8>3Y1*CJ27wT5F|6;ly-eDqDOHbrq=7`P9C4@oh@FO z*nDjN6YnJWDEI5+cIsSkU2IWK)rE;qarPnj0j;E(t;yZsxscWuMcEz76JKuG|CXY5 zN$6ae+`lpx+VxK``*l@tzp2)(pbqt)Ar4wn`IMU{Td(AQX-sHIB%Bu6mty^GRopxJ z*zfPPe3uKW$GD%RN8y;V)8^kgaL3YL!!FLa^nSV&I34T%VN1O>?Lpep2bCWllpj6F z_h3q_m(leZm_`R#!HU>jjE3W9XX)2p% ziTV*1F+_P2I;@#E`t$&JRE@h!Cmg)3A3B6pp9Dw?g8YOOUlZUyOGKfqiw)!)>9Edp z=P+#vdTH_ZRpJ6;W7Jw8Dxlz;8TY;nLb&QjsQ|2KA_d`O>Ln&97kkwv%CP!j+O@>{ zufsLj&K({?qbdnC!bGeU@i9BpGONNq4d~<^ec#5V&WhA+nH#{KV?=U<2sy1;$C)a6qU0<@sSiOAdgM@|vxx7qy{E)f|(^6cmWfIn28o z4OQ}hWQhbhiCi0Yx$8f%rwp;V^u!urNK7J=K%Zuii!-Xh3G7=^b3*eOX}U@A@=>{u>N03%t3aI*I(tj(|}a|1fU z=*1eGU{kS6j-L>=sN1mUW=z)bv&0y?0_lUIOIB#)Eh+SK>^F(xvfJ61$YQxWU^v~V zLr3vnFpk+>gx@@z^TAzapiWhdmX73w#CEs9gDK z(~v;cp&Jvw?tp5_CFq6(cN+(?mYtq(5^A+cw@-`sQB%TOTT)x(Az51)Qd^x@Tl>7W ze!jNxS8Wq-U5i@XQ{Fn7YHVZ(Zc`UZ3xa;E*O^O50-h4a7#yq(z2d!^tYm&fQgVX92epPd$;KJA#`k%0>$MG^@)~z}8^3rr?mILd zJa7D}_GFLu$x&YV9d^J)cybc*Ta&iAsEg-@yO zWm6BS3)LPSpJtyT$WoyRbzyv_0Y2D^q4M?#*vnnGU}LFR##T2eID@A^A;9WUsQHZr zvGfJW%ml1Zolb%eHZWh=%lL8eh*;@}ojWVA~1@+RmZYX{CiS@d!AcEANWl8{Cmh!P=y<0 zwGFY6d&v2hBssdr>birmJvD4y5w+o&A+jQ>iu4zim83FD)JmKfYut6JkeG)O>)rZ@ z9z(>7YV3<F}fA}|mS2KrcWeJ~y3O$0-~U!2JWN>VA9%3hp@$=)RyhCdQ0 z6Rcvk3(J6K@*Rj4Z4%3q#}|{|vfX!>E>}}7i__4i(MbG~ASSUZA*F$pPIP!LV(E6G zq8Qaz9HOE22V#8)KKy9D*#SgpUuM)LMtku(M*MCl zDHJ8@gbKJc@mh#2CT}CpdeYhQmrxAqT=NMud0RfS^%bE_9S}%*FI9VVoZhnaYetd` z0){ioMe^|RL1mVogcW(F!N<>#7pj*AsOMV$_ilio^}vTvD}$CQ!6>TN#CAZC%NP?2W`P!cO z`lWgQJ?VeKQ0uE2e830coDWp)Gv(5%?EXDH(hI#kRlS;vB&WsCyH@2Mee@5fT*KxT z)8(pi?Vl&Uzq*D0_~OR@YW^08Tr{0oW+Ts^CCkn(F8y8n*`UoJbBj9p z!-<~`t63Q826@@<0kM0S}jbf|IEf9Okq=*|7h{EDzVD|6@PKxYD zC+ynZNBP2!9A+|f$x_N@Sk=Zg3AdHS`Yx7t(&uF~h1lh<9<7@*0|B%3^y_m>z0&6d z^S!$_9G5qoDI2bhgX4{{>G#ut&T8@QuJVSy4zkhIgy zEXzk;{<&PHVYa3vv*W_HuZq?GaRXb-{Ee}=Wa;*XThg})jy)yqZ_D9d^*>R*@vz7- zJy>CRA;IY=6mIOI2_cN!`<*wJ7$RV7e zrX!P;BeRtw(SN={{4-N!hnf=y#L!M-8SG>$aQ^q*_4E&yM`tXx&5tA`=kVH_hTkXM zzH3B&&kDs}zNv1xk_pfvFqap@KW)~GAAI6p?;?&r)_*tnhovkgm}65tT2wcgbbfzX z`MWG~=k zJH;rQdJa`!fsyl~rQxK}fBWl-)Q3n&#d9Kx554WXpHaUSja*g>gFAPlIw%nT+dK3ZG3VPZpW-)wv-i$3 zpOU$6qmo;GZBg_)??ysX3oQeX$xy^A+`5sGlxp1XKkXXJ$fZHZ?)?+xJI4tE+XXpv zju_`z)==t7-+wUI%esdZrYP-F-S-QsI^81jwU<_tpAHRP-mj0>*{%A8vuY$znXZ<= z)WBrCoN4IbdUu8ipLj!k`=@#&6$d7=@;m|&P3RzX;5 zY!moyD~LxxfeP0FQt&@NXSjhd#?#EC8|ge(>))^bfetZ8A~6;d7rJdw@dHsfPy$d> zY$;W1f&Hu_RI(Vdk^)Z}EDjLj69zP9l+b|TJ*>NQoj6MfO9X^Qb3~{v;Ej!oo+(sI z04)0UAjCQH%|vG>3cylQisDLhy^^xShtEQj+th zL>OAfFM9d z4>D)e7(unGxbPiNVYTBMRG4Coc8YAwWPeI;|c$<`=K4F{=?nyld(ze|gun4u<$N zG-TEIG`^w<^=%$`H-Em6Nsr4gILiBO>EEKB8m}=Ke@R#=_r~PTQ>L<~H%Wd^#{umh zffN4-)_)x{Y{3W8Uz+xy#nX#+An$t6;@WV?sqlNN3Cfgv>*)_ZFOdGd`y0HDcO*pB)Md|y zFgJbZMHYvfZ*M~kvs%ADkBlvYZ=;kqhI6dxWn788`-A+a7|lz;i@ zC+ofnrYgFY;XbQW6x|e~jLN0oIUM94Xik1sx`qk$8kCBZjdRpRWBhOiI%<_Esg557)U)*D zGAojjZ{gxGhQnPZY#H3T>!=UahUbE+(pi43i??EpE@_XYp%&Milsa>4MXNKLH5l;0 zaa~qi-}DkF>(-JD>Bdxh2ifPpd3vj$OX)t|$~A7mcCnQJEw0uCu7ayK^6a?~H_BpSO|OZ4Vp!Jwm=Ue|5Q z3>n?W7wEUH4zfd4{Fus$Z>~L}4qVx0K2=Y;1tJ|bI%(y|;9Vc-rLU4rhPXw{FAs@; z$mjey+S5Ve*zG$&u8P4cCiq49HEl_Zg3u2Rr*orkY*W*18{SQcJ1K6{CU0^e4bG+s z7*I&mt#p8?Jkw9B!TZLdWX8T7p_!|iZSTdMSYWcW}O9= zyuhS^LE78M+>YzaVTR2vP5dwFw$>lAJhE&C60Sye<$lbHZgvy889cI(fylYkv%VpI zmD9>`QJMtYN@1{DBf&!40CfTeK@x6e?#;GReDKwXVtUhP1`^;=@sFZkBqO4a#fu-l z2ZC~hhjjOH_ZyaggFBZnFQcUjQ+<#vuPgl;wLOh1gM&obm2`f;1RilfaTT`$h0jk3 z;cP24IDGo4>tK)5_m23Fk^JhK+BJ2c1ehg>+NCDfv(?ulL;6ClV#v2-xA*dB3 z)m~omzS!k3-CX&-&XdXK@`sR_&UfE$H?Mv)eW+rG!Vt7^7+Bxfqf5#ZgG8nHM(w^H z;GrBDdfc~<8lQ#UsI?WcZo4xARib{fZHGkJdWF%t)1*GJlfo2Wv}uz&zfAF@)n%)~ zJh7+^$@FT=jk_9O9W3-E{H)&U+itV>`Puwv<3w0|n)qvI$zM1~S5@Fiw8s;CyzVd! z{*w2@SjTHR>mB`n8`wPJZaVK?H0J8aVPitOE?}!v$!^@Y1Wfr8-Z38<&LrK=B&mzo z2>OgB3D$?b<~n=rOYm#zhuM)`xOZtt7D$H`1hqWzX4l5=eE{e9#dh~+N*$}^r)f&Baxrfq)-vI0vE7LVcMN6deWPi;3n3#R-uPooF~ zCol}fy~6+`hGFUO$*P%O$Joy(`R&nGP9pPSN(VTvCJb*Lw(m3cvaeTizGY%gIejUjn^^T^916Ls(_&Pf>xmbh}ppzcp&abwVxs zYe!n1LP;|@un<&$qRS|RbaXUCb?@WsG}P>;c)%YZXqeALgdbXJv$v)@`_{M|mAfiD zzrvsErlDUbajMEy|IC`6z|;#bkBaN{o!)PAj8(zU(A1~j025L5Mgg(>_aHmN1t;DM zc~Y+v&ubu_>5+CMsU>uSDg5UIpAzmXyr#Jafr{nAOJc=I)SA zv_XjRAl->!3F=L;FGDHb=y4)QG|`D8UMM`$D>_o@`q`NAO};{dAz+dtyPPiPEnBE= z4YSwlptqoD3N%xVw4g?sHH=&MjkD_C-0(GEr+WPbPX1aw!q_zOl>h_MNY}1$mx)ma z>TNVPKOGU!pA5fJFzI(R8Ss7Ef8S&<+T?Yj$(sU`S2!3!LNQjq?N@*S`RzctQR#T{ z*8}N34O6vJ21#5mxxgdG*9clRdmp^9vN2p4a`2pVC`;FnD ziTU?Mo@}p8H0~$M+;sGvPC;mGcqb3V8otQ`E02*{A zlPmnu%i^Dg;lm+-_&fHLJjURe9_0^HQ0Yh~cqB(G%Al4SZTcr#>-YWA6Ig?bI=;Zw zvZ|@7J%Rn%EKH{pU%U?|!QHz$^b^tV`Pu1*76zmJVWFfhW`B4$AT`0CwTe*2?sWcZ z0R`*pOGgvT*2M#4r9hfPCcn<95Ojg4Rhaup>0(&M)+%&#-1@rRfvIR zKkaQ`!uiCB- zH{&d^;U!Fyq7G)QwVbqnMq>$_Hc{xfyWPpu+>>6d=f=4;QC`#c(}@OpL_;Q(J><_nHHrPhksR8DPHRO-*RdwaoTlz#%)<}$FgcKq9P+Lr^>rG*eb zQ??Ie&)CRx^|@83{w<#nj8iJ81-A<0Ojt)Q*>a))On;B5<%rz|A9tCeNXLYRXSfw1 zuWHji_~*C~|6y7k8AP=S&}&`_QJ>+gooKLY`h3xxW*Z`BTa7PSGXa`v``qosH~&?`)%G;cN)g;3KTMSw6h_Gbh-@!y zI$79Y@AwmDpc5-;m;*_Sjjj$#^vt1(bh4Iko;1uDWnY(W#~lBtgHT2!HFh+KG5IH` z?5N6i3NT?zv1^xj?=a9mi=W}0NPn1ws;>Dr&Qf(xlDVXL7{j>l}5NB10KtxBj}<-9^fCj^}8C#9XHG@YhRoo1YzKKMD! zhB?h8In5V3Ei^bS_Bbt#IxR0bt?W6G|2lnSa$Xg1UXylS*L2=Ua$>T88J@w+HA6Yo z20InYpW2rH+q*r^du`5Y{mx&PmcQ;f?@PNJXu5ncUHN9~^388$Kg{LO)8#~O<$Ht6 zagxjLLYJQdE59pNC`&H?rdR%KxImN@h}jik=1S%43T}{*L9WPTG9uiC`hVM5IsnxF E2cAx)NB{r; literal 0 HcmV?d00001 diff --git a/Docs/en_US/gsm/codes/codes.htm b/Docs/en_US/gsm/codes/codes.htm new file mode 100644 index 0000000..c8db321 --- /dev/null +++ b/Docs/en_US/gsm/codes/codes.htm @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + FAQ - kable do Nokii + + + + + +

Strona g³ówna/Main +page

+ +
Kody do Nokii/Codes +for Nokia phones
+ +

+
+ +

Poni¿ej zosta³y zebrane wszystkie (?) kody do telefonów Nokia, które mo¿na +wpisaæ w momencie, gdy na wy¶wietlaczu jest widoczna nazwa sieci/logo i odblokowana +jest klawiatura:

+

You have here all (?) codes for Nokia phones. You can enter them, when +see on the screen network name/logo and keypad is unlocked.

+

+
    +
  • GSM/DCS/PCN: +
      +
    • *#06# - sprawdzanie IMEI/checking IMEI. +Wiêcej o IMEI/More about IMEI
    • +
    • *EFR0# w³±cza/enables EFR +, #EFR0# wy³±cza/disables EFR +. Je¿eli dzia³a w Twoim telefonie (GSM/DCS/PCN), telefon siê zrestartuje +po jego u¿yciu/If it works for your GSM/DCS/PCN phone, phone will restart +after using it. Je¿eli nie, mo¿esz u¿yæ np. mygnokii ze strony +Pliki do pobrania do jego w³±czenia/If not, you can use mygnokii from + Files for download page to +enable it. Wiêcej o EFR/More about EFR
    • +
    • *HRC0# w³±cza/enables HR +, #HRC0# wy³±cza/disables HR +. Je¿eli dzia³a w Twoim telefonie (GSM/DCS/PCN), telefon siê zrestartuje +po jego u¿yciu/If it works for your GSM/DCS/PCN phone, phone will restart +after using it. Je¿eli nie, mo¿esz u¿yæ np. mygnokii ze strony +Pliki do pobrania do jego w³±czenia/If not, you can use mygnokii from + Files for download page to +enable it. Wiêcej o HR/More about HR
    • +
    • *#sim0clock# - sprawdza, czy mo¿liwe jest zatrzymanie zegara +karty SIM/checks, if SIM card can stop its' clock (GSM/DCS/PCN)
    • + +
    +
  • +
  • analog: +
      +
    • *3001#12345, *#639# - Menu do programowania NAM/NAM programming +menu. W niektórych modelach pozwala w³±czyæ +monitor sieci (nazywany Field Test)/In some models allows to enable +netmonitor (called Field Test).
    • +
    • *#92772689# - checking ISDN number/sprawdzanie numeru ISDN (N6120/6160/6162)
    • +
    • *#EVRC# - w³±cza i wy³±cza AMPS (Enhanced Variable Rate Codec)/enables +and disables AMPS (Enhanced Variable Rate Codec) (N6185)
    • + +
    +
  • +
  • *#9999#, *#170602112302#, *#682371158412125#, + *#3110#, *#0000#, *#3810#, *#5190#, *#6120# +, *#837#, *#6190#, *#8110# - sprawdzanie wersji i daty +firmware, modelu telefonu/checking firmware date & version and phone +model. Wiêcej o firmware/More about firmware
  • +
  • #pw+Master code+Y# - kod pozwalaj±cy zdj±æ simlocka o numerze +Y (je¿eli podano prawid³owy 10-cyfrowy MasterCode) - wtedy zobaczysz +"SIM protection turn off". Je¿eli telefon ma simlocka i podano z³y MasterCode, +zobaczysz "Code error". Je¿eli telefon nie ma simlocka, zobaczysz + "SIM was not restricted". Mo¿esz sprawdziæ stan simlocka równie¿ +przy u¿yciu mygnokii ze strony Pliki do +pobrania This is code for disabling simlock number Y (if you gave correct +10-digits MasterCode) - you will see "SIM protection turn off". +If phone has simlock and MasterCode was wrong, you will see "Code error" +. If phone doesn't have simlock, you will see "SIM was not restricted" +. You can also check simlock state using mygnokii from page +Files for download too
  • +
  • *#war0anty#, *#warranty# - wej¶cie do menu serwisowego/entering +service menu. W niektórych telefonach nale¿y usun±æ modu³ analogowy przed +jego u¿yciem/In some phones you have to remove analog module before using +it. W niektórych starszych telefonach (np. Nokii 3110) trzeba tu podaæ dodatkowy +kod/ In some older phones (like Nokia 3110) you have to enter additional +code here: +
      +
    • 6232 (OK): Pokazuje miesi±c i rok produkcji/Displays the Month +and Year of Manufacture
    • +
    • 7332 (OK): Pokazuje datê ostatniej naprawy/Displays the date +of the last repairment, if found ('DATE NOT SAVED'...)
    • +
    • 7832 (OK): Pokazuje datê kupna telefonu/Displays (if found) +the date where the phone was purchased ('DATE NOT SAVED'...)
    • +
    • 9268 (OK): Pokazuje numer seryjny/Displays Serial Number
    • +
    • 37832 (OK): Zmienia datê kupna (TYLKO RAZ!)/Set the Purchasing +Date MMYY (Warning: You can only do this once - So be careful ...)
    • +
    • 87267 (OK): Transfer danych do nastêpnego telefonu/Transfers +ALL phone numbers, pictures, sounds from one phone to another
    • + +
    +
  • +
  • *#7780# - reset ustawieñ telefonu do fabrycznych (np. Nokia +3110)/reset settings to Factory (for example, Nokia 3110)
  • +
  • *#date# - pokazuje datê produkcji/data date of production (N2110)
  • +
  • *#srn0# - pokazuje numer seryjny/shows Serial Number (N6150)
  • +
  • *#opr0logo# - kasuje logo operatora. Dzia³a w Nokii 3310 4.06 +i nowszych/clears operator logo. Works in Nokia 3310 4.06 and newer
  • + +
+ +

Na pocz±tek/Back to the top

+

+
+
+

+Marcin Wi±cek ( +WWW)
+Ostatnia aktualizacja: 5 stycznia 2002/Last modification: 5 January 2002
+

+ + diff --git a/Docs/en_US/gsm/compare/1.htm b/Docs/en_US/gsm/compare/1.htm new file mode 100644 index 0000000..aad41a1 --- /dev/null +++ b/Docs/en_US/gsm/compare/1.htm @@ -0,0 +1,20 @@ + + + + + + + + + + Compare phones + + + + + + diff --git a/Docs/en_US/gsm/compare/compare.htm b/Docs/en_US/gsm/compare/compare.htm new file mode 100644 index 0000000..b306487 --- /dev/null +++ b/Docs/en_US/gsm/compare/compare.htm @@ -0,0 +1,21 @@ + + + + + + + + + + Compare your phone + + + + +

Strona g³ówna/Main page

+ +

Click here to open script in new window + +

Kliknij, aby otworzyæ skrypt w nowym oknie + + diff --git a/Docs/en_US/gsm/compare/index.htm b/Docs/en_US/gsm/compare/index.htm new file mode 100644 index 0000000..3645bb7 --- /dev/null +++ b/Docs/en_US/gsm/compare/index.htm @@ -0,0 +1,210 @@ + + + + + + + + + + Compare your phone + + + + + + diff --git a/Docs/en_US/gsm/compare/null.htm b/Docs/en_US/gsm/compare/null.htm new file mode 100644 index 0000000..a511ca4 --- /dev/null +++ b/Docs/en_US/gsm/compare/null.htm @@ -0,0 +1,6 @@ + + + + + + diff --git a/Docs/en_US/gsm/firmware/firm12.htm b/Docs/en_US/gsm/firmware/firm12.htm new file mode 100644 index 0000000..9bc4b0e --- /dev/null +++ b/Docs/en_US/gsm/firmware/firm12.htm @@ -0,0 +1,358 @@ + + + + + + + + + + + Nokia identification & firmware/Identyfikacja i oprogramowanie telefonów Nokia + + + + +

Main page/Strona +g³ówna
+ +
+


Nokia identification & firmware/Identyfikacja +i oprogramowanie telefonów Nokia

+ +

+


+
    +
  1. +Ogólne b³êdy/General bugs
  2. + +
  3. +Ogólne informacje o IMEI/General info about +IMEI
  4. + +
  5. +Czy mogê wgraæ sobie oprogramowanie/Can I download +firmware to my phone ?
  6. + +
  7. +Czy to kosztuje ?/Does it cost ?
  8. + +
  9. +Gdzie tego dokonaæ ?/Where to make it ?
  10. + +
  11. +Jakie s± b³êdy/zmiany w kolejnych wersjach +?/What are bugs/changed things in next versions ?
  12. + +
  13. +Jak zmieniæ wersjê jêzykow±?/How to change +language in phone ?
  14. + +
  15. +U¿yte materia³y/Information sources
  16. +
+ +
+
+

Here is table describing firmware in various Nokia 1xxx/2xxx phones +
You can also see table for +
Nokia 1xxx/2xxx, Nokia +3xxx, Nokia 5xxx, Nokia +60xx/61xx, +
Nokia 62xx/63xx/65xx, Nokia +7xxx, Nokia 8xxx, Nokia +9xxx

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Phone (telefon)Model number (Oznaczenie)Firmware version code (kod do sprawdzania wersji oprogramowania)TAC in IMEI (TAC w IMEI)
100THX-9L
450TFH-9*#9999#
V1.04 03-02-97
540THF-11*#9999#
V1.01 18-11-97
550THF-10*#9999#
V1.04 09-06-97
640THF-13
650THF-12
V1.05 08-12-98
1011NHE-2
1610NHE-5*#170602112302#490139
V3.92 17-03-96 +
V4.12 30-05-96 +
V5.02 26-06-96 +

(V4.12) SMS sending added. +
(V4.12) Dodane wysy³anie SMS. +

V5.15 25-02-97 +
V5.23 02-11-98

1611NHE-5SX
V4.03 12-08-97 +

V4.05 09-11-98 (new 1611?) +

V5.02 26-06-96 +

Some firmware versions display full network names. +
Niektóre wersje oprogramowania wy¶wietlaj± pe³ne nazwy sieci. +

V5.23 02-11-98

1630NHE-5NA*#170602112302#
V5.23 02-11-98
1631NHE-5SA
16??NHE-5NX490152
V5.13 10-12-96
2010NHE-3*#9999#
2110NHE-1XN*#9999#
Vm4.95 02-07-96 +
V5.56 03-12-96
2110i, 2110e for GSM 900NHE-4*#170602112302#
V5.11 27-09-95 +
V5.62 05-05-97
2110i, 2110e for GSM 900NHE-4NX*#682371158412125#490130
V5.31 06-01-96 +
V5.49 09-10-96 +
V5.62 05-05-97 +
V5.70 15-11-97
2110i, 2110e for GSM 1800NHK-IEA*#682371158412125#
2140NHK-1XA
Vm4.92 01-06-95
2148NHK-1
2148iNHK-4
2160NHC-4NE
+Back to the top/Na pocz±tek +

+


+
Marcin +Wi±cek (WWW)
+ + + diff --git a/Docs/en_US/gsm/firmware/firm3.htm b/Docs/en_US/gsm/firmware/firm3.htm new file mode 100644 index 0000000..d3c56b2 --- /dev/null +++ b/Docs/en_US/gsm/firmware/firm3.htm @@ -0,0 +1,1704 @@ + + + + + + + + + + + Nokia identification & firmware/Identyfikacja i oprogramowanie telefonów Nokia + + + + +
Main page/Strona +g³ówna
+ +
+


Nokia identification & firmware/Identyfikacja +i oprogramowanie telefonów Nokia

+ +

+


+
    +
  1. +Ogólne b³êdy/General bugs
  2. + +
  3. +Ogólne informacje o IMEI/General info about +IMEI
  4. + +
  5. +Czy mogê wgraæ sobie oprogramowanie/Can I download +firmware to my phone ?
  6. + +
  7. +Czy to kosztuje ?/Does it cost ?
  8. + +
  9. +Gdzie tego dokonaæ ?/Where to make it ?
  10. + +
  11. +Jakie s± b³êdy/zmiany w kolejnych wersjach +?/What are bugs/changed things in next versions ?
  12. + +
  13. +Jak zmieniæ wersjê jêzykow±?/How to change +language in phone ?
  14. + +
  15. +U¿yte materia³y/Information sources
  16. +
+ +
+
+

Here is table describing firmware in various Nokia 3xxx phones +
You can also see table for +
Nokia 1xxx/2xxx, Nokia +3xxx, Nokia 5xxx, Nokia +60xx/61xx, +
Nokia 62xx/63xx/65xx, Nokia +7xxx, Nokia 8xxx, Nokia +9xxx

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Phone (telefon)Model number (Oznaczenie)Firmware version code (kod do sprawdzania wersji oprogramowania)TAC in IMEI (TAC w IMEI)
3110NHE-8*#3110#490165, 490184 (Finland)
V6.52 15-05-97 +
V7.11 24-09-97 +

An updated GSM operators' list. +
Uaktualniona lista operatorów. +

By pressing C during a call which then changes the NaviKey's function +to Options that include putting the call on hold, address book, sending +DTMF and ending the Call (it can be activated via a settting menu item +"In Call functions"). +
Przez naci¶niêcie klawisza C w czasie rozmowy oznaczenie NaviKey zmienia +siê na "Opcje" daj±c dostêp do  menu zawieraj±cego ró¿ne opcje przydatne +podczas rozmowy (mo¿e byæ ono w³±czane przy pomocy opcji "Funkcje równoleg³e" +w menu). +

The hold function is complemented by a new Menu function "call waiting +service". +
Funkcja zawieszenia po³±czenia jest obecna w postaci nowej pozycji +menu ("Us³uga po³±czeñ oczekuj±c."). +

The leaflet also indicates that the volume of all ringing tones have +been raised. +
Zwiêkszono g³o¶no¶æ wszystkich dzwonków. +

The option to add a number directly from the dialled/received/missed +calls to the phonebook - When a number in those registers is highlighted +and is not in the phonebook already, the Navikey displays "Options" which +include save and dial. +
Dodano opcjê zapisu numeru do ksi±¿ki telefonicznej z menu z wybieranymi/odebranymi +i nieodebranymi po³±czeniami - je¿eli nie ma jakiego w ksi±¿ce, oznaczenie +Navikey zmienia siê na "Options", które pozwala w³a¶nie na zapis (i dzwonienie). +

A "fast silent mode" (like in 8110) - press Menu and #. +
Szybkie przej¶cie do cichego trybu (jak w Nokii 8110) - wystarczy nacisn±æ +Menu +i #. +

Any answer key function removed. +
Usuniêto funkcjê odbioru jednym klawiszem. +

V7.72 18-12-97 +

Support for vibra battery - added menu in option. +
Obs³uga baterii wibracyjnych - odpowiednia opcja w menu. +

Added "Cell Info Display" and "Broadcast Messages" options in menu. +
Dodana obs³uga cell info i cell broadcast (pozycje "Informacje o sieciach" +i "Wiadomo¶ci sieciowe" w menu) +

V7.73 30-01-98 +
V8.11 27-02-98 +

(NEWER TOO ?): when you're in menu and press (c) key, phone leaves menu +(it doesn't go to one level higher) +
(NOWSZE TE¯ ?): je¿eli u¿ytkownik jest w menu i naci¶nie klawisz (c), +opu¶ci ca³kowicie menu (a nie przejdzie do jednego poziomu wy¿ej). +

V8.30 16-04-98 +
V8.32 21-09-98 +
V8.50 20-10-98 +
+


+
B£¡D (nie wiem, czy z równie¿ z najnowszym oprogramowaniem): nie mo¿na +do³adowaæ karty SIM+ (zadzwoniæ pod 5555) po wyczerpaniu limitu do 0 PLN +lub zablokowaniu rozmów wychodz±cych (nale¿y kartê prze³o¿yæ do innego +telefonu i j± tam do³adowaæ albo skorzystaæ z numeru 0-22 6075555).
3210NSE-8/9*#0000#448896, 448903 (Finland), 449142 (Finland), 449143, 499149 (Germany), +449150, 449203 (Germany), 449204 (Germany), 449314
V2.54 20-01-99 +
V3.00 07-06-99 +
V3.01 10-06-99 +
V3.10 17-06-99 +
V4.02 20-07-99 +
V4.41 17-08-99 +
V4.43 14-09-99 +
V4.65 07-10-99 +
    +
  • +Improvement to charger detection and clock stoppings (in the display)
  • + +
  • +Menu support for OTA prepaid service implemented
  • + +
  • +Improved Short Term Memory: the number from e.g. missed calls list can +now be edited
  • + +
  • +SIM ATK message sent note improved. Now SMS message send indication is +shown only once when the message is sent.
  • + +
  • +SIM-card busy note implemented in SIM ATK. SIM card busy note is now displayed +when entering SIM ATK menu while SIM card is waiting for response to send +SMS or send SS command.
  • + +
  • +Keyguard can now be on, when the phone is connected to PPH-1 car kit
  • + +
  • +Operator name changed "KB Impuls" -> "Bee Line" (250/99)
  • + +
  • +T9 language databases updated
  • + +
  • +T9 case handling improved: Automatical change between upper and lower cases +after dot (.). Spell mode now uses the present case instead of always starting +in upper case.
  • + +
  • +Improvements in T9 special character handling and Matches menu
  • + +
  • +Improvement to T9 ('Insert word' and 'Insert number')
  • + +
  • +Improvement to USSD
  • + +
  • +Improvement to CPHS Information number handling
  • + +
  • +Improved reception of two consecutive OTA ringing tones.
  • + +
  • +Postponing alarm for over 90 minutes, improved. When the alarm is set and +activated, it is possible to postpone (snooze) it continuously (before +it was limited to 90 min.)
  • + +
  • +Destination number is now given as default if Picture Message sending fails. +This means that the user does not have to enter the destination number +again.
  • +
+V5.01 26-11-99 +

(V4.02) With connected headset the light turn on all time (previously +not always). +
(V4.02) Przy pod³±czaniu zestawu s³uchawkowego zawsze zapala siê pod¶wietlenie +(poprzednio nie zawsze). +

Added Menu 3-8 ("Prepaid credit"). +
Dodane Menu 3-8 ("Op³acony kredyt"). Nie dzia³a z SIM+. +

V5.10 21-01-00 +

Changes in parts connected with charging battery. +
Zmiany w czê¶ci odpowiedzialnej za ³adowanie baterii. +

V5.22 29-03-00 +

V5.26 07-04-00 +

Phone displays animated startup logo with "hands", not downloaded by +user. If you will reset phone settings (Menu3-3 in PC-LOCALS 1.3), it disappear +and downloaded logo will be displayed then. +
Telefon pokazuje animowane logo startowe z "r±czkami", a nie to wgrane +przez u¿ytkownika. Je¿eli zresetujesz ustawienia telefonu (Menu 3-3 w PC-LOCALS +1.3), zniknie ono i pokazywane bêdzie wtedy logo wgrane. +

V5.31 24-05-00 +

    +
  • +(V5.01): when you edit SMS and enter "*" key (symbols), pressing "#" will +move cursor to the next line
  • + +
  • +Can't open simlocks using NokiaTool only - must use EEPROM method
  • + +
  • +Dodano dwie ukryte gry (React i Logika). Aby je uaktywniæ (opis dla PC-LOCALS +1.3):
  • + +
      +
    • +Uruchom PCLOCALS
    • + +
    • +Wejd¼ w menu 3 ( ME Function)
    • + +
    • +Wybierz PRODUCT PROFILE SETTINGS
    • + +
    • +Zmieñ bit 29 (pozycja 1D) z 0 na 1
    • + +
    • +Wci¶nij F2, aby zapisaæ zmiany w EEPROMie
    • +
    + +
  • +Added two hidden games (React and Logic). To activate them (description +for PC-LOCALS 1.3):
  • + +
      +
    • +RUN PC Locals
    • + +
    • +Goto menu 3 ( ME Functions )
    • + +
    • +Choose PRODUCT PROFILE SETTINGS section
    • + +
    • +Change bit 29 ( place 1D ) from 0 to 1
    • + +
    • +Press F2 to save to EEPROM
    • +
    + +
  • +(NOWSZE TE¯ ?) B£¡D: Po wybraniu czasu 12-godzinnego i jêzyka polskiego +w godzinach popo³udniowych w menu ustawiaj±cym zegarek pojawia siê godzina, +"po po³." (po po³udniu) i ró¿ne dziwne znaczki...
  • + +
  • +(NEWER TOO ?) BUG: Test 45 in NetMonitor +and parameter ChCur in test 23 +don't work correctly.
  • + +
    (NOWSZE TE¯ ?) B£¡D: Test 45 +w monitorze sieci i parametr ChCur w te¶cie +23 nie dzia³aj± poprawnie. +
  • +(NEWER TOO ?) BUG: When you're in Composer (Menu 9-3), haven't set tempo +before and use "Tempo", will see blank screen with indicator on the right +side of screen. To change tempo must press any key.
  • + +
    (NOWSZE TE¯ ?) B£¡D: Kiedy jeste¶ w Kompozytorze (Menu 9-3), nie ustawia³e¶ +tempa melodii i u¿yjesz opcji "Tempo", zobaczysz pusty ekran ze wzka¼nikiem +po prawej stronie ekranu. Musisz teraz nacisn±æ jeden raz dowolny klawisz... +
  • +(NOWSZE TE¯ ?) B£¡D: Niedok³adne t³umaczenie w Menu 1-8-2 i Menu +1-4-1
  • + +
  • +Improvement to RF signal bars: When RX was reduced by e.g. 50 dB in phones +with software version 5.22 or 5.26, the RF signal bars may only decrease +by one bar instead of two-three bars.
  • + +
  • +Improvement to Picture messages: In previous versions Picture messages +couldn't be forwarded unless the text was edited.
  • + +
  • +SMS editor speed improved: In previous versions the SMS editor could appear +slow when entering long messages (100-160 characters)
  • + +
  • +Improvement to composer: In previous versions certain sequences of tones +could cause the phone to reset.
  • + +
  • +Operator list updated
  • +
+V5.36 25-07-00 or 08-08-20 or 27-07-00 +
V5.38 +

(?) When read info about simlocks via cable some programs (for example, +NokiaTool), they're CLOSED ! +
(?) Przy odczycie informacji o simlockach przez kabel przy u¿yciu pewnych +programów (np. NokiaTool), s± one ZAMYKANE ! +

V6.00 13-10-00 or 03-10-00 +
V6.00 23-08-01 (ROM6?) +
  +

    +
  • +(V5.24) In call register menu new option Send SMS in Dialled/Missed/Received +list
  • + +
  • +(V5.24)Changed ringing tones (for example, "Hurdy-gurdy")
  • + +
  • +(V5.36) "SIM card registration failed" message is shown when the SIM card +or phone is unknown or rejected from the network.
  • + +
    (V5.36) Komunikat "Rejestracja karty SIM nieudana" , gdy karta SIM +lub telefon nie mo¿e byæ zalogowany w sieci +
  • +(V5.36) Unknown callers (private/unlisted numbers) are now registered as +missed calls (for example, in the Call register (Menu 3-1)). They +are listed as "(no number)" and it is now possible to see Time of call
  • + +
  • +(V5.36) Arabic (Indian) numbers are used correctly
  • + +
  • +(V5.36) Improvement to receiving an over the air ringing tone. Earlier +when receiving an over the air ringing tone and selecting playback directly, +the first tone would be partially cut off during the playback (only when +the keypad tones were activated)
  • + +
  • +(V5.36) Improvement to SIM Application Toolkit
  • + +
  • +(V5.36) Improvements to T9 
  • + +
  • +(V5.36) When using Options menu to insert a symbol twice in an empty SMS +editor (e.g. @@) (This problem was presented only in SW versions 5.31 and +5.36) - phone remembers the T9 state after entering and leaving the options +menu (earlier when entering and leaving the options menu from the SMS editor +after having disabled T9 with the #-key, the phone would activate T9 again +automatically)
  • + +
  • +(V5.36) Operator list updated 
  • + +
  • +(V5.36) BUG REPAIRED: When edit long SMS (about 160 chars) and press Up/Down +key very long (until will scroll all SMS context - 160 chars) without releasing, +phone will restart after it - info from SkyBoy
  • + +
    (V5.36) POPRAWIONO B£¡D: Przy edycji d³ugiego SMSa (oko³o 160 znaków) +po naci¶niêciu klawisza Góra/Dó³ i przytrzymaniu (bez zwalniania), a¿ ca³y +SMS (160 znaków) zostanie przewiniêty, telefon zresetuje siê...  - +informacja od SkyBoy  +
  • +(V5.31) Memory game is named "memory", not "pairs" 
  • +
+ +
+
If you Activate and Deactivate the Phone Security (Menu 4-3-4) +on Software versions 5.26 - 5.36 the tick is incomplete. +

I have signals, that sometimes after making some things over cable (uploading +logo, etc.), contrast of LCD is changed ! Probably using Logo Manager makes +problem! +

Interesting facts: firmware seems to be cut version of firmware from +more expensive phones. There still some help texts inside, texts from some +functions (does it mean, that phone support them ?) - ("Rename this set" +- it can be done via cable !), text with name of "full" profiles - the +same question (Meeting, Outdoor, Pager, General), texts "Save to another +memory?, Saved to phone memory,Saved to SIM Card", "List of own numbers"...

3310NHM-5*#0000#350005, 350101 (Finland)
V3.24 22-08-00 +

BUG (NEWER TOO ?): With voice dialing and HF, when phone understand +your voice, "hanges". You can see "Dialing too..." and "End". When you +press "End" and keypad is locked, you will see "Press Unlock and then *" +and then (something lika that) "Enable SIM application?". When press "OK", +everything is again normal... +
B³±d (Nowsze te¿ ?): Przy wybieraniu g³osowym (przez zestaw HF) i pozytywnym +rozpoznaniu znaku, telefon "zamiera". Widaæ "Dzwoni do..." i "Zakoñcz". +Gdy chcemy Zakoñczyæ i s± zablokowane klawisze pojawia siê "Naci¶nij odblokuj, +a potem *", a nastêpnie (co¶ w rodzaju) "W³±czyæ aplikacje SIM?". Naciskamy +"OK" i wszystko wraca do "normy"...  +

V4.02 05-10-00 +

V4.06 21-11-00 +

    +
  • +Handling (e.g. sorting/adding/replacing) of names in phonebook corrected +in Turkish and Greek languages
  • + +
  • +Special characters corrected in Danish language (when sent to 8210/3210)
  • + +
  • +Improvements to SIM-ATK, e.g.:
  • + +
      +
    • +When USSD notify is send, the phone sends the response to the SIM card
    • + +
    • +Long press 'C' and short press 'C' gives correct value to SIM card
    • + +
    • +Call coming with SIM ATK gives correct result back to SIM
    • + +
    • +Display Text works with scroll key
    • +
    + +
  • +Improvements to SMS and T9:
  • + +
      +
    • +Delivery report 'pending' in Chat-mode corrected
    • + +
    • +Name were missing on delivery reports
    • + +
    • +Changes in cursor movements in SMS (with active T9)
    • + +
    • +Adding words to dictionary can be recognised
    • +
    + +
  • +Improvements to Reminder:
  • + +
      +
    • +Corrections on functionality when erasing one by one, pressing Clear during +erase
    • + +
    • +Receiving calendar requests from other phones improved
    • +
    + +
  • +USSD commands activated from AND (Abbreviated Dialling Numbers) when Speed +Dial selected
  • + +
  • +New code - you can Clear Operator Logo using *#67705646# command
  • + +
  • +Returning from game settings improved
  • + +
  • +Service numbers do not open anymore an empty screen
  • + +
  • +Improvement to phonebook number query count
  • + +
      +
    • +Caller groups in names on SIM card were not always removed
    • +
    + +
  • +Improvements to OTA functionality
  • +
+V4.18 12-01-01 (18-12-00 ?) +
Support for new Power Amplifier added +

V4.23 25-01-01 +

    +
  • +Improvements to SIM-ATK: Setup Call could reset phone, if text sent with +Setup Call  was very long 
  • + +
  • +Improvements to SMS and T9: 
  • + +
      +
    • +Receiving Picture Messages with Euro sign 
    • + +
    • +Counter in Picture Messages when Unicode is selected (Adding character +counter for message writen other than English ?)
    • + +
    • +'Send to many' option after reply 
    • + +
    • +Not able to fetch Phonebook (blank display) when forward / reply to SMS 
    • + +
    • +Errors receiving Concatenated SMS 
    • + +
    • +Inserting a Smiley 
    • +
    + +
  • +Improvements to Reminder: letter counter (earlier: when edit reminder text, +number of free chars is displayed incorrectly. First: one additional byte +is used for indicating coding (in fact you have maximally 35, not 36 chars), +second: some chars are saved as two 8 bit chars (indicator doesn't show +it) and when write only them, you can write only 17 chars. Summary: you +can write 17 - 35 chars (number of it depends, what chars are in text) +and indicator doesn't show number of free chars correctly...)
  • + +
  • +Improvements to Settings: Light managing in carkit 
  • + +
  • +Improvements to Composer: Screen blanked when selecting Tempo option with +some OTA ringing tones 
  • + +
  • +Improvements to Phonebook: 
  • + +
      +
    • +Indicator shown while sending message 
    • + +
    • +Long number correction 
    • +
    +
+V4.19 03-01-01 +
The same functionality as version 4.18 +

Note: New text strings (localisation), which were implemented in V4.23, +contained some specific characters (i.e. Clear Key when writing SMS). Software +version 4.19 will correct these failures. +

V4.24 23-02-01 +

    +
  • +Note: When using V4.23, deleting character with 'C' key was not possible +in language pack B, G and H. This has been corrected.
  • + +
  • +Contains all improvements made in V4.23
  • + +
  • +Support for RFMD Power Amplifier added 
  • + +
  • +Improvements to SIM-ATK: If Display text was (8n-1) long, an @ would show +at the end 
  • + +
  • +Improvements to SMS and T9: 
  • + +
      +
    • +Wrong counter in query 
    • + +
    • +Letter counter 
    • + +
    • +Euro-sign as second-last character in Reminder Text 
    • +
    + +
  • +Improvements to Reminder: Euro-sign as second-last character in Reminder +Text 
  • + +
  • +Improvements to ALS: Missing blinking indicator for non selected line 
  • + +
  • +Improvements to Phonebook: 
  • + +
      +
    • +Voice Mailbox DDI Interface improved 
    • + +
    • +Corrections to Turkish language (menu items, translations, message in Voice +dialling)
    • + +
    • +(removed bug) Can read phonebook and other memories via cable
    • +
    +
+V4.35 29-03-01 +
    +
  • +'Insert SIM' problem with certain 32K SIM cards improved 
  • + +
  • +(?) 'Uppercase ABC' in Chinese Language package corrected 
  • + +
  • +(?) 'Multi Sim Lock' included
  • +
+V4.45 21-06-01: +
V4.45 05-07-01 (ROM6?): +
    +
  • +Language: 
  • + +
      +
    • +General update of Dictionary in all languages 
    • + +
        +
      • +New T9-languages 
      • + +
          +
        • +Czech
        • + +
        • +Polish 
        • + +
        • +Hebrew 
        • +
        + +
      • +New UI-language 
      • + +
          +
        • +Ukrainian (No T9 input) 
        • + +
        • +Chinese 
        • +
        + +
      • +Selected 'word' shown as "square" in traditional Chinese 
      • + +
      • +Special word not selectable when Bopomofo 
      • + +
      • +Vietnamese 
      • + +
          +
        • +Translation to 'Countdown Timer' corrected 
        • +
        + +
      • +German 
      • + +
          +
        • +Translation of 'Highscore' corrected 
        • +
        + +
      • +Hebrew 
      • + +
          +
        • +input in all editors 
        • +
        +
      + +
    • +Composer 
    • + +
        +
      • +Vibrating in Composer stops when receiving an SMS 
      • + +
      • +Vibra active when composing a ringing tone 
      • + +
      • +Not possible to forward received ringing tones anymore 
      • +
      + +
    • +Phonebook 
    • + +
        +
      • +Mixed case multitap ('Abc') in phonebook implemented 
      • + +
      • +Alphabetic sorting order corrected when spaces in the beginning of a name 
      • + +
      • +Search in Phonebook now starts from the top 
      • + +
      • +Scrolling error in Chinese Phonebook corrected 
      • + +
      • +Leading blanks ignored in sorting 
      • + +
      • +When trying to save "no. too long, max. 20" next screen is number editor +but with name query 
      • +
      + +
    • +Dictionary / SMS / GMS 
    • + +
        +
      • +'Insert word' works without adding spaces 
      • + +
      • +'Insert symbol' will be placed at cursor position 
      • + +
      • +Mixed numbers and characters handeled correctly 
      • + +
      • +Phone freeze / reset when sending GMS if Message Center Number missing +is corrected
      • + +
      • +From Option menu in Write Message 'Upper / Lower' case latin 
      • + +
        input can be selected from menu in chinese language packs 
      + +
    • +MISC 
    • + +
        +
      • +Calculator: Exchange rate now done with higher precision 
      • + +
      • +SIM ATK: Clear key is now working properly in Play Tone 
      • + +
      • +Shortcut: Missing functionality in Reminder and Tone menu implemented 
      • + +
      • +General update of Operator Name List (#41) and UI Text
      • +
      +
    +
+Users info (corrected or changed things compared with V4.02): +
    +
  1. +the same:
  2. + +
      +
    1. +Picture Images:
    2. + +
        +
      1. +You can write Unicode chars. You can write, but when send image or get +via cable, they're converted to latin chars (I quess: for backward compatibility +with older phones)
      2. + +
      3. +You can have sender number for each Picture. Phone can't put alphanumeric +numbers (only "normal" and "international") there...
      4. +
      + +
    3. +SMS:
    4. + +
        +
      1. +Unicode SMS's saved in Outbox have Details in Options and "Sender" and +"Message centre: 0" there (sometimes date too)...
      2. + +
      3. +No differences between "Automatic" and "GSM alphabet" (Menu 2-7-6-3) +- Unicode SMS chars are translated to chars from GSM alphabet. IMHO, when +set to Automatic and write Unicode specific chars, Unicode should be used; +if don't use such chars, GSM Alphabet should be used (you should see in +editing screen info about this - different number of maximal chars)
      4. + +
      5. +When edit SMS, have some contenst inside, T9 dictionary is disabled and +write with large chars (ABC on the tope of the screen) and use any of functions +from Options (at least enter into it and return to editing), size of chars +for new text is set to small (abc on the top of the screen).
      6. + +
      7. +When open SMS from Outbox for editing, T9 dictionary is disabled, size +of chars for new text is set to small (abc on the top of the screen).
      8. + +
      9. +When save Linked SMS in Outbox, they're visible double...
      10. + +
      11. +(???) Some business cards (from 3210 ?), which contains some additional +data after correct business card contents are not recognized and you have +problems with editing them...
      12. + +
      13. +(???) Blinking SMS Unicode messages (contains 0x00,0x01 chars) can be edit +and forwared (GREAT!), but wrote appears few spaces in front of the cursor +(as if cursor was there, but it's not - it's few characters behind!)
      14. + +
      15. +T9 dictionary:
      16. + +
          +
        1. +When enable T9 dictionary, have "Insert number", "Insert symbol" and "Insert +word" in Options during editing SMS. They don't seem to be connected with +T9 (at least two first)
        2. +
        +
      + +
    5. +Reminders menu (very limited version of Calendar) is like joke:
    6. + +
        +
      1. +When use Menu 10-3-2 with empty reminders memory, phone goes out +from Reminders menu
      2. + +
      3. +when set notes via cable, year of them is set to 2090
      4. + +
      5. +(???) can receive notes from more expensive models (61xx) and send them +in one SMS (can not edit); when create reminder in phone and send it to +more expensive model (61xx), two SMS are required...
      6. + +
      7. +(???) don't display date from notes from more expensive models (61xx)
      8. + +
      9. +(???) when send note to more expensive models (61xx), date of it is 13.07.2041
      10. + +
      11. +(???) loss birthday date in note (in such situation: forward note from +61xx to 3310, from 3310 to 61xx)
      12. +
      + +
    7. +Ringtones:
    8. + +
        +
      1. +Phone incorrectly decodes some tones (their scale) in received tones (only +?) in Composer - to avoid this you must save Scale info with each ringtone +(--scale option in --saveringtone/--sendringtone in mygnokii).
      2. + +
      3. +(???) When receiving an over the air ringing tone and selecting playback +directly, the first tone would be partially cut off during the playback +(only when the keypad tones were activated)
      4. +
      + +
    9. +Games:
    10. + +
        +
      1. +Go into Bantumi game, select New Game, during animation press Navi key +and then C, select Continue and press any key. Interesting...
      2. + +
      3. +You must enable Warning Tones (Menu 5-7), when want to use Sound +(Menu 8-6-1). Old code (in older Nokias these options were connected)
      4. + +
      5. +You must enable Vibrating alert (Menu 5-8), when want to use Shakes +(Menu 8-6-3)
      6. + +
      7. +When select maze in Snake II, must play and end at least one game - maze +state is saved then into EEPROM
      8. + +
      9. +(???) Sometimes phones doesn't vibrate (with enabling shaking option) in +Snake II after eating food
      10. + +
      11. +(???) When play games (Space Impact only ?) and have "Battery full" message, +phone leaves menu...
      12. + +
      13. +(???) Sometimes doesn't write line in border in Snake II
      14. + +
      15. +(???) When end game with high score and press key during displaying score +info/animation, new score is not saved
      16. +
      + +
    11. +Language specific:
    12. + +
        +
      1. +PL: kiedy w Menu 8-6-4 masz zapisany identyfikator i wybierzesz +Wybierz, telefon pyta siê: Zastapic poprzedni identyfikator ? (niedok³adne +t³umaczenie).
      2. + +
      3. +PL: Niedok³adne t³umaczenie w Menu 1-8-2 i Menu 1-4-1 i Menu +10-3-1
      4. + +
      5. +To use some chars specific for some languages you need to activate them +(what, when phone doesn't have correct PPM package with specific language +?)
      6. + +
      7. +PL: Komunikat "Mikrofon wy³±czon"
      8. +
      + +
    13. +Warranty menu (*#war0anty#):
    14. + +
        +
      1. +if you haven't entered Purchasing date, press Edit, use up/down keys, press +any digit char and then you will have menu for editing Purchasing date...
      2. + +
      3. +(???) Life Timer doesn't work from the start (it starts showing correct +values, when all calls were longer than 1 h)
      4. +
      + +
    15. +Other:
    16. + +
        +
      1. +In netmonitor (all versions ?) in test +55 you have small type (one 's' too much in last line) in help and +info displayed in first line only
      2. + +
      3. +(???) After changing SIM card, voice tags weren't erased (manual connected +to phone writes, that they should be....) and T9 dictionary was enabled +and first number selected on SIM card and Cell info display (Menu 6-2-2) +set to off and and all tones assigned in Menu 1-6 set to default +(manual doesn't write about it).
      4. + +
      5. +Where is Menu 8-5 ?
      6. + +
      7. +(???) well, in Reminders and phonebook can have numbers of chars < 0 +(indicator on top screen). If it happens, phone informs about it or cut +some chars...
      8. + +
      9. +(???) Shortcut to Menu 6-1-1 doesn't work correctly
      10. +
      +
    + +
  3. +corrected or changed:
  4. + +
      +
    1. +Phonebook:
    2. + +
        +
      1. +Better sorting of entries with national chars. Phonebook is also returned +in Unicode now (via cable).
      2. +
      + +
    3. +SMS:
    4. + +
        +
      1. +(corrected - in some V4.02 it wasn't OK) In delivery reports don't have +names, only numbers (even, if numbers are in the phonebook)
      2. + +
      3. +T9 dictionary:
      4. + +
          +
        1. +(corrected) T9 dictionary state is not saved during disabling phone
        2. +
        +
      + +
    5. +Other:
    6. + +
        +
      1. +(new) Abc mode when write texts, SMS, etc.
      2. + +
      3. +(V4.06) when somebody calls you and will press "C" (drop a call or divert +it), for a moment (one, two seconds) screen looks like after answering +call...
      4. +
      + +
    7. +Ringtones:
    8. + +
        +
      1. +Phone is not compliant with Smart Messaging 2.0.
      2. + +
        Earlier: For received ringtones with some speed values (according +to SM2.0), when you edit them in Composer and use "Tempo", will see blank +screen with indicator on the right side of screen. To change tempo must +press any key. +
        In version 4.23 it was probably corrected +
        Now: when enter Composer, don't see even ringtone contenst
      + +
    9. +Reminders menu (very limited version of Calendar) is like joke:
    10. + +
        +
      1. +(corrected) sometimes doesn't delete notes (when memory is full):
      2. + +
          +
        1. +use Add new (Menu 10-1)
        2. + +
        3. +phone will display: "Memory full. Replace old reminder ?" - press NaviKey +(OK)
        4. + +
        5. +you will be able to select, which reminder should be deleted (NaviKey=Erase). +Select such reminder, which has default name (when created it, didn't write +anything in "Remind about" and phone write "Reminder" now)
        6. + +
        7. +Press NaviKey (Erase)
        8. + +
        9. +Phone will ask "Erase ?"
        10. + +
        11. +Press NaviKey (OK)
        12. + +
        13. +Phone will display "Reminder erased" and will display empty screen. When +will come back to viewing reminders, will see, that ist wasn't erased !
        14. +
        +
      + +
    11. +Netmonitor:
    12. + +
        +
      1. +(new - earlier it was always equal 0) Works "TIM" parameter in test +132
      2. + +
      3. +(new - earlier this test only reseted timers) Test +80 resets timers from test +82 and enables them (works as test +81)
      4. +
      +
    + +
  5. +Other: after upgrading firmware all Picture Images with sender numbers +have them changed (last digit changed to "0")
  6. +
+V5.03 10-10-01 +
    +
  • +Possibility for user to delete SIM-created SMS from inbox 
  • + +
  • +Operator Name List updated (#44) 
  • +
+V5.11 +
    +
  • +Following T9 languages have been added: Arabic, Hungarian, Slovakian 
  • + +
  • +Dictionary/SMS:
  • + +
      +
    • +Phone virus (SMS with corrupt header) can be deleted and only deleted 
    • + +
    • +Chat: editing Chatname cursor placement is fixed 
    • + +
    • +Hebrew: Templates, Searching and Keymap (in 'spell' state) improved. Writing +more than one capital letter is now possible 
    • + +
    • +Russian: Unicode and Latin letters in same SMS are now received correctly 
    • + +
    • +Picture Message: Blank screen after a call is now removed 
    • + +
    • +Improvement to Smiley editor counter 
    • +
    + +
  • +Phonebook: 
  • + +
      +
    • +Change Phone Line (with #) is now only possible from Idle 
    • + +
    • +Numbers matched even with + in it 
    • + +
    • +Incoming call is now indicated while erasing all in phonebook 
    • + +
    • +Possible to add new entries to internal Phonebook when FDN is on (but not +possible to dial) 
    • + +
    • +Missing information note added when copying entries between SIM and Phone +memory (Security level: Memory) 
    • + +
    • +Scrolling Phonebook entries with leading spaces possible for Latin as well +as for Chinese names 
    • + +
    • +Keypad lock can no longer be unlocked using special key string 
    • +
    + +
  • +Emergency call: During snooze softkey text is changed to 'call' Possible +while entering new PIN-code 
  • + +
  • +Euro-sign in picture message received successfully on other phones 
  • + +
  • +Counter overflow corrected (language pack G) in Reminder and Phonebook 
  • + +
  • +Alignment corrected in Stop Watch and Unit Price Editor (when charging +interrupted) 
  • + +
  • +Time: Improvement to 12-hour setting. Input contains now 4 digits in year +in Russian Time/Date. Russian Date is with a colon instead of a dot 
  • + +
  • +Reminder: Calendar date corrected on receiving end. Now DISPLAY TEXT with +the option 'wait for user to clear text' waits for user to clear the text +(earlier it was cleared automatically after 5 sec.) 
  • + +
  • +Display Text length increased (it was too short for Send SS) 
  • + +
  • +General vibration level increased to make it easier to feel that the vibra +function has been activated
  • + +
  • +NITZ: (Automatic update of time/date) Time set, even if the user hasn't +activated and set the clock 
  • + +
  • +SIM ATK: Refresh command no longer jams the keypad. Selectable header in +SIM ATK menu has been removed
  • +
+ +
+
WARNING: IF YOU GIVE YOUR PHONE TO SERVICE +FOR REPLACING FIRMWARE, DELETE ALL VOICE TAGS FROM ITS' MEMORY. IN OTHER +CASE YOU CAN LOST THIS PLACE IN PHONE'S MEMORY. EXAMPLE: IF YOU HAD 2 VOICE +TAGS IN MEMORY, WHEN PHONE WAS GIVEN TO SERVICE, AFTER REPLACING FIRMWARE +YOU CAN HAVE ONLY 6 PLACES (NOT 8) FOR VOICE TAGS. +

Phone doesn't work correctly with some SAT (SIM Application Toolkit) +SIM cards. I don't know, if problem depends on phone or these SIM cards +bugs.... If I have correctly info, users of Polish Plus GSM (260-01) network +with SIM cards with HRL 91 should change them... +

Note: When use shortcut for Menu 8-1, Menu 8-2, Menu 8-3, +Menu 8-4, Menu 8-6, for a moment displays incorrect data... +

Interesting facts: firmware seems to be cut version of firmware from +more expensive phones. There still some help texts inside, texts from some +functions (does it mean, that phone support them ?) - ("Rename this set"- +it can be done via cable !), texts from "full" calendar ("Meeting", "Birthday", +etc.), texts "Save to another memory?, Saved to phone memory,Saved to SIM +Card","List of own numbers" (update: own numbers memory is available via +cable)...

3330NHM-6*#0000#350150
V2.49 19-03-01 +
V3.05 05-04-01 +

BUG: +

    +
  • +when have more than 3 voice tags, during using this function (voice dialling) +phone hangs and resets
  • + +
  • +Games:
  • + +
      +
    • +If you try to download (via wap) new "game levels".  The problem is +that after it phone do not display the "ranking list" of "snake2" and/or +"space impact". Problem appeared after downloading new "labirints" and +"new mission". When you try to download the same mission (promo 1, gratis) +after it. Result was the phone always don't display the ranking list and +also "space impact" don't run. "Bumper" runs ok.
    • + +
    • +Snake, if you reach an high level of scoring, when you select "continue" +the phone go locked.
    • +
    + +
  • +"ascending" attribute doesn' t work
  • + +
  • +bug connected with assigning ringtones: when I changed a name with a specific +ringtone, and I look at other names I see that also some one other name +was changed the ringtone. The I changed back this second name to original +ringtone,  and also the first came back to original ring tone. It +seems that you can change a ringtone for a specific position number, that +is in use simultaneously in use in SIM and Phone memory, without possibility +to distinguish them.
  • +
+V3.10 12-05-01 +

Inprovements in Voice Tags +

BUG removed: when trying to write a message with an uppercase accented +character  (i.e. character <?>) and saving SMS without sending +it, then entering "Own messages" the charater <?> become an <E>.  +To solve this use "left accent" insetad of right accent. (Ú) instead of +(À). +

BUG: if I set the alarm clock, phone "reset" (it go off and then on).  +in about 20% when alarm clock ring, and I press a key, phone go OFF, and +when I tryed to go ON it ask the calendar date. +

V3.12 +

Changed operator names +

Problems with games: snake, if you start a game and you exit from menu +when you return to the game you don't find ther item "continue" but only +a "new game". +

V4.12 +
  +

    +
  • +Languages:
  • + +
      +
    • +General update of Dictionary in all languages
    • + +
    • +New T9-languages: Check and Polish
    • + +
    • +New UI-language: Ukrainian (no T9 input)
    • + +
    • +In German language: Translation of 'Highscore' corrected
    • +
    + +
  • +Composer:
  • + +
      +
    • +Vibrating in Composer stops when receiving an SMS
    • + +
    • +Vibra active when composing a ringing tone
    • + +
    • +Not possible to forward received ringing tones anymore
    • +
    + +
  • +Phonebook
  • + +
      +
    • +It is now possible to erase all entries (earlier phone wrote "memory deleted" +and didn't erase it)
    • + +
    • +Mixed case multitap ('Abc') in phonebook implemented
    • + +
    • +Alphabetic sorting order corrected when spaces in the beginning of a name
    • + +
    • +Search in Phonebook now starts from the top
    • + +
    • +Leading blanks ignored in sorting
    • +
    + +
  • +Dictionary/SMS/Picture Messaging
  • + +
      +
    • +Phone reset sending Picture Message + 120 char text corrected
    • + +
    • +C-key no longer deletes all SMS if used twice in the end of a long SMS
    • + +
    • +'Insert word' works without adding spaces
    • + +
    • +'Insert symbol' will be placed at cursor position
    • +
    + +
  • +WAP
  • + +
      +
    • +Over The Air settings can now be saved and viewed
    • + +
    • +Freeze/reset using WAP combined with FDN corrected
    • + +
    • +Blank menu removed
    • + +
    • +#-key press: stays in WAP-session
    • + +
    • +Layout updated several places
    • + +
    • +After saving bookmark phone now returns to idle state
    • +
    + +
  • +USSD
  • + +
      +
    • +Never ending request (spinning globe) corrected
    • + +
    • +Connection timeout problem fixed
    • + +
    • +Memory leak fixed
    • + +
    • +Bearer setting "Address Type" removed
    • +
    + +
  • +Games
  • + +
      +
    • +Now it is possible to download games
    • + +
      WML page replies with "Download failed" if there is an error
    + +
  • +SIM ATK
  • + +
      +
    • +SIM ATK opened for WAP (send and receive SMS etc.)
    • + +
    • +Now showing more than only first error message
    • + +
    • +Clear key is now working properly in Play Tone
    • +
    + +
  • +Voicetag feature improved: 8 voicetags possible
  • + +
  • +Screensaver selection improved
  • + +
  • +Exchange rate now done with higher precision in Calculator
  • + +
  • +In Shortcut, missing functionality in Reminder and Tone menu implemented
  • + +
  • +Operator Name List and UI Text updated
  • +
+BUG:  If you are playing with "space impact", and a new SMS come in, +and you try to read it, when you continue the game after the 1st startship +lost, the game go on but without the starship. +

V4.16 25-06-01 +

    +
  • +Operator Name List and UI Text updated
  • + +
  • +Service indicator was missing totally with some new SIM-cards
  • +
+V4.30 20-08-01 (ROM6?): +
    +
  • +New features implemented
  • + +
      +
    • +Conference Call
    • + +
    • +T9 in WAP - Based on CUI editors
    • + +
    • +Languages:
    • + +
        +
      • +Chinese (T9 support)
      • + +
      • +Czech (T9 support)
      • + +
      • +Polish (T9 support)
      • + +
      • +Hebrew (T9 support)
      • + +
      • +Hungarian (T9 support)
      • + +
      • +Slovak (T9 support)
      • + +
      • +Ukrainian (no T9 support)
      • +
      +
    + +
  • +Improvement to Phonebook
  • + +
      +
    • +Matching the dialled phone number containing special character "+" is now +possible
    • +
    + +
  • +Improvements to SMS
  • + +
      +
    • +when changing T9 language
    • + +
    • +under Message Write it is now possible to write in Insert Word more than +one capital letter
    • + +
    • +SMS Input indicator changed (showed '123' after Send cancellation)
    • + +
    • +when receiving SMS containing special set-up
    • +
    + +
  • +Improvements to Tones
  • + +
      +
    • +possibility to save received OTA ringing tone
    • +
    + +
  • +in Profile menu Use of Warnings Tones changed
  • + +
  • +Improvements in charging (using ACP-7U in 110V/60Hz environment)
  • + +
  • +Improvements to Russian WML (Random Phone texts were shown)
  • + +
  • +SIM ATK: Selectable Header (menu_display_item) removed
  • + +
  • +Improvements to Activating/Deactivating of Cell Broadcast
  • + +
  • +Emergency dialling snooze; softkey text appears changed from 'Clear' to +'Call'
  • + +
  • +Operator Name list (#42) and UI Text updated
  • +
+V4.50: +
    +
  • +Improvements to WAP
  • + +
      +
    • +Word wrapping default is active ('On')
    • + +
    • +Input element indicator set up for numeric element dialog box added
    • +
    + +
  • +Improvements to Phonebook:
  • + +
      +
    • +Possible to edit/add/replace name/number in phonebook when SIM card memory +is full
    • + +
    • +Blank screen not shown anymore when replacing an entry and SIM card memory +is full
    • + +
    • +Scrolling Phonebook entries with leading spaces possible for Latin as well +for Chinese names
    • + +
    • +Missing information note added when copying entries between SIM and Phone +memory (Security level: Memory)
    • + +
    • +Possible to add new entries in Phonebook when FDN is no (.but not to dial)
    • + +
    • +Erase all entries in Phonebook will continue in background when interrupted +by a MT call
    • +
    + +
  • +Improvement to Dictionary/SMS
  • + +
      +
    • +Possible to save/view/send SMS containing only one character
    • + +
    • +Reminder sending; Correct Calendar date on receiving end (e.g. NPE-3)
    • + +
    • +Picture message: Euro-sign in message received successfully on other phones
    • + +
    • +Stop Watch and Unit Price Editor: Correct alignment in editors (when charging +interrupted)
    • +
    + +
  • +General vibration level increased, in order to make it easier to feel the +vibra function has been activated
  • + +
  • +Possibility for user, to delete SIM-created SMS from Inbox, added (if deleted +SIM will recreate the items)
  • + +
  • +Display Text length changed (it was too short for Send SS)
  • + +
  • +Change Phone Line (with #) is now only possible from Idle
  • + +
  • +DISPLAY TEXT with the option 'wait for user to clear text' now waits for +user to clear text (was cleared automatically after 5 sec.)
  • + +
  • +Operator Name list (#44) updated
  • +
+ +
+
Note: When use shortcut for Menu 8-3, for a moment displays +incorrect data... +

WARNING: THERE IS PROBABLY THE SAME PROBLEM +WITH VOICE TAGS AND UPGRADING FIRMWARE LIKE IN NOKIA 3310

3350NHM-9
3390NPB-1*#0000#
V7.03 10-11-00  +
V7.05 05-01-01 +
+
+
WARNING: THERE IS PROBABLY THE SAME PROBLEM +WITH VOICE TAGS AND UPGRADING FIRMWARE LIKE IN NOKIA 3310
3810NHE-9*#3810#
V6.20 21-03-97 +
V6.32 06-06-97 +
V6.61 19-08-97
+Back to the top/Na pocz±tek +

+


+
Marcin +Wi±cek (WWW)
+ + + diff --git a/Docs/en_US/gsm/firmware/firm5.htm b/Docs/en_US/gsm/firmware/firm5.htm new file mode 100644 index 0000000..8764adb --- /dev/null +++ b/Docs/en_US/gsm/firmware/firm5.htm @@ -0,0 +1,457 @@ + + + + + + + + + + + Nokia identification & firmware/Identyfikacja i oprogramowanie telefonów Nokia + + + + +
Main page/Strona +g³ówna
+ +
+


Nokia identification & firmware/Identyfikacja +i oprogramowanie telefonów Nokia

+ +

+


+
    +
  1. +Ogólne b³êdy/General bugs
  2. + +
  3. +Ogólne informacje o IMEI/General info about +IMEI
  4. + +
  5. +Czy mogê wgraæ sobie oprogramowanie/Can I download +firmware to my phone ?
  6. + +
  7. +Czy to kosztuje ?/Does it cost ?
  8. + +
  9. +Gdzie tego dokonaæ ?/Where to make it ?
  10. + +
  11. +Jakie s± b³êdy/zmiany w kolejnych wersjach +?/What are bugs/changed things in next versions ?
  12. + +
  13. +Jak zmieniæ wersjê jêzykow±?/How to change +language in phone ?
  14. + +
  15. +U¿yte materia³y/Information sources
  16. +
+ +
+

Here is table describing firmware in various Nokia 5xxx phones +
You can also see table for +
Nokia 1xxx/2xxx, Nokia +3xxx, Nokia 5xxx, Nokia +60xx/61xx, +
Nokia 62xx/63xx/65xx, Nokia +7xxx, Nokia 8xxx, Nokia +9xxx

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Phone (telefon)Model number (Oznaczenie)Firmware version code (kod do sprawdzania wersji oprogramowania)TAC in IMEI (TAC w IMEI)
5110NSE-1*#0000#449218, 490520, 490542, 490546, 490547 (Germany), 490549 (Germany), +490550 (Germany)
V3.02 06-02-98 +
V3.06 04-03-98 (ROM3) +
V4.51 26-03-98 (ROM3) +
V4.59 01-06-98 (ROM3) +
  +
    +
  • +Phone goes crazy if you scroll the received SMS with 160 dots.
  • + +
    Telefon wariuje przy przewijaniu odebranego SMSa zawieraj±cego 160 +kropek. +
  • +Phone clears "Headset" text from display after disconnecting HF.
  • + +
    Telefon kasuje napis "Mikrozestaw" z wy¶wietlacza po od³±czeniu zestawu +s³uchawkowego. +
  • +Half Rate codes (#HRC0# +and *HRC0#) don't work - to enable this channel you have to use +WinTesla or other software
  • + +
    Nie dzia³aj± kody do obs³ugi Half +Rate (#HRC0# i *HRC0#) - do w³±czenia tego kana³u trzeba +u¿yæ np. WinTesli albo innego oprogramowania
+ +


V4.62 14-08-98 (ROM3) +

V5.04 14-09-98 (ROM3) +
  +

+V5.07 22-11-98 (ROM3) +
V5.07 20-11-98 (ROM4 ?) +
  +
    +
  • +New 'Text version' parameter in test +89 of NetMonitor
  • + +
    Nowy parametr 'Text version' w te¶cie +89 monitora sieci +
  • +CCCH channel always used, when +network doesn't support cell broadcasting (in V5.04 CBCH +channel was used with enabled "Info service"or "Cell info display" +options)
  • + +
    U¿ywany jest zawsze kana³ CCCH, +gdy sieæ nie obs³uguje nadawania komórkowego (w wersji 5.04 u¿ywany by³ +kana³ +CBCH po w³±czeniu opcji "Info service" albo "Cell info display") +
  • +When you set "Incoming call alert" to "Ascending" and "Ringing volume" +to higher volume than 2, phone correctly changes volume from volume 1 to +set (previously it changed it only one level)
  • + +
    Przy ustawieniu "Sygna³ nadej¶cia po³±czenia" na "Rosn±co" i "G³o¶no¶æ +dzwonka" na wiêcej ni¿ poziom 2, telefon poprawnie zmienia g³o¶no¶æ od +poziomu 1 do ustawionego (wcze¶niej zmienia³ j± tylko o jeden poziom) +
  • +LAC and CID in test 11 in NetMonitor +are in decimal format.
  • + +
    LAC i CID w te¶cie 11 monitora +sieci s± podawane dziesiêtnie. +
  • +Newer versions(?):
  • + +
      +
    • +set profile to "Silent"
    • + +
    • +reset phone settings via cable
    • + +
    • +Phone will display "silent" mark on display with "Personal" profile selected...
    • +
    +
+ +


V5.10 23-12-98 (ROM3) +
V5.11 19-02-99 (ROM3) +
V5.11 18-02-99 (ROM4) +

(OLDER ?) Different meaning of Product Profile Settings - can't change +LCD Contrast +
(STARSZE ?) Inne znaczenie Product Profile Settings - nie mo¿na zmieniæ +kontrastu LCD +

V5.20 03-06-99 (ROM4) +
V5.22 01-07-99 (ROM3) +
V5.24 09-09-99 (ROM3) +
V5.24 03-09-99 (ROM4) +
+
(NOWSZE TE¯ ?) B£¡D: Niedok³adne t³umaczenie w Menu 1-7-2 i +Menu +1-4-1 +

(NEWER TOO ?) OTHER: This phone has working clock with date and interesting +thing is, that you can't set date from menu (you have to use gnokii) +
(NOWSZE TE¯ ?) INNE: Telefon ma poprawnie dzia³aj±cy zegar z dat±, +przy czym daty nie mo¿na ustawiæ z menu (ale np. przy pomocy gnokii) +

(NEWER TOO ?)ALARM BUGS: +

    +
  1. +first:
  2. + +
      +
    1. +set alarm
    2. + +
    3. +disable phone
    4. + +
    5. +when phone will alarm you, press "Snooze"
    6. + +
    7. +enable phone, until will alarm you again (6 minutes)
    8. + +
    9. +don't see "Snooze active" and alarm sign on the screen !
    10. +
    + +
  3. +when you're in the menu, alarm will enable, you will hear sound, but won't +see any info ! When leave menu, will see message, but without sound...
  4. + +
  5. +when keypad is locked and phone alarm you, you can disable it using 1-9, +*, 0, # keys
  6. +
+V5.26 15-12-99 (ROM4) +
V5.27 04-02-00 (ROM3) +
V5.27 03-02-00 (ROM4) +

Added code *#7760# for displaying Production Serial Number. +
Dodano kod *#7760# do pokazywania numeru seryjnego. +

V5.28 17-04-00 (ROM3 ?) +
V5.28 18-02-00 (ROM4)  +

Can't open simlocks using NokiaTool only - must use EEPROM method +

Added info new new GSM operators. For example: +
Dodano identyfikatory nowych operatorów. Na przyk³ad: +

ERONET, Mobilis, WATANIYA, K`CELL, LAO GSM, EMTEL, DHIMOBILE, Celtel, +JAWWAL, CELLTEL, Swazi-MTN, TT, ZANTEL, DIGITEL, ECONET +

Changes names for some GSM operators. For example: +
Zmieniono nazwy niektórych operatorów. Na przyk³ad: +
D1-TELEKOM ==> T-D1 +
D2 PRIVAT ==> D2 +
MaxTouch ==> Orange +
SENTELgsm ==> SENTEL +
HK TELECOM ==> C&W HKT +

(NEWER TOO ?) BUG:When edit long SMS (about 160 chars) and press Up/Down +key very long (until will scroll all SMS context - 160 chars) without releasing, +phone will restart after it - info from SkyBoy +
(NOWSZE TE¯ ?) B£¡D: Przy edycji d³ugiego SMSa (oko³o 160 znaków) po +naci¶niêciu klawisza Góra/Dó³ i przytrzymaniu (bez zwalniania), a¿ ca³y +SMS (160 znaków) zostanie przewiniêty, telefon zresetuje siê...  - +informacja od SkyBoy +

V5.29 24-07-00 (ROM4) +
MT Unicode USD activated +

GSM operators field updated: +
Uaktualnione nazwy operatorów: +
CT-GSM ==> CMCC +
LIBTEL  ==> LIBERTEL +

V5.30 28-09-00 (ROM4) +

GSM operators field updated +
Uaktualnione nazwy operatorów +

(V5.07) "SIM card registration failed" message is shown when the SIM +card or phone is unknown or rejected from the network. +
(V5.07) Komunikat "Rejestracja karty SIM nieudana" , gdy karta SIM +lub telefon nie mo¿e byæ zalogowany w sieci +
+


+
BUG (all versions ?): some SMS on SIM in Outbox can hang phone, when +try to read them (checked for N5110). Example (mygnokii can be download +from my www): try to use "mygnokii --savesms "test" --hangsms < file" +and read saved SMS +

Interesting facts: firmware seems to be cut version of firmware from +more expensive phones. There still some help texts inside, texts from some +functions (does it mean, that phone support them ?) - ("Anykey answer", +"Rename this set"- it can be done via cable !), text with name of "full" +profiles - the same question (Meeting, Outdoor, Pager, General), texts +"Save to another memory?, Saved to phone memory,Saved to SIM Card"...

5110iNSE-2
5130NSK-1*#0000#495503, 495508, 495509, 449210
V3.08 03-04-98 +
V4.11 12-06-98 +
V5.00 01-09-98 +
V5.30 23-04-99 +
V5.51 03-08-99 +
V5.60 14-10-99 +
V5.71 10-04-00 +
+
+
Interesting facts: firmware seems to be cut version of firmware from +more expensive phones. There still some help texts inside, texts from some +functions (does it mean, that phone support them ?) - ("Anykey answer", +"Rename this set"- it can be done via cable !), text with name of "full" +profiles - the same question (Meeting, Outdoor, Pager, General), texts +"Save to another memory?, Saved to phone memory,Saved to SIM Card"...
5160NSW-1
V3.47 15-07-99
5190NSB-1*#5190#010063
V3.41 07-02-98 +
V4.01 22-10-98 +
V5.01 02-11-98 +

V5.24 +

NetMonitor in Menu 11 (in +older firmware in Menu 10). +
Monitor sieci w Menu 11 +(w starszych wersjach w Menu 10). +

V5.51 15-04-99 +
V5.81 20-09-99 +

Downloadable operator logo and ringtone +

V6.11 28-04-00 +

V6.71 25-01-01

5210NSM-5*#0000#
V5.12 17-01-02 +
V5.13 27-01-02
5510NPM-5*#0000#
V3.43 +
    +
  • +Silence or annoying beep is removed, when starting player for the first +time through menus. 
  • + +
  • +Improvement to headset connection timeout. (In some cases when recording +had started from FM radio and then headset was removed, recorder should +have stopped after three minutes, but it crashed). 
  • + +
  • +Language package M (Tagalog, Bahasa Indonesian, Bahasa Malaysian) added. 
  • +
+V3.45 04-12-01 +

V3.47 +

    +
  • +Improvements in Calculator. Dot is now handled in proper way, when setting +exchange rates 
  • + +
  • +Line-in recording functionality has been improved 
  • + +
  • +Sometimes audio was not switched to phone's earpiece, if headset was removed +during a phone call 
  • + +
  • +Music player did not always restart after a call was initiated and then +ended 
  • + +
  • +Unplugging headset during a phone call turns now music player on Pause 
  • + +
  • +FDN now allows all calls to be made from FDN phonebook
  • + +
  • +Improvements in showing Cl@ss 0 SMS messages 
  • + +
  • +USSD with more than 30 digits is now possible 
  • + +
  • +STK "Refresh" command improved 
  • +
+
+Back to the top/Na pocz±tek +

+


+
Marcin +Wi±cek (WWW)
+ + + diff --git a/Docs/en_US/gsm/firmware/firm6_1.htm b/Docs/en_US/gsm/firmware/firm6_1.htm new file mode 100644 index 0000000..8065b2a --- /dev/null +++ b/Docs/en_US/gsm/firmware/firm6_1.htm @@ -0,0 +1,666 @@ + + + + + + + + + + + Nokia identification & firmware/Identyfikacja i oprogramowanie telefonów Nokia + + + + +
Main page/Strona +g³ówna
+ +
+


Nokia identification & firmware/Identyfikacja +i oprogramowanie telefonów Nokia

+ +

+


+
    +
  1. +Ogólne b³êdy/General bugs
  2. + +
  3. +Ogólne informacje o IMEI/General info about +IMEI
  4. + +
  5. +Czy mogê wgraæ sobie oprogramowanie/Can I download +firmware to my phone ?
  6. + +
  7. +Czy to kosztuje ?/Does it cost ?
  8. + +
  9. +Gdzie tego dokonaæ ?/Where to make it ?
  10. + +
  11. +Jakie s± b³êdy/zmiany w kolejnych wersjach +?/What are bugs/changed things in next versions ?
  12. + +
  13. +Jak zmieniæ wersjê jêzykow±?/How to change +language in phone ?
  14. + +
  15. +U¿yte materia³y/Information sources
  16. +
+ +
+

Here is table describing firmware in various Nokia 60xx/61xx phones +
You can also see table for +
Nokia 1xxx/2xxx, Nokia +3xxx, Nokia 5xxx, Nokia +60xx/61xx, +
Nokia 62xx/63xx/65xx, Nokia +7xxx, Nokia 8xxx, Nokia +9xxx

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Phone (telefon)Model number (Oznaczenie)Firmware version code (kod do sprawdzania wersji oprogramowania)TAC in IMEI (TAC w IMEI)
6050NME-1
6080NME-2*#0000#
V5.14 03-03-97
6081NME-2E*#170602112302#
V5.14 03-03-97
6090NME-3
V5.00 30-11-99
6110NSE-3*#0000#490518, 490523, 490526, 490527, 490545
V3.11 14-11-97 +
V3.14 28-11-97 +

First shipping version of the software. +
Pierwsza wersja oprogramowania w sprzedawanych telefonach. +

V4.05 07-01-98 +
V4.06 16-01-98 +
V4.25 01-01-98 +
V4.33 11-03-98  (ROM3) +

Improves the reception quality. +
Poprawiona jako¶æ odbioru. +

SMS message alert volume now linked to ringing volume. +
G³o¶no¶æ sygna³u SMS po³±czona z g³o¶no¶ci± dzwonka. +

Minor changes in Profiles menu. +
Niewielkie zmiany w menu profili. +

'Long & Loud' SMS alert is now called 'Ascending' +
D¼wiêk dzwonka SMS 'Long & Loud' zmieniony na 'Ascending' +

'Warning Tones' is now 'Warning and Games Tones' +
'Warning Tones' zmienione na 'Warning and Games Tones' +

The 'No Service' areas between cells seem to have disappeared.When the +phone does go 'No Service', it will very quickly log onto a new cell, usually +within a few seconds. +
Telefon szybciej siê loguje do nowej komórki po odzyskaniu zasiêgu. +

The desktop charger now works correctly when the phone is inserted with +the battery connected. +
£adowarka biurkowa pracuje poprawnie, gdy pod³±czany jest do niej telefon +z w³o¿on± bateri±. +

BUG: Nokia Cellular Data Suite 1.2 (NCDS) infra red function has now +gone intermittent. This has been confirmed this by using a V3.14 phone +which works perfectly with the installed version of the NCDS. Basically +if I connect the phone using the RS232 cable the NCDS works fine. If you +then disconnect and re-connect using IR, also no problem. If you then disconnect +and re-connect a 2nd time using IR you get no connection. The IR symbol +on the phone flashes, then goes static, then flashes again. +
B£¡D: Po³±czenie przez podczerwieñ z NCDS 1.2 nie dzia³a dobrze (podczas +gdy w telefonem z oprogramowaniem 3.14 nie ma problemów), natomiast po³±czenie +kablem ci±gle funkcjonuje bez zarzutu. Je¿eli od³±czysz i po³±czysz ponownie +podczerwieñ, nie ma problemu. Je¿eli próbujesz natomiast jeszcze raz, problem +siê pojawia. Symbol podczerwieni w telefonie mruga, pó¼niej wy¶wietla siê +na sta³e i znów mruga. +

V4.51 26-03-98 (ROM3) +
V4.59 01-06-98 (ROM3) +
V4.73 22-04-98 (ROM3) +

(V4.06) Correct call counters (Received+Dialled calls=All calls) +
(V4.06) Poprawne liczenie d³ugo¶ci po³±czeñ (Odbierane+Wykonywane po³±czenia=Wszystkie) +

(V4.33) IR-Software improved +
(V4.33) Poprawnione oprogramowanie do obs³ugi IR +

(V4.33) Charger recognition improved. +
(V4.33) Poprawiono rozpoznawanie ³adowarek. +

(V4.33) Headset features improved. +
(V4.33) Poprawiono obs³ugê zestawu s³uchawkowego. +

(V4.33) Same standard SMS alert as 8110i. +
(V4.33) Niektóre d¼wiêki SMSów jak w Nokii 8110i. +

(V4.33) Better energy saving functions. +
(V4.33) Lepsze funkcje oszczêdzania energii. +

(V4.33) Better conference call features. +
(V4.33) Poprawiono obs³ugê po³±czeñ konferencyjnych. +

(V4.33) Better SMS status report. +
(V4.33) Lepsze raporty SMS. +

(V4.33) Display of saving status (phone or SIM). +
(V4.33) Wy¶wietlanie statusu zapisu (telefon albo karta SIM). +

(V4.33) HFU-2 improved. +
(V4.33) Poprawiona obs³uga zestawu samochodowego HFU-2. +

(V4.33) Better charging with standard, car charger and "cold" battery. +
(V4.33) Lepsze ³adowanie ze standardow± albo samochodow± ³adowark± +i zimn± bateri±. +

(V4.33) Faster network connection. +
(V4.33) Szybsze po³±czenie z sieci±. +

(V4.33) Safer network connection at a low signal strength. +
(V4.33) Bezpieczniejsze po³±czenia z sieci± na obszarach o s³abym sygnale. +

(V4.33) Longer single ringtone with vibra pack. +
(V4.33) D³u¿szy sygna³ d¼wiêkowy przy u¿ywaniu baterii wibracyjnej. +

(V4.33) Corrected the problem of the battery indicator bar flickering +between one and two bars with a Li-ion battery. +
(V4.33) Poprawiono problem ze wska¼nikiem poziomu na³adowania baterii +(wcze¶niej przy baterii Li-ion miga³ pomiêdzy jedn± i dwoma kreskami) +

(V4.33) No more changing Half Rate +settings via keypad. +
(V4.33) Nie dzia³aj± kody do aktywacji/deaktywacji kana³ów Half +Rate z klawiatury. +

(V4.33) Improved audio quality when using the EFR +Speech Codec. +
(V4.33) Lepsza jako¶æ d¼wiêku przy u¿ywaniu EFR. +

(V4.33) Reception of CCH blocks after cell reselection in weak field +has been improved. +
(V4.33) Poprawiono odbiór bloków CCH po powtórnym wyborze komórki na +obaszrach o s³abym sygnale. +

(V4.33) Improved the maintenance charging when using the ACP-7 charger. +
(V4.33) Poprawione ³adowanie podtrzymuj±ce z ³adowark± ACP-7. +

(V4.33) More frequent battery low warning beeps added during a call +made with a Li-ion battery. +
(V4.33) Czêstsze ostrze¿enia o wy³adowaniu baterii przy po³±czeniu +i baterii Li-ion. +

(V4.33) Improved SMS storage time handling. If the user has not selected +a storage time, the phone uses the maximum storage time set by the network. +
(V4.33) Je¿eli uzytkownik nie wybra³ czasu wa¿no¶ci SMSa (przy wysy³aniu), +telefon przyjmuje maksymaln± warto¶æ przyjmowan± przez sieæ. +

(V4.33) Improved recovery of SIM card in error situations. +

(V4.33) Fixed bug in SMS editing screen where the cursor is one character +to far right. +
(V4.33) Poprawiono b³±d przy edycji SMSów w sytuacji gdy kursor jest +odleg³y jeden znak od prawej strony. +

V5.00 28-05-98 (ROM3) +

An updated GSM operators' list. +
Uaktualniona lista operatorów. +

V5.22 18-08-98 (ROM3) +

An updated GSM operators' list. +
Uaktualniona lista operatorów. +

V5.24 19-09-98 (ROM3) +
V5.24 14-09-98 (ROM4)  +

Implemented code *#sim0clock# which shows whether the SIM card +inserted supports clock stopping. +
Dodano kod *#sim0clock# do sprawdzania, czy zegar karty SIM +mo¿e byæ zatrzymany. +

Headset detection improved. +
Poprawione wykrywanie zestawu s³uchawkowego. +

Performance in weak signal area improved. +
Poprawiono czu³o¶æ przy s³abym sygnale sieci. +

Improvements to short message handling. +

Tone levels tuned (distinct difference now between levels 5 and 4). +
Zmieniono poziomy dzwonków (wyczuwalna ró¿nica miêdzy poziomem 4 i +5). +

(V4.73) Different energy consumption in test +23 of NetMonitor. +
(V4.73) Inne zu¿ycie energii w te¶cie +23 monitora sieci. +

V5.30 23-12-98 (ROM3) +

An updated GSM operators' list. +
Uaktualniona lista operatorów. +

V5.31 19-02-99 (ROM3)  +
V5.31 18-02-99 (ROM4) +

Added Menu 4-3-6 ("Active line"), which allows to select active +line on SIM card (ALS function) +
Dodano Menu 4-3-6, które pozwala wybraæ numer na karcie SIM +(funkcja ALS) +

An updated GSM operators' list. +
Uaktualniona lista operatorów. +

V5.40 25-05-99 (ROM4) +

V5.47 01-07-99 (ROM3)  +
V5.47 30-06-99 (ROM4) +

(OLDER ?) Different meaning of Product Profile Settings - can't change +LCD Contrast +
(STARSZE ?) Inne znaczenie Product Profile Settings - nie mo¿na zmieniæ +kontrastu LCD +

Some phones with it (I don't know, if it's connected with firmware version +or ROM) doesn't have more than 19 menus in NetMonitor +and some first tests are cut - see more +

V5.48 08-09-99 (ROM3) +
V5.48 03-09-99 (ROM4) +

New ringing tones. +
Nowe dzwonki. +
+


+
Note: In very old firmware versions (3.x) you have test +18 in NetMonitor. In newer (4.x, +5.x) it was removed... +
Informacja: W bardzo starych wersjach firmware (3.x) dostêpny by³ test +18 w monitorze sieci. W nowszych +(4.x, 5.x) zosta³ on usuniêty... +

BUG: Some older/all (?) firmware had bug in Calendar in Birthday option: +it it was set to the last day of February on non-leap-years (for example +29.02.2000), calendar will inform about it 1'st March (1.03.2000). Must +use "Reminder" instead of "Birthday". +

BUG: Some older/all (?) firmware had bug: Phone goes crazy if you scroll +the received SMS with 160 dots. +
B£¡D: Niektóre starsze/wszystkie (?) wersje zawiera³y b³±d: Telefon +wariuje przy przewijaniu odebranego SMSa zawieraj±cego 160 kropek.

6120NSC-3*#6120#
V1.18 01-07-99
6130NSK-3*#9999#495502
V3.26 10-02-98 (ROM3) +
V3.27 18-02-99 (ROM3) +
V3.28 24-02-98 +
V3.32 03-04-98 (ROM3) +
V4.11 10-06-98 (ROM3) +
V5.00 08-09-98 +

(V4.11) NetMonitor in Menu 11 +(in +older firmware in Menu 10). +
(V4.11) Monitor sieci w Menu +11 (w starszych wersjach w Menu 10). +

V5.30 23-04-99 (ROM3) +
V5.30 23-04-99 (ROM4)  +
V5.60 14-10-99 (ROM3) +
V5.61 22-11-99 (ROM3) +
+


+
BUG: Some older/all (?) firmware had bug in Calendar in Birthday option: +it it was set to the last day of February on non-leap-years (for example +29.02.2000), calendar will inform about it 1'st March (1.03.2000). Must +use "Reminder" instead of "Birthday".
6138NSK-3
6150NSM-1*#0000#449208 (Finland), 493002, 493006 (Germany), 493009
V3.02 08-07-98 +
V3.06 10-08-98 +
V4.01 23-09-98 +
V4.02 01-10-98 +
V4.11 05-11-98 +
V4.12 02-12-98 +

Added corect recognizing phase 2+ SIM cards. +
Dodano poprawne rozpoznawania karty SIM fazy 2+ GSM. +

V4.13 16-12-98 +

BUG: Calling Menu 10-3 causes the phone to hang and you will +have to remove the battery. +
B£¡D: Wywo³anie Menu 10-3 zawiesza telefon (pomaga dopiero wypiêcie +baterii). +

V4.14 18-12-98 +
V5.02 02-02-99 +

(V4.13) Added Menu 4-4-6 ("Confirm SIM service actions") with +Menu +4-4-6-1 ("Asked") and 4-4-6-2 ("Not asked") options. +
(V4.13) Dodane Menu 4-4-6 ("Powiadomienia o zmianach") z Menu +4-4-6-1 ("Widaæ") i 4-4-6-2 ("Nie widaæ"). +

V5.10 14-06-99  +
V5.16 22-06-99 +

(V4.13) NetMonitor in Menu 12 +(in +older firmware in Menu 11) - you have SIM Services (SIM Application +Toolkit) in Menu 11. +

V5.17 01-07-99 +
V5.20 20-09-99 +

NetMonitor in Menu 13 (in +older firmware in Menu 12). Menu 12 seems to be used for +something called LifeChart or WellMate (it seems to be some service connected +somehow with health - some device connected to phone and measured some +health parameters ?) +

V5.22 10-11-99 +

(V4.13) Better support for some 16kB SIM card with SIM Application Toolkit +(example: SIM cards from Italian TIM) +

(NEVER TOO ?) BUG: When receiving an over the air ringing tone and selecting +playback directly, the first tone would be partially cut off during the +playback (only when the keypad tones were activated) +

Production Serial Number String added (*#7760# code) +
Dodano kod *#7760# do pokazywania numeru seryjnego. +

Calendar birthday reminder, related to the last day of February on non-leap-years, +will now be set to right day +
Notatki w kalendarzu dotycz±ce urodzin odnosz±ce siê ostatniego dnia +Lutego w latach nieprzestêpnych jest teraz ustawiany we w³a¶ciwym dniu. +

Improvement to character conversion. Earlier blank display was shown +when UCS2 type (e.g. Greek characters) of SMS was received. +
Poprawiono konwersjê znaków. Wcze¶niej pokazywany by³ pusty ekran, +gdy SMS typu UCS2 (np.ze znakami greckimi) zosta³ odebrany. +

Multiple multi-page Cell Broadcast reception improved. +
Poprawiono odbiór wielostronicowych po³±czonych komunikatów nadawanaia +komórkowego. +

An updated GSM operators' list. +
Uaktualniona lista operatorów. +

(V5.17)Different names ringtone: "Polska" instead of "Polka"... +

V5.23 20-03-00 (except NSM-1NY ORANGE, product code 0502581) +
V5.23 17-05-00 (ROM6?) +

(NEWER TOO ?) BUG:When edit long SMS (about 160 chars) and press Up/Down +key very long (until will scroll all SMS context - 160 chars) without releasing, +phone will restart after it - info from SkyBoy +
(NOWSZE TE¯ ?) B£¡D: Przy edycji d³ugiego SMSa (oko³o 160 znaków) po +naci¶niêciu klawisza Góra/Dó³ i przytrzymaniu (bez zwalniania), a¿ ca³y +SMS (160 znaków) zostanie przewiniêty, telefon zresetuje siê...  - +informacja od SkyBoy +

Jêzyk polski (wszystkie wersje ?): Niedok³adne t³umaczenie w trzech +miejscach (Spis tel./Opcje/Stan pamiêci, Spis tel./Wykasuj oraz Menu +1-6-2) i b³±d (albo rzadko u¿ywana forma) w pomocy do Menu 6 +(....Opcja dwóch graczy wymaga +dwu telefonów....) +

Partnership network search improved +

"Grande walse" renamed as "Nokia tune" +

(?) "Happy birthday" changed to "Auld lang syne" +

GSM Operator list updated: +

    +
  • +New Operators (new countries: LAO (457), MV(472), SZ (653), TN (605)):
  • + +
      +
    • +Operator name -> MNC/MCC
    • + +
    • +ERONET -> 218/03
    • + +
    • +Mobilis -> 624/02
    • + +
    • +WATANIYA -> 419/03
    • + +
    • +K`CELL -> 401/02
    • + +
    • +LAO GSM -> 457/01
    • + +
    • +EMTEL -> 617/10
    • + +
    • +DHIMOBILE -> 472/01
    • + +
    • +Celtel -> 650/10
    • + +
    • +JAWWAL -> 425/05
    • + +
    • +CELLTEL -> 413/03
    • + +
    • +Swazi-MTN -> 653/10
    • + +
    • +TT -> 605/02
    • + +
    • +ZANTEL -> 640/03
    • + +
    • +DIGITEL -> 734/02
    • + +
    • +ECONET -> 648/04
    • + +
    • +Vodafone -> 216/70
    • +
    + +
  • +Operator name changed
  • + +
      +
    • +Old name -> New name
    • + +
    • +D1-TELEKOM -> T-D1 (262/01)
    • + +
    • +D2 PRIVAT -> D2 (262/02)
    • + +
    • +MaxTouch -> Orange (404/20)
    • + +
    • +EMARTEL -> TMTTOUCH (502/13)
    • + +
    • +SENTELgsm -> SENTEL (608/02)
    • + +
    • +GT-BCS -> UA-GT (255/05)
    • + +
    • +HK TELECOM -> C&W HKT (454/00)
    • + +
    • +Blu S.p.A -> I BLU (222/98)
    • +
    +
+(V5.22): +
    +
  • +can't send group graphic via IrDa -> "Group graphic sending failed" message
  • + +
  • +all profiles displayed (including Car and Headset) in "Profiles" menu
  • +
+Info from users: in PL language "Mikrofon wy³±czon" and "Odg³usz" +

VP5.23, 25-09-00 +
with animated menus, picture messaging, T9 dictionary. +

Problems with SIM Application Toolkit & netmonitor (tested with +Italian SIM cards). With: +

    +
  1. +16k SIM from Wind (called Hi-Wind and working on 1800 Mhz networks only) +- no services (no menu 10) and netmonitor on 11
  2. + +
  3. +SIM from Omnitel Pronto Italia (OPI) shows only 9 menus, the 9th being +Infrared, no netmonitor
  4. +
+ +
+
Some older firmware versions had problems with SMS from Quios +(Alphanumeric SMS, I quess): when user tried to read, phone hang and removing/inserting +battery was necessary. +

Older firmware/all (?) had bug: "Received+Dialled calls" were different +than "All calls"

6160/6162NSW-3*#9999#
V1.12 01-02-99 +
V3.01 09-07-99 +
V3.02 10-12-99
6185/6188NSD-3AX*#837#
V430SD3a2.nef 05-18-99 +
V440SD3a3.nef 10-26-99 +
V441SD3a3.nef 11-12-99 +
V542SD3d3.nef 08-02-00 +
+
+
BUG: The earpiecie volume isn't the same for different phones: +
    +
  • +For 435/441 firmware: If the phone is powered up with the volume set to +level 10, you end up with markedly lower maximum volume. If the phone is +powered up with the volume set at level 9 or lower, the maximum volume +is much louder
  • + +
  • +For 430: You needed to also power up the phone in Field Test Mode to get +the maximum volume.
  • +
+(?) Alpha Tag Menu (seen after *3001#12345# code) is not available ?
6190NSB-3*#6190#
V4.02 06-04-98  +
V4.22 01-07-98 +
V4.30 19-08-98  +
V5.03 09-11-98 +
V5.10 14-06-99  +
V5.24 +

NetMonitor in Menu 11 (in +older firmware in Menu 10). +
Monitor sieci w Menu 11 +(w starszych wersjach w Menu 10). +

V5.30 +

Support for caller groups logos. +
Wsparcie dla log grupy. +

V5.53 15-04-99 +

Custom ringtones and the Startup logo are all now uploadable to the +phone directly using a data cable. +
W³asne dzwonki i loga startowe mog± byæ teraz bezpo¶rednio wgrywane +do telefonu przez kabel. +

The max volume is slightler louder than previous +
Maksymalna g³o¶no¶æ jest teraz wiêksza. +

Added Menu 4-3-7 (Notifications on SIM update) +
Dodano Menu 4-3-7. +

V5.83 17-09-99 +

Added support for operator logo (uploading via cable or general support) +
Dodano obs³ugê loga operatora (mo¿liwo¶æ wgrywania przez kabel albo +ogóln± obs³ugê) +

V5.93 22-11-99 +
V6.13 28-04-00 

+Back to the top/Na pocz±tek +

+


+
Marcin +Wi±cek (WWW)
+ + + diff --git a/Docs/en_US/gsm/firmware/firm6_2.htm b/Docs/en_US/gsm/firmware/firm6_2.htm new file mode 100644 index 0000000..11c07dc --- /dev/null +++ b/Docs/en_US/gsm/firmware/firm6_2.htm @@ -0,0 +1,1472 @@ + + + + + + + + + + + Nokia identification & firmware/Identyfikacja i oprogramowanie telefonów Nokia + + + + +
Main page/Strona +g³ówna
+ +
+


Nokia identification & firmware/Identyfikacja +i oprogramowanie telefonów Nokia

+ +

+


+
    +
  1. +Ogólne b³êdy/General bugs
  2. + +
  3. +Ogólne informacje o IMEI/General info about +IMEI
  4. + +
  5. +Czy mogê wgraæ sobie oprogramowanie/Can I download +firmware to my phone ?
  6. + +
  7. +Czy to kosztuje ?/Does it cost ?
  8. + +
  9. +Gdzie tego dokonaæ ?/Where to make it ?
  10. + +
  11. +Jakie s± b³êdy/zmiany w kolejnych wersjach +?/What are bugs/changed things in next versions ?
  12. + +
  13. +Jak zmieniæ wersjê jêzykow±?/How to change +language in phone ?
  14. + +
  15. +U¿yte materia³y/Information sources
  16. +
+ +
+
+

Here is table describing firmware in various Nokia 62xx/63xx/65xx phones +
You can also see table for +
Nokia 1xxx/2xxx, Nokia +3xxx, Nokia 5xxx, Nokia +60xx/61xx, +
Nokia 62xx/63xx/65xx, Nokia +7xxx, Nokia 8xxx, Nokia +9xxx

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Phone (telefon)Model number (Oznaczenie)Firmware version code (kod do sprawdzania wersji oprogramowania)TAC in IMEI (TAC w IMEI)
6210NPE-3*#0000#350138, 350147, 350612, 449333 (Germany), 449337, 449338
V2.95 16-02-00 +
V3.00 16-08-00  +
V3.01 21-08-00 +

BUGS (NEWER TOO ?): +

    +
  1. +Sporadic vibrating during SMS receiving or calling although the vibration +was switched off
  2. + +
  3. +Call waiting service (Menu 4-3-4) doesn't work correctly (it should +"Requests the network to send a beep during a call when another call is +coming"). When use profile Meeting (with Incoming call alert = Beep once), +during call can hear beep and phone is vibrating when another call is coming. +But with another setup of "Incoming call alert" there isn't beep. Only +on display another call is flashing.
  4. + +
    Temporary solution: Callers group have own icons. If you turn off showing +icons, auditible signaling is OK. Other solution is to put off number from +caller group +
  5. +When profile is switched to "Meeting" where is "Incoming call alert" switched +to "Beep once", don't hear beep during call when battery is low and double +beep when battery is empty. Phone turn off unawares.
  6. + +
  7. +When "Delivery reports (1-8-5)" is switched to "on" and phone receives +a delivery report, menu item "Games-Settings (6-4)" disappears. It is showed +again when turn off and turn on phone.
  8. + +
  9. +When keypad is locked and you put phone into carkit, keypad is active. +When take it from carkit then, it's sometimes locked again, sometimes not.
  10. + +
  11. +When phone is in the carkit, you can sometimes lock keypad
  12. + +
  13. +When you take from carkit phone with locked keypad, very often can't unlock +keypad and you have to restart phone
  14. + +
  15. +In Polish language in Menu 5 ("Call diverts") there two the same +submenus (3 and 5) "Divert when not answered" with different contenst
  16. + +
  17. +When for example you received a SMS, when you unlock the phone's keypad, +you must wait till you see "1 message received" before you can push 'read'. +Otherwise you'll go to the menu.
  18. + +
  19. +When you enable cell-info, you won't see any info anymore about which profile +you're in.
  20. + +
  21. +Sometimes, when receive SMS and starts to read it, you have info "menu +contains...." (help for Inbox menu)
  22. +
+ +
+
SOME OLDER VERSIONS HAD BUG: sometimes the phone couldn't show the +names of the person whose calling eventhough the person's name IS on the +phonebook. So instead of showing the caller's name the phone was only showing +"+62.... call"  +

BUG (all version ?): +

    +
  1. +Dropping the last character of the domain name when using relative URLs! +Example: A link like /cgi-bin/wap_news.pl on a page http://www.wapterror.de/wml/index.wml +sould be constructed as http://www.wapterror.de/cgi-bin/wap_news.pl. +Phone makes it http://www.wapterror.d/cgi-bin/wap_news.pl (missing +e on .de)
  2. + +
  3. +Can't delete templates of SMS and Picture Images
  4. + +
  5. +Sometimes, even when vibra is disabled in profile, it enables
  6. + +
  7. +DTMF doesn't work , when have enabled keypad tones
  8. + +
  9. +Phone sometimes doesn't want to connect to WAP (message "check settings")
  10. + +
  11. +If you assigned downloaded ringtone for caller group and deleted if (ringtone) +from phone, it stops ring and vibrate. Can't change ringtone from phone's +menu then (must use Logo Manager or different software)
  12. +
+ +
+
V3.04 (16-10-00 ????) +
    +
  • +Improved Half Rate audio quality
  • + +
  • +Updated operator list
  • +
+V3.08 +
    +
  • +(V3.04) Improvement to Arabic/Hebrew Memory status layouts
  • + +
  • +(V3.04) Improvements to Voicetags 
  • + +
  • +(V3.04) Improvements to SMS 
  • + +
  • +(V3.04) Only one indicator is at the end of Selection window when moving +to second candidate first time in the editing mode
  • + +
  • +(V3.04) Input method indicator in top left corner is disappeared in Rename +operation 
  • + +
  • +(V3.04) DLR-3 is detected as a headset after one headset call 
  • + +
  • +(V3.04) UNICODESIM: SDN only names of length less than 8 are shown 
  • + +
  • +(V3.04) Improvements to browser setup: \"Menu\" -> \"2\" -> \"Scroll\" +corrected
  • +
+V3.74 22-09-00 +
V4.04 06-10-00 +

BUG (NEWER TOO ?): Make these steps: +

    +
  1. +create new folder in Messages/My folders
  2. + +
  3. +create message and move to this folder
  4. + +
  5. +enter into this folder
  6. + +
  7. +edit this message
  8. + +
  9. +save it
  10. +
+You can't now enter to any folder. Must restart phone. Note, that bug exist +only, if this folder is first on the folders' list. For other it's OK. +

V4.08 25-10-00 +

V4.27 21-12-00 +

    +
  • +Turkish, Greek, Czech and Polish T9 added
  • + +
  • +Spanish language and T9 added
  • + +
  • +LCD temperature compensation
  • + +
  • +LCD reset after powerup
  • + +
  • +Spaces couldn't be put in front of text in Dealer Welcome Note (DWN)
  • + +
  • +PIN-code couldn't be entered on a SIM-locked phone
  • + +
  • +It wasn't possible to call a SS string beginning with a "*" (e.g. *#61# +etc.) stored on the FDN phonebook
  • + +
  • +Setup Menu command was not executed when already in SIM ATK menu
  • + +
  • +SIM ATK minimum polling interval increased from 5 to 10 sec
  • + +
  • +Improvements when trying to enter username in HTTP authentication
  • + +
  • +Dynamic text case handling improved
  • + +
  • +OPERATOR_NAME_MAX_LENGTH changed from 10 to 11
  • + +
  • +Timeout killer didn't work on *+-key in number queries
  • + +
  • +Games 'options' -menu disappeared when deleting delivery report in messages
  • + +
  • +Missing/strange menu items when sending SMS
  • + +
  • +Improvements to Arabic & Hebrew editor options
  • + +
  • +Letter insertion direction change in Arabic
  • + +
  • +Improvements to Arabic & Hebrew input (wrong ui-text was used for special +characters)
  • + +
  • +Improvements to calendar when using fetch service with birthday note
  • + +
  • +Improvements when selecting Multiple copies
  • + +
  • +In SMS: Improvements when storing more than 50 items in the Template folder
  • + +
  • +Improved functionality in Names-list
  • + +
  • +If T9 is active '#'-key toggles now between T9 and normal input in Arabic/Hebrew +and Chinese languages
  • + +
  • +Improved business card sending
  • + +
  • +No characters were received if Euro-sign was first character in a picture +message
  • + +
  • +Improvements to Voice tag
  • + +
  • +Correction of Arabic Name & Number view, RTL marker inserted
  • + +
  • +Correction of number length for Idle number input
  • + +
  • +Bottom margin changed in Arabic editor from '2' to '1'
  • +
+BUGS: +
    +
  • +PL specific: brak informacji o wolnej pamiêci telefonu (widaæ tylko "Wolne: +")
  • + +
  • +After enabling phone, entering PIN code (after "Enter PIN code" request) +and when you will see network indicator, press many times (very fast) phone's +keys (Red and Green key). You should see "Emergency calls only". It must +done so fast, that Stop sign doesn't blink. If you don't see startup logo: +phone doesn't give access to phone's menu and profiles, although it's logged +into network.
  • + +
  • +when keypad is locked and you will press any key, you will see "Press Menu +and then *". You can now press longer Power button and phone will disable +!
  • + +
  • +when you make something, somebody call to you and you will press left soft +key, phone hangs after receiving call...
  • + +
  • +sometimes after WAP session you can't lock keypad
  • + +
  • +after using Irda can't receive SMS
  • + +
  • +using BTS Test in netmonitor can +damage phone (CONTACT SERVICE, etc.) !
  • +
+V4.36 31-01-01 +
    +
  • +Handling of operator logo length improved
  • + +
  • +AT commands updated
  • + +
  • +Initialisation of Data SW when receiving/releasing the data switch
  • + +
  • +Fixed Dialling Numbers - View details shows wrong number if it is longer +than 12 digits. Although SSC-String for call forwarding is on FDN list, +call forwarding can not be performed either via menu or via string
  • + +
  • +Flashing panel when erasing a phonebook item
  • + +
  • +Impossible to call to SMS 'use number'
  • + +
  • +Delayed SMS
  • + +
  • +SMS Delivery reports
  • + +
  • +Wrong indication of max characters in SMS
  • + +
  • +Font size selection not working for received SMS
  • + +
  • +Error in DLR-3 usage in the middle of the IR usage
  • + +
  • +Modified AT commands for DHU functionality (TCH Loopback)
  • + +
  • +Automatic answer does not work in car profile
  • + +
  • +Some spelling in languages improved
  • + +
  • +Call without simcard, note "Emergency calls only" won't disappear
  • + +
  • +Freezes when faulty Business Card is received
  • + +
  • +Possible to switch phone off during keypad is locked
  • + +
  • +Updated MoU list (DUAL_operators) (Operator Cosmorom)
  • + +
  • +SIM ATK: submenus become trash
  • + +
  • +Cancel all CF's at once:
  • + +
  • +Performed on Line1: If CFU for Line2 is activated the sign is deleted too
  • + +
  • +Performed on Line2: CF's for Line1, data and fax are cancelled: Line2 not +affected
  • + +
  • +*#06# should show IMEI even when SIM card is not inserted
  • + +
  • +USSD short strings supported
  • + +
  • +STP support (e.g. used in Mercedes)
  • + +
  • +CLI logo over IR send/receive
  • + +
  • +Ringing tones over IR - receive
  • + +
  • +Shortcut on 'Send' for go to bookmark
  • +
+Bug: +
    +
  • +after ending Snake II game enter options and last view. When it will be +displayed, the light will be not off.
  • + +
  • +in German D2 Network problems with message receiving (after receiving one +no more are received).
  • +
+(?) Improvements in netmonitor +

V5.01 15-03-01 +

    +
  • +The first WAP call cometimes fails after answering/missing a MT PSTN call
  • + +
  • +When trying to delete a received picture message the phone sometimes freezes
  • + +
  • +When erasing unread SMS from phone by cable or IrDA, SMS icon stays on +display
  • + +
  • +Added function for UI to check, if Data cable is connected or not
  • +
+This version can cause following intermittent errors: +
    +
  • +Divert freezes the phone
  • + +
  • +SMS receive freezes the phone when reading
  • + +
  • +SMS editing freezes the phone
  • +
+V5.02 02-04-01 +

All changes from V4.36 +

    +
  • +(?) first three changes available in 5.01
  • + +
  • +Not possible to change the date of the calendar
  • + +
  • +DTMF tones stop working during call
  • + +
  • +Memory overwrite when using Russian text
  • + +
  • +When PC Suite changes the profile name it is not updated to phone UI before +restarting the phone
  • + +
  • +Strange behaviour when entering number and then <SEND> to PIN query +in start-up
  • + +
  • +By HSCSD data transfer is flow ctrl problems (data loss by upload and bi-directional)
  • + +
  • +The first WAP call sometimes fails after answering/missing a MT PSTN call
  • + +
  • +When trying to delete a received picture message the phone hangs
  • + +
  • +When erasing unread SMS from phone by cable or IrDA, SMS icon stays in +UI
  • + +
  • +Wrong font used for emergency call
  • + +
  • +Sometimes when phone is set to local mode (e.g. by WinTesla) the phonebook +server is not initialised. This makes it impossible to store CLI icons
  • + +
  • +Not possible to insert new words to the dictionary, if phone SW has been +updated to 4.27
  • + +
  • +Business card received over IR handled as a Ringing tone
  • + +
  • +Speed dial not updated, if a SIM card entry's number is edited to NULL
  • + +
  • +SMS Notifications are not routed to PC Suite
  • + +
  • +Bluetooth implemented (there is also special hardware "Nokia Connectivity +Pack" required for it !)
  • + +
  • +Added support in the IrDA subsystem for sending CLI logos to Nokia 6110
  • +
+Observations from users (V4.36): +
    +
  • +new parameter in test 8 in netmonitor
  • + +
  • +when create note in calendar, default year is 2001 (not 2000)
  • + +
  • +PL: zmieniona nazwa dla Menu 5-5. Wcze¶niej "kiedy nie odbieram", +teraz "kiedy niedostêpny"
  • + +
  • +BUG: when send SMS using phone memory (it should be empty), before receiving +report, you have strange chars inside...
  • + +
  • +"ERA GSM" changed to "PL ERA GSM"
  • +
+Note: The correction for line 2 icon (mainly seen in UK and Ireland), which +was implemented in 5.01, is not implemented in 5.02 +

V5.17 01-06-01 +
V5.17 05-07-01 (ROM6?) +

    +
  • +Added support for Package M - Telekom Jingle - Operator specific ringing +tone
  • + +
  • +Changed language name spelling of Ukrainian language menu select
  • + +
  • +Operators language files updated.
  • + +
  • +Use one sort order for all languages in Q and S pack. Still problem with +the letter "Q" in language pack Q!
  • + +
  • +Startup texts/graphics priority changed to: 1 User Welcome Note Text, 2 +Dealer Welcome Note Text, 3 User Welcome Note Graphics.
  • + +
  • +A "DDI Call Create" message on the Fbus (typically used in STP) cause 6210 +SW crash.
  • + +
  • +When a busy number was called twice the third CALL_CREATE_REQ is not responded +in any way
  • + +
  • +Resets with WAP browsing and bookmark operations
  • + +
  • +Strange behaviour when entering number +SEND to PIN query in startup
  • + +
  • +Wrong font used for DTMF numbers when call is accepted. Now corrected to +bold 8pt.
  • + +
  • +An unknown DTMF tone is sent at the pause when using carkit.
  • + +
  • +TWIN-BILL SIM Causes "SIM REJECTED" Error message when entering wrong PIN +code.
  • + +
  • +Heavy load of phone entries from AT command interface resets phone.
  • + +
  • +Incorrect sub_block length in PND_NAME_FIELD
  • + +
  • +Indications ordered from STP are not unsubscribed/cancelled when phone +is disconnected, causing garbage in data calls.
  • + +
  • +Wrong line 2 icon problem.
  • + +
  • +Car radio mute when voice dialling.
  • + +
  • +New features: WAP over USSD enabled.
  • +
+Note: To restore WAP Bookmarks, WinTesla version 311.06.00 or later must +be used! +

(V4.27) New netmonitor test +95 and 130 (for Bluetooth) +

Note (probably for ALL firmware versions): light sometimes doesn't turn +on, when keypad is locked and power button pressed (like in older models). +For me is NOT BUG. It's rather feature, which allows to save some energy. +It happens (light doesn't enable), when: +

    +
  1. +keypad is locked
  2. + +
  3. +any key is pressed and "Press unlock and then *" or "Now press *" message +will disappear
  4. + +
  5. +power key is pressed
  6. +
+Press notice, that light is always enabled after pressing power key then, +when message "Press unlock and then *" or "Now press *" is displayed. Because +of it I think, it's good feature, which saves energy after accidentaly +pressing this key (when press fast any key and power button or fast double +power button, light is enabled). +

BUG: +

    +
  • +when change caller group data and set incorrect (not existing in this model) +ID for ringtone, it's not possible to change it from phone's menu. Bug +existing for example, when upload backup data made in other model to it.
  • + +
  • +when have "Pending" delivery report, phone shows different contents (with +"Pending" you have many strange chars)
  • + +
  • +PL specific: niedok³adne t³umaczenie w pomocy do Menu 3 (wykrzystania) +and Menu 6 (opcja dla dwu graczy)
  • +
+V5.27 01-08-01 +
    +
  • +Improvements on key lock in combination with car kit. Keyboard will now +lock correctly when removing the phone from car kit
  • + +
  • +Improved functionality when enabling frequency hopping
  • + +
  • +Improved speed for network search after power on, in a country different +from the one where the phone was turned off
  • + +
  • +Improvement to IR after sending a business card to 9110
  • + +
  • +Dealer Welcome Note remains after the user has restored factory settings
  • + +
  • +Improvement to SMS: pressing * in SMS options insert template does not +any more stick the menu
  • + +
  • +Voicetags improved restoring from PC
  • + +
  • +Improved Data Download via SMS Cell Broadcast
  • + +
  • +Call Barring service string accepts now an empty password
  • + +
  • +SS requesting disabled, when a SIM has not been inserted
  • + +
  • +Operator list updated:
  • + +
      +
    • +New operators
    • + +
        +
      • +"SPACETEL" (417/02)
      • + +
      • +"VUT SMILE" (541/01)
      • + +
      • +"GH-MOBITEL" (620/03)
      • + +
      • +"ORENSOT" (250/11)
      • + +
      • +"VODAFONE" (276/02)
      • + +
      • +"TR AYCELL" (286/04)
      • + +
      • +"CU/C_COM" (368/01)
      • + +
      • +"U-CALL" (539/01)
      • + +
      • +"GAB TELECEL" (628/02)
      • + +
      • +"CELLCO" (630/05)
      • + +
      • +"Digicel" (706/02)
      • +
      + +
    • +Operator names changed
    • + +
        +
      • +Old New
      • + +
      • +"Dutchtone" "Orange NL" (204/20)
      • + +
      • +"ERA GSM" "Era" (260/02)
      • + +
      • +"TH WCS" "TH ORANGE" (520/10)
      • +
      + +
    • +New country name
    • + +
        +
      • +"VUT" (417)
      • +
      +
    +
+Note 1: When flashing 05.27 into a phone, that has never been in service +in normal network (e.g. a swap phone or other brand-new phone), flashing +might not terminate correctly. This can be avoid by letting the phone to +go into service before flashing or by using a normal SIM card (not test +SIM) in the phone during flashing. +

Note: To restore WAP Bookmarks, WinTesla version 311.06.00 or later +must be used! +

V5.36 +
When flashing 05.36 into a phone that has NEVER BEEN IN SERVICE ON +A LIVE NETWORK (e.g. a swap phone or other brand new phones) the flashing +might not terminate correctly. The problem only occurs when using WinTesla +for flashing. A work around for this problem is to make the phone go into +service before flashing or having a live SIM in the phone while flashing.  +

In order to restore WAP Bookmarks, the latest WinTesla version (311.06.00) +must be used!  +

    +
  • +Changes to operator and country names: 
  • + +
      +
    • +New operator: 
    • + +
        +
      • +XFERA (214/04)
      • + +
      • +TELE2 (246/03)
      • + +
      • +MCM (262/13) 
      • + +
      • +Quam (262/14) 
      • + +
      • +SI VEGA 070 (293/70) 
      • + +
      • +Telcell GSM (362/51) 
      • + +
      • +UTS (362/91) 
      • + +
      • +PK-UFONE (410/03) 
      • + +
      • +SyriaTel (417/93) 
      • + +
      • +DIGITEL (515/05) 
      • + +
      • +ORANGE (520/99) 
      • + +
      • +FSM Telecom (550/01) 
      • + +
      • +OTA NET (603/02) 
      • + +
      • +GAMCEL (607/01) 
      • + +
      • +ECONET NG (621/20) 
      • + +
      • +NG NITEL (621/40) 
      • + +
      • +COG LIBERTIS (629/10) 
      • + +
      • +MOBITEL - TZ (640/02) 
      • + +
      • +CELTEL TZ (640/05) 
      • + +
      • +Itineris RUN (647/00) 
      • + +
      • +F-OMT (647/02) 
      • + +
      • +Cell C (655/07) 
      • + +
      • +PORT-HABLE (722/35) 
      • +
      + +
    • +Name changed: 
    • + +
        +
      • +AIRTEL -> E VODAFONE (214/0 
      • + +
      • +Orange -> orange (228/03) 
      • + +
      • +TDK-MOBIL -> TDC MOBIL (238/01) 
      • + +
      • +mobilix -> Orange (238/30) 
      • + +
      • +Q GSM -> TELE2 (248/03) 
      • + +
      • +TELECEL -> P VODAFONE (268/01) 
      • + +
      • +AMERIS -> F-Orange (340/01) 
      • + +
      • +INA SPICE -> INA AIRTEL (404/31) 
      • + +
      • +M.PLUS -> BATELCO (426/01) 
      • + +
      • +DiGi 1800 -> DiGi (502/16) 
      • + +
      • +EXCELCOM -> proXL (510/11) 
      • + +
      • +ORANGE -> Orange (520/99) 
      • + +
      • +OMEGA -> LoneStar (618/01) 
      • + +
      • +CAMNET -> MTN CAM (624/01) 
      • + +
      • +CELLCO -> CELLCO GSM (630/04) 
      • + +
      • +Itineris RUN -> Orange re (647/00) 
      • +
      + +
    • +New country name: 
    • + +
        +
      • +NA (362) 
      • + +
      • +PK (410) 
      • + +
      • +FSM (550) 
      • + +
      • +GMB (607) 
      • + +
      • +ARG (722) 
      • + +
      • +BRA (724) 
      • +
      + +
    • +Country name changed: 
    • + +
        +
      • +NIG -> NG (255) 
      • + +
      • +NA -> ANT (362) 
      • + +
      • +F -> REU (647) 
      • +
      +
    + +
  • +Improper UI-disconnection of data cable causing IrDA to disconnect corrected. 
  • + +
  • +Locked UI while in call on Mobilkom Austria network using A1 Plus SIM corrected. 
  • + +
  • +Missing Chinese punctuation characters in WAP corrected. 
  • + +
  • +Problem with Phone Book reading via AT commands corrected. 
  • + +
  • +Problem with SMS indicator reading via AT commands corrected. 
  • + +
  • +Chinese sorting in Phone Book when using the letter Q improved. 
  • + +
  • +Wrong text in Call Cost Limit query corrected. 
  • + +
  • +Problem with making calls from Name&Number display in Arabic corrected.
  • +
+V5.44 29-11-01 +
  +
    +
  • +Possibility of acoustic feedback from keypad and warning tones in HFU-2 +reduced. Typically that feedback appeared when the car radio speakers were +used for phone audio 
  • + +
  • +Handling of long numbers in the Abbreviated Dialling 
  • + +
  • +Number list on SIM improved. The last digit of a very long number string +might have changed in some cases 
  • +
+V5.56 25-01-02 +
    +
  • +Improvement to Network Identity over the air in NITZ (Network Identity +and Time Zone)
  • +
+ +


+


+
Note: +
    +
  • +after changing SIM card memory type is set to "SIM card". Correct it manually +or set security level to "phone" (when SIM card was used earlier, memory +type won't be changed).
  • + +
  • +after calling WAP WAP access number is added to Called Numbers
  • +
+BUGS: +
    +
  • +Menu shortcuts problem: Menu 1-8-x (example Menu 1-8-7) directs +to Menu 1-8-1
  • + +
  • +Shotcut Menu 2-5-1-1-1 hangs phone !
  • +
+
6250NHM-3*#0000#
V1C54 23-02-00 +
V3.00 15-09-00 +
V3.12 08-11-00  +
    +
  • +(V3.00) Improvement in weak field
  • + +
  • +(V3.00) Improvements to sound level meter and keyguard code
  • + +
  • +(V3.00) Service dialing numbers in SIM read correctly
  • +
+Menu 14 doesn't have picture +

V4.00 06-12-00 +

    +
  • +Improvements to Task Journal:
  • + +
  • +Searching 'by customer' was shown 'by work'
  • + +
  • +Default value was missing when entering amount of materials
  • + +
  • +Flaw in information note when pausing a task
  • + +
  • +When entering the material id, last given id is being default
  • + +
  • +Shortcuts did not work
  • + +
  • +SMS sending did not work with special characters
  • + +
  • +Arabic SMS sending couldn't turn up and down the pages
  • + +
  • +Wrong number font in language packages R and S
  • + +
  • +Phone came from clock menu to Automatic keylock -menu with 'Back' button
  • + +
  • +When adding comment there was text 'OK' instead of 'Save' in left softkey
  • + +
  • +Speed dial names touched service/battery bar
  • + +
  • +Improvements to Automatic keylock:
  • + +
  • +Keypad was locked while in menu
  • + +
  • +Strange behaviour when simultaneous alarm and calendar remainder
  • + +
  • +In Stopwatch shortcuts did not work
  • + +
  • +Charger activated and deactivated the vibra
  • + +
  • +Keyguard not activated when timed profile & missed calls
  • + +
  • +Improvement to Arabic/Hebrew Memory status layouts
  • + +
  • +Improvements to Voicetags
  • + +
  • +Improvements to SMS
  • + +
  • +Only one indicator is at the end of Selection window when moving to second +candidate first time in the editing mode
  • + +
  • +Input method indicator in top left corner is disappeared in Rename operation
  • + +
  • +DLR-3 is detected as a headset after one headset call
  • + +
  • +UNICODESIM: SDN only names of length less than 8 are shown
  • + +
  • +Improvements to browser setup: - "Menu" -> "2" -> "Scroll" corrected
  • +
+V4.01 28-12-00 +
    +
  • +Timed profile now stays activated after power off/on
  • + +
  • +Impression to be able to same more than 250 names corrected
  • + +
  • +Wrong header text in stopwatch erasing in some languages ("Erase times") +corrected
  • +
+V4.04: +
    +
  • +Improvements in SMS: phonebook memory re-configuration
  • + +
  • +Improvements in Task Journal: "Task active on background" notification +now displayed also when exiting the Task Journal by pressing "Back"
  • + +
  • +Display contrast factory default value changed from 6 to 4
  • + +
  • +Improved Keylock code shortcut
  • + +
  • +Operator name list updated (Cosmorom / Romania)
  • +
+V4.05 +
    +
  • +Turkish, Greek, Czech and Polish T9 added
  • + +
  • +LCD temperature compensation
  • + +
  • +LCD reset after powerup
  • + +
  • +Spaces couldn't be put in front of text in Dealer Welcome Note (DWN)
  • + +
  • +PIN-code couldn't be entered on a SIM-locked phone
  • + +
  • +It wasn't possible to call a SS string beginning with a "*" (e.g. *#61# +etc.) stored on the FDN phonebook
  • + +
  • +Setup Menu command was not executed when already in SIM ATK menu
  • + +
  • +SIM ATK minimum polling interval increased from 5 to 10 sec
  • + +
  • +Improvements when trying to enter username in HTTP authentication
  • + +
  • +Dynamic text case handling improved
  • + +
  • +Timeout killer didn't work on *+-key in number queries
  • + +
  • +Games 'options' -menu disappeared when deleting delivery report in messages
  • + +
  • +Missing/strange menu items when sending SMS
  • + +
  • +In SMS: Improvements to calendar when using fetch service with birthday +note
  • + +
  • +In SMS: Improvements when selecting Multiple copies
  • + +
  • +In SMS: Improvements when storing more than 50 items in the Template folder
  • + +
  • +Improved functionality in Names-list
  • + +
  • +If T9 is active '#'-key toggles now between T9 and normal input in Arabic/Hebrew +and Chinese languages
  • + +
  • +Improved business card sending
  • + +
  • +No characters were received if Euro-sign was first character in a picture +message
  • + +
  • +Improvements to Voice tag
  • + +
  • +Correction of Arabic Name & Number view, RTL marker inserted
  • + +
  • +Correction of number length for Idle number input
  • + +
  • +Handling of operator logo length improved
  • + +
  • +AT commands updated
  • + +
  • +Initialisation of Data SW when receiving/releasing the data switch
  • + +
  • +Fixed Dialling Numbers - View details shows wrong number if it is longer +than 12 digits. Although SSC-String for call forwarding is on FDN list, +call forwarding can not be performed either via menu or via string
  • + +
  • +Flashing panel when erasing a phonebook item
  • + +
  • +Earlier it was impossible to call to SMS 'use number'
  • + +
  • +Improved SMS Delivery reports
  • + +
  • +Wrong indication of max characters in SMS
  • + +
  • +Font size selection not working for received SMS
  • + +
  • +Error in DLR-3 usage in the middle of the IR usage
  • + +
  • +Modified AT commands for DHU functionality (TCH Loopback)
  • + +
  • +Automatic answer does not work in car profile
  • + +
  • +Some spelling in languages improved
  • + +
  • +Call without simcard, note "Emergency calls only" won't disappear
  • + +
  • +Freezes when faulty Business Card is received
  • + +
  • +Possible to switch phone off during keypad is locked
  • + +
  • +Updated MoU list (DUAL_operators)
  • + +
  • +SIM ATK: submenus become trash
  • + +
  • +Cancel all CF's at once:
  • + +
      +
    • +Performed on Line1: If CFU for Line2 is activated the sign is deleted too
    • + +
    • +Performed on Line2: CF's for Line1, data and fax are cancelled: Line2 not +affected
    • +
    + +
  • +*#06# should show IMEI even when SIM card is not inserted
  • + +
  • +USSD short strings supported
  • + +
  • +STP support (e.g. used in Mercedes)
  • + +
  • +CLI logo over IR send/receive
  • + +
  • +Ringing tones over IR - receive
  • + +
  • +Shortcut on 'Send' for go to bookmark
  • + +
  • +In Task Journal: User data memory reconfiguration (now more space for user +data)
  • + +
  • +Reconfiguration to language packages:
  • + +
      +
    • +LP C: Turkish T9 added, Spanish menu and T9 removed
    • + +
    • +LP F: Greek T9 added, Spanish T9 removed
    • + +
    • +LP H: Czech T9 added, German T9 removed
    • + +
    • +LP I: Russian menu removed
    • + +
    • +LP J: Polish T9 added, German menu added
    • + +
    • +LP L: created for Spain and Portugal
    • +
    + +
  • +New text release 130301
  • +
+V5.00 10-07-01 (ROM6?) +
    +
  • +Mainly update to get GCF approva
  • + +
  • +Operator max. name lenght change 11 a 1
  • + +
  • +SIM Poll Interval chang
  • + +
  • +New text release 160301
  • + +
  • +Dual Operator list update
  • +
+V5.02 +
    +
  • +SMS sending improved (SMS sending jammed occasionally)
  • + +
  • +Light stayed on occasionally
  • + +
  • +Improvement to alternate speech-fax call
  • + +
  • +O- language package added
  • + +
  • +Operator list updated (#44)
  • +
+
6310NPE-4*#0000#
V1.23 19-03-01 +
V4.10 04-01-02 +

BUGS: +
the phone crashed when i recorded a second voice message after an older +one which is 1 minute of length. after i did that, i couldnt delete the +second recording, and the screen would turn black.. another [ok] and the +phone would restart. +

V4.15 +

    +
  • +RS232 Serial Cable connection improved (connection did not work properly +during startup) 
  • + +
  • +Wakeup graphics implemented (support for operator variants added) 
  • + +
  • +When voice dialled in a car, the radio did not mute 
  • + +
  • +Memory improvements 
  • + +
  • +Long pressing power button first turned phone off and then on. Now no matter +how long time the power button is pressed to turn off the phone, the phone +stays off. 
  • + +
  • +Support for Language package T (Australia and New Zealand) added 
  • + +
  • +Support for Arabic UI added 
  • + +
  • +Improvements to SMS 
  • +
+
6510NPM-9*#0000#350697
V3.22 10-01-02
+Back to the top/Na pocz±tek +

+


+
Marcin +Wi±cek (WWW)
+ + + diff --git a/Docs/en_US/gsm/firmware/firm7.htm b/Docs/en_US/gsm/firmware/firm7.htm new file mode 100644 index 0000000..688b532 --- /dev/null +++ b/Docs/en_US/gsm/firmware/firm7.htm @@ -0,0 +1,983 @@ + + + + + + + + + + + Nokia identification & firmware/Identyfikacja i oprogramowanie telefonów Nokia + + + + +
Main page/Strona +g³ówna
+ +
+


Nokia identification & firmware/Identyfikacja +i oprogramowanie telefonów Nokia

+ +

+


+
    +
  1. +Ogólne b³êdy/General bugs
  2. + +
  3. +Ogólne informacje o IMEI/General info about +IMEI
  4. + +
  5. +Czy mogê wgraæ sobie oprogramowanie/Can I download +firmware to my phone ?
  6. + +
  7. +Czy to kosztuje ?/Does it cost ?
  8. + +
  9. +Gdzie tego dokonaæ ?/Where to make it ?
  10. + +
  11. +Jakie s± b³êdy/zmiany w kolejnych wersjach +?/What are bugs/changed things in next versions ?
  12. + +
  13. +Jak zmieniæ wersjê jêzykow±?/How to change +language in phone ?
  14. + +
  15. +U¿yte materia³y/Information sources
  16. +
+ +
+

Here is table describing firmware in various Nokia 7xxx phones +
You can also see table for +
Nokia 1xxx/2xxx, Nokia +3xxx, Nokia 5xxx, Nokia +60xx/61xx, +
Nokia 62xx/63xx/65xx, Nokia +7xxx, Nokia 8xxx, Nokia +9xxx

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Phone (telefon)Model number (Oznaczenie)Firmware version code (kod do sprawdzania wersji oprogramowania)TAC in IMEI (TAC w IMEI)
7110NSE-5*#0000#448895
V4.07 20-10-99 +

Internal Nokia test version +
Wersja testowa Nokii +

V4.51 18-06-99 +
V4.58 14-07-99 +
V4.61 23-08-99 +
V4.62 24-08-99 +
V4.67 28-09-99 +

First shipping version of the software. +
Pierwsza wersja oprogramowania w sprzedawanych telefonach. +

V4.69 05-10-99 (not in German language) +

Improvements in WAP browser (with WML) +

V4.70 28-10-99 +
V4.72 10-11-99 (not in German language) +
V4.73 15-11-99 +

(V4.70) BUG REMOVED: Earlier: Max. 12 messages can be stored in self +created SMS-folders. +

V4.75 23-11-99 or 07-01-00 +

V5.11 16-12-99 +

Internal Nokia test version +
Wersja testowa Nokii +

V4.76 13-01-00 +

(V4.73) Improvement to Manual Network selection search +
(V4.73) Poprawiono wyszukiwanie sieci przy rêcznym ich wyborze +

(V4.73) Improvements to CLI Graphics: +
(V4.73) Poprawki nastêpuj±cych b³êdów: +

    +
  • +CLI group tone can't be changed
  • + +
    D¼wiêk nie mo¿e byæ zmieniony w grupach osób +
      +
  • +Can't make call by pressing "send" key in CLI member list
  • + +
    Nie mo¿na zadzwoniæ przez naci¶niêcie "wy¶lij" w menu grupy osób cz³onkowie +
      +
  • +"End" key doesn't work right in Caller Group General Note
  • + +
    Klawisz "Koniec" nie dzia³a poprawnie w ogólnych notatkach grupy osób +dzwoni±cych +
      +
  • +Phone reset when there are two or more active downloaded ringing tones +in Caller groups
  • + +
    Telefon siê resetuje, gdy s± dwa albo wiêcej wgranych przez u¿ytkownika +dzwonków w grupach osób dzwoni±cych +
      +
  • +CLI group tones list problems
  • + +
    Problemy z list± dzwonków grupy (pozycje s± przesuniête - po wybraniu +jakiego¶ telefon faktycznie ustawia kolejny na li¶cie)
+(V4.73) The Call Waiting functionality in the car kit is now improved concerning +radio mute +
(V4.73) Poprawiono funkcjê po³±czeñ oczekuj±cych w zestawie samochodowym +

(V4.73) Dialled numbers removed in Roller menu. +
(V4.73) Wybierane numery zosta³y usuniête z Roller menu. +

(V4.73) The user is now able to insert a phone number into a SMS message +by searching the phonebook for the number. +
(V4.73) U¿ytkownik mo¿e teraz wstawiæ numer telefonu do wiadomo¶ci +SMS przez znalezienie go w ksi±¿ce telefonicznej. +

(V4.73) Improvement of Calendar using am/pm clock +
(V4.73) Poprawki w kalendarzu przy u¿ywaniu 12-godzinnego formatu czasu +

(V4.73) Improvement of speed dial function when same name is assigned +to speed dial twice +
(V4.73) Poprawki w funkcji szybkiego dzwonienia, gdy ta sama pozycja +jest przypisana do dwóch klawiszy szybkiego wyboru. +

(V4.73) BUG REMOVED: Earlier: +

    +
  • +"?" (Euro) and "\" are converted to space characters when storing or sending +a SMS
  • + +
  • +Inserting a phonebook-number into a SMS: Total crash. Sometimes self-reset +after 1-2 mins. If you're activting IR-receive, yo'll get a error ""remove +datacable"" even it is not connected."
  • + +
  • +When deleting an entry from a call register list and closing the slide +while the deletion is in progress (after 'ok') the phone hangs up when +changing the menukey from 'Lock keys' to Menu'.
  • + +
  • +When deleting a space before a uppercase char with active T9-dictionary, +the char will be changed to lowercase
  • + +
  • +Clock: hour/minute separator "." instead of ":"
  • + +
  • +Sometimes when sending a SMS: SMS get sent (will be received, too), phone +is crashing. Remove battery, afterwards the SMS isn't in the outbox. Maybe +more often when sending sms to more receivers. At power-up alleged no PIN-request.
  • +
+BUG (ONLY THIS VERSION): Crash with deactivated PIN-request +

V4.77 25-01-00 +

BUG FIXED: "Clear operator logo" works now (from Operator Logo Uploader). +

BUG REMOVED: Earlier: Cell Broadcasts: Settings are cleared after power +cycling. +

V4.80 23-02-00 +

Improvement of browsing after ending an incoming call. +

Wakeup Graphic is now maintained after 'Restore Factory Settings'  +

Changed ringing tones - Grande Valse renamed to Nokia tune  +

Phone alert for a future calendar note, which has been transferred during +flashing, is now improved. +

Improvement of birthday notes expiry when having birthday notes in the +past. In previous release two birthday notes were shown if having note +in the past and other note expires. +

OTA ringing tones is not playing continuously after being saved.  +

Tone loop with OTA tones. OTA tones are now being played in full length +when it is being tested in profiles.  +

Indication of incoming FAX call improved. Profile dependant indications +is now corrected. e.g. Beep in Meeting Profile.  +

Ringing Tone Check in Profile setting is now also only played twice +as an example when the phone is 'charging' or another message is displayed.  +

BUG REMOVED: Earlier: +

    +
  • +In the profile "Conference" calls , that numbers are in a callergroup, +are ringing not "short", but normal. Looks like the previous used profile's +settings are used again.
  • + +
  • +In profile "Quiet": phone is ringing at calendar-appointments. Should be +quiet, too. "Conference" is ok (short tone)
  • + +
  • +In firmware 4.76 and 4.77 (4.73 and earlier were OK)  phone crashed +when received more (3) Vcards or calendar-appointments over IR
  • + +
  • +(V4.70) After removing the battery, the currency and unit-settings are +lost often.
  • +
+V4.84 07-04-00 +

Improvement to Advice of Charge. Charging on prepaid SIM cards is now +improved +

Improvements to Manual Network Selection +

Improvement to Operator Logo in display. The operator logo is now shown +when the service provider is read from SIM +

Call waiting tone can now be heard in silent mode +

Longer vibrating time. When phone is in "Beep once" mode and vibra is +on, the phone will now vibrate 250 times before stopping +

Animation in Services menu too fast. Changed timing from 125 to 160 +milliseconds +

Improvement to warranty transfer of WAP settings +

Car Radio Mute is now activated when continuing a handheld call in the +cradle (car kit) +

(NEWER TOO ?) BUG: Send a calendar note from Nokia 6110 via a SMS to +your 7110. The calendar in 7110 will stop showing calendar notes... +

Test for size of SMS memory (from http://www.vosper.prv.pl): +
SMS messages - 47 in different folders +
Templates - 10 +
Delivery reports - 36 +
Additional folders - 2 +
After 39 SMS phone deactivated function Move ! +
Full size of memory is 93 (including 10 templates)  +
------- +
Second test for SMS only: 84 SMS + 10 templates +

BUG REMOVED. Earlier: +

    +
  • +Vibration is running in the rhythm of the music, at very quiet or short +ringtones it is vibrating extrem short or not at all
  • + +
  • +(V4.70) After disconnecting battery (without power-off) the volume is often +set to standard.
  • +
+V4.85 +

Info from  http://www.linux.org.uk/diary/: +Seems firmware 4.7x randomly dies on some AT commands. With 4.85 wait for +'OK' then delay 1/10th second before sending a command. If you imediately +respond to OK with a reply the phone misses it. +

V4.88 19-06-00 or 16-06-00 or 02-06-00 +

(V4.84) User setting transfer improved (Permanent Memory Management +update). All data saved apart from wake-up graphics +

(V4.84) Test for size of SMS memory (from http://www.vosper.prv.pl): +
SMS messages - 62 in different folders +
Templates - 10 +
Delivery reports - 18 +
Additional folders - 2 +
After 49 SMS phone deactivated function Move ! +
Full size of memory is 90 (including 10 templates)  +
------- +
(V4.84) Second test for SMS only: 80 SMS + 10 templates +

BUG REMOVED: Earlier +

    +
  • +The phone freezes sometimes, when assigning rintones to callergroups. Maybe +depending somehow on the settings of callergroups and groupgraphics. Sometimes +continue after 1-2 mins. Maybe better results when using the power-key +than with Menu 3.
  • + +
  • +"Opposite: the levels are in wrong order (1-3-4-2; 2 is the most complicated +one)"
  • +
+ +


(V4.80) BUG REMOVED: Earlier: +

    +
  • +Names of loaded ringtones were shown as rectangles sometimes, i.e. after +a firmwareupgrade, when ringtones were deleted, but the callergroups still +pointed to them.
  • + +
  • +""Confirmations of SIM service actions"" is not working sometimes, although +enabled - phone is sending SMS without asking.
  • + +
  • +Reminder-alert rings loud even while doing a call.
  • +
+(V?.??) BUG REMOVED. Earlier: "No connections possible after a Wap-Call +(for approx. 15 min), although receiving-level is up. Alleged the phone +is still sending then (noticeable on the noise in a radio). If you have +a failed login attempt ('no response' or 'page cannot be displayed') only +?  +

Changed text while sending SMS +
from +
letter bar (shorter) +
Sending +
message +
to +
letter bar (longer) +
Sending message +

V4.94 02-10-00 or 27-09-00 or 28-09-2000 +

Carkit Audio optimisation +

Text files in language packages updated (localised group names, ...) +

IRDA data transmission improved +

Correction to Viag Homezone +

Operator list updated +

Update of WAP browser: +

    +
  • +Handling of "No cache" and "Redirect" commands
  • + +
  • +Handling of WAP session after an incoming call
  • + +
  • +Handling of <onenterforward> command
  • + +
  • +Handling of long URLs
  • + +
  • +Handling of HTTP post size limitation
  • + +
  • +Handling of deep navigating
  • +
+Now max. 838 chars (earlier only 160) can be written into inputfields... +

Update of SIM handling SW, including SIM ATK corrections +

BUG: In WTLS mode sends an additional byte in the Client-KeyExchange +packet. Some WAP gateways seem to have a workaround for this bug (E-Plus +works, Debitel not). Netlife WAP-Server has a workaround too... +

Can render tables in WAP now. +

Jeden z u¿ytkowników na polskich grupach dyskusyjnych porówna³ j± ze +starszymi wersjami tak: +
One of 7110 compared it to the earlier firmware: +

    +
  • +WAP browser organised like in N6210
  • + +
    W³a¶ciwie przegl±darka WAP zorganizowana jest podobnie, a w³a¶ciwie +chyba tak samo jak przegladarka WAP w N6210. +
  • +added <CENTER> support
  • + +
    Dodano obs³ugê tagu <CENTER> +
  • +Added function "Go to the address" in menu
  • + +
    Dodano mo¿liwo¶æ wpisania adresu strony bezpo¶rednio z menu (wcze¶niej +trzeba by³o najpierw za³o¿yæ zak³adkê) - opcja "Id¼ do adresu" +
  • +You can NOT LOAD images - new Menu 10-3-2 (previous 10-3-2 +moved to 10-3-3) Appereance settings with Show Images +Yes/No
  • + +
    Dodano mo¿liwo¶æ NIEWCZYTYWANIA grafiki - opcja w nowym Menu 10-3-2 +
  • +Image can be link
  • + +
    Dodano obs³ugê grafiki jako linka +
  • +When phone read pages, you don't see "snake" and "Connecting with...", +but globe
  • + +
    Podczas wczytywania stron nie pojawia siê "wê¿yk" i napis "³±czy siê +z us³ugami" tylko w prawym górnym naro¿niku globusik +
  • +WAP connections are MORE STABLE
  • + +
    generalnie DU¯O STABILNIEJSZE po³±czenia WAP ni¿ dotychczas +
  • +Can send and receive bookmarks in WAP settings
  • + +
    mo¿liwo¶æ wysy³ania i odbierania zak³adek w ustawieniach WAP
+Test for size of SMS memory (from http://www.vosper.prv.pl): +
SMS messages - 128 in different folders +
Templates - 10 +
Delivery reports - 52 +
Additional folders - 3 +
Phone didn't deactivate function Move ! +
Full size of memory is 190 (including 10 templates)  +
------- +
Second test for SMS only: 142 SMS (or more - test wasn't end) + 10 +templates +

(V 4.88) BUG REPAIRED: In older versions more numbers for one name broke +call with Green button: +

    +
  1. +Add more numbers to one name (standard number other than type 'general').
  2. + +
  3. +Change "Type of view" to "Name and number".
  4. + +
  5. +Press Green button (Call) or the NaviRoller long with this number.
  6. + +
  7. +Phone "starts" to call, but instead of printing the number, it prints only +name and after few seconds it returns to name.
  8. + +
  9. +Go to "last calls" (or "Redial" and "Options - Edit Number").
  10. + +
    The called name has number starting with "/".
+Solution for it was: use the NaviRoller 2 times to get through the menu +

BUG REMOVED: Earlier: +

    +
  • +When made these steps: Receiving Vcard - show - break off by closing slide +-> the Vcard-name appeared in some menus, until power cycling (i.e. in +a SMS-folder, while the display is building up a SMS, in the top line, +instead of the SMS-title)
  • + +
  • +When a number, which was assiged to a speeddial, was deleted, the speeddial +remained and pointed to nothing. When called such a speeddial the phone +crashed sometimes (after the Error message "Number missing").
  • + +
  • +When deleting a phonebook-entry with a assigned speeddial (but let the +name itself stored), pressing the NaviRoller (set to speeddial), and closing +the slide while the "Number missing" Message is displayed, the display +gets empty when the slide is closed and the Text has changed from "Lock. +Keys" to "Menu". When someone calls, the display gets on again. Ok after +powercycling.
  • + +
  • +Assigning ringtones to callergroups after a firmwareupgrade: sometimes +some of the ringtones are deleted, but the callergroups and profiles still +pointing to them -> Phone crashes when trying to assign the tones.
  • + +
    Solution for it was: assign all profiles and callergroups to a standard-tone, +power cycle the phone, load the individual 5 tones new, and assign profiles +and groups new. +
  • +If you renamed group, the old (preset) name was still shown in menus (i.e. +"Alert for").
  • + +
  • +"?" (Euro) and "\" in the SMS listview are shown as rectangles.
  • + +
  • +When entering CAPTIALS with active T9-dictionary, and a word with the german +Umlaut ""ß"" is found, this letter is leaved noncaps.
  • + +
  • +After Wap access sometimes the display gets empty when the slide is open, +normal display only for a short time when it is closed. Ok after powercycling. +(i.e. when opening the 'suchmaschine' link at  <http://mopilot.com/wml/index.wml>)
  • + +
  • +Data-calls using IR breaks down after some Minutes (""IR connection lost""). +Alleged only when sending data, receiving works. Alleged ok, when using +a ir-speed of 9600 baud.
  • + +
  • +When security-level set to "Phone": you can't get the Memory Status. When +set to "Memory", it is possible. Should be vice versa.
  • + +
  • +The call divertion icon is cleared after powercycling, or no service condition. +Appears again after status-check.
  • + +
  • +Autoanswer with the headset does not work if the keyboard is locked (altough +activated in the profile).
  • + +
  • +(was OK in V4.73 and earlier, not OK in 4.88) Closed user group: after +entering the groupnumber, the left OK-button doesn't work, only the NaviRoller.
  • + +
  • +(V4.80) german text wrong: "auf Netzant- wort <new line> warten" (english: +"Requesting")
  • +
+NaviRoller for Redialing (Menu 4-3-5) official not possible anymore since +FW v4.73 not possible again... +

Keyboard can only be locked after closing the slide with the Softkey +only, not anymore with the NaviRoller (like earlier). +

BUG (ONLY THIS VERSION): +

    +
  • +Changing a Speeddial-Entry with 'search' does not work (''selected memory +empty'). Deleting and assigning new works.
  • + +
  • +"WAP: Bug in relative URL's with leading ""/"": ""http://www.abc.com/""  +and the Link to ""/sub.wml"" targets to ""http://www.abc.co/sub.wml"""
  • + +
  • +Snake2: after playing, the cup is shown without the reached points.
  • +
+BUG (IN THIS AND NEWER VERSIONS): +
    +
  • +When receiving a SMS with locked keypad, unlock it, and immediately press +the left softkey, the phone shows the menu instead of the SMS. ('Menu' +instead of 'Show')
  • + +
  • +all (Infrared-) "Print" menu's are missing
  • + +
  • +If the keyboard is locked with "Menu *", it is not unlocked when opening +the slide.
  • + +
  • +SMS with more numbers - Options/Use number - Number is shown - Options/Add +to name: Namelist is empty and softkeys are not working
  • + +
  • +French language: reply text ""Sans/Avec"" in Jeux/Param?tres/Audio mixed +up (i.e. when selecting ""Sans"" the phone replys ""Avec Audio"") (Games/Settings/Sounds +On/Off)
  • + +
  • +Games: start-animation is not smooth
  • +
+V5.00 09-11-00 +

Improvements to Data/Fax call functionality +

Extended URL length +

Improved cache control (max age=0 functionality improved) +

Weak encryption (40 bit) now displayed correctly +

DTMF tones usable during emergency call +

Vibra settings adjusted (it doesn't enable/disable, when want) +

Improvements to the phonebook search function (use Search function and +press some key (phone will jump do the first entry starting with this char), +now use Delete function - cursor doesn't return to names starting on A) +

'PIN code request change to PUK code request after emergency call' corrected +

Games (two players): Text for winners/losers added +

Different alghoritms for games ? On the page http://www.vosper.prv.pl +you can find, how to win in Opposite in 4'th level in firmware 4.77, 4.84 +and 4.94. Author writes, that in 5.00 it doesn't work. +

(V4.88) Games: in Games menu have new setting, which can enable/disable +sounds (earlier you had to change it in settings of profiles) +

(V4.88): in WAP can enable wrapping long texts - new Text wrapping +On/Off option in Menu 10-3-2 +

(V4.88). BUG: when download correctly group logo to phone, right half +of first line to the bottom of the screen is clean.... +

(V4.88) if you receive SMS you CAN'T  type twice left function +key to get message, you HAVE to wait second between keystrokes. +

Test for size of SMS memory (from http://www.vosper.prv.pl): +
SMS messages - 112 in different folders +
Templates - 10 +
Delivery reports - 68 +
Additional folders - 2 +
Phone deactivated function Move after 171 SMS ! +
Full size of memory is 190 (including 10 templates)  +

(V4.88) Different menu: earlier in "Phonebook->Options" there was "Print" +function +

BUG REMOVED: Earlier: +

    +
  • +Vcard sent from 7110 to 61x0 with SMS is received as normal SMS instead +of a Vcard (mostly "not showable") Combinations 61x0 to 7110, 61x0 to 61x0 +and 7110 to 7110 worked OK in earlier versions.
  • + +
  • +When searching the phonebook, the displayed list should jump to the given +letters, but should not be filtered with them.(like on 2110 or 61x0). After +pressing 'options' and 'back', or waiting 30 seconds, the phone switches +into this mode. In this version the phone holds the position after clearing +the entry.
  • + +
  • +While playing games (ringtone and message alerts are beep once, light is +enabled), the lights turn off after few seconds when an SMS is received. +In this version game is interrupted...
  • + +
  • +(V4.88) If someone called you with CLIP active and you had no time to answer, +this call will be under Missed Calls, displayed with (no number). If you +try to erase it, over 50% chance will be that on display will be something +like (sequence of squares) and if you press Ok phone hangs. Only battery +removing helps.
  • + +
  • +(V4.88) in Norwegian language only: phonebook search with more than 1 char +will give a "No match" error-reply
  • +
+BUGS (which still exists): +
    +
  1. +It is not possible to add a pbx extention to a stored number.Only possibility: +call - hang up immediately - redial - options - edit number - correct - +dial
  2. + +
  3. +When editing names, after "Done" you're in the standby-mode, instead of +been put into the names-list. Very annoying when editing much names, one +after the other.
  4. + +
  5. +Vcard sent from 7110 to 61x0 with IR: german Umlauts incorrect (i.e. ä +-> =E4). Works with 61x0 to 7110, 61x0 to 61x0 and 7110 to 7110
  6. + +
  7. +Received Vcards are stored in the internal Phonememory, even when "SIM-Card" +is selected.
  8. + +
  9. +When keying in a character into a textbox (phonebook, WAP) using the num-keys, +and you want to key in the same character again, you'll have to wait until +the Cursor jumps to the next position, even when this 2nd input is done +using the naviroller. This must-wait is not necessary.
  10. + +
  11. +SMS-alert "Ascending" does not ascend, it is loud from the beginning, just +longer then standard.
  12. + +
  13. +Profile name is overwritten by the cell info (displayed in the same line, +although the display is big enough). On the 6150, 2 lines were used (as +long as the opeartor logo wasn't enabled).
  14. + +
  15. +Roller functions set to speeddial - select a name (Number is displayed) +- dial with pressing the NaviRoller twice shortly doesn't work (only with +green Key, or pressing the NaviRoller long).
  16. + +
  17. +Call waiting message is shown on the display, but the phone doesn't beep, +if number is assigned to caller group with caller logo. If caller group +logo is turned off, it works correctly.
  18. + +
  19. +(V4.94 and NEWER) Long names are clipped after the last visible blank space +since 4.94, if they are too long to display (i.e. in the quick-dial list). +Formerly the Names were simply clipped on the end of line. It's more 'pretty' +now, but longer names with same begin can't be told apart any more. Best +thing would be a automatic adjustion of the fontsize to the textlenght.
  20. + +
  21. +When the Phonebook is set to be viewed by "Name and Number", it's still +shown "Name only" when sending a SMS.
  22. + +
  23. +Press NaviRoller (set to "quick menu") 1x (Messages), press "Write", key +in something, press "Options" and "Send options" --> not working, you're +in writing mode again and only writing, deleting and red key are still +working
  24. + +
  25. +SMS: blank characters on the begin of a new line are not visible (i.e. +ASCII-Art SMS)
  26. + +
  27. +"SMS folders: lists are not sorted They are listed in the order, when the +SMS have been moved into the folder. But when some SMS have been deleted, +the 'gaps' are filled first."
  28. + +
  29. +"Moving and deleting of SMS templates doesn't work.When moving, a copy +is made. (""Delete"" should not be displayed, and instead of ""move"" ""copy +"")"
  30. + +
  31. +Cell Broadcasts: Settings are replacing the SIM-card
  32. + +
  33. +When the SMS-memory is full, and you try to store another SMS, you'll get +the errormessage "Sent, no space to copy" (although nothing was sent).
  34. + +
  35. +When Alarm is on, the phone does a short slight beep at midnight, if it +is switched off. After that, it can't powered on for about 20 seconds.
  36. + +
  37. +sending groupgraphics via IR should be possible according to the manual, +but the menu is missing (via SMS it's ok). Receiving via IR is also not +possible - only via SMS. With 61x0 sending and receiving via IR works.
  38. + +
  39. +WAP: In hidden password-inputfields (with *s, like yahoo's email page) +digits can only be keyed in by pressing the respective key several times, +and not (like anywhere else) by holding the key for a second.
  40. + +
  41. +security-level set to "Memory": when viewing the internal phonememory, +the securitycode should be requested.
  42. + +
  43. +"After sending DTMF-tones, you cant set the volume. (You'll have to clear +the digits first, otherwise it acts as Cursormovement, what is not useful +in DTMF)"
  44. + +
  45. +After power on, when turning the NaviRoller the first time, or opening +the slide (without pressing any other key before, so disable PIN), the +phone beeps shortly. Later, it never beeps when doing this.
  46. + +
  47. +(V4.88) When turning the NaviRoller while displaying a helpscreen, the +lights are flickering.
  48. + +
  49. +NaviRoller as "Quick Menu", on "Home" and "Bookmarks" the right Softkey +changes from "Exit" to "Back" (like in online-mode), but is without a function +then.
  50. + +
  51. +When replying to a SMS, and an other message profile than the standard +one is selected, the phone numer is not proposed anymore.
  52. + +
  53. +"Reminders" in te calendar have no alert, even not a time. Was ok on the +61x0.
  54. + +
  55. +Calendar-birthdays sent from 61x0 to 7110 with IR: year is not imported +to the 7110.
  56. + +
    Works with 8210 to 7110, 7110 to 7110, 61x0 to 61x0, and 7110 to 61x0. +
  57. +leap year bug: birthday i.e. on 3.3.2000, remind-date before 28.2. I.e. +15.2. Store and edit again -> remind-date has changed to 14.2., and with +every edit one additional day.
  58. +
+V5.01 08-12-00 +
V5.01 09-01-01 (ROM6?) +
    +
  • +Optimal Operator name length changed from 10 to 11 characters
  • + +
  • +Enabling of inserting space in subject when writing e-mail via WAP in Australia
  • + +
  • +Improved dual SIM handling
  • + +
  • +New UI Text release
  • + +
  • +Operator list updated
  • +
+ +
+
BUG: Test 45 in NetMonitor +doesn't work correctly. +
B£¡D: Test 45 w monitorze sieci +nie dzia³a poprawnie. +

There are/were also some other bugs. I can't tell, if they're corrected +or not. If have experiences with it, please report it to me: +

WAP: if you have call waiting enabled, use WAP and somebody will +call to you, he will heard busy signal +

Alarm Clock: If the alarm goes when the phone is switched off, +and the "Snooze" button is pressed, the phone will not turn back on until +the alarm resounds, or the phone is rebooted. +

Phone Book: +

    +
  1. +When someone calls only the number is displayed. This doesn't happen to +every name. It also doesn't matter if there are multiple or single entries +under the name or in which caller group it is. The number's aren't  +in the memory twice. 
  2. + +
  3. +If you use the roller for speed dialing, sometimes when you scroll to a +number other than the first one and press the green call key, the phone +automatically phones the number at position one.
  4. + +
  5. +When using the phonebook with the SIM card, sometimes when trying to select +a number to dial, the screen goes blank and the phone shuts down. The battery +needs to remove to get it to work again.
  6. + +
  7. +How to delete more names from phonebook (the same to roller => select name +=> Options => Delete => confirm):
  8. + +
      +
    1. +Names => Delete => One by one
    2. + +
    3. +First entry of phonebook is shown
    4. + +
    5. +Select name to delete by roller
    6. + +
    7. +Press Delete & confirm
    8. + +
    9. +Goes to 2. (first entry again!!!) instead of printing next name
    10. +
    +
+Back Light: The back light has been known to refuse to turn off, +until the battery is removes.  +

Answer Phone: If you get an answer phone message on line two, +the phone does not select the correct line as it pretends to, you have +to select the correct line before attempting to listen to your message. +

SMS: +

    +
  1. +If you write an SMS and then choose options, insert number you can happily +insert a number that you type, but if you select 'search' to allow you +to insert a number from the address book the address book is displayed +but with corrupt menu options and no screen border, the phone crashes and +requires a reboot. Occasionally it will either a) reboot itself or b) (if +the Network Monitor is active) perform a memory dump to the screen. The +phone works fine with the insert name option.
  2. + +
  3. +E-mail longer than 21 chars in cutted off (checked for 4.77, 4.80, 4.84)
  4. + +
      +
    1. +Add e-mail longer than 21 chars to some name.
    2. + +
    3. +Go to: Roller => select the name => Options => Send e-mail.
    4. + +
    5. +Only first 21 chars is pasted into SMS.
    6. + +
    7. +Go to: Roller => select the name => Roller => select e-mail entry => Roller +=> Send e-mail.
    8. + +
    9. +E-mail is pasted correctly.
    10. +
    + +
  5. +It's not possible to store logo, graphics or ringtone into SMS inbox, you +can only send it as SMS (function "Store-to-sms-inbox" is some programs +doesn't work). Checked for 4.73, 4.76, 4.77
  6. + +
  7. +When SMS beep (any mode - normal, ascending etc.) is enabled in Silent +profile, phone doesn't make any sound when the message is received. Checked +for 4.84
  8. +
+IRDA: +
    +
  • +After ending of data tranfer over IrDA, it's not possible to send SMS over +IrDA, you have to switch off & on the phone (Palm V on other side). +Checked for 4.73
  • + +
  • +When you send reminder to Nokia 6110 via IrDa, date of it 1.01.2050...
  • +
+Call Standby: When you are on the phone, and someone else tries +to phone you the phone beeps (Warning tones have to be on) there are three +ways to deal with this either send the incoming caller to your answer phone, +hang-up on the current call and take the new on or conference call both +together. However it has been known that when the current caller hangs +up, you lose both calls, or at least your can not activate the waiting +call. and if one person hangs up in conference calling, they all go!  +

Roller: Assign function "short menu" to roller, press roller, +go to "menu". There is no menu 11 (SIM toolkit, Paegas Info etc.). Checked +for 4.73, 4.77, 4.80, 4.84  +

Vibrating call alert: +

    +
  1. +If your battery is low, then there isn't enough power to use the Vibrate +mode so the phone switches it of automatically to save energy. Very Clever.
  2. + +
  3. +Vibrate ringing sometimes turn on or off even it's disabled/enabled in +profile. Checked for 4.70, 4.80, 4.84. Solution: enable vibra again, or +powercycle the phone.
  4. + +
  5. +No vibrating, although enabled, and even power-cycling doesn't help.
  6. + +
    Solution: select an other ringtone in the profiles.
+Games: +
    +
  • +The back light turns off during a games of opposite or racket, even if +the option is set for the lights to be on.
  • + +
  • +Either the light doesn't turn on at all, or the light switches of in the +middle of the game.
  • +
+Groups: If you assigned downloaded ringtone for caller group and +deleted if (ringtone) from phone, it stops ring and vibrate. Can't change +ringtone from phone's menu then (must use Logo Manager or different software). +Checked for 4.94 +

Language specific: +

    +
  1. +When Czech is selected, y' is not in the "standard chars" list. It's in +"special chars". So you can't type it with pressing 9 & rolling to +y'. It's correct when Slovak language is selected. Checked for 4.70, 4.80, +4.84
  2. + +
  3. +When Czech is selected, it's not possible to look up name starting with +"Ch" in phone book by typing "ch" in list... Checked for 4.80, 4.84
  4. + +
  5. +Order of chars on key 3 in Composer is "d, d~, e, e', f, 3" and depends +on Language settings. Fixed for Czech from 4.76 (correct d, e, f, d~, e', +3), but Slovak is still broken... Checked for 4.70, 4.73, 4.76, 4.77, 4.80, +4.84
  6. +
+Ringtones: +
    +
  • +Change of ringtone for group Family returns from menu and it's not possible +to open this group till next power-on. Checked for 4.77, 4.80, 4.84. Use +Logomanager to alter the ringtone. this fixes the bug. After using Logomanager +you can then manually change it via the phone.
  • + +
  • +If you assign downloaded ringtone to group, you have active call waiting +function and somebody from this group will call to you, you don't have +info about it. Must assign one original ringtones and then is OK. Checked +for 4.84
  • +
+DLR-3 support and AT (all versions ?): +
    +
  • +you have to wait minimum 400 millisecs after DTR drop before you send an +AT command to the phone or it will hang.
  • + +
  • +earlier firmware versions were unable to return SMS from the phone memory +but returned the SIM ones.
  • +
+
7160NSW-5*#9999#
V1.05 22-11-00 +
V1.07 22-03-01
7190NSB-5 *#0000#
V3.30 06-11-00
+Back to the top/Na pocz±tek +

+


+
Marcin +Wi±cek (WWW)
+ + + diff --git a/Docs/en_US/gsm/firmware/firm8.htm b/Docs/en_US/gsm/firmware/firm8.htm new file mode 100644 index 0000000..9713ec5 --- /dev/null +++ b/Docs/en_US/gsm/firmware/firm8.htm @@ -0,0 +1,1843 @@ + + + + + + + + + + + Nokia identification & firmware/Identyfikacja i oprogramowanie telefonów Nokia + + + + +
Main page/Strona +g³ówna
+ +
+


Nokia identification & firmware/Identyfikacja +i oprogramowanie telefonów Nokia

+ +

+


+
    +
  1. +Ogólne b³êdy/General bugs
  2. + +
  3. +Ogólne informacje o IMEI/General info about +IMEI
  4. + +
  5. +Czy mogê wgraæ sobie oprogramowanie/Can I download +firmware to my phone ?
  6. + +
  7. +Czy to kosztuje ?/Does it cost ?
  8. + +
  9. +Gdzie tego dokonaæ ?/Where to make it ?
  10. + +
  11. +Jakie s± b³êdy/zmiany w kolejnych wersjach +?/What are bugs/changed things in next versions ?
  12. + +
  13. +Jak zmieniæ wersjê jêzykow±?/How to change +language in phone ?
  14. + +
  15. +U¿yte materia³y/Information sources
  16. +
+ +
+

Here is table describing firmware in various Nokia 8xxx phones +
You can also see table for +
Nokia 1xxx/2xxx, Nokia +3xxx, Nokia 5xxx, Nokia +60xx/61xx, +
Nokia 62xx/63xx/65xx, Nokia +7xxx, Nokia 8xxx, Nokia +9xxx

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Phone (telefon)Model number (Oznaczenie)Firmware version code (kod do sprawdzania wersji oprogramowania)TAC in IMEI (TAC w IMEI)
8110NHE-6, NHE-6BX*#8110#490137
V4.24 13-08-96 +
V4.25 09-09-96 +
V4.36 23-10-96 +
V5.31 06-01-96 +
V5.62 05-05-97 +
V6.01 27-02-98 +
V6.21 16-10-98
8110iNHE-6, NHE-6BM*#8110#490502
V24.03 16-07-97 +
    +
  • +First known version.
  • + +
  • +This version had some problems showing the service provider in the display. +Instead it showed some empty space. ??? 
  • +
+V24.04 08-08-97 +
    +
  • +An updated GSM operators' list.
  • + +
  • +Problem with missing service provider name in display solved.
  • +
+V24.11 09-09-97 +
    +
  • +An updated GSM operators' list.
  • +
+V24.23 21-10-97 +
    +
  • +An updated GSM operators' list.
  • +
+V25.00 12-02-98 +
    +
  • +An updated GSM operators' list.
  • + +
  • +Ringtone 10 was changed..
  • +
+V25.10 03-06-98 +
    +
  • +An updated GSM operators' list.
  • +
+V25.20 16-10-98
8146NHK-6*#170602112302#
V4.02 06-02-97 +
V5.00 13-03-98
8148NHK-6*#8110#
V4.02 06-02-97 +
V5.00 13-03-98
8148iNHK-6V*#8110#
V3.10 09-12-97
8210NSM-3*#0000#449306
V5.08 16-11-99 or 17-11-99 +
V5.11 09-12-99  +
V5.16 15-02-00 +

BUG: When you edit a large SMS, and you move the cursor for about 60-70 +characters, when you stop moving the cursor, and try to write in that place, +wrote appears 3 spaces in front of the cursor (as if cursor was there, +but it's not - it's 3 characters behind!). Info from jsp_m +

V5.20 17-04-00 +

BUGS AVAILABLE: +

    +
  1. +if someone call from a number that end with "88", you can't see the name +of caller even if there is a name in memory. Another user claims same problem +but with number ending with "98".
  2. + +
  3. +if you activate "silent mode", from power-on key, than receiving a call, +than come back to "Normal mode", the "ringer" will be to level 1 instead +of default of 4 or 5
  4. + +
  5. +Recharge time to much long (5 hours, manual says 2.30 hours) this not a +bug, really (you can see with netmonitor), during first 2.30 hours there +is the main recharge of battery (BLB2 Li-Ion 650 mA), and last 2.30 hours +is a maintenance charge. (this if powered-off phone).
  6. + +
    If you recharge with power-on phone, needed time will be 2.30 hours, +(charge indicators stop flashing) +
    If you recharge with power-off phone, needed time will be 5.00 hours, +(charge indicators stop flashing) +
  7. +voice tags: somethings, even if voice tags are on phone-memory, (instead +of SIM-memory), when you change SIM card, you miss all voice tags (deleted).
  8. + +
  9. +T9: if you should use a different language for menus and T9, every time +you change the SIM the T9 language are re-setted to menus language.
  10. +
+V5.21 03-05-00 or 25-04-00 +
    +
  • +Support for Intel ComboMemory
  • + +
  • +Fixed "buzzing" sound heard sometimes while establishing a call
  • +
+ +


BUG AVAILABLE: If you activate "silent mode", from power-on key, +than receiving a call, than come back to "Normal mode", the "ringer" will +be to level 1 instead of default of 4 or 5) +

V5.25 20-09-00 +

    +
  • +Tone "Orient" replaced with "Moon & Clouds"
  • + +
  • +Improved copying long phonebook entries from SIM to phone (increased speed)
  • + +
  • +Default ringing tone after menu reset was changed into "Ring ring" in every +PPM package 
  • + +
  • +No more than 5 ringing tones (and other OTA things) can be received in +a row without saving or discarding them 
  • + +
  • +Left softkey now activates IR link during incoming datacall
  • + +
  • +Improvement to printing from 7110 to 8210/8850 
  • + +
  • +Datacalls possible after using PC Suite without rebooting the PC 
  • + +
  • +Operator list updated 
  • +
+Info from users: in PL language "Mikrofon wy³±czon" and "Odg³usz" +

V5.26 19-10-00 +

    +
  • +Corrections to cases where the ringing tone/keypad tone stayed at lowest +level
  • + +
  • +COLP Note display increased 1.5 s to 30 s (help screens of menus apear +twice faster than before)
  • + +
  • +Improvements to emergency calls
  • + +
  • +Operator list updated
  • +
+ +


V5.27 16-02-01 +

    +
  • +Support for DSP code for ROM6 added
  • + +
  • +Earlier, when using PPH-1 in certain circumstances, a tapping sound could +be heard via loudspeaker
  • + +
  • +Operator name length changed from 10 to 12 characters
  • + +
  • +New text release in use (there was key-9 spelling mistake in Russian language)
  • + +
  • +Earlier in certain circumstances SMS editor was left in a wrong (Unicode) +mode
  • + +
  • +Operator list updated
  • + +
      +
    • +Operator name changed
    • + +
        +
      • +Old name   New name     MNC/MCC
      • + +
      • +Vodafone   Vodafone HU  216/70
      • + +
      • +GSM-MS1    GSM MS1      218/05
      • + +
      • +FEast      Far East     +250/12
      • + +
      • +ERA GSM    PL ERA GSM   260/02
      • + +
      • +DIGIFONE   IRL Digifone 272/02
      • + +
      • +Mobilkom   FL1          +295/05
      • + +
      • +MODICOM    INA SPICE    404/14
      • + +
      • +MobileNet  INA SPICE    404/31
      • + +
      • +EAE        KSA EAE      +420/07
      • + +
      • +C&W HKT    HK TELECOM   454/00
      • + +
      • +UNICOM     CHN-CUGSM    460/01
      • + +
      • +GTGSM      GH ONEtouch  620/02
      • + +
      • +Celtel     CELTEL GA    628/03
      • + +
      • +Celtel     CELTEL CD    630/02
      • + +
      • +ANTARIS    BUSAFA       +642/02
      • +
      + +
    • +New operator added
    • + +
        +
      • +Operator name MNC/MCC
      • + +
      • +ProMonte      220/02
      • + +
      • +YUG 03        220/03
      • + +
      • +MONET         220/04
      • + +
      • +FI AMT        244/14
      • + +
      • +RUS DTC       250/10
      • + +
      • +Primtel       250/92
      • + +
      • +TXXI          250/93
      • + +
      • +MD MOLDCELL   259/02
      • + +
      • +Viking        274/04
      • + +
      • +go mobile     278/21
      • + +
      • +GEO 03        282/03
      • + +
      • +TELE GRL      290/01
      • + +
      • +telecom FL    295/01
      • + +
      • +Montel        295/02
      • + +
      • +LI TANGO      295/77
      • + +
      • +JM DIGICEL    338/50
      • + +
      • +MPTGSM        414/01
      • + +
      • +JO MobCom     416/77
      • + +
      • +MN MobiCom    428/99
      • + +
      • +IR-TCI        432/11
      • + +
      • +IR KISH       432/14
      • + +
      • +BUZTEL        434/01
      • + +
      • +ISAT M3       510/21
      • + +
      • +MALITEL ML    610/01
      • + +
      • +CI CORA       612/01
      • + +
      • +BF CELTEL     613/02
      • + +
      • +BJ BENINCELL  616/03
      • + +
      • +TD CELTEL     622/01
      • + +
      • +TD LIBERTIS   622/02
      • + +
      • +CELTEL RC     629/01
      • + +
      • +CELTEL CD     630/02
      • + +
      • +CD OASIS      630/89
      • + +
      • +Safaricom     639/02
      • + +
      • +UTL_TELECEL   641/11
      • + +
      • +ZM ZAMCELL    645/01
      • + +
      • +MG Madacom    646/01
      • + +
      • +MG ANTARIS    646/02
      • + +
      • +MTC NAMIBIA   649/01
      • + +
      • +BW VISTA      652/02
      • +
      + +
    • +Country name changed
    • + +
        +
      • +Old name   New name   MCC
      • + +
      • +H          HU         +216
      • + +
      • +BA         BIH        +218
      • + +
      • +I          IT         +222
      • + +
      • +M          MT         +278
      • + +
      • +FIJ        FJ         +542
      • + +
      • +GO         GA         +628
      • +
      + +
    • +New countries added
    • + +
        +
      • +Country name MCC
      • + +
      • +JM 338
      • + +
      • +MM 414
      • + +
      • +MN 428
      • + +
      • +IR 432
      • + +
      • +ML 610
      • + +
      • +BF 613
      • + +
      • +BJ 616
      • + +
      • +TD 622
      • + +
      • +RC 629
      • + +
      • +CD 630
      • + +
      • +ZM 645
      • + +
      • +MG 646
      • + +
      • +NA 649
      • +
      + +
    • +Mobile Network Code changed
    • + +
        +
      • +Old code New code Operator
      • + +
      • +634/1    634/10   MobiTel
      • +
      +
    +
+Here are observations from jsp_m: +
    +
  • +new netmonitor test 140
  • + +
  • +no helps in netmonitor
  • + +
  • +net monitor tests cycle much faster now
  • + +
  • +(NEWER TOO ?) BUG:When edit long SMS (about 160 chars) and press Up/Down +key very long (until will scroll all SMS context - 160 chars) without releasing, +phone will restart after it - info from SkyBoy
  • + +
    (NOWSZE TE¯ ?) B£¡D: Przy edycji d³ugiego SMSa (oko³o 160 znaków) po +naci¶niêciu klawisza Góra/Dó³ i przytrzymaniu (bez zwalniania), a¿ ca³y +SMS (160 znaków) zostanie przewiniêty, telefon zresetuje siê...  - +informacja od SkyBoy
+V5.28 24-05-01 +
V5.28 27-06-2001 (ROM6?) +
    +
  • +'Sending picture message' note stays anymore on the screen after the picture +message has been sent, when there is an incoming call, while sending the +message
  • + +
  • +New text release: Slovakian key text's alphabet order same as Czech
  • + +
  • +Part of SMS-tone in Class 0 messages was missing. There were two simultaneous +tones at once (SMS message received and note tone) when Class 0 SMS was +received
  • + +
  • +In certain situations, when active call was on hold and business card was +received, the 'Business card received' disappeared too quickly
  • + +
  • +When business cards/calendar notes are sent via IR more characters are +now received
  • + +
  • +When sending Birthday notes over IR, the year was sometimes received incorrectly +if the year included 0 (zero)
  • + +
  • +Operator list updated
  • + +
      +
    • +Operator name changed
    • + +
        +
      • +Old name     New name     MNC/MCC
      • + +
      • +Macau SMC    SmarTone     455/00
      • + +
      • +ADAM         TIMECel      +502/17
      • + +
      • +Itineris     Orange F     208/01
      • + +
      • +PL ERA GSM   ERA GSM      260/02
      • + +
      • +B-COM        LV TELE2     +247/02
      • + +
      • +ALJAWWAL     ALJAWAL      +420/01
      • + +
      • +WP-1800      DTAC         +520/18
      • + +
      • +MG ANTARIS   ANTARIS      646/02
      • + +
      • +Ben-NL       Ben NL       +204/16
      • + +
      • +MOBILAND     STA-MOBILAND 213/03
      • + +
      • +WIND         I WIND       +222/88
      • + +
      • +Connex GSM   CONNEX       226/01
      • + +
      • +DiAx Swiss   sunrise      228/02
      • + +
      • +GLOBTEL      SVK GT       +231/01
      • + +
      • +One          ONE          +232/05
      • + +
      • +one2one      One 2 One    234/30
      • + +
      • +ZAO SMARTS   SMARTS       250/07
      • + +
      • +Kuban-GSM    KUGSM        +250/13
      • + +
      • +VODA M       VODAFONE MLA 278/01
      • + +
      • +AirTel       AIRTEL       +404/45
      • + +
      • +AirTel       AIRTEL       +404/49
      • + +
      • +HK TELECOM   CSL          +454/00
      • + +
      • +HK SMC       HK SMARTONE  454/06
      • + +
      • +KGT-ONLINE   KGT-Online   466/88
      • + +
      • +Hello        HELLO        +520/23
      • + +
      • +TT           TUNTEL       +605/02
      • + +
      • +Alize        ALIZE        +608/01
      • + +
      • +Omega        OMEGA        +618/01
      • + +
      • +Rwandacell   R-CELL       635/10
      • + +
      • +KenCell      KENCELL      +639/03
      • + +
      • +SFR RU       SFR REUNION  647/10
      • + +
      • +CelTel       CELTEL       +650/10
      • +
      + +
    • +New operator added
    • + +
        +
      • +Operator name MNC/MCC
      • + +
      • +ARIA          286/03
      • + +
      • +Macau SMC     455/00
      • + +
      • +HT Macau      455/03
      • + +
      • +NE CELTEL     614/02
      • + +
      • +FI 2G         244/12
      • + +
      • +NTC           250/16
      • + +
      • +FO FT-GSM     288/01
      • + +
      • +SPACETEL      421/02
      • + +
      • +LIPPO TEL     510/08
      • + +
      • +SGP-M1-3GSM   522/04
      • + +
      • +LIBERTIS      628/01
      • + +
      • +SPACETEL BI   642/01
      • +
      + +
    • +Country name changed
    • + +
        +
      • +Old name New name MCC
      • + +
      • +UKR      UA       +255
      • + +
      • +FR       FO       +288
      • + +
      • +MDG      BI       +642
      • +
      + +
    • +New countries added
    • + +
        +
      • +Country name MCC
      • + +
      • +NE           614
      • + +
      • +YE           421
      • +
      + +
    • +Mobile Network Code changed
    • + +
        +
      • +Old code New code Operator
      • + +
      • +338/50   338/05   JM DIGICELL
      • +
      +
    +
+Here are observations from jsp_m: +
    +
  • +no helps in netmonitor
  • + +
  • +no more "Pending" delivery reports (?)
  • +
+V5.29 18-09-01 +
    +
  • +Improved network scanning (Earlier when the phone was out of network coverage +and keys were pressed too fast, in some cases the phone made a reset, because +each key press caused a network search. Now key presses cause a new network +search only once a minute) 
  • + +
  • +Operator list updated
  • + +
      +
    • +Operator name changed
    • + +
        +
      • +Old name  New name MNC/MCC
      • + +
      • +ONE      one      232/05
      • + +
      • +ERA GSM     era    260/02
      • + +
      • +TH WCS    TH ORANGE   520/10
      • + +
      • +Dutchtone  Orange NL    204/20
      • + +
      • +TDK-MOBIL   DK TDC   238/01
      • + +
      • +M.PLUS    BATELCO    426/01
      • + +
      • +CAMNET    MTN CAM    624/01
      • + +
      • +CELLCO      CELLCO GSM  630/04
      • +
      + +
    • +New operators added
    • + +
        +
      • +Operator name    MNC/MCC
      • + +
      • +ORENSOT        250/11
      • + +
      • +VODAFONE    276/02
      • + +
      • +TR AYCELL    286/04
      • + +
      • +CU/C_COM     368/01
      • + +
      • +U-CALL     539/01
      • + +
      • +GAB TELECEL    628/02
      • + +
      • +CELLCO     630/05
      • + +
      • +Digicel     706/02
      • + +
      • +SPACETEL     417/02
      • + +
      • +VUT SMILE    541/01
      • + +
      • +GH-MOBITEL    620/03
      • + +
      • +DIGITEL  515/05
      • + +
      • +ORANGE   520/99
      • + +
      • +ECONET NG    621/20
      • + +
      • +COG LIBERTIS    629/10
      • + +
      • +MOBITEL - TZ    640/02
      • + +
      • +CELTEL TZ   640/05
      • + +
      • +Itineris RUN 647/00
      • + +
      • +F-OMT   647/02
      • + +
      • +Cell C    655/07
      • +
      + +
    • +Country name changed
    • + +
        +
      • +Old name    New name   MCC
      • + +
      • +NIG    NG    255
      • + +
      • +F     REU     647
      • +
      + +
    • +New countries added
    • + +
        +
      • +Country name     MCC
      • + +
      • +CU      368
      • + +
      • +VUT     417
      • +
      + +
    • +Mobile Network Code changed
    • + +
        +
      • +Old code    New code    Operator
      • + +
      • +621/00     621/30     MTN NG
      • + +
      • +634/10    634/01   MobiTel
      • +
      +
    +
+V5.30 +
    +
  • +Improvement to eliminate horizontal black line across the display when +the phone is switched off 
  • + +
  • +Operator list updated 
  • +
+ +
+
In netmonitor (all versions ?) in test +55 you have small type (one 's' too much in last line) in help and +info displayed in first line only +

On some V 5.11 and 5.16 once you have missed the signal, the phone make +difficult to re-sync it, and you must turn off and then on to re-sync. +This is no a bug of this firmware, because there are many 8210 v5.11 and +5.16 that works much-fine +

Another bug (feature ? ;-)): when save Name entry to phonebook in phone's +memory, you see "Saved to phone" display. It has icon from older Nokia +phones (unchanged) - phone with the antenna drawn... +

Bug (all versions ? - tested for 5.25): when send too long ringtone +for phone, in "preview" menu it's cut and played, after saving to location +playes only one note...

8250NMS-3D*#0000#
V3.12 19-01-01 +
V3.08 13-12-00 +

V3.12 +

Improvements in Irda and activating voice dial via on/off button in +HDC-5... +

V3.18 03-04-01 +

Improvements in Irda, SIM Toolkit, OTA calendar notes... +

V3.20 29-05-01 +

Better support for Nokia PC Suite over IrDA +

V5.00 16-09-01

8290NSB-7*#0000#
V5.07 08-08-00 +
V5.06 19-06-00 +
V5.15 30-01-01
8310NHM-7*#0000#
V2.90 08-09-01 +
V3.05 23-09-01 +
V3.07 +
                        +Improvements in voice recorder stability  +
                        +Improvements in SIM card reading stability  +
                        +Improvements in SIM Application toolkit dynamic menu  +
                        +Improvements in SEND USSD  +
                        +Changes to meet some test cases  +

V4.04 +

    +
  • +Call and network management: 
  • + +
      +
    • +Operator name not shown if service provider name has the priority 
    • + +
    • +UCS2 support for service provider name added 
    • + +
    • +CPHS feature: operator name reading from SIM support added 
    • + +
    • +Exception handling for Operator name showing improved 
    • + +
    • +Minor improvements to multi call handling 
    • +
    + +
  • +GPRS: 
  • + +
      +
    • +Handling of GPRS indicators improved 
    • + +
    • +Block Check Sum error while using CS2. Values of the spare bit field are +changed to mach all network implementations 
    • + +
    • +Cell re-selection in case of lost of service 
    • + +
    • +Occasional service drop while Extended BCCH blocks used 
    • + +
    • +MT call failures, while Extended Paging used 
    • + +
    • +Old TLLI deleted too early, causing breaks in data transmission 
    • +
    + +
  • +Phonebook: 
  • + +
      +
    • +Improvements to search functionality 
    • + +
    • +Improvements to caller group logo sending and receiving 
    • + +
    • +Improvements to Service Dialling Numbers 
    • + +
    • +Minor improvements to phone number showing 
    • +
    + +
  • +Messages: 
  • + +
      +
    • +Stability improvements to message erasing and picture message handling 
    • + +
    • +Voice mailbox improvements 
    • +
    + +
  • +Call Register:
  • + +
      +
    • +Lists cleaned if new SIM card used 
    • + +
    • +AoC Currency showing and default limits showing improved 
    • +
    + +
  • +Profiles and settings: 
  • + +
      +
    • +Ringing tone order changed 
    • + +
    • +Improvements to OTA ringing tone handling 
    • + +
    • +Louder alarm tone 
    • + +
    • +Fixed dialling number stability improvements 
    • + +
    • +Help text for fixed dialling numbers added 
    • + +
    • +Hands free indicator didnåt disappear in some cases 
    • + +
    • +Minor improvements to Automatic language selection 
    • +
    + +
  • +Games and calculator: 
  • + +
      +
    • +Snowboard game added 
    • + +
    • +Game tones follow only the games tone setting 
    • + +
    • +Exception handling in high score sending improved 
    • + +
    • +Improvements to lights handling and some text modifications 
    • + +
    • +Minor calculator look&feel improvements 
    • +
    + +
  • +To-do list and calendar: 
  • + +
      +
    • +Minor look&feel To-do-list improvements 
    • + +
    • +Some text and look&feel improvements e.g. current date highlighting 
    • +
    + +
  • +Radio and extras: 
  • + +
      +
    • +Exception handling of radio improved 
    • + +
    • +Font modifications in Countdown timer 
    • + +
    • +Indexing in Voice recordings list improved 
    • + +
    • +Stability improvements to voice recorder alarm support 
    • + +
    • +Voice recognition can be activated only when in idle mode 
    • + +
    • +Exception handling in voice commands and voice recorder improved 
    • +
    + +
  • +Services and SIM toolkit: 
  • + +
      +
    • +Header lines added to services 
    • + +
    • +Improvements to Send USSD functionality 
    • + +
    • +SIM ATK CB download support added 
    • +
    + +
  • +WAP push: 
  • + +
      +
    • +16-bit characters in title corrected and some denial of service vulnerabilities +corrected 
    • + +
    • +Manual login mode Now possible also with GPRS 
    • + +
    • +Screen backlight turned on when username/p@ss word prompt displayed 
    • +
    + +
  • +WAP bookmarks and cookies: 
  • + +
      +
    • +Some denial of service vulnerabilities corrected 
    • + +
    • +Problems with maximum length of bookmark URLås corrected 
    • + +
    • +In certain WAP pages Cookies were causing problems 
    • + +
    • +Over the air (OTA) set-up: Mal formatted set-up messages were causing problems +while viewing the set-up content 
    • + +
    • +WTAI public library: 
    • + +
    • +GPRS PDP Context unnecessarily closed after mobile originated voice call 
    • + +
    • +Voice call establishment from WAP bookmarks corrected 
    • +
    + +
  • +Error messages: 
  • + +
      +
    • +"Unknown abort" messages correctly mapped to descriptive error notes 
    • + +
    • +Two separate error messages displayed next to each other 
    • + +
    • +Viewing business card through WAP: 
    • + +
    • +Icons corrected for WORK and CELL numbers 
    • +
    + +
  • +WML Scripting: 
  • + +
      +
    • +Problems with pressing End key while script were running corrected 
    • + +
    • +WML variables now updated correctly while WML script is running 
    • +
    + +
  • +Other changes: 
  • + +
      +
    • +Support for new languages / market areas added 
    • + +
    • +5 Volt SIM cards blocked by 8310, ref. GSM 11.12 section 4.5. 'SIM card +not supported' text displayed 
    • + +
    • +CPHS support improved 
    • + +
    • +Plug-in HF Car Kit PPH-1 recognition improved 
    • + +
    • +Showing of battery low warning note improved 
    • + +
    • +Several text, font and other minor look&feel improvements
    • + +
    • +Several minor stability improvements 
    • +
    +
+V4.53 +
    +
  • +Call and network management: 
  • + +
      +
    • +Private in Conference call improvement 
    • + +
    • +Speed dial number recognition improvement 
    • + +
    • +AoC improvements 
    • + +
    • +Field strength signal bar configuration changed 
    • + +
    • +"SIM card registration failed" text added in the case when IMSI not found +in HLR 
    • +
    + +
  • +GPRS: 
  • + +
      +
    • +Improvements in inter-SGSN RAU/unexpected N-PDU functionality 
    • + +
    • +Continuous timing advance improvement 
    • + +
    • +Improvements in handling of Extended BCCH 
    • + +
    • +Improvements in combined attach in network mode I 
    • + +
    • +Always online functionality changed: When Always online is selected from +WAP settings and the phone is powered up only GPRS attach is performed +PDF context is made when the user makes WAP over GPRS connection and context +is deactivated when user exists the WAP browser 
    • + +
    • +Recommended PBCCH/PCCCH feature set activated, Nokia has tested the Recommended +PCCCH Feature Set functionality against basic configurations available +in IOT laboratories
    • +
    + +
  • +WAP: 
  • + +
      +
    • +Improvement to OTA bookmarks 
    • + +
    • +Bookmark sending fails when SMS center number is not given in advance 
    • + +
    • +Problems when entering maximum length bookmarks 
    • + +
    • +Improvement to bitmap downloading 
    • + +
    • +WAP over GPRS with manual login improvement 
    • + +
    • +WAP Push 
    • + +
    • +Unicode support added to WAP Push Messages 
    • + +
    • +Push message reception by default ON 
    • + +
    • +GPRS related corrections 
    • + +
    • +Corrections to end-key functionality when having voice call during WAP +browsing 
    • + +
    • +Support for WTAI-call from bookmarks 
    • +
    + +
  • +DATA: 
  • + +
      +
    • +Improvements to AT-command interpreter: ATZ, AT&F, +CGDCONT, +CGQMIN +and +CGQREQ, ATE, AT+CREG, AT*99#, AT&V 
    • + +
    • +Change in handling of GPRS dial-up when CSD dial-up is active 
    • + +
    • +Correction to WAP connection over CSD 
    • + +
    • +Improvement in resetting of CID values 
    • + +
    • +Improvement in V.120 data call 
    • +
    + +
  • +Phonebook: 
  • + +
      +
    • +Improvements when copying entries 
    • + +
    • +Improvements in Pop-up search (mainly in APAC languages) 
    • + +
    • +Improvements when browsing phonebook memory 
    • + +
    • +Hungarian and Slovak alpha order improvements 
    • +
    + +
  • +Games: 
  • + +
      +
    • +Menu shortcuts added to games 
    • + +
    • +Score Sending removed from Snowboard 
    • + +
    • +Minor game functionality improvements 
    • +
    + +
  • +Messages: 
  • + +
      +
    • +Message waiting indicators improvements (CPHS) 
    • + +
    • +Voice mailbox number saving to SIM (CPHS) 
    • + +
    • +Corrections in languages with Unicode characters 
    • + +
    • +Stability and look improvements in SMS editor 
    • + +
    • +Cell broadcast improvement with GPRS Always online 
    • +
    + +
  • +Other changes: 
  • + +
      +
    • +Opening and closing parenthesis correction in Hebrew 
    • + +
    • +Improvements in SIM ATK 
    • + +
    • +Improvements in handling line 2 (ALS) 
    • + +
    • +Voice volume control corrections 
    • + +
    • +Caller Group Ringing Tone correction 
    • + +
    • +Improvements to operator name display 
    • + +
    • +NITZ improvements 
    • +
    +
+
8810NSE-6*#0000#
V3.01 08-07-98 +
V4.03 10-08-98 +
V4.05 26-11-98 +
V5.00 29-09-99 +
V6.02 31-03-00 +
    +
  • +improvements in displaying CB
  • + +
  • +improvements in calendar - non lap year
  • + +
  • +....
  • +
+ +
+
BUG: Some older/all (?) firmware had bug in Calendar in Birthday option: +it it was set to the last day of February on non-leap-years (for example +29.02.2000), calendar will inform about it 1'st March (1.03.2000). Must +use "Reminder" instead of "Birthday".
8850NSM-2*#0000#448901
Look to the info for Nokia 8210 - they have almost identical +firmware (with some details)
8890NSB-6*#0000#
V11.01 14-02-00 +
V12.05 22-05-00  +
V12.07 08-08-00 +
V12.15 21-02-01 +
    +
  • +Improvements to USSD
  • + +
  • +RELEASE COMPLETE message is sent to network to end the USSD dialogue, when +a NULL USSD string is received from UI
  • + +
  • +Releasing USSD dialogue with 'Back' softkey fixed
  • + +
  • +Cell selection improved (Sometimes it took long time for the phone to acquire +the network when the phone was out of coverage for long time)
  • + +
  • +Improvements to IrDA (IrPhonet fixed)
  • + +
  • +Improvements to SIM Application toolkit (handling of Provide Local Information +improved, handling of Setup Call Redial improved)
  • + +
  • +Handling of downloaded ringtone improved
  • + +
  • +Strange characters are not displayed (when the special character screen +was not full, highlighting the last characters caused strange characters +displayed on the screen)
  • + +
  • +Improvement to handling of IR (Left softkey didn't activate IR-link while +incoming data call)
  • + +
  • +Calling Name Presentation (CNAP) supplementary service support added
  • + +
  • +Caller group list feature added
  • + +
  • +Czech and Russian removed from PPM package D
  • + +
  • +New PPM package G created with languages English, German, Czech and Russian
  • +
+V12.20 +
    +
  • +Plug-in HF Car Kit PPH-1 
  • + +
      +
    • +Audio tasks changed. There was incorrect handling of the case when accessory +was off 
    • +
    + +
  • +SIM card 
  • + +
      +
    • +Sometimes there was an 'insert SIM card' error, if connection to SIM were +lost for more than approximately 30 seconds e.g. because of movement of +the battery. Now if last indication from SIM to phone is "SIM removed", +then the phone does not care about the SIM init failed indication 
    • +
    + +
  • +HPLMN 
  • + +
      +
    • +Phone lost service after HPLMN search, because it did not notice the situation, +where only forbidden location areas were found in periodic HPLMN search. +Checking has been modified, when HPLMN is on the list. 
    • +
    + +
  • +Phone reset 
  • + +
      +
    • +When phone was out-of-coverage, excessive searching caused reset. Now searching +mechanism has been modified 
    • +
    + +
  • +Emergency call 
  • + +
      +
    • +Changes in Current country indication. It was not possible to make an emergency +call to a special emergency call number (e.g. 999), after phone was switched +on in a new country, before current country was told to the phone. 
    • +
    + +
  • +Multiparty call 
  • + +
      +
    • +During call clearing multiparty connections were checked. Now if only one +connection in multiparty is found, its multiparty status is cleared 
    • +
    + +
  • +SMS 
  • + +
      +
    • +There was wrong time in SMS report. Pending status has been now changed 
    • + +
    • +Part of SMS-tone in cl@ss 0 message was not heard, because there were two +simultaneous tones at once (SMS message received and note tones). The message +received information note has been changed now into a note without tone 
    • +
    + +
  • +Picture message 
  • + +
      +
    • +Sending picture message note stayed on screen after sending. Sending control +has been changed now 
    • +
    + +
  • +Phonebook 
  • + +
      +
    • +Phone number comparison has been decreased from 10 digits to 7 digits 
    • +
    + +
  • +Calendar 
  • + +
      +
    • +Calendar Item sending via SMS/IR did not work correctly (characters were +lost). The definition of note length has been changed now 
    • +
    + +
  • +Calendar/IR 
  • + +
      +
    • +Year of birth was miscalculated when it was sent via IR, when the year +contained zeroes (e.g. 1970, 2000 etc). Decoding variables has been changed +now 
    • +
    + +
  • +Voice dialling 
  • + +
      +
    • +Voice dialling did not work when headset was connected and the phone was +in sleep mode. Now polling of voice tapping is removed, when headset is +connected 
    • +
    + +
  • +Operator names and wake-up graphics has been updated 
  • + +
  • +Email over SMS -feature added 
  • + +
      +
    • +Possibility to add an email address to up to 50 phone book entries 
    • + +
    • +When you want to send an email, scroll through the phone book to the names +with the @ symbol. This is network dependent service
    • +
    + +
  • +Service menu 
  • + +
      +
    • +Service (TTML browser) main menu removed 
    • +
    +
+
+Back to the top/Na pocz±tek +

+


+
Marcin +Wi±cek (WWW)
+ + + diff --git a/Docs/en_US/gsm/firmware/firm9.htm b/Docs/en_US/gsm/firmware/firm9.htm new file mode 100644 index 0000000..6062665 --- /dev/null +++ b/Docs/en_US/gsm/firmware/firm9.htm @@ -0,0 +1,511 @@ + + + + + + + + + + + Nokia identification & firmware/Identyfikacja i oprogramowanie telefonów Nokia + + + + +
Main page/Strona +g³ówna
+ +
+


Nokia identification & firmware/Identyfikacja +i oprogramowanie telefonów Nokia

+ +

+


+
    +
  1. +Ogólne b³êdy/General bugs
  2. + +
  3. +Ogólne informacje o IMEI/General info about +IMEI
  4. + +
  5. +Czy mogê wgraæ sobie oprogramowanie/Can I download +firmware to my phone ?
  6. + +
  7. +Czy to kosztuje ?/Does it cost ?
  8. + +
  9. +Gdzie tego dokonaæ ?/Where to make it ?
  10. + +
  11. +Jakie s± b³êdy/zmiany w kolejnych wersjach +?/What are bugs/changed things in next versions ?
  12. + +
  13. +Jak zmieniæ wersjê jêzykow±?/How to change +language in phone ?
  14. + +
  15. +U¿yte materia³y/Information sources
  16. +
+ +
+

Here is table describing firmware in various Nokia 9xxx phones +
You can also see table for +
Nokia 1xxx/2xxx, Nokia +3xxx, Nokia 5xxx, Nokia +60xx/61xx, +
Nokia 62xx/63xx/65xx, Nokia +7xxx, Nokia 8xxx, Nokia +9xxx

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Phone (telefon)Model number (Oznaczenie)Firmware version code (kod do sprawdzania wersji oprogramowania)TAC in IMEI (TAC w IMEI)
Communicator 9000RAE-1*#682371158412125#490169
V4.01 15-09-97 +
V4.55 04-02-97 +
+
+
Some older firmware had BUG: When phone received SMS, it didn't display +correctly its' date, if it was after 1.1.2000 +

Some older/all (?) firmware had BUG: in sleep mode after 28.02 change +date change always to 1.03 (not to 29.02 in non-leap-years). Date must +be set manually then.

Communicator 9000iRAE-4*#682371158412125#490169
V6.34 16-09-97 +
V6.51 02-02-98 +
V6.70 15-07-98  +
+
+
Some older/all (?) firmware had BUG: in sleep mode after 28.02 change +date change always to 1.03 (not to 29.02 in non-leap-years). Date must +be set manually then.
Communicator 9000ilGE-9*#682371158412125#010024
V6.34 16-09-97 +
+
+
Some older/all (?) firmware had BUG: in sleep mode after 28.02 change +date change always to 1.03 (not to 29.02 in non-leap-years). Date must +be set manually then.
Communicator 9110RAE-2*#0000#490143, 490543
V3.07 17-01-99 +
V4.01 02-02-99  +
(???)V4.05 19-03-99 +

V4.15: +

(V4.02) In clock application, home contry 'United Kingdom' is shown +completely.  +
(V4.02) Careline numbers updated.  +
(V4.02) Apostrofe to Finnish keyboard.  +
(V4.02) Numbers in French keyboard.  +
(V4.02) Home country list changed.  +
(V4.02) Internet access improvements in some IAPs.  +
(V4.02) Print settings improvements in image printing.  +
(V4.02) Composed tunes can be sent via SMS also if contact selected +from SIM.  +
(V4.02) WWW performance improvements.  +
(V4.02) Keyboard scanning times adjusted.  +
(V4.02) BIOS v2.22  +

V5.01 08-06-99 +

    +
  • +Improvements for audio in car kit use. 
  • + +
  • +Backlight is deactivated when locked device is removed from cradle. 
  • + +
  • +Empty list situation, in list of own numbers-application, now handled correctly. 
  • +
+V5.02 28-08-99 +
V5.06 09-12-99 +
V5.10 06-10-00 +
+
+
After receiving some Smart Messaging SMS in older/all (?) firmware +versions the communicator-side changes to mail-application WITHOUT ANY +SIGN of a received SMS. 
Communicator 9210RAE-3*#0000#   (?)350149 (Finland)
V2.91P 12-03-01 +
V2.97 02-04-01 +
V3.03 25-04-01 +
V3.18 05-06-01 +
V3.54 05-07-01 +
    +
  • +Perbaikan untuk membuka email yang sudah didelete secara lokal
  • + +
  • +Call masuk tidak berbunyi di PDA setelah reboot
  • + +
  • +Perbaikan di bagian contact sehingga bisa menampung banyak nomor telephone, +sebelumnya bisa jadi hang
  • + +
  • +PDA bisa dikunci tanpa password
  • + +
  • +Autolock UNtuk interval "1 minute" and "2 minutes" tidak bekerja
  • + +
  • +PIN di SIM hanya ditanyakan pada telephone di bagian luar tidak di PDA
  • + +
  • +PIN Code diminta 2 kali
  • + +
  • +Aplikasi SMS langsung ditutup setelah mengirim SMS sebagai reply
  • + +
  • +Layar tidak menjadi blank ketika autolock aktif
  • + +
  • +Call masuk tanpa nomor ringtone yang dimainkan hanya Nokia Tune
  • + +
  • +Proses restore berhenti ketika ada call masuk.
  • +
+V3.62: +
    +
  • +Device reset improved (In some cases device did not restart when battery +was removed)
  • + +
  • +Network tone routing improved (When PDA cover was open, all network tones +were not routed correctly to Hands Free Speaker)
  • + +
  • +The User Busy (Engaged) Tone playtime changed (When a call is made to busy +number User Busy Tone playtime is longer)
  • + +
  • +Java Telephone API tests improved
  • + +
  • +SMS alphanumeric address improvement (SMS message sender name is shown +correctly also when name is used as sender instead of number)
  • + +
  • +PDA Telephone displays call even phone is idle (PDA display was sometimes +showing call active even though call ended from phone side)
  • + +
  • +Timer improved (Ocassionally jamming in games reduced by improved timers)
  • +
+V4.13 +
    +
  • +General stability improvements 
  • + +
  • +SIM card detection improvement 
  • + +
  • +Call costs management improvement 
  • + +
  • +PIN code request handling improvement 
  • + +
  • +Volume control was not working in CMT if you got "missed calls" when answering +a call 
  • + +
  • +Call register (recent calls) functionality improved and lists length reduced 
  • + +
  • +Device lock functionality improvement 
  • + +
  • +When Clock alarm was deactivated on PDA side, CMT light was not switched +off 
  • + +
  • +Deactivation of keypad lock produces squares to screen
  • + +
  • +Receiving and saving cl@ss 0 messages improvement
  • + +
  • +Messages were able to sent to number in Tel field (not only Tel GSM) 
  • + +
  • +Memory management improvement 
  • + +
  • +Clock Time management improvement 
  • + +
  • +Keypad lock functionality improvement 
  • + +
  • +Power reset management improvement 
  • + +
  • +Speed dialling functionality improvement 
  • + +
  • +Call divert indicator behaviour improvement 
  • + +
  • +Ringing tone functionality improvement 
  • + +
  • +Charging functionality improvement 
  • + +
  • +SIM lock functionality improvement 
  • + +
  • +Formatting + application installation behaviour improvement 
  • + +
  • +ALS: Activating/Deactivating call waiting for Line2 correction 
  • + +
  • +Backup restore functionality to/from memory card improvement 
  • + +
  • +World clock time zones updated 
  • + +
  • +FDN location numbers modified 
  • + +
  • +Spanish version: Event entries can now be cleared from log 
  • + +
  • +Now all stored numbers on SIM card are displayed 
  • + +
  • +UI texts (incl. Notes and error messages and help texts) updated 
  • + +
  • +Incoming SMS with sender number is now displayed correctly 
  • + +
  • +Voice mailbox list functionality improvement 
  • + +
  • +Line Selection functionality improvement 
  • + +
  • +Turkish special character conversion in Mail sending improvement 
  • + +
  • +Copy message centre number from SIM improvement 
  • + +
  • +Self made profile functionality improvement (in some situations you were +not able to activate or delete self made profile) 
  • + +
  • +Nokia Tune is not played in Meeting profile anymore 
  • + +
  • +'Conference commands' button not anymore dimmed when calling to busy number 
  • + +
  • +Phone number max length set now correctly when response is received from +SIM 
  • + +
  • +WAP: Image loading improvement 
  • + +
  • +WWW: default value for "Empty history on exit" changed to "Yes" 
  • + +
  • +WAP Browser accepts now also source port 66 
  • + +
  • +Printing: Page setup improvement 
  • + +
  • +Functionality of short message with alphanumeric address in From field +improvement 
  • + +
  • +WAP mail functionality improvement 
  • + +
  • +SMS functionality improved (includes several minor improvements e.g. Reading +SIM messages, deleting concatenated SMS handled better, SMS sending from +outbox etc.) 
  • + +
  • +Web: In some situations the file download was done twice, now it is done +only once 
  • + +
  • +WAP OTA message settings can now be saved 
  • + +
  • +WAP: Prefix "https://" URL handling improvement 
  • + +
  • +Calendar booking functionality improved 
  • + +
  • +Character conversion between GSM alphabet and Unicode improvement 
  • + +
  • +Email: Move and copy & some other functionality in IMAP remote mailbox +improvement 
  • + +
  • +PPP call-back idle timeout is increased 
  • + +
  • +Word Processor does not save unnecessary extra empty document anymore 
  • + +
  • +Memory handling improvement 
  • + +
  • +WAP OTA Setting Home page is now using the correct access point 
  • + +
  • +Creating folders in remote IMAP4 inbox is now possible 
  • + +
  • +The maximum size per message field is not applicable, when "Get mail" is +defined to fetch "message titles and stay online". The option is now dimmed +in this situation 
  • + +
  • +WAP: Scandinavian character support in WAP mail sending improvement 
  • + +
  • +WEB/PPP: Authentication to PPP-servers improved
  • + +
  • +Mail: .html attachment handling improvement 
  • + +
  • +Calendar: Alarms adjusted now correctly when changing from set time "No" +to set time "Yes" 
  • + +
  • +Ending of data call handling improvement 
  • +
+Language variants are supported according to following table: Europe NA +English, Europe NB German, Europe NS Finnish, Europe NO Orange, Europe +NX Scandinavian ( English ), Europe NH German ALS, Europe NC French, Europe +NF Spanish, Europe NR Italian, Europe NE Swedish, Europe NM Danish, Europe +NN Norwegian, Europe NG Portuguese, Europe NT Turkish, Europe NP Dutch, +Europe NV Hungarian, Europe NQ Czech, Europe NJ Polish, Europe NVF Vodafone, +Europe NK Movistar, Europe ND TIM, APAC NU English  +

This release requires also that the memory card application software +be updated, before using the 9210 with the new MCU software upgrade.  +

You should not use older sw version applications (3.18, 3.54 or 3.62) +from the sales package CD-ROM.  +

These old application versions will not work correctly with this new +4.13 SW version and you should delete any old backup that you might have +in your PC, and not restore to the updated 9210 as this will effectively +"downgrade" the memory card applications.  +

You should also make a new backup of the upgraded 9210 device, and upgraded +memory card to the PC.  +

All_memory_card_data.SIS file and the new version of PC Suite V1.20 +is also available from Forum Nokia web page http://www.forum.nokia.com

Card Phone 1.0RPE-1
Card Phone 2.0RPM-1449144
+Back to the top/Na pocz±tek +

+


+
Marcin +Wi±cek (WWW)
+ + + diff --git a/Docs/en_US/gsm/firmware/firmware.htm b/Docs/en_US/gsm/firmware/firmware.htm new file mode 100644 index 0000000..8f24796 --- /dev/null +++ b/Docs/en_US/gsm/firmware/firmware.htm @@ -0,0 +1,704 @@ + + + + + + + + + + + Nokia identification & firmware/Identyfikacja i oprogramowanie telefonów Nokia + + + + +
Main page/Strona +g³ówna
+ +
+


Nokia identification & firmware/Identyfikacja +i oprogramowanie telefonów Nokia

+ +

+


+
    +
  1. +Ogólne b³êdy/General bugs
  2. + +
  3. +Ogólne informacje o IMEI/General info about IMEI
  4. + +
  5. +Czy mogê wgraæ sobie oprogramowanie/Can I download firmware +to my phone ?
  6. + +
  7. +Czy to kosztuje ?/Does it cost ?
  8. + +
  9. +Gdzie tego dokonaæ ?/Where to make it ?
  10. + +
  11. +Jakie s± b³êdy/zmiany w kolejnych wersjach ?/What are bugs/changed +things in next versions ?
  12. + +
  13. +Jak zmieniæ wersjê jêzykow±?/How to change language in +phone ?
  14. + +
  15. +U¿yte materia³y/Information sources
  16. +
+ +
+
First: what is firmware ? It's program (like in computer - in fact +phone is small computer) saved somewhere inside phone. +

Na pocz±tku: co to jest firmware ? Jest to program  (jak w komputerze +- w³a¶ciwie telefon to taki ma³y komputer) zapisany gdzie¶ w ¶rodku telefonu. +

On this page you can find information about: +

    +
  • +model numbers for Nokia phones
  • + +
  • +codes to see their firmware versions
  • + +
  • +different firmware revisions and changes among them (I think, it will help +to answer, if firmware upgrade for your phone will give you something and +correct some bugs).
  • + +
  • +description for IMEI. For example TAC numbers (first 6 digits of IMEI) +given for various Nokia phones (if I will have them, I will be able to +tell you your phone model from its IMEI).
  • +
+Na tej stronie znajdziesz informacje o: +
    +
  • +oznaczeniach Nokii
  • + +
  • +kodach pozwalaj±cych sprawdziæ ich wersje oprogramowania
  • + +
  • +jakie s± wersje ich oprogramowania i czym siê ró¿ni± (mam nadziejê, ¿e +pomo¿e to odpowiedzieæ, czy upgrade oprogramowania w Twoim telefonie da +co¶ i czy np. poprawi jakie¶ dokuczliwe b³êdy)
  • + +
  • +informacje o IMEI telefonu.. Przyk³adowo numery TAC (pierwsze 6 cyfr IMEI) +nadawane ró¿nym modelom (je¿eli je bêdê mia³, bêdê móg³ podaæ model telefonu +wy³±cznie na podstawie jego IMEI).
  • +
+If you want to add or correct something to this list, please write +me (for example: +
    +
  1. +when you changed firmware in your phone and noticed some changes, inform +me about them and write, what is phone model, old and new firmware version
  2. + +
  3. +if you have access to two phones with different firmware and notice any +differences, inform me about them and write, what is phone models, and +their firmware versions).
  4. +
+Je¿eli masz co¶ dodania do tej listy albo znalaz³e¶(a¶) na niej b³êdy, +proszê do mnie napisaæ w tej +sprawie (przyk³adowo: +
    +
  1. +je¿eli wymieni³e¶ oprogramowanie w swoim telefonie i zauwa¿y³e¶ jakie¶ +zmiany, napisz mi o nich podaj±c równie¿ model telefonu, star± i now± wersjê +oprogramowania
  2. + +
  3. +je¿eli masz dostêp do dwóch telefonów z ró¿nym oprogramowaniem i zauwa¿y³e¶ +ró¿nice, napisz mi o nich podaj±c równie¿ model telefonów, ich wersjê oprogramowania).
  4. +
+Informacja dla polskich czytelników tej strony: mia³a ona byæ w za³o¿eniu +i po polsku i po angielsku. Niestety, od którego¶ momentu nie by³em w stanie +tworzyæ lepszego czy gorszego jej t³umaczenia i w obecnej chwili czê¶æ +przet³umaczon± pozostawi³em, a reszta jest wstawiana TYLKO po angielsku. +

I want also to thank Tomasz Stêpski +(admin of newsgroup server news://212.160.228.194) +for special help in creating this page...and some other people too (Martin +F. Schlögl, jsp_m, +marOOn, +etc.) :-))) +

Back to the top/Na pocz±tek +

1. Ogólne +b³êdy/General bugs +
+


+

Here are some bugs (or features), which can exist in (almost) ALL new +models: +

    +
  • +DIVERTS: "Call divert  if not available" (Menu 5-5): "Check +status" is missing. It's not bug. It's because it's combined diverting +(N6210, 7110...)
  • + +
  • +some SMS saved on SIM can look different, when read them from phone's menu +(checked for N5110, 6150). Example (mygnokii can be download from my www): +try to use "mygnokii --savesms "test" --bug < file" and read +saved SMS
  • + +
  • +char 0x00, 0x00 in Unicode SMS hides SMS contents, when try to read it +from phone's menu (feature ?)
  • + +
  • +char 0x00, 0x01 in Unicode SMS enables/disables blinking of chars in SMS, +when try to read it from phone's menu (feature ?). Confirmed for N51xx, +61xx, 8210, 3210. Doesn't blink in N7110 (4.77), but can edit them there.
  • + +
  • +after receiving some SMS phone enables light/vibra (like after receiving +SMS), but doesn't display anything. Example (mygnokii can be download from +my www): try to use "mygnokii --savesms "test" --voidsms < file" +and forward it to phone.
  • + +
  • +SMS delivery reports are received twice: first ""... at work"", later a +second ""... transmitted"
  • + +
    Solution: the SMS-center number used for sending should be the same +than the one, that is sending back the delivery reports. +
  • +When have unreaded messages (let's say 4 SMS and one delivery report) and +you will receive next one, you will see "6 messages received", not "1 message +received". Changed for last models like 6210, ...
  • + +
  • +PL: s³owa "Og³usz" (w modelach z zielon± i czerwon± s³uchawk±) i komunikat +"Mikrofon wy³±czon". Wystêpuje nawet w 3310 wersja 4.45 i 8210 wersja 5.25 +(sprawdzone przez Artura Heise)
  • + +
  • +After deactivating netmonitor using 241 code, you have sometimes to reset +phone. In other case Up and Down arrows don't work...
  • + +
  • +When you set such ID for ringtone in caller group, which doesn't exist +in phone, you can't set it (ringtone) from phone's menu... Checked for +6210 (5.17) and 8210 (info from jsp_m).
  • + +
  • +Try few times, because sometimes doesn't work:
  • + +
      +
    1. +unlock keypad
    2. + +
    3. +press Power button (should go to the Profiles menu)
    4. + +
    5. +press Power button double
    6. + +
    7. +scroll menu to "Switch off" (or similiar) using Down key
    8. + +
    9. +wait second or longer
    10. + +
    11. +when press Power button now, phone will jump always to "Switch off" (not +go into next position)
    12. +
    +
+And some other tips: +
    +
  • +when want to delete SMS Centre Number (you don't want to see it from phone's +menu), write "*" inside. Tested for N5110, 3310
  • + +
  • +when you put "#" char as SMS Centre Number, phone will replace it by "3". +Tested for N5110, 3310
  • + +
  • +(in models with two functions keys, for example 6110): when you see network +name/logo, press "Menu" key longer (about 2 secs.) - you will enter to +menu available during calls
  • + +
  • +when you will see list of phonebook entries and press "#" key, will see +number displayed with large font (tested for N5110, 3310, 6150).
  • + +
  • +when you're in phone's menu and press "C" key (go higher level), when press +fast "#" key, keypad will be blocked, as if you pressed "Menu" and "#" +combination (tested for N5110, 3310)
  • + +
  • +(in phones with Navi key, for example N5110, 3310): when edit SMS and don't +want to lost it/don't want to send or save, press "Options" (you will see +available options), then "C" for longer time. Contents of SMS will be in +memory (to the moment, when you disable phone) and you will be able to +return to it.
  • + +
  • +when send to phone DMTF sequence (tested for N5110) via cable and sequence +starts from "w" (wait), phone doesn't display it (first "w" in sequence), +but display menu for sending the rest of sequence in the phone. In N6150 +waits a moments before sending sequence...
  • +
+I kilka interesuj±cych rzeczy: +
    +
  • +W nowych modelach, kiedy ustawisz sygna³ wiadomo¶ci SMS na "Narastaj±cy", +telefon bêdzie wygrywa³ komunikat "Connecting people" alfabetem Morse'a. +Przy sygnale "Specjalny" jest to "SMS"
  • +
+And some interesting things: +
    +
  • +.In new models, when you set SMS message tone to "Ascending" ('Long & +Loud' with older firmware), phone plays "Connecting people" with Morse +alphabet. When select "Special", "SMS" is played.
  • +
+Back to the top/Na pocz±tek +

2. Ogólne +informacje o IMEI/General info about IMEI +


+

IMEI is written as: +

XXXXXX/XX/XXXXXX/X +
TAC/FAC/SNR/SP +

where: +

TAC (Type Approval Code): +
first two digits of are for Nokia: 35, 44, 49 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
last four digitsmodel
8890,9206,9314,93403210
05205110
92105130
05236110
30026150
9214, 9337, 95976210
8904, 88957110
8902, 93068210
05258810
89018850
00038890
+ +

FAC (Final Assembly Code) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
FACCountry
07, 08, 20Germany
10, 70Finland
19, 40UK
30Korea
67USA
80China
+ +

Back to the top/Na pocz±tek +

3. Czy mogê wgraæ +sobie oprogramowanie/Can I download firmware to my phone ? +
+


+

Firmware is saved in flash memory, not in EEPROM, like many people think. +In EEPROM you have configuration for phone (in almost all phones) - downloadable +logos, ringtones, etc. and generally it's very small - 8, 16, 32 kB. Flash +memory is rather big (for example, 8 MB). You have full firmware there +and (in some models) part of configuration. +

From long time there is available on the Dejan's +page flasher (soft + schematics for interface) and it allows to change +flash, but not at all. Because not everything is decoded (all checksums, +etc.), this flasher will allow to: +

    +
  1. +change part of flash (for example, used for such modyifing firmware, that +phone doesn't read status of simlock and can work with each SIM card)
  2. + +
  3. +repairing some CONTACT SERVICES
  4. +
+You can't (?) change firmware version to newer (phone doesn't log in to +network) and for it you must go to the next point to see, where to change +it ;-). Additionaly, using this flasher can be illegal (especially with +simlocks). +

Back to the top/Na pocz±tek +

4. Czy to kosztuje +?/Does it cost ? +
+


+

When you have quarantie for your phone, it should be done for free by +Nokia service. Some services want additionaly info from you about found +bugs (generally: explaining, why you want to make it) - look into my page +and you will know everything ;-) +

After quarantie you must pay for it...or (only in some services) if +will be done by free, if you will show them bug... +

Back to the top/Na pocz±tek +

5. Gdzie tego dokonaæ +?/Where to make it ? +
+


+

Ask your operator... +

Back to the top/Na pocz±tek +

6. What are +bugs/changed things in next versions ?/Jakie s± b³êdy/zmiany w kolejnych +wersjach ? +
+


+

Some info about my description, which is available on subpages: +

    +
  • +when I write firmware version before text (for example "(V 3.41)") - something +is changed, when compare to this firmware version (here 3.41)
  • + +
  • +when I write "(OLDER ?)" before text - this bug/info, etc. can be connected +with older firmware versions, here is confirmed
  • + +
  • +when I write "(NEWER TOO ?)" before text - this bug/info, etc. wasn't checked +in newer versions
  • +
+Kilka s³ów o opisie dostêpnym na podstronach: +
    +
  • +je¿eli piszê wersjê oprogramowania przed tekstem (np. "(V 3.41)") - co¶ +zosta³o zmienione w stosunku do podanej wersji oprogramowania.
  • + +
  • +je¿eli piszê "(STARSZE ?)" przed tekstem - informacja, b³±d, itp. mo¿e +byæ równie¿ w starszych wersjach, tutaj za¶ jest potwierdzona
  • + +
  • +je¿eli piszê "(NOWSZE TE¯ ?)" przed tekstem - informacja, b³±d, itp. nie +by³a sprawdzona w nowszych wersjach
  • +
+Please also notice, that changes between the same firmware versions in +different models are not the same. +

Please find your model and click to see everything: +

+Back to the top/Na pocz±tek +

7. Jak zmieniæ wersjê jêzykow±?/How to +change language in phone ? +
+


+

You have to change in phone part of firmware... From some time it's +possible to do it with Dejan flasher. +

Back to the top/Na pocz±tek +

8. U¿yte materia³y/Information +sources +
+


+

Niektóre u¿yte materia³y pochodz± ze stron: +
Some used materials are from WWW pages: +

    +
  1. +http://www.webit.com/tw/nokia.shtml
  2. + +
  3. +http://vzone.virgin.net/neil.hobbs/Nokia/Phone.htm
  4. + +
  5. +http://www.worldofcellularsecrets.com/free.htm
  6. + +
  7. +http://www.telephone.ru/faq/nokia6100/
  8. + +
  9. +http://gsm.erc.bc.ca/553software.html
  10. + +
  11. +http://www.users.bigpond.com/Scotth/
  12. + +
  13. +http://www.yaws.dk/communicator/faq/imei/home.html
  14. + +
  15. +http://www.yaws.dk/communicator/faq/versions/phone.html
  16. + +
  17. +http://www.nokiainfo.f2s.com/software_versions.html +(12-07-2001)
  18. + +
  19. +www.vosper.prv.pl
  20. + +
  21. +http://www.unofficial7110.co.uk/bugs/bugs.htm
  22. + +
  23. +http://slashdot.org/articles/00/09/03/1515202.shtml
  24. + +
  25. +http://www.arcx.com/sites/6190Tips.htm
  26. + +
  27. +http://www.wapterror.de/index.shtml
  28. + +
  29. +http://www.wapterror.de/6210.html
  30. + +
  31. +http://bugzilla.punknet.cz/long_list.cgi
  32. + +
  33. +http://www.artie.force9.co.uk/8850/about.htm
  34. + +
  35. +http://www.fponticelli.com/bug8210.html
  36. + +
  37. +http://members.aon.at/mfs/ (14-01-2002)
  38. + +
  39. +http://www.2thumbswap.com/products/secrets/nokia_8110.htm
  40. + +
  41. +http://www.nokia4u.cz/Nokia/firmware/fw-zmeny.htm +(12-07-2001)
  42. + +
  43. +http://www.indocell.net/id37.htm
  44. + +
  45. +http://www.ponticellinks.com/bug3330.html
  46. + +
  47. +http://www.flash.net.ph/cgi-bin/ikonboard/forums.cgi?forum=4&show=30 +(21-02-02)
  48. + +
  49. +http://www.xinfo.net
  50. +
+Back to the top/Na pocz±tek +

+


+
Marcin +Wi±cek (WWW) +
Ostatnia aktualizacja: 24 luty 2002/ Last modification: +24 February 2002
+ + + diff --git a/Docs/en_US/gsm/irda/irda.htm b/Docs/en_US/gsm/irda/irda.htm new file mode 100644 index 0000000..ebd343f --- /dev/null +++ b/Docs/en_US/gsm/irda/irda.htm @@ -0,0 +1,25 @@ + + + + + IrDA FAQ + + + + + +

Main page

+
IRDA FAQ
+ +


+ +

How to make iRda port for computer... + +

How to configure gnokii for IrDa connection ?
+


+ +

See file describing configuration of gnokii + + + + diff --git a/Docs/en_US/gsm/logos/logos.htm b/Docs/en_US/gsm/logos/logos.htm new file mode 100644 index 0000000..5e29c4f --- /dev/null +++ b/Docs/en_US/gsm/logos/logos.htm @@ -0,0 +1,38 @@ + + + + + Logos FAQ + + + + + +

Main page

+
Logos FAQ
+ +


+ +

Types of logos
+


+ +

Nokia phones can support: +

+

    +
  • startup logo - picture displayed, when phone is enabled. +In some models (3210 5.27 and newer and 3310) it's animated. You can +disable it (and download your own static), but I don't know, if it's possible +to return to animated... +
  • +
  • operator logo - picture displayed instead of operator name. +Logo can be assigned ONLY to one operator (when you will change it, +it will disappear; when return to this network, you will see it again)
  • +
  • caller logo - you can assign names from phonebook to something called +caller group. When someboday for this group will call to you, you can +see picture (caller logo) and name...
  • +
  • Picture Image - image, which in newer phones (3310, ...) can be +displayed in idle mode (Nokia calls it screen saver)
  • +
+ + + diff --git a/Docs/en_US/gsm/netmon/3210_09.gif b/Docs/en_US/gsm/netmon/3210_09.gif new file mode 100644 index 0000000000000000000000000000000000000000..afa7db091c528324bf249bdd53da513f02a7b115 GIT binary patch literal 319 zcmV-F0l@x8Nk%w1VN?Jx0Du4h00030|Nkri0000~05AXm0{)DTsmtvT1DLVeixZ`} z`@aF-NLCY9rm7~cZh5})oSiZ4wXlwN{D|t+R6(1;rZXOIFk-S5T1udzVCn~YN;%Q# z6bp17xK--+#%x}-Ub0t_4zI^%x0Oy5OWXA%;+~_oQKpJ`)cGWo62%~`dE7g zBKH^SJND=)%*iYbM_L7!E4r**ESbHqJ!nhgl6JG&T%tGz3()(+g(952s46cQea zflmvGK!M0&3Hxx#vgL@to1^+BqC&}TCvOJ z6v_2*vBGH0>*I-X`rHe?1-=rDIQXyYcxlGr8J*ryO? znN${s!KjvpS*MlR^l(U1R0?9ci5jWuYWNz9C`(&edz+=g>F32tngZrGYD=k^YRmYh zqiEH7TqOL5oa|d!y^PI^qoF7`{QG>hBfZ_|ea#&%Oq`qhm#n^NJ$~gr@3|M>tZi?$ z>zt1izBT*Aq0?imftGUk_yyE=ikqW%2kVijDB%-9L}pNcQTqr84>cILN}4<=2_eF7 zD8;EP)-vV9nVC3-T!?FAn@>C!vQ)Ke=bbPGOInH{^xaFNj$DQ^*R&f(pg&&~0028% CW3Gz; literal 0 HcmV?d00001 diff --git a/Docs/en_US/gsm/netmon/3210_10.gif b/Docs/en_US/gsm/netmon/3210_10.gif new file mode 100644 index 0000000000000000000000000000000000000000..5cf7fe5c5f164cd42bcc0195501b9faa111e03a8 GIT binary patch literal 385 zcmV-{0e=2RNk%w1VN?Jx0Du4h00030|Nkri0000~05AXm0{)DTsmtxp0622Oi?c@6 z$nb6ANQPfXrmAC3=nBUzXvMaQcK6ONm38v*UN|4ng-j4(%aT!vtm%5PCnt)%wq~az z&6At{gbHGpmIPnbzx3Jk{Wd8P-5I0?OT8~{I^R`O_V6Ycr>ED^$M=V3H)mLuWM-&X zS?R$h*fhmKIC&{~m`CwA3K@wfD%UuwNw*Xh_qUmv>iD{rSULk$inxnQMnx=gTZ|l$ zybN*7% + + + + + + + + + NetMonitor in Nokia phones (1/7) + + + + + +

Main page

+
+
NetMonitor in Nokia phones (1/7) + +

[Part 1][Part 2][Part 3][Part 4][Part 5][Part 6][Part 7] + +

+ +
+ +

I’d like to write, that I’m not professionally connected with any +cellular network or phone company. This NetMonitor guide is based on many +different materials and exists thanks to the support of many different people (see +Information sources). This is a guide made by user. It may lack description +to some functions or contain errors and mistakes (resulting from wrong translation or my ignorance) and some strange +expressions. Many questions remain unanswered. Furthermore, this page is still "under construction". Encouraging, isn’t it? +But that’s the (sad) true: Nokia doesn’t make appropriate materials available... +I can only assure you, that I do my best to make this NetMonitor description as reliable and complete as possible. + +

In this moment on my homepage you can also find Polish version of this FAQ. +English language version was created with help of Michal Jerz - author of +excellent page Nokia 9110 World: http://n9k.ats.pl. + +

+I’ll be very thankful for any help in creating and maintaining this guide - please +send +me any information (or URLs where I can find it), suggestions and remarks. My FAQ currently concerns +Nokia 2110i, 2120, 2140, 2160, 3110, 3210, 3310, 5110, 5130, 5160, 5190, 6110, 6130, 6150, 6160, 6185/6188, 6210, 6250, 7110, 8210, 8810 and 9110 +series of phones. If you have NetMonitor enabled in any other model +(for example in 2110i, 6090, 8xxx, 9000), please contact me +(to let me know about the differences and possible new tests). + + +

+Herewith I inform, that I don’t bear any responsibility for any damages and other consequences caused by applying following +information (you use it on your own responsibility) ! + + +


+ + + +
    +
  1. What is it ?
  2. +
  3. Do I need it ?
  4. +
  5. Does my phone use more power with NetMonitor enabled ?
  6. +
  7. How to activate it ?
  8. +
  9. Which NetMonitor version can be activated in my phone ?
  10. +
  11. Does NetMonitor activation void warranty ?
  12. +
  13. NetMonitor menu in my phone has different number than 10. Is it normal ?
  14. +
  15. NetMonitor menu in my phone has 11 number, hovewer previous position has 9 number. Is it normal ?
  16. +
  17. How to use it ?
  18. +
  19. Can I damage my phone ?
  20. +
  21. Glossary
  22. +
  23. Description of the individual tests
  24. +
  25. You can also use a program...
  26. +
  27. Can I use NetMonitor without SIM card inserted, without PIN number entered or when SIM card is not active ?
  28. +
  29. How can I disable NetMonitor ?
  30. +
  31. Do I need to disable NetMonitor before sending my phone to the service ?
  32. +
  33. Is it possible to re-activate NetMonitor after disabling it ?
  34. +
  35. Is NetMonitor available in analog Nokia phones ?
  36. +
  37. Does NetMonitor allow to use phone like broadcast station ?
  38. +
  39. I don't have all described tests in my phone. Why ? Can I increase their number ?
  40. +
  41. Does NetMonitor allow to identify place, where is my interlocutor ?
  42. +
  43. Does NetMonitor allow to identify place, where am I ?
  44. +
  45. What are NetMonitor codes ?
  46. +
  47. Is it the truth, that in phones with additional hardware changing frequency band NetMonitor doesn't work correct ?
  48. +
  49. Where can I find description of FBUS/MBUS protocol and commands connected with NetMonitor ?
  50. +
  51. I have non existing networks on the list of forbidden networks...
  52. +
  53. How to check frequency band (900 or 1800 Mhz), where phone work in this moment ?
  54. +
  55. Can I use DLR-2/DLR-3 cables for activating netmonitor ?
  56. +
  57. Can I activate netmonitor using Init File Editor (Nokia 9110) ?
  58. +
  59. Can I force phone to use one frequency band (900 or 1800 Mhz) only ?
  60. +
  61. How to change settings in tests ?
  62. +
  63. My phone has very short snandby time - it is possible to see the reason of it ?
  64. +
  65. Is netmonitor available in English version only ?
  66. +
  67. Information sources
  68. +
  69. Additional information
  70. +
  71. Does using/activating netmonitor cost anything ?
  72. +
  73. Does using netmonitor is legall ?
  74. +
  75. Which entries on SIM card are used in netmonitor tests ?
  76. +
  77. Can I activate netmonitor in 3310 using soft working with 3210 ?
  78. +
  79. After activating netmonitor/BTS TEST my phone can't find network...
  80. +
  81. Netmonitor shows different battery capacity than info on it...
  82. +
+
+
+ +

1. What is it ?
+


+ +

Net Monitor is just a special mode, which – when activated – shows different information about the network and about +phone modules, SIM card, etc. After activation your phone will usually display a new, additional menu containing +strange and constantly changing letters and digits. There are no standards here – each phone shows different data +and there are different methods of activation (my description concerns NetMonitor mode in Nokia phones – if you have some +other phone, you have to go somewhere else). I can even say, that NetMonitor (in some form) can be found in practically +each present mobile phone (because it is unprofitable for the producers to make two separate software versions – +with and without NetMonitor). Here you can find some URLs to the pages describing activation and/or individual +NetMonitor menus in other phones: + +

+

+ +

Other types: try searching on the links page +www.mobilserver.com/Phone_info/. + + +

Back to the top + + +

2. Do I need it ?
+


+ +

"Normal" users surely don’t need any NetMonitor, because simply most of the data included there can be of +any interest and use only for specialists (who can find out almost everything about the network). You also can: + +

+

    +
  • feel better and be able to brag that your phone has such a BBIIIIIGGGGGG choice of different options
  • +
  • observe different network and phone parameters (I tried to explain their meaning in my description) and find out +how cellular network works
  • +
  • affect some functions in your phone and sometimes make your life easier (using these new options) – +I did my best to point at many useful NetMonitor applications
  • +
+ +

If you still think, that you don’t need it, read other pages concerning Nokia phones. + + +

Back to the top + + +

3. Does my phone use more power with NetMonitor enabled ?
+


+ +

I’d say: NO. Each phone monitors the network even when there is no NetMonitor menu active. + +

But why some users say, that they have to charge their batteries more often after enabling NetMonitor? It is easy to explain: +they frequently switch from one test to another (some people cannot stop ;-) and do it habitually) and the phone after each +key press (by default) turns on the light (and uses much power - see test 23). +This can be partially cured by using test 18. Additionally, +some tests (for example +test 17 or test 19) can put +your phone in a state of constant network searching (which drains the battery). + +

To recap, NetMonitor activation itself doesn’t affect power consumption. It can be only changed by some conscious +user operations... + + +

Back to the top + + +

4. How to activate it ?
+


+ +

You can do it in three ways: + +

+

    +
  1. by connecting your phone to the computer with a cable (in 3210 it has to be connected inside the casing) and using +appropriate software (RECOMMENDED !) working in: + +

    +

    + +

    All above programs work with majority of Nokia phones with letter "S" in middle of codename +(for example, 5110, 5130, 5190, 6110, 6130, 6150, 3210 series). With Nokia 7110 (NSE-5) over DAU-9P cable +(from Nokia 5xxx/6xxx series phones) +worked Pc-Locals and Logo Manager only. +In Nokia 9110 (RAE-2) NetMonitor can be enabled +with all above programs working with MBUS cable - Logo Manager, Pc-Locals or +Nokia Wrench. + +

    + + + + + + +
    When you want to check codename of your phone, try to use one of these codes: +*#0000#, *#9999#, *#3110#, *#3810#, *#5190#, +*#6190#, *#8110#, *#837#, *#170602112302# or +*#682371158412125# (for more information about phone identification click +here). +If phone will display something, codename will be written in 3'rd line of screen (it will be something like NSE-1).
    +

    + +

  2. by direct changing the contents of EEPROM +(Electrically Erasable and Programmable Read-Only Memory). +This method requires opening your phone and leaves visible traces inside it. +I DON’T RECOMMEND THIS METHOD! +But if you want to do it: + +

    +

    +

    +

  3. + +
  4. +using special menu, which allow to programm NAM code (in some analog phones only +- like Nokia 2160, 2120, 5160, 6160, 6185 and 6188): +

    +

      +
    • use *3001#12345# code (sometimes pressing additionaly Menu is required; +some sources write, that you have to write security code instead of 12345) +to enter this menu
    • +
    • set "Field Test Mode" to "On"/"Enable"
    • +
    • restart your phone
    • +
    +

    +

  5. + +
  6. entering Menu 3 3 (according to http://www.ras.ru/~sashka/nokia/550/ +in Nokia 550) and setting it to "ext. test". Later you should restart phone (?)
  7. + +
+ +

You can also: + +

+

    +
  • ask people from GSM newsgroups to do it for you
  • +
  • commission it to some specialized company
  • +
+ +

I don’t know details about NetMonitor activation in 1610, 2110, 3110, 8110i, 8810 and 9000 series. +I don’t know exactly which programs to use (I heard only, that probably version 0.6 of PC-Locals allows to make it in older models) +or how to modify EEPROM memory (if you know anything about that, please +contact me). +In this moment I can send you to: + +

+ +

only. + +

I also heard, that in some copies of Nokia 6110 and 5110 phones it is possible to activate NetMonitor by a key combination +(by pressing Menu key and typing 10 – this should work even when NetMonitor menu is not visible). + +

+ + + + + + +
+If you don’t know how to activate NetMonitor, you better ask some more experienced person to do it for you +(you can damage your phone during this operation) ! +!
+ +

I’d like to draw your attention to one detail - in Nokia phones you just activate the monitor and not upload it (it is always +in your phone – described methods just reveal it as an additional menu). + + +

Back to the top + + +

5. Which NetMonitor version can be activated in my phone ?
+


+ +

Each program described in previous point allows you to activate one of two NetMonitor versions: + +

+

    +
  1. limited, including tests from 1 to 19 (concerning cellular network only). This version is usually called +"Field Test" or "Operator field tests" (or you have to enter 242 code to activate it)
  2. + +
  3. +full, also including phone (and sometimes SIM card) tests. It is called "Engineering" (or "R&D field tests") and its activation +code is 243.
  4. +
+ +

+ + + + + + +
+I recommend you enable full version of NetMonitor – you can always replace it with a limited version +(by choosing test 242 in your phone). It doesn’t work in reverse direction (you cannot activate full menu from +within the phone – it doesn’t accept test 243 when limited version is active; of course you can still use +methods described in previous point). +
+ + +

Back to the top + + +

6. Does NetMonitor activation void warranty ?
+


+ +

The method of re-programming EEPROM memory is connected with opening the casing and making modifications in your +phone (which leaves many traces, scratches etc. and voids warranty). + +

However, these problems don’t appear (you don't have to be affraid) when using one of the described programs +or code (but I can be wrong . there are opinions that this method leaves a trace in phone.s memory, too)... + +

Of course, before getting phone to service, is better to +deactivate NetMonitor. +Sometimes, for example, when phone's energy system is damaged, it could be impossible - +you can have some problems then (some of people working in service can think, that +you broke warranty - it depends on concrete people).. + + +

Back to the top + + +

7. NetMonitor menu in my phone has different number than 10. Is it normal ?
+


+ +

+ + +
+
+NetMonitor menu in Nokia 3210 +NetMonitor menu in Nokia 3310 +NetMonitor menu in Nokia 5110 +NetMonitor menu in Nokia 6150 +NetMonitor menu in Nokia 6190 +NetMonitor menu in Nokia 8210/8250 +NetMonitor menu in Nokia 8310 +NetMonitor menu in Nokia 9110 +NetMonitor menu in Nokia 9210 +
+
+ +

+ + +
+NetMonitor menu in Nokia 7110 +
NetMonitor menu in Nokia 6210 +
NetMonitor menu in Nokia 6310 +
+Of course, Number of NetMonitor menu (called "Net monitor" or "Field Test") +is different (depends on firmware version and phone series) in different Nokia phones. + +

It can be: +Menu 7 (Nokia 3110 and 9110), Menu 10 (Nokia 5110, 5130, 6110, 6130), +Menu 11 (Nokia 5190 and 3210) or Menu 12 (Nokia 8210 or some 6150). +Nokia 3210 also has a completely different icon for this menu, 6250 doesn't have any icon. So, it's normal and don't be affraid. + +

There is also interesting thing connected with it: in Nokia 8210 icon of phone +in netmonitor's menu is DIFFERENT from icons of phones in other menus in this model, but +THE SAME to icon in Nokia 8250... + +

+ + +

Back to the top + + +

8. NetMonitor menu in my phone has 11 number, hovewer previous position has 9 number. Is it normal ?
+


+ +Menu 9 in Nokia 3210 +Menu 10 in Nokia 3210 +Menu 11 in Nokia 3210 +YES - It's normal. We have such situation in Nokia 3210. "Lost" Menu 10 +is reserved for SIM application toolkit and you will see it, when you will have access to them +(when your SIM card will have this feature built in - you CAN'T activate it different way). + + +

Back to the top + + +

9. How to use it ?
+


+ +

GSM/DCS/PCS phones: + +

+ + +
+NetMonitor menu in Nokia 5110 +NetMonitor menu in Nokia 5110 + +After activation you gain access to the new position (called "Net monitor" +or "Field Test") in main phone menu. +
+ +

NetMonitor menu in Nokia 5110 +When you enter this menu, you can type number of the test, which should be displayed +(1 to 19 in limited version, higher numbers in full version - Caution! Entering +number 241 removes NetMonitor menu and +242 switches it to the limited version – you’ll have to use one of the +methods described in How to activate it ? to regain access to the full version !). +Before number of test you can add "+". Unfortunately, in Nokia 6210/7110 there +is one wrong thing here: before entering number of new test you must delete old number +using right function key (in other models you can enter it without it). + +

NetMonitor menu in Nokia 5110 +After pressing OK the chosen test appears on screen (and its number is shown on the top) in place of your network +name/operator logo (BTW: in some phones (like Nokia 3310), when you will enable clock, alarm clock, stopwatch, countdown timer, second line (ALS function), +test in netmonitor and lock keypad, time will disappear :-)). If you enter incorrect test number, NO TEST appears on screen and the phone returns to the last +correctly displayed test. If entered number is greater than 256, 512 or 768, then 256 (or its multiple) is subtracted and +resulting menu number is displayed (for example numbers 300 and 556 run test 44). Some test when accessed this way +(by typing its number and pressing OK to enter them directly) modify its contents (details are described later, I call this +"DIRECT" menu access’ - for example, see test 18). + +

NetMonitor menu in Nokia 5110 +You can look at different tests by scrolling them using up/down arrows (don’t worry – this method doesn’t change +any settings in tests) – each key press moves you to the next/previous available test. In some models +(for example in 5110) these keys have different functions (like displaying last dialed numbers, opening +and scrolling phonebook or changing the volume) – unfortunately they don’t work while NetMonitor is on screen:-(. +However, you can still adjust volume during a call in Nokia 5xxx/3210/3310/6188/6185/6160/6120 – by pressing and holding +(longer than normally - about a second) one of the arrow keys. + +

NetMonitor menu in Nokia 5110 +Help (description) to the current test can be displayed by pressing and holding * key +(repeat this to return to test values). However, this shortcut works only in some phones +(my explanation to this fact can be found in +Description of the individual tests). That's why I've added these help +screens using a bold font in most of the tests... If they are currently displayed, +entering menu directly doesn't change its settings. + +

+ + +
+NetMonitor menu in Nokia 5110 +NetMonitor menu in Nokia 5110 +NetMonitor menu in Nokia 5110 + +You can return to the main screen with name/logo of your network by entering 0 in this menu. +
+ +

+ + + + + + +
If you enter 0 as a test number and then add a number of a non-existing test +(for example 52), your phone will act as when NetMonitor is active (for example up/down arrows +can be used to change test number – you can check this in Menu 10). Unfortunately, in this case counters +from test 82 don’t work. Tests chosen this way appear right +after switching the phone on. You can use this feature to: + +
    +
  • temporarily "damage" your phone (to cheat your friend?)
  • +
  • block access to your phonebook (Nokia 5xxx and 6xxx)
  • +
  • prevent viewing your last dialed numbers list on the main screen with network logo/name (Nokia 5xxx)
  • +
  • make it difficult to change volume during a call (Nokia 5xxx) – the arrow keys must be pressed and hold longer than normally
  • +
  • make it impossible to change volume (Nokia 3110)
  • +
+ +
+ +

With any test on screen (in phones other than Nokia 3110), +your phone doesn’t display some of the messages (for example. "...calling") +and there is no calling party identification recognition (the only exception to the rule is a message: +'Note: you have active diverts'). When you type a phone number the test screen disappears +(it will come back after you get connected or when you cancel this number from your display). + +

Remember: your phone is like computer. If you won't disable it and enable +(only then it saves all values in EEPROM), +it can lost values from tests (for example, info about number of sent/received SMS from +test 64, when you will use tips above... + +

There is one firmware bug connected with using helps (descriptions) to the tests +(in this moment, it's confirmed for Nokia 5110, 3210, 3310). +If you want to see it: + +

+ + +
+Menu monitora w Nokii 5110 +Menu monitora w Nokii 5110 +Menu monitora w Nokii 5110 +Menu monitora w Nokii 5110 +Menu monitora w Nokii 5110 + +
    +
  • Press and keep * key. In a moment, when * desappear from the screen +(but before moment, when test values will be replaced with help or help with test values), +let * key.
  • +
  • Now you must do everything fast - * can't be written on the screen and +text below NaviKey can't change: instantly press * for a moment and let it. +You can repeat this point - effects will depend on repeat numbers. For example, +with firmware 5.07 (or 5.11) +and 0 repeats you will have access to first "hidden menu", with 1 repeat +you phone hangs and turn off (see test 36 +- it can be interesting), with 2 repeats it changes language ;-)), with 3 +you can enter to another "hidden menu", sometimes (I don't know exactly, when) +you can see "CONTACT SERVICE" message (restart you phone and everything will +be OK). With firmware 5.24 result are different: +with 0 repeats you can enter second "hidden menu", with 1 or 2 repeats +desappear NaviKey description, with 3 its description changes to "Send". +
  • +
  • wait longer moment
  • +
  • press for a moment and let one of the keys: *, 0 to 9 or #
  • +
+
+ +

+You can restart your Nokia 5110, if it has older firmware (it doesn't work with 5.24, +but with 5.07 and 5.11 works): + +

+

    +
  • Press and keep * key. In a moment, when * desappear from the screen +(but before moment, when test values will be replaced with help or help with test values), +let * key.
  • + +
  • Now you must do everything fast - * can't be written on the screen and +text below NaviKey can't change: instantly press * for a moment and let it, instantly press +* for longer time (2 sec. or longer) and let, instantly press * for a moment and let it
  • +
+ +

The reason of it is stack overflow (see test 35 +and test 57). If it doesn't work with your phone +and you have Nokia 6110, you can also use another trick to reboot phone: + +

    +
  1. Go to the Calendar (Menu-8)
  2. +
  3. Make a note or reminder.
  4. +
  5. Enter some text into the edit box.
  6. +
  7. Hold "Clear" until the whole text is cleared, then press "Back".
  8. +
  9. Press "0". The main screen will now be showing but a space appears on the screen. (you can't see it)
  10. +
  11. Enter 4 digits (e.g. 1234).
  12. +
  13. Use the down arrow to move the cursor to the left side of the numbers and the space (Down arrow twice).
  14. +
  15. Now enter 6 digits and press the call button.
  16. +
+ +

TDMA 800/TDMA 1900 phones: + +

After activation you gain access to the new position (called "Field Test") in main phone menu. + +

When you enter this menu, you can type number of the test, which should be displayed (1-7 in +Nokia 6160) or enter 0 to disable it. + +

You can look at different tests by scrolling them using up/down arrows. During voice calls, depending on how +NetMonitor was entered, the arrow keys may switch tests (you can't change volume then) or adjust volume. + +

If the keypad is locked while a NetMonitor tests are active, pressing +0-9, *, or # will toggle the screen back to the User Interface Display. +Pressing Talk, End, the arrow keys, or the soft menu keys will return the test. + +

In Nokia 2120 or 2160 you can also display description (help) to displayed +tests by pressing and holding "ABC" key. + + +

Back to the top + + +

10. Can I damage my phone ?
+


+ +

Probably only during NetMonitor activation +(especially in phones with NAM programming menu) or in Nokia 6210 or 3210 +(more in description for test 17). + +

I’ve never heard of such accident +(my own strange and hard attempts :-) failed, too) during using it in different phones. +But of course you should be careful - netmonitor is "unofficial" part of +phone's firmware. + +

If something doesn't work correctly, switch the phone off and then back on +- all tests, you can set (excluding test 17), +should be set to their default values... + + +

Back to the top

+ +

+

[Part 1][Part 2][Part 3][Part 4][Part 5][Part 6][Part 7] +

+
+
+ +

Marcin Wiacek (WWW) +
Last modification: 5 January 2002
+ + + diff --git a/Docs/en_US/gsm/netmon/faq_net1.htm b/Docs/en_US/gsm/netmon/faq_net1.htm new file mode 100644 index 0000000..0a11599 --- /dev/null +++ b/Docs/en_US/gsm/netmon/faq_net1.htm @@ -0,0 +1,503 @@ + + + + + + + + + + NetMonitor in Nokia phones (2/7) + + + + + +

Main page

+ +
NetMonitor in Nokia phones (2/7) + +

[Part 1][Part 2][Part 3][Part 4][Part 5][Part 6][Part 7] + +

+ +
+ + + +
    +
  1. What is it ?
  2. +
  3. Do I need it ?
  4. +
  5. Does my phone use more power with NetMonitor enabled ?
  6. +
  7. How to activate it ?
  8. +
  9. Which NetMonitor version can be activated in my phone ?
  10. +
  11. Does NetMonitor activation void warranty ?
  12. +
  13. NetMonitor menu in my phone has different number than 10. Is it normal ?
  14. +
  15. NetMonitor menu in my phone has 11 number, hovewer previous position has 9 number. Is it normal ?
  16. +
  17. How to use it ?
  18. +
  19. Can I damage my phone ?
  20. +
  21. Glossary
  22. +
  23. Description of the individual tests
  24. +
  25. You can also use a program...
  26. +
  27. Can I use NetMonitor without SIM card inserted, without PIN number entered or when SIM card is not active ?
  28. +
  29. How can I disable NetMonitor ?
  30. +
  31. Do I need to disable NetMonitor before sending my phone to the service ?
  32. +
  33. Is it possible to re-activate NetMonitor after disabling it ?
  34. +
  35. Is NetMonitor available in analog Nokia phones ?
  36. +
  37. Does NetMonitor allow to use phone like broadcast station ?
  38. +
  39. I don't have all described tests in my phone. Why ? Can I increase their number ?
  40. +
  41. Does NetMonitor allow to identify place, where is my interlocutor ?
  42. +
  43. Does NetMonitor allow to identify place, where am I ?
  44. +
  45. What are NetMonitor codes ?
  46. +
  47. Is it the truth, that in phones with additional hardware changing frequency band NetMonitor doesn't work correct ?
  48. +
  49. Where can I find description of FBUS/MBUS protocol and commands connected with NetMonitor ?
  50. +
  51. I have non existing networks on the list of forbidden networks...
  52. +
  53. How to check frequency band (900 or 1800 Mhz), where phone work in this moment ?
  54. +
  55. Can I use DLR-2/DLR-3 cables for activating netmonitor ?
  56. +
  57. Can I activate netmonitor using Init File Editor (Nokia 9110) ?
  58. +
  59. Can I force phone to use one frequency band (900 or 1800 Mhz) only ?
  60. +
  61. How to change settings in tests ?
  62. +
  63. My phone has very short snandby time - it is possible to see the reason of it ?
  64. +
  65. Is netmonitor available in English version only ?
  66. +
  67. Information sources
  68. +
  69. Additional information
  70. +
  71. Does using/activating netmonitor cost anything ?
  72. +
  73. Does using netmonitor is legall ?
  74. +
  75. Which entries on SIM card are used in netmonitor tests ?
  76. +
  77. Can I activate netmonitor in 3310 using soft working with 3210 ?
  78. +
  79. After activating netmonitor/BTS TEST my phone can't find network...
  80. +
  81. Netmonitor shows different battery capacity than info on it...
  82. +
+
+
+ +

11. Glossary
+


+ +

Here you can find explanation to some terms, which can be found in this FAQ: + +

ACCH (Analog Control Channel) +(TDMA 800/TDMA 1900) + +

AMPS (Advanced Mobile Phone Service) +
Analogue cellular system working in 800 Mhz used, for example, in North America. + +

ASIC (Application Specific Integrated Circuit) +
Electronic chips designed for some concrete purposes + (for example, in phone it controlls communication between MCU and DSP) +They're designed and produced by the companies which use them. + +

AVCH (Analog Voice Channel) +(TDMA 800/TDMA 1900) + +

BCC (Base-station Color Code) +(GSM/DCS/PCS) +
3-bit number (from 0-7 range) used to distinguish neighbor cells of the same operator, +transmitting using BCCH in the same +FDMA channel. Such distinguish is not needed when the cells belong to different operators +(they use different channels and their BCCH are in different FDMA channels). +It is given in BSIC of each BTS (you can check it for example in +test 2). + +

BSC (Base Station Controller) +(GSM/DCS/PCS) +
It controls and supervises one or more BTSes. + +

BSIC (Base Station Identity Code +or Base transceiver Station Identity Code) +(GSM/DCS/PCS) +
Unique ID number of each BTS. If we code this value binary, first three digits (in decimal format) +are BCC and next three are NCC. These values range from 0 - 63. +BSIC values can be found among others in test 2. + +

BTS (Base Transceiver Station) +(GSM/DCS/PCS) +
This device allows communication between phones and cellular network +(many parameters, like current communication channel, distance to BTS and signal quality can be found, for example, +in test 1). + +

And here are another classes with maximum power of BTS: + +

+ + + + + +
GSM 900
GSM 1800
+
320 W (55 dBm)
+160 W (52 dBm)
+80 W (49 dBm)
+40 W (46 dBm)
+
+
-
+-
+-
+-
+
+
20 W (43 dBm)
+10 W (40 dBm)
+5 W (37 dBm)
+2,5 W (34 dBm)
+
+ +

In Polish version of this FAQ I give many links to WWW pages with BTS lists, their descriptions, pictures (in Poland). + +

From English pages I recommend www.geckobeach.com/cellular/cellpixs/cellid.htm +site - it's about networks and BTSes in North America. + +

Another links connected with it: + +

+ + +

C1 (path loss-criterium) +(GSM/DCS/PCS) +
This is a parameter (ranging from -99 to 99 dBm) calculated by the phone to decide which cells to use +(it uses the cell only if its C1 is positive). This value is based on: + +

+

    +
  • RX +
    Strength of signal received in BCCH channel. If it is equal or less than +RxLevAm, the phone searches for next +BCCH channel. It is shown in +test 1 (for current channel) +and also in test 3, test 4 +and test 5 +(for neighbor channels). The amount of measurements of the quality of transmission with BCCH channels +in neighbor cells is given in test 62
  • + +
  • RxLevAm (Rx Level Access minimum) +
    Min. level of the received signal (usually from -100 dBm to -110 dBm) needed by the phone to use particular cell.
  • + +
  • MSTxPwr +
    Max power, which can be transmitted by phone to get access to +RACH channel (i.e. max power allowed by current cell). +Actually, it is lower in towns (where cells are small) and higher outside them. +
  • + +
  • MSMaxTxPwr +
    Max permissible transmission power of the phone (its classes are described in +TX description).
+ +

It is calculated using following formula: +C1 = (RX - RxLevAm - MAX ( ( MSTxPwr +- MSMaxTxPwr ), 0) ) , where MAX(x,y) is obviously a mathematical +function giving the bigger one of the discussed numbers. +The phone shows C1 value in test 1 (for current channel) and in +test 3, test 4 +and test 5 +(for neighbor channels). + +

C2 (cell-reselection criterion) +(GSM/DCS/PCS) +
This parameter (-99 to 99 dBm) is calculated with following formula: +C2 = C1 + Cell reselect +offset - Temporary offset +* H (Penalty time - T). +If this value for some other cell (C2 for +neighbor channels can be found in test 3, +test 4 and +test 5) is higher than this value for current cell +(shown in test 1 and test 3) +for a period of time longer than 5 seconds, the phone switches cells. There are two exceptions to the rule: + +

+

    +
  • if the new cell is located on different ‘Location Area (this parameter for current cell can be checked in +test 11), C2 for this cell must be (during more than 5 seconds) +higher than C2+CELL_RESELECT_HYSTERESIS for old cell (where CELL_RESELECT_HYSTERESIS is a +special parameter sent in BCCH channel).
  • + +
  • if the phone switched cells during last 15 seconds, C2 for a new cell must be higher at least 5 dBm from +C2 value of the old cell. +
  • +
+ +

H(x) function for currently not used cells is 0 (if x<0) or 1 (if x>=0). For current cell H(x) is always equal 0. +
By a skillful manipulation of this parameter (through CELL_RESELECT_HYSTERESIS), operators can direct +connections to specific cells (thus lightening load of the network). + +

CDMA (Code Division Multiple Access; also known as IS-95) +
One of the newer digital technologies in 800 or 1900 Mhz. Used in North America, Australia and some southeastern Asian countries +(e.g. Hong Kong and South Korea). It doesn't divide the radio frequency +spectrum into separate user channels by frequency slices or time slots, but +separates users by assigning them digital codes within the same broad spectrum. + +

DCCH (Digital Control Channel) +(TDMA 800/TDMA 1900) + +

DCS (Digital Cellular System) +
Cellular communication system working in 1800 MHz frequency band +(currently more often called GSM 1800) – a changed version of GSM (900 MHz) system. +Its new features allowed to increase network capacity (that’s why this system is used in urban areas with huge number +of subscribers) at the cost of thick net of the base stations (BTSes) +and to provide roaming within one country. GSM 1800 has different channel numbers +(see test 17), different phone +(see RX description) and BTSes +transmission power and also different max speed of the user, at which he can use his phone +(250 km/h in GSM and 130 km/h in DCS). + +

DSP (Digital Signal Processor) +
Signal processor (digital signals processing chip - controls radio interface and speech coding/decoding). +Its version can be checked in test 88. + +

DTCH (Digital Traffic Channel) +(TDMA 800/TDMA 1900) + +

DTX (Discontinous Transmission Exchange) +
Some phones and networks "care" ;-) about battery life using so called discontinuous transmission (DTX), +which turns off phone’s transmitter when we don’t talk (but – for example - listen to the calling party). +During that period the phone generates a so called comfortable :-) noise, because if our interlocutor heard the silence, +he could think that the connection was broken. + +

(GSM/DCS/PCS): +
DTX must be supported by the phone (Nokia does - see +test 78) and BTS - you can check and +(sometimes) change this in test 12 and +test 13. + +

FDMA (Frequency Division Multiple Access) +(GSM/DCS/PCS) +
This name means multiaccess on frequency field: transmission proceeds on different frequencies at the same time +(this is a "full duplex" connection): there is a “down-link” from BTS to the phone and +“up-link” - from the phone to BTS (this is called "up" and "down" because BTS +antennas are usually higher than phone ones, so the signal from BTS to the phone +really must go down (and vice versa)). + +

Frequency hopping (channel hopping) +(GSM/DCS/PCS) +
During connection your phone can continuously change used frequency (used channel) in communication with cell. +It's used, when some channel is still troubled - without channel hopping +communication with phone could not be possible, with it it's - only this +part of transmition, which is made on this frequency, is lost (so, if gives less number of +signal loss, but doesn't change sound quality - methods of coding it are always +the same). You can check (during a call) if your phone uses this function in +test 1. test 12 informs +if it is allowed by the cell (these values are updated only during a call). Channel hopping requires +Hopping Sequence Number (frenquencies are changed according to known for phone and network sequence) +- see test 2. + +

GSM (Global System for Mobile Communication) +
Cellular telecommunication system working at 900 MHz. It also has a 1800 MHz (DCS) and +1900 MHz (PCS) version. + +

HLR (Home Location Register) +(GSM/DCS/PCS) +
Network register containing information about subscribers (i.e. about their subscribed services, +tariff, last network they were logged in, etc.). + +

IMEI (International Mobile Equipment Identification code) +(GSM/DCS/PCS) +
Unique 15-digit identification number of every GSM phone on the world. It can be checked using *#06# code +(all phones) or in service menu (Nokia), which can be activated by typing a code *#WAR0ANTY# or +*#WARRANTY# (Nokia 6130). In Nokia 3110 after entering service menu (*#WAR0ANTY#) +you have to additionally enter a code 9268. IMEI contains information about the manufacturer, +place of production and serial number (check www.tele-servizi.com/janus/texts/imei.txt +for such list for Motorola phones, +here is my list for Nokia phones). +Operators can restrict network access for particular phones – for example the stolen ones +(identified using IMEI number). Different operators can exchange such lists too. + +

IMSI (International Mobile Subscriber Identify) +(GSM/DCS/PCS) +
Unique (max 15-digit) number given to the phone: + +

+

    +
  • first three digits are MCC
  • +
  • next three digits are MNC
  • +
  • the rest is a unique number
  • +
+ +

IMSI attach +(GSM/DCS/PCS) +
It is a procedure executed after each power on. The phone informs network that it is active (and is ready for communication +- receiving waiting SMS, etc.) and then it receives the IMSI number. +The counter connected with IMSI attach is located in test 64, +test 7 informs whether this is allowed by the current cell. + +

IMSI detach +(GSM/DCS/PCS) +
The phone informs network that it is going to switch off and the communication won’t be possible +(its IMSI expires). The counter connected with IMSI detach is located in +test 64. test 7 +informs whether this is allowed by the current cell. + +

Location Update +(GSM/DCS/PCS) +
Every GSM phone periodically informs network about its current location. +This function is called Location Update. It is executed after changing Location Area (phone makes +it "intelligent" - when it's moved out of network coverage and the logs again to the network, makes Location Update +only when current BTS has different LAC than previous one – before losing the signal) or +PLMN (after leaving the range of one network and trying to log in to another). +Then information about Location Update is transferred to a new MSC/VLR, +which in turn passes this information to HLR. When the phone works in new +MSC/VLR, HLR doesn’t identify the user by +the number received from old MSC/VLR anymore. Location Update +has a couple of varieties: PLU, IMSI attach and IMSI detach +(they're distinquished in test 64). Current Location Area code can be checked in +test 11. + +

MCU (Master Control Unit processor) +
Main processor in phone. + +

MSC (Mobile Switching Center) +(GSM/DCS/PCS) +
Part of the system responsible for communication between subscribers and other users (also from other networks). + +

NCC (National Color Code or Network Color Code) +(GSM/DCS/PCS) +
3-bit number (from 0-7 range) used to differentiate cells of the operators from different countries +(for example near the border, where the phone is in range of several different networks) transmitting using +BCCH in the same FDMA channel. This number is constant +within PLMN. It is given in BSIC of every BTS +(you can check it in test 2). + +

PLMN (Public Land Mobile Network) +(GSM/DCS/PCS) +
Area covered by one operator (one network). After changing this area, the phone executes +Location Update. + +

+

+ +

PLU (Periodic Location Update) +(GSM/DCS/PCS) +
The phone informs network, on which country area (in the range of which cells) it is located. +This procedure is executed periodically (depending on the network, for example in polish +Era GSM and +Plus GSM networks every 3rd hour, in +Idea every 2th hour) +- this can be checked in test 10. This period is counted from the +last „contact” with network (the counter doesn’t stop even if the phone loses network signal!) – from the last call, sending/receiving +SMS, requesting some services (for example enabling call diverting), because the network is then informed about phone’s +location (but this is not registered in test 64). +The counter connected with PLU is in test 64. + +

TCH (Traffic Channels) +(GSM/DCS/PCS) +
Two way user data (computer data or digitized voice) channels. They can be divided to: + +

    +
  • +HR (Half Rate Traffic): max data transfer rate is 6.5 kbit/sec (introduced in +GSM phase 2). HR channels offer worse sound quality but also longer phone standby time (even up to 30%), +because the phone using HR uses less power. The main advantage of this kind of channels is that they +enable the network to double its capacity (the number of subscribers able to make a call at the same time – see +TS parameter description for more details) or to double the max range of the +BTS. Using these channels must be allowed and supported by the network (this can be +checked in test 7) and the phone. Activation code is +*HRC0#, deactivation code is #HRC0#. Unfortunately, not all Nokia phones accept these codes +(the phone should reset itself after entering them) – in older models they're not supported, in never they're deactivated, when +the phone is directed to countries with networks, which doesn't support it. +Interesting fact is that in Nokia 6110 (firmware 5.24) you can decide whether the phone can use this channel or not by modifying +following EEPROM memory cells values: + + + + + + + + + + + + + +
    enablingdisabling
    cell 0070 value for 78 +
    cell 011F value for 84
    cell 0070 value for 70 +
    cell 011F value for 7C
    +
  • + +
  • +FR (Full Rate Traffic):transmission at 13 kbit/sec, coding using +LPC-RPE (Linear Prediction Coding with Regular Pulse Excitation) algorithm
  • + +
  • +EFR (Enhanced Full Rate): +13 kbit/sek, coding algorithm different than in FR (ASELP (AlgebraicCode Excitation Linear Prediction) +created by Nokia and Sherbrooke University; recognized as an industrial standard for +GSM). EFR provides better sound quality at the same data transmission rate (and up to 5% +faster battery drain compared to FR). This mode can be enabled using +*EFR0# code (the phone then tries to use TCH channels in following order: EFR, FR, +(HR)) and disabled with #EFR0# (order: FR, (HR)). These codes may be not recognized +by some models (for example 6110 with some firmware versions) - +if your phone accepts them, it should reset itself right after typing them +(if this doesn’t happen, you won’t be able to enable/disable EFR using a keyboard code). +This channel is not supported in all older models (for example, 2110). +The type of channel used by your phone can be checked only during connection. +
  • +
+ +

When you network doesn't support one of these channel and phone recognizes its activation code, you may see +"Not ready" message. + +

You can check this in test 1. +The sequence of TCH channels can be freely set using some of the service programs +(for example WinTesla – in Software/Product Profile menu) - it can be only possibility to enable HR channel in phone. + +

TDMA (Time Division Multiple Access) +(GSM/DCS/PCS) +
This means multiaccess in time: several phones can transmit signal (either digitized voice or computer data) in the +same time on the same channel (its number can be checked in test 1) – +actually, this period of time is divided into very small parts (see TS description), +invisible for us, so we can assume it happens simultaneously). + +

TMSI (Temporary Mobile Subscriber Identity): +(GSM/DCS/PCS) +
During signalization procedures encrypted on radio channel +(for example, during location update) this number is assigned by +MSC to phone. In the moment, when network wants to contact +with concrete phone and transmission on radio channel is not encrypted, it's send +instead of IMSI and allows phone to indentify, that concrete +call concern on it. It doesn't have global meaning +and it's structure is definited by network administrator. Actual TMSI +you can check in test 10. + +

TS (Time Slot) +
Each radio channel used in communication between phone and +BTS is divided into 8 parts (called TS - time slots). If in all BTSes +(available for your phone) all time slots are in use, you won't be able to make/receive a call and you'll get a 'Network busy' +message (information about reason of connection failure is given among others in +test 39). Unfortunately, each type of connection has the same priority in +networks not supporting GSM Phase 2+ (it isn't available in older GSM Phases) - so if you want to dial emergency number 112 +and the network is busy, no other call will be interrupted and you won't get connected. This problem can also be solved by +adding more BTSes (for example in dual GSM 900/1800 MHz network) or by modifying +current stations to allow the use of HR channels (FR +and EFR transmission uses whole assigned time slot, while HR +(defined in GSM Phase 2) only half of it). Max data transmission speed using one TS is 9.6 kbit/sec (or 14.4 kbit/sec, +but only in some additional conditions). There are new systems allowing higher transmission speeds +(for example GPRS (Generic Packet Radio Services) or HSCSD +(High Speed Circuit Switched Data), but they achieve this using several time slots +at the same time (which decreases network capacity). Actual used TS can be checked +in test 1, in phones with HSCSD (like Nokia 6210) +use also test 8 for it... + +

VLR (Visitor Location Register) +(GSM/DCS/PCS) +
This register contains the same data as HLR, but for roaming guests +(their data are taken from their home network HLR). + + +

Back to the top
+ +

+

[Part 1][Part 2][Part 3][Part 4][Part 5][Part 6][Part 7] +

+
+
+ +

Marcin Wiacek (WWW) +
Last modification: 5 January 2002
+ + + diff --git a/Docs/en_US/gsm/netmon/faq_net2.htm b/Docs/en_US/gsm/netmon/faq_net2.htm new file mode 100644 index 0000000..3ec22cd --- /dev/null +++ b/Docs/en_US/gsm/netmon/faq_net2.htm @@ -0,0 +1,2405 @@ + + + + + + + + + + NetMonitor in Nokia phones (3/7) + + + + + +

Main page

+ +
NetMonitor in Nokia phones (3/7) + +

[Part 1][Part 2][Part 3][Part 4][Part 5][Part 6][Part 7] + +

+ +
+ + + +
    +
  1. What is it ?
  2. +
  3. Do I need it ?
  4. +
  5. Does my phone use more power with NetMonitor enabled ?
  6. +
  7. How to activate it ?
  8. +
  9. Which NetMonitor version can be activated in my phone ?
  10. +
  11. Does NetMonitor activation void warranty ?
  12. +
  13. NetMonitor menu in my phone has different number than 10. Is it normal ?
  14. +
  15. NetMonitor menu in my phone has 11 number, hovewer previous position has 9 number. Is it normal ?
  16. +
  17. How to use it ?
  18. +
  19. Can I damage my phone ?
  20. +
  21. Glossary
  22. +
  23. Description of the individual tests
  24. +
  25. You can also use a program...
  26. +
  27. Can I use NetMonitor without SIM card inserted, without PIN number entered or when SIM card is not active ?
  28. +
  29. How can I disable NetMonitor ?
  30. +
  31. Do I need to disable NetMonitor before sending my phone to the service ?
  32. +
  33. Is it possible to re-activate NetMonitor after disabling it ?
  34. +
  35. Is NetMonitor available in analog Nokia phones ?
  36. +
  37. Does NetMonitor allow to use phone like broadcast station ?
  38. +
  39. I don't have all described tests in my phone. Why ? Can I increase their number ?
  40. +
  41. Does NetMonitor allow to identify place, where is my interlocutor ?
  42. +
  43. Does NetMonitor allow to identify place, where am I ?
  44. +
  45. What are NetMonitor codes ?
  46. +
  47. Is it the truth, that in phones with additional hardware changing frequency band NetMonitor doesn't work correct ?
  48. +
  49. Where can I find description of FBUS/MBUS protocol and commands connected with NetMonitor ?
  50. +
  51. I have non existing networks on the list of forbidden networks...
  52. +
  53. How to check frequency band (900 or 1800 Mhz), where phone work in this moment ?
  54. +
  55. Can I use DLR-2/DLR-3 cables for activating netmonitor ?
  56. +
  57. Can I activate netmonitor using Init File Editor (Nokia 9110) ?
  58. +
  59. Can I force phone to use one frequency band (900 or 1800 Mhz) only ?
  60. +
  61. How to change settings in tests ?
  62. +
  63. My phone has very short snandby time - it is possible to see the reason of it ?
  64. +
  65. Is netmonitor available in English version only ?
  66. +
  67. Information sources
  68. +
  69. Additional information
  70. +
  71. Does using/activating netmonitor cost anything ?
  72. +
  73. Does using netmonitor is legall ?
  74. +
  75. Which entries on SIM card are used in netmonitor tests ?
  76. +
  77. Can I activate netmonitor in 3310 using soft working with 3210 ?
  78. +
  79. After activating netmonitor/BTS TEST my phone can't find network...
  80. +
  81. Netmonitor shows different battery capacity than info on it...
  82. +
+
+
+ +

12. Description of the individual tests
+


+ +

Existence of the individual test in your phone depends on: + +

+

    +
  • phone model: generally, never and more complicated models (with more functions and options) have more tests (for example, +Nokia 9110 has more tests than 5110, 7110 more than 9110). There is one (only ?) exception: less complicated Nokia 5110 +has bigger NetMonitor than 6110 (and that’s why I think that this model is better, even though it doesn’t have some functions).
  • + +
  • software version - usually the newer version, the more options it has (software can be upgraded in service and its +version can be checked in most models with *#0000# code, in Nokia 6130 with *#9999# and in +3110 with *#3110#) – for instance in Nokia 5110 in test 89 bbbbbb +parameter is shown only from firmware 5.07. Firmware upgrade has also additional advantage: newer versions don’t +contain some bugs (also in NetMonitor).
  • + +
  • who uploaded firmware to the phone: it is usually written in C (and then translated (compiled) to the code of phone’s +microprocessor). According to my own private theory existence (and running) of an individual tests depends on some +constants set (or not) in the source code (programmers :-) surely understand, what I’m trying to write). The best example +for this can be test 38: according to the some English documentation +it doesn't exist in phones to be sold, because DEV_FT_MEMORY_DUMP_IN_USE constant in file ftd_conf.h +(one of the firmware source code files) wasn't set before compiling. I think, that the same applies to the help screens – +their presence doesn’t depend on firmware version but on where the phone was purchased (where it comes from – +where was its firmware uploaded). How to solve this problem? Unfortunatelly, you can only download firmware again (compiled +from source with set constants). + +

    Aha, I’m also not quite sure, whether DSP tests +(test 70, 10-73, +10-74, +10-76 (except for ab parameter), 10-77, +10-78 +and 10-79) don’t have to be enabled this way (or whether their existence +(or not) depends on the network). +

  • +
+ +

Help screens for tests are written with bold font, +concrete (example) values in tests with italic (I put them there, where I didn't have more details about test). + +

+

+ + +

Back to the top + + +

Test 1 +
Information about communication with cell + +

+ + + + + + +
+ + + + +
abbb ccc ddd
+ e ff g mmmm
+ nnn     ppp
+    oooo
+
+ + + + +
CH RxL TxPwr
+TS TA RQ RLT
+ C1     C2
+    CHT
+
+ +

+

    +
  • +a - contains H, if frequency hopping is enabled (otherwise empty). This information +can also be found in test 11 +and test 12.
  • + +
  • +bbb - CH (channel): number of the channel used in communication with cell (decimal). If +frequency hopping is enabled, this number changes when the display gets refreshed. +This parameter determines frequencies used in communication with BTS: + +

    + + + + + + + + + + + + + + + + + + + + +
    carrier (middle) frequency +of the transmission channel (MHz) +
    GSM 900
    GSM 1800
    transmission phone-BTS
    890 + CH * 0,2
    1710 + (CH - 511) * 0,2
    transmission BTS-phone
    935 + CH * 0,2
    1805 + (CH - 511) * 0,2
    + +

    +and informs, whether phone use cell working in GSM 900 or 1800 MHz +(I write more about channel numbers in test 17). + +

    + +

  • + +
  • +

    ccc - RX: +minus is not show if <=-100. This parameter affects following functions: + +

    +

      +
    • +if all channels’ signal is weaker than -110 dBm, the phone doesn’t monitor channels.
    • + +
    • +if the phone loses signal of your home network, it tries to monitor next available networks and if you don't have access to them, +you’ll see a network presence symbol and no signal strength bars (but you can make emergency calls) +
    • + +
    • + if some other network has a very strong signal (say -85 dBm) and your home network is very weak on that area (for example, +-100 dBm), your phone can have big problems with logging into it (you will have to use +test 17 to manually force the phone to use proper channel). +
    • + +
    • +RXLev parameter value: + +

      + + + + + + + + +
      RX (from)RX (up to)RXLev
      less than-110 dBm0
      -110 dBm-109 dBm1
      -109 dBm-108 dBm2
      .........
      -49 dBm-48 dBm62
      -48 dBmmorej63
      +

      +

    • + +
    • +signal strength indicator value on the left side of the display (approximately): + +

      + + + + + + + +
      RX (from - to)amount of bars
      from -105 to -100 dBm0
      from -100 to -95 dBm1
      from -95 to -90 dBm2
      from -90 to -85 dBm3
      more than -85 dBm4
      +

      +

    +
  • + + +
  • +

    ddd - TX: level of the transmitted signal (only during connection). If the phone’s transmitter is active, +there is an * (asterisk) before the value. The lower value, the higher power level (also the one received by your head!) and +energy consumption. + +

    + + + + + +
    TX (GSM 900)161514131211109
    TX (GSM 1800)98765432
    dBm11121314151617181920212223242526
    Watts0,0120,0160,020,0250,0320,040,050,0630,0790,10,1250,1580,20,2510,3160,398
    + +

    and continue... + +

    + + + + + +
    TX (GSM 900)8765432-0
    TX (GSM 1800)10313029
    dBm2728293031323334353637383940414243
    Watts0,5010,6310,79411,261,5822,513,163,9856,318101215,820
    + +

    +Watt = 10(dBm/10)*0,001 +
    dBm = 10*log(Watt/0,001) + +

    There are following classes describing max phone transmission power: + +

    + + + + + + + + +
    GSM 900
    GSM 1800
    +
    20 W (not in use) +
    8 W (car/mobile phone) +
    5 W (car/mobile phone) +
    2 W (hand phone) +
    0,8 (hand phone)
    +
    +
    1 W (hand phone) +
    0,25 W (hand phone)
    +
    + +

    Min. phone transmission power in GSM 900 is 0,02 W and in GSM 1800 is 0,0025 W (4 dBm). + +

    Max BTS power level can be found in their description. + +

  • + +
  • +

    e - This TS indicator shows number of the used time slot +(0..7 for FR (EFR) or 0..15 for HR). +For phones with HSCSD (like Nokia 6210) use also test 8 for it. +

  • + +
  • +

    ff - TA (Timing Advance): BTS informs the phone, +when it should start transmission (so that it reaches BTS in time). This information is shown +by this indicator. It lets us calculate approximate distance between phone and BTS, which is +a value between TA*550 m and (TA+1)*550 m (remember, that sometimes signal is refracted and +distance evaluated with this parameter can be wrong). +This parameter is updated during communication with network (sending/receiving +SMSes, calling, requesting services), for example when using SDCC and TFR +channels. It ranges from 0 to 63 (up to 35 km) with FR and +EFR channels. HR channels offer theoretically (for example +with a car antenna (higher transmitting power) and a flat terrain) twice this range (up to 70 km) and TA contains value up to 128 +(English descriptions which I use don’t say a word about it - so, it's possible, +that for values bigger than 64 phone (?) decreases 64 from it and displays such value in this menu). + +

    Tip: you can use ALS (Alternative Line Service) function or +try to call for "*" number, when you want to refresh it...

    + +

  • + +
  • +

    g - RXQUAL_SUB (rate of transmission errors with DTX active +(DTX state can be checked in test 12)): +it determines, how many errors during connection have to be corrected by the phone for the call to be possible. Range 0 - 7 +(0 – means no errors; more than 5 – connection may be interrupted). The higher it is, the worse quality you have... + +

    + + + +
    RQ value01234567
    Max error amount<0,2%<0,4%<0,8%<1,6%<3,2%<6,4%<12,8%>12,8%
    +

    +

  • + +
  • +

    mmmm - RLT (Radio Link Timeout): if it is negative, 0 is shown. Max value of this parameter is 64. +If the phone uses a channel different than TCH or SDCC, xx is +displayed +

  • + +
  • nnn - C1 parameter

  • + +
  • +

    ppp - C2 parameter. If network supports only GSM Phase 1, +C1 value is displayed here. +

  • + +
  • +

    oooo - type of channel currently used by the phone (visit +www.pins.co.uk/upages/stratfordc/ +to find C programs containing algorithms used to encode different channels). +With HR channels phone even show, if first or second +part of TS is used (subchannel 0 or 1 is written): + +

    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    AGCH(Access Grant Channel) - a channel used by +BTS to inform the phone about what channel it should use (it is a +BTS answer to RACH) – it assigns the phone to +SDCCH
    BCCH(Broadcast Control Channel) +- a channel in direction BTS-phone, containing precise information about network +(needed for identification and access) – for example + +
      +
    • how often the phone should inform network about its location (T3212 counter value – more detailed description in +test 10)
    • +
    • whether frequency hopping is supported by the network
    • +
    • CELL_RESELECT_HYSTERESIS parameter (see C2 parameter description)
    • +
    • CELL_BARRED parameter (which informs, whether this cell is in test phase or is available for public use – but the phone +can ignore this and use test cells too - see test 19)
    • +
    +
    THR0TCH HR subchannel 0
    THR1TCH HR subchannel 1
    TFRTCH FR
    TEFRTCH EFR
    F144TCH FR - data transmission, speed 14.4 kbit/sec.
    F96TCH FR - data transmission, speed 9.6 kbit/sec.
    F72TCH FR - data transmission, speed 7.2 kbit/sec.
    F48TCH FR - data transmission, speed 4.8 kbit/sec.
    F24TCH FR - data transmission, speed 2.4 kbit/sec.
    H480TCH HR - data transmission, speed 4.8 kbit/sec., subchannel 0
    H481TCH HR - data transmission, speed 4.8 kbit/sec., subchannel 1
    H240TCH HR - data transmission, speed 2.4 kbit/sec., subchannel 0
    H241TCH HR - data transmission, speed 2.4 kbit/sec., subchannel 1
    FATCH FR - used only for quick signalization, for example in case of +handovers +
    (FACCH - Fast Associated Control Channel)
    FAH0TCH HR -used only for quick signalization, for example in case of +handovers +
    (FACCH - Fast Associated ControlChannel), subchannel 0
    FAH1TCH HR - used only for quick signalization, for example in case of +handovers +
    (FACCH - Fast Associated Control Channel), subchannel 1
    SDCCSDCCH (Stand-alone Dedicated Control +Channel) +- used for system signalization of: +
      +
    • establishing connection
    • +
    • user verification
    • +
    • Location Update executing
    • +
    • assigning to TCH
    • +
    • sending SMSes
    • +
    +
    CCCH(Common Control Channel ?) - used, when the phone is in standby mode (it doesn’t transmit not receive data)
    CBCH(Cell Broadcast Channel) - +a channel in BTS-phone direction used for cell broadcast (for example in Nokia 5110 it can +be enabled in Menu 2-5 and Menu 4-2-2, in Nokia 6110 in Menu 1-5 and Menu 4-4-2) +
    CCHRCCCH and CBCH joined in one
    SEARthe phone is searching for network
    NSPS(No Serve Power Save) +- the phone is not in range of any network, energy saving has been activated (information, whether your SIM card can stop its +clock in energy saving mode, can be found in test 51)
    +

  • +
+ +

Interesting thing: In firmware in Nokia 3210 and 3310 there are strings +which shows info about data transmission state +("officialy" these phones don't have this function)... + +

In Nokia 3110 this test looks similiar: + +

+ + + + + + +
+ + + + +
abbb cccc ddd
+ e ff g qqrr
+s Bttuu mmmm
+w ppp oonnn z
+
+ + + + +
 CH RxL TxPwr
+TS TA QPM RAR
+Ro BsiCLK RLT
+S C2 CHT C1 B
+
+ +

+

    +
  • cccc - in this phone minus is always shown
  • +
  • ooo - hex values
  • +
  • qq - paging mode (see test 2)
  • +
  • rr - RAR (description in test 2)
  • +
  • s - roaming indicator (description in test 2)
  • +
  • tt - BSIC for current cell (see test 2)
  • +
+ +

Level of received signal (RX) is connected with phone transmission power +(TX): the weaker the former, the stronger the latter (take a look at example indications of 6110 +using SDCC and TFR channels): + +

+ + + + + + +
RXTX
from -38 to -49 dBm19
from -68 to -75 dBm9-14 (0,032 - 0,316 Watt)
from -79 to -85 dBm7-9 (0,794 - 0,032 Watt)
from -85 to -93 dBm5-7 (2 - 0,794 Watt)
+ +

For curious people: some of these data can also be found in Nokia service programs (for example in WinTesla in +"Testing" / "RF Information" menu). + +

+ + + + + +
Using CCCH or CBCH channel by the phone +(if the cell doesn’t support cell broadcast – you can check this in test 7) depends +on its firmware version and whether cell broadcasting has been enabled (or not) by the user. For example: Nokia 5110 v 5.04 +uses CBCH channel, if you enable this feature in Menu 2-5 or Menu 4-2-2 +(and CCCH channel, if you disable it). I think, that cell broadcast should be disabled when it is not +supported by the network – probably you can save some battery power. It has been corrected in version 5.07 (when CB is +not supported by the network, the phone uses CCCH regardless of "Info service" and +"Cell info display" settings). + +

Additionally, ccc (RX) parameter can be used to set the direction of your antenna +(especially directional one) much more precisely than when using the indicator on the left side of phone’s display ! +I also have a piece of advice for you: never touch the antenna (in any case, you can check how it affects level of received +signal just by holding it with your fingers) ! + +

TA parameter can be also used (apart from calculating the distance to BTS) +to measure speed (for example of the care you’re driving). I’m serious! But this can be done only when: + +

    +
  • the road is straight (no bends)
  • +
  • the phone uses only one BTS
  • +
  • BTS must be located near the road
  • +
+ +

A little bit of mathematics: +
+
From Pitagoras’ theorem: + +

a2 = c2 + e2 +
b2 = c2 + f2 + +

So: +
e = +
f = + +

Now d = e - f =- + +

If you know: + +

+

    +
  1. +the way traveled by the car (on the drawing: length of "d" segment; it can be calculated form the lengths of "a" and "b" +segments (multiples of 513 m (for simplification) read from TA) and c (described later)) +
  2. + +
  3. +time, in which TA has changed (measured by a stopwatch) +
  4. +
+ +

you can measure your speed. +
Inaccuracy of this measure depends on: + +

+

    +
  • +distance between BTS and road (segment "c") +
  • + +
  • +velocity itself +
  • + +
  • +distance between car and BTS +(with longer distance inaccuracy depends less from "c" segment) +
  • +
+ +

And here is a concrete example: +
The original value of TA was 2 and after 15 seconds it has changed to 1. You will get following results: + +

+

    +
  • 123,120 km/h (BTS 0 m from road)
  • +
  • 124,320 km/h (100 m from road)
  • +
  • 128,160 km/h (200 m)
  • +
  • 135,600 km/h (300 m)
  • +
+ +

You can assume, that "c" segment is 100 m (or 0 if you count in memory - then d = e - f) and the inaccuracy of the measured +velocity is 5 km/h. +

+ +

In Nokia 2110i/2140 this test looks like follows: + +

+ + + + + + +
+When transmitter works - call or Location Update + + + + +
+ +CH  C1 RXl
+Pwr TS  Ql
+TA RLT  RA +
+
+During standby + + + + +
+ +CH  C1 Rxl
+Pwr TS  Ql
+TAXXXXX RA +
+
+ +

+

    +
  • CH - channel number
  • +
  • C1 - value of C1
  • +
  • Rxl - RX level (in dBm)
  • +
  • Pwr - TX level or "*" (enabled transmitter) or "S" (SDCCH) or "T" (TCH)
  • +
  • TS - Time Slot
  • +
  • Ql - quality or received signal
  • +
  • TA - Timing Advance
  • +
  • RLT - Radio Link Timeout
  • +
  • RA - maximal number of Random Access retransmission
  • +
  • XXXXX - type of actual channel +
      +
    • ACCESS
    • +
    • CCCH
    • +
    • BCCH
    • +
    • SEARCH
    • +
    • NSPS
    • +
    +
  • +
+ +

In Nokia 2120 this test looks as follows: + +

+ + + + + + +
+Digital mode + + + + +
+ +rssi DVC d
+chan  l  a
+S   BB  TT
+
+Analog mode + + + + +
+rssi  s  d
+chan  l  a
+CS-state
+
+ +

and in Nokia 2160 is different: + +

+ + + + + + + + + + + + +
+DCCH mode + + + + +
+rssi DVC S
+chan  Pw A
+CS-state
+

+

+DTCH mode + + + + +
+rssi   s d
+chan   l a
+CS-state
+

+

+ACCH mode + + + + +
+rssi   D d
+chan  Pw A
+CS-state
+
+AVCH mode + + + + +
+rssi DVC S
+chan   l a
+CS-state
+
+ +

for Nokia 6160 it looks like follows: + +

+ + + + + + + + + + + + +
+DCCH mode + + + + +
+rssi DVC S
+Bchan Pw A
+CS-state
 
+

+

+DTCH mode + + + + +
+rssi DVC s
+Bchan Be l
+CS-state
 
+

+

+ACCH mode + + + + +
+rssi D d
+Bchan Pw A
+CS-state
 
+
+AVCH mode + + + + +
+rssi s d
+Bchan l a 
+CS-state
 
+
+ +

+

    +
  • B = current network/frequency

    +

      +
    • a = a-side 800mhz cellular
    • +
    • b = b-side 800mhz cellular
    • +
    • A = A-block (30 mhz) 1900mhz PCS
    • +
    • B = B-block (30 mhz) 1900mhz PCS
    • +
    • C = C-block (30 mhz) 1900mhz PCS
    • +
    • D = D-block (10 mhz) narrowband 1900mhz PCS
    • +
    • E = E-block (10 mhz) narrowband 1900mhz PCS
    • +
    • F = F-block (10 mhz) narrowband 1900mhz PCS
    • +
    +

    +

  • + +
  • Be = Bit Error rate in % (0-16)
  • +
  • TT = last received time alignment value (0-31)
  • +
  • rssi = received signal strength (dBm) (min= -113dBm, max= -51dBm, 2dB steps)
  • +
  • DVC = Digital Verification Color code (1-255, - = not locked)
  • +
  • D = DCC (Digital Color Code) on ACCH (0-3, - = not locked)
  • +
  • s = SAT color (0-2, - = not locked)
  • + +
  • d = data receiving status +

    +

      +
    1. no sync/no data
    2. +
    3. sync/not able to read
    4. +
    5. reading correcting
    6. +
    7. reading no correction
    8. +
    +

    +

  • + +
  • S = slot (1-3)
  • +
  • chan = channel number (0001-1023)
  • + +
  • Pw = Max access power +

    +

      +
    • DCCH: MS-ACC-PWR (0-10, - = not locked)
    • +
    • ACCH: CMAC (0-7, - = not locked)
    • +
    +

    +

  • + +
  • l = Tx level (0-10, - = TxOff)
  • +
  • a = audio state (0=off, 1=on)
  • + +
  • CS-state = Cellular State +

    +

      +
    • DCCH: SCAN-LOCK : Scanning and locking of DCCH
    • +
    • DCCH: DCCH-SEL  : DCCH selection
    • +
    • DCCH: CAMPING   : Camping
    • +
    • DCCH: REGISTR   : Registration proceeding
    • +
    • DCCH: WAIT-ORDER: Waiting for order
    • +
    • DCCH: ORIGINAT  : Origination proceeding
    • +
    • DCCH: RSELECT   : Reselection
    • +
    • DCCH: ORIG-SMS  : Sending SMS proceeding
    • +
    • DCCH: TERM-SMS  : Receiving SMS proceeding
    • +
    • DTCH: TCH       : Confirm traffic channel
    • +
    • ATCH or DTCH: CONVERSAT : Conversation
    • +
    • ACCH: OOR       : Out of range
    • +
    • ACCH: SCAN-PDCH : Scan primary dedicated control channels
    • +
    • ACCH: SCAN-SDCH : Scan secondary dedicated control channels
    • +
    • ACCH: SCAN-PCH  : Scan paging channels
    • +
    • ACCH: IDLE      : Idle
    • +
    • ACCH: ACCESS    : Access
    • +
    • ACCH: VCH      : Confirm voice channel
    • +
    +
  • +
+ +

This test in Nokia 6185/6188 is, of course ;-), different: + +

+ + + + + + + + + + + + + + + + + + + +
+CDMA control + + + + +
+ +CSST CHAN SP
+PPN EC/SO XF
+LOS XHO FR B
+-Rxx-Txx FER +
+

+

+CDMA traffic + + + + +
+ +CONV 0450 NP
+8000 2
+000 0D9 00 0
+-093+006 000
+
+

+

+AMPS control + + + + +
+ +RSSI S D
+CHAN P A
+CSST SID E
+XTBY MINMAX  +
+
+AMPS traffic + + + + +
+ + +-095 2 3
+0273 0 0
+CONV 16427 0
+Y +
+
CDMAAMPS
+
    +
  • CSST - Cellular State: IDLE, CONVE, PLIOS, TIME, SYNC, RELE, PAGE, TRFIN, W_OR
  • +
  • Chan - Channel
  • +
  • PPN - PseudoNoise offset
  • +
  • EC/SO - Energy per chip per noise
  • +
  • B - Current network/frequency. a,b are A and B 800 MHz AMPS (analog). A-F indicate the digital block in use
  • +
  • Rxx - Receive power in dB
  • +
  • Txx - Transmit power in dB
  • +
  • FER - Frame Error Rate
  • +
  • In CDMA traffic screen you have current used codec too (one from these below): +

      +
    • 8000 - 13 kbit/sec
    • +
    • 0001 - 8 kbit/sec
    • +
    • 0003 - EVRC
    • +
    + +
+
    +
  • RSSI - Received signal strength
  • +
  • S - Slot (1-3)
  • +
  • D - Digital Colour Code on analog control channel (0-3 or - for not locked)
  • +
  • CHAN - Channel
  • +
  • CSST - Cellular State: IDLE, CONVE, PLIOS, TIME, SYNC, RELE, PAGE, TRFIN, W_OR
  • +
  • SID - System ID (Cantel = odd number)
  • +
  • MINMAX: Minimum and Maximum RSSI over last time period ?
  • +
+
+ +

Test 2 +
More information about used cell + +

+ + + + + + +
+ + + + +
 aa b c Bdd 
+ ee f 
+ ggg hh iii
+ H=j mm nn
+
+ + + + +
PM RAR Ro BC
+RelR QLF
+CRO TO PenT
+H MAIO HSN
+
+ +

+

    +
  • aa - paging mode: + +

    +

      +
    • NO : normal
    • +
    • EX : extended
    • +
    • RO lub SB : paging reorganization
    • +
    +

    +

  • + +
  • +b - RAR (Random Access Retransmission): max amount of transmissions using +RACH channel (Random Access Channel - a phone-BTS +channel used to send a network access request – for example during logging in) +
  • + +
  • +c - if your phone is in roaming, R is displayed (otherwise empty). This information is also shown on the top of the display. +
  • + +
  • +dd - BSIC value for current cell
  • + +
  • +ee - reason of last connection end (this parameter is also present in +test 63 and test 39 +(you will find explanation there – see description of the first parameter)) +
  • + +
  • +f - RXQUAL_FULL (error rate in transmission with DTX disabled +(DTX state can be checked in test 12)): +it determines, how many errors have to be corrected by the phone, for the connection to be possible. Range 0 - 7 (0 – means none, +more than 5 – connection may be interrupted). + +

    + + + +
    RQ value01234567
    Max amount of errors<0,2%<0,4%<0,8%<1,6%<3,2%<6,4%<12,8%>12,8%
    +

    +

  • + +
  • +

    ggg - Cell reselect offset: range 0 - 63 (this value should be multiplied by 2 dB), 'xxx' +when transmitting. Needed to calculate C2.

  • + +
  • +

    hh - Temporary offset: range 0 - 7 (this value should be multiplied by 10 dB, 70 dB +means infinitely long time), 'xx' when transmitting. Needed to calculate C2.

  • + +
  • +

    iii - Penalty time: range 0 - 31 (it should be multiplied by 20 s), 'xxx' when transmitting. +Needed to calculate C2.

  • + +
  • +

    j - information about frequency hopping: + +

    +

      +
    • 0 - not used (single frequency used – so called RF (Radio Frequency))
    • +
    • 1 - used (different RF (Radio Frequencies) used)
    • +
    +

    +

  • + +
  • +

    mm - MAIO (Mobile Allocation Index Offset). +Range 0 - 63, 'xx' when j=0 (when frequency hopping is disabled – you can check +this in test 12)

  • + +
  • +

    nn - HSN (Hopping Sequence Number).Range 0 - 63, 'xx' when j=0 (when +frequency hopping is disabled – you can check +this in test 12) +

  • +
+ +

In some phones (for example, Nokia 8810 or Nokia 5110 with older firmware) +you will see parameters in two first lines only... + +

In Nokia 3110 this test looks as follows: + +

+ + + + + + +
+ + + + +
aaabbbccccddd
+aaabbbccccddd
+aaabbbccccddd
+w           z
+
+ + + + +
S CH C1 rx C2
+1 CH C1 rx C2
+2 CH C1 rx C2
+S    1N 2N  B
+
+ +

Description of the parameters can be found in menu test 3 +(in this model cccc parameters are always preceded by minus). + +

This test looks similiar in Nokia 2110i/2140 (description is also in +test 3): + +

+ + + + + + +
+ + + + +
+aaabbbcccc
+aaabbbcccc
+aaabbbcccc +
+
+ + + + +
+Serv cell 
+1. neighb
+2. neighb +
+
+ +

In Nokia 2120 this test looks as follows: + +

+ + + + + +
+ + + + +
+ENCR  CIPH
+DTX  XSTBY
+CS-state
+
+ +

+

    +
  • ENCR = when message encryption is on
  • +
  • CIPH = when Ciphering is on
  • +
  • DTX = when DTX is on
  • +
  • XSTBY= when enabled standby is on
  • +
  • CS-state = see previous parameter for details
  • + +
+ +

and in Nokia 2160 is different: + +

+ + + + + + + + + + + + +
+DCCH mode + + + + +
+mode   DTX
+ENCR  CIPH
+d    Be TA
+

+

+DTCH mode + + + + +
+ +mode   DTX
+ENCR  CIPH
+d    Be TA +
+

+

+ACCH mode + + + + +
+ +mode
+XSTBY
+       SID +
+
+AVCH mode + + + + +
+mode
 
+       SAT +
+
+
+ +

and here is for Nokia 6160: + +

+ + + + + + + + + + + + +
+DCCH mode + + + + +
+mode M C
+FB E SP pc
+net SID..
  +
+

+

+DTCH mode + + + + +
+mode DTX
+ENCR CIPR 
+d a TA S
+CODEC... +
+

+

+ACCH mode + + + + +
+mode
+XSTBY
+ SID      
  +
+
+AVCH mode + + + + +
+mode
 
+ SAT      
  +
+
+
+ +

+

    +
  • mode = DCCH, DTCH, ACCH, AVCH
  • +
  • SID = system ID [0-32767, - = not locked]
  • + +
  • DCCH mode +

    +

      +
    • M = maximum paging frame class supported by network (1-8)
    • +
    • C = current PFC (Paging Frame Class) (1-8)
    • +
    • FB = number of F-BCCH slots
    • +
    • E = number of E-BCCH slots
    • +
    • SP = number of SPACH slots
    • +
    • pc = PCH subchannel
    • +
    • net = supported network types, bit map (1=suported, 0=not, C=current): +first bit for Public, second for Private, third for Residential
    • +
    +

    +

  • + +
  • DTCH mode +

    +

      +
    • DTX = shown when DTX is on
    • +
    • ENCR = shown when message encryption is on
    • +
    • CIPH or CIPR = shown when voice ciphering is on
    • +
    • d = data receiving status (0=no sync, 1=sync)
    • +
    • Be = Bit Error rate in % (0-16)
    • +
    • TA = current time alignment (0-30)
    • +
    • a = audio state (0=off, 1=on)
    • +
    • CODEC... = current codec:

      +

        +
      • -EFR- = IS-136A ACELP coder
      • +
      + +
    +

    +

  • + +
  • ACCH mode +

    +

      +
    • XSTBY = shown when extended standby is on
    • +
    +

    +

  • + +
  • AVCH mode +

    +

      +
    • SAT = SAT validity as measured by DSP (0-32767)
    • +
    +

    +

  • + +
+ +

and for Nokia 6185/6188: + +

+ + + + + + + + + + + + + +
+CDMA control + + + + +
+ +PN1
+ECK         

  +

+

+

+CDMA traffic + + + + +
+ +PN1 PN3 PN5 
+ECK ECK ECK
+PN2 PN4 PN6
+ECK ECK ECK +
+

+

+AMPS control + + + + +
+ +X F S N N C
+SLEEP EMC
+SCC STC M
+RSSCPLCC CAL +
+
+AMPS traffic + + + + +
+ +2 2 1 0 4 1
+00015F927B13
+0029B 0A0 2
+140 372 0000
+
+
CDMA +

+

    +
  • PNx: CDMA PN offsets handoff canidate listing. Shows only the current offset while idling. +Shows 1 to 6 additional choices during traffic.
  • +
+
+ +

Test 3 +
Information about current and neighbor cells + +

+ + + + + + +
+ + + + +
aaabbbcccddd
+aaabbbcccddd
+aaabbbcccddd
+   ef gh
+
+ + + + +
SCH C1 rx C2
+1CH C1 rx C2
+2CH C1 rx C2
+    1N 2N
+
+ +

Meaning of these lines: + +

+

    +
  1. information about current cell
  2. +
  3. 1st neighbor cell
  4. +
  5. 2nd neighbor cell
  6. +
  7. e,f concern 1st neighbor cell, g,h concern 2nd neighbor cell
  8. +
+ +

+

    +
  • +aaa - CH (channel): number of channel used for communication with cell (decimal)
  • + +
  • +bbb - C1 values displayed only in standby mode. In active mode (ie. during connection) +letter B and BSIC for current cell are displayed. +
  • + +
  • ccc - RX: +minus is not shown if <=-100. Lets us calculate RXLev parameter value: + +

    + + + + + + + +
    RX (from)RX (up to)RXLev
    less than-110 dBm0
    -110 dBm-109 dBm1
    -109 dBm-108 dBm2
    ......... +
    -49 dBm-48 dBm62
    -48 dBmmore63
    +

    +

  • + +
  • +ddd - C2 parameter
  • + +
  • +e,g - contains F, if current cell is located on a restricted area (otherwise empty)
  • + +
  • +f,h: + +

    +

      +
    • +B means a cell in test phase (your phone can use barred cells – this can be enabled in +test 19)
    • +
    • N - a cell given for normal use
    • +
    • L - means low level
    • +
    • otherwise empty
    • +
    +

    +

  • + +
+ + + + + + + +
If you want to see, if actual used cell is barred or not, see on +test 19 (it depends on setting in that test)
+ +

Sometimes phone shows, that both C1 and +C2 for channel are equal -99 +- it means probably, that it wouldn't be able to log into it... + +

In Nokia 3110 this test looks like test 4. + +

It looks similiar in Nokia 2110i/2140 (desciption is in +test 4 too): + +

+ + + + + + +
+ + + + +
+aaabbbcccc
+aaabbbcccc
+aaabbbcccc +
+
+ + + + +
+3. neighb 
+4. neighb
+5. neighb +
+
+ +

In Nokia 2120 this test looks like test 4 in Nokia 2160. + +

In Nokia 2160 this test looks different (is displayed +in DCCH mode only): + +

+ + + +
+ + + + +
+RS SS SI b
+NA ND
  +
+
+ +

and here is for Nokia 6160: + +

+ + + +
+ + + + +
+RS SS SI b
+NA ND
+MA MD MO
  +
+
+ +

+

    +
  • RS = minimum Received signal Strength required to access cell (0-31, where 0=-113 dBm and 31=-51 dBm)
  • +
  • SS = minimum signal Strength Sufficient for candidate of reselection (0-31, where 0=-113 dBm and 31=-51 dBm)
  • +
  • SI = Scan Interval between consecutive strength measurements in hyperframes (1-16)
  • +
  • b = access burst size (0=normal, 1=abbreviated RACH)
  • +
  • NA = Number of Analog neighbors (0-24)
  • +
  • ND = Number of Digital neighbors (0-24)
  • +
+ +

and for Nokia 6185/6188: + +

+ + + + +
+OWNNUMBER
+ESN-00000000
+ESN-HEX
+SL P MD PC +
+ +

    +
  • OWNNUMBER - phone number
  • +
  • ESN - Electronic Serial Number
  • +
  • MD - [AD] changes to [DI] at 800 CDMA
  • +
+ +

Test 4 +
Information about neighbor cells + +

+ + + + + + +
+ + + + +
aaabbbcccddd
+aaabbbcccddd
+aaabbbcccddd
+  ef gh ij
+
+ + + + +
3CH C1 rx C2
+4CH C1 rx C2
+5CH C1 rx C2
+  3N 4N 5N
+
+ +

Meaning of the lines: +

    +
  1. 3rd neighbor cell
  2. +
  3. 4th neighbor cell
  4. +
  5. 5th neighbor cell
  6. +
  7. e,f concern 3rd neighbor cell, g,h 4th neighbor cell, i,j 5th neighbor cell
  8. +
+ +

Meaning of the letters is the same as in test 3 (i is the same as e, j is the same as f) + +

Sometimes phone shows, that both C1 and +C2 for channel are equal -99 +- it means probably, that it wouldn't be able to log into it... + +

In Nokia 3110 this test looks like test 5. + +

It looks similiar in Nokia 2110i/2140 (description is in +test 5 too): + +

+ + + + + + +
+ + + + +
+aaabbbcccc
+aaabbbcccc
+aaabbbcccc +
+
+ + + + +
+6. neighb 
+7. neighb
+8. neighb +
+
+ +

In Nokia 2160 this test looks different: + +

+ + + + +
+ + + + +
+bVo mod bs
+Tbat1 Tb2
+Wpwm FCmAh
+
+
+ +

+

    +
  • bVo = battery voltage
  • +
  • mod = charging mode + +

    +

      +
    • FAS = Fast charging
    • +
    • COL = Cold battery charging
    • +
    • MAI = Maintenance charging
    • +
    • ERR = wrong charger or battery not OK
    • +
    • LIC = LiION battery charging
    • +
    • TXO = charging, transmitter active (connection in progress)
    • +
    • *** = charger disconnected
    • +
    +

    +

  • + +
  • bs = battery is full or reason for fast charge termination + +

    +

      +
    • TI = max. charge Time elapsed
    • +
    • DV = dV/peak value detected (full)
    • +
    • BV = Battery voltage max limit
    • +
    • BT = Battery temp max limit (overheat)
    • +
    • ** = battery is not full
    • +
    +

    +

  • + +
  • Tbat1 = battery temp. a/d reading (subtracted from 1023)
  • +
  • Tb2 = battery temp. in C (not implemented)
  • +
  • Wpwm = PWM charge control output (000-250)
  • +
  • FCmAh = mAh rating of charge given to the battery
  • +
+ + +

In Nokia 2120 this test looks like follows + +

+ + + + +
+ + + + +
+ChargV:NNN
+ST hex des
+B:LLLL KKK
+
+ +

but it was not implemented. + +

In Nokia 6160 this test looks like follows + +

+ + + + +
+ + + + +
+SID #####
+NN NT NR
+Alphatag  
  +
+
+ +

+

    +
  • SID = System Identification Number (0 to 32767, odd for 'A' carriers, even for 'B' carriers, - = not locked)
  • +
  • Alphatag.. = textual end-user display of current system
  • +
+ +

and for Nokia 6185/6188: + +

+ + + + +
+CSST CHAN
+A B
+SID
+SD IT TM CAP +
+ +

    +
  • CSST - Cellular state: IDLE, CONVE, PLIOS, TIME, SYNC, RELE, PAGE, TRFIN, W_OR
  • +
  • CHAN - Channel
  • +
  • B - Network Band and Frequency (lowercase a,b = 800 MHz band; uppercase A,B = 1900 MHz band)
  • +
  • SID - System ID:

    +

      +
    • [17500] - Clearnet PCS
    • +
    • [16422] - BC Tel Mobility
    • +
    • [16xxx odd number] - Cantel AT&T
    • +
    +

  • +
+ +

Test 5 +
Information about neighbor cells + +

+ + + + + + +
+ + + + +
aaabbbcccddd
+aaabbbcccddd
+aaabbbcccddd
+  ef gh ij
+
+ + + + +
6CH C1 rx C2
+7CH C1 rx C2
+8CH C1 rx C2
+  6N 7N 8N
+
+ +

Meaning of the lines: +

    +
  1. 6th neighbor cell
  2. +
  3. 7th neighbor cell
  4. +
  5. 8th neighbor cell
  6. +
  7. e,f concern 6th neighbor cell, g,h 7th neighbor cell, i,j 8th neighbor cell
  8. +
+ +

Meaning of the letters is the same as in test 3 (i is the same as e, j is the same as f) + +

Sometimes phone shows, that both C1 and +C2 for channel are equal -99 +- it means probably, that it wouldn't be able to log into it... + +

In Nokia 3110 this test looks like test 6. + +

This test allows you to recognize, how many neighbor cells can "observe" phone +in the same time. Examples: in Nokia 6150 you can see info in all rows (8 cells), +in Nokia 5110/3310/6210 only in first row (6 cells). + +

In Nokia 3310/6210 parameters "ef" are never displayed (you can see "xx" only)... +These models during standby mode can see only 6 cells, during call 8... + +

In Nokia 2160 this test looks different: + +

+ + + +
+ + + + +
+ROM SW
+EPROM SW
+Prod type 
+
+ +

+

    +
  • ROM SW = ROM software version, e.g. V 65.08
  • +
  • EPROM SW = EPROM (flash) version, e.g. V 1.45
  • +
  • Prod type = product type, e.g. NHC-4NE
  • +
+ +

And here is for Nokia 6160: + +

+ + + +
+ + + + +
+S bandorde
+NC NP IRC
+RSCO RSLO
  +
+
+ +

+

    +
  • S = system indicator:

    +

      +
    • H = hometype system
    • +
    • P = partner roam
    • +
    • F = preffered roam
    • +
    • N = normal roam
    • +
    • X = no service
    • +
    • a, b, A, B, C, D, E, F = current band while scanning for a control channel +(see next parameter for details)
    • +
    +

  • + +
  • bandorde = network search order:

    +

      +
    • a = a-side 800mhz cellular
    • +
    • b = b-side 800mhz cellular
    • +
    • A = A-block (30 mhz) 1900mhz PCS
    • +
    • B = B-block (30 mhz) 1900mhz PCS
    • +
    • C = C-block (30 mhz) 1900mhz PCS
    • +
    • D = D-block (10 mhz) narrowband 1900mhz PCS
    • +
    • E = E-block (10 mhz) narrowband 1900mhz PCS
    • +
    • F = F-block (10 mhz) narrowband 1900mhz PCS
    • +
    +

  • + +
  • NC = Number of Cellular = number of probability blocks to scan in cellular bands
  • +
  • NP = Number of PCS - number of sub blocks to scan in PCS bands
  • +
  • IRC = IR Control:

    +

      +
    • 1 = only systems with home SID or SOC are accepted
    • +
    • 0 = any system not listed as forbidden is accepted
    • +

  • + +
  • RSCO = Rescan Count - rescan time in hyperframes
  • +
  • RSLO = Rescan Loop - defines when all the bands in bandorder are to be scanned
  • + +
+ +

and for Nokia 6185/6188: + +

+ + + + +
+1YNC_OK_097B
+SYNC_FAI4CC1
+FOCC_WOR587C
+WORD_OK_3E65
+
+ +

Test 6 +
Information about preferred and restricted networks of the inserted SIM card. + +

+ + + + + + + +
+ + + + +
aaabb  aaabb
+aaabb  aaabb
+aaabb  aaabb
+aaabb  aaabb
+
+ + + + +
LReg   1_For
+1_Pre  2_For
+2_Pre  3_For
+3_Pre  4_For
+ +

In Nokia 6250: + +

+ + + + +
LReg   1?For
+1?Pre  2?For
+2?Pre  3?For
+3?Pre  4?For
+ +

+ +

Meaning of the individual lines: + +

+ + + + + +
last registered network1st forbidden network
1st preferred network2nd forbidden network
2nd preferred network3rd forbidden network
3rd preferred network4rd forbidden network
+ +

+

    +
  • +last registered network - you used it last time. When you're in home country, it can be your home network +(you pay them for your calls - if it is, after choosing it manually (in Nokia 5110 - Menu 4-2-4) phone displays +"Home network selected"). 00000, when phone wasn't registered in any network +after enabling.
  • + +
  • +preferred network - network, to which your SIM card was logged (when it was in its range) – for example in roaming. +
  • + +
  • +forbidden network – your SIM card was in range of that network, but wasn’t allowed to log in... +
  • +
+ +
    +
  • +

    aaa - MCC (Mobile Country Code) +- code of the network home country (260 for Poland). Decimal value. +

  • + +
  • +

    bb - MNC (Mobile Network Code) +- network code (different for networks with the same MCC). + +

    Generally values here are decimal. Sometimes are exceptions (when and why ?) +and you can find hexadecimal value here: if you will convert it into +decimal and result treat as hexadecimal value (convert it into decimal value +again), you will have decimal value of this parameter (for example, +3F hex=63 dec; 63 hex=99 dec). More about it in the question 23. + +

    When you use phone working in PCS 1900 +system (for example, Nokia 6190), this number can be 3-digit long. It's decimal (always ?). +If it consist of two digits, you will see "F" instead of last (for example, +you will see "30237F" for 302-37 network)

  • + + +
+ +

What are these lists stored on SIM card for? Because: + +

+

    +
  1. +the phone doesn’t have to waste its power while trying to log to the network, which is forbidden for SIM card +(it is checked only once and then stored, so the phone doesn’t have to repeat this procedure anymore) +
  2. + +
  3. +when you have automatic network selection enabled, your phone in first turn searches for networks it was +previously using ("preferred"). +
  4. +
+ +

+The list of "preferred" and "forbidden" networks is written by the phone +(Nokia saves last chosen networks). Preffered networks can be also edited – for example in Motorola and Alcatel phones (not in Nokia). +Sometimes it is done by +the operator (he writes preferred and forbidden networks to the SIM card before selling it (it's known, that you cannot +log to competitive network – it can be stored in card programming phase). Both these lists can be changed using a +Czech program called SIMedit (www.compelson.cz/simedit.htm)... + +

URL http://kbs.cs.tu-berlin.de/~jutta/gsm/gsm-list.html +contains list of the MCC and MNC parameters for different networks. + +

+ + + + + + +
Using this menu you can check (probably – NOT ALWAYS!), where SIM card was used lately (in your country, abroad) +and where its owner was traveling +
+ +

In Nokia 2160 use this test, when you want to "disable" NetMonitor tests. + +

And here is for Nokia 6160: + +

+ + + +
+ + + + +
+PSC PSD   
+FSC FSD
+XSC XSD
  +
+
+ +

Intelligent Roaming Database (IRDB) statistics: + +

This lists the total count of SOCs and SIDs in each category. +The database has a total memory limit of 82 entries, +which may be distributed amongst these categories: + +

+PSC = number of Partner SOCs
+PSD = number of Partner SIDs
+FSC = number of Preffered SOCs
+FSD = number of Preffered SIDs
+XSC = number of Forbidden SOCs
+XSD = number of Forbidden SIDs
+ +

Partner SOC/SID = treated like the home system by the phone +
Preffered SOC/SID = preferred over neutral (undefined) systems when available +
Forbidden SOC/SID = rejected by the phone as service providers + +

and for Nokia 6185/6188: + +

+ + + +
CDMA
+ + + + +
+SID NID
+BASE ID
+P_REV
+MIN_P_REV    +
+
AMPS
+ + + + +
+0ORD_COR0CE3
+WORD_FAI0E76
+CTRL_FIL787D
+SAT_V_OK0004
+
+

CDMA

+

    +
  • SID - System ID:

    +

      +
    • [17500] - Clearnet PCS
    • +
    • [16422] - BCTel Mobility
    • +
    • [16xxx odd number] - Cantel AT&T
    • +
    • [00000]: Second SID assignment
    • +
    +
+

Are lines 3,4 CDMA specs ? [ANSI] for 1900 MHz, [TSB74] for 800 MHz CDMA +

+ +

Test 7 +
Information about current (recently monitored) cell + +

+ + + + + + +
+ + + + +
E A H C I BR
+a b c d e fg
+ECSC 2Ter MB
+h    i    j
+
+ + + + +
Serving Cell
+system info
+bits
+
+ +

+

    +
  • a - 1, if emergency calls (112) are possible
  • +
  • b - 1, if IMSI attach and IMSI detach are possible
  • +
  • c - 1, if the cell supports HR channels
  • +
  • d - 1, if C2 values are broadcasted
  • +
  • e - 1, system information 7 and 8 are broadcasted
  • +
  • f - 1, if the cell supports cell broadcasting (CBCH channel)
  • +
  • g - 1, if cell re-establishment is possible
  • +
+ +

Last two lines are present only in dual phones (GSM 900/1800 – for example Nokia 6150 and 3210): + +

+

    +
  • +h - 1 in standby mode, if ECSC (Early Classmark) sending is supported. During a call "x" is displayed. +
  • + +
  • +i - 1 in standby mode, if 2-Ter messages are supported. During call "x" is displayed +
  • + +
  • +j - information (if supported) which cells from both frequencies bands (900 and 1800 MHz) are shown +(MULTIBAND_REPORTING parameter value). Description from +Phase2+ ETSI GSM 05.08 version 5.4.0, section 8.4.3 "Additional cell reporting requirements for multi band MS" specification: + +

    +

      +
    • +0 - 6 strongest cells (with known and allowed NCC from +BSIC), regardless their frequency band (900 or 1800 MHz)
    • + +
    • +1 - strongest cell (with known and allowed +NCC from BSIC) in each frequency band on +BA list, except for frequency band of the current cell. Remaining positions should be used to show cells in frequency band +of the current cell. If there are free positions left, further strongest and recognized cells from other bands are shown (their +frequencies bands are not important). +
    • + +
    • +2 - like in 1, but two strongest cells are shown first (with known and allowed NCC from +BSIC) in each band... +
    • + +
    • +3 - three strongest cells are shown first...
    • +
    +
  • + +
+ +

If your phone wasn’t logged to any network, some default values are shown. + +

In Nokia 6160 this test is different: + +

+ + + + +
+User
+interface 
+display
  +
+ +

and here is for Nokia 6185/6188: + +

+ + + +
CDMA
+ + + + +
+CSST         
+DATE
+TIME
  +
+
AMPS
+ + + + +
+1AT_V_FA0000
+FVC_S_FA0000
+WFLG_INT7046
+NORMALRXFE25
+
+

CDMA

+

    +
  • CSST - Cellular state: [IDLE], [CONVE], [PLIOS], [TIME], [SYNC], [RELE], [PAGE], [TRFIN], [W_OR]
  • +
  • DATE - CDMA Network date
  • +
  • TIME - CDMA Network time
  • +
+
+ + +
Back to the top
+ +

+

[Part 1][Part 2][Part 3][Part 4][Part 5][Part 6][Part 7] +

+
+
+ +

Marcin Wiacek (WWW) +
Last modification: 5 January 2002
+ + + diff --git a/Docs/en_US/gsm/netmon/faq_net3.htm b/Docs/en_US/gsm/netmon/faq_net3.htm new file mode 100644 index 0000000..6807781 --- /dev/null +++ b/Docs/en_US/gsm/netmon/faq_net3.htm @@ -0,0 +1,2418 @@ + + + + + + + + + + NetMonitor in Nokia phones (4/7) + + + + + +

Main page

+
NetMonitor in Nokia phones (4/7) +

[Part 1][Part 2][Part 3][Part 4][Part 5][Part 6][Part 7] +

+ +
+ +
    +
  1. What is it ?
  2. +
  3. Do I need it ?
  4. +
  5. Does my phone use more power with NetMonitor enabled ?
  6. +
  7. How to activate it ?
  8. +
  9. Which NetMonitor version can be activated in my phone ?
  10. +
  11. Does NetMonitor activation void warranty ?
  12. +
  13. NetMonitor menu in my phone has different number than 10. Is it normal ?
  14. +
  15. NetMonitor menu in my phone has 11 number, hovewer previous position has 9 number. Is it normal ?
  16. +
  17. How to use it ?
  18. +
  19. Can I damage my phone ?
  20. +
  21. Glossary
  22. +
  23. Description of the individual tests
  24. +
  25. You can also use a program...
  26. +
  27. Can I use NetMonitor without SIM card inserted, without PIN number entered or when SIM card is not active ?
  28. +
  29. How can I disable NetMonitor ?
  30. +
  31. Do I need to disable NetMonitor before sending my phone to the service ?
  32. +
  33. Is it possible to re-activate NetMonitor after disabling it ?
  34. +
  35. Is NetMonitor available in analog Nokia phones ?
  36. +
  37. Does NetMonitor allow to use phone like broadcast station ?
  38. +
  39. I don't have all described tests in my phone. Why ? Can I increase their number ?
  40. +
  41. Does NetMonitor allow to identify place, where is my interlocutor ?
  42. +
  43. Does NetMonitor allow to identify place, where am I ?
  44. +
  45. What are NetMonitor codes ?
  46. +
  47. Is it the truth, that in phones with additional hardware changing frequency band NetMonitor doesn't work correct ?
  48. +
  49. Where can I find description of FBUS/MBUS protocol and commands connected with NetMonitor ?
  50. +
  51. I have non existing networks on the list of forbidden networks...
  52. +
  53. How to check frequency band (900 or 1800 Mhz), where phone work in this moment ?
  54. +
  55. Can I use DLR-2/DLR-3 cables for activating netmonitor ?
  56. +
  57. Can I activate netmonitor using Init File Editor (Nokia 9110) ?
  58. +
  59. Can I force phone to use one frequency band (900 or 1800 Mhz) only ?
  60. +
  61. How to change settings in tests ?
  62. +
  63. My phone has very short snandby time - it is possible to see the reason of it ?
  64. +
  65. Is netmonitor available in English version only ?
  66. +
  67. Information sources
  68. +
  69. Additional information
  70. +
  71. Does using/activating netmonitor cost anything ?
  72. +
  73. Does using netmonitor is legall ?
  74. +
  75. Which entries on SIM card are used in netmonitor tests ?
  76. +
  77. Can I activate netmonitor in 3310 using soft working with 3210 ?
  78. +
  79. After activating netmonitor/BTS TEST my phone can't find network...
  80. +
  81. Netmonitor shows different battery capacity than info on it...
  82. +
+ +
+ +

Test 8 + +

In Nokia 6185/6188 it looks like follows: + +

+ + + +
CDMA
+ + + + +
+TADD TDROP
+TCOMP TTDROP
+WW1 WW2 WW3
  +
+
AMPS
+ + + + +
+1STBY_RX7244
+XNRML_RX006C
+X_N_RX_O004C
+X_N_RX_F0020
+
+

CDMA

+

    +
  • TADD - threshold to add a new active PN (raw value ex: 28 = Ec/Io at -14 dB), [TDROP] : threshold to drop an active PN (raw value ex: 32 = Ec/Io at -16 dB)
  • +
  • TCOMP - an other threshold to add an active PN when a candidate PN becomes stronger than an active PN
  • +
  • TTROP - timer to drop a PN when power of this PN goes below TDROP
  • +
  • WW1 - value of the seach window for the active PN
  • +
  • WW2 - value of the seach window for the neighbour PN,[WW3]: value of the seach window for the remaining PN.
  • +
+
+ +
In Nokia 6210: + +

+ + + + + + + + +
+ + + + +
+CCCH
+Ts  01234567
+Rx  xxxxxxxx
+Tx  xxxxxxxx
+mCh x mPw xx +
+
+ + + + +
+9600/14000

+TS for Rx
+TS for Tx
+MainCh/PwrLv +
+
+ +

it is connected with data transmission. +In line with Rx and Tx you see, which Time Slots are used for it +(for receiving and transmiting). + +

When phone doesn't use HSCSD (High Speed Circuit Switched Data), +only one time slot is used both for transmiting and receiving +(it's visible also in test 1 then). + +

When use HSCSD, only this test gives full information about it... +You can check here, what can be maximal theoretical speed for downloading +and uploading data (number_of_used_slots * 9600 or number_of_used_slots * 14000)... + +
mCh seems to be "main" time slot among them used for transmission +(one that seems to be always used for both ways - probably can be viewed as the slot +that would be used if no HSCSD were used, and all other slots are "extra" slots to +increase number of sent/received data). It seems to be displayed in +test 1 too... + +
mPw seems to be the power level for the "main" time slot +(it seems to be displayed in test 1 too - units +are the same).... +The power levels for all 8 individual slots can be found in +test 9. + +

First line shows channel displayed in test 1 too. +It's available in new firmware only (5.02). + +

Test 9 + +

In Nokia 6185/6188 it looks like follows: + +

+ + + +
CDMA
+ + + + +
+006 330 270
+047 062 062
+342 102 030
+062 062 062
+
+
AMPS
+ + + + +
+1PT_1_OK724E
+RPT_1_FA0042
+TIME__2_0000
+MER2HIGH0002
+
+

CDMA

+Tracked PN Offsets (lines 1,3) and EC/SO (Energy per chip per noise). +An EC/SO of 062 likely means not really usable? lower numbers are better +strengths). See test 2 for PN offset information. +

+ +
In Nokia 6210: + +

+ + + + + + + + +
+ + + + +
+mCh x mPw xx
+ xx xx xx xx
+ xx xx xx xx
  +
+
+ + + + +
+MainCh/PwrLv
+PwrLv TS 0-3
+PwrLv TS 4-7
+  +
+
+ +

and is connected with HSCSD (High Speed Circuit Switched Data) +and shows power levels for each time slot +used in data transmission +(more info about data transmission in Nokia 6210 is visible also in +Test 8). Units here seems to be the same to units +in test 1 (power level used for "main" +time slot in transmission is displayed also there). + +

Test 10 +
Network information (concern current or recently monitored network) + +

+ + + + + + +
+ + + + +
TMSIaaaaaaaa
+T321:bbb/ccc
+PRP:d  ee ff
+ ggggg  hhh 
+
+ + + + +
TMSI(hex)
+T3212ctr/tim
+PaRP DSF AGC
+  AFC   Ch
+
+ +

+

    +
  • +aaaaaaaa - TMSI: +a number assigned to each phone logged to the network (it can be done, for +example, after power on, a call, sending/receiving SMS, requesting some services, +PLU). Value from the SIM card +(each new number is written there) in hexadecimal format. If assigning this +number fails (for example because transmitter was turned off in +test 45 or SIM card is not active), +'xxxxxxxx' is shown here and the phone displays 'No network coverage' message (when you try +to make a call). +
  • + +
  • +bbb - value of the so called T3212 counter: the phone periodically informs +the network about its location +(makes a PLU). 'bbb' counter means time from +last update and can be a value from 1 to 'ccc' (where 1 means 6 minutes, 2 - +2 * 6 min = 12 min, etc.). This counter is also cleared after each connection, +sending/receiving SMS or requesting a network services - for example call +diverting (but the counters from test 64 +don't change). The value doesn't change (it's always equal 0) with not active +SIM card.
  • + +
  • +ccc - max T3212 counter value: period of time, after which the phone sends +information about its location - makes a PLU +(range from 1 to 240, where 1 means 6 min between updates and 240 means +24 hours (240*6min)). This value is received from the network (if it is 0, +the network doesn't require information about phone location). For Polish +networks Era GSM and +Plus GSM it's equal 30 (3h), for +Idea 2h. Displayed normally +even, when SIM card is not active. +
  • + +
  • +d - Paging Repeat Period, sometimes called DRX (Dincontinuous Receive): +period of time, after which the phone turns its receiver on to check whether +someone is calling us (range from 2 to 9 - the higher, the longer time between +these checks so the phone uses less power: +PRP=2 means about 0.95 s, a PRP=9 equal 4.25 s.). +Interesting thing is that max standby times are usually calculated by the manufacturers +for this parameter equal 9. +
  • + +
  • +ee - DSF (Downlink Signalling Failure). If it is negative, +0 is shown. Max value of this parameter is 45. When the phone uses +TCH channel, xx is displayed. +
  • + +
  • +ff - AGC (Automatic Gain Control) - automatic gain control +of the phone receiver. The stronger the signal from BTS, +the lower this value. It is displayed correctly only when the phone uses +TCH/SDCCH channel +(for example: during a call) and can be a value from 0 to 96 (dB ?). +
  • + +
  • +ggggg - in some English descriptions it's "VCTCXO AFC DAC control" - a value +between -1024 and 1023. In help it's described as AFC +(Automatic Frequency Control) - automatic adjusting phone's +receiver to the frequency of the signal transmitted by BTS. +The more this value differs from 0, the more frequency corrections have to be +made by the receiver (it depends on the channel used in communication with +BTS - see test 1) +to "match" the BTS. +
  • + +
  • +hhh - CH (channel): number of channel used in communication with cell (decimal) +
  • +
+ +

In Nokia 2110i/2140: + +

+ + + + + + +
+ + + + +
+Pagrepp. d
+T:aaaaaaaa
+T3212: bbb +
+
+ + + + +
+PagRepPer.
+TMSI
+T3212 +
+
+ +

In Nokia 3110 this test looks like follows: + +

+ + + + + + +
+ + + + +
TMSI:aaaaaaaa
+T3212:bbb/ccc
+PRP:d  ee ff
+w gggg  hhh z
+
+ + + + +
TMSI(hex)
+T3212 ctr/tim
+PagRP DSF AGC
+S AFC   CH  B
+
+ +

If the phone after power on wasn't logged to any network, +some default values are displayed here (except for TMSI). + +

Some of these values can be also found in Nokia service programs +(for example in WinTesla - in menu "Testing" / "RF Information"). + +

+ + + + + + +
In test 64 you can check, +how many times your phone has sent an information about its location. +If you have sent an SMS, you can check (exact to 6 min), when you did it +(if it wasn't earlier than value 'ccc' for your network) - check 'bbb' parameter value. +
+ +

And here is this test for Nokia 6185/6188: + +

+ + + +
CDMA
+ + + + +
+414 084 222
+062 060 062
+420 366 252
+062 062 062 +
+
+
AMPS
+ + + + +
+1X_XSTBY000D
+SYNC_LOS0031
+DEC_SAME0000
+VOTED_BT0000
+
+

CDMA

+Tracked PN Offsets (lines 1,3) and signal strengths. +

+ +

Test 11 +
Identification of the currently used (last monitored) network + +

+ + + + + + +
+ + + + +
CC:aaa NCbbb
+  LAC:ccccc
+  CH : deee
+  CID:fffff
+
+ + + + +
 MCC    MNC
+LocAreaCode 
+ServChannel
+   CellId
+
+ +

+

    +
  • +aaa - MCC (Mobile Country Code): code of the network home +country (260 for Poland) - decimal. +
  • + +
  • +bbb - MNC (Mobile Network Code): network code +(different for networks with the same MCC - for example, in Poland: +01 for Plus GSM, 02 for Era GSM and +03 for Idea). + +

    Generally values here are decimal. Sometimes are exceptions (when and why ?) +and you can find hexadecimal value here: if you will convert it into +decimal and result treat as hexadecimal value (convert it into decimal value +again), you will have decimal value of this parameter (for example, +3F hex=63 dec; 63 hex=99 dec). + +

    When you use phone working in PCS 1900 +system (for example, Nokia 6190), this number can be 3-digit long. It's decimal (always ?). +If it consist of two digits, you will see "?" instead of last (for example, +you will see "37?" for "37")

    +

  • + +
  • +ccccc - LAC (Location Area Code): code of the current +cell area (decimal or hexadecimal). The size of this area (with the same LAC) +depends on the network. After changing LAC, the phone makes +Location Update.
  • + +
  • +d - H, if frequency hopping is enabled (otherwise empty). This information +can be also found in test 1 and +test 12.
  • + +
  • +eee - CH (channel): number of channel used in communication with cell (decimal) +
  • + +
  • +fffff - CID (Cell Identifier): number of the current cell +(each cell in given area has its own unique ID number) - shown decimal or hexadecimal. +
  • +
+ +

LAC and CID format (if they're displayed decimal or hexadecimal) depends +on your phone's model and its software version (for instance: Nokia 3210 +and Nokia 5110 with newer software display decimal values, while Nokia 5110 +with 4.59 (and older) firmware and some previous models (like Nokia 3110) +use hexadecimal format). + +

GSM phones recognize the network using MCC and MNC codes +(list of these codes can be found at +http://kbs.cs.tu-berlin.de/~jutta/gsm/gsm-list.html). +Network names shown on phone's display (like 'ERA GSM', +'Plus GSM' or 'Idea') +are stored in phone's memory (they're set by the producer - cellular network doesn't +send any name, just these two numbers). In order to correctly recognize a +new network, you must upgrade the firmware of the phone (or it won't display +network name). Some older phones, like Nokia 2110i (or newer models +without firmware upgrade) display names like PL-03 (they recognize that +MCC=260 is Poland (which has international code PL), but they don't know +the network name - only its MNC). One (?) text name can also be changed +using appropriate programs: + +

+ +

In Polish version of this manual the description of BTSes contains +URLs of pages with BTSes lists - with their locations, LAC and CID +(for Polish networks). + +

If the phone after power on wasn't logged to any network, some default values are displayed here. + +

In Nokia 2110i/2140: + +

+ + + + + + +
+ + + + +
+aaa eee bb
+LAC:  cccc
+CellI:ffff +
+
+ + + + +
+MCC CH MNC
+LocAreaCod
+CELL IDent +
+
+ +

In Nokia 3110 this menu looks like follows: + +

+ + + + + + +
+ + + + +
CC:aaa NC:bbb
+  LAC:cccc
+  CH :deee
+w CID:ffff  z
+
+ + + + +
 MCC     MNC
+ LocAreaCode
+ ServChannel
+S CellId    B
+
+ +

And here is for Nokia 6185/6188: + +

+ + + +
CDMA
+ + + + +
+162 054    
+062 062
+186 084
+062 051 +
+
+
AMPS
+ + + + +
+11_BETTR0000
+SYNC_SAM0000
+MSG__BTR0000
+SFLG_BTR0000
+
+

CDMA

+Tracked PN Offsets (lines 1,3) and signal strengths (only, when phone is in CONV state) +

+ +

Test 12 +
Parameters of currently used (last monitored) network + +

+ + + + + + +
+ + + + +
CIPHER :aaa 
+HOPPING:bbb
+DTX    :ccc
+IMSI   :ddd
+
+ + + + +
CipherValue
+HoppingValue
+DTXValue
+IMSIAttach
+
+ +

+

    +
  • +aaa: + +

    +

      +
    • +OFF: phone doesn't transmit
    • + +
    • +A51: phone transmits, data are coded using A5/1 algorithm (more complicated version)
    • + +
    • +A52: phone transmits, data are coded using A5/2 algorithm (a version designed +for use in some "doubtful" countries - potential future enemies (like Iraq)). It's easier to +decode and crack, but still secure (not cracked) - but I can be wrong ! +
    • +
    +

    +

  • + +
  • +bbb - informs, whether frequency hopping is enabled (ON) or disabled (OFF) +
  • + +
  • +ccc - informs, whether DTX is used (ON) or not (OFF) by phone +
  • + +
  • +ddd - informs, whether IMSI attach is allowed (ON) +
  • +
+ +

All the values in this menu are updated only when the phone uses TCH +channel. + +

If the phone after power on wasn't logged to any network, some default values are displayed here. + +

More information about A5/1 and A5/2 algorithms can be found at www.scard.org/gsm/. + +

In Nokia 2110i/2140: + +

+ + + + + + +
+ + + + +
+CIPHER aaa
+HOPPIN bbb
+DTX    ccc +
+
+ + + + +
+CIPHERING
+HOPPING
+DTX ON/OFF +
+
+ +

In Nokia 3110 this test looks as follows: + +

+ + + + + + +
+ + + + +
CIPHER :aaa
+HOPPING:bbb
+DTX    :ccc
+w IMSI :ddd z
+
+ + + + +
CipheringValu
+HoppingValue
+DTXValue
+S IMSIAttachB
+
+ +

In Nokia 6185/6188 in AMPS it looks different: + +

+ + + + +
+1IN_FAIL0044
+DYN_FAIL01C7
+MIN2_FAI0045
+DYN2_FAI01CB
+
+ +

Test 13 +
Information about DTX in currently used (last monitored) network + +

+ + + + + + +
+ + + + +
aaaaaaaaaa 
+DTX(DEF):bbb
+DTX(BS) :ccc
+
+ + + + +
DTXMode
+DefaulDTXSta
+DTXValFromBS
+
+ +

+

    +
  • +aaaaaaaaaaaa: information, whether the phone uses DTX: + +

    +

      +
    • DTX:ON - yes, it uses
    • +
    • DTX:OFF - no, it doesn't use
    • +
    • DTX:DEF - yes or not (depends on default setting - bbb parameter)
    • +
    • NOTALLOWED - the phone cannot independently decide to use DTX or not (BTS doesn't allow this)
    • +
    +

    +

  • + +
  • bbb - default DTX setting: ON or OFF.
  • + +
  • +ccc - DTX value from BTS +(on uplink - a channel used in communication in direction phone-BTS): + +

    +

      +
    • MAY - BTS lets the phone "decide", whether to use DTX or not
    • +
    • USE - BTS forces DTX usage
    • +
    • NOT - BTS doesn't allow to use DTX
    • +
    +

    +

  • + +
+ +

If the phone after power on wasn't logged to any network, some default values are displayed here. + +

In Nokia 2110i/2140: + +

+ + + + + + +
+ + + + +
+cccccccccc
+MS DEF:bbb
+dddddddddd +
+
+ + + + +
+DTX STATUS
+DEF STATE
+BS PARAM +
+
+ +

+

    +
  • cccccccccc - the same to aaaaaaaaaa. Values: "DTX  ON", "DTX OFF", "DTX DEF" lub "NOTALLOWED"
  • +
  • dddddddddd - the same to ccc. Values "MS MAY USE", "SHALL USE" or "SHALL NOT"
  • +
+ +

+ + + + + + +
If BTS allows this (if the last parameter's +value is MAY), you can decide whether to use DTX +or not by entering this menu in a direct mode. +
+ +

Test 14 +
By entering this menu in direct mode, you can change aa parameter value from 01 (default) to 00 (or vice versa). + +

+ + + + + + +
+ + + + +
 SCREENING  
+ INDICATOR
+   IS aa
+
+ + + + +
Use menu to 
+  change
+ Screening
+ indicator
+
+ +

In Nokia 2110i/2140: + +

+ + + + + + +
+ + + + +
+SCREEN IND
+SET TO  aa
  +
+
+ + + + +
+CHANGE
+SCREENING 
+INDICATOR +
+
+ +

Test 15 + +

In Nokia 5190/6190: + +

+ + + + + + +
+ + + + +
+aaa bbb cccc
+ddd eee f
+gg hh ii
+jjjjjjjjjj +
+
+ + + + +
+CH RxL TxPwr
+MdSt SAT DCC
+ST   TxA RxA
+  CS STATE +
+
+ +

When you don't have additional module +(it's between "main" phone and battery), you will see "AMPS display not available" +here. After connecting it you will see values connected +AMPS: + +

+

    +
  • aaa - channel used for communication with cell (0 during standby)
  • +
  • bbb - level of received signal in dB
  • +
  • ccc - level of the transmitted signal (0 during standby)
  • +
  • eee - SAT, x during standby
  • +
  • f - DCC (Digital Color Code) on the +ACCH channel (0-3, - = not locked), x during standby
  • +
  • jjjjjjjjjj - cellular state: +

    +

      +
    • IDLE - standby
    • +
    • CALL GOING - exchange of data required to make call
    • +
    • IN CALL - during call
    • +
    • PCH INIT - scanning available paging channels ? (for example, after call)
    • +
    • CCH INIT - scanning control channels ?
    • +
    • ACCESS - accesing network ?
    • +
    +
  • +
+ +

and 6210: + +

+ + + + + + + + +
+ + + + +
+  Tx27178506
+ReTx42645758
+  Rx27178505
+RTRq27178504 +
+
+ + + + +
+Sent frames
+Re-transmis.
+Rec. frames
+Re-send reqs +
+
+ +

In Nokia 6250 help is the same to help from 6210, but screen with values is EMPTY. + +

In Nokia 2110i/2140: + +

+ + + + + + +
+ + + + +
+xxx SIM yy
+LAC:  zzzz
+wwwwwwwwww +
+
+ + + + +
+MCC    MNC
+LocAreaCod
+Upd status +
+
+ +

Values here can be different from these in test 11. +They're taken from file Location information (6F7E) on SIM card. + +

+

    +
  • xxx - MCC
  • +
  • yy - MNC
  • +
  • zzzz - LAC (hexadecimal)
  • +
  • wwww - state of Location Update +
      +
    • +Updated - value from SIM (bits b3 - b1) 0 0 0, meaning: done Location Update in Location Area, +which is shown on the screen +
    • +
    • NotUpdated - value 0 0 1, meaning: Location Update not done or didn't end with success
    • +
    • PLMN Not A - value 0 1 0, meaning: LPLMN not allowed
    • +
    • LA Not All - value 0 1 1, meaning: Location Area not allowed
    • +
    • Reserved - value 1 1 1, reserved for future use
    • +
    • Undefined0 - value 1 0 0, undefined value
    • +
    • Undefined1 - value 1 0 1, undefined value
    • +
    • Undefined2 - value 1 1 0, undefined value
    • +
    • LA NotRead - file wasn't read from SIM
    • +
    +
  • +
+ +

Test 17 + +

+USERS OF NOKIA 6210 HAVE TO READ FIRST NOTES WRITTEN ON THE END OF DESCRIPTION +FOR THIS TEST. IN OTHER CASE THEY CAN DAMAGE THEIR PHONES. + + +

This menu lets the phone test one concrete channel used in communication +with cell (the phone doesn't seek channel with the strongest signal, but uses +the channel chosen by you: you can use channels 1-124 for GSM 900 +and 512-885 for GSM 1800). Each GSM network has its own assigned channels +from these ranges (which means that each two networks in one country can't +use the same channels - for example, in Poland Plus GSM +cannot use Era GSM channels and vice versa). + +

+

+ + + + + + + + + +
GSM 900 (1-124)
GSM 1800 (512-885)
TIM (222-01)
8-64 (16 most important cities) or 8-50 (outside them)
736-760
Omnitel (222-10)
66-118 (16 most important cities) or 77-118 (outside them)
861-885
Wind (222-88)
52-75 (outside 16 most important cities)
761-810
Blu (222-??)
-
811-860
Plus GSM (260-01)
1-14 and 37-67 (37 and 67 for testing)
749 - 760, 850 - 884 ?
Era GSM (260-02)
15-36 and 68-90 (15 and 36 for testing)
736 - 748, 811 - 847 ?
Idea (260-03)
91-114, 115-124 from January 2004
733, 763 - 810
+
+ +

You can enter numbers of channels belonging to any network (if you enter +a channel of forbidden network, you will see all network parameters, +but obviously you won't be able to establish connection (except for +emergency calls)). After enabling this test your phone won't be able to make +handovers. + +

To enable this test, proceed as follows (sometimes this procedure doesn't +work - but turning the phone off and then on often helps; I don't know why): + +

+

    +
  • +save (change) desired channel number on position number 33 of the SIM card's +phone book in decimal format (not in phone's memory!) - +if you save '0' there, this test will be inactive! +However, this step is not necessary, if this number was stored there earlier - +you can check this with 33# code). Remember, that phone checks used format. Here are +some examples of correct entries: "1", "700".
  • + +
  • go to test 17
  • + +
  • once again enter test 17 directly
  • + +
  • switch your phone off and then back on
  • +
+ +

To disable this test: + +

+

    +
  • enter test 17 directly
  • + +
  • switch the phone off and back on (sometimes it isn't needed - +phone should disable test, when loose signal on this channel; +but it's better to do that to avoid potential problems) +
  • +
+ +

Some interesting results can be achieved, when (guess why ?): + +

+

    +
  • you enable this test
  • + +
  • then you switch test 19 to REVERSE
  • + +
  • turn off the test, but not the phone (by entering test 17 one time in a direct mode)
  • +
+ +

In this case the phone "jumps" from one channel to another and monitors +channels of different networks - you can see LAC and CID codes of the cells. +Furthermore, the phone cannot log to its home network (though it displays +parameters of its channels). Several times I got "Insert SIM card" or +"SIM card rejected" messages - it may be some bug in firmware. After turning +the phone off and then on everything works fine. + +

+ + + + + + +
The above tip can be used for fast battery discharging (however your phone +won't be accesible in the network). + +

If you want to check some informations about different than your network, you +can use different tip too: + +

    +
  1. select the test, where will be displayed interesting for you information +about this network
  2. +
  3. go to the manual network selection (for example, Menu 4-2-4-2 in Nokia +5110)
  4. +
  5. select interesting for you network
  6. +
  7. wait few seconds (some time is required to start logging into this network) +and press "Quit" (NOT (c) key) or wait, until phone will display any message +(for example, that logging wasn't successfull)
  8. +
  9. press fast (c) key to leave phone's menu
  10. +
+ +

Information about interesting for you network will be displayed during few seconds... + +

+ +

I heard about some cases, when this test turned itself spontaneously on +after loosing the signal by the phone. I didn't experience this, but if this +has ever happened to you, just save 0 on 33rd position of the SIM card's phone +book. + +

+ + + + + + +
Since Nokia 51xx/61xx phones don't allow choosing the position for the phonebook entry, +I want to suggest: + +
    +
  1. check whether you already have some number stored on this position +(using 33# code)
  2. + +
  3. +if the phone displays 'Invalid location', you have to add new entries to the +phonebook until you hit this position and the phone doesn't display this +message (repeating 1st step after each new entry) +
  4. + +
  5. +after displaying the number, you have to find out who's number is this. +You can do it in two ways: + +

    +

      +
    1. +just recall (or check the whole phonebook) +
    2. + +
    3. +turn off the transmitter in +test 45 and call this number +(the name assigned to this number will be show on screen - you will also find +it on the 'Last dialed' list) +
    4. +
    +

    +

  6. + +
  7. +edit the phone book (this position) - you can change the name or the (channel) number +
  8. + +
  9. +if the phone asks you, whether to replace the old number or to save it on new location, choose the former option +
  10. +
+ +

+To store number on chosen location you can also use other Nokia phone +(for example 2110), other cellular phones or appropriate software. +For example: in Nokia Cellular Data Suite you can export list of phone numbers +to file, open it in editor, change and upload to phone. It's simple, isn't it ? +

+ +

+

+ + + + + +
+ + + + +
+
  BTS TEST  
+    aaa
+
+ + + + +
Use menu to 
+toggle BTS
+test ON/OFF
+
+ +

+

    +
  • +aaa - can be set to "ON" or "OFF"
  • +
+ +

+ + + + + + +
This test can be very usefull when: + +

+

    +
  • +you want to use some particular cell (for example to test whether it is +possible to use a cell located 20 km away) +
  • + +
  • +you'd like to avoid roaming (which is much more expensive) - for example +when you are close to the border (and the phone constantly logs to the network +of the neighbor country, because it has a stronger signal) - you just switch +your phone to the channel used by your network... +
  • + +
  • +other available network has very strong signal (for example -85 dBm) and the +signal of your home network is very weak (-100 dBm) - your phone can have +serious problems with logging to your network until you use this test +
  • + +
  • +you want to monitor the state of some very weak channel - I received some mails, that +the lowest measured with this method signal strength was -118 dBm +
  • +
+
+ +

In Nokia 2110i/2140: + +

+

+ + + + + +
+ + + + +
+ +BTSTESTaaa +

  +

+
+ + + + +
+Tells if
+BTS test
+is ON/OFF  +
+
+ +

Number of channel must be saved in 98 position of B memory. + +

Many users of Nokia 3210 say, that in this model there are problems with enabling +and disabling this test - part of firmware connected with it has probably some bug(s)... +I read even in one newsgroup such post (here is in translation): + +

+Few people after enabling test 17 made reclamations in service, that phone +doesn't work. The most interesting is (I'm sure, that in one case) reclamation +was taken into consideration !!!! - phone was exchanged !!! + + +

In new models (Nokia 3310, 6210, 6250, 8210) it's a little different: + +

+

+ + + + +
+ + + + +
+BTS TEST
+   aaa

+CH :  bbbb   +
+
+ +

...but you can use it very similiar (to enable): + +

+ +

    + +
  • enter it directly. You should see: + +

    + + + + +
    +BTS TEST
    +REQUESTED

    +CH :  bbbb   +
    + +

    where instead of "bbbb" parameter you should see value read from position 33 +from phonebook from SIM card (or "xxxx", when value there was wrong, SIM card +was not ready, etc. - of course, you will not enable this test then). +

  • +
  • restart phone - "aaa" parameter should change to "ON"
  • +
+ +

To disable this test you should: +

    +
  • enter directly into it
  • +
  • restart phone - "aaa" parameter should change to "OFF"
  • +
+ +

BE CAREFULL IN MODEL 6210 WITH THIS TEST +In firmware 4.27 (older probably too, I don't know, if it's corrected in newer) +phone can display CONTACT SERVICE after using it or +there could be different problems with it. Here are three known examples: + +

    +
  • after enabling test everything was correct. After writting number 0 +and resetting phone (it was one method for disabling this test in older models) +CONTACT SERVICE was displayed. User put SIM card into another phone, changed +33 position in phonebook to CORRECT channel number +(1-124, 512-885), put SIM back to 6210 and normally used it (second +6210 with the same symptoms wasn't repaired after making it). +
  • +
  • in this concrete example Nokia 6210 displayed info about finding channel 79. +User written its' number in phonebook on 33'th position. After third reset +of phone CONTACT SERVICE was displayed. SIM card was put into Nokia 5110 and +channel number was changed to 76 (this channel was visible in this phone). +When SIM card was put back into Nokia 6210 phone, it was possible to enable +it. In this test phone displayed 'BTS TEST ON CH:79' (channel 79 was also visible +in test 3).
  • +
  • after enabling this test phone was restarted. After entering PIN it hanged, +"Code accepted" was displayed and it squeaked. And the same problem +was visible after each reset. User disabled netmonitor via cable. +After it phone phone very often wasn't able to find network and user had +to disable it. Solution was disconnecting battery for about 1 hour. +Problems with finding +network were visible during about next 2 weeks.
  • +
+ +

Test 18 + +

+ + + + + + +
This menu allows you to turn on constant backlight of the screen and keyboard +(LIGHTS ON). This can be used for very fast battery discharging. We can also +use it as a flashlight - for example to check a schedule, your location on a +map, to be visible on the road :-), etc. But there is one condition: +any of the NetMonitor tests must be visible on the screen. + +

If you turn this test on and then back off, the light will go out +(it won't react on key presses) for several minutes (good for games - +saves battery)... + +

The light can be also constantly enabled, if you connect a car kit +(or simulate it - check test 75) +and "Light" setting (Menu 2-5 in Nokia 5110) will be set to "All". +This will work without NetMonitor (and any of its test) enabled! +

+ +

Changes to this menu can be made by entering it directly. + +

+

+ + + + + +
+ + + + +
+
   LIGHTS   
+    aaa
+
+ + + + +
Use menu to 
+  toggle
+  lights
+  ON/OFF
+
+ +

+

    +
  • +aaa - can be set to either "ON" or "OFF" (default)
  • +
+ +

In Nokia 2110i/2140: + +

+

+ + + + + +
+ + + + +
+ +LIGHTS aaa

  +

+
+ + + + +
+Control   
+Lights
Status +
+
+ +

Test 19 + +

+ + + + + + +
Each operator before giving a new or repaired base station +(BTS) for normal use, tests its cells. +GSM phones read this information and avoid using these cells. However, using +this menu, you can set your phone to use such cells, too +(DISCARD option) - sometimes it allows you to "improve" the coverage and range of your +network . + +

If you want your phone to use only such barred cells, just set this menu to +REVERSE (but you won't be able to make or receive calls if there are no tested +cells in your neighborhood - good phone lock ?). + +

ACCEPTED means that your phone uses only normal cells, which are allowed for use +(it works like any other phone). +

+ +

Information about cell status is broadcasted on BCCH +channel as a CELL_BARRED parameter value. The settings of this menu can be +changed by entering it directly (but if you have previously enabled test in +test 17, current cell may have other status +than the chosen here (for example: you chosen barred cells only, but the phone +uses a normal one)). + +

New settings are applied during next signal quality measurements (you can +advance this by making a call, forcing the phone to search for a network or +by holding the antenna with fingers for certain amount of time). + +

Sometimes your phone may not be able to find cells with particular status +- it will show parameters of the cells with such status belonging to other +network (once I've set this menu to REVERSE and the phone started displaying +data of barred cells in forbidden for my SIM card network, because there were +no tested my home network cells in my neighborhood). Information about cell +status can be found in test 1 to +test 5. + +

+

+ + + + + + + + + +
+ + + + +
+
  CELL BARR 
+  ACCEPTED
+ +

The phone works as any other GSM phone (default) - only normal cells +

+ + + + +
+
  CELL BARR 
+  REVERSE
+ +

The phone uses only tested cells

+ + + + +
+
  CELL BARR 
+  DISCARD
+ +

The phone uses all existing cells (both normal and barred ones)

+ + + + +
Use menu to 
+toggle cell
+barr status
+DIS/ACC/REV
+
+ +

In Nokia 2110i/2140: + +

+

+ + + + + + + + + +
+ + + + +
+CELL
+BARRING
+ACCEPTED   +
+ +
+ + + + +
+CELL
BARRING
+REVERSED  
+ +
+ + + + +
+CELL
BARRING
+DISCARDED 
+ +
+ + + + +
+ DISCARD  
+ CELL
+ BARRING +
+
+ +

Test 20 +
Information about battery and phone charger mode + +

+ + + + + + +
+ + + + +
 aaa   bbbbb
+Tccc     ddd
+Ceee    Wfff
+gggg    hhhh
+
+ + + + +
BatVol ChMod
+BTemp ChTime
+ChrgVol Pwm
+ BTyp  BFDC
+
+ +

+

    +
  • +aaa - battery voltage (V/100 - for instance 7.19V is displayed as 719). +Range 0.00 - 9.99 V. When value decreases, your battery is more discharged +- you have less standby/speech time to next charging... +
  • + +
  • +bbbbb - information about battery charging: + +

    +

      +
    • xxxxx - charger not connected or charging disabled
    • +
    • BatCk - checking battery charge level (after each +TCH channel usage (a call) when charging NiMH battery)
    • +
    • BSIFa - charging interrupted (battery BSI +(Battery Size Indicator: one of battery connectors connected +with ground (BGND) to resistor inside battery - phone measure its +opór and can read battery type)) +measurement failed) +
    • +
    • CelBr - charging interrupted (one or more cells broken inside battery)
    • +
    • ChaCk - EM checks charger
    • +
    • Charg - charging
    • +
    • ColdC - charging a cold battery
    • +
    • ColdM - battery is cold, maintenance charging
    • +
    • CurFa - charging interrupted (charger current measurement failed)
    • +
    • DisCh - discharging
    • +
    • Faile - error
    • +
    • FastC - fast charging
    • +
    • FullM - battery full, maintenance charging
    • +
    • F_Che - checking fast charging process
    • +
    • HotM  - battery is hot, maintenance charging
    • +
    • I_Che - initialization of charging parameters test (then the phone displays 'Charging')
    • +
    • InitC - charging process initialization
    • +
    • L_Che - checking parameters of LiIon battery charging
    • +
    • LiAFu - fff parameter (Pwm) level is higher than max limit for a full battery
    • +
    • LiDCH - DCH charging (some kind of maintenance charging ?) of LiION battery
    • +
    • LiFul - fff (Pwm) parameter exceeded the max limit for a full battery during given period of time
    • +
    • LiHot - charging hot (warm) LiION battery
    • +
    • LithC - charging LiION battery
    • +
    • LiTxO - charging LiION battery, transmitter active (connection in progress)
    • +
    • LNFTx - charging LiION battery (but the phone uses as much power, as it receives from charger), transmitter active (connection in progress)
    • +
    • M_Che - maintenance charging process test
    • +
    • MaBFD - maintenance charging (BFD)
    • +
    • Maint - maintenance charging
    • +
    • TmpFa - charging interrupted (phone's wasn't able to read natê¿enie +of resistor NTC inside battery connected to BTEMP and BGND battery connectors +and wasn't able to calculate battery temperature)
    • +
    • TxNoF - charging NiMH battery (but the phone uses as much power, as it receives from charger), transmitter active (connection in progress)
    • +
    • TxOnC - charging NiMH battery, transmitter active (connection in progress)
    • +
    • VolFa - charging interrupted (error checking voltage from charger)
    • +
    +

    +

  • + +
  • +ccc - battery temperature (for example T+27 means +27 degrees centigrade). +Sometimes (when the phone was turned off and not used for a long time +(no connections, low power consumption), this parameter can match outdoor +temperature (so you will have a thermometer). If you need a temperature in +Fahrenheit degrees, you can use following formula: F = 32 + 9C/5 +(where F and C are Fahrenheit and Celsius degrees). The temperature of LiION +battery is also given in test 23.
  • + +
  • +ddd - charging time in hours (first digit) and minutes (2 last digits). +This counter is cleared when charging process begins (but not always - +it doesn't happen if: + +

    +

      +
    • +previous charging process wasn't complete +
    • + +
    • +mains parameters don't meet some requirements +
    • +
    + +

    I have also experienced that Nokia 6110 doesn't clear this counter after +changing the battery (for example from LiION to NiMH). It continues after +connecting the charger and stops when the battery is full or when you +disconnect the charger. +

  • + +
  • +eee - charging voltage (V/100). The battery isn't charged with a direct +current, but with a pulse current (this indicator constantly changes). +Range 0.0 - 18.7 V. When charging is complete, maintenance charging begins. +
  • + +
  • +fff - Charge control output (decimal - range 000 - 255)
  • + +
  • +ggg - capacity of the battery in mAh (some English descriptions and +NetMonitor help in Nokia 3110 write, that it's BSI battery multiplied by 4): +in case of LiION battery you will find here the same value as on battery casing +in NiMH batteries this value can differ even by 200 mAh and change depending +on the temperature (it it connected with battery's memory effect ?). +Unfortunately, it doesn't change always immedietaly after changing battery... +See also question +Netmonitor shows different battery capacity than info on it... +
  • + +
  • +hhhh - this counter lets us calculate remaining charging time: when charging +current is less than predefined limit, this timer will be started. +If timer reaches 0, charging will be stopped (it should be according to +some English descriptions, but I observed it very rarely). +
  • +
+ +

In Nokia 3110 this menu looks as follows: + +

+ + + + + + +
+ + + + +
  aaa  bbbbb
+ Tccc   ddd
+ Ceee  Wfff
+w gggg hhhh z
+
+ + + + +
BatVol ChMode
+BTemp ChrTime
+ChrgVol  Pwm
+S 4BSI BFDC B
+
+ +

+

    +
  • +bbbbb - in N3110 this field can additionally contain NOTCH (no charging)
  • +
+ +

In Nokia 9110 this menu looks as follows: + +

+ + + + + + +
+ + + + +
aaa   bbbbbb
+Tccc    ddd
+i Ceee  Wfff
+ gggg   hhhh
+
+ + + + +
BatVol  ChMod
+BTemp   ChTime
+ChrgVol Pwm
+BTyp    BFDC
+
+ +

+

    +
  • +i - information, whether travel charger is connected (1) or not (0)
  • +
+ +

Fast charging (FastC in NetMonitor) means charging with bigger current +and with clever charger it doesn't damage your battery. + +

When battery charging is ended, maintenance charging starts +(it's normal, that phone uses some energy and battery's discharging process +starts; still connected charger can complete energy losses). + +

In Polish version of this manual you can also find links to some pages +in Polish language explaining some topics connected with charging and batteries. + +

For curious people: some of the data, which are displayed here, can also be +found in Nokia service programs (like WinTesla - menu "Testing" / "ADC Readings..."). + +

+ + + + + + +
This test allows us to check the charger. You can also verify some of the battery parameters like: +
    +
  • +capacity
  • + +
  • +efficiency (of the battery cells)
  • + +
  • +voltage (if you are - say - on a trip, here you can check whether battery voltage is suitable for your flashlight)
  • +
+
+ +

Test 21 +
Charging parameters (I noticed, that these values are correct only after +making a call while charging - they change only then (after ending call display +last registred values)) + +

+ + + + + + +
+ + + + +
 aaaa  bbbb 
+  ccc   ddd
+  eee   fff
+
+ + + + +
MTDif MPDif
+BUpV  BDownV
+AverV SumMF
+
+ +

+

    +
  • +aaaa - difference between measured and required charging voltage
  • + +
  • +bbbb - difference between measured voltage and the result of the +previous measurement, fraction is not displayed
  • + +
  • +ccc - the highest measured voltage in battery (with charging battery and +using it in the same time it can change) +
  • + +
  • +ddd - the lowest measured voltage in battery
  • + +
  • +eee - average voltage
  • + +
  • +fff - the sum of the parameters from test 22 +(range 0.00 - 9.99, for example 1.53 is displayed as 153) - my own observations +show, that DerivCount (Eaaa) parameter is not counted here. If this counter +reaches 1.00 or 0.99, 'Battery full' message is displayed and bar indicator +on the right side of the display stops. +
  • +
+ +

Test 22 +
Charging parameters and indicators + +

+ + + + + + +
+ + + + +
 Eaaa  Cbbb 
+ Dccc  Rddd 
+ Ieee  Afff 
+ Tggg  Vhhh
+
+ + + + +
DeriC ChAm
+ VDif VDrop 
+ VDTi AvDif
+ Temp Volt
+
+ +

+

    +
  • aaa - DerivCount
  • +
  • bbb - ChargeAmount
  • +
  • ccc - VolDiffToMax
  • +
  • ddd - VolDropCnt
  • +
  • eee - VolDiffTime
  • +
  • fff - AverDiff
  • +
  • ggg - temperature
  • +
  • hhh - voltage
  • +
+ +

Here you can find several charging parameters and indicators. +All these fields (except for DerivCount) range is from 0.00 to 1.00 +(dot is not shown - for example 0.23 is displayed as 023). After disconnecting +the charger these fields can contain various values. Letters E, C, D, R, I, +A, T and V are displayed when the number is shorter than four digits. + +

I received info, that in some (all ?) Nokia 6150 phones with firmware 4.13 +(LiION battery) there are ALWAYS displayed these values (is it bug in this +version of firmware ?): + +

+ + + + +
+ E251  C254 
+ 6399  6896
+ I255  A256
+ 1024  8447
+
+ +

Test 23 +
Information about the battery + +

+ + + + + + +
+ + + + +
 aaaa  bbbb
+ cccc  dddd
+eee fff gggg
+hhh iiiijjjj
+
+ + + + +
TxOn   TxOff
+ChCur  Stdby
+Age CAP Curr
+Tmp CmAhTarg
+
+ +

+

    +
  • +aaaa - voltage from the battery when transmitter is active (a.aaa mV)
  • + +
  • +bbbb - voltage from the battery when transmitter is inactive (b.bbb mV)
  • + +
  • +cccc - charging current (c.ccc mA). If the charger is not connected, 0 is shown. +In Nokia 3210 ALWAYS equal 0 (I think, that firmware in this model has some bug).
  • + +
  • +dddd - expected voltage from the battery in standby mode (d.ddd mV). You can +check whether your SIM card 's clock can be stopped in +test 51.
  • + +
  • +eee - estimate battery age (0 - new, 100 - old) for LiION batteries (the +value of this counter is probably based on measurements of work/discharging +time of the battery and its capacity (shown in test 20); +this is only a reference!) or 33 for NiMH batteries.
  • + +
  • +fff - battery charge level in percent (in older phones, like Nokia 5110, +25 - 1 bar, 50 - 2 bars, 75 - 3, 100 - 4 bars on +the right side of the screen; in never, like Nokia 6210 - 100 - 6 bars, +80 - 4 bars, 60 - 3 bars, 40 - 2 bars, 20 - 1 bar). +This indicator (and parameter) is very +inaccurate during charging process (it reaches 100 almost immediately) - +better use ii and jjj parameters then. +
  • + +
  • +gggg - temporary power consumption indicated by PSM (according to some +English descriptions in decimal parts of mA; I think that this field shows +values in mA - see on calculation of approximate battery work time below) +
  • + +
  • +hhh - LiION battery temperature (also shown in test 20 +- sometimes both these indicators are different) or 0 (for NiMH battery) +
  • + +
  • +iiii - how many mAh were "loaded" to the battery until now. If it is approximately +equal to jjj, the latter parameter raises (or charging is complete). This parameter +is cleared after each use of TCH channel +(for example: after a call) while charging (with NiMH battery) - you can use +this tip to extend charging time almost ad infinitum. I noticed it with Nokia 6110 +and LiION battery (when I turned off and on phone during charging process) too. +This value is updated every 14 seconds (Nokia 5110 with standard charger). +
  • + +
  • +jjjj - battery capacity value (in mAh) by which next charging stage is complete +(see description of the previous parameter). I noticed, that it's cleared +during LiION battery charging (when I turned off and on phone during charging +process) in Nokia 6110. +
  • +
+ +

For curious: some of the data, which are displayed here, can also be found +in Nokia service programs (like WinTesla - menu "Testing" / "ADC Readings..."). + +

+ + + + + + +
Here you can check your battery type (LiION or NiMH). +
+ +

Approximate power consumption (this can be changed and modified by many other factors) while using individual channels +(Nokia 5xxx and 6xxx): + +

+

    +
  • +during transmission (TX parameter value - phone transmission power - can be +checked in test 1) - using +SDCC and TFR channels (Nokia 6110): + +

    + + + + + + + + + + + + + + +
    TXpower consumption (gg parameter)
    over 1992
    16-1899
    14-15105
    13114
    12123
    11136
    10151
    9173
    8198
    7232
    6269
    5300
    + +

    Conclusion: battery work time depends in a very high degree on the network +parameters (most advertising materials contain standby time measured for the +phone transmitting with lowest power (highest TX)). +

  • + +
  • +AGCH: 310 mA in Nokia 5110 and 6110
  • + +
  • +CCCH i CBCH: +Nokia 6110 phones with older software (like 4.73) show 20 and 34 accordingly. +I don't know whether this is caused by some bug in their firmware (these values +are most probably given in mA/10) or the power consumption is really that high +(because Nokia 5130 shows 34 too). +Anyway, I checked, that Nokia 5110 (and 6110 v5.31) phones display 3 mA while +using CCCH channel. I think that turning off +"cell broadcasting" (if it is not supported by your network) can be very +"profitable" for your phone (longer standby time etc.) - look +here). When the phone collects +BTS identification data +(for BTS, which will be now used - has stronger +signal than previous - see C2 description +for details), this value changes to 220 mA (but only for a short while). +
  • + +
  • +NSPS: 55 in both Nokia 5110 and 6110 (is this value +in mA or in mA/10 ?) +
  • +
+ +

Turning on backlight takes 90 mA more, and while charging another 17 mA should be added. + +

In Nokia 3210 these data are different for different person (does it depend on firmware version, +frequency ?) + + + + + + +
standbyreading BTS identification dataturning on backlight
52 mA90 mA+155 mA
8 or 9 mA?+159 or +160 mA
53, sometimes (rarely, during short time) 8 mA93 mA+158 or +159 mA
8 mA?+154 mA
+ +

+ + + + + + +
If you know the power consumption, you can calculate approximate battery work time: +
    +
  • +900 mAh / 225 mA = 4 hours of talk time (on average)
  • + +
    Please note, that when using SDCC channel +the phone initially uses full power and the gradually reduces it. + +
  • +900 mAh / 5,45 mA = 165 hours of standby time (on average)
  • + +
    Remember, that the phone makes PLU even in standby mode. +
+
+ +

Test 24 + +

+ + + + + + +
+ + + + +
+3476    3481
+BSI:     551
+ET:        9
+  111      1
+
+ + + + +
V_inst V_avg
+BSI value
+Elapsed time
+RST_m  RST_h
+
+ +

This is probably meaning of these parameters: + +

+

    +
  • bbbb - (Voltage average ?) average value of voltage from battery ?
  • +
  • ccc - (Battery Size Indicator) info connected with battery
  • +
  • dddd - how many minutes phone work from enabling ? (minutes)
  • +
  • eeee - (Rest Standby Time minutes ?) +does phone estimate here, how long phone can be in standby up to +next charging ? (minutes)
  • +
  • ffff - (Rest Standby Time hours ?) +does phone estimate here, how long phone can be in standby up to +next charging ? (hours)
  • +
+ +

Test 25 + +

+ + + + + + +
+ + + + +
+    0      1
+10059
+ 5664    641
+    1      0 +
+
+ + + + +
+Chrgtp #Bars
+alpha
+zeta     phi
+noblw  nobcr +
+
+ +
+Back to the top
+ +

+

[Part 1][Part 2][Part 3][Part 4][Part 5][Part 6][Part 7] +

+
+ +

Marcin Wiacek (WWW) +
Last modification: 5 January 2002
+ + + diff --git a/Docs/en_US/gsm/netmon/faq_net4.htm b/Docs/en_US/gsm/netmon/faq_net4.htm new file mode 100644 index 0000000..ebda570 --- /dev/null +++ b/Docs/en_US/gsm/netmon/faq_net4.htm @@ -0,0 +1,2144 @@ + + + + + + + + + + NetMonitor in Nokia phones (5/7) + + + + + +

Main page

+ +
NetMonitor in Nokia phones (5/7) + +

[Part 1][Part 2][Part 3][Part 4][Part 5][Part 6][Part 7] + +

+ +
+ + + +
    +
  1. What is it ?
  2. +
  3. Do I need it ?
  4. +
  5. Does my phone use more power with NetMonitor enabled ?
  6. +
  7. How to activate it ?
  8. +
  9. Which NetMonitor version can be activated in my phone ?
  10. +
  11. Does NetMonitor activation void warranty ?
  12. +
  13. NetMonitor menu in my phone has different number than 10. Is it normal ?
  14. +
  15. NetMonitor menu in my phone has 11 number, hovewer previous position has 9 number. Is it normal ?
  16. +
  17. How to use it ?
  18. +
  19. Can I damage my phone ?
  20. +
  21. Glossary
  22. +
  23. Description of the individual tests
  24. +
  25. You can also use a program...
  26. +
  27. Can I use NetMonitor without SIM card inserted, without PIN number entered or when SIM card is not active ?
  28. +
  29. How can I disable NetMonitor ?
  30. +
  31. Do I need to disable NetMonitor before sending my phone to the service ?
  32. +
  33. Is it possible to re-activate NetMonitor after disabling it ?
  34. +
  35. Is NetMonitor available in analog Nokia phones ?
  36. +
  37. Does NetMonitor allow to use phone like broadcast station ?
  38. +
  39. I don't have all described tests in my phone. Why ? Can I increase their number ?
  40. +
  41. Does NetMonitor allow to identify place, where is my interlocutor ?
  42. +
  43. Does NetMonitor allow to identify place, where am I ?
  44. +
  45. What are NetMonitor codes ?
  46. +
  47. Is it the truth, that in phones with additional hardware changing frequency band NetMonitor doesn't work correct ?
  48. +
  49. Where can I find description of FBUS/MBUS protocol and commands connected with NetMonitor ?
  50. +
  51. I have non existing networks on the list of forbidden networks...
  52. +
  53. How to check frequency band (900 or 1800 Mhz), where phone work in this moment ?
  54. +
  55. Can I use DLR-2/DLR-3 cables for activating netmonitor ?
  56. +
  57. Can I activate netmonitor using Init File Editor (Nokia 9110) ?
  58. +
  59. Can I force phone to use one frequency band (900 or 1800 Mhz) only ?
  60. +
  61. How to change settings in tests ?
  62. +
  63. My phone has very short snandby time - it is possible to see the reason of it ?
  64. +
  65. Is netmonitor available in English version only ?
  66. +
  67. Information sources
  68. +
  69. Additional information
  70. +
  71. Does using/activating netmonitor cost anything ?
  72. +
  73. Does using netmonitor is legall ?
  74. +
  75. Which entries on SIM card are used in netmonitor tests ?
  76. +
  77. Can I activate netmonitor in 3310 using soft working with 3210 ?
  78. +
  79. After activating netmonitor/BTS TEST my phone can't find network...
  80. +
  81. Netmonitor shows different battery capacity than info on it...
  82. +
+
+
+ +

Test 30 +
Audio API register display + +

+ + + + + + +
+ + + + +
 aaaa bbbb
+ cccc dddd
+ eeee ffff
+ gggg hhhh  
+
+ + + + +
A1Cnf  A2Cnf
+  ST   AU3
+1Tone  2Tone
+ Conf  HFVol
+
+ +

+

    +
  • aaaa - API_AUD1_CTRL
  • +
  • bbbb - API_AUD2_CTRL
  • +
  • cccc - API_SIDETONE
  • +
  • dddd - API_AU3
  • +
  • eeee and ffff - API_1_TONE and API_2_TONE (see description below)
  • + +
  • +gggg - API_CONFIG: connected with sound setting from +test 71 and 72: +you will see here number (hexadecimal), +which was displayed there below AUDIO ENHANCEMENT (in last selected menu). +Here are some examples: + +

    + + + + + + + + + + +
    normally (for example during standby)wybieranie numerucall
    5148 (cracks) - 20808 decimal51495140
    851A - 34074 decimal851B8512
    C6A4 (cracks) - 50852 decimalC6ADC6A4
    DB34 (cracks) - 56116 decimalDB3DDB34
    DF29 (after enabling phone) - 57129 decimalDF29DF20
    F436 - 62518 decimalF43FF436
    F437 - 62519 decimalF43FF436
    +

    +

  • + +
  • +

    hhhh - API_HF_VOL: volume during call - you will count it from +the "110 - hhhh" formula (subtract value of this parameter from 110). +It's displayed too (during call only) in +test 76. +When you connect headset, values here change - volume can be count +from "510 - hhhh" formula then (for car kit use "2210 - hhhh"). +Type of connected audio accesories can be checked in +test 75 too. +Phone remembers volume for each audio accesory separately. +

  • +
+ +

When you press any key, phone generates sound, which consist of two tones. +Parameters eeee and ffff change then. First tone is short, second is emited +all time, when you press key. When you press C, NaviKey, Up or Down +keys, change parameter eeee only (value 0E10 - 3600 decimal) - +sound consist of one tone only. And now the most important thing: +you will divide displayed in these parameters values by 4, +you will have frequencies in Hz conncected with pressing adequate keys in +DTMF (Dual Tone Multi Frequency) system. +I think, you use DTMF very often - it's used in tone system in all +modern phones during calling number. Adequate values are in table (decimal) +- parameter eeee is connected with vertical values, ffff with horizontal: + +

+ + + + + + +
1209 Hz1336 Hz1477 Hz
697 Hz123
770 Hz456
852 Hz789
941 Hz#0*
+ +

Test 32 + +

Test from Nokia 6250 (no help): + +

+ + + + +
+     0      
+0002922
+3000
+0205714 +
+ +

In 4'th line there is clock. Example: +0205714 means 20 hours 57 minutes 14 seconds of the day ... + +

Test 34 +
Information about FBUS connection between phone and computer. + +

+ + + + + + +
+ + + + +
aa bb cc dd
+eee fff ggg
+hhh iii jjj 
+k
+
+ + + + +
CM LD LM NM 
+PEC FEC OEC
+ACC RXS TXS 
+Mod
+
+ +

+

    +
  • aa - current fbus media in hex
  • +
  • bb - last sender dev in hex
  • +
  • cc - last sender media in hex
  • +
  • dd - next media to be connected. Same as aa if the connection is not pending
  • +
  • eee - fbus parity error counter
  • +
  • fff - fbus framing error counter
  • +
  • ggg - fbus overrun error counter
  • +
  • hhh - fbus alive check counter
  • +
  • iii - received sequence number
  • +
  • jjj - sent sequence number
  • +
  • k - phone mode: S=slave, H=host
  • +
+ +

Description above is from some English documents. As you can see in some phones +(like Nokia 5110) values in this test looks rather different, but help is the same. +But, when you make connection with FBUS cable and make transmission, first line of values +in this test changes to "1E0C1E -". When you will look into some +FBUS protocol descriptions, +you will see, that: + +

    +
  • "1E" could mean datas send with FBUS protocol over cable
  • +
  • "0C" could mean, that FBUS cable is connected to phone
  • +
+ +

and it's the truth. So, it means, that this description is real (even, that +test looks a little different). + +

Observation from Nokia 6150: + +

+ + + + +
+aabbccdd    
+eeffgghh i j
+kk
+l-m
+ +

+

    +
  • aabbcc: +
      +
    • 000000 - no transmission after enabling phone
    • +
    • 1E0C1E - there was FBUS transmission
    • +
    • 140000 - there was infrared connection using NBS (business card, calendar entry, etc.)
    • +
    • 1C7F1C - there was 2-players snake game (host)
    • +
    • 1C001C - there was 2-players snake game (slave)
    • +
    +
  • +
  • hh: 0 - no infrared transmission in this moment
  • +
  • i: increases for example after each sending data using infrared and NBS or ending +transmission
  • +
  • j: P - infrared enabled, searching next device (blinking indicator in phone)
  • +
  • l: H - host in infrared transmission; S - slave in infrared transmission
  • +
  • m: T - infrared enabled, connection terminated (blinking indicator in phone)
  • +
+ +

In Nokia 9110 this menu looks different: + +

+ + + + + + +
+ + + + +
ll mm nn oo 
+ee ff gg
+p  q
+r s tt
+
+ + + + +
PA RS DR PR 
+PE FE OE
+Rx Tx
+D U DC
+
+ +

+

    +
  • +p and q are probably iii and jjj
  • +
+ +

Links to pages with FBUS (MBUS) protocol are in the question 25. + +

+ + + + + + +
If values in this test changed after enabling phone, it means, that +it was connected to computer and datas were transmitted with +FBUS protocol (not MBUS).
+ +

Test 35 +
Reason of last reboting internal firmware of phone. + +

+ + + + + + +
+ + + + +
 aaaaa      
+ bbbbbbbb

+
+ + + + +
Reset reason
+Task name

+
+ +

+

    +
  • aa - reason: + +

    +

      +
    • NORM: probably normal power up
    • +
    • UNKNO: default value, reset reason is unknown
    • +
    • SWSIM: SIM contact failure reset. Shown, when phone has simlock and wrong mastercode was entered.
    • +
    • STACK: task stack overflow
    • +
    • SWIDL: idle task not running reset
    • +
    • HW lub WD: ASIC watchdog timeout. SW WD in Nokia 3310 ?
    • +
    • SWDSP: restart DSP recovery reset
    • +
    +

    +

  • + +
  • +bbbbbbbb - name of running task before reset (for example, +"AUD TASK", +"CC TASK" (confirmed), +"DDI TASK", +"DEV IO" (confirmed), +"EM TASK", +"FBUSTASK" (confirmed - after errors in cable transmission), +"L1 CONTR", +"L1 MEAS", +"L1 SYSPA" (confirmed), +"L2 TASK", +"LOCAL" (confirmed - shown, for example, when phone had to restart because of error in firmware), +"MDI RECE" (confirmed), +"MDI SEND" (confirmed), +"MM TASK" (confirmed), +"OS IDLE" (confirmed), +"PN TASK" (confirmed), +"RR TASK" (confirmed), +"RM TASK", +"SIM L2" (confirmed), +"SIM UPL" (confirmed), +"SMS TASK" (confirmed), +"TONETASK", +"UI TASK" (confirmed) +"PND TASK" (for example Nokia 6210), +"WMLSTASK" (for example Nokia 6210), +"IRDATASK" (for example Nokia 6210), +"IRDA MGR" (for example Nokia 6210), +"PH TASK" (for example Nokia 6210), +"DGC TASK" (for example Nokia 6210), +"DGNTB TA" (for example Nokia 6210), +"DGFAX TA" (for example Nokia 6210), +"SCKT SRV" (for example Nokia 6210), +"PMM CLUP" (for example Nokia 6210), +"PMM WRBA" (for example Nokia 6210), +"ND TASK" (for example Nokia 6210), +"PPC TASK" (for example Nokia 6210), +"No task!" (for example Nokia 6210) +or "UNKNOWN" (confirmed - after normal phone enabling)). We can notice, that tasks names are similiar to +names in help to tests 84-86.
  • +
+ +

Test 36 +
Reasons of last reboting internal firmware of phone (you will +find here information, how many times phone made restarts because of reasons +from previous test). + +

+ + + + + + +
+ + + + +
 aa  bb  cc 
+ dd  ee  ff

+
+ + + + +
 UN  WD DSP 
+SIM IDL STK

+
+ +

+

    +
  • aa - unknown resets
  • + +
  • bb - ASIC watchdog timeout resets (in some +you can simulate it - see question 9 for details)
  • + +
  • cc - DSP recovery resets. In Nokia 3310 displayed also +in test 130.
  • + +
  • +dd - some English descriptions say, that it's connected with +SIM contact failure reset (in some phones you can force reset because of this reason +- see question 9). I noticed too, that this counter +increases when to try to enter mastercode connected with simlock level 1 +using #pw+2222222222+1# code (where mastercode is instead of 2222222222), when +your phone has simlock. +
  • + +
  • ee - idle task not running resets
  • + +
  • ff - task stack overflow resets
  • +
+ +

Counters are stored to EEPROM. + +

In Nokia 3310 some counters (DSP only ?) are displayed from end (for example, 01 is displayed as 10, +02 as 20, etc.) + +

+ + + + + + +
You can reset counters from this menu using some Nokia service programs +- for example, in Pc-Locals 1.3 enter to menu 8 ("Event Trace"), +menu 5 ("Permanent Counter Table...") and press F6 key ("Clear Counters"). +Unfortunatelly :(, "real" counters connected with mastercode entering attempts +(Counter for example in WinTesla and WinLock) don't reset then... +
+ +

Test 38 +
Memory dump + +

+ + + + + + +
+ + + + +
aaaaaaaaaaaa
+aaaaaaaaaaaa
+aaaaaaaaaaaa
+aaaaaaaaaaaa
+
+ + + + +
Memory dump 

+
+ +

+

    +
  • aaaa.... - hex dump of 24 successive memory locations
  • +
+ +

The start address of the dump is entered as 6 digit address value +into location 30 into phonebook on SIM card (information, how to make it, +are in test 17). +An example: for address 0x0C89AB enter 0C2089AB value there... +Dump address is changed only when you directly enter to this menu. + +

This display rather is not included in offcial firmware (I found only one +phone with it). It can be switched on by defining flag DEV_FT_MEMORY_DUMP_IN_USE in ftd_conf.h. + +

Test 39 +
Reason of last connection end (asterisk means, that the diagnosis won't be sent to the +network - it'll be only shown in phone) and making +Location Update: + +

+ + + + + + +
+ + + + +
 CC:   aaa  
+ MM:   bbb
+ RR:   ccc
+
+ + + + +
CC CauseValu
+MM CauseValu
+RR CauseValu
+
+ +

+

    +
  • +reason from the CallControl-Layer - it's displayed in +test 2 and +test 63 too: + +

    +

      +
    1. +from the GSM specifications (section 10.5.4.11/GSM 04.08): + +

      +

        +
      • + 1: unassigned (unallocated) number
      • + +
      • + 3: no route to destination
      • + +
      • + 8: operator determined barring
      • + +
      • +16: normal end of call (you were speaking or you heard some +text - that dialled number was busy or something similiar) +
      • + +
      • +17: user busy + +

        +

          +
        • +if it was outgoing call, dialled number was busy (phone even displayed +'Number busy')
        • + +
        • +if it was incoming call, a man, who dialled to you, heard busy signal +- you were speaking or you rejected it (in Nokia 5110 or 5130 to make +it you have to press C key, in Nokia 6110, 6130 or 6150 red receiver) +
        • +
        +

        +

      • + +
      • +18: no user responding
      • + +
      • +19: user alerting (from specification - I had it +with normal connection too (phone displayed +'No answer' ('Nie odpowiada')) or when incoming call was diverted to +voice mailbox), no answer +
      • + +
      • +21: call rejected + +

        +

          +
        • +phone wasn't in network coverage (message 'No coverage network'), when you +tried to make call +
        • + +
        • +you tried to call to non existing phone number or you heard busy signal +
        • +
        +

        +

      • + +
      • +22: number changed
      • + +
      • +27: destination out of order
      • + +
      • +28: invalid number format/number incomplete. Phone displayed +'Invalid phone number'
      • + +
      • +31: unspecidied. It seems, that with this error connection +is end by network (for example, when it's overcharged). +Shown sometimes too, when you call for not supported for some tariffs numbers. +
      • + +
      • +34: no circuit/channel available to make call. Phone displayed +'Network busy'. I noticed too, that in my network RR value changed to +1 with this error. More about situations, when network is busy, I write +in TS description.
      • + +
      • +38: network out of order
      • + +
      • +41: temporary failure
      • + +
      • +42: switching equipment congestion +(message "Network busy") +
      • + +
      • +44: requested channel not available
      • + +
      • +47: ressource unavailable. I had it, when connection was "brutal" broken. +Concrete: during call phone of my interlocutor disabled because of empty battery. +My phone displayed 'Error in connection'
      • + +
      • +50: requested facility not subscribed +(you must subscribe it to use it) +In some networks shown too, when you set not supported by network function +(for example, "Own number sending" in Era-GSM network). +Message "Check operator services". +
      • + +
      • +65: bearer service not implemented
      • + +
      • +68: ACM equal to or greater than ACMmax
      • + +
      • +69: requested facility not implemented
      • + +
      • +88: incompatible destination
      • + +
      +

      +

    2. + +
    3. +from mine (and not only) experiences: + +

      +

        + +
      •  28: I had it, when phone number was too long
      • + +
      •  57: no asynchronous data transmission allowed (concrete: +phone wasn't able to connect to WAP from this concrete SIM card)
      • + +
      •  63: "Poza zasiêgiem sieci"
      • + +
      • +79: error with message 'Check operator services'. +You have it, when you enable ALS (Alternative Line Service) function, +don't have second number on SIM card, select it and try to make call +
      • + +
      • +111:'Error in connection'
      • + +
      +

      +

    +
  • + + +
  • +reason from the MobilityManagement-Layer +- it's shown in test 64 too. +It's from GSM specification (section 10.5.3.6/GSM 04.08): + +

    +

      +
    • + 2: IMSI unknown in HLR +(SIM card not active in network)
    • + +
    • + 3: illegal phone
    • + +
    • + 4: IMSI unknown in VLR
    • + +
    • + 5: phone's IMEI was not accepted
    • + +
    • + 6: illegal ME
    • + +
    • +11: PLMN not allowed (you tried to log into +network, which doesn't have roaming convention with your home network - your phone +displays 'No access', when you try to select it manually; I don't know only, if +this code is displayed only, when this network is saved on forbidden list on SIM +card (see test 6)
    • + +
    • +12: Location Area not allowed. You can check it in test 11.
    • + +
    • +13: roaming not allowed in this Location Area
    • + +
    • +17: network failure
    • + +
    • +22: network congestion
    • + +
    • +32: service option not supported
    • + +
    • +33: service option not subscribed
    • + +
    • +34: service temporarily out of order
    • + +
    • +38: call cannot be identified (call RE)

    • + +
    + +
  • +reason from RadioRessourceManagement-Layer) +- see GSM specifications: section 10.5.2.31/GSM 04.08: + +

    +

      +
    • +  0: normal release
    • + +
    • +  1: unspecified
    • + +
    • +  2: channel unacceptable
    • + +
    • +  3: timer expired
    • + +
    • +  4: no activity on the radio path
    • + +
    • +  5: Pre-emptive release
    • + +
    • +  8: handover impossible, +TA out of range
    • + +
    • +  9: channel mode unacceptable
    • + +
    • + 10: frequency not implemented
    • + +
    • + 65: call already cleared
    • + +
    • + 97: message type not compatible with protocol state
    • + +
    • +101: no cell allocation available
    • + +
    • +111: protocol error unspecified
    • +
    +
  • +
+ +

When you will see "*" before third parameter from this test, it means +(the most often), that call is in progress. Sometimes phone displays different +values - I don't know their meaning :-(. + +

Values of counters are not saved in EEPROM. When phone makes another measure, +doesn't reset them (changes only these values during next measure, which are connected +with it; doesn't change the rest of them). + +

+ + + + + + +
This test allows to find, why exactly your phone doesn't want to work +- doesn't want to make calls.
+ +

Test 40 +
Resets handover counters (by direct enter)... + +

+ + + + + + +
+ + + + +
   RESET
+  HANDOVER  
+  COUNTERS
+
+ + + + +
  Use menu  
+  to reset
+  handover
+  counters
+
+ +

Test 41 +
Information about handover + +

Handover - it's transfer of radio connection +(between phone and cell) from one cell to another (without breaking call). +It's made, when: + +

+

    +
  1. +new radio connecting will give better quality (it's parameters are all the time +checked by phone and base station) +
  2. + +
  3. +when phone is between few cells and can use "new" cells for him +(it frees some place for phones, which can use "old" cell only) +
  4. +
+ +

When they're problems with transmission, decision about handover is made +by phone (otherwise it's made by BSC). +If you enabled using one channel by phone (test 17), +handovers are not made. + +

There are 4 types of handovers: + +

+

    +
  • +Intra cell - Intra BSC +handover (called handoff too): it's the smallest handover +inside one cell. Receiver is "thrown over" from one channel to another +(gennerally to another frequency inside one cell). Decision, if it should +be done, is made by BSC.
  • + +
  • +Inter cell - Intra BSC handover: +receiver is moved from one cell to another. Decision about it +is made by BSC. Connection with first cell +is broken after moment, when connection with another is made (displacement +between two BTSes inside one +BSC).
  • + +
  • +Inter cell - Inter BSC handover: +displacement of connection between two cells, which are not served by +the same BSC. In this case handover is moved +by MSC, but decision about it made +by first BSC. Connection with first +BSC (and BTS) +is broken before moment, when connection with another BSC +(and BTS) is made. +
  • + +
  • +Inter MSC handover: receiver moves from +cell served by MSC/VLR +to another controlled by another MSC/VLR. +It's more complicated situation. We can notice, that +MSC is connected to GSMc over PSTN. +In this case is visible, that another MSC +can't receive information from first normally. + +

    What will happen, when connection will be moved to target +MSC/VLR ? + +

    Because both MSC belongs to the same network, +connection is kept. To move it from one to another MSC +special number HON (HON=CC+NDC+SN, CC - country code, NDC - network code, +SN - subscriber's number) must be generated. It's similiar to roaming number +(it's connection between two MSC too). During +handover between two MSC connection can't be +broken (phone connection realised by network's subscriber). +

+ +

+ + + + + + +
+ + + + +
HandOOk: aaa
+PrevCh : bbb
+HONotOK: ccc
+HOIntra: ddd
+
+ + + + +
HandOvOKCntr
+PrevChanCntr
+HandOvNOKCnt
+HOIntraOKCnt
+
+ +

+

    +
  • +aaa - counter for successful handovers
  • + +
  • +bbb - counter for successful back to previous channel attempts +(number of actual used channel is displayed, for example, in +test 1)
  • + +
  • +ccc - counter for failed handovers
  • + +
  • ddd - counter for successful Intra cell - Intra BSC handovers +or assignments
  • +
+ +

Counters will stop when they reach their maximum (999). To initialize them +to zero, use test 40 (or +test 60). + +

In dual phones (like Nokia 6150 or 3210) test 41 looks +different and is connected with Inter cell - Intra BSC, +Inter cell - Inter BSC and Inter MSC handovers: + +

+ + + + + + +
+ + + + +
 aaaa  bbbb
+ cccc  dddd
+eeefffggghhh
+iiijjjkkklll
+
+ + + + +
G>G InterD>D
+G>D  OK  D>G
+InterHoFail
+BackToPrev
+
+ +

+

    +
  • aaa - counter of successful handovers from GSM 900 to GSM 900
  • +
  • bbb -counter of successful handovers from GSM 1800 to GSM 1800
  • +
  • ccc - counter of successful handovers from GSM 900 to GSM 1800
  • +
  • ddd - counter of successful handovers from GSM 1800 to GSM 900
  • +
  • eee - counter of failed handovers from GSM 900 to GSM 900
  • +
  • fff - counter of failed handovers from GSM 1800 to GSM 1800
  • +
  • ggg -counter of failed handovers from GSM 900 to GSM 1800
  • +
  • hhh - counter of failed handovers from GSM 1800 to GSM900
  • + +
  • +iii - counter of successful back to previous channel attempts +(number of actual used channel is displayed, for example, in +test 1) +from GSM 900 to GSM 900
  • + +
  • jjj - counter of successful back to previous channel attempts from GSM 1800 to GSM 1800
  • + +
  • kkk - counter of successful back to previous channel attempts from GSM 900 to GSM 1800
  • + +
  • lll - counter of successful back to previous channel attempts from GSM 1800 to GSM 900
  • +
+ +

Counters will stop when they reach their maximum (9999 dla dwóch pierwszych +linii, 999 dla dwóch ostatnich). To initialize them to zero, use test 40 +(or test 60). + +

In Nokia 3310 sum of all handovers is also +displayed in test 131 (?). + +

In Nokia 3110 this test looks like follows: + +

+ + + + + + +
+ + + + +
HandOOk: aaa 
+PrevCh : bbb 
+HONotOK: ccc 
+T200: eeee
+
+ + + + +
HandOvOKCntr 
+PrevChanCntr 
+HandOvNOKCnt 
+T200Cntr
+
+ +

+

    +
  • +eeee - I write about T200 counter in test 43
  • +
+ +

and here's for Nokia 6185/6188: + +

+ + + + +
+BSI 01000
+VBAT 388
+BTEMP 018
+BATT 2 CHG 0
+
+ +

    +
  • VBAT - battery voltage (/100V)
  • +
  • BTEMP - battery temperature in C
  • +
  • CHG - battery charge status: 1 - charging, 0 - not charging
  • +
+ +

Test 42 +
This test is in dual phones (for example, Nokia 6150 or 3210) only +and is connected with first kind of handovers +(Intra cell - Intra BSC): + +

+ + + + + + +
+ + + + +
 aaaa  bbbb
+ cccc  dddd
+eeefffggghhh
+iiijjjkkklll
+
+ + + + +
G>G IntraD>D
+G>D  OK  D>G
+IntraHoFail
+BackToPrev
+
+ +

+

+ +

Counters will stop when they reach their maximum (9999 for two first lines, +999 for two last). To initialize them +to zero, use test 40 +(or test 60). + +

In Nokia 6185/6188 this test looks like test 20. + +

Test 43 + +

Some English descriptions write about this test: + +

+ + + + + + +
+ + + + +
T200MS: aaaa
+T200BS: bbbb
+T200MS: cccc
+T200BS: dddd
+
+ + + + +
T200 MS GSM 
+T200 BS GSM
+T200 MS DCS
+T200 BS DCS
+
+ +

+

    +
  • +aaaa - for GSM 900: counts how many times T200 in phone has expired and +therefore L2 transmission has been repeated.
  • + +
  • +bbbb - for GSM 900: counts how many times T200 in BTS (network) has expired +and therefore L2 transmission has been repeated. +
  • + +
  • +cccc - for GSM 1800 called earlier DCS (in dual phones only): counts how many times T200 in phone +has expired and therefore L2 transmission has been repeated. +
  • + +
  • +dddd - for GSM 1800 (in dual phone only): counts how many times T200 in BTSie +(network) has expired and therefore L2 transmission has been repeated.
  • +
+ +

Counters will stop when they reach their maximum (9999 for two first lines, +999 for two last). To initialize them to zero, use test +40 (or test 60). + +

I noticed, that some things are a little different: in all 900, 1800, 900/1800 MHz +phones, I saw, info is displayed ONLY in two first lines. Help is a little different too: + +

+ + + + + + + + + + + + + +
+ + + + +
+T200 MS     
+T200 BS

+  +

+
+or: + + + + + +
+T200Cntr MS
+T200Cntr Net

+  +

+
+or: + + + + + +
+T200Cutr MS
+T200Cutr Net

+  +

+
+ +

In Nokia 6185/6188 this test looks like test 21. + +

Test 44 +
You change value from 01 (default) to 00 (or vice versa) by direct enter to this test. + +

+ + + + + + +
+ + + + +
+
 REVISION
+LEVEL IS aa 
+
+ + + + +
Use menu to 
+   change
+  Revision
+   Level
+
+ +

In Nokia 6185/6188 this test looks like test 22. + +

Test 45 +
This test allows to simulate situations. when phone can normally +receive network signal (but network can't receive any information from phone). +It's very realistic (even in test +1 in ddd parameter an asterisk (*) is displayed, when +you try to make connection), but not always (in +test 10 you will see +'xxxxxxxx' instead of TMSI, when T3212 counter in first +parameter will be expired). + +

You can change it by direct enter. + +

+

+ + + + + + + +
+ + + + +
+
TRANSMITTER 
+  ENABLED
+ +

(default setting)

+ + + + +
+
TRANSMITTER 
+  DISABLED
+
+ + + + +
Use menu to 
+ enable or
+  disable
+transmitter
+
+ +

+ + + + + + +
When you enable it, phone won't be able, for example, to update +location (see test 64) and +make calls. It will allow to: + +
    +
  • "blockade" phone to the moment of another enabling it (for example, +when you want to observe network parameters, but you don't want to be +accessible for others - when somebody will call to you, for network +your phone will be outside range) +
  • + +
  • +fast remind you of number written to phonebook (it's written on leaf, +but you don't remember name of person assigned to): simple call it. +When phone will choose number, it will display this name; it will be written +on list odf last dialed numbers too. +
  • +
+
+ +

This test DOESN'T WORK CORRECTLY in Nokia 3210, 3310 and 7110 (you change setting, +but it doesn't give described above results). + +

In Nokia 6185/6188 this test looks like test 23. + +

Test 46 + +

+ + + + +
+BAND CLASS a
+CS SUBSTATE
+EM STATEnnn
+TX POWER DB
+
+ +

Test 48 +
In Nokia 3110 this test looks like test 7. + +

Test 51 +
Information about SIM card + +

+ + + + + + +
+ + + + +
aaa bbb ccc 
+ dddddddd
+ e f  gg hh
+  i   jjjj
+
+ + + + +
VSel Bau SAl
+SCond  CStop
+PIN12  PUK12
+ ATR  FE/PE
+
+ +

+

    +
  • +aa - SIM voltage selection type (3, 3/5 or 5)
  • + +
  • +bbb - division coefficient, which define speed of communication phone with +SIM card (372, 64, 32 or 0) saved in ATR (first sequence send by SIM card +after reset - Answer To Reset). +When you will divide clock frequency (maximal 3,25 MHz = 3 250 000 Hz) +by it, you will have speed of transmission +(for example, 3 250 000 Hz / 372 = 8736,5 bods) +WARNING ! YOU CAN'T CHANGE SPEED OF COMMUNICATION PHONE WITH SIM CARD +AND VALUE OF THIS PARAMETER ! +
  • + +
  • +ccc - information, whether SIM clock stop is allowed (it saves energy) +during standby (YES or NOT - possible or not). This information is displayed +(in Nokia phones and not only) using *#SIM0CLOCK# code +- when you will see "SIM clock stop allowed", SIM card allows to make it. +Some Nokia 6110 phones (it depeneds on their firmware) can not support +correctly this code - they display, for example, "Result unknown". +Phone disables SIM card clock automatically - you can't make it manually ! +
  • + +
  • +dddd - information about clock stop condition: + +

    +

      +
    • UP
    • +
    • DOWN
    • +
    • DOWN(UP) - in tested by me SIM cards
    • +
    • UP(DOWN)
    • +
    • xxxxxxxx
    • +
    +

    +

  • + +
  • +e - number of left PIN1 code entering attempts. When it's bigger than 9, +you will see only last digit of it (for example, I found some prepaid cards +with 10 value). Maximal number of entering code attempts depends on concrete +SIM card (it can be set to any value), but the most often it's equal 3. In some SIM cards +you can disable answering for this code (for example, you can select it in +Menu 4-3-1 in Nokia 5110). When it's equal 0, phone shows +"Sim card blocked" and asks for PUK1. If it was entered correctly, this counter +is reset to maximal value. Disabling and enabling phone doesn't reset it ! +
  • + +
  • +f - number of left PIN2 code entering attempts (when SIM card doesn't support +PIN2 functions, you will see "x" here). You can check, if these functions are supported, +using call cost function too (if they're not, phone displays "Not allowed"). +If you wanted to use them and your card doesn't support them (you will see "x" +here), you (or your operator ;-) rather) have to change it. +Maximal number of entering code attempts depends on concrete +SIM card (it can be set to any value), but the most often it's equal 3. When this counter +is equal 0, phone asks for PUK2. When this code was entered correctly, counter +is reset to maximal value. Of course, even when it's equal 0, you can normally +use SIM card (PIN2/PUK2 are independent of PIN1/PUK1), when you know PIN1. +Disabling and enabling phone doesn't reset it ! +If SIM card has blocked PIN2/PUK2 codes, you can enter to the menus contains supported +by these codes functions (but after changing next settings you will see error). +
  • + +
  • +gg - number of left PUK1 code entering attempts. +Maximal number of entering code attempts depends on concrete +SIM card (it can be set to any value), but the most often it's equal 10. +Phone asks for it, when counter of left PIN1 code entering attempts is equal 0 +(phone shows "Sim card blocked"). When this counter is equal 0 too, SIM card +can be blocked (phone shows "Sim card rejected") or (it depends on card) +asks for PUK2. When this code was entered correctly, counters of left PIN1 and +PUK1 codes entering attempts are reset to maximal values. +Disabling and enabling phone doesn't reset it ! +
  • + +
  • +hh - number of left PUK2 code entering attempts (when SIM card doesn't support +PIN2 functions, you will see "x" here). +Maximal number of entering code attempts depends on concrete +SIM card (it can be set to any value), but the most often it's equal 10. +When it's equal 0, using PIN2 functions can be impossible on this SIM card (ask operator for help). +Additionaly, when you were asked for PUK2, when counters of left PIN1 and +PUK1 codes entering attempts were equal 0 and now left PUK2 code entering attempts +is equal 0 too, using this SIM card can be impossible (you have to replace it to new). +When it was entered correctly, counters for this code and PIN2 (when you entered +PUK2, because PIN2 was blocked) are reset to maximal values or counters for this, +PIN1 and PUK1 are reset (when you entered PUK2, because PIN1 and PUK1 were blocked). +Disabling and enabling phone doesn't reset it ! +
  • + +
  • +i - ATR repeat counter (ATR is first sequence sent by SIM card in answet to reset - +Answer To Reset) (0-9)
  • + +
  • +jjjj - number of retransmissions/parity errors in transmission with SIM card +(when the happen, two first chars are equals FE (Frame Error) or +PE (Parity Error), two last number of retransmission/errors)
  • +
+ +

If you don't have SIM card in the phone, you will see "ERROR1" in this test. + +

If phone has problems with communication with SIM card, this test can look like +follows (i and jjjj parameters are described above): + +

+ + + + + +
+ + + + +
ERROR1 5  55
+55
+  i   jjjj
+  +
+
+ +

CStop parameter (information, if SIM card clock is disabled in this moment) +is displayed in help only. Why ? Probably somebody didn't remember about it... + +

Here are some observations for SIM voltage selection type (first parameter) +Nokia 5110 and tested SIM cards: + +

After enabling phone reads some information from SIM card (for example, +number saved on it SMS messages, numbers from phonebook) - when you try to read +something, what is written there (for example, phonebook), +"SIM card not ready" message is displayed then (and first parameter shows 3). +I noticed, that phone can't display names assigned to numbers in phonebook too +(for example, when you call somebody) and shows, that "Inbox" and "Outbox" +are empty (even, when some messages are saved there). + +

Later value of parameter changes to 3/5 - I suppose, SIM card clock is +enabled then. + +

Phone disables it (in test value 3), when communicates with network +(requesting services, sending or receiving SMS messages) because of saving +energy (the same in NSPS state). + +

When you call to number assigned to name in phonebook (or phone +recognizes incoming number), value to the end of call is equal 3/5 +(otherwise it changes to 3). After end of call is always equal 3. Logical +conclusion: after enabling phone saves in own memory checksum for +all numbers from phonebook (it's enought to make for 7 last digits - they're +used to identify number in Nokia phones). If this checksum is the same to +checksum for number, you're calling (or incoming number), phone reads name +from phonebook... + +

And the last observation: without connection (see above) value of first +parameter is equal 3/5 (is some energy loose ? Probably yes... But why counter from +test 20 doesn't show any change in their +consumption ?) + +

When you try to open "Outbox" or "Inbox", phone doesn't enable clock, +when they're empty (that's why I think, that phone saves into own memory +number of saved SMS messages too). + +

Many information about SIM card are displayed by +SIMedit (unfortunatelly, in Czech language only :-( )... +Parameters like ATR you can study using SIM Scan (it's on the www.net.yu/~dejan +or http://members.tripod.com/~dejank/ pages). They both work with +SIM card readers only... + +

+ + + + + + +
+If you want to see "Insert SIM card" and (sometimes) "SIM card rejected" +messaeges, try to make such activities (checked for Nokia 5110): + +

Press very delicately the locking catch of the battery and start to slide the battery +downwards very slowly (stop, when you will hear silently crack). + +

In this moment you should see first message and phone will start to inform +about problems with communication with SIM card (you will see "ERROR1" here)... +

+ +

In Nokia 6185/6188 this test looks like follows: + +

+ + + + +
+TASK0 0134  
+TASK1 015C
+TASK2 0138
+TASK3 0170
+
+ +

Test 52 +
Reads datafield from SIM card + +

+ + + + + + +
+ + + + +
+Read SIM-
+data field  
+to SIM-SCM
+
+ + + + +
+Use menu to 
+read SIM-
+data field
+to SIM-SCM
+
+ +

This display reads a binary datafield from SIM card to SIM SCM memory +(SCM = Short Code Memory and it means phonebook on SIM card). + +

Prior using this display the identifier of datafield has to be stored as an +alpha-identifier of SCM location number 34 of SIM memory. The datafield +must be written in hexadecimal notation. The identifiers can be found from +the GSM 11.11. + +

The contents of datafield is stored as a data-identifier of SCM location +number 35 of SIM memory. The contents are displayed in hexadecimal notation. +The maximum length of the datafield is 10 bytes, but the length depends on +the name length of the SIM memory. In case the datafield cannot be read the +alpha-identifier of SCM location is NOT DONE. + +

The information of how the read succeeded can be read from the SCM location +36 of SIM memory and on the display for a short period. + +

The following results are possible: + +

+ + + + + + + + + +
OKdatafield was read correctly
NOT BINARYdatafield is either formatted or cyclic
NOT FOUNDdatafield was not found from SIM card
CARD ERRORsomething weird happened, card did not respond as expected
NO RIGHTSnot enough rights to read the datafield (PIN2,adm..)
NOT STOREDcould not store into the result memory place
NO ADDRESScould not read the address from the SCM-location
UNKNOWNunidentified error
+ +

For the time being following binary datafields exist in SIM. In future +there could be more. All of these are not necessarily on all SIM cards. + +

+ + + + + + + + + + + + + + + + + + + + + + + +
2FE2ICC identification(10 bytes)
6F05Language preference(variable length)
6F07IMSI(9 bytes)
6F20Ciphering key Kc (it's read from card after entering PIN)(9 bytes)
6F30PLMN selector(variable length)
6F31HPLMN (home network ?) search period(1 byte)
6F37ACM maximum value(3 bytes)
6F38SIM service table(2-4 bytes)
6F41Price per unit and currency table(5 bytes)
6F45Cell broadcast message identifier selection(variable length)
6F74Broadcast control channels(16 bytes)
6F78Access control class(2 bytes)
6F7BForbidden PLMNs (see test 7)(12 bytes)
6F7ELocation information +(TMSI, +Local Area Information (consist of MCC, MNC & LAC - +see test 11 for them), +last Location Update status)(11 bytes)
6FADAdministrative data(variable length)
6FAEPhase identification(1 byte)
6F43SMS status(variable length)
 

Next two binary datafields are phase 2+ features which are not currently in use

 

6F3EGroup Identifier Level 1(variable length)
6F3FGroup Identifier Level 2(variable length)
+ +

In Nokia 6185/6188 this test looks like follows: + +

+ + + + +
+TASK4 0134  
+TASK5 015C
+TASK6 0138
+TASK7 0170
+
+ +

Test 53 +
Writes datafield into SIM card + +

+ + + + + + +
+ + + + +
+    Write
+ data field
+from SIM-SCM
+  to SIM
+
+ + + + +
+Use menu to
+write data
+field to SIM
+  +
+
+ +

This display writes data for a binary datafield in SIM card by using data +in SCM memory of SIM card. + +

Prior using this display the identifier of datafield has to be stored as an +alpha-identifier of SCM location number 34 of SIM memory. The datafield +must be written in hexadecimal notation. The identifiers can be found from +the GSM 11.11. In addition the data to be stored into SIM card has to be +entered as an alpha-identifier of SCM location number 35 of SIM memory. +The data has to be stored in hexadecimal notation. + +

The result of write operation can be seen from the alpha-identifier of +SCM-location 36 of SIM-memory and on the display for a short period. + +

The following results are possible: + +

+ + + + + + + + + + +
OKdatafield was read correctly
NOT BINARYdatafield is either formatted or cyclic
NOT FOUNDdatafield was not found from SIM card
CARD ERRORsomething weird happened, card did not respond as expected
NO RIGHTSnot enough rights to read the datafield (PIN2,adm..)
DATA ERRORthe data contents in SCM location is coded wrongly
NOT STOREDcould not store into the result memory place
NO ADDRESScould not read the address from the SCM location
UNKNOWNunidentified error
+ +

If you want to see changes, often you have to restart your phone. + +

In Nokia 6185/6188 this test looks like follows: + +

+ + + + +
+TASK8 0134  
+TASK9 015C
+TASK10 0138
+TASK11 0170
+
+ +

Test 54 +
Information about memory blocks + +

+ + + + + + +
+ + + + +
aa bb  aa bb
+aa bb  aa bb
+aa bb  aa bb
+aa bb  aa bb
+
+ + + + +
ResF1  ResF2
+ResF3  ResF4
+ResF5  ResF6
+ResF7  ResF8
+
+ +

Meaning of the individual lines (information about another blocks): + +

+

    +
  1. 1, 2
  2. +
  3. 3, 4
  4. +
  5. 5, 6
  6. +
  7. 7, 8
  8. +
+ +

+

    +
  • aa - number of reserved blocks
  • +
  • bb - number of free blocks in worst case
  • +
+ +

In Nokia 6185/6188 this test looks like follows: + +

+ + + + +
+TASK12 0134 
+TASK13 015C
+TASK14 0138
+TASK15 0170
+
+ +

Test 55 +
Information about memory blocks (some phones don't have this test - +they don't have such big memory) + +

+ + + + + + +
+ + + + +
aa bb  aa bb
+aa bb  aa bb
+aa bb  aa bb
+aa bb  aa bb
+
+ + + + +
ResF9 ResF10
+ResF11ResF12
+ResF13ResF14
+ResF15ResF16
+
+ +

Meaning of the individual lines (information about another blocks): + +

+

    +
  1. 9, 10
  2. +
  3. 11, 12
  4. +
  5. 13, 14
  6. +
  7. 15, 16
  8. +
+ +

+

    +
  • aa - number of reserved blocks
  • +
  • bb - number of free blocks in worst case
  • +
+ +

In Nokia 7110 counters end on ResF11, in 6210/6250 on ResF15. + +

In Nokia 3110 this test looks like test 56. + +

In Nokia 8210/3310 help to this test is a little +different (another firmware "bug" ? ;-))): + +

+

+ + + +
+ + + + +
+ +ResF9 ResF10
+ResF11ResF12
+ResF13ResF14
+ResSF15ResF1
+
+
+
+ +

and values are displayed in first line only... + +

Test 56 +
Block display + +

+ + + + + + +
+ + + + +
 aaaaaa bbb 
+ cccccccc

+
+ + + + +
 Ptr   Cntr 
+ Task

+
+ +

+

    +
  • +aaaaaa - pointer to memory where double deallocation was called, in hex +format.
  • + +
  • +bbb - counter for failed deallocations.
  • + +
  • +cccccccc - name of task which last tried to double deallocate a block +(you can find their list in test 35 description). + + + +
  • +
+ +

This test has correct values only, when counter bbb is different from 0. + +

In Nokia 3110 it looks like test 57. + +

Test 57 +
Memory status before reset + +

+ + + + + + +
+ + + + +
aaaaaaaaaaaa
+aaaaa...
+bbbbbbbb
+
+ + + + +
 Status of
+ stacks
+ Block sets 
+
+ +

+

    +
  • +aaaaaa... - Status of each stack before reset. First position contains +the status of stack 0, second position the status of +stack 1 and so on. The last position contains the status +of System stack. Number of stacks depends on the current +configuration of software. Possible values for each stack are: + +

    +

      +
    • 0: status OK, no overflow - it's normally !
    • +
    • 1: status not OK, stack overflow
    • +
    +

    +

  • + +
  • +bbbbbbb - status of each block set before reset. First position +contains the status of block set 1, second position the +status of block set 2 and so on. Possible values for each +block set are: + +

    +

      +
    • 0: status OK
    • +
    • 1: block set full - it's normally !
    • +
    • 2: (de)allocation error or total memory corruption
    • +
    +
  • + +
+ +

This display is only valid when a unknown or +a stack overflow interrupt has occured. In some phones you can make +restart connected with stack overflow (see question 9) +and see this test in "action"... + +

In Nokia 6210 this test is bigger and displayed on full screen... + +

In Nokia 6185/6188 this test is different: + +

+ + + + +
+ +16:3A 32:26
+64:18 128:21
+168:14
+264:0E +
+
+ + +
Back to the top
+ +

+

[Part 1][Part 2][Part 3][Part 4][Part 5][Part 6][Part 7] +

+
+
+ +

Marcin Wiacek (WWW) +
Last modifcation: 5 January 2002
+ + + diff --git a/Docs/en_US/gsm/netmon/faq_net5.htm b/Docs/en_US/gsm/netmon/faq_net5.htm new file mode 100644 index 0000000..3c34bf1 --- /dev/null +++ b/Docs/en_US/gsm/netmon/faq_net5.htm @@ -0,0 +1,2281 @@ + + + + + + + + + + FAQ - monitor sieci w Nokiach (czê¶æ 6/7) + + + + + +

Strona g³ówna

+ +
Monitor sieci w telefonach Nokia (6/7) + +

[Czê¶æ 1][Czê¶æ 2][Czê¶æ 3][Czê¶æ 4][Czê¶æ 5][Czê¶æ 6][Czê¶æ 7] + +

+ +
+ + + +
    +
  1. Co to jest ?
  2. +
  3. Czy jest mi potrzebny ?
  4. +
  5. Czy po w³±czeniu monitora telefon pobiera wiêcej energii ?
  6. +
  7. Jak go w³±czyæ ?
  8. +
  9. Jak± wersjê monitora mogê w³±czyæ w telefonie ?
  10. +
  11. Czy w³±czenie monitora powoduje utratê gwarancji ?
  12. +
  13. W moim telefonie menu monitora ma numer inny ni¿ 10. Czy to normalne ?
  14. +
  15. W moim telefonie menu monitora ma numer 11, natomiast poprzednia pozycja numer 9. Czy to normalne ?
  16. +
  17. Jak siê nim pos³ugiwaæ ?
  18. +
  19. Czy mogê zepsuæ sobie telefon ?
  20. +
  21. S³owniczek
  22. +
  23. Znaczenie poszczególnych testów
  24. +
  25. Mo¿na te¿ u¿yæ programu...
  26. +
  27. Czy mo¿na korzystaæ z monitora sieci, gdy nie ma w telefonie karty SIM, nie zosta³ podany jej PIN lub jest nieaktywna ?
  28. +
  29. W jaki sposób mogê wy³±czyæ monitor sieci ?
  30. +
  31. Czy powinienem wy³±czyæ monitor sieci przed oddaniem telefonu do serwisu ?
  32. +
  33. Czy po wy³±czeniu monitora sieci bêdê go móg³ w³±czyæ ponownie ?
  34. +
  35. Czy monitor sieci jest dostêpny tak¿e w analogowych Nokiach ?
  36. +
  37. Czy monitor sieci pozwoli na u¿ywanie telefonu podobnie jak radiostacji ?
  38. +
  39. Dlaczego w moim telefonie jest znacznie mniej testów ni¿ zosta³o tutaj opisane ? Czy mogê zwiêkszyæ ich ilo¶æ ?
  40. +
  41. Czy mogê stwierdziæ z pomoc± monitora sieci, gdzie znajduje siê mój rozmówca ?
  42. +
  43. Czy mogê stwierdziæ z pomoc± monitora sieci, gdzie siê znajdujê ?
  44. +
  45. Co to s± kody monitora sieci ?
  46. +
  47. Czy jest prawd±, ¿e monitor sieci w telefonie z dodatkowym urz±dzeniem zmieniaj±cym jego pasmo dzia³a niepoprawnie ?
  48. +
  49. Gdzie znajdê opis protoko³u MBUS/FBUS i komendy zwi±zane z monitorem sieci ?
  50. +
  51. Na li¶cie sieci zabronionych mam nieistniej±ce sieci...
  52. +
  53. Jak sprawdziæ, w jakim pasmie czêstotliwo¶ci (900 czy 1800 Mhz) dzia³a telefon ?
  54. +
  55. Czy mogê u¿yæ kabla DLR-2/DLR-3 do aktywacji monitora ?
  56. +
  57. Czy mogê u¿yæ aktywowaæ monitor sieci korzystaj±c z Init File Editor (Nokia 9110) ?
  58. +
  59. Czy mogê zmusiæ telefon do u¿ywania konkretnego pasma czêstotliwo¶ci (900 lub 1800 Mhz) ?
  60. +
  61. Jak zmieniaæ ustawienia w testach ?
  62. +
  63. Mój telefon ma bardzo krótki czas czuwania - czy mo¿na sprawdziæ, co jest tego przyczyn± ?
  64. +
  65. Czy monitor sieci dostêpny jest tylko po angielsku ?
  66. +
  67. U¿yte materia³y
  68. +
  69. Dodatkowe informacje
  70. +
  71. Czy u¿ywanie/aktywacja monitora co¶ kosztuje ?
  72. +
  73. Czy u¿ywanie monitora jest legalne ?
  74. +
  75. Które komórki na karcie SIM s± u¿ywane w testach monitora ?
  76. +
  77. Czy mogê netmonitora w 3310 uaktywniæ programem do 3210?
  78. +
  79. Po uaktywnieniu netmonitora/BTS TEST telefon "gubi" sieæ komórkow±...
  80. +
  81. Netmonitor pokazuje inn± pojemno¶æ baterii ni¿ informacja na niej...
  82. +
+
+
+ +

Test 58 + + + + + +
+384:02      
+512:02
+752:02
 
+
+ +

Test 59 + + + + + +
+ +0087
+00 00 00 00 

  + +

+ +

Test 60 + +

+ + + + + + +
+ + + + +
 FIELD TEST 
+  DISPLAY 
+ COUNTERS 
+   RESET
+
+ + + + +
Use menu to
+reset field
+test display
+counters
+
+ +

Przez bezpo¶rednie wej¶cie do tego menu mo¿esz wyzerowaæ liczniki od +testu 41 do testu 43 +i od testu 61 do testu 66. + +

+ + + + + + +
Je¿eli wyzerujesz te liczniki na pocz±tku ka¿dego miesi±ca, to bêdziesz +móg³(mog³a) porównaæ ilo¶æ wys³anych SMSów +(test 65) i rozmów (test 63) +z Twoim rachunkiem telefonicznym. +Dodatkowo (w niektórych kartach prepaid - np. Tak-Tak) pobierana jest z góry +op³ata za wys³anie pewnej ilo¶ci SMSów +- je¿eli wyzerujesz te liczniki na pocz±tku "cyklu", bêdzie wiedzieæ, kiedy +z Twojego konta zostan± odjête kolejne pieni±dze... +
+ +

Test 61 + +

+ + + + + + +
+ + + + +
NOPSW  :aaaa
+SYNCR  :bbbb
+RESELEC:cccc
+
+ + + + +
PSWMesgCntr
+SyncMeasCntr
+CellReselCtr
+
+ +

+

    +
  • +aaaa - licznik (szesnastkowy) zliczaj±cy komunikaty MDI_NO_PSW_FOUND +z DSP
  • + +
  • +bbbb - licznik (dziesiêtny) prób zmierzenia synchronizacji. Je¿eli przekroczy +9999, pokazywane s± cztery x.
  • + +
  • +cccc - licznik (szesnastkowy) powtórnych wyborów komórki
  • +
+ +

Warto¶ci liczników s± zapamiêtywane przy wy³±czaniu telefonu. Mo¿esz je +wyzerowaæ u¿ywaj±c testu 60. S± one zerowane, +gdy osi±gn± warto¶ci maksymalne. + +

W telefonach dualnych pojawi siê takie test 61: + +

+ + + + + + +
+ + + + +
aaaaa  bbbbb
+ccccc  ddddd
+eeeee  fffff
+ggggg  hhhhh
+
+ + + + +
NOPswGSM DCS
+Sync GSM DCS
+reselG>G D>D
+reselG>D D>G
+
+ +

+

    +
  • +aaaaa - dla GSM 900: licznik (dziesiêtny) zliczaj±cy komunikaty MDI_NO_PSW_FOUND +z DSP
  • + +
  • +bbbb - dla GSM 1800: licznik (dziesiêtny) zliczaj±cy komunikaty MDI_NO_PSW_FOUND +z DSP
  • + +
  • +ccccc - dla GSM 900: licznik (dziesiêtny) prób zmierzenia synchronizacji. +Je¿eli przekroczy 99999, pokazywane jest piêæ x.
  • + +
  • +ddddd - dla GSM 1800: licznik (dziesiêtny) prób zmierzenia synchronizacji. +Je¿eli przekroczy 99999, pokazywane jest piêæ x.
  • + +
  • +eeeee - licznik (dziesi±tkowy) powtórnych wyborów komórki GSM 900 - GSM +900
  • + +
  • +fffff - licznik (dziesi±tkowy) powtórnych wyborów komórki GSM 1800 - GSM +1800
  • + +
  • +ggggg - licznik (dziesi±tkowy) powtórnych wyborów komórki GSM 900 - GSM +1800
  • + +
  • +hhhhh - licznik (dziesi±tkowy) powtórnych wyborów komórki GSM 1800 - GSM +900
  • +
+ +

Warto¶ci liczników s± zapamiêtywane przy wy³±czaniu telefonu. Mo¿esz je +wyzerowaæ u¿ywaj±c testu 60. S± one zerowane, +gdy osi±gn± warto¶ci maksymalne. + +

W Nokii 6210/8210: + +

+ + + + + + +
+ + + + +
+NOPSW: 008A
+SYNCR: 766
+RESELEC:872D
+RmMonTO:0000 +
+
+ + + + +
+PSWMesgCntr
+SyncMeasCntr
+CellReselCtr
+RM Mon TOuts +
+
+ +

Natomiast w Nokii 3310 pomoc wygl±da jak pomoc w modelu 6210/8210, natomiast warto¶ci +mniej wiêcej tak: + +

+ + + + +
+  17
+ 135        
+5112
+  +
+ +

W Nokii 6185/6188 jest on jeszcze inny: + +

+ + + + +
+V
+aaaaaaaaaaaa
+bbbbbbbbbb
+ccccccc +
+ +

    +
  • aaaaaaaaaaaa - wersja oprogramowania telefonu
  • +
  • bbbbbbbbbb - data oprogramowania telefonu
  • +
  • ccccccc - oznaczenie kodowe telefonu (NSD-3AX)
  • +
+ +

+ + + + + + +
Ten telefon pokazuje te informacje równie¿ po u¿yciu kodu *#837#. +Je¿eli chcesz siê wiêcej dowiedzieæ o wewnêtrznym oprogramowaniu telefonów Nokia +(ró¿nice, wersje, itd.), kliknij tutaj.
+ +

Test 62 + +

+ + + + + + +
+ + + + +
 PSW  :aaaa 
+ SYNCR:bbbb
+ BCCH :cccc 
+ BCCHE:dddd
+
+ + + + +
NeghbrPSWCtr
+SyncMeasCntr
+BCCHMeasAtmp
+BCCHExtMeAtm
+
+ +

+

    +
  • +aaaa - ilo¶æ prób pomiarów PSW w s±siednich komórkach
  • + +
  • +bbbb - ilo¶æ prób zmierzenia synchronizacji w s±siednich komórkach
  • + +
  • +cccc - ilo¶æ prób pomiarów kana³ów +BCCH +(tzn. jako¶ci transmisji z nimi) w s±siednich komórkach (patrz opis C1)
  • + +
  • +dddd - ilo¶æ prób rozszerzonych pomiarów kana³ów BCCH +(tzn. jako¶ci transmisji z nimi) w s±siednich komórkach (patrz opis C1)
  • +
+ +

Warto¶ci liczników s± zapamiêtywane przy wy³±czaniu telefonu. Mo¿esz je +wyzerowaæ u¿ywaj±c testu 60. S± one zerowane, +gdy osi±gn± warto¶ci maksymalne. + +

W Nokii 3310 warto¶ci liczników s± piêciocyfrowe i wyrównane do prawej strony ekranu... + +

W Nokii 6185/6188 ten test wygl±da inaczej: + +

+ + + + +
+DSP ROM 2   
+VERS 430
+BETA 0014
 
+
+ +

Test 63 + +

+ + + + + + +
+ + + + +
  aa    bb
+  ccc   ddd 
+  eee   fff
+
+ + + + +
CalRel RelDi
+MOCAtmp MOOK
+AllMT   MTOK
+
+ +

+

    +
  • +aa - tutaj znajdziesz przyczynê zakoñczenia ostatniego po³±czenia (parametr +ten jest równie¿ podawany w te¶cie 2 +i te¶cie 39 (w tym ostatnim menu +znajdziesz wyja¶nienia - patrz opis pierwszego parametru))
  • + +
  • +bb - kolejna informacja o zakoñczeniu ostatniego po³±czenia: + +

    +

      +
    • +UN: nieznana (przyk³adowo: od w³±czenia Twojego telefonu nie by³y wykonywane +¿adne po³±czenia)
    • + +
    • +IN: przyczyna wewnêtrzna (przyk³adowo: w³±czy³e¶(a¶) w te¶cie 17 +test BTSa, telefon nie odnalaz³ +sieci na podanym kanale, a Ty próbowa³e¶(a¶) wykonaæ po³±czenie)
    • + +
    • +MT: przerwanie przez sieæ
    • + +
    • +MO: nast±pi³o roz³±czenie (od³o¿enie s³uchawki) z którego¶ telefonu
    • +
    +

    +

  • + +
  • +ccc - ilo¶æ wybieranych po³±czeñ z Twojego telefonu
  • + +
  • +ddd - ilo¶æ poprawnie zrealizowanych po³±czeñ wychodz±cych z Twojego telefonu +(tzn. ile razy dodzwoni³e¶(a¶) siê do Twojego rozmówcy). W Nokii 3310 równie¿ +w te¶cie 132.
  • + +
  • +eee - ilo¶æ wszystkich rozmów przychodz±cych
  • + +
  • +fff - ilo¶æ odebranych rozmów przychodz±cych. W Nokii 3310 równie¿ +w te¶cie 132.
  • +
+ +

Po osi±gniêciu warto¶ci maksymalnej liczniki s± zerowane (mo¿esz to te¿ +zrobiæ w te¶cie 60). Ich warto¶ci (od licznika +ccc w³±cznie) s± zapamiêtywane przy wy³±czaniu telefonu. + +

W Nokii 3310 parametry s± nieco poprzesuwane w stosunku do rysunku powy¿ej. + +

W Nokii 6185/6188 ten test wygl±da inaczej: + +

+ + + + +
+ +C1M 00      
+C1L 00
+C2M 00
+C2L 03 +
+
+ +

Test 64 +
Zawiera m.in. informacje, ile razy Twój telefon informowa³ sieæ o swoim +po³o¿eniu (patrz równie¿ opis test 10) + +

+ + + + + + +
+ + + + +
 aa bbb ccc 
+ dd eee fff 

+
+ + + + +
Nfai NL NLOK
+PFai PL PLOK
+ Loc update
+  counters
+
+ +

+

    +
  • +aaa - kod b³êdu (zerowany po w³±czeniu telefonu) przy ostatnim b³êdnym +Location +Update (tzn. zmienia siê tylko wtedy, gdy gdy wyst±pi³ b³±d przy jego +wykonywaniu). Znajdziesz go równie¿ w te¶cie 39 +- jest to warto¶æ parametru MM (tam podane s± równie¿ warto¶ci +kodów z wyja¶nieniami).
  • + +
  • +bbb - ile razy próbowano wykonaæ Location +Update
  • + +
  • +ccc - ilo¶æ prób wykonania Location +Update zakoñczonych sukcesem
  • + +
  • +ddd - b³±d przy ostatnim PLU lub IMSI +Attach (17 oznacza prawdopodobnie zajêto¶æ sieci)
  • + +
  • +eee - ile razy telefon próbowa³ wykonaæ PLU lub +IMSI Attach
  • + +
  • +fff - ilo¶æ udanych prób wykonania PLU lub +IMSI Attach
  • +
+ +

Warto¶ci tych liczników (z wyj±tkiem kodów b³êdów) s± zapamiêtywane przy +wy³±czaniu telefonu. Mo¿esz je wyzerowaæ w te¶cie 60 +(jest robione równie¿, gdy osi±gn± warto¶ci maksymalne). + +

W Nokii 3310 parametry s± nieco poprzesuwane w stosunku do rysunku powy¿ej. + +

+ + + + + + +
Je¿eli nie wy³±czasz telefonu i jeste¶ ca³y czas w zasiêgu swojej sieci, +to z tego menu mo¿esz siê dowiedzieæ (w przybli¿eniu), jak d³ugo jest w³±czony +(musisz w +te¶cie 10 sprawdziæ, +co ile jest zerowany licznik T3212 (parametr ccc) i pomno¿yæ tamten czas +przez parametr eee z tego menu). Mo¿esz u¿yæ do tego celu równie¿ licznika +z testu 82 (jest dok³adniejszy, ale wymaga +w³±czenia którego¶ testu) albo menu serwisowego (Nokia 6130 lub 3210).
+ +

W Nokii 6185/6188 ten test wygl±da inaczej: + +

+ + + + +
+ +C3M 00      
+C3L 00
+C4M 00
+C4L 03 +
+
+ +

Test 65 +
Menu zwi±zane z wiadomo¶ciami SMS +(raporty nie s± uwzglêdniane) + +

+ + + + + + +
+ + + + +
 aa bbb ccc 
+ dd eee fff
+ gggg
+
+ + + + +
SFai MO MOOK
+RFai MT MTOK
+Sched Msgs
+SMS counters
+
+ +

+

    +
  • +aaa - numer b³êdu przy wysy³aniu ostatniego SMSa +(zerowany po w³±czeniu telefonu): + +

    +

      +
    • +  1: 'Nie ma takiego numeru' ('Number not in use')
    • + +
    • + 21: 'Wys³anie nieudane tym razem' ('Message not sent this +time'). B³±d pojawiaj±cy siê przy próbie wys³ania wiadomo¶ci z Tak-Taka +(gdy nie mo¿na jeszcze by³o ich by³o z niego wysy³aæ - przed 28.04.2000), +wysy³aniu pod b³êdny numer (dobre SMSC), przez SMSC zablokowane na +Twoj± sieæ albo przy próbie wys³ania SMS z numerem alfanumerycznym +przez SMSC nieobs³uguj±ce tego formatu
    • + +
    • + 28: 'Nie ma takiego numeru' ('Number not in use')
    • + +
    • + 38: 'Wys³anie nieudane tym razem' ('Message not sent this +time'). B³±d przy wysy³aniu wiadomo¶ci przez SMSC zablokowane na Twoj± +sieæ.
    • + +
    • + 42: prawdopodobnie b³±d ten pojawia siê, gdy u¿yte SMSC +jest przeci±¿one (za du¿o wys³anych na raz wiadomo¶ci przez u¿ytkowników) +i nie mo¿e wys³aæ Twojej wiadomo¶ci
    • + +
    • + 50: "Sprawd¼ us³ugi operatora" ("Check operator services"). +B³±d pojawiaj±cy siê przy próbie wys³ania wiadomo¶ci z Tak-Taka +(gdy nie mo¿na jeszcze by³o ich by³o z niego wysy³aæ - przed 28.04.2000). +
    • + +
    • + 96: 'Nieudane wys³anie wiadomo¶ci' ('Message sending failed'). +Przyczyn± jest niew³a¶ciwy numer SMSC (+1)
    • + +
    • +111: 'Nieudane wys³anie wiadomo¶ci' ('Message sending failed'). +Przyczyn± jest niew³a¶ciwy numer, pod który wysy³a³e¶ wiadomo¶æ (albo numer +SMSC)
    • + +
    • +166: 'Nieudane wys³anie wiadomo¶ci' ('Message sending failed'). +Pokazuje siê przy b³êdnym numerze SMSC albo SMSC zablokowanym na Twoj± +sieæ.
    • + +
    • +169: 'Nieudane wys³anie wiadomo¶ci' ('Message sending failed'). +Brak pieniêdzy przy karcie prepaid.
    • + +
    • +178: 'Nieudane wys³anie wiadomo¶ci' ('Message sending failed'). +B³±d pojawiaj±cy siê przy próbie wys³ania wiadomo¶ci z Tak-Taka +(gdy nie mo¿na tego jeszcze by³o z niego robiæ - przed 28.04.2000).
    • + +
    • +252: 'Nieudane wys³anie wiadomo¶ci' ('Message sending failed'). +Pojawia siê, gdy zosta³ wy³±czony nadajnik telefonu w te¶cie 45 +albo telefon nie móg³ znale¼æ sieci (w te¶cie BTSa +z testu 17 zosta³ ustawiony +taki kana³).
    • + +
    • +253: 'Nieudane wys³anie wiadomo¶ci' ('Message sending failed'). Pokazuje +siê przy b³êdnym numerze SMSC.
    • +
    +

    +

  • + +
  • +bbb - ilo¶æ prób wys³ania SMSów. +Nale¿y pamiêtaæ, ¿e raport o oczekiwaniu SMSa na dostarczenie +(pending albo oczekuje) nie jest nigdzie +wysy³any z telefonu i uwzglêdniany w tym parametrze +(natomiast informacja o jego (nie)dostarczeniu +przes³ana z SMSC ju¿ tak - patrz opis parametru eee i fff). Przyk³adowo: +w opcjach telefonu zaznaczy³e¶, ¿e chcesz otrzymywaæ raporty. Wysy³asz SMSa +- telefon zwiêksza warto¶æ tego parametru. Je¿eli pokaza³, ¿e wys³anie jest udane, +zwiêksza równie¿ warto¶æ parametru ccc o 1 i zapisuje raport dotycz±cy oczekiwania +na dostarczenie wys³anego SMSa. Je¿eli SMSC go dostarczy³o (lub nie) i wysy³a +o tym raport (Nieudane/Failed lub Delivered/Dostarczono), zwiêksza siê warto¶æ parametru eee. +Je¿eli odebranie tego raportu +powiedzie siê, zwiêksza siê o 1 równie¿ warto¶æ parametru fff (telefon sprawdza +teraz wszystkie zapisane raporty. W wiêkszo¶ci Nokii: je¿eli w którym¶ z +raportów dotycz±cym oczekiwania na dostarczenie zgadza siê numer SMSC i +numer, pod który wysy³ano wiadomo¶æ, telefon kasuje tamten i zapisuje na jego miejsce +otrzymany). +
  • + +
  • +ccc - ilo¶æ poprawnie wys³anych SMSów +(tzn. takich, które zosta³y zaakceptowane przez u¿yte centrum SMS - tylko +za nie zap³aci³e¶(a¶)). Uwagi dotycz±ce tego parametru s± podane przy opisie +poprzedniego.
  • + +
  • +ddd - numer b³êdu przy otrzymywaniu ostatniego SMSa +(zerowany po w³±czeniu telefonu): + +

    +

      +
    • +22: pe³na pamiêæ przeznaczona na wiadomo¶ci (telefon próbowa³ +przyj±æ SMSa - zwiêkszy³a +siê warto¶æ licznika eee, nie zmieni³a siê warto¶æ fff). Informuje o tym +równie¿ mrugaj±ca koperta na samym górze wy¶wietlacza, a telefon pokaza³ +równie¿ oddzielny komunikat 'Brak miejsca na wiêcej wiadomo¶ci' ('No space +for new messages'). Je¿eli zapisujesz wiadomo¶ci na karcie SIM, ich ³±czna +ilo¶æ w 'Skrzynce nadawczej' ('Outbox') i 'Skrzynce odbiorczej' ('Inbox') +zale¿y w³a¶nie od niej (w ró¿nych sieciach komórkowych oferowane s± karty +SIM z ró¿n± ilo¶ci± mo¿liwych do zapisania wiadomo¶ci SMS +- dla kart Plusa wynosi ona 10 lub 25, Ery +15, a Idei 30). Nie mo¿esz +wiêc dopisywaæ nowych wiadomo¶ci (komunikat 'Pe³na pamiêæ wiadomo¶ci' ('Message +memory full')). Je¿eli nie wykasujesz której¶ z ju¿ zapisanych wiadomo¶ci, +mo¿esz utraciæ te przychodz±ce (je¿eli sieæ nie dostarczy ich przez czas +okre¶lony przez ich nadawcê, zostan± bezpowrotnie wykasowane).
    • +
    +

    +

  • + +
  • +eee - ilo¶æ prób odebrania SMSów. +Uwaga podana przy opisie nastêpnego parameteru dotyczy równie¿ tego.
  • + +
  • +fff - ilo¶æ poprawnie odebranych SMSów. +Nale¿y pamiêtaæ, ¿e raporty o (nie)dostarczeniu SMSa, +loga, dzwonki, wizytówki i wiadomo¶ci graficzne s± równie¿ dostarczane w tej formie +(jako odpowiedni SMS) +i uwzglêdnianie w tym parametrze +(przy czym ka¿da wiadomo¶æ graficzna wys³ana np. z Nokii 3210 zajmuje +a¿ 3 SMSy)
  • + +
  • +gggg - ilo¶æ odebranych komunikatów nadawania komórkowego (czy obs³uguje je aktualnie u¿ywany +BTS, sprawdzisz w te¶cie 7): +ile razy Twój telefon odebra³ komunikaty tzw. cell-info (w³±czasz jego odbiór w Menu 4-2-2 w Nokii 5110) +oraz cell-broadcast (Menu 2-5 w Nokii 5110).
  • +
+ +

Warto¶ci tych liczników (z wyj±tkiem kodów b³êdów) s± zapamiêtywane przy +wy³±czaniu telefonu. Mo¿esz je wyzerowaæ w te¶cie 60 +(jest to robione równie¿, gdy osi±gn± maksymalne warto¶ci). + +

Otrzyma³em równie¿ informacje, ¿e w niektórych (?) Nokiach 6150 z oprogramowaniem 4.13 +nie zmienia siê warto¶æ licznika gggg pomimo otrzymywania komunikatów +(czy jest to b³±d w tej wersji oprogramowania ?) + +

W Nokii 3310 parametry s± nieco poprzesuwane w stosunku do rysunku powy¿ej. + +

Je¿eli chcesz siê dowiedzieæ troszkê wiêcej o wysy³aniu SMSów +(albo poznaæ numery SMSC operatorów), zajrzyj pod adres www.vdheyden.demon.nl/sms/index1.htm. + +

+ + + + + + +
Spora czê¶æ programów komputerowych nie sygnalizuje u¿ytkownikowi, czy +wiadomo¶æ zosta³a poprawnie wys³ana - Ty bêdziesz móg³ to natomiast sprawdziæ +dziêki temu testowi.
+ +

W Nokii 3110 test ten wygl±da jak test 64. + +

W Nokii 6185/6188 ten test wygl±da inaczej: + +

+ + + + +
+ +C5M 00      
+C5L 00
+C6M 00
+C6L 03 +
+
+ +

Test 66 +
Liczniki przekroczenia czasu zwi±zane z SMSami +(jak wiadomo, przy wysy³aniu takiej wiadomo¶ci mo¿na ustaliæ czas, przez +jaki czas sieæ bêdzie próbowa³a j± dostarczyæ do telefonu odbiorcy - przypuszczam, +¿e te liczniki s± w jaki¶ sposób z tym zwi±zane). + +

+ + + + + + +
+ + + + +
 aaa bbb cc 
+ ddd eee ff

+
+ + + + +
TR1 TR2 TRA 
+TC1 TC2 SCH 
+SMS timeout
+  counters
+
+ +

+

    +
  • aaa - licznik przekroczenia czasu dla TR1M
  • +
  • bbb - licznik przekroczenia czasu dla TR2M
  • +
  • cc - licznik przekroczenia czasu dla TRAM
  • +
  • ddd - licznik przekroczenia czasu dla TC1M
  • +
  • eee - licznik przekroczenia czasu dla TC2M
  • +
  • ff - licznik przekroczenia czasu dla nadawania komórkowego
  • +
+ +

Warto¶ci liczników za zapamiêtywane przy wy³±czaniu telefonu. Je¿eli osi±gn± +warto¶ci maksymalne, s± zerowane. Mo¿esz je równie¿ wyzerowaæ w +te¶cie 60. + +

W Nokii 6185/6188 ten test wygl±da inaczej: + +

+ + + + +
+ +CT1 82      
+CT2 00
+RF 23
  +
+
+ +

Test 67 + +

+ + + + +
+ +REC 00
+SEND 00     
+CTR 4C
+STA 68 +
+
+ +

Test 68 + +

+ + + + +
+ +CNT 00      
+ACK 00

+M1M B3 +
+
+ +

Test 70 +
Zawarto¶æ tymczasowych liczników DSP (szesnastkowe +warto¶ci komórek pamiêci oznaczanych w opisach jako r_dsp2ftd+0, r_dsp2ftd+1, +r_dsp2ftd+2, itd.) + +

+ + + + + + +
+ + + + +
aaaaa  bbbbb
+ccccc  ddddd
+eeeee  fffff
+ggggg  hhhhh
+
+ + + + +
 Temporary
+DSP counters
+ R DSP2FTD
+
+ +

Ten test jest u¿ywany przez debuggery +oprogramowania DSP. Mog± one wstawiaæ pewne +u¿yteczne informacje do okre¶lonych komórek pamiêci. Kiedy ten test jest wybrany, +MCU pokazuje zawarto¶æ tych komórek pamiêci +na wy¶wietlaczu w podanym wy¿ej formacie. + +

W Nokii 3110 test ten wygl±da jak test 80. + +

Test 71, 72 +
Oba menu pozwalaj± kontrolowaæ ustawienia DSP + +

Je¿eli wejdziesz bezpo¶rednio do którego z nich, w obu zmieniaj± siê +cyferki pod AUDIO ENHANCEMENT - ich warto¶ci zale¿± od w³o¿onej karty SIM. +W zale¿no¶ci od tego, które z nich teraz ogl±da³e¶(a¶) (u¿ywaj±c strza³ek), +zmieni siê d¼wiêk (mog± siê np. pojawiæ okropne szumy i trzaski). Mo¿esz +mieæ wp³yw na te warto¶ci (mog± mieæ maksymaln± warto¶æ 65536) - wystarczy +je zapisaæ odpowiednio w 31 i 32 pozycji ksi±¿ki telefonicznej na karcie +SIM (jak to zrobiæ ? opis znajdziesz przy te¶cie 17). +Parametr Conf z testu 30 +pokazuje natomiast wybran± tutaj warto¶æ. ¯eby wróciæ do stanu wyj¶ciowego, +musisz wy³±czyæ i w³±czyæ telefon. Na jako¶æ d¼wiêku (tzn. czy przy pewnych +ustawieniach pojawiaj± siê zak³ócenia) nie wp³ywa pod³±czenie zestawu s³uchawkowego +i samochodowego. + +

+ + + + + + +
+ + + + +
    AUDIO
+ ENHANCEMENT
+    aaaaa
+
+ + + + +
Use menu to
+control DSP
+   audio
+enhancements
+
+ +

W Nokii 3110 test 71 wygl±da jak test 81. + +

Test 73 +
Ogólne informacje o ustawieniach DSP + +

+ + + + + + +
+ + + + +
 aaa bb  aaa
+cccc bb cccc
+cccc bb cccc
+ cccc cccc
+
+ + + + +
DB1  B1  DB2
+HEX1 B2 HEX2
+HEX3 B3 HEX4
+  HEX5 HEX6
+
+ +

+

    +
  • +aaa - g³ówna g³o¶no¶æ (poziom sygna³u) w dB. Znak czê¶ci u³amkowej i znak +nie jest pokazywany (np. zamiast -10.5 zobaczysz 105)
  • + +
  • +bb - g³ówna warto¶æ (podana szesnastkowo) bajtu (u¿ywana dla mieszanych +znaczników).
  • + +
  • +cccc - g³ówna warto¶æ szesnastkowa
  • +
+ +

Angielskie opisy pisz± o tym te¶cie: +
"Warto¶ci liczników s± pokazywane tylko w czasie rozmowy +(gdy w³±czone s± testy monitora). Je¿eli po³±czenie +jest przerwane, zatrzymuj± siê one na ostatnich warto¶ciach. Ich warto¶ci +nie s± zapamiêtywane przy wy³±czaniu telefonu." + +

...ale ja tego nie zauwa¿y³em i u mnie zawsze by³y równe 0 +(czy trzeba jako¶ dodatkowo w³±czyæ ten test ?) + +

W Nokii 3110 test ten wygl±da jak test 82. + +

Test 74 +
Informacje o g³o¶no¶ci podczas rozmowy + +

+ + + + + + +
+ + + + +
  aaa  bbb  
+       ccc
+  dd    ee
+
+ + + + +
DSigL USigL
+      NseLvl
+ DTbl  UTbl
+
+ +

+

    +
  • +aaa - g³o¶no¶æ sygna³u z telefonu naszego rozmówcy.
  • + +
  • +bbb - g³o¶no¶æ sygna³u z Twojego telefonu.
  • + +
  • +ccc - g³o¶no¶æ tzw. "komfortowego szumu" (patrz opis DTX).
  • + +
  • +dd - warto¶æ DRC dla sygna³u z telefonu naszego rozmówcy (dwucyfrowa liczba +ca³kowita)
  • + +
  • +ee - warto¶æ DRC dla sygna³u z Twojego telefonu (dwucyfrowa liczba ca³kowita)
  • +
+ +

Pierwsze trzy parametry s± podawane w dB i obliczane na podstawie DRC. +Znak czê¶ci u³amkowej i znak liczby nie s± pokazywane (np. zamiast +-10.5 zobaczysz 105). + +

Angielskie opisy pisz± o tym te¶cie: +
"Warto¶ci liczników s± pokazywane tylko w czasie rozmowy +(gdy w³±czone s± testy monitora). Je¿eli po³±czenie +jest przerwane, zatrzymuj± siê one na ostatnich warto¶ciach. Ich warto¶ci +nie s± zapamiêtywane przy wy³±czaniu telefonu." + +

...ale ja tego nie zauwa¿y³em i u mnie zawsze by³y równe 0 +(czy trzeba jako¶ dodatkowo w³±czyæ ten test ?) + +

W Nokii 3110 test ten wygl±da jak test 72. + +

Test 75 +
Informacje o trybie pracy pod³±czonych akcesoriów d¼wiêkowych + +

+ + + + + + +
+ + + + +
Mod:aaaaaaa
+AudReq: bbbb
+AccMod: cccc
+H2Path: dddd
+
+ + + + +
ExtAudStatus
+AudioRequest
+AccAudMode
+
+ +

+

    +
  • +aaaaa - rodzaj pod³±czonych do telefonu akcesoriów d¼wiêkowych +(dla niektórych telefonów mo¿liwe warto¶ci to: +HP, HF, HEADSET, EXT albo HP_OFFHO). W Nokii 7110 podawany w test 99. + +

    Je¶li chodzi o Nokiê 5110, przyjmowane by³y nastêpuj±ce +warto¶ci: + +

    + + + + + + + + + + + + +
    warto¶æ
    stan normalny (nie pod³±czono nic, jest kabel FBUS/M2BUS albo ³adowarka)HP
    zestaw s³uchawkowy (telefon wy¶wietla Mikrozestaw (Headset)) +
    Mo¿esz go zasymulowaæ +
    ³±cz±c piny 1-2 z³±cza na dole telefonu +
    (patrz±c od lewej strony, gdy telefon le¿y wy¶wietlaczem do góry). +
    W Nokii 9110 mo¿esz do tego u¿yæ równie¿ testu 92.
    HD (skrót od HeaDset)
    zestaw samochodowy (telefon wy¶wietla Samochód (Car)) +
    Mo¿esz go zasymulowaæ +
    ³±cz±c piny 2-3 z³±cza na dole telefonu +
    (patrz±c od lewej strony, gdy telefon le¿y wy¶wietlaczem do góry)
    HFU 1 (skrót od Hands Free Unit 1)
    + +

    Powy¿sze metody symulacji zestawów s± poprawne dla Nokii 5xxx, 6xxx +i zapewne 9110 (u¿ywasz ich na W£ASN¡ odpowiedzialno¶æ). + +

    Po pod³±czeniu (symulacji) obu zestawów w telefonie uaktywnia³a siê funkcja +"Odbiór samoczynny" ("Automatic answer") - Menu 4-1-6 w Nokii 5110 - dziêki +której telefon mo¿e automatycznie odbieraæ przychodz±ce po³±czenie. W Nokii 9110 +mo¿esz j± uaktywniæ równie¿ m.in. u¿ywaj±c testu 92. +

    +

  • + +
  • +bbbb - audio_request bitmap in hex
  • + +
  • +cccc - tryb pracy akcesoriów d¼wiêkowych
  • + +
  • +dd - ¶cie¿ka dla HFU-2 (Hands Free Unit-2)
  • +
+ +

W Nokii 3110 test ten wygl±da jak test 73. + +

Test 76 +
Informacje o d¼wiêku, który Ty s³yszysz w swoim telefonie + +

+ + + + + + +
+ + + + +
 Vab  Pccc
+ Cddd CAeee
+PAfff
+
+ + + + +
EVol PeakVal
+CutOff COAve
+PkAver
+
+ +

+

    +
  • +ab - g³o¶no¶æ (poni¿sze informacje s± na pewno poprawne dla Nokii 5110): + + + + + + + + + + + + + + + + + + + + +
    ab
    g³o¶nik wy³±czony0F
    wydawany jest d¼wiêk po naci¶niêciu klawisza (poziom g³o¶no¶ci 1)08
    wydawany jest d¼wiêk po naci¶niêciu klawisza (poziom g³o¶no¶ci 2)04
    wydawany jest d¼wiêk po naci¶niêciu klawisza (poziom g³o¶no¶ci 3 albo +w³±czone g³o¶ne d¼wiêki)00
    + +

    W czasie po³±czenia parametr a przyjmuje warto¶æ "A", natomiast parametr +b pozwala obliczyæ ustawion± g³o¶no¶æ d¼wiêku (musisz przeliczyæ go na +warto¶æ dziesiêtn± i odj±æ od niego 11) - tê ostatni± mo¿esz równie¿ sprawdziæ +w te¶cie 30. Przy pod³±czonym +zestawie s³uchawkowym parametr a przyjmuje natomiast warto¶æ "C" (wzór do obliczenia +g³o¶no¶ci rozmowy przyjmuje wtedy warto¶æ 10 - b). Je¿eli do telefonu pod³±czony +jest zestaw samochodowy, parametr a jest równy "2", a wzór na g³o¶no¶æ podczas rozmowy +przyjmuje warto¶æ 10 - b. + +

    Je¿eli kto¶ do Ciebie dzwoni (nie odebra³e¶(a¶) jeszcze po³±czenia), +telefon nie zawsze pokazuje g³o¶no¶æ emitowanego d¼wiêku (zachowuje siê +tak jak przy wy³±czonym g³o¶niku) - nie wiem, czy jest to b³±d w oprogramowaniu +testuj±cym (wersja 5.07), czy co¶ innego. Tylko bowiem przy pewnych kombinacjach +ustawieñ rodzaju dzwonka (ci±g³y, wzrastaj±cy, itp.) i jego g³o¶no¶ci jest +ona pokazywana (podajê od razu warto¶ci obu parametrów): poziom 1 - A7, +poziom 2 - A6, poziom 4 - A4, poziom 5 - A0. +

  • + +
  • +

    ccc - maksymalna g³o¶no¶æ sygna³u z telefonu Twojego rozmówcy w czasie +ostatniej ramki (podawana w dB). Znak i znak czê¶ci dziesiêtnej nie s± +pokazywane (np. zamiast -10.5 zobaczysz 105).

  • + +
  • +

    ddd - licznik pokazuj±cy ilo¶æ próbek sygna³u akustycznego, w których nast±pi³o +przepe³nienie (tak jak przesterowanie), w czasie ostatniej ramki.

  • + +
  • +

    eee - ¶rednia licznika podawanego jako poprzedni parametr. Znak i znak +czê¶ci dziesiêtnej nie s± pokazywane (np. zamiast -10.5 zobaczysz 105).

  • + +
  • +

    fff - ¶rednia g³o¶no¶æ s³yszanego przez Ciebie d¼wiêku

  • +
+ +

Angielskie opisy pisz± o tym te¶cie: +
"Warto¶ci liczników s± pokazywane tylko w czasie rozmowy +(gdy w³±czone s± testy monitora). Je¿eli po³±czenie +jest przerwane, zatrzymuj± siê one na ostatnich warto¶ciach. Ich warto¶ci +nie s± zapamiêtywane przy wy³±czaniu telefonu." + +

...ale ja tego nie zauwa¿y³em i u mnie zawsze (bez pierwszego) by³y równe 0 +(czy trzeba jako¶ dodatkowo w³±czyæ ten test ?) + +

Test 77 +
Informacje o d¼wiêku, który s³yszy Twój rozmówca (tzn. parametry d¼wiêku +wysy³anego przez Twój telefon) + +

+ + + + + + +
+ + + + +
 Paaa  Abbb 
+ Cccc CAddd

+
+ + + + +
MicPeak MAve
+CutOff COAve

+
+ +

+

    +
  • +aaa - maksymalna g³o¶no¶æ wysy³anego d¼wiêku w czasie ostatniej ramki w +dB. Znak czê¶ci u³amkowej i znak liczby nie s± pokazywane (np. zamiast +-10.5 zobaczysz 105).
  • + +
  • +bbb - przeciêtna g³o¶no¶æ wysy³anego d¼wiêku w dB. Znak czê¶ci u³amkowej +i znak liczby nie s± pokazywane (np. zamiast -10.5 zobaczysz 105).
  • + +
  • +ccc - licznik pokazuj±cy ilo¶æ próbek sygna³u akustycznego, w których nast±pi³o +przepe³nienie (tak jak przesterowanie), w czasie ostatniej ramki.
  • + +
  • +ddd - ¶rednia licznika podawanego jako poprzedni parametr.
  • +
+ +

Angielskie opisy pisz± o tym te¶cie: +
"Warto¶ci liczników s± pokazywane tylko w czasie rozmowy +(gdy w³±czone s± testy monitora). Je¿eli po³±czenie +jest przerwane, zatrzymuj± siê one na ostatnich warto¶ciach. Ich warto¶ci +nie s± zapamiêtywane przy wy³±czaniu telefonu." + +

...ale ja tego nie zauwa¿y³em i u mnie zawsze by³y równe 0 +(czy trzeba jako¶ dodatkowo w³±czyæ ten test ?) + +

W Nokii 3110 test ten wygl±da jak test 75. + +

Test 78 +
Kolejne parametry DSP + +

+ + + + + + +
+ + + + +
aaa bbb ccc 
+ddd eee fff
+ggg h i jjj
+ kkkk llll
+
+ + + + +
EAA Ada ERL 
+RxG TxG GLi
+TxN Sta Mod
+ RVAD TVAD
+
+ +

+

    +
  • +aaa - poziom cyfrowego t³umienia echa z punktu widzenia DSP +:-) w dB. Znak liczby i czê¶ci u³amkowej nie s± pokazywane (np. -10.5 dB +bêdzie wy¶wietlane jako "105", -0.5 dB za¶ jako "  5"). 20*log10( +Q15 )
  • + +
  • +bbb - poziom adaptacyjnego t³umienia echa (znak czê¶ci u³amkowej nie jest +pokazywany). 20*log10( Q15 )
  • + +
  • +ccc - poziom st³umienia sygnalu, który wraca po odbiciu (znak czê¶ci u³amkowej +nie jest pokazywany). 20*log10( Q15 )
  • + +
  • +ddd - t³umienie t³umika sygna³u odbieranego (akustyczne) w dB. Znak liczby +i czê¶ci u³amkowej nie s± pokazywane. 20*log10( Q15 aec_rx_gain )
  • + +
  • +eee - t³umienie t³umika sygna³u nadawanego (akustyczne) w dB. Znak liczby +i czê¶ci u³amkowej nie s± pokazywane. 20*log10( Q15 aec_tx_gain )
  • + +
  • +fff - ograniczenie dla dwóch powy¿szych parametrów (ddd i eee) - znak liczby +i czê¶ci u³amkowej nie s± pokazywane. 20*log10( Q15 aec_gain_limit )
  • + +
  • +ggg - g³o¶no¶æ nadawanego "komfortowego szumu" (patrz opis DTX) +w dB. Znak czê¶ci u³amkowej i znak liczny nie s± pokazywane. 20*log10( +Q15 aec_tx_noise)
  • + +
  • +h - stan filtru adaptacyjnego. (Q0 aec_nlms_state) (bit UPDATE << +2) | (bit NLMS2 << 1) | (bit NLMS1)
  • + +
  • +i - informacja, o tym czy jest generowany tzw. "komfortowy szum" - patrz +opis DTX (warto¶ci 0 lub 1) (Q0 AEC_TX_COMF_GEN)
  • + +
  • +jjj - tryb pracy uk³adu t³umików i filtru adaptacyjnego (AEC) (byte Q0 +s_AEC_mode)
  • + +
  • +kkkk - ostatnich 16 decyzji uk³adu wykrywania g³osu dla sygna³u odbieranego +(RX VAD) w formacie szesnastkowym. Hex( Q0 aec_rx_vadreg )
  • + +
  • +llll - ostatnich 16 decyzji uk³adu wykrywania g³osu dla sygna³u nadawanego +(TX VAD) w formacie szesnastkowym. Hex( Q0 aec_tx_vadreg )
  • +
+ +

U mnie warto¶ci tych liczników zawsze by³y równe 0 +(czy trzeba jako¶ dodatkowo w³±czyæ ten test ?) + +

W Nokii 3110 test ten wygl±da jak test 76. + +

Test 79 +
Wy¶wietlacz equalizera audio + +

+ + + + + + +
+ + + + +
aaaaa bbbbb
+ccccc ddddd
+-ee.e -ff.f 
+
+ + + + +
MiCutB MiCTA
+EpCutB EPCTA
+MiCLev EarLv
+
+ +

+

    +
  • +aaaaa - próbki sygna³u akustycznego, w których nast±pi³o przepe³nienie +(tak jak przesterowanie), przed przej¶ciem przez equalizer mikrofonowy +w postaci 16-bitowej ca³kowitej (dziesiêtnej) liczby.
  • + +
  • +bbbbb - próbki sygna³u akustycznego, w których nast±pi³o przepe³nienie +(tak jak przesterowanie), po przej¶ciu przez equalizer mikrofonowy w postaci +16-bitowej ca³kowitej (dziesiêtnej) liczby.
  • + +
  • +ccccc - próbki sygna³u akustycznego, w których nast±pi³o przepe³nienie +(tak jak przesterowanie), przed przej¶ciem przez equalizer g³o¶nikowy w +postaci 16-bitowej ca³kowitej (dziesiêtnej) liczby.
  • + +
  • +ddddd - próbki sygna³u akustycznego, w których nast±pi³o przepe³nienie +(tak jak przesterowanie), po przej¶ciu przez equalizer g³o¶nikowy w postaci +16-bitowej ca³kowitej (dziesiêtnej) liczby.
  • + +
  • +-ee.e - g³o¶no¶æ d¼wiêku wychwytywanego przez mikrofon w formacie dB. Wymaga +funkcji matematycznej log10 w MCU. +16 bitowa warto¶æ w DSP, +0 dB = 32768.
  • + +
  • +-ff.f - g³o¶no¶æ sygna³u po przej¶ciu przez equalizer g³o¶nikowy w formacie +dB. Wymaga funkcji matematycznej log10 w MCU. +16 bitowa warto¶æ w DSP, +0 dB = 32768.
  • +
+ +

Angielskie opisy pisz± o tym te¶cie: +
"Warto¶ci liczników s± pokazywane tylko w czasie rozmowy. Je¿eli po³±czenie +jest przerwane, zatrzymuj± siê one na ostatnich warto¶ciach. +Ich warto¶ci nie s± zapamiêtywane przy wy³±czaniu telefonu. Warto¶ci liczników +aaaaa-ddddd s± obliczane w DSP (i tylko +nowe s± wysy³ane do MCU. Poziomy sygna³u +mikrofonowego i g³o¶nikowego s± obliczane w DSP, +który wysy³a liniowe warto¶ci do MCU, który z kolei +dokonuje liniowej transformacji dB (20*log10(x)) do warto¶ci g³o¶no¶ci". + +

...ale ja tego nie zauwa¿y³em i u mnie zawsze by³y równe 0 +(czy trzeba jako¶ dodatkowo w³±czyæ ten test ?) + +

W Nokii 3110 test ten wygl±da jak test 77. + +

Test 80 + +

+ + + + + + +
+ + + + +
+
   TIMERS   
+   RESET 
+
+ + + + +
  Use menu
+  to reset
+ field test 
+   timers
+
+ +

Przez bezpo¶rednie wej¶cie do tego menu mo¿esz wyzerowaæ liczniki z testu 82. +Telefon robi to automatycznie, gdy od³±czasz od niego ³adowarkê. +Wed³ug opisów angielskich, dzieje siê tak równie¿, gdy akumulator jest +na³adowany (ja tego nie zaobserwowa³em). + +

W niektórych nowych telefonach (np. Nokii 3310 z oprogramowaniem 4.45) +po u¿yciu tego testu zeruj± siê +ORAZ w³±czaj± (test ten dzia³a wiêc równie¿ jak +test 81) +liczniki testu 82. + +

W Nokii 3110 test ten wygl±da jak test 83. + +

Test 81 + +

+

+ + + + + +
+ + + + +
+
   TIMERS   
+  aaaaaaaa
+
+ + + + +
Use menu to
+control test
+  display
+  timers
+
+ +

Przez bezpo¶rednie wej¶cie do tego menu mo¿esz w³±czyæ (aaaaaaaa=ENABLED) lub +wy³±czyæ (aaaaaaaa=DISABLED) licznik z testu 82. + +

W Nokii 3110 test ten wygl±da jak test 84. + +

Test 82 + +

+ + + + + + +
+ + + + +
aaaaa bbbbb 
+ccccc ddddd
+ TIMERS eee
+
+ + + + +
PwrOn InServ
+NSPS  TxON
+   Timers
+   Status
+
+ +

+

    +
  • +aaaaa - informacja, ile d³ugo telefon by³ w³±czony
  • + +
  • +bbbbb - informacja, jak d³ugo telefon by³ zalogowany do sieci
  • + +
  • +ccccc - informacja, jak d³ugo +telefon by³ w stanie NSPS
  • + +
  • +ddddd - informacja, jak d³ugo by³ w³±czony nadajnik telefonu
  • + +
  • +eee - informacja, czy liczniki s± w³±czone (ON) czy wy³±czone (OFF) (zmieniæ +to mo¿na w te¶cie 81)
  • +
+ +

Ka¿dy z tych liczników ma formê aaabb - liczba bb zmienia siê w zakresie +od 0 do 60 jednostek; po osi±gniêciu warto¶ci 60 +jest zerowana - równocze¶nie zwiêksza siê o 1 liczba aaa. +W wiêkszo¶ci modeli jednostk± jest minuta (tzn. ka¿dy z liczników pokazuje czas +jako minuty i godziny), wyj±tkiem jest Nokia 7110, gdzie jednostk± jest 30 sekund +i niektóre Nokie 3310 (jednostka=1 minuta 7 sekund)... + +

Wed³ug angielskich opisów maksymalna warto¶æ wynosi 99 h i 59 minut. Je¿eli +pierwszy (aaaaa) licznik osi±gnie tê warto¶æ, wszystkie liczniki stan±. + +

Niestety liczniki dzia³aj± tylko wtedy, gdy w³±czysz jaki¶ test w monitorze +sieci (tzn. gdy wy³±czysz testy, nie bêd± odmierzaæ czasu pomimo wy¶wietlonej +informacji, ¿e s± w³±czone). Oznacza to, ¿e faktycznie mo¿esz tutaj +znale¼æ informacjê o tym, ile korzystasz z monitora sieci (pierwszy parametr), +ile czasu telefon by³ w tym czasie zalogowany do sieci (nastêpny), itd. + +

+ + + + + + +
Je¿eli nie mo¿esz zrezygnowaæ z odmierzania czasu, proponujê w +te¶cie 83 wybraæ SHOW TASK MSG BUFS i w³±czyæ +test 87 (wy¶wietlacz bêdzie pusty). +Jedyn± niedogodno¶ci± tego rozwi±zania +bêdzie to, ¿e nie bêdziesz mia³(a) identyfikacji osób dzwoni±cych do Ciebie. + +

W menu serwisowym Nokii 6130 (kod *#WARRANTY#) i 3210 (kod *#WAR0ANTY#) pod +pozycj± "Life Timer" znajdziesz informacjê ile czasu rozmawia³e¶(a¶) - cyfry przed +dwukropkiem oznaczaj± godziny, cyfry po nim minuty. Przyk³adowo, 0011:34 to 11 h 34 +minuty czasu rozmowy. W Nokii 3310 (równie¿ kod *#WAR0ANTY#) +na samym pocz±tku pokazywana jest tam liczba 65536, a licznik zaczyna +dzia³aæ, gdy przez telefon rozmawiano d³u¿ej ni¿ 1 h. +

+ +

W Nokii 3110 test ten wygl±da jak test 85. + +

Test 83 + +

+

+ + + + + + + + + +
+ + + + +
+
 SHOW TASK 
+ STACKS
+
+ + + + +
+
 SHOW TASK 
+ MSG BUFS
+
+ + + + +
+
 SHOW TASK 
+ FAST BUFS
+
+ + + + +
Use menu to
+select shown
+ task info
+
+ +

Przez bezpo¶rednie wej¶cie do tego menu mo¿na spowodowaæ, ¿e w Menu +10-84, test 85, test 86, test 87 s± pokazywane +warto¶ci innych liczników: + +

+

    +
  • +"STACKS" - pokazuje wolne miejsce w bloku pamiêci w najgorszym razie
  • + +
  • +"MSG BUFS" - pokazuje najwy¿sz± ilo¶æ bêd±cych w takcie realizacji wiadomo¶ci.
  • + +
  • +"FAST BUFS" - pokazuje najwy¿sz± ilo¶æ bed±cych w trakcie realizacji szybkich +wiadomo¶ci.
  • +
+ +

W Nokii 3110 test ten wygl±da jak test 86. + +

Test 84, 85, 86 +
Tak ogólnie wygl±daj± te menu: + +

+ + + + +
 aaaa bbbb  
+ cccc dddd
+ eeee ffff
+ gggg hhhh
+ +

A tak wygl±da ich pomoc: + +

+ + + + + + + + +
+ + + + +
IDLE  DEV_IO
+LOCAL MDISND
+MDIRCV  UI
+ TONE   PN
+ +

albo (w Nokii 6210/8210): +

+ + + + +
IDLE  DEV_IO
+LOCAL MDISND
+MDIRCV  UI
+ TONE   PND
+ +

albo (w Nokii 6250): +

+ + + + +
IDLE  DEV?IO
+LOCAL MDISND
+MDIRCV  UI
+ TONE   PND
+ +

+ + + + +
 FBUS   AUD
+L1CTRL L1MEA
+L1SYSP  L2
+ CC     MM
+ +

albo (w Nokii 3210): +

+ + + + +
IRDA  FBUS
+AUD  L1CTRL
+L1MEA L1SYSP
+L2    CC
+ +

albo (w Nokii 6210/6250): +

+ + + + +
+WMLS    PN
+IRDA IRDAMGR
+FBUS    AUD
+PHCTRL  L2 +
+ +

albo (w Nokii 8210): +

+ + + + +
+IRDA IRDAMGR
+FBUS     AUD
+PHCTRL    L2
+CC        MM
+
+ +

albo (w Nokii 8810): +

+ + + + +
IRDA  IRMGR
+FBUS  AUD
+L1CTRL L1MEA
+L1SYSP  L2
+ +

+ + + + +
 RR     RM
+ SMS    EM
+SIMUPL SIML2
+ DDI
+ +

albo (w Nokii 3210): +

+ + + + +
MM    RR
+RM    SMS
+EM    SIMUPL
+SIML2 DDI
+ +

albo (w Nokii 6210/6250): +

+ + + + +
+ CC   MM  RR
+RMC  SMS  EM
+SIM SIM2 DDI
+DGC  NTB FAX +
+ +

albo (w Nokii 8210): +

+ + + + +
+RR        RM
+SMS       EM
+SIMUPL SIML2
+DDI      DGC
+
+ +

albo (w Nokii 8810): +

+ + + + +
CC     MM
+RR     RM
+SMS    EM
+SIMUPL SIML2
+ +

albo (w Nokii 9110): +

+ + + + +
 RR     RM
+SMS     EM
+SIMUPL SIML2
+ DGC  DGNTB
+ +

+ +

+

    +
  • +aaaa, bbbb,... - zadanie 0, 1, itd.
  • +
+ +

Liczby okre¶laj±ce, jak bardzo komórki pamiêci zwi±zane ze stosami s± puste +w najgorszym wypadku (je¿eli pokazuje siê 0, stos jest pe³ny). Warto¶ci +nie s± zapisywane w pamiêci przy wy³±czaniu telefonu. + +

W Nokii 3110 test 86 wygl±da nastêpuj±co: + +

+ + + + + + +
+ + + + +
MCUSW  aaaaa
+DATE   cccccc
+CHKSUM dddd
+DSP    eee
+
+ + + + +
MCUSWVersion
+DateOfMCUSW
+MCUSWChecksum
+DSPSWVersion
+
+ +

Znaczenie parametrów aaaaa,cccccc, dddd i eee znajdziesz w te¶cie 88. + +

Test 87 + +

+ + + + + + +
+ + + + +
 aaaa  bbbb 

+
+ + + + +
  FIQ  IRQ  

+
+ +

+

    +
  • +aaaa - OS_SYSTEM_STACK
  • +
+ +

W Nokii 8810 menu to wygl±da tak: + +

+ + + + + + +
+ + + + +
+ ffff  gggg
+ eeee  dddd 
+ aaaa  bbbb 
+
+ + + + +
+ DDI   DGC
+ DGNTB DGFAX
+ FIQ   IRQ
+
+ +

W Nokii 9110 menu to wygl±da natomiast tak: + +

+ + + + + + +
+ + + + +
 cccc  dddd 
+ aaaa  bbbb 

+
+ + + + +
 DGTB  DGFAX
+ FIQ   IRQ

+
+ +

W Nokii 7110 jest jeszcze trochê inne: + +

+ + + + + + +
+ + + + +
+1040010363800
+  700  800
+  220
+    476   480 +
+
+ + + + +
+DGN  DGF  SCKT
+PCL  PWB
+PPC
+FIQ    IRQ +
+
+ +

i w Nokii 6210/6250: + +

+ + + + +
+ + + + +
+SRVSCK PMMCL
+PMMWR   ND
+PPC
+FIQ    IRQ +
+
+ +

i w Nokii 8210: + +

+ + + + +
+ + + + +
+NTB      FAX
+PMMWR     ND
+FIQ      IRQ
  +
+
+ +

Stan licznika nie jest zapisywany przy wy³±czaniu telefonu. + +

Test 88 + +

+ + + + + + +
+ + + + +
aaaaa bbbbbb
+Date  cccccc
+ChkSum dddd
+eeeeeeeeeeee
+
+ + + + +
MCUSW  PPM
+MCUSW_Date
+MCU_Checksum
+DSP_Version
+
+ +

+

    +
  • +aaaaa i cccccc - wersja i data oprogramowania MCU +(kody do ich sprawdzenia i ró¿nice miêdzy ró¿nymi ich wersjami +s± szczegó³owo opisane na tej stronie)
  • + +
  • +bbbbbb - wersja wgranego do telefonu pakietu PPM (Post-programming Memory): +firma Nokia przygotowywuje ró¿ne wersje jêzykowe +oprogramowania do swoich telefonów. S± one zapisywane w "paczkach" - ka¿da z nich +zawiera komunikaty i obs³ugê kilku jêzyków. +Powód takiego postêpowania jest prosty: komunikaty we wszystkich jêzykach ¶wiata +nie zmie¶ci³yby siê w pamiêci telefonów. +Tutaj zobaczysz w³a¶nie wersjê wgranego pakietu PPM: jest to liczba +zgodna z wersj± oprogramowania MCU, po której +pojawia siê litera (mo¿e to byæ "A", "B", itd. - jêzyk polski jest dostêpny w pakiecie "B"). +I st±d zapewne jasne jest, ¿e je¿eli Twój telefon zosta³ przywieziony z zagranicy +i nie ma obs³ugi jakiego¶ jêzyka (polskiego ?), trzeba wgraæ do niego inny pakiet PPM. + +

    Dla ciekawych: je¿eli chodzi o starsze modele (np. Nokiê 2110i) - tam nie by³o pakietów +PPM, a zmiana wersji jêzykowej wi±za³a siê z wymian± CA£EGO oprogramowania s³uchawki. +Czyta³em równie¿, i¿ sprzedawane telefony z "ogólnym" oprogramowaniem mia³y fabrycznie +deaktywowan± obs³ugê niektórych jêzyków (np. greckiego) - mo¿na by³o j± w³±czyæ przy u¿yciu +niektórych programów serwisowych (np. PC-Locals 0.6). +

    +

  • + +
  • +dddd - suma kontrolna pamiêci MCU +(gdy jest b³êdna, telefon wy¶wietla CONTACT SERVICE)
  • + +
  • +eeeeeeeeeeee - wersja oprogramowania DSP
  • +
+ +

Informacje z tego menu s± równie¿ podawane w ró¿nych programach serwisowych (np. +PC-Locals 1.3 albo WinTesli). + +

W Nokii 6210 zamiast znaków "_" w pomocy pokazywane s± "?" + +

Test 89 + +

+ + + + + + +
+ + + + +
HW: aaaa 
+TXT: Ubbbbbb

+
+ + + + +
HW version
+Text version

+
+ +

+

    +
  • +aaaa - wersja sprzêtowa telefonu (np. najnowsze mi znane Nokie 5110 pokazuj± +tutaj 4220)
  • + +
  • +bbbbbb - informacja, kiedy zosta³y opracowane teksty (prawdopodobnie nazwy operatorów) +wy¶wietlane przez telefon
  • +
+ + +

Na pocz±tek
+ +

+

[Czê¶æ 1][Czê¶æ 2][Czê¶æ 3][Czê¶æ 4][Czê¶æ 5][Czê¶æ 6][Czê¶æ 7] +

+
+
+ +

Marcin Wi±cek (WWW) +
Ostatnia aktualizacja: 5 stycznia 2002
+ + diff --git a/Docs/en_US/gsm/netmon/faq_net6.htm b/Docs/en_US/gsm/netmon/faq_net6.htm new file mode 100644 index 0000000..a405444 --- /dev/null +++ b/Docs/en_US/gsm/netmon/faq_net6.htm @@ -0,0 +1,2852 @@ + + + + + + + + + + NetMonitor in Nokia phones (7/7) + + + + + +

Main page

+ +
NetMonitor in Nokia phones (7/7) + +

[Part 1][Part 2][Part 3][Part 4][Part 5][Part 6][Part 7] + +

+ +
+ + + +
    +
  1. What is it ?
  2. +
  3. Do I need it ?
  4. +
  5. Does my phone use more power with NetMonitor enabled ?
  6. +
  7. How to activate it ?
  8. +
  9. Which NetMonitor version can be activated in my phone ?
  10. +
  11. Does NetMonitor activation void warranty ?
  12. +
  13. NetMonitor menu in my phone has different number than 10. Is it normal ?
  14. +
  15. NetMonitor menu in my phone has 11 number, hovewer previous position has 9 number. Is it normal ?
  16. +
  17. How to use it ?
  18. +
  19. Can I damage my phone ?
  20. +
  21. Glossary
  22. +
  23. Description of the individual tests
  24. +
  25. You can also use a program...
  26. +
  27. Can I use NetMonitor without SIM card inserted, without PIN number entered or when SIM card is not active ?
  28. +
  29. How can I disable NetMonitor ?
  30. +
  31. Do I need to disable NetMonitor before sending my phone to the service ?
  32. +
  33. Is it possible to re-activate NetMonitor after disabling it ?
  34. +
  35. Is NetMonitor available in analog Nokia phones ?
  36. +
  37. Does NetMonitor allow to use phone like broadcast station ?
  38. +
  39. I don't have all described tests in my phone. Why ? Can I increase their number ?
  40. +
  41. Does NetMonitor allow to identify place, where is my interlocutor ?
  42. +
  43. Does NetMonitor allow to identify place, where am I ?
  44. +
  45. What are NetMonitor codes ?
  46. +
  47. Is it the truth, that in phones with additional hardware changing frequency band NetMonitor doesn't work correct ?
  48. +
  49. Where can I find description of FBUS/MBUS protocol and commands connected with NetMonitor ?
  50. +
  51. I have non existing networks on the list of forbidden networks...
  52. +
  53. How to check frequency band (900 or 1800 Mhz), where phone work in this moment ?
  54. +
  55. Can I use DLR-2/DLR-3 cables for activating netmonitor ?
  56. +
  57. Can I activate netmonitor using Init File Editor (Nokia 9110) ?
  58. +
  59. Can I force phone to use one frequency band (900 or 1800 Mhz) only ?
  60. +
  61. How to change settings in tests ?
  62. +
  63. My phone has very short snandby time - it is possible to see the reason of it ?
  64. +
  65. Is netmonitor available in English version only ?
  66. +
  67. Information sources
  68. +
  69. Additional information
  70. +
  71. Does using/activating netmonitor cost anything ?
  72. +
  73. Does using netmonitor is legall ?
  74. +
  75. Which entries on SIM card are used in netmonitor tests ?
  76. +
  77. Can I activate netmonitor in 3310 using soft working with 3210 ?
  78. +
  79. After activating netmonitor/BTS TEST my phone can't find network...
  80. +
  81. Netmonitor shows different battery capacity than info on it...
  82. +
+
+
+ +

Test 90 + +

In Nokia 9110 this test looks like follows: + +

+ + + + + + +
+ + + + +
 Cover  aaaa
+ CarKit bbbb
+ Heads  cccc
+
+ + + + +
CoverCnt
+CarKitCnt
+HeadsetCnt  
+
+ +

+

    +
  • aaaa - how many times Communicator's cover was opened
  • +
  • bbbb - how many times carkit was connected
  • +
  • cccc - how many times headset was used
  • +
+ +

Because Nokia 9110 seems to be 100% hardware compatible with 6110, +method of simulating headset and car kit should be the same +(see test 75). +First of them you can simulate using +test 92 too (when you use it, value of the counter +from this test doesn't change !). I recommend to read +page http://my-communicator.com/, +where you will find more informations about it (for example, another ways +to simulate them)... + +

here's for Nokia 5190: + +

+ + + + + + +
+ + + + +
M:DCS:DO4100
+D:HPA:NTM:NC
+D:REA:OFS:RU
+0000000:000
+
+ + + + +
+MODESERVSIM 
+DCS AMPSMOD
+DPWRAPWRSMC
+PRILIST +
+
+ +

and in Nokia 7110/8210/6210/6250/3310 looks like follows: + +

+ + + + + + + + + +
+ + + + +
+PS0 aaaa
+EC0 bbbbbbbb
+PS1 cccc
+EC1 dddddddd
+
+ + + + +
+PS0 FFFE
+EC0 00000003
+PS1 FFF8
+EC1 00000002
+
+ + + + +
+Page0 Status
+EraseCounter
+Page1 Status
+EraseCounter +
+
+ +

+

    +
  • aaaa - the same to the parameter bbbb from test 92
  • +
  • bbbbbbbb - the same to the parameter dddddddd from test 92
  • +
  • cccc - the same to the parameter bbbb from test 93
  • +
  • dddddddd - the same to the parameter dddddddd from test 93
  • +
+ +

Probably it's about one of phone's memory. Parameters +"aaaa" and "cccc" show, whether banks of this memory are free +(fffe) or not (fff8). Parameters "bbbbbbbb" and "dddddddd" show, +how many times they were erased. + +

Test 91 + +

In Nokia 9110: + +

+ + + + + + +
+ + + + +
   RESET 
+   MISC
+  COUNTERS  
+
+ + + + +
  Use menu  
+  to reset
+    misc
+  counters
+
+ +

By direct enter to this test you can reset counters from +test 90. + +

In Nokia 7110/8210/6210/6250/3310 this test is different: + +

+ + + + + + +
+ + + + +
+FL  005FC998
+E2    0    0
+PR   30    1
+OM    0 0000
+
+
+
+ +Help from Nokia 7110: +

+ + + +
+NextEntry
+Addr  Length
+Small   Long
+ErCnt ErMask
+
+ +

and 8210/6210/6250/3310: +

+ + + +
+ NextEntry
+Addr  Length
+Small Long  
+ErCnt ErMask
+
+

+
+ +

Test 92 + +

In Nokia 9110 it looks different: + +

+ + + + + + +
+ + + + +

  Headset   
+    xxx
+
+ + + + +
 Use menu to
+   toggle
+   headset
+   ON/OFF
+
+ +

By direct enter to this test you can enable "headset" profile +normally accesible after connecting headset (of course, +you don't have to have it ;-)) - xxx can have ON or OFF values. +When you will use it, value of counter from test 90 +don't change. I recommend to read +page http://my-communicator.com/, +where you will find more informations about it (for example, another ways +to simulate them)... + +

+ + + + + + +
Use this test, when you need 'Automatic Answer' function, which allow +to receive incoming call without pressing phone's key. This function is normally +enable in never Nokia phones with connected set only (in older phones - like +Nokia 2110i - it's always visible) +
+ +

and in Nokia 7110/8210/6210/6250/3310 it looks like follows: + +

+ + + + + + + + + +
+ + + + +
+EP aaaa bbbb
+#0      cccc
+    dddddddd
+eeeeffffffff +
+
+ + + + +
+EP F0F0 FFFE
+#0      0000
+    00000003
+FFFFFFFFFFFF
+
+
+
+Help from Nokia 7110: +

+ + + +
+EMark PgStat
+PgType
+EraseCount
+PpInd PpECnt +
+

and 8210/6210/6250/3310: +

+ + + +
+EMark PgStat
+      PgType
+  EraseCount
+PpInd PpECnt +
+

+
+ +

+

    +
  • bbbb - the same to the parameter aaaa from test 90
  • +
  • dddddddd - the same to the parameter bbbbbbbb from test 90
  • +
+ +

It's info about first bank of one of phone's memories. When it's free (parameter +bbbb=FFFE), parameters "eeeeffffffff" are equal "FFFFFFFFFFFF". +Parameter "dddddddd" shows, how many times bank was erased. + +

Test 93 + +

+ + + + + + + + + +
+ + + + +
+EP aaaa bbbb
+#1      cccc
+    dddddddd
+eeeeffffffff +
+
+ + + + +
+EP F0F0 FFF8
+#1      0001
+    00000002
+000000000002
+
+
+
+Help from Nokia 7110: +

+ + + +
+EMark PgStat
+PgType
+EraseCount
+PpInd PpECnt +
+

and 8210/6210/6250/3310: +

+ + + +
+EMark PgStat
+      PgType
+  EraseCount
+PpInd PpECnt +
+

+
+ +

+

    +
  • bbbb - the same to the parameter cccc from test 90
  • +
  • dddddddd - the same to the parameter dddddddd from test 90
  • +
+ +

It's info about second bank of one of phone's memories. When it's free (parameter +bbbb=FFFE), parameters "eeeeffffffff" are equal "FFFFFFFFFFFF". +Parameter "dddddddd" shows, how many times bank was erased. + +

Test 94 + +

Test in Nokia 3210: + +

+ + + + + + +
+ + + + +
Vo:  aaa bbb
+Pins:      c
+Mode:   dddd
+State:  eeee
+
+ + + + +
V: Req ADC  
+Pin Status
+Mode
+Band Ch
+
+ +

+

    +
  • dddd - one of values is AUTO
  • +
  • eeee - example values are GS05, GS09, PS01
  • +
+ +

and 7110/6210/6250: + +

+ + + + + + +
+ + + + +
+ +IN E111 F000
+ST      0000
+        0000
+        0000 +
+
+
+ +

Help from Nokia 7110: +

+ + + +
+InExc  InRec
+      EmuErr
+      EnvErr
+      RecEr +
+ +

and Nokia 6210/6250: +

+ + + +
+InExc InRec
+      EmuErr
+      EnvErr
+      RecErr +
+

+
+ +

Test 95 + +

In Nokia 3210 + +

+ + + + + + +
+ + + + +
1:aaa 4:ddd 
+2:bbb 5:eee
+3:ccc 6:fff
+
+ + + + +
6 lowest
+values at   
+shut down
+
+ +

and newer versions of firmware in Nokia 6210 (confirmed for 5.17 and higher): + +

+ + + + + + +
+ + + + +
+GSM pwrcls: 
+4(2W)
+Modified:No
+
+
+ + + + +
+Curr Band-3 
+Pwr-Cls
+(Watt)
+Pwr-Cls Mod +
+
+ +

Test 96 + +

In Nokia 3210: + +

+ + + + + + +
+ + + + +
VCX0ADC: aaa
+TEMP(C):  bb
+TEMP(K): ccc
+
+ + + + +
ADC VALUE
+RF TEMP(C)
+RF TEMP(K)  
+
+ +

+

    +
  • +ccc - temperature of bb counter (in Kelvin degrees: K = C + 273)
  • +
+ +

and 7110: + +

+ + + + + + +
+ + + + +
+Co: 49 A: 279
+Tu: 49 K: 305
+Of:  0  C:+32
+V5:  2 +
+
+ + + + +
+Contrast ADC
+Tuned Kelvin
+Offset     C
  +
+
+ +

Test 98 + +

+ + + + + + +
+ + + + +
+WR  00000000
+      0 0000
+ER  00000000
+        0000 +
+
+ +
+

Help from Nokia 7110: +

+ + + +
+WrErrCnt    
+WrRtry WrSta
+ErErrCnt
+ErSta
+
+ +

and 6210/6250: +

+ + + +
+    WrErrCnt
+WrRtry WrSta
+    ErErrCnt
+       ErSta
+
+

+
+ +

Test 99 + +

For Nokia 8810: + +

+ + + + + + +
+ + + + +
+ENTERING   
+FBUS
+MODE
+
+
+ + + + +
+Switches    
+phone
+to FBUS
+mode +
+
+ +

It's probably for enabling FBUS protocol instead of normal used infrared +connection. I don't have additional info... + +

And here is for Nokia 7110: + +

+ + + + + + +
+ + + + +
+Ead:aaaa    
+Mod:bb
+MODE: cccc
  +
+
+ + + + +
+EAD value   
+Acc. status
+FBUS mode
  +
+
+ +

    +
  • bb - type of connected sound accesories (example values: +HP in normal state, HD with headset - for example, HDC-9P). +In other phones this information is displayed in +test 75
  • +
  • cccc - "FBUS" in connection made during FBUS or MBUS cable from older +Nokia phone (5xxx, 6xxx) or during Irda connection
  • +
+ +

Very similiar is in Nokia 6210/6250: + +

+ + + + + + + + +
+ + + + +
+Ead: 03FF   
+Mod: HP
+

  +

+
+ + + + +
+EAD value   
+Acc. status
+

  +

+
+ +

Test 100 + +

Test from Nokia 9110: + +

+ + + + + + +
+ + + + +
a  b 
+c  ddd    e 

+
+ + + + +
UWS DWS
+T1   N1   T2

+
+ +

and 7110/6210/6250: + +

+ + + + + + +
+ + + + +
+004D63   5.0
+0018D1   1.6
+05B1DD  94.0
  +
+
+ + + + +
+MemUseT %Use
+MemRelT %Rel
+MemUnuT %Unu
  +
+
+ +

Information about using phone's memory. I'm not sure exactly, what memory +(when position to phonebook is added, information displayed here is probably about +phonebook memory). + +

And in Nokia 8210/3310 is different (they're +information about the voice dialling feature): + +

+ + + + + + + + + +
+ + + + +
+ND  a  b  c
+    d  e  f
 
+ggggg hhhhhh +
+
+ + + + +
+ND  2  1  0
+    0  0  0
 
+02.81 120399 +
+
+ + + + +
+ND mm cs ps 
+   ss po da
 
+Vers: Date: +
+
+ +

    +
  • a - number of recorded voice tags in phone. +Maximal value is 8 (for Nokia 8210/3310) or 10 (for Nokia 6210). +It's displayed in test 101 and test 102 +(Nokia 8210/3310) or test 108 and test 109 (Nokia 6210)
  • +
  • c - info about using voice dialling engine: +
      +
    • 0 - it wasn't used after enabling phone
    • +
    • 1 - voice tag was not recognized or Play/Save function were used
    • +
    • 5 - voice tag was recognized
    • +
    • 7 - user was in voice dialling function menu and selected Cancel function
    • +
    • 8 - voice dial in progress (in use)
    • +
    +
  • +
  • ggggg - version of voice dialling engine (?)
  • +
  • hhhhhh - date of releasing voice dialling engine (?)
  • +
+ +

Values of counters (without "a" parameter) are not saved to EEPROM, when phone is disabled. + +

WARNING: in some phones (like Nokia 3310), if you want to give phone +to service for upgrading firmware, remove earlier ALL voice tags from its' memory. +In other case memory for them can be decreased for so many voice tags, as were saved in memory +in the moment, when it was given to service (example: +in Nokia 3310 with two voice tags before upgrading firmware, after it it was possible +to save maximal 6 voice tags, counter "a" showed 2, but phone in Menu 1-10 displayed, +that memory for them is empty) + + +

Test 101 + +

Test from Nokia 9110: + +

+ + + + + + +
+ + + + +
  aaaaaaaa
+  bbbbbbbb
+  cccccccc  
+  dddddddd
+
+ + + + +
TX Frame Cnt
+RX Frame Cnt
+TX Retx Cnt
+RX Tetx Cnt
+
+ +

All values are in hexadecimal values. + +

and 7110/6210/6250: + +

+ + + + + + +
+ + + + +
+#0  0  #1  0
+#2  0  #3  0
+#4  0  #5  0
  +
+
+ + + + +
+Pn LoCPn LoC
+Pn LoCPn LoC
+Pn LoCPn LoC
  +
+
+ +

In Nokia 8210/3310 it's different (information about the recording voice +tags in voice dialling feature): + +

+ + + + + + + + + +
+ + + + +
+Train
+   a   b   c
+dddd    eeee
+ffff    gggg +
+
+ + + + +
+Train
+   0   0   2
+   0       0
+0000    0000 +
+
+ + + + +
+Train
+   r  ii  mm
+strt    durn
+minm    maxm +
+
+ +

    +
  • a - number of voice tags failed to record +(it increases for example, when phone didn't recognize any voice to record)
  • +
  • b - number of recorded tags, when this test was enabled
  • +
  • c - number of recorded tags in phone. Maximal value is 8 (for Nokia 8210/3310) +or 10 (for Nokia 6210). It's displayed in test 100 and +test 102 (Nokia 8210/3310) or +test 107 and test 109 (Nokia 6210).
  • +
  • dddd - how loud was start of recorded voice during last recording +(the higher, the more loud) (?)
  • +
  • eeee - how loud was recorded voice during last recording +(the higher, the more loud) (?)
  • +
  • ffff,gggg - another parameters unique to each recorded voice (hex values ?)
  • +
+ +

Values of counters (without "c" parameter) are not saved to EEPROM, when +phone is disabled. + +

WARNING: in some phones (like Nokia 3310), if you want to give phone +to service for upgrading firmware, remove earlier ALL voice tags from its' memory. +In other case memory for them can be decreased for so many voice tags, as were saved in memory +in the moment, when it was given to service (example: +in Nokia 3310 with two voice tags before upgrading firmware, after it it was possible +to save maximal 6 voice tags, counter "c" showed 2, but phone in Menu 1-10 displayed, +that memory for them is empty) + + +

Test 102 + +

Test from Nokia 9110: + +

+ + + + + + +
+ + + + +
aaaaaaaaaa
+bbbbbbbbbbbb
+ccccccccccc
+
+ + + + +
Data call
+flow control
+info
+
+ +

In Nokia 8210/3310 it's different (information about the recognizing voice tags +in voice dialling feature): + +

+ + + + + + + + + +
+ + + + +
+Recog a    b
+ c dddd eeee
+ f gggg hhhh
+ i jjjj kkkk +
+
+ + + + +
+Recog 0    2
+ 0 0000 0000
+ 0 0000 0000
+ 0 0000 0000 +
+
+ + + + +
+Recog r   mm
+i1 scr1 minm
+i2 penH maxm
+i3 penL penC +
+
+ +

b - number of recorded tags in phone. Maximal value is 8 (for Nokia 8210/3310) +or 10 (for Nokia 6210). It's displayed in test 100 and +test 101 (Nokia 8210/3310) or +test 107 and test 108 (Nokia 6210) + +

2'nd line - info about last recognized by phone voice tag (c=number of voice tag) +
3'nd line - info about previous recognized by phone voice tag (f=number of voice tag) +
4'td line - info about previous recognized by phone voice tag (i=number of voice tag) + +

Values of counters (without "b" parameter) are not saved to EEPROM, when phone is disabled. + +

WARNING: in some phones (like Nokia 3310), if you want to give phone +to service for upgrading firmware, remove earlier ALL voice tags from its' memory. +In other case memory for them can be decreased for so many voice tags, as were saved in memory +in the moment, when it was given to service (example: +in Nokia 3310 with two voice tags before upgrading firmware, after it it was possible +to save maximal 6 voice tags, counter "b" showed 2, but phone in Menu 1-10 displayed, +that memory for them is empty) + + +

and from Nokia 6210/6250: + +

+ + + + + + +
+ + + + +
+Pn LoCPn LoC
+Pn LoCPn LoC
+Pn LoC
  +
+
+ +

Test 103 + +

In Nokia 7110: + +

+ + + + + + +
+ + + + +
+100    0  00
+PoolS 01EA6E
+RsrvS 031386
  +
+
+ + + + +
+%FW %BW FrCo
+PoolSizeLeft
+Reservations
  +
+
+ +

and 6210/6250: + +

+ + + + + + + +
+ + + + +
+92   8  00  


  +

+
+ + + + +
+%FW %BW FrCo


  +

+
+ +

Test 104 + +

+ + + + + + +
+ + + + +
+LOG 00000000
+COD 00000000
+WrA 00000000
+RdA 00000000 +
+
+ + + + +
+ErrorLogAddr
+ErrorCode
+WrErrorAddrs
+RdErrorAddrs +
+
+ +

Test 105 + +

+ + + + + + +
+ + + + +
+WrC 00000000
+RdC 00000000
+Group     00
+Index   0000 +
+
+ + + + +
+DevWrErrorCo
+DevRdErrorCo
+CallingGroup
+CallingIndex +
+
+ +

Test 106 + +

In Nokia 7110: + +

+ + + + + + +
+ + + + +
+RtyDaRd 0000
+RtyDaWr 0000
+RtyHeRd 0000
+RtyHeWr 0000 +
+
+ + + + +
+RtyDataRead
+RtyDataWrite
+RtyHeadRead
+RtyHeadWrite +
+
+ +

and 6210/6250: + +

+ + + + + + + + +
+ + + + +
+GT-Call 0000
+GT-Ok   0000
+Cl-Task 0000
+RtyHewr 0000 +
+
+ + + + +
+Call To BGOT
+Success BGOT
+CleanUpTask
+RtyHeadWrite +
+
+ +

Test 107 + +

In Nokia 7110: + +

+ + + + + + +
+ + + + +
+  1  1  1  1
+LLRS: 000000
+DchsmEr:0000
  +
+
+ + + + +
+PB GB  HB PB
+LastLostSize
+DtChsmErrCo
  +
+
+ +

In Nokia 6210/6250 contains information about the voice dialling feature: + +

+ + + + + + + + + +
+ + + + +
+ND  a  b  c
+    d  e  f
+ggggg hhhhhh
+  +
+
+ + + + +
+ND  2  1  0
+    0  0  0
+02.93 030300
+  +
+
+ + + + +
+ND mm cs ps 
+   ss po da
+Ver   Date
+  +
+
+ +

    +
  • a - number of recorded voice tags in phone. +Maximal value is 8 (for Nokia 8210/3310) or 10 (for Nokia 6210). +It's displayed in test 101 and test 102 +(Nokia 8210/3310) or test 108 and test 109 (Nokia 6210)
  • +
  • c - info about using voice dialling engine: +
      +
    • 0 - it wasn't used after enabling phone
    • +
    • 1 - voice tag was not recognized or Play/Save function were used
    • +
    • 5 - voice tag was recognized
    • +
    • 7 - user was in voice dialling function menu and selected Cancel function
    • +
    • 8 - voice dial in progress (in use)
    • +
    +
  • +
  • ggggg - version of voice dialling engine (?)
  • +
  • hhhhhh - date of releasing voice dialling engine (?)
  • +
+ +

Values of counters (without "a" parameter) are not saved to EEPROM, when phone is disabled. + +

Test 108 + +

In Nokia 7110: + +

+ + + + + + +
+ + + + +
+FF:FF FF:FF 
+FF:FF 00:00
+FF:FF FF:FF
+FF:FF FF:FF +
+
+ + + + +
+Link&LID 0-1
+Link&LID 2-3
+Link&LID 4-5
+Link&LID 6-7 +
+
+ +

In Nokia 6210/6250 it's like test 101 in Nokia 8210... + +

Test 109 + +

+ + + + +
+ + + + +
+Recog r   mm
+i1 scr1 minm
+i2 penu maxm
+i3 penl curp +
+
+ +

and is connected with recognizing numbers in voice dialing... + +

Test 110, 111, 112, 113, 114, 115 (115 ONLY IN NOKIA 7110 !) + +

+ + + + + + + + + +
+ + + + +
+ a bbbbccccc
+dddddd eeeee
+ffffff ggggg
+ h  i j kkkk +
+
+ + + + +
+ 0 FFFE  0.0
+000002   0.0
+000000 100.0
+ 3  1 0 FFE0 +
+
+
+

Help from Nokia 7110: +

+ + + +
+Pn  Sta %Use
+EraseCn %Rel
+NextRec %Unu
+Cu Cl Cc MmC +
+ +

and 6210/6250: +

+ + + +
+ Pn Sta %Use
+EraseCn %Rel
+NextRec %Unu
+Cu Sl Cc MnC +
+ +

+
+ +

New generation of Nokia phones (6210/6250/7110 and compatible) +save ALL settings and datas (phonebook, SMS, ringtones, WAP, etc.) +in one memory. It's called +PMM (I don't know official meaning - unofficial it can be +"Post Multiple Memory"). These tests show probably info about next banks of +this memory: + +

+

    +
  • a - number of bank
  • +
  • bbbb - shows, if bank is used (fff8 in Nokia 6210/7110) or not +(fff0 in Nokia 6210, fffe in Nokia 7110)
  • +
  • ccccc - how many percent of memory is used
  • +
  • dddddd - erase counter
  • +
  • eeeee - how many percent of memory was free
  • +
  • ffffff - next (free in bank ?) position shown as absolute address
  • +
  • ggggg - how many percent of memory is free (when add to ccccc, you have 100%)
  • +
+ +

Test 130 + +

Test from Nokia 7110: + +

+ + + + + + +
+ + + + +
+aaa   bbbbbb

 
  +

+
+ + + + +
+Slide   Open

 
  +

+
+ +

    +
  • bbbbbb - how many times phone's sliding cover was opened (hex value)
  • +
+ +

and 3310: + +

+ + + + + + + + + +
+ + + + +
+DSP_RST:aaaa
+CS: bbbbbbbb
+ cc dd ee ff
+0000    gggg +
+
+ + + + +
+DSP_RST:0000
+CS: 00000000
+ 00 00 00 00
+0000    0000
+
+
+ + + + +
+DSP resetcnt
+CStandbyLoss
+ sw as pw st
+BadPwr insim +
+
+ +

+

    +
  • aaaa - number of DSP resets. Displayed also in +test 36
  • +
+ +

and newer versions of firmware in Nokia 6210 (confirmed for 5.17 and higher): + +

+ + + + + + +
+ + + + +
+ +LRW-1 SW:
+XXXXXX
+PN mode
+NOT DETECTED +
+
+
+ + + + +
+Shows
+Connectivity
+Battery
+information. +
+
+ +

Connected with BlueTooth module (in this phone it wasn't available). + +

Test 131 + +

+ + + + + + + + + +
+ + + + +
+STO:aaaaaaaa
+NB:bbLB:cc
+HOF:dddddddd
+eeee ZR:ffff +
+
+ + + + +
+STO:00000000
+NB:00LB:00
+HOF:00000005
+0000 ZR:05CA +
+
+
+ + + + +
+Stack overfl
+NoBuf LongBu
+HandOver Cnt
+HOfail ZonFa +
+
+ +

+

    +
  • dddddddd - sum of handovers from +test 41 (?). Unfortunately, values don't match +always (firmware bug ?) +
  • +
+ +

Counters are in hexadecimal form... + +

Test 132 + +

+ + + + + + + + + +
+ + + + +
+BS: aaaaaaaa
+MO: bbbbbbbb
+DRC:cccccccc
+TIM:dddddddd +
+
+ + + + +
+BS: 00000000
+MO: 00000005
+DRC:00000000
+TIM:00000000 +
+
+
+ + + + +
+BS_Call Cnt
+MO_Call cnt
+Dropped call
+Call time +
+
+ +

+

    +
  • aaaaaaaa - how many times you received call. Please notice one difference to +MTOK parameter from test 63 - you can't reset +this value from phone's menu
  • +
  • bbbbbbbb - how many times you made successfull outgoing call from your phone. +Please notice one difference to MOOK parameter from test 63 +- you can't reset this value from phone's menu. One interesting thing: this counter +can have bigger value than MOOK from +test 63 (firmware bug ?)
  • +
  • dddddddd - counter shows, how long (in second) there were calls made. +Doesn't work in all firmware versions
  • +
+ +

Counters are in hexadecimal form... + +

Test 133 + +

+ + + + + + + + + +
+ + + + +
+BFu:aaaaaaaa
+ChC:bbbb  cc
+StB:
+NSe: +
+
+ + + + +
+BFu:00000002
+ChC:0004  00
+StB:
+NSe: +
+
+
+ + + + +
+FullChargCnt
+ChaCon Wrong
+Standby time
+NoServTimer +
+
+ +

+

    +
  • aaaaaaaa - how many times info about full charged battery was displayed +(when it was done correctly - for example FullM info in +test 20...or not - for example MaBFD info +in the same test). +Counter doesn't increase value, when phone is disabled.
  • +
  • bbbb - how many times charger was connected. Counter increases value, when (each +time, when you will do it): +
      +
    1. phone is enabled, you connect charger
    2. +
    3. phone is disabled, you connect changer and enable phone
    4. +
    +Counter doesn't increase, when phone is disabled. +
  • +
+ +

Test 140 + +

Test from Nokia 6250: + +

+ + + + + + + + +
+ + + +
+AVC:  02    
+SLM:  00
+VOL:  09
 
+
+
+
+ + + +
+AVC state
+SLM  state
+BIAS  volume
  +
+
+
+
+ +

Second line changes to 02, when phone measure noise level. + +

and 8210: + +

+ + + + + + + + +
+ + + +
+Driver nr:01
+ManuDeviAddi
+00B000480000
+  +
+
+
+
+ + + +
+Return value
+from MFS

  + + +

+
+ +

Test 240 +
It doesn't show any values, but: + +

+

+ +

Test 241 +
+NetMonitor menu in Nokia 5110 +Disables netmonitor (it means, deactivates its' menu) ! +To again activate it you will have to use methods described in +How to activate it ? +Probably after using it you will have to disable and enable phone (to +make arrows up/down usable). It's possible too, that these arrows will work +only, when you will deactivate netmonitor from computer... + +

Test 242 +
Enables limited netmonitor +(tests from 1 to 19 only). To enable full netmonitor version +you will have to use methods described in +How to activate it ? question +(phone doesn't allow to use it from its' menu +test 243, which normally enable full +netmonitor version - you will be able to enter it in program enabling +netmonitor in computer only). + + +

Test 243 +
Enables full netmonitor. + +

Test 250 +
Some English descriptions write, that this test cleans information from +test 57 (I didn't notice it). + +

Test 497 +
It should deactivate +netmonitor like test 241 (497-256=241). +But some sites (for example, +www.versamart.com/Nokia5110/nokia5110code.shtml) +show, that it could make more: + +

The tips needs Net Monitor enabled. +
Be aware that the trick wil remove Netmonitor in some +
sw versions like v4.73 and v5.04. + +

+

    +
  1. Laungh the NetMonitor in your Nokia 51xx / 61xx
  2. +
  3. Execute the test number 497
  4. +
  5. Free calling for about 90 sec should now have been activated.
  6. +
+ +

The trick has not been comfirmed working yet. + +

For me, it's rather joke... + + +

Back to the top + + +

13. You can also use a program...
+


+ +

There are programs, which allow to track some of these parameters on computer's screen +(of course, phone must be connected to computer): + +

+

    +
  • +program created by Andreas Schmidt (www.aschmidt.de/): +shows values displayed by phone in given test and allows to track +BTSes (for example, compare their signal level) +
  • + +
  • +gnokii: it's the name of project (official page - www.gnokii.org) +and software (nevest versions - ftp://ftp.linux.cz/pub/linux/people/pavel_janik/Gnokii/), +which want to be Nokia Cellular Data Suite for Unix and Linux. In this moment +it displays information similiar to these displayed by program described earlier. +
  • + +
  • Logo Manager (http://www.logomanager.co.uk/) +it shows view of netmonitor tests.
  • + +
  • +created by N. Hüttisch (www.nobbi.com/). +It can work with differenet phones (for example, Siemens C10). +When you want to use it with Nokia, Nokia Cellular Data Suite is required +(program communicates using AT commands). When you will unpack it, in file +monitor.ini (it's in archive with program) +change comport parameter (you will give there name of port, where +'Nokia GSM Data' and 'Nokia GSM Voice' modems are installed). And that's all... +
  • + +
  • http://www.club.cz/nokia.monitor/ +- it has the similiar possibilities to program below. + +
  • +Logo Express (http://memsu1.iam.ntu.edu.tw/~jrywu/ +or http://logoexpress.bizland.com/): +shows LAC and CID.
  • + +
  • +from http://members.tripod.com/smssend/gsm_csq.htm +(versions for PSION, DOS and Windows): display chart of signal level +(besed on signal from phone), work probably with Nokia 6xxx phones only. +
  • + +
  • +WinTesla: this commercional service program displays many detailed information +(for details search some description on pages somewhere in Internet) +
  • + +
  • software from +http://members.tripod.de/gsmplanet/psion.html for Psion 5mx (MX 218) and Psion Revo. +It requires additional software supporting IrDa +(see http://www.symbiandevnet.com/downloads/opl/projectopx/scomms.zip) +Works with Nokia 7110, 6210, 8210 and with Siemens S35i, S25. +Options depends on phone.
  • + +
  • +version 1.3 of PC-Locals: there two ways to make it: + +

    +

      +
    1. +in the window, where netmonitor is normally activated, enter number of +test - computer will display everything, what could be displayed by phone +in this test. +
    2. + +
    3. enabling internal program's netmonitor: + +

      +

        +
      1. select menu 8 (Event Trace)
      2. + +
      3. select menu 9 (Load TRC file)
      4. + +
      5. +write name of TRC file (with PC-Locals 1.3 in Internet you can find +nse3_433.trc file for Nokia 6110 firmware 4.33) +correct for phone's model and firmware (or press Enter and select adequate +file). When version from file and phone's version is not the same, computer +will confirm, that you really want to load it (it won't damage phone, +but parameters displayed by program will be different than adequate parameters +from netmonitor in phone). +
      6. + +
      7. +select menu 1 (MCU Events)
      8. + +
      9. +change status of events, which will be tracked in Trace window - you can make +it using gray + on the right side of keyboard (you can disable tracking, enable +normal or extended tracking). If you want to enable netmonitor displayed after +pressing F8 key, you have to enable tracking event CONSTANT_WINDOW_TRA +(change to NORM or EXT).
      10. + +
      11. +select menu 2 (Event Control) and change to On.
      12. + +
      +
    4. + +

      In "Trace" window you will see now tracked events. Network parameters can be +observed after pressing F8. Menu 6 (Break Trace Functions) +breakes tracking events.

    +
  • +
+ + +

Back to the top + + +

14. Can I use NetMonitor without SIM card inserted, without PIN number entered or when SIM card is not active ?
+


+ +

GSM standards say, that cellular phone always should allow to make +emergency calls (usually 112) - even, when it's was blocked by GSM operator +(it means, when normally you can't use this phone - with this +IMEI - in network) or when it's without +SIM card (eventually it was blocked too). It makes, that after enabling your +Nokia looks for available cellular networks. There are some programs in this +moment (see in You can also use a program...), +which display on computer's screen everything, what could be displayed +by phone in this test. Or I will write it different: when you will connect your +Nokia to computer and use (for example) Pc-Locals 1.3 or program written +by Andreas Schmidt, you can +see some information given normally in "Net Monitor" menu. In some phones +(I checked it with Nokia 5110) you can have access to this menu (generally, +to phone's menu) using gnokii: you should send dtmf sequence to phone +(for example, run gnokii with parameter "--senddtmf sequence", where +sequence consists of some digits). + +

When you will enter PIN code, you will be "normally" able to use "Net monitor" +menu from phone's keyboard (of course, if it was activated) and all settings +and tests inside (for example, not till then in +test 6 you will see +"preffered" and "forbidden" networks). You can still display tests using described +above programs (it can be usefull, when you want to monitor network state and when +you don't want to loose caller identification or when you want to check kind +of channel after entering PIN code) - they work independent of it, if you +have "Net monitor" menu activated and which test is displayed in phone... + +

SIM card data can be readed in test 51 +(of course, if your phone supports this test) using these programs +independent of it, if you entered PIN code or not. When you don't have SIM +card in phone, you will see there "ERROR1". + +

When you use deactived SIM card, you have access to tests in netmonitor +(of course, when its' menu was activated earlier). Network of SIM card is +normally monitored. Phone tries to communicate with it only once after +enabling phone (netmonitor shows, that +CCCH, AGCH, +SDCC (phone refreshes TA then), +BCCH and CCCH channels +are used then - like in normal SIM card). Later it's impossible. It's made againg +after reseting phone. Of course, you don't have name of monitored network +on screen or cellinfo. Interesting thing is, that, for example, +you can normally use BTS test... + + +

Back to the top + + +

15. How can I disable NetMonitor ?
+


+ +

GSM/DCS/PCS phones: + +

+NetMonitor menu in Nokia 5110 +Enter 241 test in phone or use one of described in +question How to activate it ? programs +(you enter number 241 there, select "OFF" or something similiar...). + +

TDMA 800/TDMA 1900 phones: + +

Enter NAM programming menu (*3001#12345# code - +some sources write, that you have to write security code instead of 12345), set "Field Test display" to "Off"/"Disable" and reboot phone. + + +

Na pocz±tek + + +

16. Do I need to disable NetMonitor before sending my phone to the service ?
+


+ +

Normally Nokia phones don't have activated netmonitor. When you will give your +handy to service, somebody there can think, that you made some strange things with it +(of course, it isn't any maxim - it depends on concrete service and people, +who will repair your phone)... But I think, that it will be better to save +eventually problems connected with it and deactivate netmonitor's menu before +giving phone to service (I repeat: it isn't sometimes required, but it's better +to make it, when you don't want to have problems)... + + +

Back to the top + + +

17. Is it possible to re-activate NetMonitor after disabling it ?
+


+ +

YES ! You can activate (and deactivate) +netmonitor's menu repeat infinitely (and once more ;-)) + + +

Back to the top + + +

18. Is NetMonitor available in analog Nokia phones ?
+


+ +

Yes, it seems, that is available in majority of Nokia phones (working in different +cellular systems). + + +

Back to the top + + +

19. Does NetMonitor allow to use phone like broadcast station ?
+


+ +

No - if you want to speak without costs with people, which are near to you, +you have to use broadcasting station or walkie-takie. + + +

Back to the top + + +

20. I don't have all described tests in my phone. Why ? Can I increase their number ?
+


+ +

This FAQ describes tests from DIFFERENT Nokia phones (models). If you want +to increase number of available tests, you can only change your phone to +new, which has more tests (like Nokia 7110) or change it's firmware to never +- sometimes (like in Nokia 5110) you can have ONE :-) new test (firmware +5.04 and never has additionaly test 89). + +

If you have ONLY 19 first tests, you have activated ONLY standard netmonitor +- enable full (here is more details). + +

Sometimes you can find concrete copies of phones, where is really a little number of tests. +For example: I read about Nokia 6110 with 5.48 firmware, where it wasn't possible +to activate full netmonitor and where first tests didn't have some parameters +(for example, test 7 was empty). In such "cases" +I can find one explanation only: phone had not "full" firmware donwloaded. User +of such phone should take it to the service to download new firmware... + + +

Back to the top + + +

21. Does NetMonitor allow to identify place, where is my interlocutor ?
+


+ +

NO. This information are in networks registry, but they're not sent +to your phone. NetMonitor allows however (at least theoretically) +to look into parameters of sound, which is sent from his(her) phone... + + +

Back to the top + + +

22. Does NetMonitor allow to identify place, where am I ?
+


+ +

It's possible, but not too precisely. Why ? + +

Phone can read such parameters required to identify (location of) BTSes +like their numbers (see test 11) or +TA (see test 1), +but readed TA couldn't have been distance +from BTS station in straight line (signal can break down) +and continuosly isn't possible finding, in what direction (what corner) +BTS stations are located (which are "seen" by your +phone). So, it's possible to identify area only, where you're (in cities, where +BTSes are located more close, it will be more +precisely). And it can be done by you or your operator... + +

More info about implementing Mobile Station Location in GSM: +www.willassen.no/msl/ + + +

Back to the top + + +

23. What are NetMonitor codes ?
+


+ +

Sometimes I read advertisements with requests about NetMonitor codes and I don't know +exactly, what is it... It simple: in Poland (my country) rather only +GSM/DCS phones are used +and you don't have rather some special "secret" codes, which activate NetMonitor... When +you need it's description - it's in this FAQ. + + +

Back to the top + + +

24. Is it the truth, that in phones with additional hardware changing frequency band NetMonitor doesn't work correct ?
+


+ +

I didn't heard about such hardware. Article about it in Polish +Twoja Komorka number 4/2000 (page 18) +was only joke... + + +

Back to the top + + +

25. Where can I find description of FBUS/MBUS protocol and commands connected with NetMonitor ?
+


+ +

There are not official information about it. All pages below were created by different people, +which observed work of compiled software: + +

+

+ +

On the pages above you will find information about commands connected with +NetMonitor for NSx models (if you don't know model of you phone, +read this page). Always you can use ready and free +ActiveX control (http://www.gertjaap.com) +working with these models too... + + +

Back to the top + + +

26. I have non existing networks on the list of forbidden networks...
+


+ +

You should remember, that it's possible to change list of forbidden and preffered networks, +for example, using SIM card readers ot some phones (it's possible, this "strange" +position was entered this way). + +

When we speak about 260-99 network (260-3F position) - it was number of +test network run by the operator of Era GSM network on +the exhibition for Day of Telecommunication in Warsaw (May 2000). It presented +GPRS. + + +

Back to the top + + +

27. How to check frequency band (900 or 1800 Mhz), where phone work in this moment ?
+


+ +

Everything depends on used channel (for GSM 900 1-124, for GSM 1800 512-885) - +see description of 1'st test... + + +

Back to the top + + +

28. Can I use DLR-2/DLR-3 cables for activating netmonitor ?
+


+ +

Yes, Logo Manager (http://www.logomanager.co.uk) +works with DLR-3 cable. I don't know software supporting DLR-2... + + +

Back to the top + + +

29. Can I activate netmonitor using Init File Editor (Nokia 9110) ?
+


+ +

NO, Init File Editor is connected with PDA part of phone, netmonitor not... + + +

Back to the top + + +

30. Can I force phone to use one frequency band (900 or 1800 Mhz) only ?
+


+ +

Unfortunatelly not (of course, some other phones - for example, Motorola - have such function). +The only thing, you can do: you can force phone to use one selected channel +from concrete frequency (see test 18). +Of course, there are some disadvantiges of it - for example, when phone will lost +signal on this channel, will report, that network not found (in normal situation +it would try to find another channel). + + +

Back to the top + + +

31. How to change settings in tests ?
+


+ + + +
+Netmonitor menu in Nokia 5110 +Netmonitor menu in Nokia 5110 +Netmonitor menu in Nokia 5110 + +By direct enter to them. How ? You should enter to phone's menu, go into +"Netmonitor/Field Test" menu, enter the number of test, where you want to change +setting and ENTER DIRECTLY INTO IT. It's described more detailed in +question 9. + +

Sometimes (I write it in such tests) you have to change values in some +positions in phonebook before entering to them (see, for example, +test 18). + +

+ + +

Back to the top + + +

32. My phone has very short snandby time - it is possible to see the reason of it ?
+


+ +

Here are some possible to check reasons: + +

    +
  • if it depends of configuration of your network - see +test 10 (PRP parameter), +test 12 and +test 13 (DTX; +or test 2 in Nokia 2120/2160/6160)
  • + +
  • general energy consumption (it can depend on +older firmware version or enabled +"Info service") or "Cell info display") functions - +test 23 +(in Nokia 6185/6188 test 45)
  • + +
  • capacity of the battery (test 20; +in Nokia 6185/6188 test 42) +and their age (LiION) (test 23; +in Nokia 6185/6188 test 45)
  • +
+ + +

Back to the top + + +

33. Is netmonitor available in English version only ?
+


+ + + +
+Menu 9 in Nokia 3210 +Menu 11 in Nokia 3210 + +In Nokia phones only, in some other (for example, Motorola) in different languages... + +Menu 9 in Nokia 3210 +Menu 11 in Nokia 3210 +
+ + +

Back to the top + + +

34. Information sources
+


+ +

To make this FAQ I used: + +

+

+ +

People, which are not on this list, should write to me :-) ! + + +

Back to the top + + +

35. Additional information
+


+ +

+

+ +

For links to pages and sources in Polish language see Polish version of this description. + + +

Back to the top
+ +

36. Does using/activating netmonitor cost anything ?
+


+ +

Your phone HAS TO monitor network state/signal level, etc. to normal work +(and your operator DOESN'T TAKE MONEY for it !). You only can decide, if info +about it will be displayed or not - it depends ONLY on you. The same situation +is with other parameters connected with phone (for example, battery charging). + +

You can activate netmonitor FREE using methods from +How to activate it ?, eventually pay +somebody for it ANY money ;-)) - he will do it the same thing... + + +

Back to the top + + +

37. Does using netmonitor is legall ?
+


+ +

Pryvatly I think: I received (free ;-)) software for it and I don't +make anything wrong. So, why I can't observe parameters ? + +

BTW - different thing is with simlocks (especially, when phone was bought +in promotion and signed agreement is not expired ;-)))) .... + + +

Back to the top + + +

38. Which entries on SIM card are used in netmonitor tests ?
+


+ +

In new Nokia phones you have to write/read some values changed in some tests +in/from some entries in phonebook on SIM card: + +

+

    +
  • 31 - test 71 (AUDIO ENHANCEMENT). You should write value 0-65536 there
  • +
  • 32 - test 72 (AUDIO ENHANCEMENT). You should write value 0-65536 there
  • +
  • 33 - test 17 (BTS TEST). You should write +channel number (for GSM 900 1-124, for GSM 1800 512-885) there
  • +
  • 34, 35, 36 - test 52 (reading files from SIM) +and test 53 (writing files to SIM). In entry +34 will be put address of file, 35 its' contenst and in 36 info about +success/failure of reading/writing
  • +
+ +

Similiar activities in older models (2110i, etc.) were connected with writing values +into (for example) internal phone phonebook in entry 98. + + +

Back to the top + + +

39. Can I activate netmonitor in 3310 using soft working with 3210 ?
+


+ +

YES - in all new models of Nokia phones you can use the same computer soft. +I advice reading point How to activate it ?... + + +

Back to the top + + +

40. After activating netmonitor/BTS TEST my phone can't find network...
+


+ +

Nokia phones had always good firmware without too many errors, bugs and mistakes. +Some new models (like 6210) make more problems, but even they're so good, that +simple activating netmonitor menu doesn't make problems. +They can be sometimes visible (like hanging phone) when use concrete tests. +It's good to update firmware of phone then and inform me about problem :-))) +-> I collect firmware bugs in my pages. + +

Finding and loosing network signal doesn't depend rather on netmonitor - +it's possible, that in concrete place and time you don't have transmitters +of your operator or network is busy. It happens and is rather normal. + +

Different situation is, when BTS TEST is enabled. Your operator can use +set in test channel on small area only and outside it your phone will not show +network signal. So, disable it then (see description of test 17). + + +

Back to the top + + +

41. Netmonitor shows different battery capacity than info on it...
+


+ +

Phone takes info about battery capacity from resistor inside. +If it's different than should be, you see such incorrect info in netmonitor. +You can only check (and compare with original), if phone has longer standby/speech time. +If yes, you have bigger battery... + +

You have to remember about one detail: +In case of LiION battery you will find in netmonitor +(test 20) +the same value as on battery casing, in NiMH batteries +this value can differ even by 200 mAh (and it changes)... + + +

Back to the top + + +

+

[Part 1][Part 2][Part 3][Part 4][Part 5][Part 6][Part 7] +

+
+
+ +

Marcin Wiacek (WWW) +
Last modification: 5 January 2002
+ + + diff --git a/Docs/en_US/gsm/netmon/net_mon1.gif b/Docs/en_US/gsm/netmon/net_mon1.gif new file mode 100644 index 0000000000000000000000000000000000000000..4a8988936a7c8ee9a6856b940b39cc0a4f88aadc GIT binary patch literal 702 zcmV;v0zv&pNk%w1VYdKl0Du4h00030|NkNR1OWg50RSuj0002D0BZn10{)DTsmtvT zqnxx_3s63r^$TL*NR}Xgrs~SJ?hD8AOxO0En#RW^s16JYg}hPGaa8<<%w{loflj25 zrSpmnP(6!n$Xl^?HQ8(j+(1vyzVc4(4g=v%I?;~BkK-c#x~!+(^9h=nmLpnfdW!ngBbM6QWVr>!>Pm|=cY?uLs{{KqIUAv} z8+<~lHB_Xlq@4L7+@~7aW(b_xd&>NkP0TxdyjzXi?af90_^@rRzCOj?F6|yKZzS!! zZa+_gzoQ6mZJaNlKz13z4J3H0pTUE!u9Z8-u$4n}=+Z@$l(14I{)-p=iTfCaW59{@ zI*BBQ$QUzD3m?XF25`@`I(3q5%I68>I6-Dk0?G*Vh|f1ecXp!GvL-E(NSh@!1JqQ} zU`3gtnz}KY)rKe&Z5@VH-_vh|M$Q8U3y0dZY}>kh>!PDvxz8@Hm|JD;KD>PU`aM{; z1<|p8!PV=B5^-S;b@^#%-0<$=nPe;TT&j4oI8{s%cl;O|08mw7aKuIrAK z*ES-X?{hhXnoA|FT`Z=vQLsmw<7M+pkM6tcMuwI#PWqRZGb6hao;NwQM?`)2F*II# zF`X13Ht4NqUxb>>N8NW4Uf7d43Fd;Ee{M7w$A(Zj0wRD9`eEK7=T%5zDJ5p--HI+^ zB_cKdgm|KAk>!zNGvFvwqmE$x(xZ$+ribK_8qyKuRqiC!q&4z{6Qx8r-BzT4aBayY kcV2$UU59{$mLiUzl}QtS;_2m~UugcOBA9YAPyhe`JCN5}o&W#< literal 0 HcmV?d00001 diff --git a/Docs/en_US/gsm/netmon/net_mon2.gif b/Docs/en_US/gsm/netmon/net_mon2.gif new file mode 100644 index 0000000000000000000000000000000000000000..841ead5729d2baa2770716fd5df9870f50359528 GIT binary patch literal 154 zcmZ?wbhEHbv}2HBXkY+=|Ns9h{$ycfU|?j>0r5dH4ornT{VPwuU4LM5qm#$mO;S&) z3m_qf%0qp18&#ns=O?H2MMXBgy7aGcOl`Nt$ZaFI~g*{toi zw68yz+v;s{X$F_A`QBH7(j9J7*BYi5$Q@1o68xiXs0r5dH4ovwy{VPwuJ>M|7(a9rs^Q`-? zYae+`<8D~?>eRM(vzsDP-L~A3%vjsbN$g{?2$ihmCpMY>--WcEz90@M{lct)LVHIPKhJizHeFlyu9Pt))O-V7#OSp DJQqZV literal 0 HcmV?d00001 diff --git a/Docs/en_US/gsm/netmon/net_spis.htm b/Docs/en_US/gsm/netmon/net_spis.htm new file mode 100644 index 0000000..ad9cf46 --- /dev/null +++ b/Docs/en_US/gsm/netmon/net_spis.htm @@ -0,0 +1,136 @@ + + + + + + Odsy³acze do testów monitora sieci + + + + + + +

Wybierz numer testu

+ +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +11 +12 +13 +14 +15 +17 +18 +19 +20 +21 +22 +23 +24 +25 +30 +32 +34 +35 +36 +38 +39 +40 +41 +42 +43 +44 +45 +46 +48 +51 +52 +53 +54 +55 +56 +57 +58 +59 +60 +61 +62 +63 +64 +65 +66 +67 +68 +70 +71 +72 +73 +74 +75 +76 +77 +78 +79 +80 +81 +82 +83 +84 +85 +86 +87 +88 +89 +90 +91 +92 +93 +94 +95 +96 +98 +99 +100 +101 +102 +103 +104 +105 +106 +107 +108 +109 +110-115 +130 +131 +132 +133 +140 +240 +241 +242 +243 +250 +497 + +

+ + diff --git a/Docs/en_US/gsm/netmon/nm_01.gif b/Docs/en_US/gsm/netmon/nm_01.gif new file mode 100644 index 0000000000000000000000000000000000000000..06f7e8e4804fdc38cf61d680c9bcc5466179f2cc GIT binary patch literal 323 zcmV-J0lfZ4Nk%w1VN?Jx0Du4h00030|Nkri0000~05AXm0{(;%smtvTql~AbiL>6! z9u9_L;u+(KQf11vL3z1y2+uZG;ii&{_51k%Jr3c-Xz?LUwHRsHljNq(#?A^IUU^KY z5kie^u@6{xJk*MlD)w^}UBtD|D-nE_ukHIj7cm#cH>X!sS0}V{huA|X`1e&40t?kC<=}pK5k8JUVfe)tbR_&4(|S*SuJl9UoUfwKeN2g zqRq{pi!cK7A^TPk&cTEO7c%@u@1ewr6f0V^_v|7FBR(28<~h{}5JHA4Dw!0i5unH* VC@Wp$sH`Q*mur5xyf>l%06Tqxm39CC literal 0 HcmV?d00001 diff --git a/Docs/en_US/gsm/netmon/nm_02.gif b/Docs/en_US/gsm/netmon/nm_02.gif new file mode 100644 index 0000000000000000000000000000000000000000..dbc93fdf27238ca84b040edcca5e2c4ff6b5ad97 GIT binary patch literal 229 zcmVCNk%w1VN?Jx0Du4h00030|Nkri0000~05AXm0>ng&q08+LqntD)inHF& z9u9^ga~b1_RtjLI?z^xoOxO0E$#T`=_lyDhe!bmlW*pXpNJLAhq%n1e9W?ryI-1yJ z(W>o=$KLxd literal 0 HcmV?d00001 diff --git a/Docs/en_US/gsm/netmon/nm_03.gif b/Docs/en_US/gsm/netmon/nm_03.gif new file mode 100644 index 0000000000000000000000000000000000000000..1098642c74c6ca46e7455301e843f0803b38b9d0 GIT binary patch literal 404 zcmV;F0c-w8Nk%w1VN?Jx0Du4h00030|Nkri0000~05AXm0{(;%ah8`4qnxx_yH;cz z-4BLe<~)pooZ`xYqzb2AOV`jl$EeNMxH&@wdqmf(h%9PGv0SrK5(1q=QB>mLG*Vkd z7u(Hpcj6TZ>gB4_>}vbHURyKhIQ$K^>)G?=Y2sjw%)pv#Uv_%E=C1J}bH>Nr(`>OJHYn!)wXV$oJI4p?hSWHYP z2%KveN(l`*H9g9hd2QpzIq3-t-A&Exy~tWV*1T*^em-tkYP;79kN1k<8((`*AEJG% z{IAFjqJhcUfocbCRIqRfqw!maEg}Yp47s7J_>7{Ybc?ZCsVf7;hx>pay9v-;PJ+vfbnw=&p)`e`N|BR@)ZWpgOjRvy3bh~9sZ^_4y^1v} yrXdEk($L{GlYeM!>Jh>hW)4FOmxVH<2dctB*WAt%uo!cunD;1ekpA~hDW{g!V z6AM=8NL)=<9R6yN!ZSh*A8)5uDO=jvk(2y2Ub5wevQ)QZW)+CYmWQ$N@P?@96>0JY zS(#P=r9=psIO*xwDTWjpR=IhK#z1u#1B4cNS(t?iyMa5YOG?RW(wnI|nA$XJ9DB_8 zN$QGR^Vb(GvUr4NZD>b41g)2w1)EHxEmL|8j@fogCny~2mn0Y$EY7X>&KpX5 sN>-+`^axwb7%oLgd}Rq|O-Ia%>11{B!>Jh>hW)4FOmxVH<2dctB*v+)^^v=U0$@#Rp?Xyv|7um)x(=65$3cBm$2#m99Prje#75%)Lg zwuCw3rBi7!MfF12X);yiq=JBH{wm(q08+LqntD)inHF& z9u9^ga~b1_RtjLI?z^xoOxO0E$#T`=_lyDhe!bmlW*pXpNJLAhq%n1e9W?ryI-1yJ z(W>o=$KJB$}=mjD0& literal 0 HcmV?d00001 diff --git a/Docs/en_US/gsm/netmon/nm_07.gif b/Docs/en_US/gsm/netmon/nm_07.gif new file mode 100644 index 0000000000000000000000000000000000000000..8b65f6fc553573a0c44c9eaf46b9a0a3bd5d0f6a GIT binary patch literal 224 zcmV<603ZKHNk%w1VN?Jx0Du4h00030|Nkri0000~05AXm0>4Czq08+LqntD)inHF& z9u9^ga~b1_RtjLI?z^xoOxO0E$#T`=_lyDhe!bmlW*pXpNJLAhq%n1e9W?ryI-1yJ z(W>o=$KH!+^W1B+?@0r8C_{@nVdaT0028spJpKd literal 0 HcmV?d00001 diff --git a/Docs/en_US/gsm/netmon/nm_08.gif b/Docs/en_US/gsm/netmon/nm_08.gif new file mode 100644 index 0000000000000000000000000000000000000000..dd6b3b5709b7824f292926067fd219073e66a97c GIT binary patch literal 345 zcmV-f0jB;(Nk%w1VN?Jx0Du4h00030|Nkri0000~05AXm0{(;%ah8e=qnxzbyH;fG z-4BLec0gQmis}lIXX>!>Jh>hW)4FOmxVH<2dctB*WAt%uo!cunD;1ekpA~hDW{g!V z6AM=8NL)=<9R6yN!ZSh*A8)5uDO=jvk(2y2Ub5wevQ)QZW)+CYmWQ$N@P?@96>0JY zS(#P=r9=psIO*xwDTWjpR=IhK#z1u#1B4cNS(t?iyMa5YOG?RW(wnI|nA$XJ9DB_8 zN$QGR^Vb(GvM3#!hI0fRok9qB%ROH7d@Y2hj^D#EU;s`$Qt@InIeFGJGF0d>q{xvZOPXwU rD$lVS_HU5Emj5EYvUHQC5@yA6va%?WB{!Tub;>+y24|B#1poj$XhNF& literal 0 HcmV?d00001 diff --git a/Docs/en_US/gsm/netmon/nm_09.gif b/Docs/en_US/gsm/netmon/nm_09.gif new file mode 100644 index 0000000000000000000000000000000000000000..3117ef09d4f3b2d81f442abf3625ff9dcb84a3fd GIT binary patch literal 240 zcmV}%cxDZ$PGv-vMn3K2mxVX`n zI2m)uVuxv>$;8$vI!byZIJj4el%=<$N^-^O_==L1G)t>dX<3$A!N}_B`@5?~IEHthNli+H4(b%bYD6TwSb9t=!~|>a6u({hX#)0027?)Os=i literal 0 HcmV?d00001 diff --git a/Docs/en_US/gsm/netmon/nm_10.gif b/Docs/en_US/gsm/netmon/nm_10.gif new file mode 100644 index 0000000000000000000000000000000000000000..78becb82f5a920df76a2e623042be843dd22900a GIT binary patch literal 151 zcmZ?wbhEHb3}G-}XkY+=|NsB%fM}2i15+7GQseTs{EO#oIX7k6-95kC4R5+nOHJ!} zb}A_2*0D{-t3Kym<2m>JA3qOQ`;kQ-JAAaJpIP>qv)60+l~rH6&Sq`Dv+g@LU-$7R zn|}8At-k(d+wZ%cZyngBzdxN-{!x+l&FOIU6^vpp%p)``Zlsrg-+sYeQdHij6;`7KlU;pP82<10ORA|V9nCN9fvB}$gAN^kMqlB`(wor`-Vg1+K|7%Gv7#-{TLjY_A~s`ZM^YPa03 z_X`e-$K-YS={|^|5mvkh80%vikG-#O9IHNQdHij6;`7KlU;pP82<10ORA|V9nCN9fvBq08+LqntD)inHF& z9u9^ga~b1_RtjLI?z^xoOxO0E$#T`=_lyDhe!bmlW*pXpNJLAhq%n1e9W?ryI-1yJ z(W>o=$KN?Ac+o!tfn=5;=8yo~@e2kpT oM$Fvo{0uERIvuU3iCOL2G~7&DC73I=IrOpo$e=lLDsDLb=mN(6-z^_!MuhJzRA*0zS|H}|!MmQa{zxHoth z2FdtQbZ407ImtJ<2uUPb`4~wlX(#&d$BK25>ZQo_HVTzHrOTUf*$dnfJiJ0|Y;>Ib zYjO0`?2B}|CHO3MyCj5(tnCoksfAu9Q?)t@=1BtL(<7D-~4~0027#ytY07 literal 0 HcmV?d00001 diff --git a/Docs/en_US/gsm/netmon/nm_32102.gif b/Docs/en_US/gsm/netmon/nm_32102.gif new file mode 100644 index 0000000000000000000000000000000000000000..343767367f7bb4ea30d005a515a41728973c1b5c GIT binary patch literal 398 zcmV;90df9ENk%w1VN?Jx0Du4h00030|Nkri0000~05AXm0{)DTsmtx(05}rbi?fn5 za1Dkc)p_NJrc7n9>I=IrOpo$e=lLDsDLb=mN(6-z^_!MuhJzRA*0zS|H}|!MmQa{zxHoth z2FdtQbZ407ImtJ<2uUPb`4~wlX(#&d$BK25>ZQo_HVTzHrOTUf*$dnfJiJ0|Y;>Ib zYjO0`?2B}|CHO3MyCj5(tnCoksZDgF)D2n{XoUES)T9}3^g zzW+|2x`AE*zN4eznGAL14k|(j=}SFu1~&z%CaVrMYl8`U_4p_d;D?K*`az`U0HVcP z_%sEIheA{mIWR4vD~02vl#~dk+~a7o(M58{{>-uFFxr-Z949h+3N@ZsXT zmOJ~>!c|J}>#uWrtzmNHOdX1$PWoPu&rN`G6*XIXV#%46O$0wyI zcqz9CaVHtoWZAeFILQ*ph(`)4`qy~+!0GoQ``0r1117gQwOhjLtMT|N>@i$SXpC%@ zoE*H|)2w?Y20RG7;u3LK&35R7qs-lf+MvDt`aLe)QKl_v25WHeN&4JYwCB(ydbX@H>MV|`dP4Wfqa`wB U)sM3#;oKVTAS<0jZWI6jI|^#I00000 literal 0 HcmV?d00001 diff --git a/Docs/en_US/gsm/netmon/nm_6150.gif b/Docs/en_US/gsm/netmon/nm_6150.gif new file mode 100644 index 0000000000000000000000000000000000000000..b69427e7d718976d158e16760527b42788de27e6 GIT binary patch literal 394 zcmV;50d@XINk%w1VN?Jx0Du4h00030|Nkri0000~05AXm0{)DTsmtxp05DR*i?dFZ z&kcs6MUmo(K4zJ=?y&~(OK)WL)%wo%%Z$3^PD5A@=yM5M#nJ~UYrdcvX(#G@Ub9;q zm*tHvsn(8ViA9_zYp^zrUT=RtHa1>tx9@Mf`%)&xhV!O2$oGc`*C(YAD3)gEfjGw4 zQwdn-6lpZ6XQ}8%1*4fLlSFwKsw&#ZQM$MydnnY}DTo@uvpd4;tKs@9OgdalXN*jo zj2yho)12u@2rW(RVBKI>Jq^g+OQdW_czQiOnjJ)u&FyLq34-m&S?67C#EKoSMqci2 zFJ2FVK6TJ)g}F!XU^g55*4-PIC4#~#7|sYhVopv&YJlHV%#nDDotZKN!%6%o?N-E$ zdCpz)h;mXcIblr11U3cZI&c0)lyn9(sL-MPU^yHH(NiI#Adyl-vndwBn>uRJ8dT_0 oDwV%xZS6FUrmA_oVqDo{N|6tjN``2y^)Qx}rM|*mWl;bCJItH6FaQ7m literal 0 HcmV?d00001 diff --git a/Docs/en_US/gsm/netmon/nm_6190.gif b/Docs/en_US/gsm/netmon/nm_6190.gif new file mode 100644 index 0000000000000000000000000000000000000000..c658a13f0f29246c2cc563953db9fafdf08938df GIT binary patch literal 386 zcmV-|0e${QNk%w1VN?Jx0Du4h00030|Nkri0000~05AXm0{)DTsmtxZ0622Oi?c@6 z$nb6ANQPfXrmAC3=nBUzXvMaQcK6O>)lXx*f}GlA2r;shM8)vQTyCNfs!$2lARpEQ zvNfaWJUSrxG(P&w!5NzDwYag}$lB?W=ZRT<-nhkb7bn*7)&y4wMp5T9ScKT7M;LjQ zn9+F274<{nIoy`M*&&MC7Ngk_NDil>eEw;V~Z=2nac~(`zr`6>@{5MVO+c$ z9QUKl=xlcz)y%fkoB~aJjCWl}ou+l`d)3|WEjE&k8u)x&Rbx0wn?7z${my(pKUHrY zTaAtzKrYZ+B!PGC3>A0$ju<4^?w%oX>iYR(x2aXPVtDvU90Z3aqe4XhL58#E4PnTH zIWVe`p^~C2eI+U)yNNTW&WlwJ3S$WAP)~@!T*7%#Cf2iny=Io;_;im@qc@OB-E$NO g8mOvlL7CJNk%WU3+XSMWX-!JF)J!T>t<8 literal 0 HcmV?d00001 diff --git a/Docs/en_US/gsm/netmon/nm_6210.gif b/Docs/en_US/gsm/netmon/nm_6210.gif new file mode 100644 index 0000000000000000000000000000000000000000..30ccb3531571b8ab12ec063fce4ababef185d96d GIT binary patch literal 490 zcmV+_B}v(N=_&fdc!+sP1}a(V>bV!SiP*aOSvr@is%tvyRy%l0$@{tsyy#n5 z1<5+u8VZ}~mF$dW-Hht2SgpE3_ss_`E;mkAej$CXZoa-MT`0C*Rp$<$l^#!pCwSkU zx?c!OntT}84H6W~TR(h(Y^AcN=bjCE28~3b1+kaJ$_Eq=zR~w@AfFDGC!eXOvI84Rr8AB6WuPU~l>EUi@REbP`gq>UVgI#}S#XKeK zQ7Vwbgfk*;$M~_h$dW5tzKnTeUOOrkgZcaOm_urnBZm_E$LQe3iH1RI=9;VJYq&nj gxOkfKIA)`4o7}cd_vGKPwKl?t+Oy%~#R>obJJeP42LJ#7 literal 0 HcmV?d00001 diff --git a/Docs/en_US/gsm/netmon/nm_6310.gif b/Docs/en_US/gsm/netmon/nm_6310.gif new file mode 100644 index 0000000000000000000000000000000000000000..f00b93899a0ec7cb855bddbd561ed1c1da50040b GIT binary patch literal 517 zcmV+g0{Z<&Nk%w1VPF6}0Du4h00030|Nkri0001B06YKy0{)DTse8~2qnxx>;IQ4i zdzA%_IAWzSeky9V?hBi!NT2ph#`?}{E0oH}ZnWPgWkdvvxDYeBK|+}&%_%qKNVDAT z!wdFqmBBG9>+^{tYBk7wtcKxO5|F-fbLldBuIdKU(C2d2!jdNB!8fGnr)Q;@_~U`2@I-5dqV4`i%~7=Ppxv>RmF!8=vsv3F^W+F)2COIj-1BD+ H3IG5*&~yOR literal 0 HcmV?d00001 diff --git a/Docs/en_US/gsm/netmon/nm_7110.gif b/Docs/en_US/gsm/netmon/nm_7110.gif new file mode 100644 index 0000000000000000000000000000000000000000..4768efd16785971c26a904e77b5aa3b1ccb84675 GIT binary patch literal 511 zcmV$vL1eWIcjOqwwtwEwPN{Z_H&X~*h{ttwucq>~Ah)gDRk=jalgEE`bg)@eeRzur_ zlVyZ$x?HkZ7dxv#>9zaPe#<5Cx!p?{vzm4GaohJ$)2AmhR*05&NEm2>IMWCwCbn4k zBUrfzcBJ_@5lOV6xrZRCaXQ)gM{4TQ0V-lTNh-J}Yx_5<%BHxvIa({bi#t2)0ZU0+ zTZ($?jLMoD+0ZNbh$syG99;~3Tulsx-K<^C&FzT+p2^()tn1CL%rSlUR&T$CU$sxx zpYIPKvwt-5eR*Of9WR4rLim8hk6w=k@=g$>gHTG8uwI$;#8%mUL9po5>h@Vqf|q#;oflkq92l1NW3EFB_E3MwPfj3#vgvXI7A zET0hP#5pCBrNTTz0Ah)UX=bN8Z7xxY`E6@ZG(qrKEPIcllCf~`3f#-LuaLPyB`QfY zm`1vKhY?2^8WhPH!UIdVg$fr^V7;4VD&0vib4bcNNYl+LFtzH{tjB#twtAw|TM5CX z-b`Ckv_W8Fd(37{8Zp|P^_?9)=oc=n$$k42p6a-z=BlS7*X>K*Z_^e-krPt@06Ta7 B@FD;J literal 0 HcmV?d00001 diff --git a/Docs/en_US/gsm/netmon/nm_8210.gif b/Docs/en_US/gsm/netmon/nm_8210.gif new file mode 100644 index 0000000000000000000000000000000000000000..1d3a51f856896a815be3d9e7ebc6e6b4213e6867 GIT binary patch literal 394 zcmV;50d@XINk%w1VN?Jx0Du4h00030|Nkri0000~05AXm0{@JUsmtx(00>gTi?dc0 z*$svwH67oGrp(u=?n}n-oLbdM=k$pueO>x(N*tola1^nK%GEN$oFy?))04Es-CEe- z4LSLC!LmgaYzuqI9(C*qU(3>5j+641_tJTCoc;H3mPgmJ=f>Bkc$Mfdm{n%wgXp$c z$yn)lhZV^t$rqT2*=e?^h}Q{vxjLtp8DW~mq(zD5S|;lWtHT>I*bBT8JPh$mOl*7{ zoUH6rr@`Fp(={cmvsG<}ojuLF%}v>O5k0bv3d^$vy)&u)`$|oI?h@9nUMh4y4r63x zuKn(rrWZjZ#fzfmh>Z-~is3Ty4^M|53y0L0m+l*?h-q(pp{QrD)t6Zl*U0PUkz~j* zRSH$~2;$|#BJzJSIjJ or$1WLDWlcLtGk4alBzglawk}@x|XTznsF5*Qr literal 0 HcmV?d00001 diff --git a/Docs/en_US/gsm/netmon/nm_8310.gif b/Docs/en_US/gsm/netmon/nm_8310.gif new file mode 100644 index 0000000000000000000000000000000000000000..e04405ad09e3edb3950015df6c266c770cc6328d GIT binary patch literal 383 zcmV-_0f7ETNk%w1VN?Jx0Du4h00030|Nkri0000~05AXm0{)DTsmtx}05}rbi?fn5 za1DkcHI?0nrcK42>ibrP4A&@4+q#asNv@IsMLy4INU{lwq2kB5V#cHz=W_OJAzDx4 zGHd#FSk&3(L&mDNCg}A&j;py3tH&*evhn&fzb}WhV5h~Emy`xKm#1i9=cTu|ml#;N z)(G*4_K4Wl=y&y(dDcm>Rtnno7wR|qa}<{&>lw?a3K;6TvrEM53sUwgyfs`LVT`qP>0Bt!x^3x88dr#9%mBlFlxj^1ech$j&l; zuVsxMKXFdlxzh%)nYVz@l$7ytgdsLvQzAqZXpUSyUx$t$g44LsUo~`CAhvS0L)I%n z6SMK^cZN>Mip*--you9S7fBY4$*h)(R2`7+I-Y`ri$s`W04X6=JbUVQmonC z_L*c@ztD1RLyoGw>~ac^O@W*DTGH6If*B3Pj zcO)mJc=c$RNQo%9n0bh~=_#4&SSi}T$k}x!tIFzFSUDP_TeRD&;|m-SJS;|RTyva! znH;nH@z$ik^_&6;?c6n;f$bD`_U7$+1->n0IzA>YsNL-nCVgF;Hx-S{bSec65)Mw@ zPW>v|opAZ)>EO06puiaf(aqt25ShYjNW92-2yq+6Xij|kh56I)*9CU4HjU}A@#Bq= zBo)y}r4m!beNI~PgQF$R!;~7C`TPkqXbUVH7tOrUk`O7Q#Ok#Yq)8J|Ut9=P)DtOd mNnlj8&X|Yi>Q<`ON|`mNy*VEM1`it=#dKDotmH@ zYioEKo#d<5_B69hUP<{JE`q`DIQedlG`IXUZH@+)hbPFT(FS#g@E2I;NSD?Kv3Dl9 zDAx!nscGl_f6AL#PbDN=xySvKk%k~?5C`{~DEUY`3 zeB9L`Mmv=pU9$YcGu-SDI8CI(fVrk^9KB?l`&|=`j#i~^QB5k9Uhd}e>RtgqetD8b zPF@e2A|`s;xx0rij6!VsYJ4)b5M8W@z4k!t#^#l{Z&Vi*$?51!oIPcg!0l7m5ZJYg z@BoHd_(chllLdPvVy982vUmTsVHvX`C9|PKiyGwtgx;uK+#Ei0_(`aaWzYOns*;Eo t7Fbp}a + + + + SMS FAQ + + + + + +

Main page

+
SMS FAQ
+ +


+ +

What is SMS ?
+


+ +

You can send from your phone short text letters. And this is SMS +(Short Messaging System). + +

What is SMSC ?
+


+ +

This is Short Messaging System Centre. + +

Idea is simple: when you write +your SMS, select recipient(s) and send your SMS, it's send to SMSC. +If you see "Message sent" ot something like that, don't worry. It means, +that your SMS was delivered to SMSC and SMSC try to delivery it to recipient(s). + +

Why is it done this way ? Let's say, that recipient's phone is disabled. +If it will done this way, that your phone will try to delivery it directly, +it will loose energy during each try and you have to be in network coverage +during it. GSM network makes it easier - not you, but SMSC try to delivery it. +And of course, you can decide, how long it should be done (after it SMS will +deleted). + +

What SMSC should I use ?
+


+ +

The most simple answer is: ask your operator and use its' own SMSC. + +

But sometimes it's not so simple: it's possible, that SMSC of your operator +CAN'T send SMS to some other network. You should try to use different SMSC then. +But remember: if you will try to use SMSC from different country, you have +to have activated international calls. + +

Can I use my own SMSC in roaming ?
+


+ +

Yes. + +

Can SMS contains not only text ?
+


+ +

Of course. Each SMS contains some bytes filled with contest. Normally they're +filled with chars. But of course you can decide, that they have different meaning +and send +binary data this way too... + +

In this moment we can classify SMS to: + +

+

    +
  • 7 bit SMS - you can put each of 127 chars into it
  • +
  • Unicode SMS - you can each of 65550 chars into it
  • +
  • binary data SMS - ringtone, picture, etc.
  • +
+ +

What is length of SMS ?
+


+ +

Each SMS can contains ONLY 140 8 bit chars. When you code it as 7 bit SMS, +you can save 160 chars (you have 140*8 bits inside and they're divided into +7 bits) and when code as Unicode SMS, 70 chars (each char in such SMS contains +of 2 8 bit chars). + +

It's also possible to put into each sent SMS +special flag, which will mean: this +is first, second, third,... part of SMS. Some phones can display this info +(for example info "Linked: 1/...") or even display each SMS with such flag +as one long... Such SMS are called concatenated or linked. + +

What is price for sending SMS ?
+


+ +

Ask your operator :-) + +

Generally you pay for EACH SMS with 140 8 bit chars. It means, that +after sending Linked SMS consist of 2 such SMS, you will pay for 2. The similiar +thing is with Picture Images (each of them consist of 3 SMS) and Reminders +from Nokia 3310 (2 SMS). + +

Something it's free. When ? When you are in roaming and network, you use, +write in logs, that sent SMS, when it was send ONLY over SMSC of this network (remember: +you can you SMSC from your home network). Or when SMSC, you used, gives info +to network about error during sending, but send it correctly ! + +

What is price for receiving SMS ?
+


+ +

In many networks it's free... + +

What is SMS class ?
+


+ +

Each SMS have flag with info, what should be done with it after delivering +to recipients' phone. There are 4 possiblities (classes): + +

    +
  • Class 0: displayed immedietaly after receiving + in display of SMS recipient
  • +
  • Class 1:
  • +
  • Class 2: saved in SIM card of recipient
  • +
  • Class 3:
  • +
+ +

What is delivery time ?
+


+ +

This is the time, during it SMSC will try to delivery your SMS. + +

What is delivery raport ?
+


+ +

You can know, if your SMS was delivered to recipients' phone +(don't misguide it with reading !). It's free. There are two ways +to do it: + +

+

    +
  1. enable such option in your phone. Of course, it will work +only, when used SMSC will accept this feature
  2. +
  3. write special text on the start of SMS. It can be different for +each SMSC
  4. +
+ +

What it "Reply via own centre" ?
+


+ +

Theoretically, when you send SMS with flag to somebody, it should +be able to send answer over your SMSC. Often it doesn't work (many SMSC +doesn't accept SMS from forbidden networks even with this flag). + +

I have error, when answer to received SMS
+


+ +

+

    +
  • you don't have correct SMSC in phone
  • +
  • person, who sent SMS to you, marked "Reply via own center" option. +Try to send SMS over your own SMSC
  • +
  • you can't send SMS (don't have it activated in your operator)
  • +
+ + + diff --git a/Docs/en_US/gsm/tip.gif b/Docs/en_US/gsm/tip.gif new file mode 100644 index 0000000000000000000000000000000000000000..9837057c971f6aa1a80ebb33944243e4879993d0 GIT binary patch literal 268 zcmZ?wbh9u|lx9$2*vtS1|NmE4GgMbs@7=ri|9^)6c!3T`2S_gi%fSmLJXi0vczt%a zpu&sDgv42oeu%QY-gZc1!zBiuwVWl!tbf)Y$`k(lH)?0%vUC;})>GWYNr!iG1^D)u z-Lzf2L^w#|NR#&F2NiR!S{%JPXC|}9_By|m>R|g&|7s~_#@eia7U^cTR&@>Q4v8+I z(#(kJ38Irs?G-CTW=v+BIoY0tC1FALq7XB-W%GnrE)=n-SUx{Jb~PKb#d@zzq71t$ r+=UK`9gaQ5c0&A=*g1&{8+VrMzErd5=Jjh@-S;0pdi+?Bfx#L88ApI2 literal 0 HcmV?d00001 diff --git a/Docs/en_US/index.htm b/Docs/en_US/index.htm new file mode 100644 index 0000000..a45a54b --- /dev/null +++ b/Docs/en_US/index.htm @@ -0,0 +1,52 @@ + + + + + GNOKII/XGNOKII HELP + + + + + 
+GNOKII/XGNOKII HELP + +

Welcome in our help system. + +

Gnokii related topics +

+ +

If you want to know something more about Nokia/GSM mobile phones... +

+ + + + diff --git a/Docs/en_US/styl.css b/Docs/en_US/styl.css new file mode 100644 index 0000000..02b023e --- /dev/null +++ b/Docs/en_US/styl.css @@ -0,0 +1,46 @@ + + + diff --git a/Docs/examples/axelf.txt b/Docs/examples/axelf.txt new file mode 100644 index 0000000..df51e7f --- /dev/null +++ b/Docs/examples/axelf.txt @@ -0,0 +1 @@ +AxelF:d=4,o=5,b=125:32p,8g,8p,16a#.,8p,16g,16p,16g,8c6,8g,8f,8g,8p,16d.6,8p,16g,16p,16g,8d#6,8d6,8a#,8g,8d6,8g6,16g,16f,16p,16f,8d,8a#,2g,p,SS,16f6,8d6,8c6,8a#,g,8a#.,16g,16p,16g,8c6,8g,8f,g,8d.6,16g,16p,16g,8d#6,8d6,8a#,8g,8d6,8g6,16g,16f,16p,16f,8d,8a#,2g \ No newline at end of file diff --git a/Docs/examples/gnokiirc b/Docs/examples/gnokiirc new file mode 100644 index 0000000..3106a75 --- /dev/null +++ b/Docs/examples/gnokiirc @@ -0,0 +1,176 @@ +# This is a sample ~/.gnokiirc file. +# In Unix/Linux: copy it into your home directory and name it .gnokiirc +# or into /etc and name it gnokiirc +# In Win32: copy it into directory with (my)gnokii.exe + +[global] + +port = /dev/ttyS1 +model = auto +initlength = 30 +connection = fbus +bindir = /usr/local/sbin/ +synchronizetime = yes +;logfile = mygnokiilog + +[gnokiid] + +port = /dev/ttyS1 +model = auto +initlength = 30 +connection = fbus +bindir = /usr/local/sbin/ +synchronizetime = yes + +[receivesms] +path = c:\ + +# DESCRIPTION OF PARAMETERS + +# PORT +# ----------- +# Set port to the physical serial port used to connect to your phone +# In Linux /dev/ttyS0, /dev/ttyS1, etc. +# In Win32 COM1:, COM2:, etc. + +# MODEL +# ----------- +# Set model to the model number of your phone +# In this moment: +# +# for Nokia: +# 6185 +# 3210|3310|5110|5130|5190|6110|6130|6150|6190|8210|8850 +# 6210|7110 +# +# for AT phones: +# at +# +# Please notice, that in some phones (like 7110) +# it will be (now or in the future) provided double support - AT commands +# or protocol specific for phone model (fbus, mbus, etc.) +# +# You can also use model "auto" and gnokii will try to find your +# phone model on "port" port. This option is during development and +# can not work excellent...Let'say - with all new supported Nokia phone +# connected over FBUS/DLR3 cable you will not have any problem. +# With other can be and it will have to be set manually. + +# INITLENGTH +# ----------- +# Initlength controls the number of characters sent to the +# phone during initialisation. You can either set it to +# the word "default" or a positive integer. +# +# You can try setting this value if you want to connect +# to the phone quicker. If you've never noticed the +# connection to be slow, it is suggested that you +# leave this alone. Read the initialisation code in fbus-xxxx +# to understand what this changes if you're curious. + +# CONNECTION +# ----------- +# The type of the connection. Can be: +# +# @"mbus". Models: +# 6210|6250|7110 +# 6185 +# 3210|3310|3330|5110|5130|5190|6110|6130|6150|6190|8210|8850 +# +# "infrared" (for direct infrared connection - in 8210/8250 use two players +# snake menu to enter into it). Models: +# 6110|6130|6150|8210|8850 +# +# "tekram210" (for direct infrared connection using Tekram 210 +# - in 8210/8250 use two players snake menu to enter into it). Now in Unix only. +# Models: +# 6110|6130|6150|8210|8850 +# +# "irda" (infrared over Irda sockets - now in Unix only) +# Models: +# 6210|6250|7110 +# +# @"fbus". Models: +# 6210|6250|7110 +# 3210|3310|3330|5110|5130|5190|6110|6130|6150|6190|8210|8850 +# +# @"dlr3". Models: +# 6210|6250|7110 +# +# @"at". Models: +# at + +# BINDIR +# ----------- +# Set bindir to point to the location of the various gnokii binaries. +# In particular ensure that mgnokiidev is in this location, with +# permissions 4754, owned by root, group gnokii. Ensure you +# are in the gnokii group and that the group exists... +# Setting not important for win32 + +# SYNCHRONIZETIME +# ----------- +# set it to "yes", if want to have set time from computer to phone +# each time, when use gnokii, xgnokii or gnokiid +# Function works, of course, only then, when setting time is implemented +# for your phone +# With some phones (if it's enabled or if you generally changed date/time +# during session with phone), after soft reset (without asking for PIN) +# phone can lost date/time settings and ask for them or disable clock +# on the phone screen. Seen for 6150 and 6210 + +# LOGFILE +# ----------- +# When there are problems with mygnokii, you have two ways +# to help in resolving them: +# 1.compiling mygnokii with debug and sending dump to marcin-wiacek@topnet.pl +# 2.using this option. Mygnokii will be slower, because during work will +# create file with name set here with short +# info about transmission. Send it to marcin-wiacek@topnet.pl +# Method 1 is better. When not possible (for example, when have only +# compiled binary version), use 2. + +# EXAMPLES + +#1.Nokia 5110, fbus cable on "/dev/ttyS1" port with gnokii/xgnokii +# Gnokiid uses "default" config +#[global] +#port=/dev/ttyS1 +#model=5110 +#connection=fbus + +#2.Nokia 5110 working with NCDS (win32) on "com1:" port with gnokii +# Gnokiid uses "default" config +#[global] +#port=com1: +#model=ATGSM + +#3.Nokia 7110 and dlr-3 cable. It's connected to "/dev/ttyS1" port. +# First we want to run gnokiiid and connect to phone with fbus. +# Then run gnokii/xgnokii and work over gnokiid (for testing gnokii +# AT emulator and AT module - in normal work gnokiid is not required, because +# 7110 with dlr3 has own AT commands interpreter). +#[global] +#port=/dev/gnokii +#model=ATGSM +#[gnokiid] +#port=/dev/ttyS1 +#model=7110 +#connection=dlr3 + +#4.Nokia 7110 and dau9p cable. It's connected to "/dev/ttyS1" port. +# Gnokii/xgnokii work using fbus protocol (can't use AT commands +# from 7110, when use dau9p) +# Gnokiid uses "default" config +#[global] +#port=/dev/ttyS1 +#model=7110 +#connection=fbus + +#5.Nokia 7110 and dlr-3 cable. We want to connect with it using fbus +# Gnokiid from gnokii is not required (with dlr3 can use AT commands built in +# into phone, not our small ;-) AT interpreter) +#[global] +#port=/dev/ttyS1 +#model=7110 +#connection=dlr3 diff --git a/Docs/examples/logos/gnokii.nol b/Docs/examples/logos/gnokii.nol new file mode 100644 index 0000000000000000000000000000000000000000..98859424f2e38d4689eecc5b391381a95b446877 GIT binary patch literal 1028 zcmb7B+Y!Pr3`-Yama+vOT>0z%U!4P4wnEy*$&ow!kR`>T+vi=Da^UwW55%SHWxbrI zoeOqqeTq1w(PqLh+qus=z3H@G*0k^P7gj`VEHmC3BrL>R!hi`#JjGKq`8MEF@(Ym2 z!*dHHMn=J5QfOtUeM=UJN$Bar9jb)JA@%f!kKgQH4>G&OBPugy*I!8^R~Sb~pP!(T k+k1jii$v0cO-{WE c #9A9A8A", +", c #A2B2A4", +"' c #DADEDC", +") c #524E4E", +"! c #869E85", +"~ c #8E7666", +"{ c #506250", +"] c #324A46", +"^ c #8F9080", +"/ c #6A626A", +"( c #ADBAAE", +"_ c #7B7A7B", +": c #7E967E", +"< c #667E66", +"[ c #CED2D0", +"} c #566653", +"| c #444244", +"1 c #293E38", +"2 c #878A77", +"3 c #566A56", +"4 c #424A44", +"5 c #121A16", +"6 c #B8C1BA", +"7 c #122E2A", +"8 c #0E0E10", +"9 c #26628E", +"0 c #D6DADA", +"a c #5A82A6", +"b c #768E76", +"c c #373E3A", +"d c #566E86", +"e c #757773", +"f c #E2E2E2", +"g c #545C59", +"h c #6A826A", +"i c #EEEEEF", +"j c #5E725E", +"k c #9EAE9C", +"l c #252D2B", +"m c #9AB2C2", +"n c #A2A692", +"o c #8F9A8F", +"p c #425650", +"q c #7E856D", +"r c #A6B4A6", +"s c #7C8A98", +"t c #BEC6BE", +"u c #AEAEAE", +"v c #1A322E", +"w c #666C68", +"x c #36423C", +"y c #6D6E6E", +"z c #494A49", +"A c #869EB2", +"B c #373A38", +"C c #828676", +"D c #262223", +"E c #4E6682", +"F c #828A72", +"G c #626A68", +"H c #0E0909", +"I c #151E1A", +"J c #9AA28A", +"K c #6E786E", +"L c #666666", +"M c #8E8E8E", +"N c #929E8A", +"O c #92A6B6", +"P c #828F7D", +"Q c #29342F", +"R c #DAD6DA", +"S c #464F46", +"T c #8E968A", +"U c #AEB5B0", +"V c #827A72", +"W c #768574", +"X c #B2BABA", +"Y c #7A8E77", +"Z c #3E423E", +"` c #D2D6D5", +" . c #5A655E", +".. c #82967F", +"+. c #F1F2F2", +"@. c #6E866E", +"#. c #9AAA99", +"$. c #BEBEBF", +"%. c #466686", +"&. c #7A927B", +"*. c #7C7F7B", +"=. c #767E7A", +"-. c #C9CECC", +";. c #1E2626", +">. c #787068", +",. c #9EA28E", +"'. c #0A0507", +"). c #687671", +"!. c #8AA288", +"~. c #829A81", +"{. c #E2E6E3", +"]. c #364644", +"^. c #667A65", +"/. c #5A6E5A", +"(. c #263A36", +"_. c #171615", +":. c #898A8A", +"<. c #5B5A5A", +"[. c #555654", +"}. c #A6A6A6", +"|. c #1C1E1C", +"1. c #7C867E", +"2. c #B2B2B2", +"3. c #BEC2C0", +"4. c #362E32", +"5. c #2E3631", +"6. c #889692", +"7. c #32463E", +"8. c #364A46", +"9. c #9EA292", +"0. c #060708", +"a. c #313E3C", +"b. c #667267", +"c. c #96A795", +"d. c #4D4E4C", +"e. c #889284", +"f. c #9A9A99", +"g. c #828671", +"h. c #3E524E", +"i. c #727E76", +"j. c #2E3A33", +"k. c #B6B6B6", +"l. c #A9AAAA", +"m. c #5A6A6A", +"n. c #646C70", +"o. c #3A4A45", +"p. c #D2D2D2", +"q. c #8C827E", +"r. c #929292", +"s. c #F5F6F6", +"t. c #768A86", +"u. c #7E8E84", +"v. c #6E826C", +"w. c #BABABA", +"x. c #9E9E8E", +"y. c #A2B2BE", +"z. c #616262", +"A. c #728A72", +"B. c #2E2D2D", +"C. c #526262", +"D. c #9AA296", +"E. c #8A9E87", +"F. c #828A84", +"G. c #5B5656", +"H. c #4C524E", +"I. c #060204", +"J. c #7E927B", +"K. c #3A463E", +"L. c #4D564D", +"M. c #4B5A57", +"N. c #828282", +"O. c #869A83", +"P. c #323A34", +"Q. c #728278", +"R. c #6A6662", +"S. c #454645", +"T. c #32423E", +"U. c #969697", +"V. c #625C56", +"W. c #526652", +"X. c #6A869A", +"Y. c #6A726D", +"Z. c #5E6A5E", +"`. c #5A5054", +" + c #CECECE", +".+ c #8A8E7E", +"++ c #768A73", +"@+ c #92AA90", +"#+ c #6A7E69", +"$+ c #C2C6C4", +"%+ c #6A7A68", +"&+ c #726A6A", +"*+ c #272627", +"=+ c #707270", +"-+ c #728670", +";+ c #1A221E", +">+ c #858685", +",+ c #9EA2A4", +"'+ c #D6D6D6", +")+ c #DEDEDE", +"!+ c #191A19", +"~+ c #8EA28A", +"{+ c #9E9E9E", +"]+ c #4E4E56", +"^+ c #DEDADE", +"/+ c #5E5E5E", +"(+ c #56665E", +"_+ c #667272", +":+ c #859686", +"<+ c #CACACA", +"[+ c #121616", +"}+ c #3E3E3E", +"|+ c #AAB2BE", +"1+ c #6E7E6F", +"2+ c #92A690", +"3+ c #4E4A4B", +"4+ c #323631", +"5+ c #5A6A62", +"6+ c #E6E6E6", +"7+ c #929A98", +"8+ c #7C8E7E", +"9+ c #C2C2C2", +"0+ c #3E4E4E", +"a+ c #424E44", +"b+ c #888E8B", +"c+ c #8E9296", +"d+ c #9EAEAA", +"e+ c #3A423D", +"f+ c #3E3A3E", +"g+ c #5F6661", +"h+ c #3A4643", +"i+ c #16221F", +"j+ c #627266", +"k+ c #5A6A5B", +"l+ c #E6E2E6", +"m+ c #969A8A", +"n+ c #1E221E", +"o+ c #C6C6C7", +"p+ c #0A0A0A", +"q+ c #525252", +"r+ c #3E4640", +"s+ c #4A4647", +"t+ c #121211", +"u+ c #4E5E4E", +"v+ c #4A5E56", +"w+ c #465252", +"x+ c #2C3A3A", +"y+ c #6B6A6A", +"z+ c #323A3A", +"A+ c #3E4A42", +"B+ c #A2A2A2", +"C+ c #93A196", +"D+ c #7A7276", +"E+ c #626E65", +"F+ c #DADADA", +"G+ c #BEBABE", +" J V d.q.) x z G.q+S.e+L.Y.1.o l.k.$+ +p.'+p.p.<+$.u {+b+=.G a+x+a.a.a.K.d.h+7 T.- H ", +" v+,.>.G.~ 4 x 4 e 7+3.f = 6+l+f )+)+)+' F+R F+R '+'+p.'+^+^+' )+` 2.e._+A+S | v x+(.H ", +" M.; &+S V.K 2.= i i i = = 6+l+0 R '+p.9+9+<+'+9+o+'+9+'+0 ' ' ^+' F+)+' F+3.b+7.x+(.H ", +" h.; R.e.i F+F+= = = 6+6+6+f {.R.c >+) y q+3+/+:.<.}.B.B+'+F+^+F+^+)+F+)+^+= 6+9+].1 8 ", +" p ,.z.X i '+F+= 6+= 6+f {.)+)+y f.;.q+/+z q+_ y+<.H./+z +F+F+F+)+)+^+)+F+6+= <+0+a.8 ", +" v+; <.$+= '+F+6+6+6+6+6+f f )+R ^+p.p.<+<+ +'+-. + +p. +'+'+F+F+F+F+' F+F+f i +h.T.8 ", +" u+,.G.[ 6+p.'+6+{.{.f l+)+^+'+[ <+o+9+$.w.X G+k.G+G+9+9+$+-.` '+F+F+)+F+F+f i p.M.7.% ", +" C.,.+ F+f +w.P 1.K b. .u+v++ + u+{ { 3 j j+$ ^.^.< %+^.1+1+Q.%+1+W u.e.T [ +.p.C.T.8 ", +" (+x.H.)+' <+E+{ W.W.3 3 3 /./.j j+$ $ $ ^.< #+#+#+h v.@.-+-+A.++Y b &.8+J.( s.p. .].t+ ", +" } x.p {.R $. .{ W.W.W.} 3 3 k+/.j $ $ $ ^.$ < #+#+#+h v.@.A.++A.++Y Y &.J.U +.F+G ].[+D ", +" .> S {.p.$.{ { { W.3 3 /././.j /.j $ $ ^.^.< #+#+#+h -+-+-+++b ++b J.&.J.r s.0 E+7.[+q+ ", +" 3 > h.= +2.} { W.} 3 3 3 /././.$ $ $ $ $ ^.^.#+#+v.v.-+A.Y ++J.J...J.J.: , s.F+Y.h+[+3+ ", +" k+> A+6+<+u W.W.W.W.3 /././.j j j $ ^.^.%+%+#+h h -+v.-+-+++E+:+-+F.: : ..k +.F+Y.].5 s+ ", +" E+^ 4 {.$+}.W.3 3 3 k+/./.j j j $ $ $ ^.< #+#+#+H.!++ ++++b j+l e.;.1+....#.s.^+=+].!+| ", +" E+^ a+{.9+{+{ 3 3 } P.A+r+S g+r+r+P.+ v.u+c r+^.a+I.) Z.S Q.j+_.F n+K ....#.s.^+=+x !+| ", +" j+^ K.l+6 {+W.3 3 P.. D . 8 d.. |.I.'.g+. *+'.p+) . z _.I.e.y I 1.Q *...O.c.s.' y 7.!+| ", +" j ^ o.f $.f.W.k+k+B . >.8 8 3+. H._.0.q+I.w !+. `.. I . 4+N C.|.).l *...~.C++.F+).].I | ", +" b..+r+F+6 U.W././.B . R.8 8 z . [.[+0.q+. R._.I.[.. . . _ : T.l /+% :+! O.2++.0 y 7.i+S. ", +" Q.^ r+p.$.c+W././.B . n.8 8 3+. G.t+'.3+I.y+_.. G.I.. . g+:+n+}+]+8 D.! O.c.i '+n.].i+S. ", +" t..+K.<+3.M W././.4+. _+8 8 3+. [._.'.3+I.y+!+I.<.I.. . *+E.8 S.c _.c.! ! C+s.` m.8.|.| ", +" ++2 r+3.$+:.3 j j B . e 8 8 z . [._.'.]+I.y+_.. G.. e+0.. 1.% }+a.t+D.!.! C+s.[ C.8.& s+ ", +" J.2 4 U <+b+W./.j B I.*+0.8 3+. [._.0./ . D 0.0.V.. H.4+. B I l H.'.o E.!.c.+.<+M.].i+z ", +" A.F r+#.-.:./.j $ K 4 s+. 8 Q.w F.Y.K T E+s+q+>+1.w F.Q.&+D+*._+O. .#.~+!.#.s.<+h.].i+3+ ", +" &.>+e+7+p.:./.j j .p+p+I.B P v.v.v.Q.-+++++++Y Y Y J.....~.~.! O.E.!.!.!.d+s.9+o.].i+d. ", +" : C ].s ` >+b.j $ %+%+Y.K P h h v.@.-+-+++Y Y Y J.&.J.......~.! ! !.!.~+~+r +.w.x 8.i+]+ ", +" 8+g.Z i.^+N.^.j j ^.^.%+%+#+v.v.@.-+-+A.++b b &.&.: : : O.! O.! E.E.~+# # U +.2.x+h+& ) ", +" ..g.Z E+)+N.%+/./.$ ^.< #+#+v.v.-+A.++++++Y Y J.J.......~.! E.!.~+~+~+# @+6 i }.a.8.& q+ ", +" ..g.e++ )+>+%+j $ $ ^.#+#+v.v.-+@.-+++b b Y &.&.J.: ..~.O.E.! E.!.!.# # 2+t = U.a.h+;+q+ ", +" ..g.T.o.)+:.K j $ ^.^.#+#+v.v.-+-+-+++++b Y Y &.J.: ..~.~.O.! ! !.~+# @+@+ +)+N.T.7.;+[. ", +" 6.q a.c +r.y j $ $ < #+h #+v.v.-+A.A.Y ++Y &.J.&.: ~...O.! ! E.E.!.# # @+' ' ).T.o.& G. ", +" e.q a.x 2.}.w j $ $ < #+h v.-+@.-+++A.Y b Y &.J.: : ~.~.O.! !.!.~+~+# 2+# {.[ g 7.].& <. ", +" ..q P.T.{+$._ i.v.Q.v.v.v.@.@.A.++A.++b &.J.J.: ....O.! ! E.! ~+# 2+c.@+, s.$+h.].h+n+<. ", +" o g.P.P.1. +w. +{.= {.' ` -.6 ( #.C+T ..J.J.J...E.~+#.U 6 $+-.-.[ p.p.'++.= X ] ].].n+D ", +" q j.P.G R $.p.f f )+F+[ <+ +<+p.'+' )+f {.6+6+6+6+f ' p.[ <+ +<+<+ +'+F+-.u 1 e+K.n+ ", +" q 5.4+A+R w.X G+$.3.o+<+-.p.p.p. +p. +p.'+R ^+)+f )+F+'+` + +-.<+o+<+o+o+M j.h+].n+ ", +" g.j.j.P.G+k.u 2.u u u u l.u l.2.k.$.o+o+ + +<+<+9+$.$.9+9+o+o+o+o+o+9+$.k.g+x K.K.;+ ", +" F j.P.a.B.| <.z._ {+}.l.}.l.}.}.}.}.l.l.x.{+l.2.w.$.$.$.$.$.$.$.l._ q+S.Q [+x e+e+n+ ", +" q 5.5.4+l -.)+<+B+e /+>+B+B+B+B+B+}.f.<.e e q+U.2.k.w.$.$.G+r.q+/ r.G+o+{+;.x x o.;+ ", +" q 5.5.5.P.l.[ |+p.R p.M <.M {+B+{+{+<. + + +9+[.x.k.k.w.}.[.N.$+<+o+u r.e B.x x K.;+ ", +" q j.j.Q B w '+O a @ F+'+<+R.U.{+B+z.w.9+2.l.G+2.<.u w.k.L o+ + +$+s d ,+| T.].e+e+;+ ", +" g.5.P.5.5.B $+p.m 9 A 9+3.{+:.f.U._ 2.B+4.;.U.u _ M 2.u B+3.3.k.%.E ,+:.l e+].h+r+;+ ", +" q 4+Q Q 4+a._ ` -.d+X.l.{+_ f.{+L u }.U.C M :.B+2.z.2.w.r.B+l.l.s }.{+]+a.].h+h+K.|. ", +" F P.5.5.4+5.c G+o+w.B+b+y {+f.f.y $.2.u l.u 2.u k.y+}.k.G+>+:.f.{+{+>+Q Z h+h+h+h+;+ ", +" F B Q 4+4+4+j.z.9+2.>+*.{+r.r.M :.$.o+<+ + +<+o+9+r.N.u k.w.c+*.f.U.| x e+e+r+r+A+I "}; diff --git a/Docs/examples/logos/gnokii2.nol b/Docs/examples/logos/gnokii2.nol new file mode 100644 index 0000000000000000000000000000000000000000..03e92cb53157bd8e2d6ed131a2cc4dd74f52cd5d GIT binary patch literal 1028 zcmbV|(GkKx2t-K({@R9i;YUU-#I9{b*o7n9csS!_5@3OMko#koO +# Based on the gnokii (http://www.gnokii.org/) sources + +# GSM Operator Logos - NOL +0 string NOL GSM Operator Logo, NOL format +>10 byte x (size %d x +>12 byte x %d) +# GSM Caller Icons - NGG +0 string NGG GSM Caller Icon, NGG format +>6 byte x (size %d x +>8 byte x %d) diff --git a/Docs/examples/netmon/netmonitordata_6110_433.dat b/Docs/examples/netmon/netmonitordata_6110_433.dat new file mode 100644 index 0000000..442bb2a --- /dev/null +++ b/Docs/examples/netmon/netmonitordata_6110_433.dat @@ -0,0 +1,455 @@ +# GNOKII NETMONITOR PARAMETERS specifications +# (pretty on screen large at least 112 columns) +# +# data in this file are specific to: NOKIA 6110 NSE-3 v4.33 11-03-98 +# +# format of definition of SCREEN +# SCREEN=screen-number:optional-description (separator may be also tab, or spaces) +# +# SCREEN entry may be duplicated, order is not important, we use "test nr" +# screen number must be between 1 and 255 +# +# format of definition of PARAMETERS +# VAR=X:Y:LEN:NMman:TYPE:DESCRIPTION +# (separator may be also tab, or spaces) +# VAR: is name of parameter, it should be as you can see by pressing '*' key +# on phone, from inside a netmonitor menu. +# X,Y: are coordinates x & y, start form 0, 0, upper-left corner. +# LEN: must be specified, and must not be 0. +# NMman: name as referrred in NetMonitor manuals from Marcin Wiacek, +# TYPE : optional, default (predefined), is string, +# else may be D as Decimal or H as Hexadecimal, '-' as predefined. +# so, no matter what you get from phone, on command line parameters +# you can specify if uou want Hex or you want Dec. +# Example is LAC/CID that may be HEX or DEC depending on firmware version. +# TYPE refer to how data is displayed by phone, not to program output! +# DESCRIPTION: description of parameters (optional) +# +# Either Type and Description are optional, so, for parsing reason +# if you want specify Description but not Type, you MUST specify '-' as Type +# no conversions are made in this case. +# +# VAR name implies two problems: +# 1-some parameters can be in more then one screen (example H value) +# so we had changed some names. +# +# 2-some screen report channel parameters, once for every channel +# (example C2, screen 1, 3, 4, 5) +# so we had changed some names also here. +# +# We check duplicate names, data len, presence of netmon man name, ... +# Changed names are described near each interested parameters. +# +# Here we have adopted some convention, as described in comments, if you don't like it +# you can change VAR names in this file and use coherents name on command line. +# +# Order of parameters definition is relevant only for human readability. +# We allow max 512 parameters definition and max 255 screens, +# (defineds in gnokii.h NM_MAX_FIELDS, NM_MAX_SCREENS) +# +# ATTENTION: all names are case sensitive! SCREEN def must be uppercase +# ATTENTION: some firmware versions has some bugs (check screen 34, 38 here) +# in this file all at right of '#' are comments, even if " # enquoted " +# +# Have a lot of fun! +# +# Andrea Scopece, a.scopece@tin.it, 22-08-2000 + +SCREEN 0 Host Date-Time +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +DATE 0 0 10 0 - - Host Date # host date +TIME 0 1 8 0 - - Host Time # host time +#PDATE 0 0 0 0 - - Phone Date # phone date (NOT IMPLEMENTED) +#PTIME 0 0 0 0 - - Phone Time # phone time (NOT IMPLEMENTED) + +# USERS SHOULD NOT CHANGE SCREEN 0 DEFINITIONS, IT REFERS A HOST PARAMETER, NOT PHONE !!!! + +SCREEN 1 Communication with Cell +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +H 0 0 1 1 a # H, changed in screen 2, 7 +CH 1 0 3 1 bbb - Channel +RxL 5 0 3 1 ccc - RxLevel(dB) +TxPwr 9 0 3 1 ddd - TxPower(dBm) +TS 1 1 1 1 e - Time Slot +TA 3 1 2 1 ff - Time advance +RQ 6 1 1 1 g +RLT 8 1 4 1 mmmm +C1 1 2 3 1 nnn +C2 9 2 3 1 ppp +CHT 4 3 4 1 oooo + + +SCREEN 2 More info about used Cell +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +PM 1 0 2 2 aa +RAR 4 0 2 2 b +Ro 6 0 1 2 c +BC 9 0 3 2 Bdd +RelR 1 1 2 2 ee +QLF 6 1 1 2 f + +SCREEN 3 Info about current and neighbor cells (1-2) +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +SCH 0 0 3 3 aaa # SCH, changed in screen 11, 66 +0C1 3 0 3 3 bbb # was C1, conflict this and other screen +0rx 6 0 3 3 ccc # was rx, conflict this and other screen +0C2 9 0 3 3 ddd # was C2, conflict this and other screen + +1CH 0 1 3 3 aaa +1C1 3 1 3 3 bbb # idem as above ... +1rx 6 1 3 3 ccc # idem as above ... +1C2 9 1 3 3 ddd # idem as above ... + +2CH 0 2 3 3 aaa +2C1 3 2 3 3 bbb # idem as above ... +2rx 6 2 3 3 ccc # idem as above ... +2C2 9 2 3 3 ddd # idem as above ... + +1N 4 3 2 3 ef +2N 7 3 2 3 gh + + +SCREEN 4 Info about neighbor cells (3-4-5) +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +3CH 0 0 3 4 aaa +3C1 3 0 3 4 bbb +3rx 6 0 3 4 ccc +3C2 9 0 3 4 ddd + +4CH 0 1 3 4 aaa +4C1 3 1 3 4 bbb +4rx 6 1 3 4 ccc +4C2 9 1 3 4 ddd + +5CH 0 2 3 4 aaa +5C1 3 2 3 4 bbb +5rx 6 2 3 4 ccc +5C2 9 2 3 4 ddd + +3N 2 3 2 4 ef +4N 5 3 2 4 gh +5N 8 3 2 4 ij + + +SCREEN 5 Info about neighbor cells (6-7-8) +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +6CH 0 0 3 5 aaa +6C1 3 0 3 5 bbb +6rx 6 0 3 5 ccc +6C2 9 0 3 5 ddd + +7CH 0 1 3 5 aaa +7C1 3 1 3 5 bbb +7rx 6 1 3 5 ccc +7C2 9 1 3 5 ddd + +8CH 0 2 3 5 aaa +8C1 3 2 3 5 bbb +8rx 6 2 3 5 ccc +8C2 9 2 3 5 ddd + +6N 2 3 2 5 ef +7N 5 3 2 5 gh +8N 8 3 2 5 ij + + +SCREEN 6 Preferred and forbidden networks +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +LReg 0 0 5 6 aaabb +1_Pre 0 1 5 6 aaabb +2_Pre 0 2 5 6 aaabb +3_Pre 0 3 5 6 aaabb + +1_For 7 0 5 6 aaabb +2_For 7 1 5 6 aaabb +3_For 7 2 5 6 aaabb +4_For 7 3 5 6 aaabb + + +SCREEN 7 Info about last monitored cell +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +E 0 1 1 7 a +A 2 1 1 7 b +Ho 4 1 1 7 c # was H, conflict screen 1, 2 +C 6 1 1 7 d +I 8 1 1 7 e +BR 10 1 2 7 fg + +SCREEN 8 NO TEST +SCREEN 9 NO TEST +SCREEN 9 NO TEST + +SCREEN 10 "Network information (last monitored cell) +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +TMSI 4 0 8 10 aaaaaaaa H +T3212 5 1 7 10 bbb-ccc +PaRP 4 2 1 10 d +DSF 7 2 2 10 ee +AGC 10 2 2 10 ff +AFC 1 3 5 10 ggggg +Ch 9 3 3 10 hhh + +SCREEN 11 Cell identification +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +MCC 3 0 3 11 xxx +MNC 9 0 2 11 xxx +LAC 6 1 4 11 xxx H +sch 7 2 3 11 xxx # was SCH, conflict in screen 3, 66 +CID 6 3 4 11 xxx H + +SCREEN 12 Network parameters +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +Cipher 8 0 3 12 aaa +Hopping 8 1 3 12 bbb +DTX 8 2 3 12 ccc +IMSI 8 3 3 12 ddd + +SCREEN 13 Info DTX / Network +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +DTXMode 0 0 10 13 aaaaaaaaaa +DTX_Def 9 1 3 13 bbb +DTX_BS 9 2 3 13 ccc + +SCREEN 14 NO TEST +SCREEN 15 NO TEST +SCREEN 16 NO TEST + +SCREEN 17 BTS channel test +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +BTS 4 2 3 17 aaa + +SCREEN 18 NO TEST + +SCREEN 19 Cell selection +CBARR 2 2 8 19 aaaaaaaa + +SCREEN 20 Battery and phone charger mode +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +BatVol 1 0 3 20 aaa +ChMod 6 0 5 20 bbbbb +BTemp 2 1 3 20 ccc +ChTime 8 1 3 20 ddd +ChrgVol 2 2 3 20 eee +Pwm 8 2 3 20 fff +BTyp 1 3 4 20 gggg +BFDC 7 3 4 20 hhhh + +SCREEN 21 Charger parameters +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +MTDif 1 0 4 21 aaaa +MPDif 7 0 4 21 bbbb +BUpV 2 1 3 21 ccc +BDownV 8 1 3 21 ddd +AverV 2 2 3 21 eee +SumMF 8 2 3 21 fff + +SCREEN 22 Charger parameters and indicators +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +DeriC 1 0 4 22 aaaa +ChAm 7 0 4 22 bbbb +Vdif 1 1 4 22 cccc +VDrop 7 1 4 22 dddd +VDTi 1 2 4 22 eeee +AvDif 7 2 4 22 ffff +Temp 1 3 4 22 gggg +Volt 7 3 4 22 hhhh + +SCREEN 23 Battery full detection +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +TxOn 1 0 4 23 aaaa +TxOff 7 0 4 23 bbbb +ChCur 1 1 4 23 cccc +Stdby 7 1 4 23 dddd +Age 0 2 3 23 eee +CAP 4 2 3 23 fff +Curr 8 2 4 23 gggg +Tmp 0 3 3 23 hhh +CmAh 4 3 4 23 iiii +Targ 8 3 4 23 jjjj + +SCREEN 24 NO TEST +SCREEN 25 NO TEST +SCREEN 26 NO TEST +SCREEN 27 NO TEST +SCREEN 28 NO TEST +SCREEN 29 NO TEST +SCREEN 30 NO TEST +SCREEN 31 NO TEST +SCREEN 32 NO TEST +SCREEN 33 NO TEST +SCREEN 34 NO TEST + +SCREEN 35 Last reboot +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +ResetReason 1 0 5 35 aaaaa +TaskName 1 1 8 35 bbbbbbbb + +SCREEN 36 Info about rebootings +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +UN 1 0 2 36 aa +WD 5 0 2 36 bb +DSP 9 0 2 36 cc +SIM 1 1 2 36 dd +IDL 5 1 2 36 ee +STK 9 1 2 36 ff + +SCREEN 37 NO TEST +SCREEN 38 NO TEST + +SCREEN 39 Last connection status +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +CC 7 0 2 39 aa # CC, changed in screen 85 +MM 7 1 2 39 bb # MM, changed in screen 86 +RR 7 2 2 39 cc # RR, changed in screen 86 + +SCREEN 40 Reset Handover Counters # only for manual reset + +SCREEN 41 Info about handover +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +HandOOK 9 0 3 41 aaa +PrevCh 9 1 3 41 bbb +HoNotOK 9 2 3 41 ccc +HoIntra 9 3 3 41 ddd + +SCREEN 42 NO TEST + +SCREEN 43 T200 counter expired +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +T200MS 9 0 3 43 aaa +T200BS 9 1 3 43 bbb + +SCREEN 44 NO TEST +SCREEN 45 NO TEST +SCREEN 46 NO TEST +SCREEN 47 NO TEST +SCREEN 48 NO TEST +SCREEN 49 NO TEST +SCREEN 50 NO TEST +SCREEN 51 NO TEST +SCREEN 52 NO TEST +SCREEN 53 NO TEST + +SCREEN 54 Info about memory block free +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +ResF1 1 0 5 54 aa-bb # split these, if you like ... +ResF2 7 0 5 54 aa-bb +ResF3 1 1 5 54 aa-bb +ResF4 7 1 5 54 aa-bb +ResF5 1 2 5 54 aa-bb +ResF6 7 2 5 54 aa-bb +ResF7 1 3 5 54 aa-bb +ResF8 7 3 5 54 aa-bb + +SCREEN 55 NO TEST + +SCREEN 56 Block display +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +Ptr 1 0 6 56 aaaaaa +Cntr 9 0 3 56 bbb +Task 1 1 8 56 cccccccc + +SCREEN 57 Memory status before reset +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +StatusOfStacks1 0 0 12 57 aaaaaaaaaaaa # You really need this ? +StatusOfStacks2 0 1 12 57 aaaaaaaaaaaa # This is a composite field 1,2,3 +StatusOfStacks3 0 2 2 57 aa # but if you want ... +BlockSets 0 3 8 57 bbbbbbbb + +SCREEN 58 NO TEST +SCREEN 59 NO TEST + +SCREEN 60 Reset counters + +SCREEN 61 Counters +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +NOPSW 8 0 4 61 aaaa H +SYNCR 8 1 4 61 bbbb H # SYNCR, changed on screen 62 +RESEL 8 2 4 61 cccc H + +SCREEN 62 Counters +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +PSW 7 0 4 62 aaaa H +SYNCRm 7 1 4 62 bbbb H # was SYNCR, conflict in screen 61 +BCCH 7 2 4 62 cccc H +BCCHE 7 3 4 62 dddd H + +SCREEN 63 Call counters +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +CalRel 3 0 2 63 aa +RelDi 9 0 2 63 bb +MOCAtmp 2 1 3 63 ccc +MOOK 8 1 3 63 ddd # MOOK, changed in screen 65 +AllMT 2 2 3 63 eee +MTOK 8 2 3 63 fff # MTOK, changed in screen 65 + +SCREEN 64 NO TEST +SCREEN 65 NO TEST +SCREEN 66 NO TEST +SCREEN 67 NO TEST +SCREEN 68 NO TEST +SCREEN 69 NO TEST + +SCREEN 70 (unknown) + +SCREEN 71 NO TEST +SCREEN 72 NO TEST +SCREEN 73 NO TEST +SCREEN 74 NO TEST +SCREEN 75 NO TEST +SCREEN 76 NO TEST +SCREEN 77 NO TEST +SCREEN 78 NO TEST +SCREEN 79 NO TEST +SCREEN 80 NO TEST +SCREEN 81 NO TEST +SCREEN 82 NO TEST + +SCREEN 83 Show Task Stacks + +SCREEN 84 status ... ?? +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +IDLE 1 0 4 84 aaaa +DEV_IO 6 0 4 84 bbbb +LOCAL 1 1 4 84 cccc +MDISND 6 1 4 84 dddd +MDIRCV 1 2 4 84 eeee +UI 6 2 4 84 ffff +TONE 1 3 4 84 gggg +PN 6 3 4 84 hhhh + +SCREEN 85 Connection info ?? +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +IRDA 1 0 4 85 aaaa +FBUS 6 0 4 85 bbbb +AUD 1 1 4 85 cccc +L1CTRL 6 1 4 85 dddd +L1MEA 1 2 4 85 eeee +L1SYSP 6 2 4 85 ffff +L2 1 3 4 85 gggg +CCC 6 3 4 85 hhhh # was CC, conflict screen 39 + +SCREEN 86 Memories status +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +MMM 1 0 4 86 aaaa # was MM, conflict screen 39 +RRR 6 0 4 86 bbbb # was RR, conflict screen 39 +RM 1 1 4 86 cccc +SMS 6 1 4 86 dddd +EM 1 2 4 86 eeee +SIMUPL 6 2 4 86 ffff +SIML2 1 3 4 86 gggg +DDI 6 3 4 86 hhhh + +SCREEN 87 OS system stack +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +FIQ 2 0 3 87 aaa +IRQ 7 0 3 87 bbb + +SCREEN 88 Phone Hw/Firmware info 1 +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +MCUSW 0 0 5 88 aaaaa +PPM 6 0 6 88 bbbbbb +MCUDate 6 1 6 88 cccccc +ChkSum 7 2 4 88 dddd H +DSPVer 0 3 12 88 eeeeeeeeeeee + +SCREEN 89 NO TEST diff --git a/Docs/examples/netmon/netmonitordata_6150_413.dat b/Docs/examples/netmon/netmonitordata_6150_413.dat new file mode 100644 index 0000000..27a7cb6 --- /dev/null +++ b/Docs/examples/netmon/netmonitordata_6150_413.dat @@ -0,0 +1,600 @@ +# GNOKII NETMONITOR PARAMETERS specifications +# (pretty on screen large at least 112 columns) +# +# data in this file are specific to: NOKIA 6150 NSM-1 v4.13 +# +# format of definition of SCREEN +# SCREEN=screen-number:optional-description (separator may be also tab, or spaces) +# +# SCREEN entry may be duplicated, order is not important, we use "test nr" +# screen number must be between 1 and 255 +# +# format of definition of PARAMETERS +# VAR=X:Y:LEN:NMman:TYPE:DESCRIPTION +# (separator may be also tab, or spaces) +# VAR: is name of parameter, it should be as you can see by pressing '*' key +# on phone, from inside a netmonitor menu. +# X,Y: are coordinates x & y, start form 0, 0, upper-left corner. +# LEN: must be specified, and must not be 0. +# NMman: name as referrred in NetMonitor manuals from Marcin Wiacek, +# TYPE : optional, default (predefined), is string, +# else may be D as Decimal or H as Hexadecimal, '-' as predefined. +# so, no matter what you get from phone, on command line parameters +# you can specify if uou want Hex or you want Dec. +# Example is LAC/CID that may be HEX or DEC depending on firmware version. +# TYPE refer to how data is displayed by phone, not to program output! +# DESCRIPTION: description of parameters (optional) +# +# Either Type and Description are optional, so, for parsing reason +# if you want specify Description but not Type, you MUST specify '-' as Type +# no conversions are made in this case. +# +# VAR name implies two problems: +# 1-some parameters can be in more then one screen (example H value) +# so we had changed some names. +# +# 2-some screen report channel parameters, once for every channel +# (example C2, screen 1, 3, 4, 5) +# so we had changed some names also here. +# +# We check duplicate names, data len, presence of netmon man name, ... +# Changed names are described near each interested parameters. +# +# Here we have adopted some convention, as described in comments, if you don't like it +# you can change VAR names in this file and use coherents name on command line. +# +# Order of parameters definition is relevant only for human readability. +# We allow max 512 parameters definition and max 255 screens, +# (defineds in gnokii.h NM_MAX_FIELDS, NM_MAX_SCREENS) +# +# ATTENTION: all names are case sensitive! SCREEN def must be uppercase +# ATTENTION: some firmware versions has some bugs (check screen 34, 38 here) +# in this file all at right of '#' are comments, even if " # enquoted " +# +# Have a lot of fun! +# +# Andrea Scopece, a.scopece@tin.it, 22-08-2000 + +SCREEN 0 Host Date-Time +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +DATE 0 0 10 0 - - Host Date # host date +TIME 0 1 8 0 - - Host Time # host time +#PDATE 0 0 0 0 - - Phone Date # phone date (NOT IMPLEMENTED) +#PTIME 0 0 0 0 - - Phone Time # phone time (NOT IMPLEMENTED) + +# USERS SHOULD NOT CHANGE SCREEN 0 DEFINITIONS, IT REFERS A HOST PARAMETER, NOT PHONE !!!! + +SCREEN 1 Communication with Cell +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +H 0 0 1 1 a # H, changed in screen 2, 7 +CH 1 0 3 1 bbb - Channel +RxL 5 0 3 1 ccc - RxLevel(dB) +TxPwr 9 0 3 1 ddd - TxPower(dBm) +TS 1 1 1 1 e - Time Slot +TA 3 1 2 1 ff - Time advance +RQ 6 1 1 1 g +RLT 8 1 4 1 mmmm +C1 1 2 3 1 nnn +C2 9 2 3 1 ppp +CHT 4 3 4 1 oooo + + +SCREEN 2 More info about used Cell +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +PM 1 0 2 2 aa +RAR 4 0 2 2 b +Ro 6 0 1 2 c +BC 9 0 3 2 Bdd +RelR 1 1 2 2 ee +QLF 6 1 1 2 f +CRO 1 2 3 2 ggg +TO 5 2 2 2 hh +PenT 8 2 3 2 iii +H2 1 3 3 2 j # was H, conflict screen 1 +MAIO 5 3 2 2 mm +HSN 8 3 2 2 nn + + +SCREEN 3 Info about current and neighbor cells (1-2) +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +SCH 0 0 3 3 aaa # SCH, changed in screen 11, 66 +0C1 3 0 3 3 bbb # was C1, conflict this and other screen +0rx 6 0 3 3 ccc # was rx, conflict this and other screen +0C2 9 0 3 3 ddd # was C2, conflict this and other screen + +1CH 0 1 3 3 aaa +1C1 3 1 3 3 bbb # idem as above ... +1rx 6 1 3 3 ccc # idem as above ... +1C2 9 1 3 3 ddd # idem as above ... + +2CH 0 2 3 3 aaa +2C1 3 2 3 3 bbb # idem as above ... +2rx 6 2 3 3 ccc # idem as above ... +2C2 9 2 3 3 ddd # idem as above ... + +1N 4 3 2 3 ef +2N 7 3 2 3 gh + + +SCREEN 4 Info about neighbor cells (3-4-5) +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +3CH 0 0 3 4 aaa +3C1 3 0 3 4 bbb +3rx 6 0 3 4 ccc +3C2 9 0 3 4 ddd + +4CH 0 1 3 4 aaa +4C1 3 1 3 4 bbb +4rx 6 1 3 4 ccc +4C2 9 1 3 4 ddd + +5CH 0 2 3 4 aaa +5C1 3 2 3 4 bbb +5rx 6 2 3 4 ccc +5C2 9 2 3 4 ddd + +3N 2 3 2 4 ef +4N 5 3 2 4 gh +5N 8 3 2 4 iJ + + +SCREEN 5 Info about neighbor cells (6-7-8) +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +6CH 0 0 3 5 aaa +6C1 3 0 3 5 bbb +6rx 6 0 3 5 ccc +6C2 9 0 3 5 ddd + +7CH 0 1 3 5 aaa +7C1 3 1 3 5 bbb +7rx 6 1 3 5 ccc +7C2 9 1 3 5 ddd + +8CH 0 2 3 5 aaa +8C1 3 2 3 5 bbb +8rx 6 2 3 5 ccc +8C2 9 2 3 5 ddd + +6N 2 3 2 5 ef +7N 5 3 2 5 gh +8N 8 3 2 5 iJ + + +SCREEN 6 Preferred and forbidden networks +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +LReg 0 0 5 6 aaabb +1_Pre 0 1 5 6 aaabb +2_Pre 0 2 5 6 aaabb +3_Pre 0 3 5 6 aaabb + +1_For 7 0 5 6 aaabb +2_For 7 1 5 6 aaabb +3_For 7 2 5 6 aaabb +4_For 7 3 5 6 aaabb + + +SCREEN 7 Info about last monitored cell +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +E 0 1 1 7 a +A 2 1 1 7 b +Ho 4 1 1 7 c # was H, conflict screen 1, 2 +C 6 1 1 7 d +I 8 1 1 7 e +BR 10 1 2 7 fg + +ECSC 2 3 1 7 h +2Ter 7 3 1 7 i +MB 11 3 1 7 j + +SCREEN 8 NO TEST +SCREEN 9 NO TEST +SCREEN 9 NO TEST + +SCREEN 10 "Network information (last monitored cell) +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +TMSI 4 0 8 10 aaaaaaaa H +T3212 5 1 7 10 bbb-ccc +PaRP 4 2 1 10 d +DSF 7 2 2 10 ee +AGC 10 2 2 10 ff +AFC 1 3 5 10 ggggg +Ch 9 3 3 10 hhh + +SCREEN 11 Cell identification +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +MCC 3 0 3 11 xxx +MNC 9 0 2 11 xxx +LAC 5 1 5 11 xxx D +sch 7 2 3 11 xxx # was SCH, conflict in screen 3, 66 +CID 5 3 5 11 xxx D + +SCREEN 12 Network parameters +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +Cipher 8 0 3 12 aaa +Hopping 8 1 3 12 bbb +DTX 8 2 3 12 ccc +IMSI 8 3 3 12 ddd + +SCREEN 13 Info DTX / Network +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +DTXMode 0 0 10 13 aaaaaaaaaa +DTX_Def 9 1 3 13 bbb +DTX_BS 9 2 3 13 ccc + +SCREEN 14 NO TEST +SCREEN 15 NO TEST +SCREEN 16 NO TEST + +SCREEN 17 BTS channel test +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +BTS 4 2 3 17 aaa + +SCREEN 18 Lights status +LIGHTS 4 2 3 18 aaa + +SCREEN 19 Cell selection +CBARR 2 2 8 19 aaaaaaaa + +SCREEN 20 Battery and phone charger mode +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +BatVol 1 0 3 20 aaa +ChMod 6 0 5 20 bbbbb +BTemp 2 1 3 20 ccc +ChTime 8 1 3 20 ddd +ChrgVol 2 2 3 20 eee +Pwm 8 2 3 20 fff +BTyp 1 3 4 20 gggg +BFDC 7 3 4 20 hhhh + +SCREEN 21 Charger parameters +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +MTDif 1 0 4 21 aaaa +MPDif 7 0 4 21 bbbb +BUpV 2 1 3 21 ccc +BDownV 8 1 3 21 ddd +AverV 2 2 3 21 eee +SumMF 8 2 3 21 fff + +SCREEN 22 Charger parameters and indicators +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +DeriC 1 0 4 22 aaaa +ChAm 7 0 4 22 bbbb +Vdif 1 1 4 22 cccc +VDrop 7 1 4 22 dddd +VDTi 1 2 4 22 eeee +AvDif 7 2 4 22 ffff +Temp 1 3 4 22 gggg +Volt 7 3 4 22 hhhh + +SCREEN 23 Battery full detection +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +TxOn 1 0 4 23 aaaa +TxOff 7 0 4 23 bbbb +ChCur 1 1 4 23 cccc +Stdby 7 1 4 23 dddd +Age 0 2 3 23 eee +CAP 4 2 3 23 fff +Curr 8 2 4 23 gggg +Tmp 0 3 3 23 hhh +CmAh 4 3 4 23 iiii +Targ 8 3 4 23 jjjj + +SCREEN 24 NO TEST +SCREEN 25 NO TEST +SCREEN 26 NO TEST +SCREEN 27 NO TEST +SCREEN 28 NO TEST +SCREEN 29 NO TEST + +SCREEN 30 Audio API registers +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +A1Cnf 1 0 4 30 aaaa +A2Cnf 6 0 4 30 bbbb +ST 1 1 4 30 cccc +AU3 6 1 4 30 dddd +1Tone 1 2 4 30 eeee +2Tone 6 2 4 30 ffff +Conf 1 3 4 30 gggg +HFVol 6 3 4 30 hhhh + + +SCREEN 31 NO TEST +SCREEN 32 NO TEST +SCREEN 33 NO TEST + +SCREEN 34 Info about connection type +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +CM 0 0 2 34 aa +LD 2 0 2 34 bb +LM 4 0 2 34 cc +NM 6 0 2 34 dd + +PEC 0 1 2 34 ee # Hmmf, hard to make this screen well defined ... +FEC 2 1 2 34 ff +OEC 4 1 2 34 gg +ACC 6 1 2 34 hh +RXS 8 1 2 34 iii + +inf 10 1 2 34 xxx # NEW PARAM, [P] when active infrared, +# # else [-] + # you can verify it only by phone + +TXS 12 1 2 34 jjj # ATT:this seems on line 2 but really + # is on x=12, y=1 + +Mod 0 2 3 34 k-m # ATT:this seems on line 3 but really + # is on x=0, y=2 + # Mod, changed in screen 75 + +SCREEN 35 Last reboot +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +ResetReason 1 0 5 35 aaaaa +TaskName 1 1 8 35 bbbbbbbb + +SCREEN 36 Info about rebootings +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +UN 1 0 2 36 aa +WD 5 0 2 36 bb +DSP 9 0 2 36 cc +SIM 1 1 2 36 dd +IDL 5 1 2 36 ee +STK 9 1 2 36 ff + +SCREEN 37 NO TEST + +SCREEN 38 Memory dump (firmware bug ?) +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +LINE1 0 0 53 38 aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa + # may be a bug, it return only line 0, len=53 + # this exceed --netmonitor Screen[50], so crash! + +SCREEN 39 Last connection status +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +CC 7 0 2 39 aa # CC, changed in screen 85 +MM 7 1 2 39 bb # MM, changed in screen 86 +RR 7 2 2 39 cc # RR, changed in screen 86 + +SCREEN 40 Reset Handover Counters # only for manual reset + +SCREEN 41 Info about handover +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +GGok 1 0 4 41 aaaa +DDok 7 0 4 41 bbbb +GDok 1 1 4 41 cccc +DGok 7 1 4 41 dddd + +GGf 0 2 3 41 aaa +DDf 3 2 3 41 bbb +GDf 6 2 3 41 ccc +DGf 9 2 3 41 ddd + +GGb 0 3 3 41 aaa +DDb 3 3 3 41 bbb +GDb 6 3 3 41 ccc +DGb 9 3 3 41 ddd + + +SCREEN 42 Info about intracell handover (broken ? all zeroes) +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment + +IGGok 1 0 4 42 aaaa +IDDok 7 0 4 42 bbbb +IGDok 1 1 4 42 cccc +IDGok 7 1 4 42 dddd + +IGGf 0 2 3 42 aaa +IDDf 3 2 3 42 bbb +IGDf 6 2 3 42 ccc +IDGf 9 2 3 42 ddd + +IGGb 0 3 3 42 aaa +IDDb 3 3 3 42 bbb +IGDb 6 3 3 42 ccc +IDGb 9 3 3 42 ddd + + +SCREEN 43 T200 counter expired +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +T200MS 8 0 4 43 aaaa +T200BS 8 1 4 43 bbbb + +SCREEN 44 NO TEST + +SCREEN 45 Trasmitter status +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +TRASM 2 2 8 45 aaaaaaaa + +SCREEN 46 NO TEST +SCREEN 47 NO TEST +SCREEN 48 NO TEST +SCREEN 49 NO TEST +SCREEN 50 NO TEST + +SCREEN 51 Info about SIM card +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +VSel 0 0 3 51 aaa +Bau 4 0 3 51 bbb +SAl 8 0 3 51 ccc + +SCond 1 1 8 51 dddddddd +# CStop 1 0 0 51 # firmware bug ? + +PIN1 1 2 1 51 e +PIN2 3 2 1 51 f +PUK1 6 2 2 51 gg +PUK2 9 2 2 51 hh + +ATR 2 3 1 51 i +FE_PE 6 3 4 51 jjjj + +SCREEN 52 NO TEST +SCREEN 53 NO TEST + +SCREEN 54 Info about memory block free +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +ResF1 1 0 5 54 aa-bb # split these, if you like ... +ResF2 7 0 5 54 aa-bb +ResF3 1 1 5 54 aa-bb +ResF4 7 1 5 54 aa-bb +ResF5 1 2 5 54 aa-bb +ResF6 7 2 5 54 aa-bb +ResF7 1 3 5 54 aa-bb +ResF8 7 3 5 54 aa-bb + +SCREEN 55 NO TEST + +SCREEN 56 Block display +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +Ptr 1 0 6 56 aaaaaa +Cntr 9 0 3 56 bbb +Task 1 1 8 56 cccccccc + +SCREEN 57 Memory status before reset +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +StatusOfStacks1 0 0 12 57 aaaaaaaaaaaa # You really need this ? +StatusOfStacks2 0 1 12 57 aaaaaaaaaaaa # This is a composite field 1,2,3 +StatusOfStacks3 0 2 2 57 aa # but if you want ... +BlockSets 0 3 8 57 bbbbbbbb + +SCREEN 58 NO TEST +SCREEN 59 NO TEST + +SCREEN 60 Reset counters + +SCREEN 61 Counters +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +NOPSW 8 0 4 61 aaaa H +SYNCR 8 1 4 61 bbbb H # SYNCR, changed on screen 62 +RESEL 8 2 4 61 cccc H + +SCREEN 62 Counters +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +PSW 7 0 4 62 aaaa H +SYNCRm 7 1 4 62 bbbb H # was SYNCR, conflict in screen 61 +BCCH 7 2 4 62 cccc H +BCCHE 7 3 4 62 dddd H + +SCREEN 63 Call counters +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +CalRel 3 0 2 63 aa +RelDi 9 0 2 63 bb +MOCAtmp 2 1 3 63 ccc +MOOK 8 1 3 63 ddd # MOOK, changed in screen 65 +AllMT 2 2 3 63 eee +MTOK 8 2 3 63 fff # MTOK, changed in screen 65 + +SCREEN 64 Location update counters +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +NFai 2 0 2 64 aa +NL 5 0 3 64 bbb +NLOK 9 0 3 64 ccc +Pfai 2 1 2 64 dd +PL 5 1 3 64 eee +PLOK 9 1 3 64 fff + +SCREEN 65 SMS counters +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +SFai 2 0 2 65 aa +MO 5 0 3 65 bbb +MOOKs 9 0 3 65 ccc # was MOOK conflict screen 63 +RFai 2 1 2 65 dd +MT 5 1 3 65 eee +MTOKs 9 1 3 65 fff # was MTOK, conflict screen 63 +Sched 0 2 4 65 gggg + +SCREEN 66 SMS timeout counters +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +TR1 0 0 3 66 aaa +TR2 0 0 3 66 bbb +TRA 0 0 2 66 cc +TC1 0 0 3 66 ddd +TC2 0 0 3 66 eee +SCHED 0 0 2 66 ff # was SCH, conflict screen 3, 11 + +SCREEN 67 NO TEST +SCREEN 68 NO TEST +SCREEN 69 NO TEST +SCREEN 70 NO TEST +SCREEN 71 NO TEST +SCREEN 72 NO TEST +SCREEN 73 NO TEST +SCREEN 74 NO TEST + +SCREEN 75 Audio option status +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +ExAuSt 4 0 8 75 aaaaaaaa # was mod, conflict screen 34 +AudReq 8 1 4 75 bbbb H +AccMod 8 2 2 75 cc H # len diff from netmon manuals +H2Path 8 3 2 75 dd H + +SCREEN 76 NO TEST +SCREEN 77 NO TEST +SCREEN 78 NO TEST +SCREEN 79 NO TEST + +SCREEN 80 Reset Timers + +SCREEN 81 Timers status +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +TIMSTS 2 2 8 81 aaaaaaaa + +SCREEN 82 Timers values +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +PwrOn 0 0 5 82 aaaaa +InServ 6 0 5 82 bbbbb +NSPS 0 1 5 82 ccccc +TxON 6 1 5 82 ddddd +TSt 8 2 3 82 eee + +SCREEN 83 Show Task Stacks + +SCREEN 84 status ... ?? +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +IDLE 1 0 4 84 aaaa +DEV_IO 6 0 4 84 bbbb +LOCAL 1 1 4 84 cccc +MDISND 6 1 4 84 dddd +MDIRCV 1 2 4 84 eeee +UI 6 2 4 84 ffff +TONE 1 3 4 84 gggg +PN 6 3 4 84 hhhh + +SCREEN 85 Connection info ?? +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +IRDA 1 0 4 85 aaaa +FBUS 6 0 4 85 bbbb +AUD 1 1 4 85 cccc +L1CTRL 6 1 4 85 dddd +L1MEA 1 2 4 85 eeee +L1SYSP 6 2 4 85 ffff +L2 1 3 4 85 gggg +CCC 6 3 4 85 hhhh # was CC, conflict screen 39 + +SCREEN 86 Memories status +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +MMM 1 0 4 86 aaaa # was MM, conflict screen 39 +RRR 6 0 4 86 bbbb # was RR, conflict screen 39 +RM 1 1 4 86 cccc +SMS 6 1 4 86 dddd +EM 1 2 4 86 eeee +SIMUPL 6 2 4 86 ffff +SIML2 1 3 4 86 gggg +DDI 6 3 4 86 hhhh + +SCREEN 87 OS system stack +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +FIQ 2 0 3 87 aaa +IRQ 7 0 3 87 bbb + +SCREEN 88 Phone Hw/Firmware info 1 +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +MCUSW 0 0 5 88 aaaaa +PPM 6 0 6 88 bbbbbb +MCUDate 6 1 6 88 cccccc +ChkSum 7 2 4 88 dddd H +DSPVer 0 3 12 88 eeeeeeeeeeee + +SCREEN 89 Phone Hw/Firmware info 2A +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +HW 4 0 4 89 aaaa +TXT 4 1 7 89 Ubbbbbb diff --git a/Docs/examples/netmon/netmonitordata_6150_522.dat b/Docs/examples/netmon/netmonitordata_6150_522.dat new file mode 100644 index 0000000..e8f88cf --- /dev/null +++ b/Docs/examples/netmon/netmonitordata_6150_522.dat @@ -0,0 +1,596 @@ +# GNOKII NETMONITOR PARAMETERS specifications +# (pretty on screen large at least 112 columns) +# +# data in this file are specific to: NOKIA 6150 NSM-1 v5.22 +# +# format of definition of SCREEN +# SCREEN=screen-number:optional-description (separator may be also tab, or spaces) +# +# SCREEN entry may be duplicated, order is not important, we use "test nr" +# screen number must be between 1 and 255 +# +# format of definition of PARAMETERS +# VAR=X:Y:LEN:NMman:TYPE:DESCRIPTION +# (separator may be also tab, or spaces) +# VAR: is name of parameter, it should be as you can see by pressing '*' key +# on phone, from inside a netmonitor menu. +# X,Y: are coordinates x & y, start form 0, 0, upper-left corner. +# LEN: must be specified, and must not be 0. +# NMman: name as referrred in NetMonitor manuals from Marcin Wiacek, +# TYPE : optional, default (predefined), is string, +# else may be D as Decimal or H as Hexadecimal, '-' as predefined. +# so, no matter what you get from phone, on command line parameters +# you can specify if uou want Hex or you want Dec. +# Example is LAC/CID that may be HEX or DEC depending on firmware version. +# TYPE refer to how data is displayed by phone, not to program output! +# DESCRIPTION: description of parameters (optional) +# +# Either Type and Description are optional, so, for parsing reason +# if you want specify Description but not Type, you MUST specify '-' as Type +# no conversions are made in this case. +# +# VAR name implies two problems: +# 1-some parameters can be in more then one screen (example H value) +# so we had changed some names. +# +# 2-some screen report channel parameters, once for every channel +# (example C2, screen 1, 3, 4, 5) +# so we had changed some names also here. +# +# We check duplicate names, data len, presence of netmon man name, ... +# Changed names are described near each interested parameters. +# +# Here we have adopted some convention, as described in comments, if you don't like it +# you can change VAR names in this file and use coherents name on command line. +# +# Order of parameters definition is relevant only for human readability. +# We allow max 512 parameters definition and max 255 screens, +# (defineds in gnokii.h NM_MAX_FIELDS, NM_MAX_SCREENS) +# +# ATTENTION: all names are case sensitive! SCREEN def must be uppercase +# ATTENTION: some firmware versions has some bugs (check screen 34 here) +# in this file all at right of '#' are comments, even if " # enquoted " +# +# Have a lot of fun! +# +# Andrea Scopece, a.scopece@tin.it, 22-08-2000 + +SCREEN 0 Host Date-Time +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +DATE 0 0 10 0 - - Host Date # host date +TIME 0 1 8 0 - - Host Time # host time +#PDATE 0 0 0 0 - - Phone Date # phone date (NOT IMPLEMENTED) +#PTIME 0 0 0 0 - - Phone Time # phone time (NOT IMPLEMENTED) + +# USERS SHOULD NOT CHANGE SCREEN 0 DEFINITIONS, IT REFERS A HOST PARAMETER, NOT PHONE !!!! + +SCREEN 1 Communication with Cell +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +H 0 0 1 1 a # H, changed in screen 2, 7 +CH 1 0 3 1 bbb - Channel +RxL 5 0 3 1 ccc - RxLevel(dB) +TxPwr 9 0 3 1 ddd - TxPower(dBm) +TS 1 1 1 1 e - Time Slot +TA 3 1 2 1 ff - Time advance +RQ 6 1 1 1 g +RLT 8 1 4 1 mmmm +C1 1 2 3 1 nnn +C2 9 2 3 1 ppp +CHT 4 3 4 1 oooo + + +SCREEN 2 More info about used Cell +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +PM 1 0 2 2 aa +RAR 4 0 2 2 b +Ro 6 0 1 2 c +BC 9 0 3 2 Bdd +RelR 1 1 2 2 ee +QLF 6 1 1 2 f +CRO 1 2 3 2 ggg +TO 5 2 2 2 hh +PenT 8 2 3 2 iii +H2 1 3 3 2 j # was H, conflict screen 1 +MAIO 5 3 2 2 mm +HSN 8 3 2 2 nn + + +SCREEN 3 Info about current and neighbor cells (1-2) +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +SCH 0 0 3 3 aaa # SCH, changed in screen 11, 66 +0C1 3 0 3 3 bbb # was C1, conflict this and other screen +0rx 6 0 3 3 ccc # was rx, conflict this and other screen +0C2 9 0 3 3 ddd # was C2, conflict this and other screen + +1CH 0 1 3 3 aaa +1C1 3 1 3 3 bbb # idem as above ... +1rx 6 1 3 3 ccc # idem as above ... +1C2 9 1 3 3 ddd # idem as above ... + +2CH 0 2 3 3 aaa +2C1 3 2 3 3 bbb # idem as above ... +2rx 6 2 3 3 ccc # idem as above ... +2C2 9 2 3 3 ddd # idem as above ... + +1N 4 3 2 3 ef +2N 7 3 2 3 gh + + +SCREEN 4 Info about neighbor cells (3-4-5) +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +3CH 0 0 3 4 aaa +3C1 3 0 3 4 bbb +3rx 6 0 3 4 ccc +3C2 9 0 3 4 ddd + +4CH 0 1 3 4 aaa +4C1 3 1 3 4 bbb +4rx 6 1 3 4 ccc +4C2 9 1 3 4 ddd + +5CH 0 2 3 4 aaa +5C1 3 2 3 4 bbb +5rx 6 2 3 4 ccc +5C2 9 2 3 4 ddd + +3N 2 3 2 4 ef +4N 5 3 2 4 gh +5N 8 3 2 4 iJ + + +SCREEN 5 Info about neighbor cells (6-7-8) +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +6CH 0 0 3 5 aaa +6C1 3 0 3 5 bbb +6rx 6 0 3 5 ccc +6C2 9 0 3 5 ddd + +7CH 0 1 3 5 aaa +7C1 3 1 3 5 bbb +7rx 6 1 3 5 ccc +7C2 9 1 3 5 ddd + +8CH 0 2 3 5 aaa +8C1 3 2 3 5 bbb +8rx 6 2 3 5 ccc +8C2 9 2 3 5 ddd + +6N 2 3 2 5 ef +7N 5 3 2 5 gh +8N 8 3 2 5 iJ + + +SCREEN 6 Preferred and forbidden networks +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +LReg 0 0 5 6 aaabb +1_Pre 0 1 5 6 aaabb +2_Pre 0 2 5 6 aaabb +3_Pre 0 3 5 6 aaabb + +1_For 7 0 5 6 aaabb +2_For 7 1 5 6 aaabb +3_For 7 2 5 6 aaabb +4_For 7 3 5 6 aaabb + + +SCREEN 7 Info about last monitored cell +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +E 0 1 1 7 a +A 2 1 1 7 b +Ho 4 1 1 7 c # was H, conflict screen 1, 2 +C 6 1 1 7 d +I 8 1 1 7 e +BR 10 1 2 7 fg + +ECSC 2 3 1 7 h +2Ter 7 3 1 7 i +MB 11 3 1 7 j + +SCREEN 8 NO TEST +SCREEN 9 NO TEST +SCREEN 9 NO TEST + +SCREEN 10 "Network information (last monitored cell) +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +TMSI 4 0 8 10 aaaaaaaa H +T3212 5 1 7 10 bbb-ccc +PaRP 4 2 1 10 d +DSF 7 2 2 10 ee +AGC 10 2 2 10 ff +AFC 1 3 5 10 ggggg +Ch 9 3 3 10 hhh + +SCREEN 11 Cell identification +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +MCC 3 0 3 11 xxx +MNC 9 0 2 11 xxx +LAC 5 1 5 11 xxx D +sch 7 2 3 11 xxx # was SCH, conflict in screen 3, 66 +CID 5 3 5 11 xxx D + +SCREEN 12 Network parameters +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +Cipher 8 0 3 12 aaa +Hopping 8 1 3 12 bbb +DTX 8 2 3 12 ccc +IMSI 8 3 3 12 ddd + +SCREEN 13 Info DTX / Network +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +DTXMode 0 0 10 13 aaaaaaaaaa +DTX_Def 9 1 3 13 bbb +DTX_BS 9 2 3 13 ccc + +SCREEN 14 NO TEST +SCREEN 15 NO TEST +SCREEN 16 NO TEST + +SCREEN 17 BTS channel test +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +BTS 4 2 3 17 aaa + +SCREEN 18 Lights status +LIGHTS 4 2 3 18 aaa + +SCREEN 19 Cell selection +CBARR 2 2 8 19 aaaaaaaa + +SCREEN 20 Battery and phone charger mode +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +BatVol 1 0 3 20 aaa +ChMod 6 0 5 20 bbbbb +BTemp 2 1 3 20 ccc +ChTime 8 1 3 20 ddd +ChrgVol 2 2 3 20 eee +Pwm 8 2 3 20 fff +BTyp 1 3 4 20 gggg +BFDC 7 3 4 20 hhhh + +SCREEN 21 Charger parameters +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +MTDif 1 0 4 21 aaaa +MPDif 7 0 4 21 bbbb +BUpV 2 1 3 21 ccc +BDownV 8 1 3 21 ddd +AverV 2 2 3 21 eee +SumMF 8 2 3 21 fff + +SCREEN 22 Charger parameters and indicators +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +DeriC 1 0 4 22 aaaa +ChAm 7 0 4 22 bbbb +Vdif 1 1 4 22 cccc +VDrop 7 1 4 22 dddd +VDTi 1 2 4 22 eeee +AvDif 7 2 4 22 ffff +Temp 1 3 4 22 gggg +Volt 7 3 4 22 hhhh + +SCREEN 23 Battery full detection +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +TxOn 1 0 4 23 aaaa +TxOff 7 0 4 23 bbbb +ChCur 1 1 4 23 cccc +Stdby 7 1 4 23 dddd +Age 0 2 3 23 eee +CAP 4 2 3 23 fff +Curr 8 2 4 23 gggg +Tmp 0 3 3 23 hhh +CmAh 4 3 4 23 iiii +Targ 8 3 4 23 jjjj + +SCREEN 24 NO TEST +SCREEN 25 NO TEST +SCREEN 26 NO TEST +SCREEN 27 NO TEST +SCREEN 28 NO TEST +SCREEN 29 NO TEST + +SCREEN 30 Audio API registers +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +A1Cnf 1 0 4 30 aaaa +A2Cnf 6 0 4 30 bbbb +ST 1 1 4 30 cccc +AU3 6 1 4 30 dddd +1Tone 1 2 4 30 eeee +2Tone 6 2 4 30 ffff +Conf 1 3 4 30 gggg +HFVol 6 3 4 30 hhhh + + +SCREEN 31 NO TEST +SCREEN 32 NO TEST +SCREEN 33 NO TEST + +SCREEN 34 Info about connection type +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +CM 0 0 2 34 aa +LD 2 0 2 34 bb +LM 4 0 2 34 cc +NM 6 0 2 34 dd + +PEC 0 1 2 34 ee # Hmmf, hard to make this screen well defined ... +FEC 2 1 2 34 ff +OEC 4 1 2 34 gg +ACC 6 1 2 34 hh +RXS 8 1 2 34 iii + +inf 10 1 2 34 xxx # NEW PARAM, [P] when active infrared, +# # else [-] + # you can verify it only by phone + +TXS 12 1 2 34 jjj # ATT:this seems on line 2 but really + # is on x=12, y=1 + +Mod 0 2 3 34 k-m # ATT:this seems on line 3 but really + # is on x=0, y=2 + # Mod, changed in screen 75 + +SCREEN 35 Last reboot +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +ResetReason 1 0 5 35 aaaaa +TaskName 1 1 8 35 bbbbbbbb + +SCREEN 36 Info about rebootings +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +UN 1 0 2 36 aa +WD 5 0 2 36 bb +DSP 9 0 2 36 cc +SIM 1 1 2 36 dd +IDL 5 1 2 36 ee +STK 9 1 2 36 ff + +SCREEN 37 NO TEST + +SCREEN 38 NO TEST + +SCREEN 39 Last connection status +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +CC 7 0 2 39 aa # CC, changed in screen 85 +MM 7 1 2 39 bb # MM, changed in screen 86 +RR 7 2 2 39 cc # RR, changed in screen 86 + +SCREEN 40 Reset Handover Counters # only for manual reset + +SCREEN 41 Info about handover +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +GGok 1 0 4 41 aaaa +DDok 7 0 4 41 bbbb +GDok 1 1 4 41 cccc +DGok 7 1 4 41 dddd + +GGf 0 2 3 41 aaa +DDf 3 2 3 41 bbb +GDf 6 2 3 41 ccc +DGf 9 2 3 41 ddd + +GGb 0 3 3 41 aaa +DDb 3 3 3 41 bbb +GDb 6 3 3 41 ccc +DGb 9 3 3 41 ddd + + +SCREEN 42 Info about intracell handover (broken ? all zeroes) +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment + +IGGok 1 0 4 42 aaaa +IDDok 7 0 4 42 bbbb +IGDok 1 1 4 42 cccc +IDGok 7 1 4 42 dddd + +IGGf 0 2 3 42 aaa +IDDf 3 2 3 42 bbb +IGDf 6 2 3 42 ccc +IDGf 9 2 3 42 ddd + +IGGb 0 3 3 42 aaa +IDDb 3 3 3 42 bbb +IGDb 6 3 3 42 ccc +IDGb 9 3 3 42 ddd + + +SCREEN 43 T200 counter expired +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +T200MS 8 0 4 43 aaaa +T200BS 8 1 4 43 bbbb + +SCREEN 44 NO TEST + +SCREEN 45 Trasmitter status +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +TRASM 2 2 8 45 aaaaaaaa + +SCREEN 46 NO TEST +SCREEN 47 NO TEST +SCREEN 48 NO TEST +SCREEN 49 NO TEST +SCREEN 50 NO TEST + +SCREEN 51 Info about SIM card +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +VSel 0 0 3 51 aaa +Bau 4 0 3 51 bbb +SAl 8 0 3 51 ccc + +SCond 1 1 8 51 dddddddd +# CStop 1 0 0 51 # firmware bug ? + +PIN1 1 2 1 51 e +PIN2 3 2 1 51 f +PUK1 6 2 2 51 gg +PUK2 9 2 2 51 hh + +ATR 2 3 1 51 i +FE_PE 6 3 4 51 jjjj + +SCREEN 52 NO TEST +SCREEN 53 NO TEST + +SCREEN 54 Info about memory block free +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +ResF1 1 0 5 54 aa-bb # split these, if you like ... +ResF2 7 0 5 54 aa-bb +ResF3 1 1 5 54 aa-bb +ResF4 7 1 5 54 aa-bb +ResF5 1 2 5 54 aa-bb +ResF6 7 2 5 54 aa-bb +ResF7 1 3 5 54 aa-bb +ResF8 7 3 5 54 aa-bb + +SCREEN 55 NO TEST + +SCREEN 56 Block display +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +Ptr 1 0 6 56 aaaaaa +Cntr 9 0 3 56 bbb +Task 1 1 8 56 cccccccc + +SCREEN 57 Memory status before reset +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +StatusOfStacks1 0 0 12 57 aaaaaaaaaaaa # You really need this ? +StatusOfStacks2 0 1 12 57 aaaaaaaaaaaa # This is a composite field 1,2,3 +StatusOfStacks3 0 2 2 57 aa # but if you want ... +BlockSets 0 3 8 57 bbbbbbbb + +SCREEN 58 NO TEST +SCREEN 59 NO TEST + +SCREEN 60 Reset counters + +SCREEN 61 Counters +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +NOPSW 8 0 4 61 aaaa H +SYNCR 8 1 4 61 bbbb H # SYNCR, changed on screen 62 +RESEL 8 2 4 61 cccc H + +SCREEN 62 Counters +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +PSW 7 0 4 62 aaaa H +SYNCRm 7 1 4 62 bbbb H # was SYNCR, conflict in screen 61 +BCCH 7 2 4 62 cccc H +BCCHE 7 3 4 62 dddd H + +SCREEN 63 Call counters +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +CalRel 3 0 2 63 aa +RelDi 9 0 2 63 bb +MOCAtmp 2 1 3 63 ccc +MOOK 8 1 3 63 ddd # MOOK, changed in screen 65 +AllMT 2 2 3 63 eee +MTOK 8 2 3 63 fff # MTOK, changed in screen 65 + +SCREEN 64 Location update counters +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +NFai 2 0 2 64 aa +NL 5 0 3 64 bbb +NLOK 9 0 3 64 ccc +Pfai 2 1 2 64 dd +PL 5 1 3 64 eee +PLOK 9 1 3 64 fff + +SCREEN 65 SMS counters +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +SFai 2 0 2 65 aa +MO 5 0 3 65 bbb +MOOKs 9 0 3 65 ccc # was MOOK conflict screen 63 +RFai 2 1 2 65 dd +MT 5 1 3 65 eee +MTOKs 9 1 3 65 fff # was MTOK, conflict screen 63 +Sched 0 2 4 65 gggg + +SCREEN 66 SMS timeout counters +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +TR1 0 0 3 66 aaa +TR2 0 0 3 66 bbb +TRA 0 0 2 66 cc +TC1 0 0 3 66 ddd +TC2 0 0 3 66 eee +SCHED 0 0 2 66 ff # was SCH, conflict screen 3, 11 + +SCREEN 67 NO TEST +SCREEN 68 NO TEST +SCREEN 69 NO TEST +SCREEN 70 NO TEST +SCREEN 71 NO TEST +SCREEN 72 NO TEST +SCREEN 73 NO TEST +SCREEN 74 NO TEST + +SCREEN 75 Audio option status +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +ExAuSt 4 0 8 75 aaaaaaaa # was mod, conflict screen 34 +AudReq 8 1 4 75 bbbb H +AccMod 8 2 2 75 cc H # len diff from netmon manuals +H2Path 8 3 2 75 dd H + +SCREEN 76 NO TEST +SCREEN 77 NO TEST +SCREEN 78 NO TEST +SCREEN 79 NO TEST + +SCREEN 80 Reset Timers + +SCREEN 81 Timers status +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +TIMSTS 2 2 8 81 aaaaaaaa + +SCREEN 82 Timers values +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +PwrOn 0 0 5 82 aaaaa +InServ 6 0 5 82 bbbbb +NSPS 0 1 5 82 ccccc +TxON 6 1 5 82 ddddd +TSt 8 2 3 82 eee + +SCREEN 83 Show Task Stacks + +SCREEN 84 status ... ?? +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +IDLE 1 0 4 84 aaaa +DEV_IO 6 0 4 84 bbbb +LOCAL 1 1 4 84 cccc +MDISND 6 1 4 84 dddd +MDIRCV 1 2 4 84 eeee +UI 6 2 4 84 ffff +TONE 1 3 4 84 gggg +PN 6 3 4 84 hhhh + +SCREEN 85 Connection info ?? +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +IRDA 1 0 4 85 aaaa +FBUS 6 0 4 85 bbbb +AUD 1 1 4 85 cccc +L1CTRL 6 1 4 85 dddd +L1MEA 1 2 4 85 eeee +L1SYSP 6 2 4 85 ffff +L2 1 3 4 85 gggg +CCC 6 3 4 85 hhhh # was CC, conflict screen 39 + +SCREEN 86 Memories status +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +MMM 1 0 4 86 aaaa # was MM, conflict screen 39 +RRR 6 0 4 86 bbbb # was RR, conflict screen 39 +RM 1 1 4 86 cccc +SMS 6 1 4 86 dddd +EM 1 2 4 86 eeee +SIMUPL 6 2 4 86 ffff +SIML2 1 3 4 86 gggg +DDI 6 3 4 86 hhhh + +SCREEN 87 OS system stack +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +FIQ 2 0 3 87 aaa +IRQ 7 0 3 87 bbb + +SCREEN 88 Phone Hw/Firmware info 1 +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +MCUSW 0 0 5 88 aaaaa +PPM 6 0 6 88 bbbbbb +MCUDate 6 1 6 88 cccccc +ChkSum 7 2 4 88 dddd H +DSPVer 0 3 12 88 eeeeeeeeeeee + +SCREEN 89 Phone Hw/Firmware info 2A +#-Name--X-------Y-------LEN-----Screen--NMman---Type----Descr.----------#Comment +HW 4 0 4 89 aaaa +TXT 4 1 7 89 Ubbbbbb diff --git a/Docs/examples/netmon/nmd_commands.dat b/Docs/examples/netmon/nmd_commands.dat new file mode 100644 index 0000000..933f1a8 --- /dev/null +++ b/Docs/examples/netmon/nmd_commands.dat @@ -0,0 +1,5 @@ +-n 4 DATE TIME H CH Ch SCH AGC AFC RxL TxPwr TS TA RQ RLT C1 C2 CHT + -n 4 DATE TIME SCH 0rx 1CH 1rx 2CH 2rx 3CH 3rx 4CH 4rx 5CH 5rx 6CH 6rx 7CH 7rx 8CH 8rx + -n 4 TIME LINE1 + -n 4 DATE CM LD LM NM PEC FEC OEC ACC RXS inf TXS Mod + -n 4 LINE1 DATE TIME diff --git a/Docs/examples/ppp/options b/Docs/examples/ppp/options new file mode 100644 index 0000000..63e0eb6 --- /dev/null +++ b/Docs/examples/ppp/options @@ -0,0 +1,7 @@ +modem +crtscts +defaultroute +asyncmap 0 +mtu 1500 +mru 1500 +user ppp diff --git a/Docs/examples/ppp/pap-secrets b/Docs/examples/ppp/pap-secrets new file mode 100644 index 0000000..96d459b --- /dev/null +++ b/Docs/examples/ppp/pap-secrets @@ -0,0 +1 @@ +ppp * ppp diff --git a/Docs/examples/ppp/ppp-6210-modem b/Docs/examples/ppp/ppp-6210-modem new file mode 100755 index 0000000..3111a52 --- /dev/null +++ b/Docs/examples/ppp/ppp-6210-modem @@ -0,0 +1,11 @@ +#!/bin/sh +/usr/sbin/chat -v \ + TIMEOUT 30 \ + ABORT '\nBUSY\r' \ + ABORT '\nNO ANSWER\r' \ + ABORT '\nRINGING\r\n\r\nRINGING\r' \ + ABORT '\nNO CARRIER\r' \ + '' '\r\dATZ' \ + TIMEOUT 60 \ + OK ATDT$TELEPHONE \ + CONNECT '' diff --git a/Docs/examples/ppp/ppp-FILES b/Docs/examples/ppp/ppp-FILES new file mode 100644 index 0000000..8732ffb --- /dev/null +++ b/Docs/examples/ppp/ppp-FILES @@ -0,0 +1,6 @@ +ppp-6210-modem Basic chat script to use with AT modem (eg. Nokia 6210) +ppp-gnokii Basic chat script to make a connection with gnokiid and at-emulator (eg. Nokia 6110) +ppp-hscsd Sample chat script to make a hscsd connection +ppp-on Sample ppp script to estabilish a dialup connection +options Sample ppp options file +pap-secrets Sample pap-secrets file diff --git a/Docs/examples/ppp/ppp-gnokii b/Docs/examples/ppp/ppp-gnokii new file mode 100644 index 0000000..2b12aaf --- /dev/null +++ b/Docs/examples/ppp/ppp-gnokii @@ -0,0 +1,9 @@ +#!/bin/sh +/usr/sbin/chat -v \ + TIMEOUT 30 \ + ABORT '\nBUSY\r' \ + ABORT '\nNO ANSWER\r' \ + ABORT '\nRINGING\r\n\r\nRINGING\r' \ + ABORT '\nNO CARRIER\r' \ + '' ATDT$TELEPHONE \ + CONNECT '' diff --git a/Docs/examples/ppp/ppp-hscsd b/Docs/examples/ppp/ppp-hscsd new file mode 100644 index 0000000..745759d --- /dev/null +++ b/Docs/examples/ppp/ppp-hscsd @@ -0,0 +1,13 @@ +#!/bin/sh +chat -v \ + TIMEOUT 60 \ + ABORT '\nBUSY\r' \ + ABORT '\nNO ANSWER\r' \ + ABORT '\nRINGING\r\n\r\nRINGING\r' \ + ABORT '\nNO CARRIER\r' \ + '' "\r\dATZ" \ + OK "AT+CBST=51,0,1" \ + OK "AT+CHSN=6,0,0,0" \ + TIMEOUT 60 \ + OK ATD$TELEPHONE \ + CONNECT '' diff --git a/Docs/examples/ppp/ppp-on b/Docs/examples/ppp/ppp-on new file mode 100644 index 0000000..3774465 --- /dev/null +++ b/Docs/examples/ppp/ppp-on @@ -0,0 +1,9 @@ +#!/bin/sh +TELEPHONE=501808080 +LOCAL_IP=0.0.0.0 +REMOTE_IP=0.0.0.0 +NETMASK=255.255.255.0 +DIALER_SCRIPT=/etc/ppp/ppp-gnokii +export $TELEPHONE +exec /usr/sbin/pppd debug /dev/gnokii 115200 $LOCAL_IP:$REMOTE_IP connect $DIALER_SCRIPT + diff --git a/Docs/examples/test.vcs b/Docs/examples/test.vcs new file mode 100644 index 0000000..140418e --- /dev/null +++ b/Docs/examples/test.vcs @@ -0,0 +1,40 @@ +BEGIN:VCALENDAR +VERSION:1.0 + +BEGIN:VEVENT +CATEGORIES:PHONE CALL +SUMMARY:0123456789 +DESCRIPTION:Call to John +DTSTART:20000623T194400 +DALARM:20000623T194300 +END:VEVENT + +BEGIN:VEVENT +CATEGORIES:MISCELLANEOUS +SUMMARY:Gnokii Reminder +DTSTART:20000623T204400 +DALARM:20000623T204300 +END:VEVENT + +BEGIN:VEVENT +CATEGORIES:MEETING +SUMMARY:Gnokii Meeting +DTSTART:20000623T204400 +DALARM:20000623T204300 +END:VEVENT + +BEGIN:VEVENT +CATEGORIES:SPECIAL OCCASION +SUMMARY:Marcels Birthday +DTSTART:19790806T031000 +DALARM:20000806T100000 +END:VEVENT + +BEGIN:VEVENT +CATEGORIES:MISCELLANEOUS +SUMMARY;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:Wi=C4=85cek Marcin +DTSTART:19991111T235959 +DALARM:20010510T222200 +END:VEVENT + +END:VCALENDAR diff --git a/Docs/man/gnokii.1 b/Docs/man/gnokii.1 new file mode 100644 index 0000000..214d696 --- /dev/null +++ b/Docs/man/gnokii.1 @@ -0,0 +1,196 @@ +.TH "gnokii" "1" "July 15, 2000" "" "Gnokii" +.SH "NAME" +gnokii \- modem/fax driver for Nokia mobile phones +.SH "SYNOPSIS" +.B gnokii +\fIOPTION\fR [\fIARGUMENT\fR]... +.SH "DESCRIPTION" +.PP +.B gnokii +is a Linux/Unix tool suite and (eventually) modem/fax driver for Nokia mobile phones, released under the GPL. +.PP +.B gnokii +supports most phones from the 3810/8110 and 5110/6110 series, details including bugs specific to each series appear in the files Docs/README\-3810 and Docs/README\-6110 respectively. + +.SH "OPTIONS" +The options that are recognized by +.B gnokii +can be divided into several different groups. + +.SS GENERAL +.TP +.BR "\-\-help" +display usage information. +.TP +.BR "\-\-version" +displays version and copyright information. +.TP +.BR "\-\-monitor" +continually updates phone status to stderr. + +.SS DIALING +.TP +.BR "\-\-getspeeddial \fIn\fP" +reads speed dial from the specified location. +.TP +.BR "\-\-setspeeddial \fInumber\fP \fImemory_type\fP \fIlocation\fP" +specify speed dial. +.TP +.BR "\-\-dialvoice \fInumber\fP" +initiate voice call. +.TP +.BR "\-\-senddtmf \fIstring\fP" +send DTMF sequence. + +.SS PHONE SETTINGS +.TP +.BR "\-\-getdisplaystatus" +shows what icons are displayed. +.TP +.BR "\-\-displayoutput" +show texts displayed in phone's screen. +.TP +.BR "\-\-getprofile [\fInumber\fP]" +show settings for selected(all) profile(s). +.TP +.BR "\-\-netmonitor {\fIreset\fP|\fIoff\fP|\fIfield\fP|\fIdevel\fP|\fInext\fP|\fInr\fP}" +setting/querying netmonitor mode. +.TP +.BR "\-\-reset [\fIsoft\fP|\fIhard\fP]" +resets the phone. + +.SS CALENDAR +.TP +.BR "\-\-getcalendarnote \fIindex\fP [\-v]" +get the note with number \fIindex\fR from calendar. +.PP +[\-v] \- output in vCalendar 1.0 format +.TP +.BR "\-\-writecalendarnote" +write the note to calendar. +.TP +.BR "\-\-deletecalendarnote \fIindex\fP" +delete the note with number [\fIindex\fR] from calendar. + +.SS SMS +.TP +.BR "\-\-getsms \fImemory_type\fR \fIstart\fP [\fIend\fP] [\-f \fIfile\fP] [\-d]" +gets SMS messages from specified \fImemory type\fR starting at entry [\fIstart\fR] and ending at [\fIend\fR]. +If [\fIend\fR] is not specified only one location \- [\fIstart\fR] is read. +If [\-f \fIfile\fR] is used entries are saved in \fIfile\fR. +Otherwise they are dumped to stdout. +If [\-d] switch is used, a message is deleted after reading. +.TP +.BR "\-\-deletesms \fImemory_type\fP \fIstart\fP [\fIend\fP]" +deletes SMS messages from specified \fImemory type\fR starting at entry [\fIstart\fR] and ending at [\fIend\fR]. +If [\fIend\fI] is not specified only one location \- [\fIstart\fR] is read. +.TP +.BR "\-\-sendsms \fIdestination\fP [\-\-smsc \fImessage_center_number\fP | \-\-smscno \fImessage_center_index\fP] [\-r] [\-C \fIn\fP] [\-v \fIn\fP] [\-\-long \fIn\fP]" +sends an SMS message to \fIdestination\fR via \fImessage_center_number\fR or SMSC number taken from phone memory from address \fImessage_center_index\fR. +If this argument is ommited SMSC number is taken from phone memory from location 1. +Message text is taken from STDIN. +This function has had limited testing and may not work at all on your network. +Meaning of other optional parameters: +.PP +[\-r] \- request for delivery report +.PP +[\-C \fIn\fR] \- Class Message \fIn\fR, where \fIn\fR can be 0..3 +.PP +[\-v \fIn\fR] \- validity in minutes +.PP +[\-\-long \fIn\fR] \- send no more then \fIn\fR characters, default is 160 +.TP +.BR "\-\-savesms [\-m] [\-l \fIn\fP] [\-i]" +saves SMS messages to the Outbox. Messages are read from STDIN. You can specify the following optional arguments: +.PP +[\-m] \- mark the message as sent +[\-l \fIn\fR] \- save the message at location \fIn\fR on the SIM card +[\-i] \- ask before overwriting specified location +.TP +.BR "\-\-getsmsc \fInumber\fP" +show the SMSC number from location \fInumber\fR. + +.SS LOGOS +.TP +.BR "\-\-sendlogo {\fIcaller\fP|\fIop\fP} \fIdestination\fP \fIlogofile\fP [\fInetwork_code\fP]" +send the \fIlogofile\fR to \fIdestination\fR as operator or CLI logo. +.TP +.BR "\-\-setlogo \fIlogofile\fP [\fInetwork_code\fP]" +.TP +.BR "\-\-setlogo \fIlogofile\fP [\fIcaller_group_number\fP] [\fIgroup_name\fP]" +.TP +.BR "\-\-setlogo \fItext\fP [\fIstartup_text\fP]" +.TP +.BR "\-\-setlogo \fIdealer\fP [\fIdealer_startup_text\fP]" +set caller, startup or operator logo. +.TP +.BR "\-\-getlogo \fIlogofile\fP {\fIcaller\fP|\fIop\fP|\fIstartup\fP} [\fIcaller_group_number\fP]" +get caller, startup or operator logo. + +.SS RINGTONES +.TP +.BR "\-\-sendringtone \fIdestination\fI \fIrtttlfile\fP" +send the \fIrtttlfile\fR to \fIdestination\fR as ringtone. +.TP +.BR "\-\-setringtone \fIrtttlfile\fP" +set the \fIrtttlfile\fR as ringtone (on 6110). + +.SS PHONEBOOK +.TP +.BR "\-\-getmemory \fImemory_type\fP \fIstart\fP [\fIend\fP]" +reads specificed memory location from phone. +If [\fIend\fR] is not specified only one location \- [\fIstart\fR] is read. +Valid \fImemory types\fR are: ME, SM, FD, ON, EN, DC, RC, MC, LD. +.TP +.BR "\-\-writephonebook [\-i]" +reads data from stdin and writes to phonebook +When \-i option is used, refuses to overwrite existing entries. +Uses the same format as provided by the output of the getphonebook command. + +.SS DATE, TIME AND ALARM +.TP +.BR "\-\-setdatetime [\fIYYY\fP [\fIMM\fP [\fIDD\fP [\fIHH\fP [\fIMM\fP]]]]]" +set the date and the time of the phone. +.TP +.BR "\-\-getdatetime" +shows current date and time in the phone. +.TP +.BR "\-\-setalarm \fIHH\fP \fIMM\fP" +set the alarm of the phone. +.TP +.BR "\-\-getalarm" +shows current alarm. + +.SS SECURITY +.TP +.BR "\-\-identify" +get IMEI, model and revision. +.TP +.BR "\-\-entersecuritycode {\fIPIN\fP|\fIPIN2\fP|\fIPUK\fP|\fIPUK2\fP}" +asks for the code and sends it to the phone. +.TP +.BR "\-\-getsecuritycodestatus" +show if a security code is needed. + +.SH "DIAGNOSTICS" +Various error messages are printed to standard error. The exit code +is 0 for correct functioning. Errors which appear to be caused by +invalid or abused command line parameters cause an exit code of 2, and +other errors cause an exit code of 1. + +.SH "BUGS" +.PP +We write quality software here ;) + +.SH "AUTHOR" +Hugh Blemings and Pavel Janik ml. + +Manual page written by Dag Wieers and Pawel Kot + +See also Docs/CREDITS from Gnokii sources. + +.SH "COPYING" +This program is distributed under the GNU Public License. + +.SH "SEE ALSO" +gnokiid, xgnokii, xlogos diff --git a/Docs/man/gnokiid.8 b/Docs/man/gnokiid.8 new file mode 100644 index 0000000..99c2b90 --- /dev/null +++ b/Docs/man/gnokiid.8 @@ -0,0 +1,63 @@ +.TH "gnokiid" "8" "May 27, 2001" "" "Gnokii" +.SH "NAME" +gnokiid \- create a virtual modem for Nokia portable phones +.SH "SYNOPSIS" +.B gnokiid + +.B gnokiid +[\fB\-\-help\fR|\fB\-\-version\fR|\fB\-\-debug\fR] + +.SH "DESCRIPTION" +.PP +.B gnokiid +is a tool from the Gnokii tool suite used to create a virtual modem device with a Nokia portable telephone. The virtual modem device is usually accessed via a symbolic link called /dev/gnokii (created automatically by \fBmgnokiidev\fR(8)). + +.PP +After +.B gnokiid +has created the virtual modem, it can be accessed like any other Hayes\-compatible modem by such programs as the terminal program \fBminicom\fR(1) or the PPP daemon \fBpppd\fR(8) to make standard data connections to remote computers. + +.PP +The full range of portable telephone functions (SMS messaging, phone book, operator logos, etc.) are accessed using the command\-line program \fBgnokii\fR(1) or the graphical interface program \fBxgnokii\fR(1x). + + +.PP +Gnokii +is a Linux/Unix tool suite and (eventually) modem/fax driver for Nokia mobile phones, released under the GPL. +.PP +Gnokii +supports most phones from the 3810/8110 and 5110/6110 series, details including bugs specific to each series appear in the files Docs/README\-3810 and Docs/README\-6110 respectively. + +.SH "OPTIONS" +.PP +If called without any options, \fBgnokiid\fR will set up a virtual modem device using the settings in /etc/gnokiirc or in the user's ~/.gnokiirc (if it exists). Otherwise, + +.TP +\fB\-\-help\fR +print out a short usage message +.TP +\fB\-\-version\fR +print out version, copyright, phone, and serial device info +.TP +\fB\-\-debug\fR +uses STDIN/STDOUT for a virtual modem +.SH "DIAGNOSTICS" +Various error messages are printed to STDERR. +.SH "BUGS" +.PP +Hmmm... + + +.SH "AUTHOR" +Hugh Blemings and Pavel Janik ml. are the authors of the +Gnokii +tool suite. + +This manual page was written by Erik Rossen . + +See also Docs/CREDITS from the Gnokii sources. +.SH "COPYING" +This program is distributed under the GNU Public License. + +.SH "SEE ALSO" +gnokii, xgnokii, mgnokiidev diff --git a/Docs/man/mgnokiidev.8 b/Docs/man/mgnokiidev.8 new file mode 100644 index 0000000..03db0aa --- /dev/null +++ b/Docs/man/mgnokiidev.8 @@ -0,0 +1,49 @@ +.TH "mgnokiidev" "8" "May 27, 2001" "" "Gnokii" +.SH "NAME" +mgnokiidev \- links /dev/gnokii to a virtual modem +.SH "SYNOPSIS" +.B mgnokiidev \fI/dev/pts/?\fR + +.SH "DESCRIPTION" +.PP +.B mgnokiidev +is a tool from the Gnokii tool suite used to create the link /dev/gnokii that points to a pseudo\-tty (/dev/pts/?). + +.PP +It is called after +.B gnokiid +has created a virtual modem that is attached to the pty. It's operation is transparent under normal usage as gnokiid takes care of calling it when required. + +.PP +Since +.B mgnokiidev +must modifiy files in /dev, it must be either run as root or SUID root. The latter is the preferred method. Normally the +.B mgnokiidev +binary is chmod 4750 and owned by root.gnokii. + +.PP +Gnokii +is a Linux/Unix tool suite and (eventually) modem/fax driver for Nokia mobile phones, released under the GPL. +.PP +Gnokii +supports most phones from the 3810/8110 and 5110/6110 series, details including bugs specific to each series appear in the files Docs/README\-3810 and Docs/README\-6110 respectively. + +.SH "DIAGNOSTICS" +Various error messages are printed to STDERR. +.SH "BUGS" +.PP +None reported. + + +.SH "AUTHOR" +Hugh Blemings and Pavel Janik ml. are the authors of the +Gnokii tool suite. + +This manual page was written by Erik Rossen . + +See also Docs/CREDITS from the Gnokii sources. +.SH "COPYING" +This program is distributed under the GNU Public License. + +.SH "SEE ALSO" +gnokiid, gnokii diff --git a/Docs/man/todologo.1 b/Docs/man/todologo.1 new file mode 100644 index 0000000..c66955b --- /dev/null +++ b/Docs/man/todologo.1 @@ -0,0 +1,57 @@ +.TH todologo 8 "January 3, 2001" "GNOKII Tools" "GNOKII Tools" + +.SH NAME +todologo \- Create operator logo that contains 3 lines of text + +.SH SYNOPSIS +.B todologo +\fI - - \fR + +.SH DESCRIPTION +The +.B todologo +program is used to create three lines of text +that fits to the standard Nokia operator logo space (i.e. 72x14 +pixel space). This is achieved by using a proportional tiny font +which most elements have size of 3x4 pixels (some are thinner). + +The name comes from an original intention that this program is +used to create todo entries to one's mobile phone screen so that +those are always visible and thus in user's memory. But the tool +can just be used to print arbitrary text to the space provided +by an operator logo. + +The hand-crafted font currently supports the following characters: +abcdefghijklmnopqrstuvwxyz and 0123456789 + +.SH OUTPUT +The standard `.nol' formatted operator logo is printed to +standard output. The header information of that output is taken +from \fIgnokii.nol\fR that is distributed with +.B GNOKII +-- so you most probably need to give your operator code when uploading it to your +mobile phone. Use +.B gnokii +or +.B xlogos +to do the uploading. + +.SH EXAMPLES +First example writes some todo entries to todo.nol: +.IP +\fCtodologo pick up kids - call wife - order chinese >todo.nol\fP +.LP +This last example writes some wisdom to the stdout: +.IP +\fCtodologo Never underestimate - the power of the dark - side of the force\fP +.LP +.SH AUTHOR +Tomi Ollila + +.SH COPYING +This program is distributed under the GNU Public License. + +.SH SEE ALSO +.BR gnokii(1), +xlogos + diff --git a/Docs/man/xgnokii.1x b/Docs/man/xgnokii.1x new file mode 100644 index 0000000..5fad541 --- /dev/null +++ b/Docs/man/xgnokii.1x @@ -0,0 +1,39 @@ +.TH "xgnokii" "1x" "May 27, 2001" "" "Gnokii" +.SH "NAME" +xgnokii \- graphical interface of the Gnokii telephone toolkit +.SH "SYNOPSIS" +.B xgnokii + +.SH "DESCRIPTION" +.PP +.B xgnokii +is a fancy graphical interface for Gnokii. It has on\-line help and plenty of doo\-dads. +.PP +Gnokii +is a Linux/Unix tool suite and (eventually) modem/fax driver for Nokia mobile phones, released under the GPL. +.PP +Gnokii +supports most phones from the 3810/8110 and 5110/6110 series, details including bugs specific to each series appear in the files Docs/README\-3810 and Docs/README\-6110 respectively. + +.SH "DIAGNOSTICS" +Various error messages are printed to STDERR. +.SH "BUGS" +.PP +This man page is too short. The only excuse is that the online help in xgnokii is extensive. Click and see for yourself. + +.SH "AUTHOR" +Jan Derfinak is the author of the +.B xgnokii +. + +Hugh Blemings and Pavel Janik ml. are the authors of the +Gnokii tool suite. + +This manual page was written by Erik Rossen . + +See also Docs/CREDITS from the Gnokii sources. +.SH "COPYING" +This program is distributed under the GNU Public License. + +.SH "SEE ALSO" +gnokii, gnokiid, xlogos diff --git a/Docs/pl_PL/mygnokii.htm b/Docs/pl_PL/mygnokii.htm new file mode 100644 index 0000000..6320858 --- /dev/null +++ b/Docs/pl_PL/mygnokii.htm @@ -0,0 +1,974 @@ + + + + + + + + + + + Nadzieja dla Kontestatorów + + + + + +
Nadzieja dla Kontestatorów + +
+
Poni¿szy tekst jest rozwiniêciem artyku³u +opublikowanego na ³amach czasopisma Chip Special zima 2001.
+
+ +
+ +

Producenci telefonów komórkowych czêsto do³±czaj± do swoich produktów +oprogramowanie umo¿liwiaj±ce obs³ugê wiêkszo¶ci funkcji aparatu z klawiatury +komputera. K³opoty zaczyn± siê wówczas, je¿eli nasz komputer nie korzysta +z "jedynie s³usznych" systemów operacyjnych: MS Windows lub Mac OS ... +

U¿ytkownicy systemów BSD i Linux s± w znacznie gorszej sytuacji. Jak +dotychczas ¿aden producent "komórek" nie zdoby³ siê na upublicznienie programów +dla tych systemów. ¯ycie jednak nie znosi pró¿ni. Ponad 3 lata temu pojawi³ +siê Gnokii - projekt umo¿liwiaj±cy obs³ugê telefonów komórkowych Nokia +w systemach uniksowych. + +

Na pocz±tek

+ +1. Nieco historii
+


+ +

Gnokii wywodzi siê z dwóch projektów: pierwszego, zapocz±tkowanego m.in. +przez Francois Dessarta i Hugh Blemingsa w pa¼dzierniku 1998, przeznaczonego +dla modeli 3110 i 8110 oraz innego, rozpoczêtego m.in. Staffana Ulfberga +obs³uguj±cego model 6110. Projekty te po³±czone zosta³y w lutym 1999 roku. +Za³o¿eniem twórców Gnokii by³o opracowanie interfejsu programistycznego +oraz graficznego do obs³ugi najpopularniejszych wówczas modeli telefonów +komórkowych. Tworzona aplikacja mia³ równie¿ umo¿liwiaæ wykonywanie transmisji +danych, nie przewidziano jednak transmisji faksów. +

Projekt rozwija³ siê bez przeszkód do drugiej po³owy zesz³ego roku (wersja +0.3.3_pre8), Na skutek sporów dotycz±cych przysz³o¶ci pakietu, jego rózwój +zosta³ na pewien czas wstrzymany. Odesz³o wtedy kilka osób, które wnosi³y +wiele zmian. +

W tym roku prace nad pakietem zosta³y znów rozpoczête. Programi¶ci skupili +siê nad wersj± rozwojow±. Zdecydowano siê przepisaæ tê czê¶æ kodu ¼ród³owego, +która jest odpowiedzialna za komunikacjê programu z telefonem. Zmiany te +maj± pomóc w usuwaniu b³êdów, s± tak¿e potrzebne aby wspó³dzieliæ czê¶ci +kodu u¿ywane przez ró¿ne modele telefonów. Pojawi³y siê równie¿ pierwsze +funkcje do Dancalla 2711 oraz Nokii 2110, 7110 i 62xx. Praca ta nie jest +ci±gle dokoñczona - wersja rozwojowa 0.4.0_pre2 z listopada mo¿e nie zapewniaæ +jeszcze takiego wsparcia do niektórych modeli (np. serii 61xx) jak stabilna +0.3.3 opublikowana we wrze¶niu (do której nie do³±czono wielu partii nowego +kodu). + +

Na pocz±tek

+ +2. Mygnokii
+


+ +

MyGnokii jest obecnie jedyn± konkurencyjn± dystrybucj± dla oryginalnego +Gnokii, Zosta³a stworzona w okresie sporów po opublikowaniu wersji 0.3.3_pre8 +Gnokii. Twórc± tego projektu jest Marcin Wi±cek. +

Nowa dystrybucja pocz±tkowo zosta³a oparta na Gnokii 0.3.3_pre8 i zawiera³a +wy³±cznie poprawki do oryginalnego kodu. Jednak w ci±gu ostatnich miesiêcy +wprowadzono znaczne zmiany w stosunku zarówno do wersji rozwojowej jak +i stabilnej Gnokii. Ró¿nice te mo¿na scharakteryzowaæ nastêpuj±co: +

    +
  1. +Obs³ugiwane s± praktycznie wszystkie nowe modele Nokii, a liczba dostêpnych +funkcji jest szersza ni¿ w Gnokii. MyGnokii wspó³pracuje z telefonami Nokia +3210, 3310, 8210/8850, 61xx/51xx, 62xx, 7110 oraz 3330. Niestety, trzy +ostatnie modele nie mog± jeszcze wykorzystaæ wszystkich dostêpnych opcji +pakietu. MyGnokii nie zapewnia te¿ du¿ego wsparcia modelom serii 3110/8110 +(tzn. liczba obs³ugiwanych funkcji programu dla tych modeli jest ma³a), +w ogóle nie wspó³pracuje z Noki± 2110.
  2. + +
  3. +W pakiecie wprowadzono pe³n± obs³ugê technologii Smart Messaging. Dziêki +temu MyGnokii nie ma ¿adnych problemów z przesy³aniem czy odbieraniem dzwonków, +obrazków albo wpisów w kalendarzu.
  4. + +
  5. +Dokumentacje obydwu projektów ró¿ni± siê nie tylko form± ale tak¿e tre¶ci±. +Po¶wiêcono jej osobny rozdzia³ w artykule.
  6. + +
  7. +Udostêpniono zestaw standardowych dzwonków i obrazków (m.in. logo startowych) +ró¿nych modeli telefonów Nokia.
  8. + +
  9. +Zmiany kodu ¼ród³owego umo¿liwi³y szybsze dzia³anie programów.
  10. + +
  11. +Dostêpne jest znacznie wiêcej funkcji i opcji w wersji dzia³aj±cej w konsoli +ni¿ w analogicznej aplikacji z gnokii.
  12. + +
  13. +MyGnokii przesta³o byæ oprogramowaniem wy³±cznie dla systemów uniksowych. +Kod ¼ród³owy zawiera od razu w sobie wszystkie poprawki i pliki niezbêdne +do skompilowania w Windows (kompilator Visual C++ 6). Dostêpna jest biblioteka +DLL, któr± mo¿na wykorzystaæ w praktycznie ka¿dym jêzyku programowania +- w pakiecie znajduje siê zreszt± przyk³adowy, wykorzystuj±cy j± interfejs +u¿ytkownika napisany w Delphi. Interfejs mo¿na skompilowaæ u¿ywaj±c bezp³atnego +Delphi 6PE dostêpnego na Chip CD 10/2001 oraz stronie WWW Borlanda. Skompilowana +wersja pakietu i biblioteka DLL dostêpna jest tak¿e na stronie domowej +autora.
  14. + +
  15. +Inna jest struktura kodu odpowiedzialnego za wysy³anie komend do telefonu +i ich odbieranie. Jest ona podobna do tej, która obecna jest w wersji stabilnej +0.3.3 Gnokii.
  16. + +
  17. +Programistów zainteresuj± procedury wspomagaj±ce "podgl±danie" transmisji +prowadzonej z innych programów pomiêdzy komputerem a telefonem (zamiast +prowadziæ reverse engineering programów, których kody ¼ród³owe nie s± dostêpne, +mo¿na pos³u¿yæ siê t± funkcj± programu by uzyskaæ informacje w jaki sposób +inne aplikacje komunikuja siê ze sprzêtem). Oprócz tych funkcji w pakiecie +jest zreszt± zawarta bogata dokumentacja opisuj±ca protoko³y u¿yte w ró¿nych +modelach telefonów.
  18. +
+W momencie dodawania nowych funkcji do Gnokii, czê¶æ z nich jest bie¿±co +adaptowana na potrzeby MyGnokii. Tak by³o np. z poprawkami dotycz±cymi +transmisji danych czy kodowania znaków na potrzeby SMS. +

Niestety, ró¿nice pomiêdzy dystrybucjami powoduj±, ¿e czê¶æ oprogramowania +pisanego dla Gnokii mo¿e nie dzia³aæ z MyGnokii. Jest tak przyk³adowo z +modu³em pozwalaj±cym korzystaæ z funkcji pakietu z programów napisanych +w Perlu. + +

Na pocz±tek

+ +3. Jak telefon z komputerem ...
+


+ +

Istniej± 3 sposoby po³±czenia komputera z telefonem komórkowym: kabel, +podczerwieñ i modu³ Bluetooth. Dwa pierwsze postaramy siê nieco przybli¿yæ. +

    +
  1. +Kabel.
  2. + +
    Mo¿e dzia³aæ w co najmniej jednym z trzech trybów: FBUS, MBUS (s± to +wewnêtrzne protoko³y Nokii) albo w trybie komend AT. Ró¿ni± siê one fizycznie +m.in. prêdko¶ci± transmisji oraz u¿ywanymi sygna³ami z³±cza szeregowego. +Kable przeznaczone dla nowszych modeli telefonów wyprowadzaj± ni¿sze napiêcia. +Oznacza to, i¿ do obs³ugi modeli serii 21xx/31xx/81xx mo¿emy potrzebowaæ +innego kabla ni¿ dla modeli serii 3210, 33xx, 62xx czy 7110. +

    Kable mo¿emy zrobiæ korzystaj±c ze schematów ogólnie dostêpnych w Internecie +(np. w Telekomunikacyjnym Serwisie Informacyjnym fkn.pl) ewentualnie skorzystaæ +z tych dodawanych do oryginalnych pakietów Nokii - np. Nokia Cellular Data +Suite. Nie znajdziemy oczywi¶cie w ¿adnym salonie kabla do modeli serii +3210/33xx/8210/8850 dlatego, i¿ oficjalnie modele te nie maj± takich mo¿liwo¶ci +- dlatego równie¿ wtyczek do nich nale¿y szukaæ wy³±cznie np. na gie³dach +elektronicznych albo w sprzeda¿y wysy³kowej. +

    Odpowiedni kabel mo¿emy tak¿e kupiæ - na stronie domowej Marcina Wi±cka +znajdziemy adresy wytwórców. Polecamy kable FBUS/MBUS (mog± byæ opisane +jako DAU9P), bêd± one dzia³aæ praktycznie z ka¿dym nowszym modelem telefonu. +

    Czê¶æ telefonów (jak np.: 62xx, 7110 czy 8210/8850) posiadaj± wbudowany +modem, z którym mo¿na kontaktowaæ siê poprzez zestaw komend AT (zgodny +z standardem Hayes i normami ETSI). Niestety, aby korzystaæ z niego musimy +nabyæ kabel DLR-3P (ewentualnie starsz± wersjê DLR-3). Obs³uguje on tryb +komend AT oraz FBUS. Mo¿na go wykorzystaæ jedynie z Noki± 62xx/7110 - ze +starszymi modelami nie bêdzie dzia³a³ w ogóle, nawet w trybie FBUS ! Kabel +taki trudno jest wykonaæ samodzielnie - posiada bowiem uk³ad scalony zawieraj±cy +unikalne oprogramowanie Nokii. Z tego te¿ powodu mo¿emy co najwy¿ej poleciæ +odwiedzenie strony "Cable Connecting Data" - oprócz schematu elektrycznego +zawiera tak¿e dane dotycz±ce zaprogramowania wspomnianego uk³adu scalonego. +
      +

  3. +Podczerwieñ.
  4. + +
    Czê¶æ telefonów pozwoli skorzystaæ z podczerwieni. Komunikacja taka +mo¿e byæ realizowana przez dwa rodzaje urz±dzeñ. Pierwsze z nich to specjalny +odbiornik, który pod³±czamy do z³±cza podczerwieni dostêpnego w wiêkszo¶ci +wspó³czesnych p³yt g³ównych (przyk³adowy schemat takiego urz±dzenia oraz +wiêcej informacji na ten temat podano w Chipie 12/2000). Musimy tak¿e uaktywniæ +odpowiedni± opcjê w BIOSie. Sposób ten jest najczê¶ciej realizowany w komputerach +przeno¶nych.Drugi rodzaj urz±dzeñ to tzw. dongle. Jest to pude³eczko pod³±czane +zewnêtrznie do portu szeregowego, zawieraj±ce port podczerwieni oraz ca³± +niezbêdn± elektronikê. +

    Równie¿ komunikacja w podczerwieni mo¿e byæ realizowana na dwa sposoby. +Pierwszy z nich jest u¿ywany we wszystkich nowych modelach: serii 8210/8850 +oraz w modelach 62xx i 7110. Jest to tzw. podczerwieñ socketowa - realizowana +przez system operacyjny komputera. Telefon u¿ywa tutaj pewnego znormalizowanego +(dziêki temu wykorzystywanego w wielu ró¿nych urz±dzeniach) formatu danych. +Czê¶æ funkcji potrzebnych programi¶cie jest wbudowywana w system operacyjny. +W systemie znajduj± siê tak¿e sterowniki do ró¿nych modu³ów podczerwieni. +Programy u¿ywaj±ce tego interfejsu mog± zaj±æ siê wy³±cznie interpretacj± +otrzymywanych komend i ich wysy³aniem (poprzez wykorzystywanie odpowiednich +funkcji systemowych). U¿ycie takiej podczerwieni wymaga w³±czenia jej obs³ugi +w j±drze systemu. +

    Realizacja po³±czenia komputera z telefonem opisanym sposobem wymaga +(oprócz portu podczerwieni oczywi¶cie) aby j±dro Linuksa umo¿liwia³o taki +rodzaj komunikacji, czyli musi byæ skompilowane z odpowiedni± opcj±. Po +aktywacji portu podczerwieni w Nokii, Linux powinien znale¼æ modem bêd±cy +modemem telefonu, z którym komputer po³aczony jest podczerwieni±. +

    Drugi sposób dotyczy wszystkich modeli 61xx oraz 8210/8850 (w tych dwóch +ostatnich podczerwieñ uruchamiamy opcj± w³±czaj±c± dwóch graczy w wê¿a, +a nie z menu g³ównego !). Telefon wykorzystuje tu wewnêtrzny format Nokii. +Poniewa¿ ¿aden system operacyjny nie zapewnia jego obs³ugi, w komputerze +musi byæ uruchomiony odpowiedni program (np. MyGnokii lub Gnokii), który +bezpo¶rednio odczyta i zinterpretuje ka¿dy wys³any z telefonu znak, jak +równie¿ prze¶le ka¿d± komendê z komputera po przekszta³ceniu jej do formatu +Nokii. Taki rodzaj komunikacji podczerwonej to tzw. podczerwieñ bezpo¶rednia. +Aby z niej korzystaæ, j±dro Linuksa nie mo¿e byæ skompilowane z opcj± wspomagania +podczerwnieni (poniewa¿ opcja dotyczy tylko podczerwieni socketowej). Warto +zauwa¿yæ, ¿e MyGnokii nie jest w stanie komunikowaæ siê w ten sposób z +Windows NT/2000/XP - w systemach tych oprogramowanie nie mo¿e bowiem bezpo¶rednio +odwo³ywaæ siê do ¿adnego urz±dzenia. +

    Ograniczeniem metody bezpo¶redniej jest tak¿e to, i¿ MyGnokii i Gnokii +nie obs³uguje wszystkich typów dongle. W chwili obecnej mo¿liwa jest tylko +obs³uga urz±dzeñ zgodnych ze standardem Tekram 210. +
      +

  5. +Bluetooth.
  6. + +
    Modu³y Bluetooth, dostêpne obecnie tylko dla Nokii 6210, s± stosunkowo +s³abo rozpowszechnione i autorzy MyGnokii i Gnokii nie maj± ¿adnych informacji +o mo¿liwo¶ci wykorzystania tej metody komunikacji telefonu z komputerem. +Wydaje siê natomiast, i¿ modu³y te s± ci±gle dopracowywane i lepsz± stabilno¶æ +po³±czeñ uzyskamy u¿ywaj±c podczerwieni lub kabla (wskazuj± na to testy +publikowane w popularnych serwisach telekomunikacyjnych).
+ +

Na pocz±tek

+ +4. Instalacja
+


+ +

Kiedy po³±czylismy ju¿ telefon z komputerem, mo¿emy przyst±piæ do instalowania +i konfigurowania MyGnokii. Powinni¶my pobraæ plik zawieraj±cy kod ¼ród³owy +pakiety mygnokii.tar.gz (pakiet nie jest dostepny w formatach rpm czy deb) +wraz z plikiem zawieraj±cym "skóry" telefonów mygnokii_skins.tar.gz . "Skóry" +to nic innego jak piktogramy telefonów wykorzystywane w X-Window. Przystêpujemy +do instalacji. Najpierw rozpakowujemy pakiet zawieraj±cy kod ¼ród³owy +

tar zxvf mygnokii.tar.gz + +

Wchodzimy od utworzonego +katalogu mygnokii i konfigurujemy MyGnokii. +

./configure --enable-security +

W podanym przyk³adzie, utworzony pakiet bêdzie móg³ odczytaæ informacje +zwi±zane z zabezpieczeniami telefonu (np.: kod zabezpieczaj±cy). +

Je¿eli nie zamierzamy korzystaæ z xgnokii ("okienkowej" wersji gnokii) +powinni¶my do polecenia +./configure +do³±czyæ tak¿e parametr --without-x. +Kompilacja xgnokii jest mo¿liwa o ile posiadamy w systemie pliki nag³ówkowe +do tworzenia programów w gtk (pakiety gtk+-devel-1.2.x, glib-devel-1.2.x) +oraz bibliotekê libXpm. Informacje o innych parametrach, które mog± zostaæ +u¿yte przy konfiguracji znajdziemy w pliku mygnokii/Docs/en_US/gnokii/config.htm. +

W kolejnym kroku kompilujemy pakiet: +

make +

Po kompilacji instalujemy pakiet w systemie wykonuj±c (tutaj s± wymagane +uprawnienia roota): +

make install +

make install-docs +

Od tego momentu w systemie powinny istnieæ polecenia +gnokii (wersja +konsolowa), xgnokii (wersja pod X-windows) oraz gnokiid (transmisja +danych w podczerwieni bezpo¶redniej/przez kabel). +

Pliki ze skórami telefonów do xgnokii rozpakowujemy i kopiujemy +do katalogu xpm utworzonego podczas instalacji xgnokii - +/usr/local/lib/xgnokii/xpm/ +lub +/usr/local/share/xgnokii/xpm/ +zale¿nie +od posiadanej dystrybucji Linuksa. Prawa dostêpu do tych plików ma jedynie +root. Oznacza to, ¿e pozostali u¿ytkownicy systemu nie bêd± mogli w pe³ni +wykorzystaæ mo¿liwo¶ci pakietu. Mo¿emy to jednak zmieniæ, poniewa¿ prawa +dostêpu tych plików nie maj± wp³ywu na bezpieczeñstwo systemu (chmod +a+rw *). +

W odró¿nieniu od MyGnokii, Gnokii jest udostêpniana tak¿e jako plik +rpm, deb albo w formie CVS. Instalacja z posiadanego kodu ¼ród³owego przebiega +podobnie (nie trzeba jednak instalowaæ "skór" z oddzielnego pliku - s± +w³±czone w pakiecie). Natomiast instalacja pliku w formacie rpm lub deb +przebiega tak samo jak innych pakietów w tych formatach. +

Objêtnie czy korzystamy z pakietu Gnokii czy MyGnokii polecenia uruchamiaj±ce +aplikacjê (gnokii w trybie tekstowym i xgnokii w trybach +graficznych) s± takie same. + +

Na pocz±tek

+ +5. Konfiguracja.
+


+ +

+

Przyk³adowy zbiór konfiguracyjny znajdziemy w katalogu mygnokii/Docs/examples +(w +Gnokii bêdzie to katalog gnokii/Docs/sample) pod nazw± gnokiirc. +Kopiujemy go do katalogu domowego pod nazw±..gnokiirc +lub katalogu +/etc +jako gnokiirc. W sekcji +global ustawiamy nastêpuj±ce parametry: +

    +
  • +Port - podajemy port, do którego do³±czony jest telefon. Mo¿e to +byæ/dev/ircommx w przypadku podczerwieni socketowej lub /dev/ttySx +w pozosta³ych (zamiast x wstawiamy numer portu). Nale¿y oczywi¶cie +mieæ prawa dostêpu do wybranego portu (mo¿na je ustawiæ np. przez chmod +u+rwx nazwa_portu)
  • + +
  • +Model - podajemy model telefonu, np. 6210. +Podanie nazwy +konkretnego modelu wymagane jest je¶li u¿ywamy Gnokii. Korzystaj±c z MyGnokii, +mo¿emy te¿ u¿yæ parametru +auto i pakiet przy ka¿dym po³±czeniu bêdzie +próbowa³ automatycznie wykryæ model.
  • + +
  • +Initlength - w przypadku trybu komunikacji FBUS przez kabel albo +przy u¿yciu bezpo¶redniej podczerwieni mo¿na skróciæ czasu synchronizacji +pomiêdzy urz±dzeniami. Nale¿y pamiêtaæ, i¿ zbytnie zmniejszenie tego parametru +mo¿e uniemo¿liwiæ komunikacjê. W wiêkszo¶ci przypadków warto¶æ 30 jest +tutaj w zupe³no¶ci wystarczaj±ca, w razie potrzeby nale¿y j± zwiêkszyæ.
  • + +
  • +Connection - typ po³±czenia. Podawanym parametrem mo¿e byæ irda +(podczerwieñ przez sockety), +infrared (podczerwieñ bezpo¶rednia), +tekram210 +(podczerwieñ bezpo¶rednia przez dongle zgodne ze standardem Tekram 210), +mbus +(tylko w MyGnokii: standard MBUS), serial (w Gnokii) albo fbus +(w MyGnokii) - standard FBUS.
  • + +
  • +Synchronizetime - parametr wystêpuje wy³±cznie w MyGnokii. Przenosi +datê i czas komputera do telefonu przy ka¿dym po³±czeniu (opcja przydatna, +gdy synchronizujemy czas w komputerze z serwerów internetowych). Uwaga: +ustawienie czasu w telefonie mo¿e powodowaæ pewne drobne problemy - je¿eli +w trakcie tej samej sesji (w której ustawili¶my czas) zresetujemy telefon, +czas bêdzie trzeba ustawiæ ponownie.
  • +
+Je¶li chcemy korzystaæ z programu +gnokiid, ustawienia z sekcji +global +nale¿y powtórzyæ w sekcji +gnokiid. + +

Na pocz±tek

+ +6. Na konsoli i w X Window
+


+ +

Zarówno Gnokii jak i MyGnokii umo¿liwiaj± pracê w trybie tekstowym (w +x-terminalu i na konsoli) jak i w trybach graficznych. Praca w trybie tekstowym +nie jest zbyt wygodna (przyk³ady podane zosta³y w ramce na koñcu tekstu), +pozwala jednak wykorzystaæ w pe³ni wszystkie mo¿liwo¶ci programu. O ile +skompilowali¶my pakiet wraz z xgnokii czyli interfejsem graficznym, +wygodniej jest korzystaæ z MyGnokii w X Window. Mo¿liwo¶ci pakietu s± naprawdê +du¿e. MyGnokii umo¿liwia m. in. obs³ugê smsów, kalendarza (tworzenie i +edycja notatek), ksi±¿ki telefonicznej, tworzenie i przesy³anie logo oraz +melodyjek. Oprogramowanie pozwala tak¿e uruchomiæ monitor sieci - funkcjê +umo¿liwiaj±c± poznanie parametrów pracy sieci GSM i telefonu. + +

Na pocz±tek

+ +7. Konkurencja
+


+ +

MyGnokii oraz Gnokii nie maj± konkurentów w ¶rodowisku uniksowym. Jednak +w systemie MS Windows, konkurencja dla MyGnokii jest silna. Najpopularniejszymi +programami do obs³ugi telefonów komórkowych s± z ca³± pewno¶ci± LogoManager +i Oxygen. LogoManager pozwala u¿ytkownikowi na tworzenie i przesy³anie +logo oraz melodyjek. Umo¿liwia tak¿e edycjê ksi±¿ki telefonicznej oraz +wysy³aæ standardowe smsy, jednak tutaj oferowane mo¿liwo¶ci s± bardzo ograniczone. +Natomiast Oxygen jest ¶wietnym programem do modyfikowania ksi±¿ki telefonicznej, +edycji notatek w kalendarzu, potrafi tak¿e wymieniaæ dane pomiêdzy telefonem +a MS Outlook i Lotus Notes. Podobnie jak LogoManager potrafi tworzyæ loga +nie mniej ustêpuje temu ostatniemu pod wzglêdem wygody obs³ugi. Wielu u¿ytkowników +korzysta z obydwu programów wykorzystuj±c Oxygen do zarz±dzania informacj± +w telefonie, a LogoManager do tworzenia i wysy³ania grafik i d¼wiêków. +Nie jest to zbyt wygodne rozwi±zanie. Najwiêksz± wad± tych programów jest +jednak to, ¿e s± p³atne. Mo¿na oczywi¶cie za darmo pobraæ wersje shareware, +jednak posiadaj± one istotne ograniczenia wp³ywaj±ce na ich funkcjonalno¶æ. +

MyGnokii ³±czy w sobie zalety wymienionych wy¿ej programów. - wszystkie +mo¿liwo¶ci oferowane przez LogoManager czy Oxygen s± dostêpne tak¿e w MyGnokii. +Jedynym wyj±tkiem jest tu wymiana informacji pomiêdzy MyGnokii a MS Outlook +czy Lotus Notes. Jak ka¿de oprogramowanie dostêpne na licencji GNU, nie +posiada ograniczeñ czasowych czy funkcjonalnych. Co wiêcej, jest udostêpniane +z pe³nym kodem ¼ród³owym i pozwala na wykorzystanie funkcji telefonów we +w³asnych aplikacjach. +

Nie znaczy to oczywi¶cie, ¿e MyGnokii jest pakietem idealnym. Pracuj±ca +w trybie tekstowym gnokii zosta³a dobrze dopracowana. Jedynie okienkowa +wersja pakietu, xgnokii, mimo ¿e bardzo prosta i intuicyjna w obs³udze, +mo¿e sprawiæ ma³y zawód. Wersja xgnokii zawarta w pakiecie pochodzi +sprzed prawie pó³tora roku i niestety nie jest niestety dokoñczona. Podczas +testów przeprowadzonych przy u¿yciu dwóch telefonów Nokia 6210, stwierdzili¶my +problemy z obs³ug± kalendarza i ksi±¿ki telefonicznej. W przypadku kalendarza +- czê¶æ typów alarmów nie mo¿na by³o ustawiæ. Z kolei ksi±¿ka telefoniczna +nie umo¿liwia³a zapisywania zmian na karcie SIM telefonu, ponadto nie mo¿na +by³o wprowadziæ nowego numeru telefonu. Oczywi¶cie problemy te znika³y, +kiedy korzystano z gnokii w trybie tekstowym, trzeba jednak przyznaæ, +¿e praca w trybie graficznym jest znacznie prostsza i przyjemniejsza ni¿ +w trybie tekstowym. + +

Na pocz±tek

+ +8. Transmisja danych
+


+ +

Transmisja danych realizowana jest przez ró¿ne modele telefonów Nokia +ró¿nymi sposobami. W dodatku, nie w ka¿dym modelu jest ona mo¿liwa. +

MyGnokii (równie¿ Gnokii) daje u¿ytkownikowi narzêdzie, jakim jest gnokiid, +s³u¿±ce przesy³aniu danych w starszych modelach telefonów. +

Transmisja danych z u¿yciem +gnokiid jest prowadzona w specyficzny +sposób. Po po³±czeniu siê z telefonem poprzez kabel/podczerwieñ w wersji +bezpo¶redniej gnokiid przetwarza dane z telefonu do postaci komend +AT, które s± przekazywane do innych programów w komputerze. Podobnie w +przypadku otrzymania komendy AT, jest ona przetwarzana do postaci wewnêtrznych +poleceñ Nokii i przesy³ana do telefonu. + +

Gnokiid mo¿na wykorzystywaæ tylko z telefonami serii 31xx/51xx/61xx/81xx. +Je¿eli chodzi o modele 21xx, brak jest odpowiednich funkcji. Nie zosta³y +one bowiem przeniesione z oryginalnego oprogramowania Nokii (pakietu Nokia +CellWare) z tej prostej przyczyny, i¿ po prostu nie ma chêtnych do wykonania +tego zadania. +

A co maj± zrobiæ u¿ytkownicy nowszych telefonów ? W przypadku modeli +3210/33xx transmisja danych jest oficjalnie niedostêpna i projektanci MyGnokii +i Gnokii nie posiadaj± ¿adnych informacji, czy funkcja ta faktycznie zosta³a +usuniêta z oprogramowania telefonów, czy te¿ zosta³ zmieniony sposób jej +wywo³ania. +

Z kolei w telefonach serii 62xx/7110/8210/8850 ¿adne dodatkowe oprogramowanie +nie jest konieczne. Telefony te maj± wbudowane modemy, wystarczy wiêc zakupiæ +kabel (DLR-3P) lub wykorzystaæ porty podczerwieni by transmisja by³a mo¿liwa. +Korzystaj±c z narzêdzi dostepnych w systemie (np.: modemtool w dystrybucji +Red Hat) Linux powinien rozpoznaæ przy³±czony telefon jako modem i zainstalowaæ +go w systemie. Dalsza komunikacja ze sprzêtem odbywa siê tak, jak z tradycyjnym +modemem. +

Konfiguruj±c dostêp do Internetu musimy tylko pamiêtaæ, ¿e powinni¶my +korzystaæ ze specjalnych numerów dostêpowych naszego operatora sieci GSM +a nie np.: z numeru dostêpowego TPSA. Ten drugi mo¿e byæ bowiem niedostêpny. +Je¿eli natomiast uda siê z nim nawet po³±czyæ, jego u¿ycie bêdzie na pewno +znacznie dro¿sze. + +

Na pocz±tek

+ +9. Dokumentacja
+


+ +

W pakiecie u¿ytkownik znajdzie wyczerpuj±c± dokumentacjê, napisan± w +formacie HTML. W procesie instalacji jest kopiowana z lokalnego katalogu +z plikami ¼ród³owymi do folderu +/usr/local/doc/gnokii. W podkatalogach +znajdziemy tak¿e loga do aparatów 3210, 3310, 6150 oraz 6210 oraz d¼wiêki +(melodyjki), które mo¿emy przes³aæ do telefonu. Znajdziemy tak¿e przyk³adowy +zbiór konfiguracyjny oraz przyk³adowe pliki z danymi do wykorzystania z +ró¿nymi opcjami. +

Zawarta dokumentacja jest bardzo obszerna. W detalach opisuje procesy +instalacji i konfiguracji (ze szczegó³ami wyja¶nia znaczenie poszczególnych +komend), opisuje w jaki sposób po³aczyæ telefony 6210 i 7110 z komputerem +przez podczerwieñ, wyja¶nia dostêpne polecenia gnokii. Dociekliwi +znajd± bardzo szczegó³owe informacje o uruchomieniu i korzystaniu z monitora +sieci, poradnik jak wykonaæ kabel ³±cz±cy telefon z komputerem, informacje +o zmianach w oprogramowaniu telefonów, kodach i dokumentacjê protoko³ów +transmisji. +

Niestety, prawie wszystkie informacje podane zosta³y w jêzyku angielskim. + +

Na pocz±tek

+ +10. Przysz³o¶æ
+


+ +

Niestety, nie rysuje siê ona najlepiej. Gnokii i MyGnokii s± rozwijane +oddzielnie przez niewielkie grupy programistów, którzy nie maj± dostêpu +do wszystkich sprzedawanych telefonów. A sami u¿ytkownicy tego oprogramowania +najczê¶ciej nie s± niestety zainteresowani jak±kolwiek pomoc± w ulepszaniu +pakietów czy zg³aszaniu lub usuwaniu b³êdów. +

Natomiast ci±gle jest wiele do zrobienia: dokoñczenie graficznych interfejsów +u¿ytkownika, stworzenie bardziej wyspecjalizowanych struktur do obs³ugi +niektórych funkcji (przyk³adowo: ulepszenie czê¶ci zwi±zanej z sms), upraszczanie +kodu ¼ród³owego tak, aby implementacja obs³ugi nowych modeli by³a ³atwiejsza, +dodanie funkcji obecnych w innych pakietach "komórkowych", rozszerzenie +obs³ugi komend AT. Na pewno tak¿e sporo bêdzie do zrobienia z nowymi modelami +(np. Noki± 5510, która bêdzie siê ³±czyæ z komputerem przez USB). +

Bez tego oba pakiety z czasem stan± siê wy³±cznie ciekawostk±. Miejmy +jednak nadziejê, i¿ tak siê nie stanie i znajd± siê programi¶ci oraz u¿ytkownicy, +którzy pomog± w rozszerzaniu opisywanego oprogramowania. Naprawdê nie trzeba +tutaj du¿o: wystarczy znajomo¶æ programowania w Delphi (w celu dokoñczenia +instniej±cego interfejsu graficznego), Visual Basic (mo¿e kto¶ zdecyduje +siê na rozpoczêcie napisania w³asnej wersji okienkowej Logo Managera ?), +C (rozszerzanie ca³o¶ci pakietu lub jego czê¶ci o nowe funkcje oraz usuwanie +b³êdów), C++, pisania programów w GTK (dokoñczenie Xgnokii) albo chocia¿by +znajomo¶æ HTML (opieka nad dokumentacj±). Mile widziana by³aby tak¿e pomoc +zaawansowanych programistów - wszak odkrywanie funkcji nowych modeli jest +fascynuj±c± przygod±, podobnie interesuj±cym wyzwaniem mo¿e byæ kwestia +stworzenia w³asnego sterownika modemu do starszych modeli telefonów do +systemu Windows. Przeszkod± nie powinna byæ tutaj bariera jêzykowa (nie +trzeba znaæ jêzyka angielskiego) - wszak zarówno MyGnokii i Gnokii s± aktywnie +tworzone przez Polaków - m.in. Marcina Wi±cka i Paw³a Kota. Mo¿na siê z +nimi skontaktowaæ pod adresami email podanymi w ramce "Sieæ". + +

Marcin Wi±cek +
Ryszard Gabryszewski
+ +

Na pocz±tek

+ +11. Czy tylko Nokia ?
+


+ +

Telefony Nokii s± najbardziej rozpowszechnionymi aparatami komórkowymi +nie tylko w Polsce, tak¿e na ¶wiecie. Wiêcej, nazwa firmy sta³a siê wrêcz +synonimem "komórki". Tak wiêc powstanie pakietów, które umo¿liwiaj± komunikacje +Linuksa z tym typem aparatów nie powinno wydawaæ siê dziwne. +

Na szczê¶cie posiadacze Ericssonów, Alcateli, Siemensów i innych nie +powinni traciæ nadziei :-) Istnieje tak¿e inny, ciekawy projekt Open Source: +gsmlib. Ma on na celu tworzenie biblioteki i programów w wersji na konsolê +pozwalaj±cych wykonywaæ podstawowe czynno¶ci typu edycja ksi±¿ki telefonicznej +czy smsów w telefonach u¿ywaj±cych komend AT. Podobnie jak MyGnokii mo¿na +go bez problemu kompilowaæ i u¿ywaæ tak¿e w Windows. Gsmlib obecnie rozwija +siê znacznie szybciej ni¿ MyGnokii czy Gnokii. Dzieje siê tak dlatego, +poniewa¿ coraz wiêcej telefonów jest wyposa¿anych w komendy AT. A to oznacza, +¿e popularno¶æ projektu z czasem bêdzie coraz bardziej rosn±æ. + +

Na pocz±tek

+ +12. MyGnokii w trybie tekstowym
+


+ +

Poni¿ej zosta³y podane przyk³ady u¿ycia poleceñ i funkcji MyGnokii w +trybie tekstowym. +

+Ksi±¿ka telefoniczna

+gnokii --getmemory SM 1 10 -short > ks-tel.txt +

Pobiera pierwszych 10 numerów z ksi±¿ki telefonicznej na karcie SIM +i zapisuje w pliku ks-tel.txt. Je¿eli nie podamy parametru -short, +zostanie u¿yty format bardziej czytelny dla u¿ytkownika, ale nie bêdzie +mo¿na u¿yæ opcji --writephonebook z utworzonym plikiem. +

gnokii --writephonebook < ks-tel.txt +

Odtwarza ksi±¿kê telefoniczn± z pliku ks-tel.txt. +

+SMS

+gnokii --getsms SM 1 +

Pobiera SMS z karty SIM, pozycja 1. +

gnokii --sendsms +48601234567 -d --long 200 < file +

Czyta 200 znaków z pliku file, tworzy z nich tre¶ci SMSów (tutaj bêd± +2 SMSy - pierwszy o d³ugo¶ci 160 znaków) i wysy³a pod numer +48601234567. +W telefonie zostanie zapisany raport dorêczenia. Je¿eli zast±pimy --sendsms +przez --savesms, SMSy zostan± zapisane na karcie SIM. Dodanie parametru +--unicode +spowoduje ich zakodowanie w Unicodzie (wtedy w jednym mo¿e zmie¶ciæ siê +tylko 70 znaków, ale bêd± mog³y to byæ wszystkie znaki ze strony kodowej +w komputerze). +

gnokii --getsmsc 1 +

Pobiera pierwszy numer centrum SMS zapisany na karcie SIM. +

gnokii --renamesmsc 1 "Era GSM" +

Zmienia nazwê pierwszego centrum SMS na karcie SIM +

+Czas i data

+gnokii --setdatetime +

Ustawia w telefonie czas z komputera. Ustawianie czasu mo¿e byæ wymuszone +tak¿e opcj± synchronizetime w zbiorzegnokiirc. +

gnokii --setalarm 22 10 +

Ustawia w telefonie alarm na godzinê 22:10. +

+Kalendarz

+gnokii --getcalendarnote 1 3 -v30 +

Pobiera pierwsz±, drug± i trzeci± notatkê z kalendarza telefonu (w Nokii +33xx jest on okrojony do 10 przypomnieñ - pod tak± nazw± kalendarz dostêpny +jest w menu telefonu). Je¿eli nie podamy parametru -v30, zostanie +u¿yty format bardziej czytelny dla u¿ytkownika, ale nie bêdzie mo¿na u¿yæ +opcji --writecalendarnote i --sendcalendarnote z utworzonym +plikiem. +

gnokii --sendcalendarnote +48601234567 vcardfile 1 -d +

Odczytuje 1 pozycjê z pliku +vcardfile i wysy³a pod numer +48601234567 +z raportem dorêczenia (opcja +--getcalendarnote wypisze tre¶æ takiej +notki, je¿eli dodamy prze³±cznik -v30). +

gnokii --writecalendarnote vcardfile 1 +

Odczytuje 1 pozycjê z pliku +vcardfile i wpisuje do telefonu (opcja +--getcalendarnote +wypisze tre¶æ takiej notki, je¿eli dodamy prze³±cznik -v30). +

+Dzwonki

+ +


gnokii --playringtone ringtonefile +

Odtwarza plik z dzwonkiem (format mid albo rttl) z pliku ringtonefile +prze g³o¶nik telefonu. +

gnokii --composer ringtonefile +

Pokazuje, co i jak nale¿y wpisaæ w kompozytorze dostêpnym w menu np. +Nokii 3210/33xx, aby uzyskaæ dzwonek z pliku ringtonefile (nie wymaga +po³±czenia z telefonem). +

gnokii --setringtone plik 1 +

Ustawia dzwonek ze zbioru plik na pozycji 1. +

gnokii --sendringtone +48602123456 plik -d --scale --profilestyle +

Wysy³a dzwonek pod numer +48602123456 z raportem dorêczenia. Opcja --scale +jest konieczna do u¿ycia w przypadku b³êdnej interpretacji dzwonków przez +niektóre modele (np. starsze Nokie 3310). Opcja +--profilestyle pozwala +zapisaæ d³ugie dzwonki w 2 SMSach. Bêd± one poprawnie interpretowane wy³±cznie +przez nowsze telefony - np. Nokie 3330. +

gnokii --setbinringtone plik 1 +

Je¿eli mamy plik z dzwonkiem w specjalnym formacie binarnym (w MyGnokii +tak s± zapisane wszystkie standardowe dzwonki umieszczone w katalogu +mygnokii/Docs/default/sounds), +przy pomocy tej opcji mo¿na je w niektórych modelach - np. serii 61xx/6210 +- ustawiæ jako dzwonki wgrywane przez u¿ytkownika). +

gnokii --getringtone plik 1 +

Pobiera dzwonek z pozycji 1 i zapisuje w zbiorze plik. Dzwonek +zostanie zapisany w formacie binarnym (Nokie 6xxx/3210) albo standardowym +(Nokie 33xx). +

+WAP

+gnokii --getwapbookmark 1 +

Pobiera zak³adkê WAP z pozycji 1. +

gnokii --sendwapbookmark 1 +48602123456 -d +

Pobiera zak³adkê WAP z pozycji 1 i wysy³a pod numer +48602123456 (z +raportem dorêczenia). +

gnokii --getwapsettings 1 +

Pobiera ustawienia WAP z pozycji 1. +

+Loga i obrazki

+gnokii --showbitmap logofile +

Pokazuje logo z pliku logofile. Dostêpne formaty: bmp (2 kolorowe), +ngg, nol, nlm, nsm. +

gnokii --getlogo picture plik.nlm 1 +

Pobiera grafikê (tzw. Picture Image) z pozycji 1 i zapisuje w zbiorze +plik.nlm. +

gnokii --setlogo picture plik.nlm 1 "tekst" +48602123456 +

Odczytuje grafikê ze zbioru plik.nlm i zapisuje na pozycji 1 z dodatkowym +tekstem "tekst" i numerem +48602123456. +

gnokii --sendlogo picture +48602123456 plik.nlm "tekst" -d +

Wysy³a grafikê pod podany numer z raportem dorêczenia i dodatkowym tekstem +(Uwaga: 1 grafika to 3 SMSy). +

gnokii --getlogo startup|7110startup|6210startup plik.nlm +

Pobiera logo startowe (parametry +7110startup lub 6210startup +pozwalaj± pobraæ loga o rozmiarach wy¶wietlaczy Nokii 7110 i 6210) i zapisuje +w pliku plik.nlm. Opcja +--setlogo z takimi samymi parametrami +ustawia logo w telefonie. W nowszych Nokiach 3210 oraz z serii 33xx przed +wgraniem loga, trzeba u¿yæ opcji +--resetphonesettings, która wykasuje +logo animowane (Uwaga: nie bêdzie mo¿na potem do niego powróciæ !). +

gnokii --getlogo op|7110op plik.nlm +

Pobiera logo operatora (parametr +7110op pozwala pobraæ logo o +rozmiarach dostêpnych w Nokii 62xx/7110) i zapisuje w pliku plik.nlm. +

gnokii --setlogo op|7110op plik.nlm +

Ustawia logo operatora (je¿eli nie podamy nazwy pliku, logo zostanie +wykasowane w telefonie). +

gnokii --sendlogo op +48602123456 logo.nlm kod_operatora -d +

Wysy³a logo operatora (uwaga, du¿ych logo znanych z Nokii 62xx/7110 +nie mo¿na przesy³aæ) pod numer +48602123456 z raportem dorêczenia. Logo +bêdzie pokazywane w sieci o kodzie kod_operatora ("260 01" dla Plusa, +"260 02" dla Ery i "260 03" dla Idei). Je¿eli nie podamy numeru odbiorcy, +parametru -d i zamienimy --sendlogo przez +--savelogo, logo +zostanie zapisane na karcie SIM. +

gnokii --getlogo caller logo.nlm 1 +

Pobiera logo grupy o numerze 1 i zapisuje w pliku +logo.nlm. Je¿eli +zast±pimy --getlogo przez --setlogo, logo zostanie ustawione +w telefonie. +

gnokii --setlogo dealer "tekst" +

Ustawia w telefonie tzw. powitanie dealera - tekst z powitaniem widoczny +po w³±czeniu telefonu, którego nie mo¿na ustawiæ z jego menu. +

+Inne

+ +


gnokii --reset soft +

Resetuje telefon. +

gnokii --dialvoice +48601123456 +

Inicjuje po³±czenie g³osowe pod numer +48601123456. +

gnokii --netmonitor devel +

W³±cza pe³ne menu monitora sieci w telefonie (opcja ta pozwala dok³adnie +sprawdzaæ stan sieci komórkowej "widzianej" przez telefon oraz pokazuje +dok³adne informacje o samym telefonie, karcie SIM oraz baterii). Szerzej +o tej funkcji mo¿na przeczytaæ na stronie autora artyku³u lub w dokumentacji +MyGnokii. W przypadku niektórych wersji oprogramowania telefonu, niezbêdne +bêdzie wy³±czenie i ponowne w³±czenie aparatu by pojawi³a siê w nim nowa +pozycja w menu. +

gnokii --identify +

Pokazuje podstawowe informacje o telefonie - m.in. model i wersjê oprogramowania. +

gnokii --presskeysequence sequence +

W telefonie "wciska" kombinacjê klawiszy sequence. +

gnokii --getsecuritycode SecurityCode +

Pobiera z telefonu kod zabezpieczaj±cy (SecurityCode). Opcja dostêpna +wy³±cznie, gdy przy wywo³aniu skryptu configure dodano prze³±cznik--enable-security. +

gnokii --simlock +

Informacje o simlocku - zabezpieczeniu uniemo¿liwiaj±cym korzystanie +z kart SIM innych ni¿ macierzystego operatora GSM. Blokada taka pojawia +siê najczê¶ciej w telefonach sprzedawanych w promocjach. +

gnokii --phonetests +

Wykonuje test telefonu. Krótkie wyja¶nienie do testów REAL TIME CLOCK +BATTERY oraz MCU EEPROM COMPONENT: pierwszy testuje dzia³anie baterii podtrzymuj±cej +datê/czas w telefonie po od³±czeniu baterii g³ównej. Baterii tej nie ma +m.in w Nokiach 3210 i 33xx i wtedy bêdzie on mia³ b³êdny wynik. Nie jest +to jednak uszkodzenie telefonu ! Podobnie we wszystkich nowych modelach +(33xx, 62xx, 7110, 8210/8850 i nowszych) pamiêæ z ustawieniami telefonu +(EEPROM) nie jest w formie oddzielnego uk³adu scalonego i program równie¿ +poka¿e tutaj b³±d. +

gnokii --displayoutput +

Pokazuje na ekranie komputera teksty wy¶wietlane przez telefon (dotyczy +serii 51xx/61xx). + +

Na pocz±tek

+ +13. Porównanie
+


+ +

Poni¿sza tabela zbiera informacje dotycz±ce sposobów komunikacji pomiêdzy +telefonem a komputerem. Znak zapytania w komórce oznacza, ¿e dana konfiguracja +nie by³a jeszcze sprawdzana. Natomiast znak x oznacza brak mo¿liwo¶ci wspó³pracy. +
  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
  +
Mbus
+
+
Fbus
+
+
Podczerwieñ bezpo¶rednia
+
+
Podczerwieñ socketowa
+
+
Nokia 21xx/9000
+
+
Gnokii
+
+
X
+
+
X
+
+
X
+
+
31xx/81xx
+
+
X
+
+
MyGnokii +

Gnokii

+
+
X
+
+
X
+
+
3210/33xx
+
+
MyGnokii
+
+
MyGnokii +

Gnokii

+
+
X
+
+
X
+
+
51xx
+
+
MyGnokii
+
+
MyGnokii +

Gnokii

+
+
X
+
+
X
+
+
61xx
+
+
MyGnokii
+
+
MyGnokii +

Gnokii

+
+
MyGnokii +

Gnokii

+
+
X
+
+
62xx/7110
+
+
MyGnokii
+
+
MyGnokii +

Gnokii

+
+
X
+
+
MyGnokii +

Gnokii

+
+
8210/8850
+
+
MyGnokii
+
+
MyGnokii +

Gnokii

+
+
MyGnokii
+
+
MyGnokii
+
+
9110/9210
+
+
MyGnokii
+
+
X
+
+
?
+
+
?
+
+
Nokia Card Phone 2.0
+
+
MyGnokii +

(czê¶ciowo)

+
+
X
+
+
X
+
+
X
+
+ +

Na pocz±tek

+ +14. Sieæ
+


+ +

MyGnokii +
http://marcin-wiacek.topnet.pl +
marcin-wiacek@topnet.pl +

Gnokii +
http://www.gnokii.org +
ftp://urtica.linuxnews.pl/pub/people/pkot/gnokii/ +
pkot@linuxnews.pl +

GSMLib +
http://www.pxh.de/fs/gsmlib/ +

Kable +
http://www.fkn.pl/varia/kable.html +
http://www.atrox.at/datacable/ +

Specyfikacje GSM +
http://www.etsi.org +

Windows & Nokia +

Oxygen Phone Manager: http://www.oxygensoftware.com +
ActiveX dla Nokii: http://www.gertjaap.com/ +
Logo Manager: http://www.logomanager.co.uk + +

Na pocz±tek + + + diff --git a/Docs/pl_PL/styl.css b/Docs/pl_PL/styl.css new file mode 100644 index 0000000..02b023e --- /dev/null +++ b/Docs/pl_PL/styl.css @@ -0,0 +1,46 @@ + + + diff --git a/INSTALL b/INSTALL new file mode 100644 index 0000000..3551ce2 --- /dev/null +++ b/INSTALL @@ -0,0 +1,54 @@ + + TODO: write me! + + For package building see the 'Docs/packaging-howto' file. + +0/ If you got an CVS version + + autoconf + +1/ + ./configure [ option ] + + where basic options: + + --prefix=DIR + Install path prefix. Default /usr/local/ + + --without-x + Compile without GTK (Xwin) programs + + --disable-nls + Set if you don't have/want GNU gettext support + + --enable-security + Set if you want to enable all security features + + --enable-debug + Set if you want debug code in gnokii + + --help + show all options + + + Good default (example): + + ./configure --prefix=/usr \ + --enable-gettext + +2/ + compilation: + + make + groupadd gnokii - it is really needed + (make dep - if you want/need) + make install + make install-docs + + clean source: + + make clean - standard clean + make distclean - clean all ./configure outputs + (after this command you must run + ./configure again if you need use + any Makefile) diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1feaf9c --- /dev/null +++ b/Makefile @@ -0,0 +1,208 @@ + +# +# $Id$ +# +# Makefile for the GNOKII tool suite. +# +# Copyright (C) 1999 Hugh Blemings & Pavel Janík ml. +# 2000 Karel Zak +# + +TOPDIR=. + +# +# Makefile.global contains gnokii global settings +# +include ${TOPDIR}/Makefile.global + +BIN_DIRS = gnokii + +ifndef WIN32 +BIN_DIRS += gnokiid +BIN_DIRS += mgnetd +BIN_DIRS += mgnetd/mg_demo_client +endif + +DIRS = common \ + Docs \ + $(BIN_DIRS) + +# +# For now gnokiid and utils only make sense on Unix like systems. +# Some other stuff that makes only sense on Win32 platform. +# + +ifndef WIN32 +DIRS += utils +endif + +GTK_DIRS = xgnokii \ + xlogos + +PO_DIR = po +DOCS_DIR = Docs + +all: $(DIRS) + @if [ "x$(USE_NLS)" = xyes ]; then \ + $(MAKE) -C $(PO_DIR); \ + fi + + @if [ "$(GTK_LIBS)" ]; then \ + for dir in $(GTK_DIRS); do \ + if [ -e $$dir/Makefile ]; then \ + $(MAKE) -C $$dir; \ + fi; \ + done \ + fi + @echo "done" + +makelib: + @for dir in $(DIRS); do \ + if [ -e $$dir/Makefile ]; then \ + $(MAKE) -C $$dir makelib; \ + fi; \ + done + @if [ "x$(USE_NLS)" = xyes ]; then \ + $(MAKE) -C $(PO_DIR) makelib; \ + fi + + @if [ "$(GTK_LIBS)" ]; then \ + for dir in $(GTK_DIRS); do \ + if [ -e $$dir/Makefile ]; then \ + $(MAKE) -C $$dir makelib; \ + fi; \ + done \ + fi + @echo "done" + +dummy: + +$(DIRS): dummy + $(MAKE) -C $@ + +clean: + $(RM) *~ *.orig *.rej include/*~ include/*.orig include/*.rej + @for dir in $(DIRS); do \ + if [ -e $$dir/Makefile ]; then \ + $(MAKE) -C $$dir clean; \ + fi; \ + done + @if [ "x$(USE_NLS)" = xyes ]; then \ + $(MAKE) -C $(PO_DIR) clean; \ + fi + +ifdef OWN_GETOPT + $(MAKE) -C getopt clean +endif + + @if [ "$(GTK_LIBS)" ]; then \ + for dir in $(GTK_DIRS); do \ + if [ -e $$dir/Makefile ]; then \ + $(MAKE) -C $$dir clean; \ + fi; \ + done \ + fi + + $(MAKE) -C Docs clean + + @echo "done" + +distclean: clean + @if [ -e $(PO_DIR)/Makefile ]; then \ + $(MAKE) -C $(PO_DIR) distclean; \ + fi + $(RM) Makefile.global config.cache config.log config.status \ + include/config.h \ + include/config.h.in \ + packaging/RedHat/gnokii.spec \ + packaging/Slackware/SlackBuild \ + po/Makefile.in \ + debian + +dep: + @for dir in $(DIRS); do \ + if [ -e $$dir/Makefile ]; then \ + $(MAKE) -C $$dir dep; \ + fi; \ + done + + @if [ "$(GTK_LIBS)" ]; then \ + for dir in $(GTK_DIRS); do \ + if [ -e $$dir/Makefile ]; then \ + $(MAKE) -C $$dir dep; \ + fi; \ + done \ + fi + @echo "done" + +install: + @for dir in $(DIRS); do \ + if [ -e $$dir/Makefile ]; then \ + $(MAKE) -C $$dir install; \ + fi; \ + done + @if [ "x$(USE_NLS)" = xyes ]; then \ + $(MAKE) -C $(PO_DIR) install; \ + fi + + @if [ "$(GTK_LIBS)" ]; then \ + for dir in $(GTK_DIRS); do \ + if [ -e $$dir/Makefile ]; then \ + $(MAKE) -C $$dir install; \ + fi; \ + done \ + fi + @echo "done" + +install-docs: + $(MAKE) -C $(DOCS_DIR) install + @echo "done" + +install-strip: + @for dir in $(BIN_DIRS); do \ + if [ -e $$dir/Makefile ]; then \ + $(MAKE) -C $$dir install-strip; \ + fi; \ + done + + @if [ "$(GTK_LIBS)" ]; then \ + @for dir in $(GTK_DIRS); do \ + if [ -e $$dir/Makefile ]; then \ + $(MAKE) -C $$dir install-strip; \ + fi; \ + done \ + fi + @echo "done" + +install-suid: + @for dir in $(BIN_DIRS); do \ + if [ -e $$dir/Makefile ]; then \ + $(MAKE) -C $$dir install-suid; \ + fi; \ + done + @if [ "$(GTK_LIBS)" ]; then \ + @for dir in $(GTK_DIRS); do \ + if [ -e $$dir/Makefile ]; then \ + $(MAKE) -C $$dir install-suid; \ + fi; \ + done \ + fi + @echo "done" + +install-ss: + @for dir in $(BIN_DIRS); do \ + if [ -e $$dir/Makefile ]; then \ + $(MAKE) -C $$dir install-ss; \ + fi; \ + done + + @if [ "$(GTK_LIBS)" ]; then \ + for dir in $(GTK_DIRS); do \ + if [ -e $$dir/Makefile ]; then \ + $(MAKE) -C $$dir install-ss; \ + fi; \ + done \ + fi + @echo "done" + +.PHONY: all install clean distclean dep depend install-docs diff --git a/Makefile.global.in b/Makefile.global.in new file mode 100644 index 0000000..23fa672 --- /dev/null +++ b/Makefile.global.in @@ -0,0 +1,77 @@ + +# +# $Id$ +# +# Global Makefiles configuration for the GNOKII. +# +# Copyright (C) 1999 Hugh Blemings & Pavel Janík ml. +# 2000 Karel Zak +# + + + +SHELL = @SHELL@ + +LD = @CC@ -Xlinker -r -nostdlib -nodefaultlibs -o + +PACKAGE = gnokii + +srcdir = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +xbindir = ${prefix}/X11R6/bin/ +libdir = @libdir@ +xgnokii_libdir = @XGNOKIIDIR@/@XPACKAGE@ +man1dir = @mandir@/man1/ +man8dir = @mandir@/man8/ +xmandir = @mandir@/man1/ +docdir = ${prefix}/doc/${PACKAGE} +locdir = @datadir@/locale + +BIN_MODE = 0755 +TEXT_MODE = 0444 + +INSTALL = @INSTALL@ +RM = @RM@ -f +FIND = @FIND@ +MAKE = @MAKE@ +XGETTEXT = @XGETTEXT@ +MSGFMT = @MSGFMT@ + +CC = @CC@ +CFLAGS = @CFLAGS@ +CPPFLAGS = @CPPFLAGS@ +LIBS = @LIBS@ +LEX = @LEX@ + +GTK_CFLAGS = @GTK_CFLAGS@ +GTK_LIBS = @GTK_LIBS@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ +XPM_LIBS = @XPM_LIBS@ +XPM_CFLAGS = @XPM_CFLAGS@ +OWN_GETOPT = @OWN_GETOPT@ + +USE_NLS = @USE_NLS@ +HAVE_XGNOKII = @HAVE_XGNOKII@ + +# +# Global include directory +# ($TOPDIR is defined in Makefile) +# +GNOKII_INCLUDE = $(TOPDIR)/include + +# +# Win32 option +# +ifdef WIN32 + WIN32 += -I$(TOPDIR)/win32 +endif + + +CFLAGS += -I$(GNOKII_INCLUDE) +LDFLAGS = $(LIBS) -Wl,--rpath -Wl,$(libdir) + diff --git a/VERSION b/VERSION new file mode 100644 index 0000000..3a1e380 --- /dev/null +++ b/VERSION @@ -0,0 +1 @@ +0.3.3_pre8-gold_2002_02_24 diff --git a/common/Makefile b/common/Makefile new file mode 100644 index 0000000..e396803 --- /dev/null +++ b/common/Makefile @@ -0,0 +1,92 @@ + +# +# Makefile for the GNOKII tool suite. +# + +# +# For this common directory is used "subsystem.o" .o files concept. +# (the list of object files to be linked together (to COMMON.o), +# and other dirs is used this _one_ file (instead of all OBJS) +# + +TOPDIR=.. +include $(TOPDIR)/Makefile.global + +CFLAGS += $(PTHREAD_CFLAGS) + +DIRS = protocol \ + oldmodules \ + newmodules + +OBJS = devices/device.o \ + data/rlp-common.o \ + data/rlp-crc24.o \ + files/midifile.o \ + gsm-ringtones.o \ + gsm-coding.o \ + gsm-datetime.o \ + gsm-wap.o \ + gsm-api.o \ + gsm-phonebook.o \ + gsm-calendar.o \ + gsm-networks.o \ + gsm-bitmaps.o \ + gsm-sms.o \ + files/cfgreader.o \ + misc.o \ + protocol/fbus.o \ + protocol/fbusirda.o \ + protocol/mbus.o \ + protocol/at.o \ + newmodules/sniff/sniff.o \ + newmodules/newat.o \ + newmodules/n6110.o \ + newmodules/n7110.o + +DATA_OBJS = data/virtmodem.o \ + data/at-emulator.o \ + data/datapump.o + +ifdef WIN32 + OBJS += $(TOPDIR)/win32/winserial.o +else + OBJS += devices/unixserial.o \ + devices/unixirda.o \ + devices/tekram.o +endif + +ifdef XPM_CFLAGS + CFLAGS += $(XPM_CFLAGS) +endif + +all: COMMON.o DATA.o gsm-filetypes.o + +COMMON.o: $(OBJS) + $(LD) $(LDREL) $(LDOUT) COMMON.o $(OBJS) + +DATA.o: $(DATA_OBJS) + $(LD) $(LDREL) $(LDOUT) DATA.o $(DATA_OBJS) + +gsm-filetypes.o: files/gsm-filetypes.c + $(CC) $(CFLAGS) -c files/gsm-filetypes.c + +makelib: $(OBJS) DATA.o gsm-filetypes.o + $(CC) -shared -o libmygnokii.so $(OBJS) DATA.o gsm-filetypes.o + +clean: + $(RM) $(OBJS) $(DATA_OBJS) *~ depend libmygnokii.so COMMON.o gsm-filetypes.o DATA.o + +install: + $(INSTALL) -d $(libdir) + $(INSTALL) libmygnokii.so $(libdir) + @echo + +depend dep: + $(CC) $(CFLAGS) -MM *.c >depend + +ifeq (depend,$(wildcard depend)) +include depend +endif + + +.PHONY: all install clean dep depend diff --git a/common/data/at-emulator.c b/common/data/at-emulator.c new file mode 100644 index 0000000..41445c8 --- /dev/null +++ b/common/data/at-emulator.c @@ -0,0 +1,729 @@ +/* + + $Id$ + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This file provides a virtual modem or "AT" interface to the GSM phone by + calling code in gsm-api.c. Inspired by and in places copied from the Linux + kernel AT Emulator IDSN code by Fritz Elfert and others. + +*/ + +#define __data_at_emulator_c + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef WIN32 + + #include + +#endif + +#include "config.h" +#include "misc.h" +#include "gsm-common.h" +#include "gsm-api.h" +#include "data/at-emulator.h" +#include "data/virtmodem.h" +#include "data/datapump.h" + +#define MAX_LINE_LENGTH 256 + + /* Global variables */ +bool ATEM_Initialised = false; /* Set to true once initialised */ +extern bool CommandMode; +extern int ConnectCount; + +char ModelName[80]; /* This seems to be needed to avoid seg-faults */ +char PortName[80]; + + + /* Local variables */ +int PtyRDFD; /* File descriptor for reading and writing to/from */ +int PtyWRFD; /* pty interface - only different in debug mode. */ + +u8 ModemRegisters[MAX_MODEM_REGISTERS]; +char CmdBuffer[MAX_CMD_BUFFERS][CMD_BUFFER_LENGTH]; +int CurrentCmdBuffer; +int CurrentCmdBufferIndex; +bool VerboseResponse; /* Switch betweek numeric (4) and text responses (ERROR) */ +char IncomingCallNo; +int MessageFormat; /* Message Format (text or pdu) */ + + /* Current command parser */ +void (*Parser)(char *); +//void (*Parser)(char *) = ATEM_ParseAT; /* Current command parser */ + +GSM_MemoryType SMSType; +int SMSNumber; + + /* If initialised in debug mode, stdin/out is used instead + of ptys for interface. */ +bool ATEM_Initialise(int read_fd, int write_fd, char *model, char *port) +{ + PtyRDFD = read_fd; + PtyWRFD = write_fd; + + strncpy(ModelName,model,80); + strncpy(PortName,port,80); + + /* Initialise command buffer variables */ + CurrentCmdBuffer = 0; + CurrentCmdBufferIndex = 0; + + /* Default to verbose reponses */ + VerboseResponse = true; + + /* Initialise registers */ + ATEM_InitRegisters(); + + /* Initial parser is AT routine */ + Parser = ATEM_ParseAT; + + /* Setup defaults for AT*C interpreter. */ + SMSNumber = 1; + SMSType = GMT_ME; + + /* Default message format is PDU */ + MessageFormat = PDU_MODE; + + /* Set the call passup so that we get notified of incoming calls */ + GSM->DialData(NULL,-1,&ATEM_CallPassup); + + /* We're ready to roll... */ + ATEM_Initialised = true; + return (true); +} + + /* Initialise the "registers" used by the virtual modem. */ +void ATEM_InitRegisters(void) +{ + + ModemRegisters[REG_RINGATA] = 0; + ModemRegisters[REG_RINGCNT] = 2; + ModemRegisters[REG_ESC] = '+'; + ModemRegisters[REG_CR] = 10; + ModemRegisters[REG_LF] = 13; + ModemRegisters[REG_BS] = 8; + ModemRegisters[S35]=7; + ModemRegisters[REG_ECHO] = BIT_ECHO; + +} + + +/* This gets called to indicate an incoming call */ + +void ATEM_CallPassup(char c) +{ + if ((c >= 0) && (c < 9)) { + ATEM_ModemResult(MR_RING); + IncomingCallNo = c; + } +} + + + /* Handler called when characters received from serial port. + calls state machine code to process it. */ + +void ATEM_HandleIncomingData(char *buffer, int length) +{ + int count; + unsigned char out_buf[3]; + + for (count = 0; count < length ; count++) { + /* Echo character if appropriate. */ + if (ModemRegisters[REG_ECHO] & BIT_ECHO) { + out_buf[0] = buffer[count]; + out_buf[1] = 0; + ATEM_StringOut(out_buf); + } + + /* If it's a command terminator character, parse what + we have so far then go to next buffer. */ + if (buffer[count] == ModemRegisters[REG_CR] || + buffer[count] == ModemRegisters[REG_LF]) { + + CmdBuffer[CurrentCmdBuffer][CurrentCmdBufferIndex] = 0x00; + Parser(CmdBuffer[CurrentCmdBuffer]); + + CurrentCmdBuffer++; + if (CurrentCmdBuffer >= MAX_CMD_BUFFERS) { + CurrentCmdBuffer = 0; + } + CurrentCmdBufferIndex = 0; + } else { + CmdBuffer[CurrentCmdBuffer][CurrentCmdBufferIndex] = buffer[count]; + CurrentCmdBufferIndex++; + if (CurrentCmdBufferIndex >= CMD_BUFFER_LENGTH) { + CurrentCmdBufferIndex = CMD_BUFFER_LENGTH; + } + } + } +} + + + /* Parser for standard AT commands. cmd_buffer must be null terminated. */ +void ATEM_ParseAT(char *cmd_buffer) +{ + char *buf; + char number[30]; + + if (strncasecmp (cmd_buffer, "AT", 2) != 0) { + ATEM_ModemResult(MR_ERROR); + return; + } + + for (buf = &cmd_buffer[2]; *buf;) { + switch (toupper(*buf)) { + + case 'Z': + buf++; + break; + case 'A': + buf++; + /* For now we'll also initialise the datapump + rlp code again */ + DP_Initialise(PtyRDFD, PtyWRFD); + GSM->DialData(NULL, -1, &DP_CallPassup); + GSM->AnswerCall(IncomingCallNo); + CommandMode = false; + return; + break; + case 'D': + /* Dial Data :-) */ + /* FIXME - should parse this better */ + /* For now we'll also initialise the datapump + rlp code again */ + DP_Initialise(PtyRDFD, PtyWRFD); + buf++; + if (toupper(*buf) == 'T') buf++; + if (*buf == ' ') buf++; + strncpy(number, buf, 30); + if (ModemRegisters[S35] == 0) GSM->DialData(number, 1, &DP_CallPassup); + else GSM->DialData(number, 0, &DP_CallPassup); + ATEM_StringOut("\n\r"); + CommandMode = false; + return; + break; + case 'H': + /* Hang Up */ + buf++; + RLP_SetUserRequest(Disc_Req, true); + GSM->CancelCall(); + break; + case 'S': + /* Change registers - only no. 35 for now */ + buf++; + if (memcmp(buf, "35=", 3) == 0) { + buf += 3; + ModemRegisters[S35] = *buf - '0'; + buf++; + } + break; + /* E - Turn Echo on/off */ + case 'E': + buf++; + switch (ATEM_GetNum(&buf)) { + case 0: + ModemRegisters[REG_ECHO] &= ~BIT_ECHO; + break; + case 1: + ModemRegisters[REG_ECHO] |= BIT_ECHO; + break; + default: + ATEM_ModemResult(MR_ERROR); + return; + } + break; + + /* Handle AT* commands (Nokia proprietary I think) */ + case '*': + buf++; + if (!strcasecmp(buf, "NOKIATEST")) { + ATEM_ModemResult(MR_OK); /* FIXME? */ + return; + } else { + if (!strcasecmp(buf, "C")) { + ATEM_ModemResult(MR_OK); + Parser = ATEM_ParseSMS; + return; + } + } + break; + + /* + is the precursor to another set of commands +CSQ, +FCLASS etc. */ + case '+': + buf++; + switch (toupper(*buf)) { + case 'C': + buf++; + /* Returns true if error occured */ + if (ATEM_CommandPlusC(&buf) == true) { + return; + } + break; + + case 'G': + buf++; + /* Returns true if error occured */ + if (ATEM_CommandPlusG(&buf) == true) { + return; + } + break; + + default: + ATEM_ModemResult(MR_ERROR); + return; + } + break; + + default: + ATEM_ModemResult(MR_ERROR); + return; + } + } + + ATEM_ModemResult(MR_OK); +} + +static GSM_Error ATEM_ReadSMS(int number, GSM_MemoryType type, GSM_SMSMessage *message) +{ + GSM_Error error; + + message->MemoryType = type; + message->Location = number; + error = GSM->GetSMSMessage(message); + + return error; +} + +static void ATEM_PrintSMS(char *line, GSM_SMSMessage *message, int mode) +{ + switch (mode) { + case INTERACT_MODE: + gsprintf(line, MAX_LINE_LENGTH, _("\n\rDate/time: %d/%d/%d %d:%02d:%02d Sender: %s Msg Center: %s\n\rText: %s\n\r"), message->Time.Day, message->Time.Month, message->Time.Year, message->Time.Hour, message->Time.Minute, message->Time.Second, message->Sender, message->MessageCenter.Number, message->MessageText); + break; + case TEXT_MODE: + if (message->Coding==GSM_Coding_8bit) + gsprintf(line, MAX_LINE_LENGTH, _("\"%s\",\"%s\",,\"%02d/%02d/%02d,%02d:%02d:%02d+%02d\"\n\r%s"), (message->Status ? _("REC READ") : _("REC UNREAD")), message->Sender, message->Time.Year, message->Time.Month, message->Time.Day, message->Time.Hour, message->Time.Minute, message->Time.Second, message->Time.Timezone, _("")); + else + gsprintf(line, MAX_LINE_LENGTH, _("\"%s\",\"%s\",,\"%02d/%02d/%02d,%02d:%02d:%02d+%02d\"\n\r%s"), (message->Status ? _("REC READ") : _("REC UNREAD")), message->Sender, message->Time.Year, message->Time.Month, message->Time.Day, message->Time.Hour, message->Time.Minute, message->Time.Second, message->Time.Timezone, message->MessageText); + break; + case PDU_MODE: + gsprintf(line, MAX_LINE_LENGTH, _("")); + break; + default: + gsprintf(line, MAX_LINE_LENGTH, _("")); + break; + } +} + +static void ATEM_EraseSMS(int number, GSM_MemoryType type) +{ + GSM_SMSMessage message; + message.MemoryType = type; + message.Location = number; + if (GSM->DeleteSMSMessage(&message) == GE_NONE) { + ATEM_ModemResult(MR_OK); + } else { + ATEM_ModemResult(MR_ERROR); + } +} + + +static void ATEM_HandleSMS() +{ + GSM_SMSMessage message; + GSM_Error error; + char buffer[MAX_LINE_LENGTH]; + + error = ATEM_ReadSMS(SMSNumber, SMSType, &message); + switch (error) { + case GE_NONE: + ATEM_PrintSMS(buffer, &message, INTERACT_MODE); + ATEM_StringOut(buffer); + break; + default: + gsprintf(buffer, MAX_LINE_LENGTH, _("\n\rNo message under number %d\n\r"), SMSNumber); + ATEM_StringOut(buffer); + break; + } + return; +} + + /* Parser for SMS interactive mode */ +void ATEM_ParseSMS(char *buff) +{ + if (!strcasecmp(buff, "HELP")) { + ATEM_StringOut(_("\n\rThe following commands work...\n\r")); + ATEM_StringOut("DIR\n\r"); + ATEM_StringOut("EXIT\n\r"); + ATEM_StringOut("HELP\n\r"); + return; + } + + if (!strcasecmp(buff, "DIR")) { + SMSNumber = 1; + ATEM_HandleSMS(); + Parser = ATEM_ParseDIR; + return; + } + if (!strcasecmp(buff, "EXIT")) { + Parser = ATEM_ParseAT; + ATEM_ModemResult(MR_OK); + return; + } + ATEM_ModemResult(MR_ERROR); +} + + /* Parser for DIR sub mode of SMS interactive mode. */ +void ATEM_ParseDIR(char *buff) +{ + switch (toupper(*buff)) { + case 'P': + SMSNumber--; + ATEM_HandleSMS(); + return; + case 'N': + SMSNumber++; + ATEM_HandleSMS(); + return; + case 'D': + ATEM_EraseSMS(SMSNumber, SMSType); + return; + case 'Q': + Parser= ATEM_ParseSMS; + ATEM_ModemResult(MR_OK); + return; + } + ATEM_ModemResult(MR_ERROR); +} + + /* Handle AT+C commands, this is a quick hack together at this + stage. */ +bool ATEM_CommandPlusC(char **buf) +{ + float rflevel; + GSM_RFUnits rfunits = GRF_CSQ; + char buffer[MAX_LINE_LENGTH], buffer2[MAX_LINE_LENGTH]; + int status, index; + GSM_Error error; + GSM_SMSMessage message; + + if (strncasecmp(*buf, "SQ", 2) == 0) { + buf[0] += 2; + + if (GSM->GetRFLevel(&rfunits, &rflevel) == GE_NONE) { + gsprintf(buffer, MAX_LINE_LENGTH, "\n\r+CSQ: %0.0f, 99", rflevel); + ATEM_StringOut(buffer); + return (false); + } else { + return (true); + } + } + /* AT+CGMI is Manufacturer information for the ME (phone) so + it should be Nokia rather than gnokii... */ + if (strncasecmp(*buf, "GMI", 3) == 0) { + buf[0] += 3; + ATEM_StringOut(_("\n\rNokia Mobile Phones")); + return (false); + } + + /* AT+CGSN is IMEI */ + if (strncasecmp(*buf, "GSN", 3) == 0) { + buf[0] += 3; + if (GSM->GetIMEI(buffer2) == GE_NONE) { + gsprintf(buffer, MAX_LINE_LENGTH, "\n\r%s", buffer2); + ATEM_StringOut(buffer); + return (false); + } else { + return (true); + } + } + + /* AT+CGMR is Revision (hardware) */ + if (strncasecmp(*buf, "GMR", 3) == 0) { + buf[0] += 3; + if (GSM->GetRevision(buffer2) == GE_NONE) { + gsprintf(buffer, MAX_LINE_LENGTH, "\n\r%s", buffer2); + ATEM_StringOut(buffer); + return (false); + } else { + return (true); + } + } + + /* AT+CGMM is Model code */ + if (strncasecmp(*buf, "GMM", 3) == 0) { + buf[0] += 3; + if (GSM->GetModel(buffer2) == GE_NONE) { + gsprintf(buffer, MAX_LINE_LENGTH, "\n\r%s", buffer2); + ATEM_StringOut(buffer); + return (false); + } else { + return (true); + } + } + + /* AT+CMGF is mode selection for message format */ + if (strncasecmp(*buf, "MGF", 3) == 0) { + buf[0] += 3; + switch (**buf) { + case '=': + buf[0]++; + switch (**buf) { + case '0': + buf[0]++; + MessageFormat = PDU_MODE; + break; + case '1': + buf[0]++; + MessageFormat = TEXT_MODE; + break; + default: + return (true); + } + break; + case '?': + buf[0]++; + gsprintf(buffer, MAX_LINE_LENGTH, "\n\r+CMGF: %d", MessageFormat); + ATEM_StringOut(buffer); + break; + default: + return (true); + } + return (false); + } + + /* AT+CMGR is reading a message */ + if (strncasecmp(*buf, "MGR", 3) == 0) { + buf[0] += 3; + switch (**buf) { + case '=': + buf[0]++; + sscanf(*buf, "%d", &index); + buf[0] += strlen(*buf); + + error = ATEM_ReadSMS(index, SMSType, &message); + switch (error) { + case GE_NONE: + ATEM_PrintSMS(buffer2, &message, MessageFormat); + gsprintf(buffer, MAX_LINE_LENGTH, "\n\r+CMGR: %s", buffer2); + ATEM_StringOut(buffer); + break; + default: + gsprintf(buffer, MAX_LINE_LENGTH, "\n\r+CMS ERROR: %d\n\r", error); + ATEM_StringOut(buffer); + return (true); + } + break; + default: + return (true); + } + return (false); + } + + /* AT+CMGL is listing messages */ + if (strncasecmp(*buf, "MGL", 3) == 0) { + buf[0]+=3; + status = -1; + + switch (**buf) { + case 0: + case '=': + buf[0]++; + /* process parameter */ + if (*(*buf-1) == 0 || /* i.e. no parameter given */ + strcasecmp(*buf, "1") == 0 || + strcasecmp(*buf, "3") == 0 || + strcasecmp(*buf, "\"REC READ\"") == 0 || + strcasecmp(*buf, "\"STO SENT\"") == 0) { + status = GSS_SENTREAD; + } else if (strcasecmp(*buf, "0") == 0 || + strcasecmp(*buf, "2") == 0 || + strcasecmp(*buf, "\"REC UNREAD\"") == 0 || + strcasecmp(*buf, "\"STO UNSENT\"") == 0) { + status = GSS_NOTSENTREAD; + } else if (strcasecmp(*buf, "4") == 0 || + strcasecmp(*buf, "\"ALL\"") == 0) { + status = 4; /* ALL */ + } else { + return true; + } + buf[0] += strlen(*buf); + + /* check all message storages */ + for (index = 1; index <= 20; index++) { + error = ATEM_ReadSMS(index, SMSType, &message); + switch (error) { + case GE_NONE: + /* print messsage if it has the required status */ + if (message.Status == status || status == 4 /* ALL */) { + ATEM_PrintSMS(buffer2, &message, MessageFormat); + gsprintf(buffer, MAX_LINE_LENGTH, "\n\r+CMGL: %d,%s", index, buffer2); + ATEM_StringOut(buffer); + } + break; + case GE_EMPTYSMSLOCATION: + /* don't care if this storage is empty */ + break; + default: + /* print other error codes and quit */ + gsprintf(buffer, MAX_LINE_LENGTH, "\n\r+CMS ERROR: %d\n\r", error); + ATEM_StringOut(buffer); + return (true); + } + } + break; + default: + return (true); + } + return (false); + } + + return (true); +} + + /* AT+G commands. Some of these responses are a bit tongue in cheek... */ +bool ATEM_CommandPlusG(char **buf) +{ + char buffer[MAX_LINE_LENGTH]; + + /* AT+GMI is Manufacturer information for the TA (Terminal Adaptor) */ + if (strncasecmp(*buf, "MI", 3) == 0) { + buf[0] += 2; + + ATEM_StringOut(_("\n\rHugh Blemings, Pavel Janík ml. and others...")); + return (false); + } + + /* AT+GMR is Revision information for the TA (Terminal Adaptor) */ + if (strncasecmp(*buf, "MR", 3) == 0) { + buf[0] += 2; + gsprintf(buffer, MAX_LINE_LENGTH, "\n\r%s %s %s", VERSION, __TIME__, __DATE__); + + ATEM_StringOut(buffer); + return (false); + } + + /* AT+GMM is Model information for the TA (Terminal Adaptor) */ + if (strncasecmp(*buf, "MM", 3) == 0) { + buf[0] += 2; + + gsprintf(buffer, MAX_LINE_LENGTH, _("\n\rgnokii configured for %s on %s"), ModelName, PortName); + ATEM_StringOut(buffer); + return (false); + } + + /* AT+GSN is Serial number for the TA (Terminal Adaptor) */ + if (strncasecmp(*buf, "SN", 3) == 0) { + buf[0] += 2; + + gsprintf(buffer, MAX_LINE_LENGTH, _("\n\rnone built in, choose your own")); + ATEM_StringOut(buffer); + return (false); + } + + return (true); +} + + /* Send a result string back. There is much work to do here, see + the code in the isdn driver for an idea of where it's heading... */ +void ATEM_ModemResult(int code) +{ + char buffer[16]; + + if (VerboseResponse == false) { + sprintf(buffer, "\n\r%d\n\r", code); + ATEM_StringOut(buffer); + } else { + switch (code) { + case MR_OK: + ATEM_StringOut("\n\rOK\n\r"); + break; + + case MR_ERROR: + ATEM_StringOut("\n\rERROR\n\r"); + break; + + case MR_CARRIER: + ATEM_StringOut("\n\rCARRIER\n\r"); + break; + + case MR_CONNECT: + ATEM_StringOut("\n\rCONNECT\n\r"); + break; + + case MR_NOCARRIER: + ATEM_StringOut("\n\rNO CARRIER\n\r"); + break; + case MR_RING: + ATEM_StringOut("RING\n\r"); + break; + default: + ATEM_StringOut(_("\n\rUnknown Result Code!\n\r")); + break; + } + } + +} + + + /* Get integer from char-pointer, set pointer to end of number + stolen basically verbatim from ISDN code. */ +int ATEM_GetNum(char **p) +{ + int v = -1; + + while (*p[0] >= '0' && *p[0] <= '9') { + v = ((v < 0) ? 0 : (v * 10)) + (int) ((*p[0]++) - '0'); + } + + return v; +} + + /* Write string to virtual modem port, either pty or + STDOUT as appropriate. This function is only used during + command mode - data pump is used when connected. */ +void ATEM_StringOut(char *buffer) +{ + int count = 0; + char out_char; + + while (count < strlen(buffer)) { + + /* Translate CR/LF/BS as appropriate */ + switch (buffer[count]) { + case '\r': + out_char = ModemRegisters[REG_CR]; + break; + case '\n': + out_char = ModemRegisters[REG_LF]; + break; + case '\b': + out_char = ModemRegisters[REG_BS]; + break; + default: + out_char = buffer[count]; + break; + } + + write(PtyWRFD, &out_char, 1); + count ++; + } + +} diff --git a/common/data/datapump.c b/common/data/datapump.c new file mode 100644 index 0000000..4eede53 --- /dev/null +++ b/common/data/datapump.c @@ -0,0 +1,167 @@ +/* + + $Id$ + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This file provides routines to handle processing of data when connected in + fax or data mode. Converts data from/to GSM phone to virtual modem + interface. + +*/ + +#define __data_datapump_c + + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#include "misc.h" +#include "gsm-common.h" +#include "gsm-api.h" +#include "data/at-emulator.h" +#include "data/virtmodem.h" +#include "data/datapump.h" +#include "data/rlp-common.h" + +/* Global variables */ +extern bool CommandMode; + +/* Local variables */ +int PtyRDFD; /* File descriptor for reading and writing to/from */ +int PtyWRFD; /* pty interface - only different in debug mode. */ +struct pollfd ufds; +u8 pluscount; +bool connected; + +bool DP_Initialise(int read_fd, int write_fd) +{ + PtyRDFD = read_fd; + PtyWRFD = write_fd; + ufds.fd=PtyRDFD; + ufds.events=POLLIN; + RLP_Initialise(GSM->SendRLPFrame, DP_CallBack); + RLP_SetUserRequest(Attach_Req,true); + pluscount=0; + connected=false; + return true; +} + + +int DP_CallBack(RLP_UserInds ind, u8 *buffer, int length) +{ + int temp; + + switch(ind) { + case Data: + if (CommandMode==false) write(PtyWRFD, buffer, length); + break; + case Conn_Ind: + if (CommandMode==false) ATEM_ModemResult(MR_CARRIER); + RLP_SetUserRequest(Conn_Req,true); + break; + case StatusChange: + if (buffer[0]==0) { + connected=true; + if (CommandMode==false) ATEM_ModemResult(MR_CONNECT); + } + break; + case Disc_Ind: + if (CommandMode==false) ATEM_ModemResult(MR_NOCARRIER); + connected=false; + /* Set the call passup back to the at emulator */ + GSM->DialData(NULL,-1,&ATEM_CallPassup); + CommandMode=true; + break; + case Reset_Ind: + RLP_SetUserRequest(Reset_Resp,true); + break; + case GetData: + if (poll(&ufds,1,0)) { + + /* Check if the program has closed */ + /* Return to command mode */ + /* Note that the call will still be in progress, */ + /* as with a normal modem (I think) */ + + if (ufds.revents!=POLLIN) { + CommandMode=true; + /* Set the call passup back to the at emulator */ + GSM->DialData(NULL,-1,&ATEM_CallPassup); + return 0; + } + + temp = read(PtyRDFD, buffer, length); + + if (temp<0) return 0; /* FIXME - what do we do now? */ + + /* This will only check +++ and the beginning of a read */ + /* But there should be a pause before it anyway */ + + if (buffer[0]=='+') { + pluscount++; + if (temp>1) { + if (buffer[1]=='+') pluscount++; + else pluscount=0; + if (temp>2) { + if (buffer[2]=='+') pluscount++; + else pluscount=0; + if (temp>3) pluscount=0; + } + } + } else pluscount=0; + + if (pluscount==3) { + CommandMode=true; + /* Set the call passup back to the at emulator */ + GSM->DialData(NULL,-1,&ATEM_CallPassup); + ATEM_ModemResult(MR_OK); + break; + } + + return temp; + } + return 0; + break; + + default: + + } + return 0; +} + +void DP_CallPassup(char c) +{ + switch (c) { + case 'D': + if (CommandMode==false) ATEM_ModemResult(MR_CARRIER); + RLP_SetUserRequest(Conn_Req,true); + connected=true; + break; + case ' ': + CommandMode=true; + /* Set the call passup back to the at emulator */ + GSM->DialData(NULL,-1,&ATEM_CallPassup); + ATEM_ModemResult(MR_NOCARRIER); + RLP_SetUserRequest(Disc_Req, true); + connected=false; + break; + default: + break; + } +} diff --git a/common/data/rlp-common.c b/common/data/rlp-common.c new file mode 100644 index 0000000..9c46e0d --- /dev/null +++ b/common/data/rlp-common.c @@ -0,0 +1,2069 @@ +/* + + $Id$ + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + The development of RLP protocol is sponsored by SuSE CR, s.r.o. (Pavel use + the SIM card from SuSE for testing purposes). + + Actual implementation of RLP protocol. Based on GSM 04.22 version 7.1.0, + downloadable from www.etsi.org (if you register with them) + +*/ + +#include +#include +#include +#include + +#include "data/rlp-common.h" +#include "data/rlp-crc24.h" +#include "gsm-common.h" /* For GSM error and RLP send function. */ +#include "misc.h" /* For u8, u32 etc. */ + +#ifdef WIN32 +#define INLINE __inline +#else +#define INLINE inline +#endif + +/* Our state machine which handles all of nine possible states of RLP + machine. */ +void MAIN_STATE_MACHINE(RLP_F96Frame *frame, RLP_F96Header *header); + +/* This is the type we are just handling. */ +RLP_FrameTypes CurrentFrameType; + +/* Current state of RLP state machine. */ +RLP_State CurrentState=RLP_S0; /* We start at ADM and Detached */ + +/* Next state of RLP state machine. */ +RLP_State NextState; + +/* Pointer to Send function that sends frame to phone. */ +bool (*RLPSendFunction)(RLP_F96Frame *frame, bool out_dtx); + +/* Pointer to Passup function which returns data/inds */ +int (*RLP_Passup)(RLP_UserInds ind, u8 *buffer, int length); + + +/* State variables - see GSM 04.22, Annex A, section A.1.2 */ + +RLP_StateVariable UA_State; +RLP_StateVariable UI_State; +RLP_StateVariable Ackn_State; +RLP_StateVariable Poll_State; +RLP_StateVariable Poll_xchg; +RLP_StateVariable SABM_State; +RLP_StateVariable DISC_State; +RLP_StateVariable DM_State; /* FIXME - not handled */ +RLP_StateVariable XI_R_State; +RLP_StateVariable XID_C_State; +RLP_StateVariable XID_R_State; +RLP_StateVariable TEST_R_State; + +u8 VR=0; +u8 VA=0; +u8 VS=0; +u8 VD=0; +u8 DISC_Count; + +u8 DTX_VR; +RLP_FrameTypes DTX_SF; + +#define RLP_M 62 + +RLP_Data R[RLP_M]; +RLP_Data S[RLP_M]; + +RLP_StateVariable SABM_State; +int SABM_Count; + +RLP_UserRequestStore UserRequests; + +u8 Poll_Count=0; + +/* For now timing is done based on a frame reception rate of 20ms */ +/* Serge has measured it as 18.4ms */ +#define RLP_T_Scaling 2 + +/* Timers - a value of -1 means not set */ +/* To set, timer is loaded with RLP_Timeout1_Limit/RLP_T_Scaling. */ +/* Each received frame (including NULLS / errors) any >0 timer is decrease */ + +int T; +int T_RCVS[RLP_M]; + +bool UA_FBit=true; +bool Ackn_FBit=false; +bool DM_FBit=false; /* FIXME - not handled */ +bool RRReady=false; +bool LRReady=true; /* FIXME - not handled (as if we couldn't keep up with 9600bps :-) */ +bool DISC_PBit=false; + +u8 LastStatus=0xff; /* Last Status byte */ + + +/* RLP Parameters. FIXME: Reset these - e.g. when entering state 0 */ + +u8 RLP_SEND_WS = RLP_M-1; +u8 RLP_RCV_WS = RLP_M-1; +u8 RLP_Timeout1_Limit = 55; +u8 RLP_N2 = 15; /* Maximum number of retransmisions. GSM spec says 6 here, but + Nokia will XID this. */ +u8 RLP_T2=0; +u8 RLP_VersionNumber=0; + + + +/****** Externally called functions ********/ +/*******************************************/ + + +/* Function to initialise RLP code. Main purpose for now is + to set the address of the RLP send function in the API code. */ + +void RLP_Initialise(bool (*rlp_send_function)(RLP_F96Frame *frame, bool out_dtx), int (*rlp_passup)(RLP_UserInds ind, u8 *buffer, int length)) +{ + int i; + + RLPSendFunction = rlp_send_function; + RLP_Passup=rlp_passup; + UserRequests.Conn_Req=false; + UserRequests.Attach_Req=false; + UserRequests.Conn_Req_Neg=false; + UserRequests.Reset_Resp=false; + UserRequests.Disc_Req=false; + CurrentState=RLP_S0; + T=-1; + for (i=0;i= 0) ? result : result + RLP_M; + * } +*/ + +/* Check value is within range */ +static bool InWindow(u8 val, u8 lower, u8 upper) +{ + /* allow for one level of wrapping round */ + if (lower>=RLP_M) lower-=RLP_M; + if (upper>=RLP_M) upper-=RLP_M; + if (val>=RLP_M) val-=RLP_M; + + /* .......L*****U....... */ + if (lower <= upper) + return (val >= lower) && (val <= upper); + + /* ******U.........L***** */ + return (val <= upper) || (val >= lower); +} + +void RLP_Init_link_vars(void) +{ + int i; + + Ackn_State=_idle; + Poll_State=_idle; + Poll_Count=0; + Poll_xchg=_idle; + SABM_State=_idle; + DISC_State=_idle; + RRReady=true; /* This seems a bit strange but it's what the spec says... */ + VA=0; + VR=0; + VS=0; + VD=0; + LastStatus=0xff; + + for(i=0;i23) { + S[VD].Data[0]=0x1e; + size=24; + } + else S[VD].Data[0]=size; + + memcpy(&S[VD].Data[1],buffer,size); + + if (size!=24) S[VD].Data[size+1]=0x1f; + + S[VD].State=_send; + VD=Incr(VD); + } +} + + +/* FIXME: Remove this after finishing. */ + +void X(RLP_F96Frame *frame) { + + int i; + + for (i=0; i<30; i++) + printf("byte[%2d]: %02x\n", i, *( (u8 *)frame+i)); + +} + + + +void ResetAllT_RCVS(void) +{ + + int i; + for (i=0;i>5); + + switch (FrameType) { + + /* Unnumbered frames. Be careful - some commands are used as commands + only, so we have to set C/R bit later. We should not allow user for + example to send SABM as response because in the spec is: The SABM + encoding is used as command only. */ + + case RLPFT_U_SABM: + + frame.Header[0]|=0xf8; /* See page 11 of the GSM 04.22 spec - 0 X X 1 1 1 1 1 */ + frame.Header[1]|=0x01; /* 1 P/F M1 M2 M3 M4 M5 X */ + + SetCRBit; /* The SABM encoding is used as a command only. */ + SetPFBit; /* It is always used with the P-bit set to "1". */ + + PackM(RLPU_SABM); + + break; + + case RLPFT_U_UA: + + frame.Header[0]|=0xf8; + frame.Header[1]|=0x01; + + ClearCRBit; /* The UA encoding is used as a response only. */ + + PackM(RLPU_UA); + + break; + + case RLPFT_U_DISC: + + frame.Header[0]|=0xf8; + frame.Header[1]|=0x01; + + SetCRBit; /* The DISC encoding is used as a command only. */ + + PackM(RLPU_DISC); + + break; + + case RLPFT_U_DM: + + frame.Header[0]|=0xf8; + frame.Header[1]|=0x01; + + ClearCRBit; /* The DM encoding is used as a response only. */ + + PackM(RLPU_DM); + + break; + + case RLPFT_U_NULL: + + frame.Header[0]|=0xf8; + frame.Header[1]|=0x01; + + PackM(RLPU_NULL); + + break; + + case RLPFT_U_UI: + + frame.Header[0]|=0xf8; + frame.Header[1]|=0x01; + + PackM(RLPU_UI); + + break; + + case RLPFT_U_XID: + + frame.Header[0]|=0xf8; + frame.Header[1]|=0x01; + + SetPFBit; /* XID frames are always used with the P/F-bit set to "1". */ + + PackM(RLPU_XID); + + break; + + case RLPFT_U_TEST: + + frame.Header[0]|=0xf8; + frame.Header[1]|=0x01; + + PackM(RLPU_TEST); + + break; + + case RLPFT_U_REMAP: + + frame.Header[0]|=0xf8; + frame.Header[1]|=0x01; + + ClearPFBit; /* REMAP frames are always used with P/F-bit set to "0". */ + + PackM(RLPU_REMAP); + + break; + + case RLPFT_S_RR: + + frame.Header[0]|=0xf0; /* See page 11 of the GSM 04.22 spec - 0 X X 1 1 1 1 1 */ + frame.Header[1]|=0x01; /* 1 P/F ...N(R)... */ + + PackNR; + + PackS(RLPS_RR); + + break; + + case RLPFT_S_REJ: + + frame.Header[0]|=0xf0; + frame.Header[1]|=0x01; + + PackNR; + + PackS(RLPS_REJ); + + break; + + case RLPFT_S_RNR: + + frame.Header[0]|=0xf0; + frame.Header[1]|=0x01; + + PackNR; + + PackS(RLPS_RNR); + + break; + + case RLPFT_S_SREJ: + + frame.Header[0]|=0xf0; + frame.Header[1]|=0x01; + + PackNR; + + PackS(RLPS_SREJ); + + break; + + case RLPFT_SI_RR: + + PackNR; + PackNS; + + PackS(RLPS_RR); + + break; + + case RLPFT_SI_REJ: + PackNR; + PackNS; + + PackS(RLPS_REJ); + + break; + + case RLPFT_SI_RNR: + + PackNR; + PackNS; + + PackS(RLPS_RNR); + + break; + + case RLPFT_SI_SREJ: + PackNR; + PackNS; + + PackS(RLPS_SREJ); + + break; + + default: + break; + } + + + /* Store FCS in the frame. */ + RLP_CalculateCRC24Checksum((u8 *)&frame, 27, frame.FCS); + + // X(&frame); + + if (RLPSendFunction) + RLPSendFunction(&frame, OutDTX); + +} + +/* Check_input_PDU in Serge's code. */ + +void RLP_DisplayF96Frame(RLP_F96Frame *frame) +{ + int count; + RLP_F96Header header; + + if (T>=0) T--; + for (count=0;count=0) T_RCVS[count]--; + + CurrentFrameType=RLPFT_BAD; + + if (!frame) { + /* no frame provided, drop through to state machine anyway */ + } else if (RLP_CheckCRC24FCS((u8 *)frame, 30) == true) { + + /* Here we have correct RLP frame so we can parse the field of the header + to out structure. */ + + RLP_DecodeF96Header(frame, &header); + + switch (header.Type) { + + case RLPFT_U: /* Unnumbered frames. */ + +#ifdef RLP_DEBUG + fprintf(stdout, "Unnumbered Frame [$%02x%02x] M=%02x ", frame->Header[0], + frame->Header[1], + header.M); +#endif + + switch (header.M) { + + case RLPU_SABM : + if (header.CR == 0 || header.PF == 0) break; + +#ifdef RLP_DEBUG + fprintf(stdout, "Set Asynchronous Balanced Mode (SABM) "); +#endif + + CurrentFrameType=RLPFT_U_SABM; + + break; + + case RLPU_UA: + if (header.CR == 1) break; + +#ifdef RLP_DEBUG + fprintf(stdout, "Unnumbered Acknowledge (UA) "); +#endif + + CurrentFrameType=RLPFT_U_UA; + + break; + + case RLPU_DISC: + if (header.CR == 0) break; + +#ifdef RLP_DEBUG + fprintf(stdout, "Disconnect (DISC) "); +#endif + + CurrentFrameType=RLPFT_U_DISC; + + break; + + case RLPU_DM: + if (header.CR == 1) break; + +#ifdef RLP_DEBUG + fprintf(stdout, "Disconnected Mode (DM) "); +#endif + CurrentFrameType=RLPFT_U_DM; + + break; + + case RLPU_UI: + +#ifdef RLP_DEBUG + fprintf(stdout, "Unnumbered Information (UI) "); +#endif + + CurrentFrameType=RLPFT_U_UI; + + break; + + case RLPU_XID: + +#ifdef RLP_DEBUG + fprintf(stdout, "Exchange Information (XID) \n"); + RLP_DisplayXID(frame->Data); +#endif + + CurrentFrameType=RLPFT_U_XID; + + break; + + case RLPU_TEST: + +#ifdef DEBUG + fprintf(stdout, "Test (TEST) "); +#endif + + CurrentFrameType=RLPFT_U_TEST; + + break; + + case RLPU_NULL: + +#ifdef DEBUG + fprintf(stdout, "Null information (NULL) "); +#endif + + CurrentFrameType=RLPFT_U_NULL; + + break; + + case RLPU_REMAP: + +#ifdef DEBUG + fprintf(stdout, "Remap (REMAP) "); +#endif + + CurrentFrameType=RLPFT_U_REMAP; + + break; + + default : + +#ifdef RLP_DEBUG + fprintf(stdout, _("Unknown!!! ")); +#endif + + CurrentFrameType=RLPFT_BAD; + + break; + + } + break; + + case RLPFT_S: /* Supervisory frames. */ + +#ifdef RLP_DEBUG + fprintf(stdout, "Supervisory Frame [$%02x%02x] S=0x%x N(R)=%d ", + frame->Header[0], + frame->Header[1], + header.S, + header.Nr); +#endif + + switch (header.S) { + + case RLPS_RR: + +#ifdef RLP_DEBUG + fprintf(stdout, "RR"); +#endif + + CurrentFrameType=RLPFT_S_RR; + + break; + + case RLPS_REJ: + +#ifdef RLP_DEBUG + fprintf(stdout, "REJ"); +#endif + + CurrentFrameType=RLPFT_S_REJ; + + break; + + case RLPS_RNR: + +#ifdef RLP_DEBUG + fprintf(stdout, "RNR"); +#endif + + CurrentFrameType=RLPFT_S_RNR; + + break; + + case RLPS_SREJ: + +#ifdef RLP_DEBUG + fprintf(stdout, "SREJ"); +#endif + + CurrentFrameType=RLPFT_S_SREJ; + + break; + + default: + +#ifdef DEBUG + fprintf(stdout, _("BAD")); +#endif + + CurrentFrameType=RLPFT_BAD; + + break; + + } + + break; + + default: + +#ifdef RLP_DEBUG + fprintf(stdout, "Info+Supervisory Frame [$%02x%02x] S=0x%x N(S)=%d N(R)=%d ", + frame->Header[0], + frame->Header[1], + header.S, + header.Ns, + header.Nr); +#endif + + switch (header.S) { + + case RLPS_RR: + +#ifdef RLP_DEBUG + fprintf(stdout, "RR"); +#endif + + CurrentFrameType=RLPFT_SI_RR; + + break; + + case RLPS_REJ: + +#ifdef RLP_DEBUG + fprintf(stdout, "REJ"); +#endif + + CurrentFrameType=RLPFT_SI_REJ; + + break; + + case RLPS_RNR: + +#ifdef RLP_DEBUG + fprintf(stdout, "RNR"); +#endif + + CurrentFrameType=RLPFT_SI_RNR; + + break; + + case RLPS_SREJ: + +#ifdef RLP_DEBUG + fprintf(stdout, "SREJ"); +#endif + + CurrentFrameType=RLPFT_SI_SREJ; + + break; + + default: + +#ifdef DEBUG + fprintf(stdout, "BAD"); +#endif + + CurrentFrameType=RLPFT_BAD; + + break; + } + + break; + } + +#ifdef RLP_DEBUG + + /* Command/Response and Poll/Final bits. */ + + fprintf(stdout, " C/R=%d P/F=%d", header.CR, header.PF); +#endif + +#ifdef DEBUG + + /* Information. */ + + if (CurrentFrameType!=RLPFT_U_NULL) { + + fprintf(stdout, "\n"); + + for (count = 0; count < 25; count ++) { + + if (isprint(frame->Data[count])) + fprintf(stdout, "[%02x%c]", frame->Data[count], frame->Data[count]); + else + fprintf(stdout, "[%02x ]", frame->Data[count]); + + if (count == 15) + fprintf(stdout, "\n"); + } + } + +#endif +#ifdef RLP_DEBUG + /* FCS. */ + + fprintf (stdout, " FCS: %02x %02x %02x\n\n", frame->FCS[0], + frame->FCS[1], + frame->FCS[2]); + + fflush(stdout); + +#endif + + } + else { + + /* RLP Checksum failed - don't we need some statistics about these + failures? Nothing is printed, because in the first stage of connection + there are too many bad RLP frames... */ + +#ifdef DEBUG + fprintf(stdout, _("Frame FCS is bad. Ignoring...\n")); +#endif + + } + + MAIN_STATE_MACHINE(frame, &header); + + /* + Y:= outblock(); + */ + + return; +} + +/* FIXME: real TEST_Handling - we do not handle TEST yet. */ + +void TEST_Handling() { +} + + + +/* FIXME: better XID_handling - but this will answer a XID command. */ + +bool XID_Handling (RLP_F96Frame *frame, RLP_F96Header *header) { + + u8 count; + u8 type; + u8 length; + + if (CurrentFrameType == RLPFT_U_XID) { + + count=0; + + while (frame->Data[count] !=0) { + + type=frame->Data[count] >> 4; + length=frame->Data[count] & 0x0f; + count++; + + switch (type) { + + case 0x01: /* RLP Version Number */ + RLP_VersionNumber=frame->Data[count]; + count+=length; + break; + case 0x02: /* Interworking Function (IWF) to Mobile Station (MS) window size */ + if (frame->Data[count]>=1 && frame->Data[count]Data[count]; + count+=length; + break; + case 0x03: /* MS to IWF window size */ + if (frame->Data[count]>=1 && frame->Data[count]Data[count]; + count+=length; + break; + case 0x04: /* Acknowledgement Timer (T1). */ + RLP_Timeout1_Limit=frame->Data[count]; + count+=length; + break; + case 0x05: /* Retransmission attempts (N2). */ + RLP_N2=frame->Data[count]; + count+=length; + break; + case 0x06: /* Reply delay (T2). */ + RLP_T2=frame->Data[count]; + count+=length; + break; + case 0x07: /* Compression - not yet! */ + break; + default: + count+=length; + break; + } + } + + /* Now reassemble a reply */ + + count=0; + memset(frame->Data,0x00,25); /* Makes debugging easier */ + + /* Version Number - force to 0 for now */ + RLP_VersionNumber=0; + frame->Data[count++]=0x11; + frame->Data[count++]=RLP_VersionNumber; + + /* Window sizes */ + frame->Data[count++]=0x21; + frame->Data[count++]=RLP_RCV_WS; + frame->Data[count++]=0x31; + frame->Data[count++]=RLP_SEND_WS; + + /* Acknowledgement Timer (T1). */ + frame->Data[count++]=0x41; + frame->Data[count++]=RLP_Timeout1_Limit; + + /* Retransmission attempts (N2). */ + frame->Data[count++]=0x51; + frame->Data[count++]=RLP_N2; + + /* Reply delay (T2). */ + frame->Data[count++]=0x61; + frame->Data[count++]=RLP_T2; + + XID_R_State = _send; + + return true; + } + + return false; +} + + +bool Send_TXU(RLP_F96Frame *frame, RLP_F96Header *header) { + +#ifdef DEBUG + // fprintf(stdout, _("Send_TXU()\n")); + // fprintf(stdout, _("XID_R_State=%d\n"), XID_R_State); +#endif + + /* + + if (RLP_UserEvent(TEST_R_State)) { + RLP_SendF96Frame(RLPFT_U_TEST, false, TEST_R_FBit, 0, 0, TEST_R_Data, false); + return true; + } + else + + */ + + if (XID_R_State == _send && frame) { + RLP_SendF96Frame(RLPFT_U_XID, false, true, 0, 0, frame->Data, false); + XID_R_State = _idle; + return true; + } + + /* + + else if ((XID_C_State == _send ) && (Poll_xchg == _idle)) { + RLP_SendF96Frame(RLPFT_U_XID, true, true, 0, 0, XID_C_Data, false); + XID_C_State = _wait; + T_XID = 1; + Poll_xchg = _wait; + return true; + } else if (RLP_UserEvent(UI_State)) { + RLP_SendF96Frame(RLPFT_U_UI, true, false, 0, 0, NULL, false); + return true; + } + + */ + + return false; +} + + +/* Deliver data */ + +void RLP_DeliverAllInSeqIF() +{ + int i,j; + + do { + + if ((R[VR].Data[0] & 0xE0)!=LastStatus) { + LastStatus=(R[VR].Data[0] & 0xE0); + RLP_Passup(StatusChange,&LastStatus,0); + } + + j=0; + i=R[VR].Data[0] & 0x1f; + if (i==0x1e) j=24; + if (i<0x18) j=i; + + /* FIXME - should check for more data in the frame */ + + RLP_Passup(Data,R[VR].Data+1,j); + + R[VR].State=_idle; + VR=Incr(VR); + + } while (R[VR].State==_rcvd); +} + + +/* Mark any missing information frames between VR and Ns*/ +void RLP_MarkMissingIF(u8 Ns) +{ + u8 i; + for (i=VR; i!=Ns; i=Incr(i)) { + if (R[i].State==_idle) R[i].State=_srej; /* bug in spec, fig A.23 */ + } +} + + +/* Information frame handler */ + +bool RLP_I_Handler(RLP_F96Frame *frame, RLP_F96Header *header) +{ + + if ((header->CR) && (header->PF)) + return true; + + /* If the window size is 61, a received frame must have a sequence + number between VR and VR+60 */ + + if (!InWindow(header->Ns,VR,VR+RLP_RCV_WS-1)) + return true; + + if (header->Ns==VR) { + /* This is not in the spec but I think it is necessary */ + if (R[header->Ns].State==_wait) T_RCVS[header->Ns]=-1; + R[VR].State=_rcvd; + memcpy(R[VR].Data,frame->Data,25); + RLP_DeliverAllInSeqIF(); + Ackn_State=_send; + } + else { /* Out of sequence, cause a SREJ */ + if (R[header->Ns].State==_wait) T_RCVS[header->Ns]=-1; + R[header->Ns].State=_rcvd; + memcpy(R[header->Ns].Data,frame->Data,25); + RLP_MarkMissingIF(header->Ns); + } + + return false; +} + + +/* Mark acknowledged send frames */ + +void RLP_AdvanceVA(u8 Nr) +{ + while (VA!=Nr) { + S[VA].State=_idle; + VA=Incr(VA); + } +} + + +/* Decrease VS back down to Nr since these have not been acknowledged */ + +void RLP_DecreaseVS(u8 Nr) +{ + while (VS!=Nr) { + VS=Decr(VS); + S[VS].State=_send; + } +} + +/* Supervisory frame handling */ + +void RLP_S_Handler(RLP_F96Frame *frame, RLP_F96Header *header) +{ + u8 i; + + if ((header->CR) && (header->PF)) { + /* Special exchange (ie. error) - counter? */ +#ifdef RLP_DEBUG + fprintf(stdout, "Got Poll command\n"); +#endif + Ackn_State=_send; + Ackn_FBit=true; + for (i=0; iPF==0) return; + if ((CurrentFrameType==RLPFT_S_SREJ) || (CurrentFrameType==RLPFT_S_REJ) || + (CurrentFrameType==RLPFT_SI_SREJ) || (CurrentFrameType==RLPFT_SI_REJ)) return; + RLP_DecreaseVS(header->Nr); + Poll_State=_idle; + Poll_xchg=_idle; + } + switch (CurrentFrameType){ + + case RLPFT_S_RR: + case RLPFT_SI_RR: + RLP_AdvanceVA(header->Nr); + RRReady=true; + break; + case RLPFT_S_RNR: + case RLPFT_SI_RNR: + RLP_AdvanceVA(header->Nr); + RRReady=false; + break; + case RLPFT_S_REJ: + case RLPFT_SI_REJ: + RLP_AdvanceVA(header->Nr); + RRReady=true; + RLP_DecreaseVS(header->Nr); + break; + case RLPFT_S_SREJ: + case RLPFT_SI_SREJ: + S[header->Nr].State=_send; + T=-1; + return; + default: + break; + } + + if (VA==VS) T=-1; + +} + + +/* Find the first SREJ frame */ + +bool RLP_SREJSlot(u8 *x) +{ + u8 i; + + for (i=Incr(VR); i!=VR; i=Incr(i)) if (R[i].State==_srej) { + *x=i; + return true; + } + + return false; +} + + + +/* Check if any SREJ frames need sending, if not send the next in line */ + +bool RLP_PrepareDataToTransmit(u8 *p) +{ + u8 i; + + for (i=VA; i!=VS; i=Incr(i)) + if (S[i].State==_send) { + *p=i; + S[i].State=_wait; + return true; + } + if (S[VS].State!=_send) return false; + if (!InWindow(VS,VA,VA+RLP_SEND_WS-1)) + return false; + *p=VS; + S[VS].State=_wait; + VS=Incr(VS); + return true; +} + + + +/* Send a SREJ command */ + +void RLP_SendSREJ(u8 x) +{ + u8 k; + + if ((Poll_xchg==_idle) && (Poll_State==_send)) { + +#ifdef RLP_DEBUG + fprintf(stdout, "Sending SREJ with poll\n"); +#endif + + RLP_SendF96Frame(RLPFT_S_SREJ, true, true, x , 0 , NULL, false); + R[x].State=_wait; + RLP_SetTimer(&T_RCVS[x]); + Poll_Count++; + Poll_State=_wait; + Poll_xchg=_wait; + RLP_SetTimer(&T); + } + else if (RRReady && RLP_PrepareDataToTransmit(&k)) { +#ifdef RLP_DEBUG + fprintf(stdout, "Sending SREJ for %d along with frame %d\n",x,k); +#endif + RLP_SendF96Frame(RLPFT_SI_SREJ, true, false, x , k , S[k].Data, false); + R[x].State=_wait; + RLP_SetTimer(&T_RCVS[x]); + RLP_SetTimer(&T); + } + else { +#ifdef RLP_DEBUG + fprintf(stdout, "Sending SREJ for %d\n",x); +#endif + RLP_SendF96Frame(RLPFT_S_SREJ, true, false, x , 0 , NULL, false); + R[x].State=_wait; + RLP_SetTimer(&T_RCVS[x]); + } +} + + +/* Send a command */ + +void RLP_Send_XX_Cmd(RLP_FrameTypes type) +{ + u8 k; + + if ((Poll_xchg!=_wait) && (Poll_State==_send)) { + RLP_SendF96Frame(type, true, true, VR , 0 , NULL, false); +#ifdef RLP_DEBUG + fprintf(stdout, "Sending Comd %x with Poll\n",type); +#endif + Ackn_State=_idle; + Poll_Count++; + Poll_State=_wait; + Poll_xchg=_wait; + RLP_SetTimer(&T); + } + else if (RRReady && RLP_PrepareDataToTransmit(&k)) { +#ifdef RLP_DEBUG + fprintf(stdout, "Sending Comd %x with frame %d\n",type,k); +#endif + RLP_SendF96Frame(type+4, true, false, VR , k , S[k].Data, false); + Ackn_State=_idle; + RLP_SetTimer(&T); + } + else { +#ifdef RLP_DEBUG + if (type!=9) + fprintf(stdout, "Sending Comd %x\n",type); +#endif + RLP_SendF96Frame(type, true, false, VR , 0 , NULL, false); + Ackn_State=_idle; + DTX_SF=type; + DTX_VR=VR; /* As v7.1.0 spec */ + } +} + + +/* Send a Response */ + +void RLP_Send_XX_Resp(RLP_FrameTypes type) +{ + u8 k; + + if (RRReady && RLP_PrepareDataToTransmit(&k)) { +#ifdef RLP_DEBUG + fprintf(stdout, "Sending Resp %x with frame %d\n",type+4,k); +#endif + RLP_SendF96Frame(type+4, false, true, VR , k , S[k].Data, false); + Ackn_State=_idle; + Ackn_FBit=false; + RLP_SetTimer(&T); + } + else { +#ifdef RLP_DEBUG + fprintf(stdout, "Sending Resp %x\n",type); +#endif + RLP_SendF96Frame(type, false, true, VR , 0 , NULL, false); + Ackn_State=_idle; + Ackn_FBit=false; + } +} + + +/* Decide which frame to use and send it - currently only used in state 4 */ + +void RLP_SendData() +{ + u8 x; + + if (UA_State==_send) { + RLP_SendF96Frame(RLPFT_U_UA, false, UA_FBit, 0 , 0 , NULL, false); + UA_State=_idle; + } + else if (Ackn_FBit==true) { +#ifdef RLP_DEBUG + printf("About to send Poll resp\n"); +#endif + if (LRReady) RLP_Send_XX_Resp(RLPFT_S_RR); + else RLP_Send_XX_Resp(RLPFT_S_RNR); + } + else if (RLP_SREJSlot(&x)) RLP_SendSREJ(x); + else if (LRReady) RLP_Send_XX_Cmd(RLPFT_S_RR); + else RLP_Send_XX_Cmd(RLPFT_S_RNR); +} + +void MAIN_STATE_MACHINE(RLP_F96Frame *frame, RLP_F96Header *header) { + int i; + + switch (CurrentState) { + + /***** RLP State 0. *****/ + + /* ADM and Detached. + + This is the initial state after power on. + + As long as the RLP entity is "Detached", DISC(P) and/or SABM at the + lower interface is acted upon by sending DM(P) or DM(1). Any other + stimulus at the lower interface is ignored. + + This state can be exited only with Attach_Req. */ + + case RLP_S0: + +#ifdef DEBUG + fprintf(stdout, _("RLP state 0.\n")); +#endif + + switch (CurrentFrameType) { + + case RLPFT_U_DISC: + RLP_SendF96Frame(RLPFT_U_DM, false, header->PF, 0, 0, NULL, false); + break; + + case RLPFT_U_SABM: + RLP_SendF96Frame(RLPFT_U_DM, false, true, 0, 0, NULL, false); + break; + + default: + RLP_SendF96Frame(RLPFT_U_NULL, false, false, 0, 0, NULL, false); + if (RLP_GetUserRequest(Attach_Req)) { + NextState=RLP_S1; + UA_State=_idle; + } + break; + } + + break; + + /***** RLP State 1. *****/ + + /* ADM and Attached. + + The RLP entity is ready to established a connection, either by + initiating the connection itself (Conn_Req) or by responding to an + incoming connection request (SABM). + + Upon receiving a DISC PDU, the handling of the UA response is + initiated. */ + + case RLP_S1: + +#ifdef DEBUG + fprintf(stdout, _("RLP state 1.\n")); +#endif + + if (!XID_Handling(frame, header)) { + + switch(CurrentFrameType) { + + case RLPFT_U_TEST: + TEST_Handling(); + break; + + case RLPFT_U_SABM: + RLP_Passup(Conn_Ind,NULL,0); + NextState=RLP_S3; + break; + + case RLPFT_U_DISC: + UA_State=_send; + UA_FBit=header->PF; + break; + + case RLPFT_BAD: /* If we get a bad frame we can still respond with SABM */ + default: + if (RLP_GetUserRequest(Conn_Req)) { + SABM_State=_send; + SABM_Count=0; + NextState=RLP_S2; + } + break; + } + + } + if (!Send_TXU(frame, header)) { + + if (UA_State == _send) { + RLP_SendF96Frame(RLPFT_U_UA, false, UA_FBit, 0, 0, NULL, false); + UA_State=_idle; + } + else + RLP_SendF96Frame(RLPFT_U_NULL, false, false, 0, 0, NULL, false); + } + break; + + /***** RLP State 2. *****/ + + case RLP_S2: + +#ifdef DEBUG + fprintf(stdout, _("RLP state 2.\n")); +#endif + + if (!XID_Handling(frame, header)) { + + switch(CurrentFrameType) { + + case RLPFT_U_TEST: + TEST_Handling(); + break; + + case RLPFT_U_SABM: + /* + T=0; + Conn_Conf=true; + UA_State=_send; + UA_FBit=true; + Init_Link_Vars; + NextState=4; + */ + break; + + case RLPFT_U_DISC: + /* + T=0; + DISC_Ind; + UA_State=_send; + UA_FBit=header->PF; + NextState=RLP_S1; + */ + break; + + case RLPFT_U_UA: +#ifdef DEBUG + fprintf(stdout, _("UA received in RLP state 2.\n")); +#endif + + if (SABM_State == _wait && header->PF) { + T=-1; + // Conn_Conf=true; + // Init_Link_Vars; + NextState=RLP_S4; + } + break; + + case RLPFT_U_DM: + if (SABM_State == _wait && header->PF) { + Poll_xchg=_idle; + // Conn_Conf_Neg=true; + NextState=RLP_S1; + } + break; + + default: + if (T == RLP_Timeout1_Limit) { + Poll_xchg=_idle; + if (SABM_Count>RLP_N2) + NextState=RLP_S8; + SABM_State=_send; + } + break; + } + } + + if (!Send_TXU(frame, header)) { + + if (SABM_State == _send && Poll_xchg == _idle) { + RLP_SendF96Frame(RLPFT_U_SABM, true, true, 0, 0, NULL, false); + SABM_State=_wait; + SABM_Count++; + Poll_xchg=_wait; + T=1; + } else + RLP_SendF96Frame(RLPFT_U_NULL, false, false, 0, 0, NULL, false); + } + + if (RLP_GetUserRequest(Disc_Req)) { + T=-1; + DISC_State=_send; + DISC_Count=0; + DISC_PBit=(Poll_xchg==_idle); + NextState=5; + } + + break; + + /***** RLP State 3. *****/ + + case RLP_S3: + +#ifdef DEBUG + fprintf(stdout, _("RLP state 3.\n")); +#endif + + if (!XID_Handling(frame, header)) { + + switch(CurrentFrameType) { + + case RLPFT_U_TEST: + TEST_Handling(); + break; + + case RLPFT_U_DISC: + RLP_Passup(Disc_Ind,NULL,0); + UA_State=_send; + UA_FBit=header->PF; + NextState=RLP_S1; + break; + + default: + if (RLP_GetUserRequest(Conn_Req)) { + UA_State=_send; + UA_FBit=true; + NextState=RLP_S4; + RLP_Init_link_vars(); + } else if (RLP_GetUserRequest(Conn_Req_Neg)) { + DM_State=_send; /* FIXME - code to handle DM_State - missing from spec? */ + DM_FBit=true; + NextState=RLP_S1; + } + break; + } + } + + if (!Send_TXU(frame, header)) { + + if (UA_State == _send) { + RLP_SendF96Frame(RLPFT_U_UA, false, UA_FBit, 0, 0, NULL, false); + UA_State=_idle; + } + else + RLP_SendF96Frame(RLPFT_U_NULL, false, false, 0, 0, NULL, false); + } + + + if (RLP_GetUserRequest(Disc_Req)) { + T=-1; + DISC_State=_send; + DISC_Count=0; + DISC_PBit=(Poll_xchg==_idle); + NextState=5; + } + + break; + + /***** RLP State 4. *****/ + + case RLP_S4: + +#ifdef DEBUG + fprintf(stdout, _("RLP state 4.\n")); +#endif + + if (!XID_Handling(frame, header)) { + + switch (CurrentFrameType) { + + case RLPFT_U_TEST: + TEST_Handling(); + break; + case RLPFT_U_DISC: + T=-1; + ResetAllT_RCVS(); + RLP_Passup(Disc_Ind,NULL,0); + UA_State=_send; + UA_FBit=header->PF; + NextState=RLP_S1; + break; + case RLPFT_U_SABM: + T=-1; + ResetAllT_RCVS(); + RLP_Passup(Reset_Ind,NULL,0); + NextState=RLP_S7; + break; + case RLPFT_S_RR: + case RLPFT_S_RNR: + case RLPFT_S_REJ: + case RLPFT_S_SREJ: + /* Should check here for unsolicited Fbit */ + /* Spec says: "Nr must be within the set of not yet + acknowledged I-frames or it must be the next possible + frame number." That's VA..VS-1 or VS, i.e. VA..VS */ + if (!InWindow(header->Nr,VA,VS)) + break; + RLP_S_Handler(frame,header); + break; + case RLPFT_SI_RR: + case RLPFT_SI_RNR: + case RLPFT_SI_REJ: + case RLPFT_SI_SREJ: + /* Should check here for unsolicited Fbit */ + if (!InWindow(header->Nr,VA,VS)) + break; + if (!RLP_I_Handler(frame,header)) RLP_S_Handler(frame,header); + break; + default: + break; + } + } + + for (i=0;iRLP_N2) { +#ifdef RLP_DEBUG + fprintf(stdout, "N2 Errors in State 4\n"); +#endif + } + Poll_State=_send; + Poll_Count++; + } + } + + if (!Send_TXU(frame,header)) { + if (UA_State == _send) { + RLP_SendF96Frame(RLPFT_U_UA, false, UA_FBit, 0, 0, NULL, false); + UA_State=_idle; + } + else RLP_SendData(); + } + + + /* Load any data from the Send ringbuffer into the send slots */ + RLP_AddRingBufferDataToSlots(); + +#ifdef RLP_DEBUG + // if (CurrentFrameType!=RLPFT_BAD) + fprintf(stdout, "VD=%d, VA=%d, VS=%d, VR=%d\n",VD,VA,VS,VR); +#ifdef RLP_DEBUG_STATE + { + int zzz; + + if(UA_State!=_idle) printf("[UA_State %d]",UA_State); + if(UI_State!=_idle) printf("[UI_State %d]",UI_State); + if(Ackn_State!=_idle) printf("[Ackn_State %d]",Ackn_State); + if(Poll_State!=_idle) printf("[Poll_State %d]",Poll_State); + if(Poll_xchg!=_idle) printf("[Poll_xchg %d]",Poll_xchg); + if(SABM_State!=_idle) printf("[SABM_State %d]",SABM_State); + if(DISC_State!=_idle) printf("[DISC_State %d]",DISC_State); + if(DM_State!=_idle) printf("[DM_State %d]",DM_State); + if(XI_R_State!=_idle) printf("[XI_R_State %d]",XI_R_State); + if(XID_C_State!=_idle) printf("[XID_C_State %d]",XID_C_State); + if(XID_R_State!=_idle) printf("[XID_R_State %d]",XID_R_State); + if(TEST_R_State!=_idle) printf("[TEST_R_State %d]",TEST_R_State); + + printf("S: "); + for (zzz=0; zzzPF)) { + if (DISC_PBit==true) Poll_xchg=_idle; + T=-1; + NextState=1; + } + break; + case RLPFT_U_DISC: + T=-1; + UA_State=_send; + UA_FBit=header->PF; + NextState=1; + break; + default: + break; + } + } + + if (!Send_TXU(frame,header)) { + if ((DISC_State!=_wait) && !((DISC_PBit==true) && (Poll_xchg==_wait))) { + RLP_SendF96Frame(RLPFT_U_DISC, true, DISC_PBit, 0, 0, NULL, false); + if (DISC_PBit==true) Poll_xchg=_wait; + DISC_State=_wait; + DISC_Count++; + RLP_SetTimer(&T); + } + else + RLP_SendF96Frame(RLPFT_U_NULL, false, false, 0, 0, NULL, false); + } + + if (T==0) { + if (DISC_PBit==1) Poll_xchg=_idle; + DISC_Count++; + if (DISC_Count>RLP_N2) { + +#ifdef RLP_DEBUG + fprintf(stdout, "N2 error in State 5!\n"); +#endif + + } + DISC_State=_send; + } + + break; + + /***** RLP State 6. *****/ + /* We should only get here after a Reset_Req which is not yet supported */ + + case RLP_S6: + +#ifdef DEBUG + fprintf(stdout, _("RLP state 6 - not yet implemented!\n")); +#endif + + if (!XID_Handling(frame, header)) { + + switch (CurrentFrameType) { + default: + break; + } + + } + + if (!Send_TXU(frame,header)) { + } + + if (RLP_GetUserRequest(Disc_Req)) { + T=-1; + DISC_State=_send; + DISC_Count=0; + DISC_PBit=(Poll_xchg==_idle); + NextState=5; + } + + break; + + + /***** RLP State 7. *****/ + + case RLP_S7: + +#ifdef DEBUG + fprintf(stdout, _("RLP state 7.\n")); +#endif + + if (!XID_Handling(frame, header)) { + + switch (CurrentFrameType) { + case RLPFT_U_DISC: + RLP_Passup(Disc_Ind,NULL,0); + UA_State=_send; + UA_FBit=header->PF; + NextState=RLP_S1; + break; + default: + break; + } + } + + if (RLP_GetUserRequest(Reset_Resp)){ + UA_State=_send; + UA_FBit=1; + RLP_Init_link_vars(); + NextState=RLP_S4; + } + + if (!Send_TXU(frame,header)) { + RLP_SendF96Frame(RLPFT_U_NULL, false, false, 0, 0, NULL, false); + } + + if (RLP_GetUserRequest(Disc_Req)) { + T=-1; + DISC_State=_send; + DISC_Count=0; + DISC_PBit=(Poll_xchg==_idle); + NextState=5; + } + + break; + + + default: + +#ifdef DEBUG + fprintf(stdout, _("DEBUG: Unknown RLP state!\n")); +#endif + + break; + } + + CurrentState=NextState; + +} + +/* Given a pointer to an RLP XID frame, display contents in human readable + form. Note for now only Version 0 and 1 are supported. Fields can appear + in any order and are delimited by a zero type field. This function is the + exact implementation of section 5.2.2.6, Exchange Identification, XID of + the GSM specification 04.22. */ + +void RLP_DisplayXID(u8 *frame) +{ + + int count = 25; /* Sanity check */ + u8 type, length; + + fprintf(stdout, "XID: "); + + while ((*frame !=0) && (count >= 0)) { + + type = *frame >> 4; + length = *frame & 0x0f; + + switch (type) { + + case 0x01: /* RLP Version Number, probably 1 for Nokia. */ + + frame += length; + fprintf(stdout, "Ver %d ", *frame); + break; + + case 0x02: /* IWF to MS window size */ + + frame += length; + fprintf(stdout, "IWF-MS %d ", *frame); + break; + + case 0x03: /* MS to IWF window size. */ + + frame += length; + fprintf(stdout, "MS-IWF %d ", *frame); + break; + + case 0x04: /* Acknowledgement Timer (T1). */ + + frame += length; + fprintf(stdout, "T1 %dms ", *frame * 10); + break; + + case 0x05: /* Retransmission attempts (N2). */ + + frame += length; + fprintf(stdout, "N2 %d ", *frame); + break; + + case 0x06: /* Reply delay (T2). */ + + frame += length; + fprintf(stdout, "T2 %dms ", *frame * 10); + break; + + case 0x07: /* Compression. */ + + frame ++; + fprintf(stdout, "Comp [Pt=%d ", (*frame >> 4) ); + fprintf(stdout, "P0=%d ", (*frame & 0x03) ); + + frame ++; + fprintf(stdout, "P1l=%d ", *frame); + frame ++; + fprintf(stdout, "P1h=%d ", *frame); + + frame ++; + fprintf(stdout, "P2=%d] ", *frame); + break; + + default: + + frame += length; + fprintf(stdout, "Unknown! type=%02x, length=%02x", type, length); + break; + + } + count --; + frame ++; + } + + return; +} + +/* Given a pointer to an F9.6 Frame, split data out into component parts of + header and determine frame type. */ + +void RLP_DecodeF96Header(RLP_F96Frame *frame, RLP_F96Header *header) +{ + + /* Poll/Final bit. */ + + if ((frame->Header[1] & 0x02)) + header->PF = true; + else + header->PF = false; + + /* Command/Response bit. */ + + if ((frame->Header[0] & 0x01)) + header->CR = true; + else + header->CR = false; + + /* Send Sequence Number. */ + + header->Ns = frame->Header[0] >> 3; + + if ((frame->Header[1] & 0x01)) + header->Ns |= 0x20; /* Most significant bit. */ + + /* Determine frame type. See the section 5.2.1 in the GSM 04.22 + specification. */ + + switch (header->Ns) { + + case 0x3f: /* Frames of type U, unnumbered frames. */ + + /* U frames have M1, ..., M5 stored in the place of N(R). */ + + header->Type = RLPFT_U; + header->M = (frame->Header[1] >> 2) & 0x1f; + return; /* For U frames, we do not need N(R) and bits S1 and S2. */ + + case 0x3e: /* Frames of type S, supervisory frames. */ + + header->Type = RLPFT_S; + break; + + default: /* Frames of type I+S, numbered information transfer ans + supervisory frames combined. */ + + header->Type = RLPFT_IS; + break; + } + + /* Receive Sequence Number N(R). */ + header->Nr = frame->Header[1] >> 2; + + /* Status bits (S1 and S2). */ + header->S = (frame->Header[0] >> 1) & 0x03; + + return; +} + + diff --git a/common/data/rlp-crc24.c b/common/data/rlp-crc24.c new file mode 100644 index 0000000..cc8af90 --- /dev/null +++ b/common/data/rlp-crc24.c @@ -0,0 +1,106 @@ +/* + + $Id$ + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + CRC24 (aka FCS) implementation in RLP. + +*/ + +#include "data/rlp-crc24.h" + +/* CRC-24 table is used for computation of RLP checksum. */ + +const u32 CRC24_Table[256] = { + 0x00000000, 0x00D6A776, 0x00F64557, 0x0020E221, 0x00B78115, 0x00612663, + 0x0041C442, 0x00976334, 0x00340991, 0x00E2AEE7, 0x00C24CC6, 0x0014EBB0, + 0x00838884, 0x00552FF2, 0x0075CDD3, 0x00A36AA5, 0x00681322, 0x00BEB454, + 0x009E5675, 0x0048F103, 0x00DF9237, 0x00093541, 0x0029D760, 0x00FF7016, + 0x005C1AB3, 0x008ABDC5, 0x00AA5FE4, 0x007CF892, 0x00EB9BA6, 0x003D3CD0, + 0x001DDEF1, 0x00CB7987, 0x00D02644, 0x00068132, 0x00266313, 0x00F0C465, + 0x0067A751, 0x00B10027, 0x0091E206, 0x00474570, 0x00E42FD5, 0x003288A3, + 0x00126A82, 0x00C4CDF4, 0x0053AEC0, 0x008509B6, 0x00A5EB97, 0x00734CE1, + 0x00B83566, 0x006E9210, 0x004E7031, 0x0098D747, 0x000FB473, 0x00D91305, + 0x00F9F124, 0x002F5652, 0x008C3CF7, 0x005A9B81, 0x007A79A0, 0x00ACDED6, + 0x003BBDE2, 0x00ED1A94, 0x00CDF8B5, 0x001B5FC3, 0x00FB4733, 0x002DE045, + 0x000D0264, 0x00DBA512, 0x004CC626, 0x009A6150, 0x00BA8371, 0x006C2407, + 0x00CF4EA2, 0x0019E9D4, 0x00390BF5, 0x00EFAC83, 0x0078CFB7, 0x00AE68C1, + 0x008E8AE0, 0x00582D96, 0x00935411, 0x0045F367, 0x00651146, 0x00B3B630, + 0x0024D504, 0x00F27272, 0x00D29053, 0x00043725, 0x00A75D80, 0x0071FAF6, + 0x005118D7, 0x0087BFA1, 0x0010DC95, 0x00C67BE3, 0x00E699C2, 0x00303EB4, + 0x002B6177, 0x00FDC601, 0x00DD2420, 0x000B8356, 0x009CE062, 0x004A4714, + 0x006AA535, 0x00BC0243, 0x001F68E6, 0x00C9CF90, 0x00E92DB1, 0x003F8AC7, + 0x00A8E9F3, 0x007E4E85, 0x005EACA4, 0x00880BD2, 0x00437255, 0x0095D523, + 0x00B53702, 0x00639074, 0x00F4F340, 0x00225436, 0x0002B617, 0x00D41161, + 0x00777BC4, 0x00A1DCB2, 0x00813E93, 0x005799E5, 0x00C0FAD1, 0x00165DA7, + 0x0036BF86, 0x00E018F0, 0x00AD85DD, 0x007B22AB, 0x005BC08A, 0x008D67FC, + 0x001A04C8, 0x00CCA3BE, 0x00EC419F, 0x003AE6E9, 0x00998C4C, 0x004F2B3A, + 0x006FC91B, 0x00B96E6D, 0x002E0D59, 0x00F8AA2F, 0x00D8480E, 0x000EEF78, + 0x00C596FF, 0x00133189, 0x0033D3A8, 0x00E574DE, 0x007217EA, 0x00A4B09C, + 0x008452BD, 0x0052F5CB, 0x00F19F6E, 0x00273818, 0x0007DA39, 0x00D17D4F, + 0x00461E7B, 0x0090B90D, 0x00B05B2C, 0x0066FC5A, 0x007DA399, 0x00AB04EF, + 0x008BE6CE, 0x005D41B8, 0x00CA228C, 0x001C85FA, 0x003C67DB, 0x00EAC0AD, + 0x0049AA08, 0x009F0D7E, 0x00BFEF5F, 0x00694829, 0x00FE2B1D, 0x00288C6B, + 0x00086E4A, 0x00DEC93C, 0x0015B0BB, 0x00C317CD, 0x00E3F5EC, 0x0035529A, + 0x00A231AE, 0x007496D8, 0x005474F9, 0x0082D38F, 0x0021B92A, 0x00F71E5C, + 0x00D7FC7D, 0x00015B0B, 0x0096383F, 0x00409F49, 0x00607D68, 0x00B6DA1E, + 0x0056C2EE, 0x00806598, 0x00A087B9, 0x007620CF, 0x00E143FB, 0x0037E48D, + 0x001706AC, 0x00C1A1DA, 0x0062CB7F, 0x00B46C09, 0x00948E28, 0x0042295E, + 0x00D54A6A, 0x0003ED1C, 0x00230F3D, 0x00F5A84B, 0x003ED1CC, 0x00E876BA, + 0x00C8949B, 0x001E33ED, 0x008950D9, 0x005FF7AF, 0x007F158E, 0x00A9B2F8, + 0x000AD85D, 0x00DC7F2B, 0x00FC9D0A, 0x002A3A7C, 0x00BD5948, 0x006BFE3E, + 0x004B1C1F, 0x009DBB69, 0x0086E4AA, 0x005043DC, 0x0070A1FD, 0x00A6068B, + 0x003165BF, 0x00E7C2C9, 0x00C720E8, 0x0011879E, 0x00B2ED3B, 0x00644A4D, + 0x0044A86C, 0x00920F1A, 0x00056C2E, 0x00D3CB58, 0x00F32979, 0x00258E0F, + 0x00EEF788, 0x003850FE, 0x0018B2DF, 0x00CE15A9, 0x0059769D, 0x008FD1EB, + 0x00AF33CA, 0x007994BC, 0x00DAFE19, 0x000C596F, 0x002CBB4E, 0x00FA1C38, + 0x006D7F0C, 0x00BBD87A, 0x009B3A5B, 0x004D9D2D +}; + +void RLP_CalculateCRC24Polinomial(u8 *data, int length, u32 *polinomial) +{ + + int i; + u8 cur; + + *polinomial = 0x00ffffff; + + for (i = 0; i < length; i++) { + cur = (*polinomial & 0x0000ffff) ^ data[i]; + *polinomial = (*polinomial >> 8) ^ CRC24_Table[cur]; + } + + *polinomial = ((~*polinomial) & 0x00ffffff); +} + + +void RLP_CalculateCRC24Checksum(u8 *data, int length, u8 *crc) +{ + u32 polinomial; + + RLP_CalculateCRC24Polinomial(data, length, &polinomial); + crc[0] = polinomial & 0x0000ffff; + crc[1] = (polinomial >> 8) & 0x0000ffff; + crc[2] = (polinomial >> 16) & 0x0000ffff; + +} + +bool RLP_CheckCRC24FCS(u8 *data, int length) +{ + + u8 crc[] = { 0x00, 0x00, 0x00 }; + + RLP_CalculateCRC24Checksum(data, length - 3, crc); + + if (((data[length - 3] == crc[0]) && + (data[length - 2] == crc[1]) && + (data[length - 1] == crc[2]))) { + return (true); + } + return (false); +} diff --git a/common/data/virtmodem.c b/common/data/virtmodem.c new file mode 100644 index 0000000..7c7f4e2 --- /dev/null +++ b/common/data/virtmodem.c @@ -0,0 +1,345 @@ +/* + $Id$ + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This file provides a virtual modem interface to the GSM phone by calling + code in gsm-api.c, at-emulator.c and datapump.c. The code here provides + the overall framework and coordinates switching between command mode + (AT-emulator) and "online" mode where the data pump code translates data + from/to the GSM handset and the modem data/fax stream. + +*/ + +#define __virtmodem_c + +#include + +/* This is the right way to include stdlib with __USE_XOPEN defined */ +#ifdef USE_UNIX98PTYS +# define _XOPEN_SOURCE 500 +# include +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "misc.h" +#include "gsm-api.h" +#include "gsm-common.h" +#include "data/at-emulator.h" +#include "data/datapump.h" +#include "data/virtmodem.h" +#include "data/rlp-common.h" + + /* Global variables */ + +//extern bool TerminateThread; +int ConnectCount; + + /* Local variables */ + +int PtyRDFD; /* File descriptor for reading and writing to/from */ +int PtyWRFD; /* pty interface - only different in debug mode. */ + +bool UseSTDIO; /* Use STDIO for debugging purposes instead of pty */ +bool CommandMode; + +pthread_t Thread; +bool RequestTerminate; + + + /* If initialised in debug mode, stdin/out is used instead + of ptys for interface. */ +bool VM_Initialise(char *model,char *port, char *initlength, GSM_ConnectionType connection, char *bindir, bool debug_mode, bool GSMInit,char *synchronizetime) +{ + int rtn; + + CommandMode = true; + + RequestTerminate = false; + + if (debug_mode == true) { + UseSTDIO = true; + } + else { + UseSTDIO = false; + } + + if (GSMInit) { +#ifdef DEBUG + fprintf (stderr , "Initialising GSM\n"); +#endif /* DEBUG */ + if ((VM_GSMInitialise(model, port, initlength, connection, synchronizetime) != GE_NONE)) { + fprintf (stderr, _("VM_Initialise - VM_GSMInitialise failed!\n")); + return (false); + + } + } + GSMInit=false; + + if (VM_PtySetup(bindir) < 0) { + fprintf (stderr, _("VM_Initialise - VM_PtySetup failed!\n")); + return (false); + } + + if (ATEM_Initialise(PtyRDFD, PtyWRFD, model, port) != true) { + fprintf (stderr, _("VM_Initialise - ATEM_Initialise failed!\n")); + return (false); + } + + if (DP_Initialise(PtyRDFD, PtyWRFD) != true) { + fprintf (stderr, _("VM_Initialise - DP_Initialise failed!\n")); + return (false); + } + + /* Create and start thread, */ + rtn = pthread_create(&Thread, NULL, (void *) VM_ThreadLoop, (void *)NULL); + + if (rtn == EAGAIN || rtn == EINVAL) { + return (false); + } + return (true); +} + +void VM_ThreadLoop(void) +{ + int res; + struct pollfd ufds; + + /* Note we can't use signals here as they are already used + in the FBUS code. This may warrant changing the FBUS + code around sometime to use select instead to free up + the SIGIO handler for mainline code. */ + + ufds.fd=PtyRDFD; + ufds.events=POLLIN; + + while (!RequestTerminate) { + if (!CommandMode) { + sleep(1); + } else { /* If we are in data mode, leave it to datapump to get the data */ + + res=poll(&ufds,1,500); + + switch (res) { + case 0: /* Timeout */ + break; + + case -1: + perror("VM_ThreadLoop - select"); + exit (-1); + + default: + if (ufds.revents==POLLIN) { + VM_CharHandler(); + } else usleep(500); /* Probably the file has been closed */ + break; + } + } + } + +} + + /* Application should call VM_Terminate to shut down + the virtual modem thread */ +void VM_Terminate(void) +{ + + /* Request termination of thread */ + RequestTerminate = true; + + /* Now wait for thread to terminate. */ + pthread_join(Thread, NULL); + + if (!UseSTDIO) { + close (PtyRDFD); + close (PtyWRFD); + } +} + + /* Open pseudo tty interface and (in due course create a symlink + to be /dev/gnokii etc. ) */ + +int VM_PtySetup(char *bindir) +{ + int err; + char mgnokiidev[200]; + char *slave_name; + char cmdline[200]; + + if (bindir) { + strncpy(mgnokiidev, bindir, 200); + strcat(mgnokiidev, "/"); + } + strncat(mgnokiidev, "mgnokiidev", 200 - strlen(bindir)); + + if (UseSTDIO) { + PtyRDFD = STDIN_FILENO; + PtyWRFD = STDOUT_FILENO; + return (0); + } + + PtyRDFD = VM_GetMasterPty(&slave_name); + if (PtyRDFD < 0) { + fprintf (stderr, _("Couldn't open pty!\n")); + return(-1); + } + PtyWRFD = PtyRDFD; + + /* Check we haven't been installed setuid root for some reason + if so, don't create /dev/gnokii */ + if (getuid() != geteuid()) { + fprintf(stderr, _("gnokiid should not be installed setuid root!\n")); + return (0); + } + +#ifdef DEBUG + fprintf (stderr, _("Slave pty is %s, calling %s to create /dev/gnokii.\n"), slave_name, mgnokiidev); +#endif /* DEBUG */ + + /* Create command line, something line ./mkgnokiidev ttyp0 */ + sprintf(cmdline, "%s %s", mgnokiidev, slave_name); + + /* And use system to call it. */ + err = system (cmdline); + + return (err); + +} + + /* Handler called when characters received from serial port. + calls state machine code to process it. */ +void VM_CharHandler(void) +{ + unsigned char buffer[255]; + int res; + + + /* If we are in command mode, get the character, otherwise leave it */ + + if (CommandMode && ATEM_Initialised) { + + res = read(PtyRDFD, buffer, 255); + + /* A returned value of -1 means something serious has gone wrong - so quit!! */ + /* Note that file closure etc. should have been dealt with in ThreadLoop */ + + if (res < 0) { +// TerminateThread=true; + return; + } + + ATEM_HandleIncomingData(buffer, res); + } +} + + /* Initialise GSM interface, returning GSM_Error as appropriate */ +GSM_Error VM_GSMInitialise(char *model, char *port, char *initlength, GSM_ConnectionType connection, char *synchronizetime) +{ + int count=0; + GSM_Error error; + + /* Initialise the code for the GSM interface. */ + + error = GSM_Initialise(model,port, initlength, connection, RLP_DisplayF96Frame, synchronizetime); + + if (error != GE_NONE) { + fprintf(stderr, _("GSM/FBUS init failed! (Unknown model ?). Quitting.\n")); + return (error); + } + + /* First (and important!) wait for GSM link to be active. We allow 10 + seconds... */ + + while (count++ < 200 && *GSM_LinkOK == false) { + usleep(50000); + } + + if (*GSM_LinkOK == false) { + fprintf (stderr, _("Hmmm... GSM_LinkOK never went true. Quitting. \n")); + return (GE_NOLINK); + } + + return (GE_NONE); +} + +/* VM_GetMasterPty() + Takes a double-indirect character pointer in which to put a slave + name, and returns an integer file descriptor. If it returns < 0, an + error has occurred. Otherwise, it has returned the master pty + file descriptor, and fills in *name with the name of the + corresponding slave pty. Once the slave pty has been opened, + you are responsible to free *name. Code is from Developling Linux + Applications by Troan and Johnson */ + + +int VM_GetMasterPty(char **name) { + +#ifdef USE_UNIX98PTYS + int master, err; + + master = open("/dev/ptmx", O_RDWR | O_NOCTTY | O_NONBLOCK); + if (master >= 0) { + err = grantpt(master); + err = err || unlockpt(master); + if (!err) { + *name = ptsname(master); + } else { + return(-1); + } + } +#else /* USE_UNIX98PTYS */ + int i = 0 , j = 0; + /* default to returning error */ + int master = -1; + + /* create a dummy name to fill in */ + *name = strdup("/dev/ptyXX"); + + /* search for an unused pty */ + for (i=0; i<16 && master <= 0; i++) { + for (j=0; j<16 && master <= 0; j++) { + (*name)[8] = "pqrstuvwxyzPQRST"[i]; + (*name)[9] = "0123456789abcdef"[j]; + /* open the master pty */ + if ((master = open(*name, O_RDWR | O_NOCTTY | O_NONBLOCK )) < 0) { + if (errno == ENOENT) { + /* we are out of pty devices */ + free (*name); + return (master); + } + } + } + } + if ((master < 0) && (i == 16) && (j == 16)) { + /* must have tried every pty unsuccessfully */ + free (*name); + return (master); + } + + /* By substituting a letter, we change the master pty + * name into the slave pty name. + */ + (*name)[5] = 't'; + +#endif /* USE_UNIX98PTYS */ + + return (master); +} + diff --git a/common/devices/device.c b/common/devices/device.c new file mode 100644 index 0000000..9795a79 --- /dev/null +++ b/common/devices/device.c @@ -0,0 +1,464 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#ifndef WIN32 + #include "devices/unixserial.h" + #include "devices/unixirda.h" + #include "devices/tekram.h" + #include + #include + #include + #include + #include +#else + #include + #include "devices/winserial.h" +#endif + +#include "gsm-api.h" +#include "devices/device.h" + +#include + +#ifdef VC6 + /* for VC6 make scripts save VERSION constant in mversion.h file */ + #include "mversion.h" +#endif + +char PortDevice[GSM_MAX_DEVICE_NAME_LENGTH]={0x00}; + +bool duringwrite; + +#ifndef WIN32 + +//pthread_t Thread; +#if defined(__svr4__) || defined(__FreeBSD__) + pthread_t selThread; +#endif + +int device_portfd = -1; + +/* + * Structure to store the filedescriptor we use. + * + */ +int device_getfd(void) +{ + return device_portfd; +} + +int device_open(__const char *__file, int __with_odd_parity) { + + switch (CurrentConnectionType) { + case GCT_Tekram: + device_portfd = tekram_open(__file); + break; + case GCT_Irda: + device_portfd = irda_open(); + break; + default: + device_portfd = serial_opendevice(__file, __with_odd_parity, true, false); + break; + } + + return (device_portfd >= 0); +} + +void device_close(void) +{ + AppendLogText("CLOSE\n",false); + + /* Now wait for thread to terminate. */ + //pthread_join(Thread, NULL); + + switch (CurrentConnectionType) { + case GCT_Tekram: tekram_close(device_portfd); break; + case GCT_Irda : irda_close(device_portfd); break; + default : serial_close(device_portfd); break; + } + + PortDevice[0]=0x00; +} + +void device_reset(void) { +} + +void device_setdtrrts(int __dtr, int __rts) +{ + switch (CurrentConnectionType) { + case GCT_Tekram: + case GCT_Irda: + break; + default: + serial_setdtrrts(device_portfd, __dtr, __rts); +#ifdef DEBUG + device_dumpserial(); +#endif + break; + } +} + +void device_changespeed(int __speed) +{ + switch (CurrentConnectionType) { + case GCT_Irda: + break; + case GCT_Tekram: + tekram_changespeed(device_portfd, __speed); + break; + default: + serial_changespeed(device_portfd, __speed); +#ifdef DEBUG + fprintf(stdout,_("Serial device: changing speed to %i\n"),__speed); +#endif + break; + } +} + +size_t device_read(__ptr_t __buf, size_t __nbytes) +{ + switch (CurrentConnectionType) { + case GCT_Tekram: return (tekram_read(device_portfd, __buf, __nbytes)); break; + case GCT_Irda : return ( irda_read(device_portfd, __buf, __nbytes)); break; + default : return (serial_read(device_portfd, __buf, __nbytes)); break; + } +} + +size_t device_write(__const __ptr_t __buf, size_t __n) { + u8 buffer[300]; + size_t mysize; + + while (duringwrite) {} + + memcpy(buffer,__buf,__n); + AppendLog(buffer,__n,true); + + duringwrite=true; + switch (CurrentConnectionType) { + case GCT_Irda : mysize = irda_write(device_portfd, __buf, __n); break; + case GCT_Tekram: mysize = tekram_write(device_portfd, __buf, __n); break; + default : mysize = serial_write(device_portfd, __buf, __n); break; + } + duringwrite=false; + return mysize; +} + +#ifdef DEBUG +void device_dumpserial(void) +{ + int PortFD; + unsigned int Flags=0; + + PortFD = device_getfd(); + + ioctl(PortFD, TIOCMGET, &Flags); + + fprintf(stdout, _("Serial device:")); + fprintf(stdout, _(" DTR is %s"), Flags&TIOCM_DTR?_("up"):_("down")); + fprintf(stdout, _(", RTS is %s"), Flags&TIOCM_RTS?_("up"):_("down")); + fprintf(stdout, _(", CAR is %s"), Flags&TIOCM_CAR?_("up"):_("down")); + fprintf(stdout, _(", CTS is %s\n"), Flags&TIOCM_CTS?_("up"):_("down")); +} +#endif /* DEBUG */ + +void SigHandler(int status) +{ + + unsigned char buffer[2048]; + + int count, res; + + res = device_read(buffer, 255); + + for (count = 0; count < res ; count ++) { + Protocol->StateMachine(buffer[count]); + } +} + + +#if defined(__svr4__) || defined(__FreeBSD__) +/* thread for handling incoming data */ +void SelectLoop() { + int err; + fd_set readfds; + struct timeval timeout; + + FD_ZERO(&readfds); + FD_SET(device_portfd,&readfds); + /* set timeout to 15 seconds */ + timeout.tv_sec=15; + timeout.tv_usec=0; + while (!CurrentRequestTerminate) { + err=select(device_portfd+1,&readfds,NULL,NULL,&timeout); + if ( err > 0 ) { + /* call singal handler to process incoming data */ + SigHandler(0); + /* refresh timeout, just for linux :-( */ + /* required for irda */ + timeout.tv_sec=15; + } else { + if (err == -1) + perror("Error in SelectLoop"); + } + } +} +#endif + +bool StartConnection (char *port_device, bool with_odd_parity, GSM_ConnectionType con) +{ + int result; + + char text[100]; + +#if defined(__svr4__) || defined(__FreeBSD__) + int rtn; +#else + struct sigaction sig_io; +#endif + +#ifdef DEBUG + if ((strstr(GSM_Info->IrdaModels,"decode")!=NULL) && (CurrentConnectionType == GCT_Irda)) + { + printf("DEBUG and Irda decode Model -> not realy open ;-)\n"); + return true; + } +#endif + + if (PortDevice[0]!=0x00) return true; + + duringwrite=false; + + strncpy(PortDevice, port_device, GSM_MAX_DEVICE_NAME_LENGTH); + +#ifdef DEBUG + fprintf(stdout,_("Opening \"%s\" device...\n"),PortDevice); +#endif + + strcpy(text,"\n\n\nMygnokii "); + sprintf(text+strlen(text), "%s",VERSION); + strcpy(text+strlen(text),"\n"); + AppendLogText(text,false); + + strcpy(text,"Port "); + strcpy(text+strlen(text),PortDevice); + strcpy(text+strlen(text),"\n"); + AppendLogText(text,false); + + strcpy(text,"Connection "); + switch (con) { + case GCT_FBUS :strcpy(text+strlen(text),"FBUS");break; + case GCT_Infrared:strcpy(text+strlen(text),"infrared");break; + case GCT_Irda :strcpy(text+strlen(text),"irda sockets");break; + case GCT_MBUS :strcpy(text+strlen(text),"MBUS");break; + case GCT_DLR3 :strcpy(text+strlen(text),"DLR3");break; + case GCT_Tekram :strcpy(text+strlen(text),"Tekram");break; + case GCT_AT :strcpy(text+strlen(text),"AT");break; + default :strcpy(text+strlen(text),"unknown");break; + } + strcpy(text+strlen(text),"\n"); + AppendLogText(text,false); + + /* Ralf Thelen: In this moment there is NO method of communication, + which require keepalive packets and GSM->KeepAlive is + always NULL_KeepAlive, I comment this thread, */ + + /* Create and start main thread. */ +// rtn = pthread_create(&Thread, NULL,(void*)GSM->KeepAlive, (void *)NULL); +// +// if (rtn != 0) { +// fprintf(stdout,_("Error\n")); +// return false; +// } + +#if defined(__svr4__) || defined(__FreeBSD__) +#else + /* Set up and install handler before enabling async IO on port. */ + sig_io.sa_handler = SigHandler; + sig_io.sa_flags = 0; + sigaction (SIGIO, &sig_io, NULL); +#endif + + /* Open device. */ + result = device_open(PortDevice, with_odd_parity); + + if (!result) { + fprintf(stdout,_("Error\n")); + return false; + } + +#if defined(__svr4__) || defined(__FreeBSD__) + /* create a thread to handle incoming data from mobile phone */ + rtn=pthread_create(&selThread,NULL,(void*)SelectLoop,(void*)NULL); + if (rtn != 0) { + fprintf(stdout,_("Error\n")); + return false; + } +#endif + + return true; +} + +/* ---------------- RTH: #ifdef WIN32 ------------------ */ + +#else + + extern HANDLE hPhone; + +void device_close(void) +{ + AppendLogText("CLOSE\n",false); + + CloseConnection(); + + PortDevice[0]=0x00; +} + +#ifdef DEBUG +void device_dumpserial(void) +{ + DCB dcb; + + dcb.DCBlength = sizeof(DCB); + GetCommState(hPhone, &dcb); + + fprintf(stdout, _("Serial device:")); + fprintf(stdout, _(" DTR is ")); + switch (dcb.fDtrControl) { + case DTR_CONTROL_ENABLE : fprintf(stdout, _("up")); break; + case DTR_CONTROL_DISABLE : fprintf(stdout, _("down")); break; + case DTR_CONTROL_HANDSHAKE: fprintf(stdout, _("handshake"));break; + } + fprintf(stdout, _(", RTS is ")); + switch (dcb.fRtsControl) { + case RTS_CONTROL_ENABLE : fprintf(stdout, _("up\n")); break; + case RTS_CONTROL_DISABLE : fprintf(stdout, _("down\n")); break; + case RTS_CONTROL_HANDSHAKE: fprintf(stdout, _("handshake\n"));break; + case RTS_CONTROL_TOGGLE : fprintf(stdout, _("toggle\n")); break; + } +} +#endif /* DEBUG */ + +void device_setdtrrts(int __dtr, int __rts) +{ + DCB dcb; + + dcb.DCBlength = sizeof(DCB); + GetCommState(hPhone, &dcb); + + if (__dtr==1) dcb.fDtrControl = DTR_CONTROL_ENABLE; + else dcb.fDtrControl = DTR_CONTROL_DISABLE; + + if (__rts==1) dcb.fRtsControl = RTS_CONTROL_ENABLE; + else dcb.fRtsControl = RTS_CONTROL_DISABLE; + + SetCommState(hPhone, &dcb); + +#ifdef DEBUG + device_dumpserial(); +#endif +} + +void device_changespeed(int __speed) +{ + + DCB dcb; + + dcb.DCBlength = sizeof(DCB); + GetCommState(hPhone, &dcb); + + switch (__speed) { + case 115200: dcb.BaudRate=CBR_115200; break; + case 19200 : dcb.BaudRate=CBR_19200; break; + case 9600 : dcb.BaudRate=CBR_9600; break; + } + + SetCommState(hPhone, &dcb); + +#ifdef DEBUG + fprintf(stdout,_("Serial device: changing speed to %i\n"),__speed); +#endif +} + +bool StartConnection (char *port_device, bool with_odd_parity, GSM_ConnectionType con) +{ + DCB dcb; + char text[100]; + + int rtn; + + if (PortDevice[0]!=0x00) return true; + + duringwrite=false; + strncpy(PortDevice, port_device, GSM_MAX_DEVICE_NAME_LENGTH); + +#ifdef DEBUG + fprintf(stdout,_("Opening \"%s\" device...\n"),PortDevice); +#endif + + strcpy(text,"\n\n\nMygnokii "); + sprintf(text+strlen(text), "%s",VERSION); + strcpy(text+strlen(text),"\n"); + AppendLogText(text,false); + + strcpy(text,"Port "); + strcpy(text+strlen(text),PortDevice); + strcpy(text+strlen(text),"\n"); + AppendLogText(text,false); + + strcpy(text,"Connection "); + switch (con) { + case GCT_FBUS :strcpy(text+strlen(text),"FBUS");break; + case GCT_Infrared:strcpy(text+strlen(text),"infrared");break; + case GCT_Irda :strcpy(text+strlen(text),"irda sockets");break; + case GCT_MBUS :strcpy(text+strlen(text),"MBUS");break; + case GCT_DLR3 :strcpy(text+strlen(text),"DLR3");break; + case GCT_Tekram :strcpy(text+strlen(text),"Tekram");break; + case GCT_AT :strcpy(text+strlen(text),"AT");break; + default :strcpy(text+strlen(text),"unknown");break; + } + strcpy(text+strlen(text),"\n"); + AppendLogText(text,false); + + CurrentDisableKeepAlive = true; + + /* Create and start main thread. */ + rtn = ! OpenConnection(PortDevice, Protocol->StateMachine, GSM->KeepAlive); + + if (rtn != 0) { + + fprintf(stdout,_("Error\n")); + return false; + } else { + CurrentDisableKeepAlive = false; + } + + if (with_odd_parity) { + dcb.DCBlength = sizeof(DCB); + GetCommState(hPhone, &dcb); + + dcb.Parity=ODDPARITY; + + SetCommState(hPhone, &dcb); + } + + return true; +} + +size_t device_write(const __ptr_t __buf, size_t __n) { + int i; + while (duringwrite) {} + duringwrite=true; + AppendLog(__buf,__n,true); + i=WriteCommBlock(__buf,__n); + duringwrite=false; + if (i) return __n; else return 0; +} + +#endif /*WIN32*/ diff --git a/common/devices/tekram.c b/common/devices/tekram.c new file mode 100644 index 0000000..5da6097 --- /dev/null +++ b/common/devices/tekram.c @@ -0,0 +1,113 @@ +/* + * $Id$ + * + * + * G N O K I I + * + * A Linux/Unix toolset and driver for Nokia mobile phones. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +#include + +#ifndef WIN32 + #include + #include + #include + #include "devices/unixserial.h" +#else + #include + #include "devices/winserial.h" +#endif + +#include "devices/tekram.h" + +int tekram_open(__const char *__file) { + + return (serial_open(__file, O_RDWR | O_NOCTTY | O_NONBLOCK)); +} + +void tekram_close(int __fd) { + + serial_setdtrrts(__fd, 0, 0); + + serial_close(__fd); +} + +void tekram_reset(int __fd) { + + serial_setdtrrts(__fd, 0, 0); usleep(50000); + serial_setdtrrts(__fd, 1, 0); usleep(1000); + serial_setdtrrts(__fd, 1, 1); usleep(50); + + serial_changespeed(__fd, 9600); +} + +void tekram_changespeed(int __fd, int __speed) { + + unsigned char speedbyte; + + + switch (__speed) { + + default: + case 9600: speedbyte = TEKRAM_PW | TEKRAM_B9600; break; + case 19200: speedbyte = TEKRAM_PW | TEKRAM_B19200; break; + case 38400: speedbyte = TEKRAM_PW | TEKRAM_B38400; break; + case 57600: speedbyte = TEKRAM_PW | TEKRAM_B57600; break; + case 115200: speedbyte = TEKRAM_PW | TEKRAM_B115200; break; + + } + + + tekram_reset(__fd); + + serial_setdtrrts(__fd, 1, 0); + + usleep(7); + + serial_write(__fd, &speedbyte, 1); + + usleep(100000); + + serial_setdtrrts(__fd, 1, 1); + + + serial_changespeed(__fd, __speed); +} + +size_t tekram_read(int __fd, __ptr_t __buf, size_t __nbytes) { + + return (serial_read(__fd, __buf, __nbytes)); +} + +size_t tekram_write(int __fd, __const __ptr_t __buf, size_t __n) { + + return (serial_write(__fd, __buf, __n)); +} + +int tekram_select(int fd, struct timeval *timeout) { + + fd_set readfds; + + FD_ZERO(&readfds); + FD_SET(fd, &readfds); + + return (select(fd + 1, &readfds, NULL, NULL, timeout)); + +} diff --git a/common/devices/unixirda.c b/common/devices/unixirda.c new file mode 100644 index 0000000..cfbf39a --- /dev/null +++ b/common/devices/unixirda.c @@ -0,0 +1,216 @@ +/* + * $Id$ + * + * G N O K I I + * + * A Linux/Unix toolset and driver for Nokia mobile phones. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "devices/unixirda.h" +#include "devices/linuxirda.h" + + +#ifndef AF_IRDA +#define AF_IRDA 23 +#endif + +#define INFO_LEN 22 +#define DISCOVERY_TIMEOUT 60.0 +#define DISCOVERY_SLEEP 0.4 + +static char *phone[] = { + "Nokia 5210", + "Nokia 6210", "Nokia 6250", "Nokia 6310", + "Nokia 7110", + "Nokia 8210", "Nokia 8310", "Nokia 8850" +}; + +double d_time(void) +{ + double time; + struct timeval tv; + + gettimeofday(&tv, NULL); + + time = tv.tv_sec + (((double)tv.tv_usec) / 1000000.0); + + return time; +} + +double d_sleep(double s) +{ + double time; + struct timeval tv1, tv2; + + gettimeofday(&tv1, NULL); + usleep(s * 1000000); + gettimeofday(&tv2, NULL); + + time = tv2.tv_sec - tv1.tv_sec + (((double)(tv2.tv_usec - tv1.tv_usec)) / 1000000.0); + + return time; +} + +static int irda_discover_device(int fd) +{ + + struct irda_device_list *list; + struct irda_device_info *dev; + unsigned char *buf; + int s, len, i, j; + int daddr = -1; + double t1, t2; + int phones = sizeof(phone) / sizeof(*phone); + + len = sizeof(*list) + sizeof(*dev) * 10; // 10 = max devices in discover + buf = malloc(len); + list = (struct irda_device_list *)buf; + dev = list->dev; + + t1 = d_time(); + + do { + s = len; + memset(buf, 0, s); + + if (getsockopt(fd, SOL_IRLMP, IRLMP_ENUMDEVICES, buf, &s) == 0) { + for (i = 0; (i < list->len) && (daddr == -1); i++) { + for (j = 0; (j < phones) && (daddr == -1); j++) { + if (strncmp(dev[i].info, phone[j], INFO_LEN) == 0) { + daddr = dev[i].daddr; +#ifdef DEBUG + fprintf(stdout,_("%s\t%x\n"), dev[i].info, dev[i].daddr); +#endif + } + } + if (daddr == -1) { +#ifdef DEBUG + fprintf(stdout,_("unknown: %s\t%x\n"), dev[i].info, dev[i].daddr); +#endif + } + } + } + + if (daddr == -1) { + d_sleep(DISCOVERY_SLEEP); + } + + t2 = d_time(); + + } while ((t2 - t1 < DISCOVERY_TIMEOUT) && (daddr == -1)); + + free(buf); + + return daddr; +} + +int irda_open(void) +{ + struct sockaddr_irda peer; + int fd = -1, daddr; + int pgrp; + + + fd = socket(AF_IRDA, SOCK_STREAM, 0); /* Create socket */ + if (fd == -1) { + perror("socket"); + exit(1); + } + + /* discover the devices */ + daddr = irda_discover_device(fd); + if (daddr == -1) { + printf("irda_discover: no nokia devices found"); + exit(1); + } + + /* Arrange for the current process to receive + SIGIO when the state of the socket changes. */ + pgrp = getpid(); + if (fcntl (fd, F_SETOWN, pgrp) < 0) + perror("F_SETOWN"); + + /* Set the socket state for Asynchronous */ + if (fcntl (fd, F_SETFL, FASYNC) < 0) { + perror("fcntl"); + exit(1); + } + + peer.sir_family = AF_IRDA; + peer.sir_lsap_sel = LSAP_ANY; + peer.sir_addr = daddr; + strcpy(peer.sir_name, "Nokia:PhoNet"); + + if (connect(fd, (struct sockaddr *)&peer, sizeof(peer))) { /* Connect to service "Nokia:PhoNet" */ + perror("connect"); + close(fd); + fd = -1; + } + + return fd; +} + +int irda_close(int fd) +{ + shutdown(fd, 0); + return close(fd); +} + +int irda_write(int __fd, __const __ptr_t __bytes, int __size) +{ + int actual,ret; + + actual = 0; + + do { + if ((ret = send(__fd, __bytes, __size - actual, 0)) < 0) + return(actual); + + actual += ret; + __bytes += ret; + + } while (actual < __size); + + return (actual); +} + +int irda_read(int __fd, __ptr_t __bytes, int __size) +{ + return (recv(__fd, __bytes, __size, 0)); +} + +int irda_select(int fd, struct timeval *timeout) +{ + fd_set readfds; + + FD_ZERO(&readfds); + FD_SET(fd, &readfds); + + return (select(fd + 1, &readfds, NULL, NULL, timeout)); +} diff --git a/common/devices/winserial.c b/common/devices/winserial.c new file mode 100644 index 0000000..488468b --- /dev/null +++ b/common/devices/winserial.c @@ -0,0 +1,493 @@ +/* + * serial interface threads for gnokii on win32 + * Based on the MS sample program 'tty.c' + * + * Roger Willcocks 16 Sept 99 + * + * compile with: + * cl -Zi -DWIN32 -DVERSION=\"win32\" -DMODEL=\"6110\" -DPORT=\"COM1\" \ + * gnokii.c winserial.c fbus-6110.c getopt.c gsm-api.c fbus-6110-auth.c \ + * fbus-6110-ringtones.c gsm-networks.c cfgreader.c + */ + +#ifdef WIN32 + +#define USECOMM // yes, we need the COMM API + +#include +#include +#include +#include +#include + +#include "devices/winserial.h" + +#define sleep(x) Sleep((x) * 1000) +#define usleep(x) Sleep(((x) < 1000) ? 1 : ((x) / 1000)) + +#define BAUDRATE CBR_115200 + +DWORD FAR PASCAL CommWatchProc(LPSTR lpData); +DWORD FAR PASCAL KeepAliveProc(LPSTR lpData); +BOOL SetupConnection(); +#define MAXBLOCK 1024 + +//--------------------------------------------------------------------------- +// BOOL OpenConnection(char *szPort) +// +// Description: +// Opens communication port. +// It also sets the CommState and notifies the window via +// the fConnected flag. +// +// Parameters: +// - szPort - name of com port eg "com1" +// +//--------------------------------------------------------------------------- + +OVERLAPPED osWrite, osRead; +HANDLE hPhone, hThread, hKAThread; +BOOL isConnected; +DWORD ThreadID, KAThreadID; + +BOOL OpenConnection(char *szPort, sigcallback fn, keepalive ka) +{ + BOOL fRetVal; + HANDLE hCommWatchThread; + DWORD dwThreadID; + COMMTIMEOUTS CommTimeOuts; + + if ((hPhone = + CreateFile(szPort, GENERIC_READ | GENERIC_WRITE, + 0, // exclusive access + NULL, // no security attrs + OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL | + FILE_FLAG_OVERLAPPED, // overlapped I/O + NULL)) == (HANDLE) -1) + return (FALSE); + else { + // get any early notifications + + SetCommMask(hPhone, EV_RXCHAR); + + // setup device buffers + + SetupComm(hPhone, 4096, 4096); + + // purge any information in the buffer + + PurgeComm(hPhone, PURGE_TXABORT | PURGE_RXABORT | + PURGE_TXCLEAR | PURGE_RXCLEAR); + + // set up for overlapped I/O + + CommTimeOuts.ReadIntervalTimeout = 0xFFFFFFFF; + CommTimeOuts.ReadTotalTimeoutMultiplier = 0; + CommTimeOuts.ReadTotalTimeoutConstant = 1000; +#if 0 + // CBR_9600 is approximately 1byte/ms. For our purposes, allow + // double the expected time per character for a fudge factor. + CommTimeOuts.WriteTotalTimeoutMultiplier = 2*CBR_9600/BAUDRATE; +#else + CommTimeOuts.WriteTotalTimeoutMultiplier = 10; +#endif + CommTimeOuts.WriteTotalTimeoutConstant = 0; + SetCommTimeouts(hPhone, &CommTimeOuts); + } + + fRetVal = SetupConnection(); + + if (fRetVal) { + isConnected = TRUE; + + // Create a secondary thread to issue keepAlive packets + +/* Marcin Wiacek. In this moment there is NO method of communication, + which require keepalive packets. I comment this thread, because it + makes only CPU time (100%) and makes it more hot */ +// hKAThread = CreateThread((LPSECURITY_ATTRIBUTES) NULL, +// 0, +// (LPTHREAD_START_ROUTINE) KeepAliveProc, +// (LPVOID) ka, +// 0, &KAThreadID ); +// if (!hKAThread) +// { +// isConnected = FALSE; +// CloseHandle(hPhone); +// return FALSE; +// } + + // Create a secondary thread + // to watch for an event. + + hCommWatchThread = CreateThread((LPSECURITY_ATTRIBUTES) NULL, + 0, + (LPTHREAD_START_ROUTINE) CommWatchProc, + (LPVOID) fn, + 0, &dwThreadID); + if (!hCommWatchThread) + { + isConnected = FALSE; + CloseHandle(hPhone); + fRetVal = FALSE; + } + else { + ThreadID = dwThreadID; + hThread = hCommWatchThread; + + // assert DTR + + EscapeCommFunction(hPhone, SETDTR); + } + } + else { + isConnected = FALSE; + CloseHandle(hPhone); + } + + return (fRetVal); + +} // end of OpenConnection() + +//--------------------------------------------------------------------------- +// BOOL SetupConnection() +// +// Description: +// This routines sets up the DCB based on settings in the +// TTY info structure and performs a SetCommState(). +// +// Parameters: +// +//--------------------------------------------------------------------------- + +BOOL SetupConnection() +{ + BOOL fRetVal; + DCB dcb; + + dcb.DCBlength = sizeof(DCB); + + GetCommState(hPhone, &dcb); + + dcb.BaudRate = BAUDRATE; + dcb.ByteSize = 8; + dcb.Parity = NOPARITY; + dcb.StopBits = ONESTOPBIT; + + // set DTS + + dcb.fOutxDsrFlow = 0; + dcb.fDtrControl = DTR_CONTROL_ENABLE; + + // clear RTS + + dcb.fOutxCtsFlow = 0; + dcb.fRtsControl = RTS_CONTROL_DISABLE; + + // no software flow control + + dcb.fInX = dcb.fOutX = 0; + + fRetVal = SetCommState(hPhone, &dcb); + + if (fRetVal == 0) + fRetVal = GetLastError(); + + return (fRetVal); + +} // end of SetupConnection() + +//--------------------------------------------------------------------------- +// BOOL CloseConnection() +// +// Description: +// Closes the connection to the port. Resets the connect flag +// +// Parameters: +// +//--------------------------------------------------------------------------- + +BOOL CloseConnection() +{ + isConnected = FALSE; + + // block until keepalive thread terminates (should wake it really) + +/* Marcin Wiacek. In this moment there is NO method of communication, + which require keepalive packets. I comment this thread, because it + makes only CPU time (100%) and makes it more hot */ +// WaitForSingleObject( hKAThread, INFINITE ); +#ifdef _NEVER_SAY_NEVER_AGAIN_ +// while (KAThreadID != 0) +// Sleep(250); +#endif + + // disable event notification and wait for thread + // to halt + + SetCommMask(hPhone, 0); + + // block until thread has been halted + + WaitForSingleObject( hThread, INFINITE ); +#ifdef _NEVER_SAY_NEVER_AGAIN_ + while(ThreadID != 0) + Sleep(250); +#endif + + // drop DTR + + EscapeCommFunction(hPhone, CLRDTR); + + // purge any outstanding reads/writes and close device handle + + PurgeComm(hPhone, PURGE_TXABORT | PURGE_RXABORT | + PURGE_TXCLEAR | PURGE_RXCLEAR); + + CloseHandle(hPhone); + return (TRUE); + +} // end of CloseConnection() + +//--------------------------------------------------------------------------- +// int ReadCommBlock(LPSTR lpszBlock, int nMaxLength) +// +// Description: +// Reads a block from the COM port and stuffs it into +// the provided buffer. +// +// Parameters: +// +// LPSTR lpszBlock +// block used for storage +// +// int nMaxLength +// max length of block to read +// +//--------------------------------------------------------------------------- + +int ReadCommBlock(LPSTR lpszBlock, int nMaxLength) +{ + BOOL fReadStat; + COMSTAT ComStat; + DWORD dwErrorFlags; + DWORD dwLength; + DWORD dwError; + + // only try to read number of bytes in queue + ClearCommError(hPhone, &dwErrorFlags, &ComStat); + dwLength = min((DWORD) nMaxLength, ComStat.cbInQue); + + if (dwLength > 0) { + fReadStat = ReadFile(hPhone, lpszBlock, + dwLength, &dwLength, &osRead); + if (!fReadStat) { + if (GetLastError() == ERROR_IO_PENDING) { + fprintf(stderr, "\n\rIO Pending"); + // We have to wait for read to complete. + // This function will timeout according to the + // CommTimeOuts.ReadTotalTimeoutConstant variable + // Every time it times out, check for port errors + while(!GetOverlappedResult(hPhone, + &osRead, &dwLength, TRUE)) { + dwError = GetLastError(); + if(dwError == ERROR_IO_INCOMPLETE) + // normal result if not finished + continue; + else { + // an error occurred, try to recover + fprintf(stderr, "", dwError); + ClearCommError(hPhone, &dwErrorFlags, &ComStat); + if (dwErrorFlags > 0) + fprintf(stderr, "", dwErrorFlags); + break; + } + + } + + } + else { + // some other error occurred + dwLength = 0; + ClearCommError(hPhone, &dwErrorFlags, &ComStat); + if (dwErrorFlags > 0) + fprintf(stderr, "", dwErrorFlags); + } + } + } + + return (dwLength); + +} // end of ReadCommBlock() + +//--------------------------------------------------------------------------- +// BOOL WriteCommBlock(BYTE *pByte, DWORD dwBytesToWrite) +// +// Description: +// Writes a block of data to the COM port specified in the associated +// TTY info structure. +// +// Parameters: +// +// BYTE *pByte +// pointer to data to write to port +// +//--------------------------------------------------------------------------- + +BOOL WriteCommBlock(LPSTR lpByte , DWORD dwBytesToWrite) +{ + + BOOL fWriteStat; + DWORD dwBytesWritten; + DWORD dwErrorFlags; + DWORD dwError; + DWORD dwBytesSent=0; + COMSTAT ComStat; + + fWriteStat = WriteFile(hPhone, lpByte, dwBytesToWrite, + &dwBytesWritten, &osWrite); + + // Note that normally the code will not execute the following + // because the driver caches write operations. Small I/O requests + // (up to several thousand bytes) will normally be accepted + // immediately and WriteFile will return true even though an + // overlapped operation was specified + + if (!fWriteStat) { + if(GetLastError() == ERROR_IO_PENDING) { + // We should wait for the completion of the write operation + // so we know if it worked or not + + // This is only one way to do this. It might be beneficial to + // place the write operation in a separate thread + // so that blocking on completion will not negatively + // affect the responsiveness of the UI + + // If the write takes too long to complete, this + // function will timeout according to the + // CommTimeOuts.WriteTotalTimeoutMultiplier variable. + // This code logs the timeout but does not retry + // the write. + + while(!GetOverlappedResult(hPhone, + &osWrite, &dwBytesWritten, TRUE)) { + dwError = GetLastError(); + if(dwError == ERROR_IO_INCOMPLETE) + { + // normal result if not finished + dwBytesSent += dwBytesWritten; + continue; + } + else { + // an error occurred, try to recover + fprintf(stderr, "", dwError); + ClearCommError(hPhone, &dwErrorFlags, &ComStat); + if (dwErrorFlags > 0) + fprintf(stderr, "", dwErrorFlags); + break; + } + } + + dwBytesSent += dwBytesWritten; +#if 0 + if(dwBytesSent != dwBytesToWrite) + fprintf(stderr, "\nProbable Write Timeout: Total of %ld bytes sent (%ld)", dwBytesSent, dwBytesToWrite); + else + fprintf(stderr, "\n%ld bytes written", dwBytesSent); +#endif + } + else { + // some other error occurred + ClearCommError(hPhone, &dwErrorFlags, &ComStat); + if (dwErrorFlags > 0) + fprintf(stderr, "", dwErrorFlags); + return (FALSE); + } + } + return (TRUE); + +} // end of WriteCommBlock() + + +//************************************************************************ +// DWORD FAR PASCAL CommWatchProc(LPSTR lpData) +// +// Description: +// A secondary thread that will watch for COMM events. +// +// Parameters: +// LPSTR lpData +// 32-bit pointer argument +// +//************************************************************************ + +DWORD FAR PASCAL CommWatchProc(LPSTR lpData) +{ + DWORD dwEvtMask; + OVERLAPPED os; + int nLength; + BYTE abIn[ MAXBLOCK + 1]; + + sigcallback fn = (sigcallback)lpData; + + memset(&os, 0, sizeof(OVERLAPPED)); + + // create I/O event used for overlapped read + + os.hEvent = CreateEvent(NULL, // no security + TRUE, // explicit reset req + FALSE, // initial event reset + NULL); // no name + if (os.hEvent == NULL) + return (FALSE); + + if (!SetCommMask(hPhone, EV_RXCHAR)) + return (FALSE); + + while (isConnected) { + dwEvtMask = 0; + + WaitCommEvent(hPhone, &dwEvtMask, NULL); + + if ((dwEvtMask & EV_RXCHAR) == EV_RXCHAR) { + do { + if ((nLength = ReadCommBlock((LPSTR) abIn, MAXBLOCK))) { + int i; + + for (i = 0; i < nLength; i++) + (*fn)(abIn[i]); + } + } + while (nLength > 0); + } + } + + // get rid of event handle + + CloseHandle(os.hEvent); + + // clear information in structure (kind of a "we're done flag") + + ThreadID = 0; + hThread = NULL; + + return(TRUE); + +} // end of CommWatchProc() + + +DWORD FAR PASCAL KeepAliveProc(LPSTR lpData) +{ +/* Marcin Wiacek. In this moment there is NO method of communication, + which require keepalive packets. I comment this thread, because it + makes only CPU time (100%) and makes it more hot */ +// keepalive ka = (keepalive)lpData; +// while (isConnected) +// (*ka)(); +// KAThreadID = 0; + return 0; +} + +#endif +/* end */ diff --git a/common/files/gsm-filetypes.c b/common/files/gsm-filetypes.c new file mode 100644 index 0000000..e431fa4 --- /dev/null +++ b/common/files/gsm-filetypes.c @@ -0,0 +1,2245 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999, 2000 Hugh Blemings & Pavel Janík ml. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Functions to read and write common file types. + +*/ + +#include +#include +#include +#include +#include +#ifndef VC6 +#include +#endif + +#include "gsm-common.h" +#include "gsm-ringtones.h" +#include "gsm-bitmaps.h" +#include "files/gsm-filetypes.h" +#include "files/midifile.h" +#include "gsm-coding.h" +#include "misc.h" +#include "newmodules/n7110.h" +#include "newmodules/n6110.h" + +#ifdef XPM + #include +#endif + +/** +* GetvCalTime +* +* Fills vCalendar time string into GSM_DateTime structure +* +* in: +* dt: datetime structure +* time: string in format yyyymmddThhmmss +* out: +* <>0 if error +*/ +int GetvCalTime(GSM_DateTime *dt, char *time) +{ + char year[5]="", month[3]="", day[3]="", hour[3]="", minute[3]="", second[3]=""; + dt->Year=dt->Month=dt->Day=dt->Hour=dt->Minute=dt->Second=dt->Timezone=0; + + strncpy(year, time, 4); + strncpy(month, time+4, 2); + strncpy(day, time+6, 2); + strncpy(hour, time+9, 2); + strncpy(minute, time+11, 2); + strncpy(second, time+13, 2); + +/* FIXME: Should check ranges... */ + dt->Year=atoi(year); + dt->Month=atoi(month); + dt->Day=atoi(day); + dt->Hour=atoi(hour); + dt->Minute=atoi(minute); + dt->Second=atoi(second); +/* FIXME */ + dt->Timezone=0; + + return 0; +} + +/** +* FillCalendarNote +* +* Fills calendar data from strings into calendar note +* +* in: +* note: calendar note structure +* type: type of calendar note +* text: text or phonenumber +* time: string in format yyyymmddThhmmss +* alarm: dito +* out: +* <>0 if error +*/ +int FillCalendarNote(GSM_CalendarNote *note, char *type, + char *text, char *time, char *alarm) +{ + GetvCalTime(¬e->Time, time); + GetvCalTime(¬e->Alarm, alarm); + + note->Location=0; + + strncpy(note->Text, text, MAX_CALENDAR_TEXT_LENGTH); + strcpy(note->Phone, ""); /* correct in most cases */ + + /* FIXME: Handle additional strings, maybe from configuration file */ + + if(!strcmp(type, "PHONE CALL")) + { + strncpy(note->Phone, text, MAX_CALENDAR_PHONE_LENGTH); + note->Type=GCN_CALL; + } + else if(!strcmp(type, "MEETING")) + note->Type=GCN_MEETING; + else if(!strcmp(type, "SPECIAL OCCASION")) + note->Type=GCN_BIRTHDAY; + else + note->Type=GCN_REMINDER; + + return 0; +} + +/** +* GSM_ReadVCalendarFile +* +* Reads vCalendar file +* +* in: +* FileName: name of vCalendar file +* cnote: pointer to calendar note +* number: number in file of calendar note to read +* out: +* <>0 if error +*/ +GSM_Error GSM_ReadVCalendarFile(char *FileName, GSM_CalendarNote *cnote, int *number) +{ + FILE *file; + char type[21]="", text[40]="", time[16]="", alarm[16]=""; + char phone[40]=""; + long recurr=0L; + char altype=0x00; + + int veventcounter=0; + int isOK=0; + + bool NoteOK=false; + + char *Line, OLine[1024], BackLine[1024]; + + Line = OLine; + + file=fopen(FileName, "r"); + if (!file) { +#ifdef DEBUG + fprintf(stderr, _("File cannot be opened!\n")); +#endif + return GE_CANTOPENFILE; + } + + /* Go through data from file. */ + while (GetLine(file, Line, sizeof(OLine))!=-1) { + + strcpy(BackLine, Line); + + switch (isOK) { + case 0: + if (!strcmp(Line,"BEGIN:VCALENDAR")) + isOK++; + break; + case 1: + if (!strcmp(Line,"BEGIN:VEVENT")) { + isOK++; + veventcounter++; + } + if (!strcmp(Line,"END:VCALENDAR")) + isOK--; + break; + case 2: + if (veventcounter==*number) { + if (!strncmp(Line,"CATEGORIES:",11)) { + strncpy(type,Line+11,strlen(Line)-11); + type[strlen(Line)-11]=0; + } + if (!strncmp(Line,"DESCRIPTION:",12)) { + strncpy(phone,Line+12,strlen(Line)-12); + phone[strlen(Line)-12]=0; + } + if (!strncmp(Line,"SUMMARY:",8)) { + strncpy(text,Line+8,strlen(Line)-8); + text[strlen(Line)-8]=0; + } + if (!strncmp(Line,"SUMMARY;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:",48)) { + DecodeUTF8(text,Line+48,strlen(Line)-48); + text[strlen(Line)-48]=0; + } + if (!strncmp(Line,"DTSTART:",8)) { + strncpy(time,Line+8,strlen(Line)-8); + time[strlen(Line)-8]=0; + } + if (!strncmp(Line,"DALARM:",7)) { + strncpy(alarm,Line+7,strlen(Line)-7); + alarm[strlen(Line)-7]=0; + } + + /* Obsolete */ + if (!strncmp(Line,"RECURR:",7)) { + recurr=mem_to_int(Line+7,strlen(Line)-7); + } + + if (!strncmp(Line,"RRULE:D1 :",9)) { + recurr=1; + } + if (!strncmp(Line,"RRULE:W1 :",9)) { + recurr=7; + } + if (!strncmp(Line,"RRULE:W2 :",9)) { + recurr=14; + } + if (!strncmp(Line,"RRULE:YD1 :",10)) { + recurr=365; + } + + if (!strncmp(Line,"ALTYPE:",7)) { + altype=(!strncmp("TONE",Line+7,4)) ? 0x00 : 0x01; + } + } + if (!strcmp(Line,"END:VEVENT")) { + if (veventcounter==*number) NoteOK=true; + isOK--; + } + break; + } + + if (NoteOK) break; + } + + if (!NoteOK) { + *number=veventcounter; +#ifdef DEBUG + fprintf(stdout,_("Note not found in VCalendarfile\n")); +#endif + return GE_TOOSHORT; + } + + FillCalendarNote(cnote, type, text, time, alarm); + + cnote->Recurrance = recurr*24; /* it was in days. I convert in hours */ + cnote->AlarmType = altype; + + if( strcmp( phone, "" ) ) { /* Invert data if CALL ... */ + strcpy( cnote->Text, phone ); + strcpy( cnote->Phone, text ); // alread FillCalendar does it .. + } + + fclose(file); + + return 0; +} + +GSM_Error GSM_ReadBinRingtoneFile(char *FileName, GSM_BinRingtone *ringtone) +{ + FILE *file; + int i; + + file = fopen(FileName, "rb"); + + if (!file) + return(GE_CANTOPENFILE); + + ringtone->length=fread(ringtone->frame, 1, 500, file); + + fclose(file); + + if (ringtone->frame[0]!=0x00 || ringtone->frame[1]!=0x00 || + ringtone->frame[2]!=0x0C || ringtone->frame[3]!=0x01) + return GE_NOTSUPPORTED; + + i=5; + while (ringtone->frame[i]!=0x00) { + ringtone->name[i-5]=ringtone->frame[i]; + i++; + } + ringtone->name[i-5]=0x00; + + return GE_NONE; +} + +/* Function to convert scale field in to correct number. */ +int GetRTTLDuration (char *num) +{ + +int duration=0; + + switch (atoi(num)) { + + case 1: duration=128; break; + case 2: duration= 64; break; + case 4: duration= 32; break; + case 8: duration= 16; break; + case 16: duration= 8; break; + case 32: duration= 4; break; + } + + return (duration); + +} + +int GetRTTLScale (char *num) +{ + + /* This may well need improving. */ + + int scale=0; + + if ((atoi(num))<4) scale=(atoi(num)); + if ((atoi(num))>4) scale=(atoi(num))-4; + + return (scale); +} + +GSM_Error GSM_ReadRingtoneFile(char *FileName, GSM_Ringtone *ringtone) +{ + FILE *file; + unsigned char buffer[300]; + GSM_Error error; + GSM_Filetypes filetype=RTTL; + + file = fopen(FileName, "rb"); + + if (!file) + return(GE_CANTOPENFILE); + + fread(buffer, 1, 4, file); /* Read the header of the file. */ + + /* Attempt to identify filetype */ + + if (memcmp(buffer, "MThd",3)==0) /* MIDI files have 'MThd' at the start */ + filetype=MIDI; + + if (buffer[0]==0xc7 && buffer[1]==0x45 && buffer[2]==0xc1 && buffer[3]==0x53) + filetype=COMMUNICATOR; + + if (strstr(FileName,".ott")) filetype=OTT; /* OTT files saved by NCDS3 */ + + error=GE_NONE; + + rewind(file); + + switch (filetype) { + case RTTL: + error=loadrttl(file,ringtone); + fclose(file); + break; + case OTT: + error=loadott(file,ringtone); + fclose(file); + break; + case COMMUNICATOR: + error=loadcommunicator(file,ringtone); + fclose(file); + break; + case MIDI: + fclose(file); + error=loadmid(FileName,ringtone); + break; + default: + error=GE_INVALIDFILEFORMAT; + } + + return(error); + +} + +GSM_Error loadott(FILE *file, GSM_Ringtone *ringtone) +{ + char Buffer[2000]; + int i; + + i=fread(Buffer, 1, 2000, file); + + if (!feof(file)) return GE_TOOLONG; + + return GSM_UnPackRingtone(ringtone, Buffer, i); +} + +GSM_Error loadcommunicator(FILE *file, GSM_Ringtone *ringtone) +{ + char Buffer[4000]; + int i,j; + + i=fread(Buffer, 1, 4000, file); + + if (!feof(file)) return GE_TOOLONG; + + i=0;j=0; + while (true) { + if (Buffer[j]==0x00 && Buffer[j+1]==0x02 && + Buffer[j+2]==0x4a && Buffer[j+3]==0x3a) break; + if (j==i-4) return GE_INTERNALERROR; + j++; + } + j++; + + return GSM_UnPackRingtone(ringtone, Buffer+j, i-j); +} + +/* TODO: spaces should not be interpreted */ +/* Note: ringtone have to be in one line (without 0x13 and 0x10 chars) */ +GSM_Error loadrttl(FILE *file, GSM_Ringtone *ringtone) +{ + int NrNote=0; + + u8 DefNoteScale=2, DefNoteDuration=4; + int DefNoteTempo=63; + u8 DefNoteStyle=ContinuousStyle; + + unsigned char buffer[2000]; + unsigned char *def, *notes, *ptr; + + ringtone->Loop=15; //default value + + fread(buffer, 2000, 1, file); + + /* This is for buggy RTTTL ringtones without name. */ + if (buffer[0] != RTTTL_SEP[0]) { + strtok(buffer, RTTTL_SEP); + sprintf(ringtone->name, "%s", buffer); + def=strtok(NULL, RTTTL_SEP); + notes=strtok(NULL, RTTTL_SEP); + } + else { + sprintf(ringtone->name, "GNOKII"); + def=strtok(buffer, RTTTL_SEP); + notes=strtok(NULL, RTTTL_SEP); + } + + ptr=strtok(def, ", "); + + /* Parsing the section. */ + while (ptr) { + + switch(*ptr) { + case 'd': + case 'D': + DefNoteDuration=GetRTTLDuration(ptr+2); + break; + case 'o': + case 'O': + DefNoteScale=GetRTTLScale(ptr+2); + break; + case 'b': + case 'B': + DefNoteTempo=atoi(ptr+2); + break; + case 'l': + case 'L': + ringtone->Loop=atoi(ptr+2); + break; + case 's': + case 'S': + switch (*(ptr+1)) { + case 'C': + case 'c': + DefNoteStyle=ContinuousStyle; + break; + case 'N': + case 'n': + DefNoteStyle=NaturalStyle; + break; + case 'S': + case 's': + DefNoteStyle=StaccatoStyle; + break; + } + switch (*(ptr+2)) { + case 'c': + case 'C': + DefNoteStyle=ContinuousStyle; + break; + case 'n': + case 'N': + DefNoteStyle=NaturalStyle; + break; + case 's': + case 'S': + DefNoteStyle=StaccatoStyle; + break; + } + break; + } + + ptr=strtok(NULL,", "); + } + +#ifdef DEBUG + printf("DefNoteDuration=%d\n", DefNoteDuration); + printf("DefNoteScale=%d\n", DefNoteScale); +#endif + + ptr=strtok(notes, ", "); + + /* Parsing the + section. */ + while (ptr && NrNote] */ + ringtone->notes[NrNote].duration=GetRTTLDuration(ptr); + if (ringtone->notes[NrNote].duration==0) + ringtone->notes[NrNote].duration=DefNoteDuration; + + /* Skip all numbers in duration specification. */ + while(isdigit(*ptr)) + ptr++; + + /* */ + /* B or b is not in specs, but I decided to put it, because + it's in some RTTL files. It's the same to H note */ + if ((*ptr=='B') || (*ptr=='b')) ringtone->notes[NrNote].note=12; + else if ((*ptr=='H') || (*ptr=='h')) ringtone->notes[NrNote].note=12; + else if ((*ptr>='a') && (*ptr<='g')) ringtone->notes[NrNote].note=((*ptr-'a')*2)+10; + else if ((*ptr>='A') && (*ptr<='G')) ringtone->notes[NrNote].note=((*ptr-'A')*2)+10; + else ringtone->notes[NrNote].note=255; + + if ((ringtone->notes[NrNote].note>13)&&(ringtone->notes[NrNote].note!=255)) + ringtone->notes[NrNote].note-=14; + + ptr++; + + if ((*ptr)=='#') { + ringtone->notes[NrNote].note++; + if ((ringtone->notes[NrNote].note==5) || (ringtone->notes[NrNote].note==13)) + ringtone->notes[NrNote].note++; + ptr++; + } + + /* Check for dodgy rttl */ + /* [] */ + if (*ptr=='.') { + ringtone->notes[NrNote].duration*=1.5; + ptr++; + } + + /* [] */ + if (ringtone->notes[NrNote].note!=255) { + if (isdigit(*ptr)) { + ringtone->notes[NrNote].note+=GetRTTLScale(ptr)*14; + ptr++; + } else + ringtone->notes[NrNote].note+=DefNoteScale*14; + } + + /* [] */ + if (*ptr=='.') { + ringtone->notes[NrNote].duration*=1.5; + ptr++; + } + + /* Style */ + ringtone->notes[NrNote].style=DefNoteStyle; + + /* Tempo */ + ringtone->notes[NrNote].tempo=DefNoteTempo; + + NrNote++; + + break; + } + ptr=strtok(NULL, ", "); + } + + ringtone->NrNotes=NrNote; + + return GE_NONE; +} + +GSM_Error GSM_SaveRingtoneFile(char *FileName, GSM_Ringtone *ringtone) +{ + + FILE *file; + bool done=false; + + file = fopen(FileName, "wb"); + + if (!file) + return(GE_CANTOPENFILE); + + if (strstr(FileName,".ott")) + { + saveott(file, ringtone); + done=true; + } + if (strstr(FileName,".mid")) + { + savemid(file, ringtone); + done=true; + } + + if (!done) saverttl(file, ringtone); + + fclose(file); + + return GE_NONE; +} + +void saveott(FILE *file, GSM_Ringtone *ringtone) +{ + char Buffer[2000]; + + int i=2000; + + GSM_PackRingtone(ringtone, Buffer, &i); + + fwrite(Buffer, 1, i, file); +} + +void saverttl(FILE *file, GSM_Ringtone *ringtone) +{ + u8 DefNoteScale=2, DefNoteDuration=4; + int DefNoteTempo=63; + u8 DefNoteStyle=ContinuousStyle; + + int CurrentNote; + int buffer[6]; + int i,j,k=0; + + /* Saves ringtone name */ + fprintf(file,_("%s:"),ringtone->name); + + /* Find the most frequently used duration and use this for the default */ + + for (i=0;i<6;i++) buffer[i]=0; + for (i=0;iNrNotes;i++) { + switch (ringtone->notes[i].duration) { + case 192:buffer[0]++; break; + case 128:buffer[0]++; break; + case 96:buffer[1]++; break; + case 64:buffer[1]++; break; + case 48:buffer[2]++; break; + case 32:buffer[2]++; break; + case 24:buffer[3]++; break; + case 16:buffer[3]++; break; + case 12:buffer[4]++; break; + case 8:buffer[4]++; break; + case 6:buffer[5]++; break; + case 4:buffer[5]++; break; + } + } + + /* Now find the most frequently used */ + j=0; + for (i=0;i<6;i++) { + if (buffer[i]>j) { + k=i; + j=buffer[i]; + } + } + + /* Finally convert and save the default duration */ + + switch (k) { + case 0: DefNoteDuration=128; fprintf(file, _("d=1,")); break; + case 1: DefNoteDuration= 64; fprintf(file, _("d=2,")); break; + case 2: DefNoteDuration= 32; fprintf(file, _("d=4,")); break; + case 3: DefNoteDuration= 16; fprintf(file, _("d=8,")); break; + case 4: DefNoteDuration= 8; fprintf(file,_("d=16,")); break; + case 5: DefNoteDuration= 4; fprintf(file,_("d=32,")); break; + default: DefNoteDuration= 16; fprintf(file, _("d=8,")); break; + } + + + /* Find the most frequently used scale and use this for the default */ + + for (i=0;i<6;i++) buffer[i]=0; + for (i=0;iNrNotes;i++) { + if (ringtone->notes[i].note!=255) { + buffer[ringtone->notes[i].note/14]++; + } + } + j=0; + for (i=0;i<6;i++) { + if (buffer[i]>j) { + DefNoteScale=i; + j=buffer[i]; + } + } + + if (ringtone->NrNotes!=0) { + DefNoteTempo=ringtone->notes[0].tempo; + DefNoteStyle=ringtone->notes[0].style; + } + + /* Save the default scale */ + fprintf(file,_("o=%i,"),DefNoteScale+4); + + switch (DefNoteStyle) { + case StaccatoStyle: fprintf(file,_("s=S,")); break; + case NaturalStyle : fprintf(file,_("s=N,")); break; + } + + /* Save the default tempo */ + fprintf(file,_("b=%i,"),DefNoteTempo); + + /* Save the default loop */ + fprintf(file,_("l=%i:"),ringtone->Loop); + +#ifdef DEBUG + printf("DefNoteDuration=%d\n", DefNoteDuration); + printf("DefNoteScale=%d\n", DefNoteScale); + printf("Number of notes=%d\n",ringtone->NrNotes); +#endif + + /* Now loop round for each note */ + + for (i=0;iNrNotes;i++) { + CurrentNote=ringtone->notes[i].note; + + if (ringtone->notes[i].style!=DefNoteStyle) { + DefNoteStyle=ringtone->notes[i].style; + switch (DefNoteStyle) { + case StaccatoStyle : fprintf(file,_("s=S")); break; + case NaturalStyle : fprintf(file,_("s=N")); break; + case ContinuousStyle: fprintf(file,_("s=C")); break; + } + /* And a separator before next note */ + if (i!=ringtone->NrNotes-1) + fprintf(file,_(",")); + } + + if (ringtone->notes[i].tempo!=DefNoteTempo) { + DefNoteTempo=ringtone->notes[i].tempo; + fprintf(file,_("b=%i"),DefNoteTempo); + if (i!=ringtone->NrNotes-1) + fprintf(file,_(",")); + } + + /* This note has a duration different than the default. We must save it */ + if (ringtone->notes[i].duration!=DefNoteDuration) { + switch (ringtone->notes[i].duration) { + case 192: fprintf(file, _("1")); break; //192=128*1.5 + case 128: fprintf(file, _("1")); break; + case 96: fprintf(file, _("2")); break; //96=64*1.5 + case 64: fprintf(file, _("2")); break; + case 48: fprintf(file, _("4")); break; //48=32*1.5 + case 32: fprintf(file, _("4")); break; + case 24: fprintf(file, _("8")); break; //24=16*1.5 + case 16: fprintf(file, _("8")); break; + case 12: fprintf(file,_("16")); break; //12=8*1.5 + case 8: fprintf(file,_("16")); break; + case 6: fprintf(file,_("32")); break; //6=4*1.5 + case 4: fprintf(file,_("32")); break; + default: + break; + } + } + + /* Now save the actual note */ + switch (GSM_GetNote(CurrentNote)) { + case Note_C :fprintf(file,_("c"));break; + case Note_Cis:fprintf(file,_("c#"));break; + case Note_D :fprintf(file,_("d"));break; + case Note_Dis:fprintf(file,_("d#"));break; + case Note_E :fprintf(file,_("e"));break; + case Note_F :fprintf(file,_("f"));break; + case Note_Fis:fprintf(file,_("f#"));break; + case Note_G :fprintf(file,_("g"));break; + case Note_Gis:fprintf(file,_("g#"));break; + case Note_A :fprintf(file,_("a"));break; + case Note_Ais:fprintf(file,_("a#"));break; + case Note_H :fprintf(file,_("h"));break; + default :fprintf(file,_("p"));break; //Pause ? + } + + /* Saving info about special duration */ + if (ringtone->notes[i].duration==128*1.5 || + ringtone->notes[i].duration==64*1.5 || + ringtone->notes[i].duration==32*1.5 || + ringtone->notes[i].duration==16*1.5 || + ringtone->notes[i].duration==8*1.5 || + ringtone->notes[i].duration==4*1.5) + fprintf(file,_(".")); + + /* This note has a scale different than the default, so save it */ + if ( (CurrentNote!=255) && (CurrentNote/14!=DefNoteScale)) + fprintf(file,_("%i"),(CurrentNote/14)+4); + + /* And a separator before next note */ + if (i!=ringtone->NrNotes-1) + fprintf(file,_(",")); + + } +} + +void WriteVarLen(char* midifile, int* current, long value) +{ + long buffer; + + buffer = value & 0x7f; + + while (value >>= 7) { + buffer <<= 8; + buffer |= 0x80; + buffer += (value & 0x7f); + } + + while (1) { + midifile[(*current)++] = buffer; + if (buffer & 0x80) + buffer >>= 8; + else + break; + } +} + +#define singlepauses + +/* FIXME: need adding tempo before each note and scale too ? */ +void savemid(FILE* file, GSM_Ringtone *ringtone) +{ + char midifile[3000] = { 0x4D, 0x54, 0x68, 0x64, // MThd + 0x00, 0x00, 0x00, 0x06, // chunk length + 0x00, 0x00, // format 0 + 0x00, 0x01, // one track + 0x00, 0x20, // 32 per quarter note + 0x4D, 0x54, 0x72, 0x6B, // MTrk + 0x00, 0x00, 0x00, 0x00, // chunk length + 0x00, 0xFF, 0x51, 0x03, // tempo meta event + 0x00, 0x00, 0x00 // 3 bytes for us for a quarter note + }; + +//{ "c", "c#", "d", "d#", "e", "f", "f#", "g", "g#", "a", "a#", "h" }; +char midinotes[14] = + { 0, 1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10 , 11, 11 }; + + int length = 20; + int start = 22; + int current = 26, i, note, pause = 0; + bool notesexisting = false; + + /* FIXME: we need add tempo before each note or so... */ + long duration=60000000/63; // us for a quarter note + if (ringtone->NrNotes!=0) + duration=60000000/ringtone->notes[0].tempo; + midifile[current++] = duration >> 16; + midifile[current++] = duration >> 8; + midifile[current++] = duration; + + for (i = 0; i < ringtone->NrNotes; i++) { + + note = ringtone->notes[i].note; + if (note == 255) { // readmid does not read pauses at the beginning + + if (notesexisting) { + pause += ringtone->notes[i].duration; +#ifdef singlepauses + WriteVarLen(midifile,¤t,pause); + pause=0; + midifile[current++]=0x00; // pause + midifile[current++]=0x00; +#endif + } + + } else { + + notesexisting = true; + note = 48+12*((note/14)%4) + midinotes[note%14]; + + WriteVarLen(midifile,¤t,pause); + pause=0; + midifile[current++]=0x90; // note on + midifile[current++]=note; + midifile[current++]=0x64; // forte + + WriteVarLen(midifile,¤t,ringtone->notes[i].duration); + midifile[current++]=0x80; // note off + midifile[current++]=note; + midifile[current++]=0x64; + + } + } + + if (pause) { + WriteVarLen(midifile,¤t,pause); + midifile[current++]=0x00; // pause + midifile[current++]=0x00; // + } + midifile[current++] = 0x00; + midifile[current++] = 0xFF; // track end + midifile[current++] = 0x2F; + midifile[current++] = 0x00; + midifile[length++] = (current-start) >> 8; + midifile[length++] = current-start; + + fwrite(midifile,1,current,file); +} + +GSM_Error GSM_ReadBitmapFile(char *FileName, GSM_Bitmap *bitmap) +{ + + FILE *file; + unsigned char buffer[300]; + GSM_Error error; + GSM_Filetypes filetype=None; + + file = fopen(FileName, "rb"); + + if (!file) + return(GE_CANTOPENFILE); + + fread(buffer, 1, 9, file); /* Read the header of the file. */ + + /* Attempt to identify filetype */ + + if (memcmp(buffer, "NOL",3)==0) { /* NOL files have 'NOL' at the start */ + filetype=NOL; + } else if (memcmp(buffer, "NGG",3)==0) { /* NGG files have 'NGG' at the start */ + filetype=NGG; + } else if (memcmp(buffer, "FORM",4)==0) { /* NSL files have 'FORM' at the start */ + filetype=NSL; + } else if (memcmp(buffer, "NLM",3)==0) { /* NLM files have 'NLM' at the start */ + filetype=NLM; + } else if (memcmp(buffer, "BM",2)==0) { /* BMP, I61 and GGP files have 'BM' at the start */ + filetype=BMP; + } else if (memcmp(buffer, "/* XPM */",9)==0) { /* XPM files have 'XPM' at the start */ + filetype=XPMF; + } else filetype=None; + + if (strstr(FileName,".otb")) filetype=OTA; /* OTA files saved by NCDS3 */ + + error=GE_NONE; + + rewind(file); + + switch (filetype) { + case NOL: error=loadnol(file,bitmap); fclose(file); break; + case NGG: error=loadngg(file,bitmap); fclose(file); break; + case NSL: error=loadnsl(file,bitmap); fclose(file); break; + case NLM: error=loadnlm(file,bitmap); fclose(file); break; + case OTA: error=loadota(file,bitmap); fclose(file); break; + case BMP: error=loadbmp(file,bitmap); fclose(file); break; +#ifdef XPM + case XPMF:fclose(file);error=loadxpm(FileName,bitmap);break; +#endif + default : error=GE_INVALIDFILEFORMAT; + } + + return(error); +} + +#ifdef XPM + +GSM_Error loadxpm(char *filename, GSM_Bitmap *bitmap) +{ + int y,x,error; + XpmImage image; + XpmInfo info; + + error=XpmReadFileToXpmImage(filename,&image,&info); + + switch (error) { + case XpmColorError: return GE_WRONGCOLORS;break; + case XpmColorFailed: return GE_WRONGCOLORS;break; + case XpmOpenFailed: return GE_CANTOPENFILE;break; + case XpmFileInvalid: return GE_INVALIDFILEFORMAT;break; + case XpmSuccess: break; + } + + if (image.ncolors!=2) { + printf("Wrong number of colors\n"); + return GE_WRONGNUMBEROFCOLORS; + } + + if ((image.height==48) && (image.width==84)) { + bitmap->type=GSM_StartupLogo; + } + else if ((image.height==65) && (image.width==96)) { + bitmap->type=GSM_7110StartupLogo; + } + else if ((image.height==60) && (image.width==96)) { + bitmap->type=GSM_6210StartupLogo; + } + else if ((image.height==28) && (image.width==72)) { + bitmap->type=GSM_PictureImage; + } + else if ((image.height==14) && (image.width==72)) { + bitmap->type=GSM_CallerLogo; + } + else { +#ifdef DEBUG + printf("Invalid Image Size (%dx%d).\n",image.width,image.height); +#endif + return GE_INVALIDIMAGESIZE; + } + + bitmap->height=image.height; + bitmap->width=image.width; + bitmap->size=GSM_GetBitmapSize(bitmap); + + GSM_ClearBitmap(bitmap); + + for(y=0;ytype=GSM_7110StartupLogo; + bitmap->width=96; + bitmap->height=65; + + if (h==48 && w==84) { + bitmap->width=84; + bitmap->height=48; + bitmap->type=GSM_StartupLogo; + } + if (h==60 && w==96) { + bitmap->width=96; + bitmap->height=60; + bitmap->type=GSM_6210StartupLogo; + } + if (h==14 && w==72) { + bitmap->width=72; + bitmap->height=14; + bitmap->type=GSM_CallerLogo; + } + if (h==28 && w==72) { + bitmap->width=72; + bitmap->height=28; + bitmap->type=GSM_PictureImage; + } + if (h==21 && w==78) { + bitmap->width=78; + bitmap->height=21; + bitmap->type=GSM_7110OperatorLogo; + } + + bitmap->size=GSM_GetBitmapSize(bitmap); + + GSM_ClearBitmap(bitmap); + +#ifdef DEBUG + printf("Number of colors in BMP file: "); + switch (buffer[28]) { + case 1:printf("2 (supported by gnokii)\n");break; + case 4:printf("16 (not supported by gnokii)\n");break; + case 8:printf("256 (not supported by gnokii)\n");break; + case 24:printf("True Color (not supported by gnokii)\n");break; + default:printf("unknown\n");break; + } +#endif + if (buffer[28]!=1) { + printf("Wrong number of colors\n"); //we support only 2 colors images ! + return GE_WRONGNUMBEROFCOLORS; + } + +#ifdef DEBUG + printf("Compression in BMP file: "); + switch (buffer[30]) { + case 0:printf("no compression (supported by gnokii)\n");break; + case 1:printf("RLE8 (not supported by gnokii)\n");break; + case 2:printf("RLE4 (not supported by gnokii)\n");break; + default:printf("unknown\n");break; + } +#endif + if (buffer[30]!=0) { +#ifdef DEBUG + printf("Subformat not supported\n"); //we don't support RLE compression +#endif + return GE_SUBFORMATNOTSUPPORTED; + } + + pos=buffer[10]-34; + fread(buffer, 1, pos, file); //rest of header (if exists) and color palette + +#ifdef DEBUG + printf("First color in BMP file: %i %i %i ",buffer[pos-8], buffer[pos-7], buffer[pos-6]); + if (buffer[pos-8]==0 && buffer[pos-7]==0 && buffer[pos-6]==0) printf("(white)"); + if (buffer[pos-8]==0xFF && buffer[pos-7]==0xFF && buffer[pos-6]==0xFF) printf("(black)"); + if (buffer[pos-8]==102 && buffer[pos-7]==204 && buffer[pos-6]==102) printf("(green)"); + printf("\n"); + + printf("Second color in BMP file: %i %i %i ",buffer[pos-4], buffer[pos-3], buffer[pos-2]); + if (buffer[pos-4]==0 && buffer[pos-3]==0 && buffer[pos-2]==0) printf("(white)"); + if (buffer[pos-4]==0xFF && buffer[pos-3]==0xFF && buffer[pos-2]==0xFF) printf("(black)"); + printf("\n"); +#endif + first_white=true; + if (buffer[pos-8]!=0 || buffer[pos-7]!=0 || buffer[pos-6]!=0) first_white=false; + + sizeimage=0; + pos=7; + for (y=h-1;y>=0;y--) { //lines are written from the last to the first + i=1; + for (x=0;xwidth && y<=bitmap->height) { //we have top left corner ! + if (first_white) { + if ((buffer[0]&(1<0) GSM_SetPointBitmap(bitmap,x,y); + } + } + pos--; + if (pos<0) pos=7; //going to new byte + } + pos=7; //going to new byte + if (i!=1) { + while (i!=5) //each line is written in multiply of 4 bytes + { + fread(buffer, 1, 1, file); + sizeimage++; + i++; + } + } + } + +#ifdef DEBUG + printf("Data size in BMP file: %i\n",sizeimage); +#endif + + return(GE_NONE); +} + +GSM_Error loadnol(FILE *file, GSM_Bitmap *bitmap) +{ + + unsigned char buffer[2000]; + int i,j; + + bitmap->type=GSM_OperatorLogo; + + fread(buffer, 1, 6, file); + fread(buffer, 1, 4, file); + sprintf(bitmap->netcode, "%d %02d", buffer[0]+256*buffer[1], buffer[2]); + + fread(buffer, 1, 4, file); /* Width and height of the icon. */ + bitmap->width=buffer[0]; + bitmap->height=buffer[2]; + bitmap->size=GSM_GetBitmapSize(bitmap); + + if ((bitmap->height!=14) || (bitmap->width!=72)) { +#ifdef DEBUG + printf("Invalid Image Size (%dx%d).\n",bitmap->width,bitmap->height); +#endif + return GE_INVALIDIMAGESIZE; + } + + fread(buffer, 1, 6, file); /* Unknown bytes. */ + + for (i=0; isize; i++) { + if (fread(buffer, 1, 8, file)==8) { + bitmap->bitmap[i]=0; + for (j=7; j>=0;j--) + if (buffer[7-j] == '1') + bitmap->bitmap[i]|=(1<type=GSM_CallerLogo; + + fread(buffer, 1, 6, file); + fread(buffer, 1, 4, file); /* Width and height of the icon. */ + bitmap->width=buffer[0]; + bitmap->height=buffer[2]; + bitmap->size=GSM_GetBitmapSize(bitmap); + + if ((bitmap->height!=14) || (bitmap->width!=72)) { +#ifdef DEBUG + printf("Invalid Image Size (%dx%d).\n",bitmap->width,bitmap->height); +#endif + return GE_INVALIDIMAGESIZE; + } + + fread(buffer, 1, 6, file); /* Unknown bytes. */ + + for (i=0; isize; i++) { + if (fread(buffer, 1, 8, file)==8){ + bitmap->bitmap[i]=0; + for (j=7; j>=0;j--) + if (buffer[7-j] == '1') + bitmap->bitmap[i]|=(1<size=0; + + while (fread(block,1,6,file)==6) { + + block_size=block[4]*256+block[5]; + +#ifdef DEBUG + fprintf(stdout,_("Block %c%c%c%c, size %i\n"),block[0],block[1],block[2],block[3],block_size); +#endif + + if (!strncmp(block, "FORM", 4)) { +#ifdef DEBUG + fprintf(stdout,_(" File ID\n")); +#endif + } else + { + if (block_size>504) return(GE_INVALIDFILEFORMAT); + + if (block_size!=0) { + + fread(buffer,1,block_size,file); + buffer[block_size]=0; //if it's string, we end it with \0 + +#ifdef DEBUG + if (!strncmp(block, "VERS", 4)) fprintf(stdout,_(" File saved by: %s\n"),buffer); + if (!strncmp(block, "MODL", 4)) fprintf(stdout,_(" Logo saved from: %s\n"),buffer); + if (!strncmp(block, "COMM", 4)) fprintf(stdout,_(" Phone was connected to COM port: %s\n"),buffer); +#endif + + if (!strncmp(block, "NSLD", 4)) { + bitmap->type=GSM_StartupLogo; + bitmap->height=48; + bitmap->width=84; + bitmap->size=GSM_GetBitmapSize(bitmap); + + memcpy(bitmap->bitmap,buffer,bitmap->size); + +#ifdef DEBUG + fprintf(stdout,_(" Startup logo (size %i)\n"),block_size); +#endif + } + } + } + } + + if (bitmap->size==0) return(GE_TOOSHORT); + + return(GE_NONE); +} + +GSM_Error loadnlm (FILE *file, GSM_Bitmap *bitmap) +{ + unsigned char buffer[1000]; + int pos,pos2,x,y; + div_t division; + + fread(buffer,1,5,file); + fread(buffer,1,1,file); + + switch (buffer[0]) { + case 0x00: bitmap->type=GSM_OperatorLogo; break; + case 0x01: bitmap->type=GSM_CallerLogo; break; + case 0x02: bitmap->type=GSM_StartupLogo; break; + case 0x03: bitmap->type=GSM_PictureImage; break; + default: + return(GE_SUBFORMATNOTSUPPORTED); + } + + fread(buffer,1,4,file); + bitmap->width=buffer[1]; + bitmap->height=buffer[2]; + + if (bitmap->type==GSM_StartupLogo && bitmap->width==96 && bitmap->height==65) + bitmap->type=GSM_7110StartupLogo; + if (bitmap->type==GSM_StartupLogo && bitmap->width==96 && bitmap->height==60) + bitmap->type=GSM_6210StartupLogo; + if (bitmap->type==GSM_OperatorLogo && bitmap->width==78 && bitmap->height==21) + bitmap->type=GSM_7110OperatorLogo; + + bitmap->size=GSM_GetBitmapSize(bitmap); + + division=div(bitmap->width,8); + if (division.rem!=0) division.quot++; /* For startup logos */ + + if (fread(buffer,1,(division.quot*bitmap->height),file)!=(division.quot*bitmap->height)) + return(GE_TOOSHORT); + + GSM_ClearBitmap(bitmap); + + pos=0;pos2=7; + for (y=0;yheight;y++) { + for (x=0;xwidth;x++) { + if ((buffer[pos]&(1<0) GSM_SetPointBitmap(bitmap,x,y); + pos2--; + if (pos2<0) {pos2=7;pos++;} //going to new byte + } + if (pos2!=7) {pos2=7;pos++;} //for startup logos-new line means new byte + } + + return (GE_NONE); +} + +GSM_Error loadota(FILE *file, GSM_Bitmap *bitmap) +{ + + char buffer[4]; + + fread(buffer,1,4,file); + + bitmap->width=buffer[1]; + bitmap->height=buffer[2]; + + if ((bitmap->height==48) && (bitmap->width==84)) { + bitmap->type=GSM_StartupLogo; + } + else if ((bitmap->height==14) && (bitmap->width==72)) { + bitmap->type=GSM_CallerLogo; + } + else { +#ifdef DEBUG + printf("Invalid Image Size (%dx%d).\n",bitmap->width,bitmap->height); +#endif + return GE_INVALIDIMAGESIZE; + } + + bitmap->size=GSM_GetBitmapSize(bitmap); + + if (fread(bitmap->bitmap,1,bitmap->size,file)!=bitmap->size) + return(GE_TOOSHORT); + + return(GE_NONE); +} + +GSM_Error GSM_SaveBitmapFile(char *FileName, GSM_Bitmap *bitmap) +{ + + FILE *file; + bool done=false; + + file = fopen(FileName, "wb"); + + if (!file) + return(GE_CANTOPENFILE); + + if (strstr(FileName,".xpm")) { savexpm(file, bitmap); done=true; } + if (strstr(FileName,".nlm")) { savenlm(file, bitmap); done=true; } + if (strstr(FileName,".ngg")) { savengg(file, bitmap); done=true; } + if (strstr(FileName,".nsl")) { savensl(file, bitmap); done=true; } + if (strstr(FileName,".otb")) { saveota(file, bitmap); done=true; } + if (strstr(FileName,".nol")) { savenol(file, bitmap); done=true; } + if (strstr(FileName,".bmp") || + strstr(FileName,".ggp") || + strstr(FileName,".i61")) + { + savebmp(file, bitmap); + done=true; + } + + if (!done) + { + switch (bitmap->type) { + case GSM_CallerLogo : savengg(file, bitmap); break; + case GSM_OperatorLogo : savenol(file, bitmap); break; + case GSM_7110OperatorLogo: savebmp(file, bitmap); break; + case GSM_7110StartupLogo : savebmp(file, bitmap); break; + case GSM_6210StartupLogo : savebmp(file, bitmap); break; + case GSM_StartupLogo : savensl(file, bitmap); break; + case GSM_PictureImage : savenlm(file, bitmap); break; + case GSM_WelcomeNoteText : break; + case GSM_DealerNoteText : break; + case GSM_None : break; + } + } + + fclose(file); + + return GE_NONE; +} + +void savexpm(FILE *file, GSM_Bitmap *bitmap) +{ + int x,y; + + fprintf(file,_("/* XPM */\n")); + fprintf(file,_("static char * ala_xpm[] = {\n")); + fprintf(file,_("\"%i %i 2 1\",\n"),bitmap->width,bitmap->height); + fprintf(file,_("\". s c m #000000 g4 #000000 g #000000 c #000000\",\n")); + fprintf(file,_("\"# s c m #ffffff g4 #ffffff g #ffffff c #ffffff\",\n")); + + for (y=0;yheight;y++) { + fprintf(file,_("\"")); + for (x=0;xwidth;x++) + if (GSM_IsPointBitmap(bitmap,x,y)) + fprintf(file,_(".")); + else + fprintf(file,_("#")); + fprintf(file,_("\"")); + if (y==bitmap->height-1) + fprintf(file,_("};\n")); + else + fprintf(file,_(",\n")); + } +} + +/* Based on the article from the Polish Magazine "Bajtek" 11/92 */ + /* Marcin-Wiacek@Topnet.PL */ +void savebmp(FILE *file, GSM_Bitmap *bitmap) +{ + int x,y,pos,i,sizeimage; + unsigned char buffer[1]; + div_t division; + + unsigned char header[]={ +/*1'st header*/ 'B','M', /* BMP file ID */ + 0x00,0x00,0x00,0x00, /* Size of file */ + 0x00,0x00, /* Reserved for future use */ + 0x00,0x00, /* Reserved for future use */ + 62,0x00,0x00,0x00, /* Offset for image data */ + +/*2'nd header*/ 40,0x00,0x00,0x00, /* Length of this part of header */ + 0x00,0x00,0x00,0x00, /* Width of image */ + 0x00,0x00,0x00,0x00, /* Height of image */ + 1,0x00, /* How many planes in target device */ + 1,0x00, /* How many colors in image. 1 means 2^1=2 colors */ + 0x00,0x00,0x00,0x00, /* Type of compression. 0 means no compression */ +/*Sometimes */ 0x00,0x00,0x00,0x00, /* Size of part with image data */ +/*ttttttt...*/ 0xE8,0x03,0x00,0x00, /* XPelsPerMeter */ +/*hhiiiiissss*/ 0xE8,0x03,0x00,0x00, /* YPelsPerMeter */ +/*part of header*/2,0x00,0x00,0x00, /* How many colors from palette is used */ +/*doesn't exist*/ 0x00,0x00,0x00,0x00, /* How many colors from palette is required to display image. 0 means all */ + +/*Color palette*/ 0x00,0x00,0x00, /* First color in palette in Blue, Green, Red. Here white */ + 0x00, /* Each color in palette is end by 4'th byte */ + 102,204,102, /* Second color in palette in Blue, Green, Red. Here green */ + 0x00}; /* Each color in palette is end by 4'th byte */ + + header[22]=bitmap->height; + header[18]=bitmap->width; + + pos=7; + sizeimage=0; + for (y=bitmap->height-1;y>=0;y--) { //lines are written from the last to the first + i=1; + for (x=0;xwidth;x++) { + if (pos==7) { //new byte ! + if (x!=0) sizeimage++; + i++; + if(i==5) i=1; //each line is written in multiply of 4 bytes + } + pos--; + if (pos<0) pos=7; //going to new byte + } + pos=7; //going to new byte + sizeimage++; + if (i!=1) { + while (i!=5) //each line is written in multiply of 4 bytes + { + sizeimage++; + i++; + } + } + } +#ifdef DEBUG + printf("Data size in BMP file: %i\n",sizeimage); +#endif + division=div(sizeimage,256); + header[35]=division.quot; + header[34]=sizeimage-(division.quot*256); + + sizeimage=sizeimage+sizeof(header); +#ifdef DEBUG + printf("Size of BMP file: %i\n",sizeimage); +#endif + division=div(sizeimage,256); + header[3]=division.quot; + header[2]=sizeimage-(division.quot*256); + + fwrite(header,1,sizeof(header),file); + + pos=7; + for (y=bitmap->height-1;y>=0;y--) { //lines are written from the last to the first + i=1; + for (x=0;xwidth;x++) { + if (pos==7) { //new byte ! + if (x!=0) fwrite(buffer, 1, sizeof(buffer), file); + i++; + if(i==5) i=1; //each line is written in multiply of 4 bytes + buffer[0]=0; + } + if (!GSM_IsPointBitmap(bitmap,x,y)) buffer[0]|=(1<=0;j--) + if ((copy.bitmap[i]&(1<0) { + buffer[7-j] = '1'; + } else { + buffer[7-j] = '0'; + } + fwrite(buffer,1,8,file); + } +} + +void savenol(FILE *file, GSM_Bitmap *bitmap) +{ + + char header[]={'N','O','L',0x00,0x01,0x00, + 0x00,0x00, /* MCC */ + 0x00,0x00, /* MNC */ + 0x00,0x00, /* Width */ + 0x00,0x00, /* Height */ + 0x01,0x00,0x01,0x00, + 0x00, /* Unknown.Can't be checksum - for */ + /* the same logo files can be different */ + 0x00}; + char buffer[8]; + int i,j,country,net; + GSM_Bitmap copy; + + copy=*bitmap; + + GSM_ResizeBitmap(©,GSM_OperatorLogo); + + sscanf(copy.netcode, "%d %d", &country, &net); + + header[6]=country%256; + header[7]=country/256; + header[8]=net%256; + header[9]=net/256; + header[10]=copy.width; + header[12]=copy.height; + + fwrite(header,1,sizeof(header),file); + + for (i=0; i=0;j--) + if ((copy.bitmap[i]&(1<0) { + buffer[7-j] = '1'; + } else { + buffer[7-j] = '0'; + } + fwrite(buffer,1,8,file); + } +} + +void savensl(FILE *file, GSM_Bitmap *bitmap) +{ + + u8 header[]={'F','O','R','M', 0x01,0xFE, /* File ID block, size 1*256+0xFE=510*/ + 'N','S','L','D', 0x01,0xF8}; /* Startup Logo block, size 1*256+0xF8=504*/ + GSM_Bitmap copy; + + copy=*bitmap; + + GSM_ResizeBitmap(©,GSM_StartupLogo); + + fwrite(header,1,sizeof(header),file); + + fwrite(copy.bitmap,1,copy.size,file); +} + +void saveota(FILE *file, GSM_Bitmap *bitmap) +{ + + char header[]={0x01, + 0x00, /* Width */ + 0x00, /* Height */ + 0x01}; + GSM_Bitmap copy; + + copy=*bitmap; + + header[1]=copy.width; + header[2]=copy.height; + + fwrite(header,1,sizeof(header),file); + + fwrite(copy.bitmap,1,copy.size,file); +} + +void savenlm(FILE *file, GSM_Bitmap *bitmap) +{ + + char header[]={'N','L','M', /* Nokia Logo Manager file ID. */ + 0x20, + 0x01, + 0x00, /* 0x00 (OP), 0x01 (CLI), 0x02 (Startup), 0x03 (Picture)*/ + 0x00, /* Number of images inside file - 1. 0x01==2 images, 0x03==4 images, etc. */ + 0x00, /* Width. */ + 0x00, /* Height. */ + 0x01}; + + unsigned char buffer[1000]; + int x,y,pos,pos2; + div_t division; + GSM_Bitmap copy; + + copy=*bitmap; + + switch (copy.type) { + case GSM_OperatorLogo : header[5]=0x00; break; + case GSM_7110OperatorLogo: header[5]=0x00; break; + case GSM_CallerLogo : header[5]=0x01; break; + case GSM_StartupLogo : header[5]=0x02; break; + case GSM_7110StartupLogo : header[5]=0x02; break; + case GSM_6210StartupLogo : header[5]=0x02; break; + case GSM_PictureImage : header[5]=0x03; break; + case GSM_WelcomeNoteText : break; + case GSM_DealerNoteText : break; + case GSM_None : break; + } + + header[7]=copy.width; + header[8]=copy.height; + + pos=0;pos2=7; + for (y=0;y overwrite + * mode == 1 -> ask + * mode == 2 -> append + */ +int GSM_SaveTextFile(char *FileName, char *text, int mode) +{ + + FILE *file; + + if (mode == 2) file = fopen(FileName, "a"); + else file = fopen(FileName, "w"); + + if (!file) return -1; + + fprintf(file, "%s\n\n", text); + + fclose(file); + + return mode; +} + +GSM_Error GSM_SaveBackupFile(char *FileName, GSM_Backup *backup) +{ + + FILE *file; + + file = fopen(FileName, "wb"); + + if (!file) return(GE_CANTOPENFILE); + + savelmb(file, backup); + + fclose(file); + + return GE_NONE; +} + +void savelmbstartupentry(FILE *file, GSM_Bitmap startup, GSM_Bitmap text, bool available) +{ + /* Welcome note and logo header block */ + char req[1000] = {'W','E','L',' ', /*block identifier*/ + 00,00, /*block data size*/ + 0x02,00,00,00,00,00, + + 0x02}; /*number of blocks (like in 6110 frame)*/ + + int count=13; + + if (!available) { + } else { + count=count+N6110_MakeStartupLogoFrame(req+13,startup); + } + + req[count++]=0x02; + req[count++]=strlen(text.text); + memcpy(req+count,text.text,strlen(text.text)); + count=count+strlen(text.text); + + req[4]=(count-12)%256; + req[5]=(count-12)/256; + + fwrite(req, 1, count, file); +} + +void savelmbopentry(FILE *file, GSM_Bitmap bitmap) +{ + /* Operator logo header block */ + char req[500] = {'O','L','G',' ', /*block identifier*/ + 0x88,00, /*block data size*/ + 0x02,00,00,00,00,00, + + 00}; + + int count=13,i; + + count=count+N6110_MakeOperatorLogoFrame(req+13,bitmap); + + if (bitmap.width!=0x48) { + req[4]=(count-7)%256; + req[5]=(count-7)/256; + + for (i=1;i<=5;i++) req[count++]=0; + + req[17]=req[17]+5; //we fix size of logo block + } else { + req[4]=(count-12)%256; + req[5]=(count-12)/256; + } + + fwrite(req, 1, count, file); +} + +/* Work in progress ! */ +void savelmbspeedentry(FILE *file, GSM_SpeedDial speed) +{ + /* Speed dial header block */ + char req[] = {'S','P','D',' ', /*block identifier*/ + 0x03,00, /*block data size*/ + 0x02,00, + 00, /*number of speed dial*/ + 00,0xFF,00, + + 00, /*number of speed dial*/ + 03, /*memory type. ME=02;SM=03*/ + 00}; /*number of location assigned to speed dial*/ + + req[8]=req[12]=speed.Number; + + if (speed.MemoryType==GMT_ME) req[13]=2; //memory type=GMT_ME + + req[14]=speed.Location; + + fwrite(req, 1, 15, file); +} + +void savelmbcallerentry(FILE *file, GSM_Bitmap bitmap) +{ + char req[500] = {'C','G','R',' ', /*block identifier*/ + 00,00, /*block data size*/ + 02,00, + 00, /*group number=0,1,etc.*/ + 00,00,00}; + + int count=12; + + req[8]=bitmap.number; + + count=count+N6110_MakeCallerGroupFrame(req+12,bitmap); + + req[count++]=0; + + req[4]=(count-12)%256; + req[5]=(count-12)/256; + + fwrite(req, 1, count, file); +} + +void savelmbpbkentry(FILE *file, GSM_PhonebookEntry entry) +{ + char req[500] = {'P','B','E','2', /*block identifier*/ + 00,00, /*block data size*/ + 00,00, + 00,00, /*position of phonebook entry*/ + 03, /*memory type. ME=02;SM=03*/ + 00, + + 00,00, /*position of phonebook entry*/ + 03, /*memory type. ME=02;SM=03*/ + 00}; + + int count = 16, blocks; + + req[9]=req[13] = (entry.Location >> 8); + req[8]=req[12] = entry.Location & 0xff; + + if (entry.MemoryType==GMT_ME) req[10]=req[14]=2; + + count=count+N7110_EncodePhonebookFrame(req+16, entry, &blocks); + + req[4]=(count-12)%256; + req[5]=(count-12)/256; + + fwrite(req, 1, count, file); +} + +void savelmb(FILE *file, GSM_Backup *backup) +{ + int i; + + char LMBHeader[] = {'L','M','B',' '}; /*file identifier*/ + + /* Phonebook header block */ + char PBKHeader[] = {'P','B','K',' ', /*block identifier*/ + 0x08,00, /*block data size*/ + 0x02,00, + 03, /*memory type. ME=02;SM=03*/ + 00,00,00, + + 00,00, /*size of phonebook*/ + 14, /*max length of each position*/ + 00,00,00,00,00}; + + fwrite(LMBHeader, 1, sizeof(LMBHeader), file); /* Write the header of the file. */ + + if (backup->SIMPhonebookUsed!=0) { + PBKHeader[12]=backup->SIMPhonebookSize%256; + PBKHeader[13]=backup->SIMPhonebookSize/256; + fwrite(PBKHeader, 1, sizeof(PBKHeader), file); + + for (i=0;iSIMPhonebookUsed;i++) + savelmbpbkentry(file, backup->SIMPhonebook[i]); + } + + if (backup->PhonePhonebookUsed!=0) { + PBKHeader[8]=2; //memory type=GMT_ME + PBKHeader[12]=backup->PhonePhonebookSize%256; + PBKHeader[13]=backup->PhonePhonebookSize/256; + PBKHeader[14]=0x16; //max size of one entry + fwrite(PBKHeader, 1, sizeof(PBKHeader), file); + + for (i=0;iPhonePhonebookUsed;i++) + savelmbpbkentry(file, backup->PhonePhonebook[i]); + } + + if (backup->CallerAvailable) + for (i=0;i<5;i++) savelmbcallerentry(file,backup->CallerGroups[i]); + +// if (backup->SpeedAvailable) +// for (i=0;i<8;i++) savelmbspeedentry(file,backup->SpeedDials[i]); + + if (backup->OperatorLogoAvailable) savelmbopentry(file,backup->OperatorLogo); + + savelmbstartupentry(file,backup->StartupLogo,backup->StartupText,backup->StartupLogoAvailable); +} + +void loadlmbcallerentry(unsigned char *buffer, unsigned char *buffer2, GSM_Backup *backup, int number) +{ + int i; + + backup->CallerAvailable=true; + +#ifdef DEBUG + fprintf(stdout, _(" Number %i, name \""), buffer2[0]); + for (i=0;iCallerGroups[number].number=buffer2[0]; + backup->CallerGroups[number].type=GSM_CallerLogo; + + for (i=0;iCallerGroups[number].text[i]=buffer2[i+2]; + } + backup->CallerGroups[number].text[buffer2[1]]=0; + + backup->CallerGroups[number].ringtone=buffer2[i+2]; + + backup->CallerGroups[number].enabled=false; + if (buffer2[i+3]==1) backup->CallerGroups[number].enabled=true; + + backup->CallerGroups[number].width=buffer2[i+7]; + backup->CallerGroups[number].height=buffer2[i+8]; + + backup->CallerGroups[number].size=GSM_GetBitmapSize(&backup->CallerGroups[number]); + + memcpy(backup->CallerGroups[number].bitmap,buffer2+i+10,backup->CallerGroups[number].size); + +#ifdef DEBUG + fprintf(stdout, _(" Caller logo")); + fprintf(stdout, _(" (size %ix%i - %i bytes)\n"), + backup->CallerGroups[number].width, backup->CallerGroups[number].height, backup->CallerGroups[number].size); + GSM_PrintBitmap(&backup->CallerGroups[number]); +#endif + +} + +void loadlmbopentry(unsigned char *buffer, unsigned char *buffer2, GSM_Backup *backup) +{ + backup->OperatorLogoAvailable=true; + + DecodeNetworkCode(buffer2+1, backup->OperatorLogo.netcode); + + backup->OperatorLogo.text[0]=0; + + backup->OperatorLogo.width=buffer2[7]; + backup->OperatorLogo.height=buffer2[8]; + + backup->OperatorLogo.type=GSM_OperatorLogo; + if (backup->OperatorLogo.width==78) backup->OperatorLogo.type=GSM_7110OperatorLogo; + + backup->OperatorLogo.size=GSM_GetBitmapSize(&backup->OperatorLogo); + +#ifdef DEBUG + fprintf(stdout, _(" GSM operator logo (size %ix%i - %i bytes) for %s (%s) network.\n"), + backup->OperatorLogo.width, backup->OperatorLogo.height, + backup->OperatorLogo.size, backup->OperatorLogo.netcode, + GSM_GetNetworkName(backup->OperatorLogo.netcode)); +#endif + + memcpy(backup->OperatorLogo.bitmap,buffer2+10,backup->OperatorLogo.size); + +#ifdef DEBUG + GSM_PrintBitmap(&backup->OperatorLogo); +#endif + +} + +void loadlmbpbkentry(unsigned char *buffer, unsigned char *buffer2, GSM_Backup *backup) +{ + GSM_PhonebookEntry pbk; + +#ifdef DEBUG + fprintf(stdout,_(" Memory : ")); + switch(buffer[10]) { + case 2: fprintf(stdout, _("(internal)\n"));break; + case 3: fprintf(stdout, _("(sim)\n"));break; + default: fprintf(stdout, _("(unknown)\n"));break; + } + fprintf(stdout,_(" Location : %i\n"),buffer2[0]+buffer2[1]*256); +#endif + + pbk.Empty = true; + pbk.Group = 5; /* 5 = no group as 6110 */ + pbk.Name[0] = 0; + pbk.Number[0] = 0; + pbk.SubEntriesCount = 0; + + N7110_DecodePhonebookFrame(&pbk,buffer2+4,(buffer[4]+buffer[5]*256)-4); + + pbk.MemoryType=GMT_SM; + if (buffer[10]==2) pbk.MemoryType=GMT_ME; + + pbk.Location=buffer2[0]+256*buffer2[1]; + + if (buffer[10]==2) backup->PhonePhonebook[backup->PhonePhonebookUsed++]=pbk; + else backup->SIMPhonebook [backup->SIMPhonebookUsed++] =pbk; +} + +void loadlmbstartupentry(unsigned char *buffer, unsigned char *buffer2, GSM_Backup *backup) +{ + int i,j,z; + + j=1; + for (i=0;iStartupLogoAvailable=true; + backup->StartupLogo.height=buffer2[j++]; + backup->StartupLogo.width=buffer2[j++]; + backup->StartupLogo.text[0]=0; + backup->StartupLogo.type=GSM_StartupLogo; + switch (backup->StartupLogo.height) { + case 65:backup->StartupLogo.type=GSM_7110StartupLogo;break; + case 60:backup->StartupLogo.type=GSM_6210StartupLogo;break; + } + backup->StartupLogo.size=GSM_GetBitmapSize(&backup->StartupLogo); + +#ifdef DEBUG + fprintf(stdout, _(" Block 1 - startup logo (size %ix%i - %i bytes)\n"), + backup->StartupLogo.width, backup->StartupLogo.height, backup->StartupLogo.size); +#endif + + memcpy(backup->StartupLogo.bitmap,buffer2+j,backup->StartupLogo.size); +#ifdef DEBUG + GSM_PrintBitmap(&backup->StartupLogo); +#endif + j=j+backup->StartupLogo.size; + + break; + case 2: + +#ifdef DEBUG + fprintf(stdout, _(" Block 2 - welcome note \"")); + for (z=0;zPhonePhonebookUsed=0; + backup->SIMPhonebookUsed=0; + backup->StartupLogoAvailable=false; + backup->StartupText.text[0]=0; + backup->OperatorLogoAvailable=false; + backup->CallerAvailable=false; + backup->SpeedAvailable=false; + + switch (filetype) { + case LMB: error=loadlmb(file,backup); fclose(file); break; + default : error=GE_INVALIDFILEFORMAT; + } + + return(error); +} + +GSM_Error GSM_SaveBinRingtoneFile(char *FileName, GSM_BinRingtone *ringtone) +{ + + FILE *file; + + file = fopen(FileName, "wb"); + + if (!file) return(GE_CANTOPENFILE); + + fwrite(ringtone->frame, 1, ringtone->length, file); + + fclose(file); + + return GE_NONE; +} diff --git a/common/files/midifile.c b/common/files/midifile.c new file mode 100644 index 0000000..7177373 --- /dev/null +++ b/common/files/midifile.c @@ -0,0 +1,1321 @@ +/* a little modified code from http://iki.fi/too/sw/xring/ */ + +/* embedding modified midifile.h and midifile.c into this file */ + +/***** midifile.h ******/ + +struct MF { +/* definitions for MIDI file parsing code */ + int (*Mf_getc)(struct MF *); + void (*Mf_header)(struct MF *, int, int, int); + void (*Mf_trackstart)(struct MF *); + void (*Mf_trackend)(struct MF *); + void (*Mf_noteon)(struct MF *, int, int, int); + void (*Mf_noteoff)(struct MF *, int, int, int); + void (*Mf_pressure)(struct MF *, int, int, int); + void (*Mf_parameter)(struct MF *, int, int, int); + void (*Mf_pitchbend)(struct MF *, int, int, int); + void (*Mf_program)(struct MF *, int, int); + void (*Mf_chanpressure)(struct MF *, int, int); + void (*Mf_sysex)(struct MF *, int, char *); + void (*Mf_metamisc)(struct MF *, int, int, char * ); + void (*Mf_seqspecific)(struct MF *, int, int, char *); + void (*Mf_seqnum)(struct MF *, int); + void (*Mf_text)(struct MF *, int, int, char *); + void (*Mf_eot)(struct MF *); + void (*Mf_timesig)(struct MF *, int, int, int, int); + void (*Mf_smpte)(struct MF *, int, int, int, int, int); + void (*Mf_tempo)(struct MF *, long); + void (*Mf_keysig)(struct MF *, int, int); + void (*Mf_arbitrary)(struct MF *, int, char *); + void (*Mf_error)(struct MF *, char * ); +#if 0 +/* definitions for MIDI file writing code */ + void (*Mf_putc)(struct MF *); + void (*Mf_writetrack)(struct MF *); + void (*Mf_writetempotrack)(struct MF *); +#endif + /* variables */ + int Mf_nomerge; /* 1 => continue'ed system exclusives are */ + /* not collapsed. */ + long Mf_currtime; /* current time in delta-time units */ + +/* private stuff */ + long Mf_toberead; + long Mf_numbyteswritten; + + char *Msgbuff; /* message buffer */ + int Msgsize; /* Size of currently allocated Msg */ + int Msgindex; /* index of next available location in Msg */ + +}; + +float mf_ticks2sec(unsigned long ticks,int division,unsigned int tempo); +unsigned long mf_sec2ticks(float secs,int division, unsigned int tempo); + +void mferror(struct MF * mf, char * s); + +/*void mfwrite(); */ + + +/* MIDI status commands most significant bit is 1 */ +#define note_off 0x80 +#define note_on 0x90 +#define poly_aftertouch 0xa0 +#define control_change 0xb0 +#define program_chng 0xc0 +#define channel_aftertouch 0xd0 +#define pitch_wheel 0xe0 +#define system_exclusive 0xf0 +#define delay_packet (1111) + +/* 7 bit controllers */ +#define damper_pedal 0x40 +#define portamento 0x41 +#define sostenuto 0x42 +#define soft_pedal 0x43 +#define general_4 0x44 +#define hold_2 0x45 +#define general_5 0x50 +#define general_6 0x51 +#define general_7 0x52 +#define general_8 0x53 +#define tremolo_depth 0x5c +#define chorus_depth 0x5d +#define detune 0x5e +#define phaser_depth 0x5f + +/* parameter values */ +#define data_inc 0x60 +#define data_dec 0x61 + +/* parameter selection */ +#define non_reg_lsb 0x62 +#define non_reg_msb 0x63 +#define reg_lsb 0x64 +#define reg_msb 0x65 + +/* Standard MIDI Files meta event definitions */ +#define meta_event 0xFF +#define sequence_number 0x00 +#define text_event 0x01 +#define copyright_notice 0x02 +#define sequence_name 0x03 +#define instrument_name 0x04 +#define lyric 0x05 +#define marker 0x06 +#define cue_point 0x07 +#define channel_prefix 0x20 +#define end_of_track 0x2f +#define set_tempo 0x51 +#define smpte_offset 0x54 +#define time_signature 0x58 +#define key_signature 0x59 +#define sequencer_specific 0x74 + +/* Manufacturer's ID number */ +#define Seq_Circuits (0x01) /* Sequential Circuits Inc. */ +#define Big_Briar (0x02) /* Big Briar Inc. */ +#define Octave (0x03) /* Octave/Plateau */ +#define Moog (0x04) /* Moog Music */ +#define Passport (0x05) /* Passport Designs */ +#define Lexicon (0x06) /* Lexicon */ +#define Tempi (0x20) /* Bon Tempi */ +#define Siel (0x21) /* S.I.E.L. */ +#define Kawai (0x41) +#define Roland (0x42) +#define Korg (0x42) +#define Yamaha (0x43) + +/* miscellaneous definitions */ +#define MThd 0x4d546864 +#define MTrk 0x4d54726b +#define lowerbyte(x) ((unsigned char)(x & 0xff)) +#define upperbyte(x) ((unsigned char)((x & 0xff00)>>8)) + +/* the midifile interface */ +void midifile(struct MF * mf); + +/***** midifile.c ******/ + +/* + * midifile 1.11 + * + * Read and write a MIDI file. Externally-assigned function pointers are + * called upon recognizing things in the file. + * + * Original release ? + * June 1989 - Added writing capability, M. Czeiszperger. + * + * The file format implemented here is called + * Standard MIDI Files, and is part of the Musical + * instrument Digital Interface specification. + * The spec is avaiable from: + * + * International MIDI Association + * 5316 West 57th Street + * Los Angeles, CA 90056 + * + * An in-depth description of the spec can also be found + * in the article "Introducing Standard MIDI Files", published + * in Electronic Musician magazine, April, 1989. + * + */ + +#include +#include +#include +#include + +#ifdef WIN32 + + #include + +#else + + #include +#endif + +#include "gsm-common.h" +#include "gsm-ringtones.h" + +#define NULLFUNC NULL + +static void readheader(struct MF * mf); +static int readtrack(struct MF * mf); +static void chanmessage(struct MF * mf,int status,int c1,int c2); +static void msginit(struct MF * mf); +static void msgadd(struct MF * mf,int c); +static void metaevent(struct MF * mf, int type); +static void sysex(struct MF * mf); +static int msgleng(struct MF * mf); +static void badbyte(struct MF * mf,int c); +static void biggermsg(struct MF * mf); + + +static long readvarinum(struct MF * mf); +static long read32bit(struct MF * mf); +static long to32bit(int, int, int, int); +static int read16bit(struct MF * mf); +static int to16bit(int, int); +static char * msg(struct MF * mf); + +/* The only non-static function in this file. */ +void mfread(struct MF * mf) +{ + if ( mf->Mf_getc == NULLFUNC ) + mferror(mf, "mfread() called without setting Mf_getc"); + + readheader(mf); + while ( readtrack(mf) ) + ; +} + +/* for backward compatibility with the original lib */ +void midifile(struct MF * mf) +{ + mfread(mf); +} + +/* read through the "MThd" or "MTrk" header string */ +static int readmt(struct MF * mf, char * s) +{ + int n = 0; + char *p = s; + int c=0; + + while ( n++<4 && (c=mf->Mf_getc(mf)) != EOF ) { + if ( c != *p++ ) { + char buff[32]; + (void) strcpy(buff, "expecting "); + (void) strcat(buff, s); + mferror(mf, buff); + } + } + return c; +} + +/* read a single character and abort on EOF */ +static int egetc(struct MF * mf) +{ + int c = mf->Mf_getc(mf); + + if ( c == EOF ) + mferror(mf, "premature EOF"); + mf->Mf_toberead--; + return c; +} + +/* read a header chunk */ +static void readheader(struct MF * mf) +{ + int format, ntrks, division; + + if ( readmt(mf, "MThd") == EOF ) + return; + + mf->Mf_toberead = read32bit(mf); + format = read16bit(mf); + ntrks = read16bit(mf); + division = read16bit(mf); + + if ( mf->Mf_header ) + (*mf->Mf_header)(mf, format,ntrks,division); + + /* flush any extra stuff, in case the length of header is not 6 */ + while ( mf->Mf_toberead > 0 ) + (void) egetc(mf); +} + +static int readtrack(struct MF * mf) /* read a track chunk */ +{ + /* This array is indexed by the high half of a status byte. It's */ + /* value is either the number of bytes needed (1 or 2) for a channel */ + /* message, or 0 (meaning it's not a channel message). */ + static int chantype[] = { + 0, 0, 0, 0, 0, 0, 0, 0, /* 0x00 through 0x70 */ + 2, 2, 2, 2, 1, 1, 2, 0 /* 0x80 through 0xf0 */ + }; + long lookfor; + int c, c1, type; + int sysexcontinue = 0; /* 1 if last message was an unfinished sysex */ + int running = 0; /* 1 when running status used */ + int status = 0; /* status value (e.g. 0x90==note-on) */ + int needed; + + if ( readmt(mf, "MTrk") == EOF ) + return(0); + + mf->Mf_toberead = read32bit(mf); + mf->Mf_currtime = 0; + + if ( mf->Mf_trackstart ) + (*mf->Mf_trackstart)(mf); + + while ( mf->Mf_toberead > 0 ) { + + mf->Mf_currtime += readvarinum(mf); /* delta time */ + + c = egetc(mf); + + if ( sysexcontinue && c != 0xf7 ) + mferror(mf, "didn't find expected continuation of a sysex"); + + if ( (c & 0x80) == 0 ) { /* running status? */ + if ( status == 0 ) + mferror(mf, "unexpected running status"); + running = 1; + } + else { + status = c; + running = 0; + } + + needed = chantype[ (status>>4) & 0xf ]; + + if ( needed ) { /* ie. is it a channel message? */ + + if ( running ) + c1 = c; + else + c1 = egetc(mf); + chanmessage(mf, status, c1, (needed>1)? egetc(mf): 0); + continue;; + } + + switch ( c ) { + + case 0xff: /* meta event */ + + type = egetc(mf); + lookfor = mf->Mf_toberead - readvarinum(mf); + msginit(mf); + + while ( mf->Mf_toberead > lookfor ) + msgadd(mf, egetc(mf)); + + metaevent(mf, type); + break; + + case 0xf0: /* start of system exclusive */ + + lookfor = mf->Mf_toberead - readvarinum(mf); + msginit(mf); + msgadd(mf, 0xf0); + + while ( mf->Mf_toberead > lookfor ) + msgadd(mf, c=egetc(mf)); + + if ( c==0xf7 || mf->Mf_nomerge==0 ) + sysex(mf); + else + sysexcontinue = 1; /* merge into next msg */ + break; + + case 0xf7: /* sysex continuation or arbitrary stuff */ + + lookfor = mf->Mf_toberead - readvarinum(mf); + + if ( ! sysexcontinue ) + msginit(mf); + + while ( mf->Mf_toberead > lookfor ) + msgadd(mf, c=egetc(mf)); + + if ( ! sysexcontinue ) { + if ( mf->Mf_arbitrary ) + (*mf->Mf_arbitrary)(mf, msgleng(mf),msg(mf)); + } + else if ( c == 0xf7 ) { + sysex(mf); + sysexcontinue = 0; + } + break; + default: + badbyte(mf, c); + break; + } + } + if ( mf->Mf_trackend ) + (*mf->Mf_trackend)(mf); + return(1); +} + +static void badbyte(struct MF * mf,int c) +{ + char buff[32]; + + (void) sprintf(buff,"unexpected byte: 0x%02x",c); + mferror(mf, buff); +} + +static void metaevent(struct MF * mf, int type) +{ + int leng = msgleng(mf); + char *m = msg(mf); + + switch ( type ) { + case 0x00: + if ( mf->Mf_seqnum ) + (*mf->Mf_seqnum)(mf, to16bit(m[0],m[1])); + break; + case 0x01: /* Text event */ + case 0x02: /* Copyright notice */ + case 0x03: /* Sequence/Track name */ + case 0x04: /* Instrument name */ + case 0x05: /* Lyric */ + case 0x06: /* Marker */ + case 0x07: /* Cue point */ + case 0x08: + case 0x09: + case 0x0a: + case 0x0b: + case 0x0c: + case 0x0d: + case 0x0e: + case 0x0f: + /* These are all text events */ + if ( mf->Mf_text ) + (*mf->Mf_text)(mf, type,leng,m); + break; + case 0x2f: /* End of Track */ + if ( mf->Mf_eot ) + (*mf->Mf_eot)(mf); + break; + case 0x51: /* Set tempo */ + if ( mf->Mf_tempo ) + (*mf->Mf_tempo)(mf, to32bit(0,m[0],m[1],m[2])); + break; + case 0x54: + if ( mf->Mf_smpte ) + (*mf->Mf_smpte)(mf, m[0],m[1],m[2],m[3],m[4]); + break; + case 0x58: + if ( mf->Mf_timesig ) + (*mf->Mf_timesig)(mf, m[0],m[1],m[2],m[3]); + break; + case 0x59: + if ( mf->Mf_keysig ) + (*mf->Mf_keysig)(mf, m[0],m[1]); + break; + case 0x7f: + if ( mf->Mf_seqspecific ) + (*mf->Mf_seqspecific)(mf, type, leng, m); + break; + default: + if ( mf->Mf_metamisc ) + (*mf->Mf_metamisc)(mf, type,leng,m); + } +} + +static void sysex(struct MF * mf) +{ + if ( mf->Mf_sysex ) + (*mf->Mf_sysex)(mf, msgleng(mf),msg(mf)); +} + +static void chanmessage(struct MF * mf,int status,int c1,int c2) +{ + int chan = status & 0xf; + + switch ( status & 0xf0 ) { + case 0x80: + if ( mf->Mf_noteoff ) + (*mf->Mf_noteoff)(mf, chan,c1,c2); + break; + case 0x90: + if ( mf->Mf_noteon ) + (*mf->Mf_noteon)(mf, chan,c1,c2); + break; + case 0xa0: + if ( mf->Mf_pressure ) + (*mf->Mf_pressure)(mf, chan,c1,c2); + break; + case 0xb0: + if ( mf->Mf_parameter ) + (*mf->Mf_parameter)(mf, chan,c1,c2); + break; + case 0xe0: + if ( mf->Mf_pitchbend ) + (*mf->Mf_pitchbend)(mf, chan,c1,c2); + break; + case 0xc0: + if ( mf->Mf_program ) + (*mf->Mf_program)(mf, chan,c1); + break; + case 0xd0: + if ( mf->Mf_chanpressure ) + (*mf->Mf_chanpressure)(mf, chan,c1); + break; + } +} + +/* readvarinum - read a varying-length number, and return the */ +/* number of characters it took. */ + +static long readvarinum(struct MF * mf) +{ + long value; + int c; + + c = egetc(mf); + value = c; + if ( c & 0x80 ) { + value &= 0x7f; + do { + c = egetc(mf); + value = (value << 7) + (c & 0x7f); + } while (c & 0x80); + } + return (value); +} + +static long to32bit(int c1,int c2,int c3,int c4) +{ + long value = 0L; + + value = (c1 & 0xff); + value = (value<<8) + (c2 & 0xff); + value = (value<<8) + (c3 & 0xff); + value = (value<<8) + (c4 & 0xff); + return (value); +} + +static int to16bit(int c1,int c2) +{ + return ((c1 & 0xff ) << 8) + (c2 & 0xff); +} + +static long read32bit(struct MF * mf) +{ + int c1, c2, c3, c4; + + c1 = egetc(mf); + c2 = egetc(mf); + c3 = egetc(mf); + c4 = egetc(mf); + return to32bit(c1,c2,c3,c4); +} + +static int read16bit(struct MF * mf) +{ + int c1, c2; + c1 = egetc(mf); + c2 = egetc(mf); + return to16bit(c1,c2); +} + +/* static */ +void mferror(struct MF * mf, char * s) +{ + if ( mf->Mf_error ) + (*mf->Mf_error)(mf, s); + exit(1); +} + +/* The code below allows collection of a system exclusive message of */ +/* arbitrary length. The Msgbuff is expanded as necessary. The only */ +/* visible data/routines are msginit(), msgadd(), msg(), msgleng(). */ + +#define MSGINCREMENT 128 + +static void msginit(struct MF * mf) +{ + mf->Msgindex = 0; +} + +static char * msg(struct MF * mf) +{ + return(mf->Msgbuff); +} + +static int msgleng(struct MF * mf) +{ + return(mf->Msgindex); +} + +static void msgadd(struct MF * mf,int c) +{ + /* If necessary, allocate larger message buffer. */ + if ( mf->Msgindex >= mf->Msgsize ) + biggermsg(mf); + mf->Msgbuff[mf->Msgindex++] = c; +} + +static void biggermsg(struct MF * mf) +{ + char *newmess; + char *oldmess = mf->Msgbuff; + int oldleng = mf->Msgsize; + + mf->Msgsize += MSGINCREMENT; + newmess = (char *) malloc( (unsigned)(sizeof(char) * mf->Msgsize) ); + + if(newmess == NULL) + mferror(mf, "malloc error!"); + + /* copy old message into larger new one */ + if ( oldmess != NULL ) { + register char *p = newmess; + register char *q = oldmess; + register char *endq = &oldmess[oldleng]; + + for ( ; q!=endq ; p++,q++ ) + *p = *q; + free(oldmess); + } + mf->Msgbuff = newmess; +} + +#if 0 /* saving time not converting write function at this time + */ +/* + * mfwrite() - The only fuction you'll need to call to write out + * a midi file. + * + * format 0 - Single multi-channel track + * 1 - Multiple simultaneous tracks + * 2 - One or more sequentially independent + * single track patterns + * ntracks The number of tracks in the file. + * division This is kind of tricky, it can represent two + * things, depending on whether it is positive or negative + * (bit 15 set or not). If bit 15 of division is zero, + * bits 14 through 0 represent the number of delta-time + * "ticks" which make up a quarter note. If bit 15 of + * division is a one, delta-times in a file correspond to + * subdivisions of a second similiar to SMPTE and MIDI + * time code. In this format bits 14 through 8 contain + * one of four values - 24, -25, -29, or -30, + * corresponding to the four standard SMPTE and MIDI + * time code frame per second formats, where -29 + * represents 30 drop frame. The second byte + * consisting of bits 7 through 0 corresponds the the + * resolution within a frame. Refer the Standard MIDI + * Files 1.0 spec for more details. + * fp This should be the open file pointer to the file you + * want to write. It will have be a global in order + * to work with Mf_putc. + */ +void +mfwrite(format,ntracks,division,fp) +int format,ntracks,division; +FILE *fp; +{ + int i; void mf_write_track_chunk(), mf_write_header_chunk(); + + if ( mf->Mf_putc == NULLFUNC ) + mferror(mf, "mfmf_write() called without setting Mf_putc"); + + if ( mf->Mf_writetrack == NULLFUNC ) + mferror(mf, "mfmf_write() called without setting Mf_mf_writetrack"); + + /* every MIDI file starts with a header */ + mf_write_header_chunk(format,ntracks,division); + + /* In format 1 files, the first track is a tempo map */ + if(format == 1 && ( mf->Mf_writetempotrack )) + { + (*mf->Mf_writetempotrack)(); + } + + /* The rest of the file is a series of tracks */ + for(i = 0; i < ntracks; i++) + mf_write_track_chunk(i,fp); +} + +void +mf_write_track_chunk(which_track,fp) +int which_track; +FILE *fp; +{ + unsigned long trkhdr,trklength; + long offset, place_marker; + void write16bit(),write32bit(); + + + trkhdr = MTrk; + trklength = 0; + + /* Remember where the length was written, because we don't + know how long it will be until we've finished writing */ + offset = ftell(fp); + +#ifdef DEBUG + printf("offset = %d\n",(int) offset); +#endif + + /* Write the track chunk header */ + write32bit(trkhdr); + write32bit(trklength); + + mf->Mf_numbyteswritten = 0L; /* the header's length doesn't count */ + + if( mf->Mf_writetrack ) + { + (*mf->Mf_writetrack)(which_track); + } + + /* mf_write End of track meta event */ + eputc(mf, 0); + eputc(mf, meta_event); + eputc(mf, end_of_track); + + eputc(mf, 0); + + /* It's impossible to know how long the track chunk will be beforehand, + so the position of the track length data is kept so that it can + be written after the chunk has been generated */ + place_marker = ftell(fp); + + /* This method turned out not to be portable because the + parameter returned from ftell is not guaranteed to be + in bytes on every machine */ + /* track.length = place_marker - offset - (long) sizeof(track); */ + +#ifdef DEBUG +printf("length = %d\n",(int) trklength); +#endif + + if(fseek(fp,offset,0) < 0) + mferror(mf, "error seeking during final stage of write"); + + trklength = mf->Mf_numbyteswritten; + + /* Re-mf_write the track chunk header with right length */ + write32bit(trkhdr); + write32bit(trklength); + + fseek(fp,place_marker,0); +} /* End gen_track_chunk() */ + + +void +mf_write_header_chunk(format,ntracks,division) +int format,ntracks,division; +{ + unsigned long ident,length; + void write16bit(),write32bit(); + + ident = MThd; /* Head chunk identifier */ + length = 6; /* Chunk length */ + + /* individual bytes of the header must be written separately + to preserve byte order across cpu types :-( */ + write32bit(ident); + write32bit(length); + write16bit(format); + write16bit(ntracks); + write16bit(division); +} /* end gen_header_chunk() */ + + +#ifdef WHENISTHISNEEDED +/* + * mf_write_midi_event() + * + * Library routine to mf_write a single MIDI track event in the standard MIDI + * file format. The format is: + * + * + * + * In this case, event can be any multi-byte midi message, such as + * "note on", "note off", etc. + * + * delta_time - the time in ticks since the last event. + * type - the type of meta event. + * chan - The midi channel. + * data - A pointer to a block of chars containing the META EVENT, + * data. + * size - The length of the meta-event data. + */ +int +mf_write_midi_event(delta_time, type, chan, data, size) +unsigned long delta_time; +unsigned int chan,type; +unsigned long size; +unsigned char *data; +{ + int i; + void WriteVarLen(); + unsigned char c; + + WriteVarLen(delta_time); + + /* all MIDI events start with the type in the first four bits, + and the channel in the lower four bits */ + c = type | chan; + + if(chan > 15) + perror("error: MIDI channel greater than 16\n"); + + eputc(mf, c); + + /* write out the data bytes */ + for(i = 0; i < size; i++) + eputc(mf, data[i]); + + return(size); +} /* end mf_write MIDI event */ + +/* + * mf_write_meta_event() + * + * Library routine to mf_write a single meta event in the standard MIDI + * file format. The format of a meta event is: + * + * + * + * delta_time - the time in ticks since the last event. + * type - the type of meta event. + * data - A pointer to a block of chars containing the META EVENT, + * data. + * size - The length of the meta-event data. + */ +int +mf_write_meta_event(delta_time, type, data, size) +unsigned long delta_time; +unsigned char *data,type; +unsigned long size; +{ + int i; + + WriteVarLen(delta_time); + + /* This marks the fact we're writing a meta-event */ + eputc(mf, meta_event); + + /* The type of meta event */ + eputc(mf, type); + + /* The length of the data bytes to follow */ + WriteVarLen(size); + + for(i = 0; i < size; i++) + { + if(eputc(mf, data[i]) != data[i]) + return(-1); + } + return(size); +} /* end mf_write_meta_event */ + +void +mf_write_tempo(tempo) +unsigned long tempo; +{ + /* Write tempo */ + /* all tempos are written as 120 beats/minute, */ + /* expressed in microseconds/quarter note */ + eputc(mf, 0); + eputc(mf, meta_event); + eputc(mf, set_tempo); + + eputc(mf, 3); + eputc(mf, (unsigned)(0xff & (tempo >> 16))); + eputc(mf, (unsigned)(0xff & (tempo >> 8))); + eputc(mf, (unsigned)(0xff & tempo)); +} + +#endif +/* + * Write multi-length bytes to MIDI format files + */ +void +WriteVarLen(value) +unsigned long value; +{ + unsigned long buffer; + + buffer = value & 0x7f; + while((value >>= 7) > 0) + { + buffer <<= 8; + buffer |= 0x80; + buffer += (value & 0x7f); + } + while(1){ + eputc(mf, (unsigned)(buffer & 0xff)); + + if(buffer & 0x80) + buffer >>= 8; + else + return; + } +}/* end of WriteVarLen */ + + +/* + * write32bit() + * write16bit() + * + * These routines are used to make sure that the byte order of + * the various data types remains constant between machines. This + * helps make sure that the code will be portable from one system + * to the next. It is slightly dangerous that it assumes that longs + * have at least 32 bits and ints have at least 16 bits, but this + * has been true at least on PCs, UNIX machines, and Macintosh's. + * + */ +void +write32bit(data) +unsigned long data; +{ + eputc(mf, x(unsigned)((data >> 24) & 0xff)); + eputc(mf, (unsigned)((data >> 16) & 0xff)); + eputc(mf, (unsigned)((data >> 8 ) & 0xff)); + eputc(mf, (unsigned)(data & 0xff)); +} + +void +write16bit(data) +int data; +{ + eputc(mf, (unsigned)((data & 0xff00) >> 8)); + eputc(mf, (unsigned)(data & 0xff)); +} + +/* write a single character and abort on error */ +eputc(mf, c) +unsigned char c; +{ + int return_val; + + if((mf->Mf_putc) == NULLFUNC) + { + mferror(mf, "Mf_putc undefined"); + return(-1); + } + + return_val = (mf->Mf_putc)(mf, c); + + if ( return_val == EOF ) + mferror(mf, "error writing"); + + mf->Mf_numbyteswritten++; + return(return_val); +} + +#endif + +unsigned long mf_sec2ticks(float secs,int division, unsigned int tempo) +{ + return (long)(((secs * 1000.0) / 4.0 * division) / tempo); +} + + +/* + * This routine converts delta times in ticks into seconds. The + * else statement is needed because the formula is different for tracks + * based on notes and tracks based on SMPTE times. + * + */ +float mf_ticks2sec(unsigned long ticks,int division,unsigned int tempo) +{ + float smpte_format, smpte_resolution; + + if(division > 0) + return ((float) (((float)(ticks) * (float)(tempo)) / ((float)(division) * 1000000.0))); + else + { + smpte_format = upperbyte(division); + smpte_resolution = lowerbyte(division); + return (float) ((float) ticks / (smpte_format * smpte_resolution * 1000000.0)); + } +} /* end of ticks2sec() */ + +/* code to utilize the interface */ + +#define TRACE(x, y) do { if (x) printf y; } while (0) + + +typedef unsigned long ulg; +typedef unsigned char uch; +typedef unsigned int ui; + +struct NoteInfo +{ + int beats; + int nrnotes; + struct Notes { + ui note : 4; + ui scale : 4; + ui length : 4; + ui lextra : 4; + } note[1]; +}; + +#define IBUFSIZE 1024 +struct MFX +{ + struct MF mfi; + struct NoteInfo * ni; + int allocated; + + int division; + int trackstate; + + int prevnoteonpitch; /* -1, nothing, 0 pause, 1-x note. */ + ulg prevnoteontime; + + struct { + int fd; + uch buf[IBUFSIZE]; + int len; + int p; + } istrm; +}; + +enum { TRK_NONE, TRK_READING, TRK_FINISHED }; + +#define ALLOCSIZE 256 + +#define NIALLOC(size) (struct NoteInfo *)malloc(sizeof (struct NoteInfo) + ((size) - 1) * sizeof (struct Notes)) + +#define NIREALLOC(ni, size) (struct NoteInfo *)realloc((ni), sizeof (struct NoteInfo) + ((size) - 1) * sizeof (struct Notes)) + + +static void lm_error(struct MF * mf, char * s); + +static int lm_getc(struct MF * mf); +static void lm_header(struct MF * mf, int, int, int); +static void lm_trackstart(struct MF * mf); +static void lm_trackend(struct MF * mf); +static void lm_tempo(struct MF *, long); +static void lm_noteon(struct MF *, int, int, int); +static void lm_noteoff(struct MF *, int, int, int); + + +struct NoteInfo * readmidi(int fd) +{ + struct MFX mfxi = { { 0 } }; + struct MF * mf = (struct MF *)&mfxi; + + mfxi.ni = NIALLOC(ALLOCSIZE); + mfxi.allocated = ALLOCSIZE; + + /* set variables to their initial values */ + mfxi.division = 0; + mfxi.trackstate = TRK_NONE; + mfxi.prevnoteonpitch = -1; + mfxi.ni->nrnotes = 0; + mfxi.ni->beats = 120; + + mfxi.istrm.fd = fd; + mfxi.istrm.p = mfxi.istrm.len = 0; + mf->Mf_getc = lm_getc; + + mf->Mf_header = lm_header; + mf->Mf_tempo = lm_tempo; + mf->Mf_trackstart = lm_trackstart; + mf->Mf_trackend = lm_trackend; + mf->Mf_noteon = lm_noteon; + mf->Mf_noteoff = lm_noteoff; + + mf->Mf_error = lm_error; + + midifile(mf); + + return mfxi.ni; +} + +static void lm_error(struct MF * mf, char * s) +{ + fprintf(stderr, "%s\n", s); +} + +static int lm_getc(struct MF * mf) +{ + struct MFX * mfx = (struct MFX *)mf; + + /* printf("p %d, len %d\n", mfx->istrm.p, mfx->istrm.len); */ + if (mfx->istrm.p == mfx->istrm.len) + { + mfx->istrm.len = read(mfx->istrm.fd, mfx->istrm.buf, IBUFSIZE); + /* printf("readlen %d\n", mfx->istrm.len); */ + if (mfx->istrm.len <= 0) + return -1; + + mfx->istrm.p = 1; + return mfx->istrm.buf[0]; + } + /* else */ + return mfx->istrm.buf[mfx->istrm.p++]; +} + +static void lm_header(struct MF * mf, int format, int ntrks, int division) +{ + struct MFX * mfx = (struct MFX *)mf; + + TRACE(0, ("lm_header(%p, %d, %d, %d)\n", mf, format, ntrks, division)); + + mfx->division = division; +} + +/* this is just a quess */ +static void lm_tempo(struct MF * mf, long tempo) +{ + struct MFX * mfx = (struct MFX *)mf; + + TRACE(0, ("lm_tempo(%p, %ld)\n", mf, tempo)); + + if (mfx->trackstate != TRK_FINISHED) + mfx->ni->beats = 60000000 / tempo; +} + + +static void addnote(struct MFX * mfx, int pitch, int duration, int special) +{ + int nr, p, s; + struct NoteInfo * ni; + + if (mfx->ni->nrnotes == mfx->allocated) + { + mfx->allocated += ALLOCSIZE; + mfx->ni = NIREALLOC(mfx->ni, mfx->allocated); + if (mfx->ni == NULL) + exit(1); + } + ni = mfx->ni; /* mfx->ni pointer value may have changed above */ + nr = ni->nrnotes++; + + + if (pitch == 0) { p = 0; s = 0; } + else { pitch--; p = (pitch % 12) + 1; s = pitch / 12; } + + ni->note[nr].note = p; + ni->note[nr].scale = s; + + ni->note[nr].length = duration; + ni->note[nr].lextra = special; +} + +/* currently supported */ +static /* N 32 32. 16 16. 8 8. 4 4. 2 2. 1 1. */ +int vals[] = { 15, 38, 54, 78, 109, 156, 218, 312, 437, 625, 875, 1250 }; + +static void writenote(struct MFX * mfx, int delta) +{ + ulg millinotetime = delta * 250 / mfx->division; + int i; + int duration; + int special; + + for(i = 0; i < sizeof vals / sizeof vals[0]; i++) + { + if (millinotetime < vals[i]) + break; + } + + if (i == 0) + return; + + i--; + duration = i / 2; + special = i & 1; + + addnote(mfx, mfx->prevnoteonpitch, duration, special); /* XXX think this */ +} + + +static void lm_trackstart(struct MF * mf) +{ + struct MFX * mfx = (struct MFX *)mf; + + TRACE(0, ("lm_trackstart(%p)\n", mf)); + + if (mfx->trackstate == TRK_NONE) + mfx->trackstate = TRK_READING; + + mfx->prevnoteonpitch = -1; +} + +static void lm_trackend(struct MF * mf) +{ + struct MFX * mfx = (struct MFX *)mf; + long time = mf->Mf_currtime; + + TRACE(0, ("lm_trackend(%p)\n", mf)); + + if (mfx->trackstate == TRK_READING && mfx->ni->nrnotes > 0) + mfx->trackstate = TRK_FINISHED; + + if (mfx->prevnoteonpitch >= 0) + writenote(mfx, time - mfx->prevnoteontime); + + mfx->prevnoteonpitch = -1; +} + +static void lm_noteon(struct MF * mf, int chan, int pitch, int vol) +{ + struct MFX * mfx = (struct MFX *)mf; + long time = mf->Mf_currtime; + + TRACE(0, ("lm_noteon(%p, %d, %d, %d)\n", mf, chan, pitch, vol)); + + if (vol == 0) /* kludge? to handle some (format 1? midi files) */ + return; + + if (mfx->trackstate != TRK_READING) + return; + + if (mfx->prevnoteonpitch >= 0) + writenote(mfx, time - mfx->prevnoteontime); + + if (vol == 0) + mfx->prevnoteonpitch = 0; + else + mfx->prevnoteonpitch = pitch + 1; + + mfx->prevnoteontime = time; +} + +static void lm_noteoff(struct MF * mf, int chan, int pitch, int vol) +{ + struct MFX * mfx = (struct MFX *)mf; + long time = mf->Mf_currtime; + + TRACE(0, ("lm_noteoff(%p, %d, %d, %d)\n", mf, chan, pitch, vol)); + + if (mfx->prevnoteonpitch >= 0) + { + writenote(mfx, time - mfx->prevnoteontime); + mfx->prevnoteonpitch = -1; + } + mfx->prevnoteonpitch = 0; + mfx->prevnoteontime = time; +} + +//{ "p", "c", "c#", "d", "d#", "e", "f", "f#", "g", "g#", "a", "a#", "h" }; +char notes[] = + { 255, 0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11 , 12 }; + +u8 lengths[] = { 4, 8, 16, 32, 64, 128 }; + +static void countdefaults(struct NoteInfo * ni, int * length_p, int * scale_p) +{ + int lengths[15] = { 0 }; + int scales[15] = { 0 }; + int maxlenval = 0; /* (*) */ + int maxscaleval = 0; + int i; + + for (i = 0; i < ni->nrnotes; i++) + { + struct Notes * note = &ni->note[i]; + + lengths[note->length]++; + scales[note->scale]++; + } + + maxlenval = lengths[0]; /* (*) smart compiler eliminates dead code */ + *length_p = 0; + + for (i = 1; i < 15; i++) /* `p' incremented scales[0], therefore ignored */ + { + TRACE(0, ("%d - len: %d, scale: %d\n", i, lengths[i], scales[i])); + + if (lengths[i] > maxlenval) { + *length_p = i; + maxlenval = lengths[i]; + } + if (scales[i] > maxscaleval) { + *scale_p = i; + maxscaleval = scales[i]; + } + } +} + +GSM_Error loadmid(char *filename, GSM_Ringtone *ringtone) +{ + int fd; + struct NoteInfo * ni; + int i; + int deflen, defscale; + +#ifdef WIN32 + if ((fd = open(filename, O_RDONLY | O_BINARY)) < 0) + { + perror("open"); + return GE_CANTOPENFILE; + } +#else + if ((fd = open(filename, O_RDONLY)) < 0) + { + perror("open"); + return GE_CANTOPENFILE; + } +#endif + + ni = readmidi(fd); + + if (ni == NULL) + return 0; + + countdefaults(ni, &deflen, &defscale); + + strcpy(ringtone->name,"GNOKII"); + + if (ni->nrnotesNrNotes=ni->nrnotes; + else + ringtone->NrNotes=MAX_RINGTONE_NOTES; + + for (i = 0; i < ringtone->NrNotes; i++) + { + struct Notes * note = &ni->note[i]; + + ringtone->notes[i].note=notes[note->note]; + ringtone->notes[i].note=notes[note->note]+(note->scale%4)*14; + + ringtone->notes[i].duration=lengths[note->length]; + if (note->lextra) + ringtone->notes[i].duration=ringtone->notes[i].duration*1.5; + + ringtone->notes[i].tempo=ni->beats; + + } + + ringtone->Loop=15; + + return 0; +} diff --git a/common/gsm-api.c b/common/gsm-api.c new file mode 100644 index 0000000..5a91da9 --- /dev/null +++ b/common/gsm-api.c @@ -0,0 +1,827 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Provides a generic API for accessing functions on the phone, wherever + possible hiding the model specific details. + + The underlying code should run in it's own thread to allow communications to + the phone to be run independantly of mailing code that calls these API + functions. + + Unless otherwise noted, all functions herein block until they complete. The + functions themselves are defined in a structure in gsm-common.h. + +*/ + +#include +#include +#include +#include + +#ifdef WIN32 + #include + #include "misc_win32.h" +#endif + +#include "gsm-api.h" + +#include "newmodules/n6110.h" +#include "newmodules/n7110.h" +#include "newmodules/newat.h" +#ifdef DEBUG + #include "newmodules/sniff/sniff.h" +#endif +#include "protocol/fbusirda.h" +#include "protocol/fbus.h" +#include "protocol/mbus.h" +#include "protocol/at.h" +#include "files/cfgreader.h" + +#ifndef WIN32 + #include "devices/device.h" +#endif + +#ifdef VC6 + /* for VC6 make scripts save VERSION constant in mversion.h file */ + #include "mversion.h" +#endif + +/* GSM_LinkOK is set to true once normal communications with the phone have + been established. */ + +bool *GSM_LinkOK; + +/* Define pointer to the GSM_Functions structure used by external code to call + relevant API functions. This structure is defined in gsm-common.h. */ + +GSM_Functions *GSM; + +/* Define pointer to the GSM_Information structure used by external code to + obtain information that varies from model to model. This structure is also + defined in gsm-common.h */ + +GSM_Information *GSM_Info; + +/* Initialise interface to the phone. Model number should be a string such as + 3810, 5110, 6110 etc. Device is the serial port to use e.g. /dev/ttyS0, the + user must have write permission to the device. */ + +GSM_Protocol *Protocol; + +/* Local variables used by get/set phonebook entry code. Buffer is used as a + source or destination for phonebook data and other functions... Error is + set to GE_NONE by calling function, set to GE_COMPLETE or an error code by + handler routines as appropriate. */ + +GSM_PhonebookEntry *CurrentPhonebookEntry; +GSM_Error CurrentPhonebookError; + +GSM_SpeedDial *CurrentSpeedDialEntry; +GSM_Error CurrentSpeedDialError; + +unsigned char Current_IMEI[GSM_MAX_IMEI_LENGTH]; +unsigned char Current_Revision[GSM_MAX_REVISION_LENGTH]; +unsigned char Current_Model[GSM_MAX_MODEL_LENGTH]; + +GSM_SMSMessage *CurrentSMSMessage; +GSM_Error CurrentSMSMessageError; +int CurrentSMSPointer; + +GSM_SMSFolders *CurrentSMSFolders; +GSM_Error CurrentSMSFoldersError; +int CurrentSMSFoldersCount; + +GSM_OneSMSFolder CurrentSMSFolder; +GSM_Error CurrentSMSFolderError; +int CurrentSMSFolderID; + +GSM_MemoryStatus *CurrentMemoryStatus; +GSM_Error CurrentMemoryStatusError; + +GSM_NetworkInfo *CurrentNetworkInfo; +GSM_Error CurrentNetworkInfoError; + +GSM_SMSStatus *CurrentSMSStatus; +GSM_Error CurrentSMSStatusError; + +GSM_MessageCenter *CurrentMessageCenter; +GSM_Error CurrentMessageCenterError; + +int *CurrentSecurityCodeStatus; +GSM_Error CurrentSecurityCodeError; +GSM_SecurityCode *CurrentSecurityCode; + +GSM_DateTime *CurrentDateTime; +GSM_Error CurrentDateTimeError; + +GSM_DateTime *CurrentAlarm; +GSM_Error CurrentAlarmError; + +GSM_CalendarNote *CurrentCalendarNote; +GSM_Error CurrentCalendarNoteError; + +GSM_NotesInfo CurrentCalendarNotesInfo,*CurrentCalendarNotesInfo2; +GSM_Error CurrentCalendarNotesInfoError; + +GSM_Error CurrentSetDateTimeError; +GSM_Error CurrentSetAlarmError; + +GSM_Error CurrentEnableExtendedCommandsError; + +int CurrentRFLevel, + CurrentBatteryLevel, + CurrentPowerSource; + +int CurrentDisplayStatus; +GSM_Error CurrentDisplayStatusError; + +GSM_Error CurrentResetPhoneSettingsError; + +char *CurrentNetmonitor; +GSM_Error CurrentNetmonitorError; + +GSM_Bitmap *CurrentGetBitmap=NULL; +GSM_Error CurrentGetBitmapError; + +GSM_Error CurrentSetBitmapError; + +GSM_Error CurrentSendDTMFError; + +GSM_Profile *CurrentProfile; +GSM_Error CurrentProfileError; + +GSM_Error CurrentDisplayOutputError; + +GSM_CBMessage *CurrentCBMessage; +GSM_Error CurrentCBError; + +int CurrentPressKeyEvent; +GSM_Error CurrentPressKeyError; + +GSM_Error CurrentPlayToneError=GE_UNKNOWN; + +GSM_Error CurrentDialVoiceError; + +GSM_Error CurrentGetOperatorNameError; +GSM_Network *CurrentGetOperatorNameNetwork; +GSM_Error CurrentSetOperatorNameError; + +GSM_Error CurrentGetIMEIError; + +GSM_Error CurrentGetHWError; + +unsigned char CurrentPPS[4]; +GSM_Error CurrentProductProfileSettingsError; + +char CurrentIncomingCall[20]; + +GSM_Error CurrentBinRingtoneError; +GSM_BinRingtone *CurrentGetBinRingtone=NULL; + +GSM_Error CurrentRingtoneError; + +GSM_Error CurrentMagicError; + +GSM_Error CurrentSimlockInfoError; +GSM_AllSimlocks *CurrentSimLock; + +GSM_Error CurrentGetWAPBookmarkError; +GSM_Error CurrentSetWAPBookmarkError; +GSM_WAPBookmark *WAPBookmark; + +GSM_Error CurrentGetWAPSettingsError; +GSM_WAPSettings *WAPSettings; + +GSM_Error CurrentCallDivertError; +GSM_CallDivert *CurrentCallDivert; + +char *CurrentManufacturer; + +/* This is the connection type used in gnokii. */ +GSM_ConnectionType CurrentConnectionType; + +/* Pointer to a callback function used to return changes to a calls status */ +/* This saves unreliable polling */ +void (*CurrentCallPassup)(char c); + +/* Pointer to callback function in user code to be called when RLP frames + are received. */ +void (*CurrentRLP_RXCallback)(RLP_F96Frame *frame); + +/* Used to disconnect the call */ +u8 CurrentCallSequenceNumber; + +bool CurrentLinkOK; + +bool CurrentRequestTerminate; + +bool CurrentDisableKeepAlive; + +bool CheckModel (GSM_Information InfoToCheck, char *model, GSM_ConnectionType connection) { + + bool found_match=false; + + if (strstr(InfoToCheck.FBUSModels, model) != NULL) { + if (connection==GCT_FBUS) found_match=true; + } + if (strstr(InfoToCheck.MBUSModels, model) != NULL) { + if (connection==GCT_MBUS) found_match=true; + } + if (strstr(InfoToCheck.InfraredModels, model) != NULL) { + if (connection==GCT_Infrared) found_match=true; + } + if (strstr(InfoToCheck.DLR3Models, model) != NULL) { + if (connection==GCT_DLR3) found_match=true; + } + if (strstr(InfoToCheck.IrdaModels, model) != NULL) { + if (connection==GCT_Irda) found_match=true; + } + if (strstr(InfoToCheck.ATModels, model) != NULL) { + if (connection==GCT_AT) found_match=true; + } + if (strstr(InfoToCheck.TekramModels, model) != NULL) { + if (connection==GCT_Tekram) found_match=true; + } + + return found_match; +} + +GSM_Error TryNewNokia(char *model, char *device, char *initlength, GSM_ConnectionType connection, void (*rlp_callback)(RLP_F96Frame *frame)) { + int InitLength; + int count; + unsigned char init_char = N6110_SYNC_BYTE; + + /* Hopefully is 64 larger as FB38_MAX* / N6110_MAX* */ + char phonemodel[64]; + + if (Protocol->Initialise(device,initlength,connection,rlp_callback)!=GE_NONE) + { + return GE_NOTSUPPORTED; + } + + if (connection!=GCT_MBUS) { + InitLength = atoi(initlength); + + if ((strcmp(initlength, "default") == 0) || (InitLength == 0)) { + InitLength = 250; /* This is the usual value, lower may work. */ + } + +#ifdef DEBUG + fprintf(stdout,_("Writing init chars....")); +#endif + + /* Initialise link with phone or what have you */ + /* Send init string to phone, this is a bunch of 0x55 characters. Timing is + empirical. */ + for (count = 0; count < InitLength; count ++) { + usleep(100); + Protocol->WritePhone(1,&init_char); + } + +#ifdef DEBUG + fprintf(stdout,_("Done\n")); +#endif + + N6110_SendStatusRequest(); + } + + usleep(100); + + if (N6110_SendIDFrame()!=GE_NONE) + return GE_TIMEOUT; + + while (N6110_GetModel(phonemodel) != GE_NONE) + sleep(1); + + if (!strcmp(phonemodel,"NPE-3") || !strcmp(phonemodel,"NSE-5")) + { + GSM->Terminate(); + + /* Set pointers to relevant addresses */ + GSM = &N7110_Functions; + GSM_Info = &N7110_Information; + GSM_LinkOK = &CurrentLinkOK; + return GE_NONE; + } + + return GE_NONE; +} + +GSM_Error GSM_Initialise(char *model, char *device, char *initlength, GSM_ConnectionType connection, void (*rlp_callback)(RLP_F96Frame *frame), char* SynchronizeTime) +{ + bool found_match=false; + + GSM_ConnectionType connection2; + + struct tm *now; + time_t nowh; + GSM_DateTime Date; + GSM_Error error; + + connection2=connection; + + CurrentRLP_RXCallback = rlp_callback; + CurrentCallPassup=NULL; + CurrentCallDivert=NULL; + CurrentPhonebookEntry=NULL; + CurrentNetworkInfo = NULL; + CurrentGetBitmap=NULL; + CurrentPlayToneError=GE_UNKNOWN; + strcpy(CurrentIncomingCall," "); + CurrentGetBinRingtone=NULL; + CurrentNetworkInfo=NULL; + CurrentRequestTerminate=false; + CurrentDisableKeepAlive=false; + CurrentCalendarNotesInfo.HowMany=2000; + CurrentSMSMessage=NULL; + CurrentMagicError = GE_BUSY; + + if (!strcmp(model,"auto")) { + + /* For now */ + GSM = &N6110_Functions; + GSM_Info = &N6110_Information; + GSM_LinkOK = &CurrentLinkOK; +#ifdef DEBUG + fprintf(stdout,_("Trying FBUS for new Nokia phones...\n")); +#endif + /* Trying FBUS */ + Protocol = &FBUS_Functions; + CurrentConnectionType=GCT_FBUS; + connection2=GCT_FBUS; + if (TryNewNokia(model,device,initlength,CurrentConnectionType,rlp_callback)==GE_NONE) + { + found_match=true; + } else { + GSM->Terminate(); + } + + if (!found_match) { + usleep(100); + + /* For now */ + GSM = &N6110_Functions; + GSM_Info = &N6110_Information; + GSM_LinkOK = &CurrentLinkOK; +#ifdef DEBUG + fprintf(stdout,_("Trying DLR3 for new Nokia phones...\n")); +#endif + /* Trying DLR3 */ + Protocol = &FBUS_Functions; + CurrentConnectionType=GCT_DLR3; + connection2=GCT_DLR3; + if (TryNewNokia(model,device,initlength,CurrentConnectionType,rlp_callback)==GE_NONE) + { + found_match=true; + } else { + GSM->Terminate(); + } + } + + if (!found_match) { + usleep(100); + + /* For now */ + GSM = &N6110_Functions; + GSM_Info = &N6110_Information; + GSM_LinkOK = &CurrentLinkOK; +#ifdef DEBUG + fprintf(stdout,_("Trying MBUS for new Nokia phones...\n")); +#endif + /* Trying MBUS */ + Protocol = &MBUS_Functions; + CurrentConnectionType=GCT_MBUS; + connection2=GCT_MBUS; + if (TryNewNokia(model,device,initlength,CurrentConnectionType,rlp_callback)==GE_NONE) + { + found_match=true; + } else { + GSM->Terminate(); + } + } + + if (!found_match) return GE_NOTSUPPORTED; + + usleep(50); + + } else { + if (!strcmp(model,"modelauto")) { + /* For now */ + GSM = &N6110_Functions; + GSM_Info = &N6110_Information; + GSM_LinkOK = &CurrentLinkOK; +#ifdef DEBUG + fprintf(stdout,_("Trying to find connected model...\n")); +#endif + switch (connection) { + case GCT_FBUS : Protocol = &FBUS_Functions; break; + case GCT_Infrared: Protocol = &FBUS_Functions; break; + case GCT_Tekram : Protocol = &FBUS_Functions; break; + case GCT_DLR3 : Protocol = &FBUS_Functions; break; + case GCT_MBUS : Protocol = &MBUS_Functions; break; + case GCT_Irda : Protocol = &FBUSIRDA_Functions;break; + case GCT_AT : Protocol = &AT_Functions; break; + case GCT_Default : Protocol = NULL; break; + } + CurrentConnectionType=connection; + connection2=connection; + if (TryNewNokia(model,device,initlength,CurrentConnectionType,rlp_callback)==GE_NONE) + { + found_match=true; + } else { + GSM->Terminate(); + } + + if (!found_match) return GE_NOTSUPPORTED; + + usleep(50); + + } else { +#ifdef DEBUG + if (CheckModel (Nsniff_Information, model, connection)) { + /* Set pointers to relevant addresses */ + GSM = &Nsniff_Functions; + GSM_Info = &Nsniff_Information; + GSM_LinkOK = &CurrentLinkOK; + found_match=true; + } +#endif + + if (CheckModel (N6110_Information, model, connection)) { + /* Set pointers to relevant addresses */ + GSM = &N6110_Functions; + GSM_Info = &N6110_Information; + GSM_LinkOK = &CurrentLinkOK; + found_match=true; + } + if (CheckModel (N7110_Information, model, connection)) { + /* Set pointers to relevant addresses */ + GSM = &N7110_Functions; + GSM_Info = &N7110_Information; + GSM_LinkOK = &CurrentLinkOK; + found_match=true; + } + if (CheckModel (Nat_Information, model, connection)) { + /* Set pointers to relevant addresses */ + GSM = &Nat_Functions; + GSM_Info = &Nat_Information; + GSM_LinkOK = &CurrentLinkOK; + found_match=true; + } + + if (found_match) { + switch (connection) { + case GCT_FBUS : Protocol = &FBUS_Functions; break; + case GCT_Infrared: Protocol = &FBUS_Functions; break; + case GCT_Tekram : Protocol = &FBUS_Functions; break; + case GCT_DLR3 : Protocol = &FBUS_Functions; break; + case GCT_MBUS : Protocol = &MBUS_Functions; break; + case GCT_Irda : Protocol = &FBUSIRDA_Functions;break; + case GCT_AT : Protocol = &AT_Functions; break; + case GCT_Default : Protocol = NULL; break; + } + } else + return GE_NOTSUPPORTED; + } + } + + + /* Now call model specific initialisation code. */ + error=(GSM->Initialise(device, initlength, connection2, rlp_callback)); + + /* RTH: FIXME: second try for Irda (6210 only?)*/ + if ( error!=GE_NONE && connection == GCT_Irda) + { + #ifdef DEBUG + fprintf(stdout,"Irda connection: second try!\n"); + #endif + device_close(); + error=(GSM->Initialise(device, initlength, connection2, rlp_callback)); + } + + if (error==GE_NONE && !strcmp(SynchronizeTime,"yes")) + { + nowh=time(NULL); + now=localtime(&nowh); + + Date.Year = now->tm_year; + Date.Month = now->tm_mon+1; + Date.Day = now->tm_mday; + Date.Hour = now->tm_hour; + Date.Minute = now->tm_min; + Date.Second = now->tm_sec; + + if (Date.Year<1900) + { + + /* Well, this thing is copyrighted in U.S. This technique is known as + Windowing and you can read something about it in LinuxWeekly News: + http://lwn.net/1999/features/Windowing.phtml. This thing is beeing + written in Czech republic and Poland where algorithms are not allowed + to be patented. */ + + if (Date.Year>90) + Date.Year = Date.Year+1900; + else + Date.Year = Date.Year+2000; + } + + /* FIXME: Error checking should be here. */ + GSM->SetDateTime(&Date); + } + + return error; +} + +GSM_Error Unimplemented(void) +{ + return GE_NOTIMPLEMENTED; +} + +GSM_Error NotSupported(void) +{ + return GE_NOTSUPPORTED; +} + +/* Applications should call N6110_Terminate to shut down the N6110 thread and + close the serial port. */ +void NULL_Terminate(void) +{ + Protocol->Terminate(); +} + +#ifdef WIN32 +/* Here are things made for keeping connecting */ +void NULL_KeepAlive() +{ +} +#else +/* Here are things made for keeping connecting */ +void NULL_KeepAlive() +{ +} +#endif + +#ifdef DEBUG +void NULL_TX_DisplayMessage(u16 MessageLength, u8 *MessageBuffer) +{ + fprintf(stdout, _("PC: ")); + + txhexdump(MessageLength,MessageBuffer); +} +#endif + +bool NULL_WritePhone (u16 length, u8 *buffer) { + if (device_write(buffer,length)!=length) return false; + else return true; +} + +GSM_Error NULL_WaitUntil (int time, GSM_Error *value) +{ + int timeout; + + timeout=time; + + /* Wait for timeout or other error. */ + while (timeout != 0 && *value == GE_BUSY ) { + + if (--timeout == 0) + return (GE_TIMEOUT); + + usleep (100000); + } + + return *value; +} + +GSM_Error NULL_SendMessageSequence (int time, GSM_Error *value, + u16 message_length, u8 message_type, u8 *buffer) +{ + *value=GE_BUSY; + + Protocol->SendMessage(message_length, message_type, buffer); + + return NULL_WaitUntil (time, value); +} + +GSM_ConnectionType GetConnectionTypeFromString(char *Connection) { + + GSM_ConnectionType connection=GCT_FBUS; + + if (!strcmp(Connection, "irda")) connection=GCT_Irda; + if (!strcmp(Connection, "infrared")) connection=GCT_Infrared; + if (!strcmp(Connection, "mbus")) connection=GCT_MBUS; + if (!strcmp(Connection, "dlr3")) connection=GCT_DLR3; + if (!strcmp(Connection, "at")) connection=GCT_AT; + if (!strcmp(Connection, "tekram210"))connection=GCT_Tekram; + + return connection; +} + +bool GetMemoryTypeString(char *memorytext, GSM_MemoryType *type) +{ + int i=0; + + typedef struct { + GSM_MemoryType type; + char *name; + } GSM_MTStrings; + + GSM_MTStrings mystring[] = { + {GMT_ME,"ME"}, + {GMT_SM,"SM"}, + {GMT_FD,"FD"}, + {GMT_ON,"ON"}, + {GMT_EN,"EN"}, + {GMT_DC,"DC"}, + {GMT_RC,"RC"}, + {GMT_MC,"MC"}, + {GMT_LD,"LD"}, + {GMT_MT,"MT"}, + {GMT_ME,"undefined"} + }; + + while (strcmp(mystring[i].name,"undefined")) { + if (*type==mystring[i].type) { + strcpy(memorytext,mystring[i].name); + return true; + } + i++; + } + return false; +} + +bool GetMemoryTypeID(char *memorytext, GSM_MemoryType *type) +{ + int i=0; + + typedef struct { + GSM_MemoryType type; + char *name; + } GSM_MTStrings; + + GSM_MTStrings mystring[] = { + {GMT_ME,"ME"}, + {GMT_SM,"SM"}, + {GMT_FD,"FD"}, + {GMT_ON,"ON"}, + {GMT_EN,"EN"}, + {GMT_DC,"DC"}, + {GMT_RC,"RC"}, + {GMT_MC,"MC"}, + {GMT_LD,"LD"}, + {GMT_MT,"MT"}, + {GMT_ME,"undefined"} + }; + + while (strcmp(mystring[i].name,"undefined")) { + if (strcmp(mystring[i].name,memorytext)==0) { + *type=mystring[i].type; + return true; + } + i++; + } + + return false; +} + +char *GetMygnokiiVersion() { + + static char Buffer[1000]=""; + + sprintf(Buffer, "%s",VERSION); + + return Buffer; +} + +/* +1.Name,2.CodeName,3.Calendar,4.Netmonitor,5.Caller groups,6.Phonebook, +7.Authentication 8.Datacalls 9.KeysPressing 10.SMSC Default Recipient +11.SpeedDials 12.ScreenSavers 13.DTMF 14.SMS 15.NoPowerFrame 16.StartUpLogo +17.Profiles 18.Ringtones 19.WAP 20.RIngtonesNumber +*/ + +static OnePhoneModel allmodels[] = { + +/*1, 2, 3, 4, 5, 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 */ +{"3210","NSE-8",{ 0,F_NETMON, 0, 0, 0, 0, 0,F_SMSCDEF,F_SPEED, 0, 0,F_SMS ,F_NOPOWER,F_STANIM,F_PROF51,F_RINGBIN, 0, 2}}, +{"3210","NSE-9",{ 0,F_NETMON, 0, 0, 0, 0, 0,F_SMSCDEF,F_SPEED, 0, 0,F_SMS ,F_NOPOWER,F_STANIM,F_PROF51,F_RINGBIN, 0, 2}}, +{"3310","NHM-5",{F_CAL33,F_NETMON, 0,F_PBK33SIM, 0, 0, 0,F_SMSCDEF,F_SPEED,F_SCRSAV, 0,F_SMS ,F_NOPOWER,F_STANIM,F_PROF33,F_RING_SM, 0, 7}}, +{"3330","NHM-6",{F_CAL33,F_NETMON, 0,F_PBK33INT, 0, 0,F_KEYB,F_SMSCDEF,F_SPEED,F_SCRSAV, 0,F_SMS , 0,F_STANIM,F_PROF33,F_RING_SM,F_WAP, 7}}, +{"5110","NSE-1",{ 0,F_NETMON, 0, 0,F_AUTH,F_DATA61,F_KEYB,F_SMSCDEF,F_SPEED, 0,F_DTMF,F_SMS , 0, 0,F_PROF51, 0, 0, 0}}, +{"5130","NSK-1",{ 0,F_NETMON, 0, 0,F_AUTH,F_DATA61,F_KEYB,F_SMSCDEF,F_SPEED, 0,F_DTMF,F_SMS , 0, 0,F_PROF51, 0, 0, 0}}, +{"5190","NSB-1",{ 0,F_NETMON, 0, 0,F_AUTH,F_DATA61,F_KEYB,F_SMSCDEF,F_SPEED, 0,F_DTMF,F_SMS , 0, 0,F_PROF51, 0, 0, 0}}, +{"6110","NSE-3",{F_CAL61,F_NETMON,F_CALER61,F_PBK61INT,F_AUTH,F_DATA61,F_KEYB,F_SMSCDEF,F_SPEED, 0,F_DTMF,F_SMS , 0,F_STA ,F_PROF61,F_RINGBIN, 0, 1}}, +{"6130","NSK-3",{F_CAL61,F_NETMON,F_CALER61,F_PBK61INT,F_AUTH,F_DATA61,F_KEYB,F_SMSCDEF,F_SPEED, 0,F_DTMF,F_SMS , 0,F_STA ,F_PROF61,F_RINGBIN, 0, 1}}, +{"6150","NSM-1",{F_CAL61,F_NETMON,F_CALER61,F_PBK61INT,F_AUTH,F_DATA61,F_KEYB,F_SMSCDEF,F_SPEED, 0,F_DTMF,F_SMS , 0,F_STA ,F_PROF61,F_RINGBIN, 0, 1}}, +{"6190","NSB-3",{F_CAL61,F_NETMON,F_CALER61,F_PBK61INT,F_AUTH,F_DATA61,F_KEYB,F_SMSCDEF,F_SPEED, 0,F_DTMF,F_SMS , 0,F_STA ,F_PROF61,F_RINGBIN, 0, 1}}, +{"6210","NPE-3",{F_CAL71,F_NETMON,F_CALER61,F_PBK71INT, 0,F_DATA71, 0,F_SMSCDEF,F_SPEED, 0, 0,F_SMS71, 0,F_STA62 ,F_PROF61,F_RINGBIN,F_WAP, 5}}, +{"6250","NHM-3",{F_CAL71,F_NETMON,F_CALER61,F_PBK71INT, 0,F_DATA71, 0,F_SMSCDEF,F_SPEED, 0, 0,F_SMS71, 0,F_STA62 ,F_PROF61,F_RINGBIN,F_WAP, 5}}, +{"7110","NSE-5",{F_CAL71,F_NETMON,F_CALER61,F_PBK71INT, 0,F_DATA71, 0,F_SMSCDEF,F_SPEED, 0, 0,F_SMS71, 0,F_STA71 ,F_PROF61,F_RINGBIN,F_WAP, 5}}, +{"8210","NSM-3",{ 0,F_NETMON,F_CALER61,F_PBK61INT, 0,F_DATA61,F_KEYB,F_SMSCDEF,F_SPEED, 0,F_DTMF,F_SMS , 0,F_STA ,F_PROF61,F_RINGBIN, 0, 1}}, +{"8850","NSM-2",{ 0,F_NETMON,F_CALER61,F_PBK61INT, 0,F_DATA61,F_KEYB,F_SMSCDEF,F_SPEED, 0,F_DTMF,F_SMS , 0,F_STA ,F_PROF61,F_RINGBIN, 0, 1}}, +{"9210","RAE-3",{ 0,F_NETMON,F_CALER61, 0, 0,F_DATA61,F_KEYB,F_SMSCDEF,F_SPEED, 0,F_DTMF,F_SMS , 0,F_STA ,F_PROF61,F_RINGBIN, 0, 0}},//quesses only ! +{"" ,"" ,{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}} +}; + +OnePhoneModel *GetPhoneModelData (const char *num) +{ + register int i = 0; + + while (allmodels[i].number != "") { + if (strcmp (num, allmodels[i].number) == 0) { + return (&allmodels[i]); + } + i++; + } + + return (&allmodels[i]); +} + +char *GetModelName () +{ + static char model[64]; + + while (GSM->GetModel(model) != GE_NONE) sleep(1); + + return (GetPhoneModelData(model)->model); +} + +int GetModelFeature (featnum_index num) +{ + static char model[64]; + + while (GSM->GetModel(model) != GE_NONE) sleep(1); + + return (GetPhoneModelData(model)->features[num]); +} + +int LogAvailable=-1; //-1 not checked earlier, 0 not, 1 yes +char *logfilename; + +bool AppendLog(u8 *buffer, int length,bool format) +{ + FILE *file=NULL; + char buffer2[50001]; + int i; + + struct CFG_Header *cfg_info; + char *LogFile; + + if (LogAvailable==-1) { + + LogAvailable=0; + + cfg_info=CFG_FindGnokiirc(); + if (cfg_info==NULL) return false; + + LogFile = CFG_Get(cfg_info, "global", "logfile"); + if (LogFile) { + LogAvailable=1; + logfilename=LogFile; + + file=fopen(logfilename, "a+"); + + /* We have first entry in this session and too large file */ + if (fread( buffer2, 1, 50000,file )==50000) { + fclose(file); + file=fopen(logfilename, "w"); + } + } + } else { + if (LogAvailable==1) { + file=fopen(logfilename, "a"); + } + } + + if (LogAvailable==1) { + for (i=0;i +#include +#include +#include +#include + +#include "gsm-common.h" +#include "gsm-bitmaps.h" +#include "gsm-sms.h" +#include "gsm-coding.h" +#include "gsm-networks.h" + +void GSM_SetPointBitmap(GSM_Bitmap *bmp, int x, int y) +{ + int pixel; + if (bmp->type == GSM_StartupLogo || bmp->type == GSM_6210StartupLogo || bmp->type == GSM_7110StartupLogo) + bmp->bitmap[((y/8)*bmp->width)+x] |= 1 << (y%8); + if (bmp->type == GSM_OperatorLogo || bmp->type == GSM_7110OperatorLogo || bmp->type == GSM_CallerLogo) { + pixel=bmp->width*y + x; + bmp->bitmap[pixel/8] |= 1 << (7-(pixel%8)); + } + if (bmp->type == GSM_PictureImage) bmp->bitmap[9*y + (x/8)] |= 1 << (7-(x%8)); +} + +void GSM_ClearPointBitmap(GSM_Bitmap *bmp, int x, int y) +{ + int pixel; + if (bmp->type == GSM_StartupLogo || bmp->type == GSM_6210StartupLogo || bmp->type == GSM_7110StartupLogo) + bmp->bitmap[((y/8)*bmp->width)+x] &= 255 - (1 << (y%8)); + if (bmp->type == GSM_OperatorLogo || bmp->type == GSM_7110OperatorLogo || bmp->type == GSM_CallerLogo) { + pixel=bmp->width*y + x; + bmp->bitmap[pixel/8] &= ~(1 << (7-(pixel%8))); + } + if (bmp->type == GSM_PictureImage) bmp->bitmap[9*y + (x/8)] &= 255 - (1 << (7-(x%8))); +} + +bool GSM_IsPointBitmap(GSM_Bitmap *bmp, int x, int y) +{ + int i=0; + int pixel; + + if (bmp->type == GSM_StartupLogo || bmp->type == GSM_6210StartupLogo || bmp->type == GSM_7110StartupLogo) + i=(bmp->bitmap[((y/8)*bmp->width) + x] & 1<<((y%8))); + if (bmp->type == GSM_OperatorLogo || bmp->type == GSM_7110OperatorLogo || bmp->type == GSM_CallerLogo) { + pixel=bmp->width*y + x; + i=(bmp->bitmap[pixel/8] & 1<<(7-(pixel%8))); + } + if (bmp->type == GSM_PictureImage) i=(bmp->bitmap[9*y + (x/8)] & 1<<(7-(x%8))); + + if (i) return true; else return false; +} + +void GSM_ClearBitmap(GSM_Bitmap *bmp) +{ + int i; + for (i=0;isize;i++) bmp->bitmap[i]=0; +} + +int GSM_GetBitmapSize(GSM_Bitmap *bitmap) +{ + switch (bitmap->type) { + case GSM_StartupLogo : /*size 84*48*/ + case GSM_OperatorLogo : /*size 72*14*/ + case GSM_CallerLogo : /*size 72*14*/ + case GSM_PictureImage : /*size 72*28*/ + return bitmap->height*bitmap->width/8; + + case GSM_7110OperatorLogo: /*size 78*21*/ + return (bitmap->width*bitmap->height + 7)/8; + + case GSM_7110StartupLogo: /*size 96*65*/ + case GSM_6210StartupLogo: /*size 96*60*/ + return (bitmap->height+7)/8*bitmap->width; + + default: + return 0; + } +} + +GSM_Error GSM_ReadBitmap(GSM_SMSMessage *message, GSM_Bitmap *bitmap) +{ + int offset = 1; + unsigned char buffer[20]; + + switch (message->UDHType) { + case GSM_OpLogo: + EncodeUDHHeader(buffer, GSM_OperatorLogo); + if (message->Length!=133) return GE_UNKNOWN; + + bitmap->type = GSM_OperatorLogo; + + DecodeNetworkCode(message->MessageText, bitmap->netcode); + + offset = 4; + break; + + case GSM_CallerIDLogo: + EncodeUDHHeader(buffer, GSM_CallerLogo); + if (message->Length!=130) return GE_UNKNOWN; + + bitmap->type=GSM_CallerLogo; + + break; + default: /* error */ + return GE_UNKNOWN; + break; + } + bitmap->width = message->MessageText[offset]; + bitmap->height = message->MessageText[offset + 1]; + + if (bitmap->width!=72 || bitmap->height!=14) return GE_INVALIDIMAGESIZE; + + bitmap->size = GSM_GetBitmapSize(bitmap); + memcpy(bitmap->bitmap, message->MessageText + offset + 3, bitmap->size); + +#ifdef DEBUG + fprintf(stdout, _("Bitmap from SMS: width %i, height %i\n"),bitmap->width,bitmap->height); +#endif + + return GE_NONE; +} + +void GSM_ResizeBitmap(GSM_Bitmap *bitmap, GSM_Bitmap_Types target) +{ + GSM_Bitmap backup; + int x,y,width,height; + + backup=*bitmap; + + if (target==GSM_StartupLogo) { + bitmap->width=84; + bitmap->height=48; + } + if (target==GSM_7110StartupLogo) { + bitmap->width=96; + bitmap->height=65; + } + if (target==GSM_6210StartupLogo) { + bitmap->width=96; + bitmap->height=60; + } + if (target==GSM_OperatorLogo || target==GSM_CallerLogo) { + bitmap->width=72; + bitmap->height=14; + } + if (target==GSM_PictureImage ) { + bitmap->width=72; + bitmap->height=28; + } + if (target==GSM_7110OperatorLogo) { + bitmap->width=78; + bitmap->height=21; + } + bitmap->type=target; + bitmap->size=GSM_GetBitmapSize(bitmap); + + width=backup.width; + if (bitmap->widthwidth; +#ifdef DEBUG + fprintf(stdout,_("We lost some part of image - it's cut (width from %i to %i) !\n"),backup.width,width); +#endif /* DEBUG */ + } + + height=backup.height; + if (bitmap->heightheight; +#ifdef DEBUG + fprintf(stdout,_("We lost some part of image - it's cut (height from %i to %i) !\n"),backup.height,height); +#endif /* DEBUG */ + } + + GSM_ClearBitmap(bitmap); + + for (y=0;yheight;y++) { + for (x=0;xwidth;x++) { + if (GSM_IsPointBitmap(bitmap,x,y)) { + fprintf(stdout, _("#")); + } else { + fprintf(stdout, _(" ")); + } + } + fprintf(stdout, _("\n")); + } +} + +int GSM_SaveBitmapToSMS(GSM_MultiSMSMessage *SMS, GSM_Bitmap *bitmap, + bool ScreenSaver, bool UnicodeText) +{ + char MessageBuffer[GSM_MAX_SMS_8_BIT_LENGTH*4]; + int MessageLength=0; + GSM_UDH UDHType=GSM_NoUDH; + + switch (bitmap->type) { + case GSM_OperatorLogo: + UDHType=GSM_OpLogo; + + EncodeNetworkCode(MessageBuffer, bitmap->netcode); + MessageLength=3; + + /* Set the logo size */ + MessageBuffer[MessageLength++] = 0x00; + MessageBuffer[MessageLength++] = bitmap->width; + MessageBuffer[MessageLength++] = bitmap->height; + MessageBuffer[MessageLength++] = 0x01; + + memcpy(MessageBuffer+MessageLength,bitmap->bitmap,bitmap->size); + MessageLength=MessageLength+bitmap->size; + + break; + case GSM_CallerLogo: + UDHType=GSM_CallerIDLogo; + + /* Set the logo size */ + MessageBuffer[MessageLength++] = 0x00; + MessageBuffer[MessageLength++] = bitmap->width; + MessageBuffer[MessageLength++] = bitmap->height; + MessageBuffer[MessageLength++] = 0x01; + + memcpy(MessageBuffer+MessageLength,bitmap->bitmap,bitmap->size); + MessageLength=MessageLength+bitmap->size; + + break; + case GSM_PictureImage: + UDHType=GSM_ProfileUDH; + + MessageBuffer[MessageLength++]=0x30; //SM version. Here 3.0 + + if (!ScreenSaver) + MessageBuffer[MessageLength++]=SM30_OTA; //ID for OTA bitmap + else + MessageBuffer[MessageLength++]=SM30_SCREENSAVER; //ID for screen saver + + /* Length for picture part */ + MessageBuffer[MessageLength++]=0x01; //length hi + MessageBuffer[MessageLength++]=0x00; //length lo + + /* Set the logo size */ + MessageBuffer[MessageLength++] = 0x00; + MessageBuffer[MessageLength++] = bitmap->width; + MessageBuffer[MessageLength++] = bitmap->height; + MessageBuffer[MessageLength++] = 0x01; + + memcpy(MessageBuffer+MessageLength,bitmap->bitmap,bitmap->size); + MessageLength=MessageLength+bitmap->size; + + if (strlen(bitmap->text)!=0) { + if (UnicodeText) { + MessageBuffer[MessageLength++]=SM30_UNICODETEXT; //ID for Unicode text + + /* Length for text part */ + MessageBuffer[MessageLength++]=0x00; //length of text1 + MessageBuffer[MessageLength++]=strlen(bitmap->text)*2;//length of text2 + + EncodeUnicode (MessageBuffer+MessageLength,bitmap->text,strlen(bitmap->text)); + MessageLength=MessageLength+2*strlen(bitmap->text); + } else { + MessageBuffer[MessageLength++]=SM30_ISOTEXT; //ID for ISO-8859-1 text + + /* Length for text part */ + MessageBuffer[MessageLength++]=0x00; //length of text1 + MessageBuffer[MessageLength++]=strlen(bitmap->text); //length of text2 + + memcpy(MessageBuffer+MessageLength,bitmap->text,strlen(bitmap->text)); + MessageLength=MessageLength+strlen(bitmap->text); + } + } + break; + + default: /* error */ + break; + } + + GSM_MakeMultiPartSMS2(SMS,MessageBuffer,MessageLength, UDHType, GSM_Coding_Default); + + return 0; +} + diff --git a/common/gsm-calendar.c b/common/gsm-calendar.c new file mode 100644 index 0000000..eadaff6 --- /dev/null +++ b/common/gsm-calendar.c @@ -0,0 +1,162 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Functions for manipulating calendar + +*/ + +#include +#include +#include +#include +#include + +#ifdef WIN32 + #include "misc_win32.h" +#else + #include +#endif + +#include "gsm-api.h" +#include "gsm-coding.h" + +char *GSM_GetVCALENDARStart(int version) { + + static char Buffer[1000]=""; + int len=0; + + len+=sprintf(Buffer, "BEGIN:VCALENDAR%c%c",13,10); + + if (version==10) sprintf(Buffer+len, "VERSION:1.0%c%c",13,10); + if (version==30) sprintf(Buffer+len, "VERSION:3.0%c%c",13,10); + + return Buffer; +} + +char *GSM_GetVCALENDARNote(GSM_CalendarNote *note, int version) { + + static char Buffer[1000]=""; + + int len=0; + + u8 buffer[50*3]; + + len+=sprintf(Buffer+len, "BEGIN:VEVENT%c%c",13,10); + len+=sprintf(Buffer+len, "CATEGORIES:"); + switch (note->Type) { + case GCN_REMINDER: + len+=sprintf(Buffer+len, "MISCELLANEOUS%c%c",13,10); + break; + case GCN_CALL: + len+=sprintf(Buffer+len, "PHONE CALL%c%c",13,10); + break; + case GCN_MEETING: + len+=sprintf(Buffer+len, "MEETING%c%c",13,10); + break; + case GCN_BIRTHDAY: + len+=sprintf(Buffer+len, "SPECIAL OCCASION%c%c",13,10); + break; + default: + len+=sprintf(Buffer+len, "UNKNOWN%c%c",13,10); + break; + } + + if( note->Type == GCN_CALL && strcmp( note->Phone, "" ) ) { + + if (note->Text[0]!=0 && version==30) + len+=sprintf(Buffer+len, "DESCRIPTION:%s%c%c",note->Text,13,10); + + EncodeUTF8(buffer,note->Phone,strlen(note->Phone)); + if (strlen(note->Phone)==strlen(buffer)) { + len+=sprintf(Buffer+len, "SUMMARY:%s%c%c",note->Phone,13,10); + } else { + len+=sprintf(Buffer+len, "SUMMARY;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:%s%c%c",buffer,13,10); + } + + } else { + + EncodeUTF8(buffer,note->Text,strlen(note->Text)); + if (strlen(note->Text)==strlen(buffer)) { + len+=sprintf(Buffer+len, "SUMMARY:%s%c%c",note->Text,13,10); + } else { + len+=sprintf(Buffer+len, "SUMMARY;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:%s%c%c",buffer,13,10); + } + + } + + /* For 3310: date is set to 2090! */ + if (GetModelFeature (FN_CALENDAR)==F_CAL33) { + len+=sprintf(Buffer+len, "DTSTART:1999%02d%02dT%02d%02d%02d%c%c", + note->Time.Month, note->Time.Day, note->Time.Hour, + note->Time.Minute, note->Time.Second,13,10); + } else { + len+=sprintf(Buffer+len, "DTSTART:%04d%02d%02dT%02d%02d%02d%c%c", note->Time.Year, + note->Time.Month, note->Time.Day, note->Time.Hour, + note->Time.Minute, note->Time.Second,13,10); + } + + if (note->Alarm.Year!=0) { + len+=sprintf(Buffer+len, "DALARM:%04d%02d%02dT%02d%02d%02d%c%c", note->Alarm.Year, + note->Alarm.Month, note->Alarm.Day, note->Alarm.Hour, + note->Alarm.Minute, note->Alarm.Second,13,10); + } + + if ( GetModelFeature (FN_CALENDAR)==F_CAL71 && version==30 && note->Type == GCN_BIRTHDAY ) { + len+=sprintf(Buffer+len, "ALTYPE:%s%c%c", (note->AlarmType==0x00) ? + "TONE" : "SILENT",13,10); + } + + if ( GetModelFeature (FN_CALENDAR)==F_CAL71 && note->Recurrance!= 0 ) { + switch(note->Recurrance/24) { + case 1 :len+=sprintf(Buffer+len, "RRULE:D1 #0%c%c",13,10);break; + case 7 :len+=sprintf(Buffer+len, "RRULE:W1 #0%c%c",13,10);break; + case 14 :len+=sprintf(Buffer+len, "RRULE:W2 #0%c%c",13,10);break; + case 365:len+=sprintf(Buffer+len, "RRULE:YD1 #0%c%c",13,10);break; + } + } + + len+=sprintf(Buffer+len, "END:VEVENT%c%c",13,10); + + return Buffer; +} + +char *GSM_GetVCALENDAREnd(int version) { + + static char Buffer[1000]=""; + + sprintf(Buffer, "END:VCALENDAR%c%c",13,10); + + return Buffer; +} + +int GSM_SaveCalendarNoteToSMS(GSM_MultiSMSMessage *SMS, + GSM_CalendarNote *note) +{ + char Buffer[1000]=""; + int length; + GSM_UDH UDH=GSM_NoUDH; + + sprintf(Buffer,GSM_GetVCALENDARStart(10)); + sprintf(Buffer+strlen(Buffer),GSM_GetVCALENDARNote(note,10)); + sprintf(Buffer+strlen(Buffer),GSM_GetVCALENDAREnd(10)); + + /* 1 SMS: no UDH */ + if (strlen(Buffer)<=160-8) { //8==length of ..SCKE4. + sprintf(Buffer,"//SCKE4 "); + sprintf(Buffer+strlen(Buffer),GSM_GetVCALENDARStart(10)); + sprintf(Buffer+strlen(Buffer),GSM_GetVCALENDARNote(note,10)); + sprintf(Buffer+strlen(Buffer),GSM_GetVCALENDAREnd(10)); + } else { + UDH=GSM_CalendarNoteUDH; + } + + length=strlen(Buffer); + GSM_MakeMultiPartSMS2(SMS,Buffer,length, UDH, GSM_Coding_Default); + + return 0; +} diff --git a/common/gsm-coding.c b/common/gsm-coding.c new file mode 100644 index 0000000..c9f0e18 --- /dev/null +++ b/common/gsm-coding.c @@ -0,0 +1,483 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#include +#include + +#include "gsm-common.h" +#include "gsm-coding.h" + +#ifdef WIN32 + #include +#else + #include "devices/device.h" +#endif + +/* Coding functions */ +#define NUMBER_OF_7_BIT_ALPHABET_ELEMENTS 128 + +#ifndef USE_NLS + static unsigned char GSM_DefaultAlphabet[NUMBER_OF_7_BIT_ALPHABET_ELEMENTS] = { + + /* ETSI GSM 03.38, version 6.0.1, section 6.2.1; Default alphabet */ + /* Generally table shows chars in Latin 1, but not only - Greek + chars are visible correctly in ... */ + + '@', 0xa3, '$', 0xa5, 0xe8, 0xe9, 0xf9, 0xec, // 0x08 + 0xf2, 0xc7, '\n', 0xd8, 0xf8, '\r', 0xc5, 0xe5, + +/* from v13@priest.com codes for Greek chars. Not confirmed and commented */ +// 0xc4, '_' , 0xd6, 0xc3, 0xcb, 0xd9, 0xd0, 0xd8, +// 0xd3, 0xc8, 0xce, 0xcb, 0xc6, 0xe6, 0xdf, 0xc9, // 0x20 + + '?', '_', '?', '?', '?', '?', '?', '?', + '?', '?', '?', '?', 0xc6, 0xe6, 0xdf, 0xc9, // 0x20 + ' ', '!', '\"', '#', 0xa4, '%', '&', '\'', + '(', ')', '*', '+', ',', '-', '.', '/', // 0x30 + '0', '1', '2', '3', '4', '5', '6', '7', + '8', '9', ':', ';', '<', '=', '>', '?', // 0x40 + 0xa1, 'A', 'B', 'C', 'D', 'E', 'F', 'G', + 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', + 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', + 'X', 'Y', 'Z', 0xc4, 0xd6, 0xd1, 0xdc, 0xa7, + 0xbf, 'a', 'b', 'c', 'd', 'e', 'f', 'g', + 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', + 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', + 'x', 'y', 'z', 0xe4, 0xf6, 0xf1, 0xfc, 0xe0 + }; + + #ifndef WIN32 + /*Simple UNICODE decoding and encoding from/to iso-8859-2 + First version prepared by Martin Kacer + + Following table contains triplets: + first unicode byte, second unicode byte, iso-8859-2 character*/ + unsigned char unicode_table[][3] = + { + /* C< D< E< N< R< S< T< Uo Z< */ + {0x01, 0x0C, 0xC8}, {0x01, 0x0E, 0xCF}, {0x01, 0x1A, 0xCC}, + {0x01, 0x47, 0xD2}, {0x01, 0x58, 0xD8}, {0x01, 0x60, 0xA9}, + {0x01, 0x64, 0xAB}, {0x01, 0x6E, 0xD9}, {0x01, 0x7D, 0xAE}, + /* c< d< e< n< r< s< t< uo z< */ + {0x01, 0x0D, 0xE8}, {0x01, 0x0F, 0xEF}, {0x01, 0x1B, 0xEC}, + {0x01, 0x48, 0xF2}, {0x01, 0x59, 0xF8}, {0x01, 0x61, 0xB9}, + {0x01, 0x65, 0xBB}, {0x01, 0x6F, 0xF9}, {0x01, 0x7E, 0xBE}, + /* A< A, C' D/ E, L< L' L/ */ + {0x01, 0x02, 0xC3}, {0x01, 0x04, 0xA1}, {0x01, 0x06, 0xC6}, + {0x01, 0x10, 0xD0}, {0x01, 0x18, 0xCA}, {0x01, 0x3D, 0xA5}, + {0x01, 0x39, 0xC5}, {0x01, 0x41, 0xA3}, + /* N' O" R' S' S, T, U" Z' Z. */ + {0x01, 0x43, 0xD1}, {0x01, 0x50, 0xD5}, {0x01, 0x54, 0xC0}, + {0x01, 0x5A, 0xA6}, {0x01, 0x5E, 0xAA}, {0x01, 0x62, 0xDE}, + {0x01, 0x70, 0xDB}, {0x01, 0x79, 0xAC}, {0x01, 0x7B, 0xAF}, + /* a< a, c' d/ e, l< l' l/ */ + {0x01, 0x03, 0xE3}, {0x01, 0x05, 0xB1}, {0x01, 0x07, 0xE6}, + {0x01, 0x11, 0xF0}, {0x01, 0x19, 0xEA}, {0x01, 0x3E, 0xB5}, + {0x01, 0x3A, 0xE5}, {0x01, 0x42, 0xB3}, + /* n' o" r' s' s, t, u" z' z. */ + {0x01, 0x44, 0xF1}, {0x01, 0x51, 0xF5}, {0x01, 0x55, 0xE0}, + {0x01, 0x5B, 0xB6}, {0x01, 0x5F, 0xBA}, {0x01, 0x63, 0xFE}, + {0x01, 0x71, 0xFB}, {0x01, 0x7A, 0xBC}, {0x01, 0x7C, 0xBF}, + + {0x00, 0x00, 0x00} + }; + #else + unsigned char unicode_table[][3] = + { + + /* o' */ + {0x00, 0xF3, 0xA2}, + + /* O' */ + {0x00, 0xD3, 0xE0}, + + /* A, C' E, L/ */ + {0x01, 0x04, 0xA4}, {0x01, 0x06, 0x8F}, + {0x01, 0x18, 0xA8}, + {0x01, 0x41, 0x9D}, + /* N' S' Z' Z. */ + {0x01, 0x43, 0xE3}, + {0x01, 0x5A, 0x97}, + {0x01, 0x79, 0x8D}, {0x01, 0x7B, 0xBD}, + /* a, c' e, l/ */ + {0x01, 0x05, 0xA5}, {0x01, 0x07, 0x86}, + {0x01, 0x19, 0xA9}, + {0x01, 0x42, 0x88}, + /* n' s' z' z. */ + {0x01, 0x44, 0xE4}, + {0x01, 0x5B, 0x98}, + {0x01, 0x7A, 0xAB}, {0x01, 0x7C, 0xBE}, + + {0x00, 0x00, 0x00} + }; + #endif + +unsigned char EncodeWithDefaultAlphabet(unsigned char value) +{ + unsigned char i; + + if (value == '?') return 0x3f; + + for (i = 0; i < NUMBER_OF_7_BIT_ALPHABET_ELEMENTS; i++) + if (GSM_DefaultAlphabet[i] == value) + return i; + + return '?'; +} + +unsigned char DecodeWithDefaultAlphabet(unsigned char value) +{ + return GSM_DefaultAlphabet[value]; +} + +wchar_t EncodeWithUnicodeAlphabet(unsigned char value) +{ + wchar_t retval; + + int j; + + /*If character is not found, first unicode byte is set to zero + and second one is the same as iso-8859-2 character*/ + retval = value | (0x00 << 8); + + for ( j = 0; unicode_table[j][2] != 0x00; ++j ) + if ( value == unicode_table[j][2] ) + { + retval = unicode_table[j][1] | (unicode_table[j][0] << 8); + break; + } + + return retval; +} + +unsigned char DecodeWithUnicodeAlphabet(wchar_t value) +{ + unsigned char retval; + + int j; + + retval=value & 0xff; /* default is to cut off the first byte */ + + for ( j = 0; unicode_table[j][2] != 0x00; ++j ) + if (((value >> 8) & 0xff) == unicode_table[j][0] && + (value & 0xff) == unicode_table[j][1] ) { + retval = unicode_table[j][2]; + break; + } + + return retval; +} + +#else + + /* ETSI GSM 03.38, version 6.0.1, section 6.2.1; Default alphabet */ + unsigned char GSM_DefaultAlphabetUnicode[NUMBER_OF_7_BIT_ALPHABET_ELEMENTS+1][2] = + { + {0x00,0x40},{0x00,0xa3},{0x00,0x24},{0x00,0xA5}, + {0x00,0xE8},{0x00,0xE9},{0x00,0xF9},{0x00,0xEC},//0x08 + {0x00,0xF2},{0x00,0xC7},{0x00,'\n'},{0x00,0xD8}, + {0x00,0xD9},{0x00,'\r'},{0x00,0xC5},{0x00,0xE5}, + {0x03,0x94},{0x00,0xb9}/*not exactly, but*/,{0x03,0xA6},{0x03,0x93}, + {0x03,0x9B},{0x03,0xA9},{0x03,0xA0},{0x03,0xA8}, + {0x03,0xA3},{0x03,0x98},{0x03,0x9E},{0x00,0xb9},/*not exactly, but*/ + {0x00,0xC6},{0x00,0xE6},{0x00,0xDF},{0x00,0xC9},//0x20 + {0x00,' ' },{0x00,'!' },{0x00,'\"'},{0x00,'#' }, + {0x00,0xA4},{0x00,'%' },{0x00,'&' },{0x00,'\''}, + {0x00,'(' },{0x00,')' },{0x00,'*' },{0x00,'+' }, + {0x00,',' },{0x00,'-' },{0x00,'.' },{0x00,'/' }, //0x30 + {0x00,'0' },{0x00,'1' },{0x00,'2' },{0x00,'3' }, + {0x00,'4' },{0x00,'5' },{0x00,'6' },{0x00,'7' }, + {0x00,'8' },{0x00,'9' },{0x00,':' },{0x00,';' }, + {0x00,'<' },{0x00,'=' },{0x00,'>' },{0x00,'?' }, //0x40 + {0x00,0xA1},{0x00,'A' },{0x00,'B' },{0x00,'C' }, + {0x00,'D' },{0x00,'E' },{0x00,'F' },{0x00,'G' }, + {0x00,'H' },{0x00,'I' },{0x00,'J' },{0x00,'K' }, + {0x00,'L' },{0x00,'M' },{0x00,'N' },{0x00,'O' }, + {0x00,'P' },{0x00,'Q' },{0x00,'R' },{0x00,'S' }, + {0x00,'T' },{0x00,'U' },{0x00,'V' },{0x00,'W' }, + {0x00,'X' },{0x00,'Y' },{0x00,'Z' },{0x00,0xC4}, + {0x00,0xD6},{0x00,0xD1},{0x00,0xDC},{0x00,0xA7}, + {0x00,0xBF},{0x00,'a' },{0x00,'b' },{0x00,'c' }, + {0x00,'d' },{0x00,'e' },{0x00,'f' },{0x00,'g' }, + {0x00,'h' },{0x00,'i' },{0x00,'j' },{0x00,'k' }, + {0x00,'l' },{0x00,'m' },{0x00,'n' },{0x00,'o' }, + {0x00,'p' },{0x00,'q' },{0x00,'r' },{0x00,'s' }, + {0x00,'t' },{0x00,'u' },{0x00,'v' },{0x00,'w' }, + {0x00,'x' },{0x00,'y' },{0x00,'z' },{0x00,0xE4}, + {0x00,0xF6},{0x00,0xF1},{0x00,0xFC},{0x00,0xE0}, + {0x00,0x00} + }; + +unsigned char EncodeWithDefaultAlphabet(unsigned char value) +{ + unsigned char i; + + wchar_t value2; + + if (value == '?') return 0x3f; + + for (i = 0; i < NUMBER_OF_7_BIT_ALPHABET_ELEMENTS; i++) { + + value2 = GSM_DefaultAlphabetUnicode[i][1] | ( GSM_DefaultAlphabetUnicode[i][0] << 8); + + if (EncodeWithUnicodeAlphabet(value) == value2) + return i; + } + + return '?'; +} + +unsigned char DecodeWithDefaultAlphabet(unsigned char value) +{ + wchar_t value2; + + value2 = GSM_DefaultAlphabetUnicode[value][1] | ( GSM_DefaultAlphabetUnicode[value][0] << 8); + + return DecodeWithUnicodeAlphabet(value2); +} + +wchar_t EncodeWithUnicodeAlphabet(unsigned char value) +{ + wchar_t retval; + + if (mbtowc(&retval, &value, 1) == -1) return '?'; + else return retval; +} + +unsigned char DecodeWithUnicodeAlphabet(wchar_t value) +{ + unsigned char retval; + + if (wctomb(&retval, value) == -1) return '?'; + else return retval; +} + +#endif + +void DecodeDefault (unsigned char* dest, const unsigned char* src, int len) +{ + int i; + + for (i = 0; i < len; i++) + dest[i] = DecodeWithDefaultAlphabet(src[i]); + dest[len]=0; +} + +void EncodeDefault (unsigned char* dest, const unsigned char* src, int len) +{ + int i; + + for (i = 0; i < len; i++) + dest[i] = EncodeWithDefaultAlphabet(src[i]); + return; +} + +void DecodeUnicode (unsigned char* dest, const unsigned char* src, int len) +{ + int i; + wchar_t wc; + + for (i = 0; i < len; i++) { + wc = src[(2*i)+1] | (src[2*i] << 8); + dest[i] = DecodeWithUnicodeAlphabet(wc); + } + dest[len]=0; + return; +} + +void EncodeUnicode (unsigned char* dest, const unsigned char* src, int len) +{ + int i; + wchar_t wc; + + for (i = 0; i < len; i++) { + wc = EncodeWithUnicodeAlphabet(src[i]); + dest[i*2] = (wc >> 8) &0xff; + dest[(i*2)+1] = wc & 0xff; + } +} + +bool EncodeWithUTF8Alphabet(u8 mychar, u8 *ret1, u8 *ret2) +{ + u8 mychar1,mychar2,mychar3,mychar4; + int j=0; + + mychar1=((EncodeWithUnicodeAlphabet(mychar)>>8)&0xff); + mychar2=EncodeWithUnicodeAlphabet(mychar)&0xff; + if (mychar1>0x00 || mychar2>128) { + mychar3=0x00; + mychar4=128; + while (true) { + if (mychar3==mychar1) { + if (mychar4+64>=mychar2) { + *ret1=j+0xc2; + *ret2=0x80+(mychar2-mychar4); + return true; + } + } + if (mychar4==192) { + mychar3++; + mychar4=0; + } else { + mychar4=mychar4+64; + } + j++; + } + } + return false; +} + +void DecodeWithUTF8Alphabet(u8 mychar3, u8 mychar4, u8 *ret) +{ + u8 mychar1, mychar2; + int j; + wchar_t wc; + + mychar1=0x00; + mychar2=128; + for(j=0;j=i) { + /* Need to have correct chars */ + if (src[i] =='=' && DecodeWithHexBinAlphabet(src[i+1])!=-1 + && DecodeWithHexBinAlphabet(src[i+2])!=-1 && + src[i+3]=='=' && DecodeWithHexBinAlphabet(src[i+4])!=-1 && + DecodeWithHexBinAlphabet(src[i+5])!=-1) { + mychar1=16*DecodeWithHexBinAlphabet(src[i+1])+DecodeWithHexBinAlphabet(src[i+2]); + mychar2=16*DecodeWithHexBinAlphabet(src[i+4])+DecodeWithHexBinAlphabet(src[i+5]); + DecodeWithUTF8Alphabet(mychar1,mychar2,&ret); + i=i+5; + dest[j++]=ret; + } else { + dest[j++]=src[i]; + } + } else { + dest[j++]=src[i]; + } + i++; + } + dest[j++]=0; +} + +int DecodeWithHexBinAlphabet (unsigned char mychar) { + if (mychar>='A' && mychar<='F') return mychar-'A'+10; + if (mychar>='a' && mychar<='f') return mychar-'a'+10; + if (mychar>='0' && mychar<='9') return mychar-'0'; + return -1; +} + +unsigned char EncodeWithHexBinAlphabet (int digit) { + if (digit >= 0 && digit <= 9) return '0'+(digit); + if (digit >=10 && digit <=15) return 'A'+(digit-10); + return 0; +} + +void DecodeHexBin (unsigned char* dest, const unsigned char* src, int len) +{ + int i,current=0; + + for (i = 0; i < len/2 ; i++) { + dest[current++]=DecodeWithHexBinAlphabet(src[i*2])*16+ + DecodeWithHexBinAlphabet(src[i*2+1]); + } + dest[current++]=0; +} + +void EncodeHexBin (unsigned char* dest, const unsigned char* src, int len) +{ + int i,current=0; + + for (i = 0; i < len; i++) { + dest[current++]=EncodeWithHexBinAlphabet(src[i] >> 0x04); + dest[current++]=EncodeWithHexBinAlphabet(src[i] & 0x0f); + } +} + +void DecodeBCD (unsigned char* dest, const unsigned char* src, int len) +{ + int i,current=0,digit; + + for (i = 0; i < len; i++) { + digit=src[i] & 0x0f; + if (digit<10) dest[current++]=digit + '0'; + digit=src[i] >> 4; + if (digit<10) dest[current++]=digit + '0'; + } + dest[current++]=0; +} + +void EncodeBCD (unsigned char* dest, const unsigned char* src, int len, bool fill) +{ + int i,current=0; + + for (i = 0; i < len; i++) { + if (i & 0x01) { + dest[current]=dest[current] | ((src[i]-'0') << 4); + current++; + } else { + dest[current]=src[i]-'0'; + } + } + + /* When fill is set: we fill in the most significant bits of the + last byte with 0x0f (1111 binary) if the number is represented + with odd number of digits. */ + if (fill && (len & 0x01)) { + dest[current]=dest[current] | 0xf0; + } +} + +unsigned char EncodeWithBCDAlphabet(int value) +{ + div_t division; + + division=div(value,10); + return ( ( (value-division.quot*10) & 0x0f) << 4) | (division.quot & 0xf); +} + +int DecodeWithBCDAlphabet(unsigned char value) +{ + return 10*(value & 0x0f)+(value >> 4); +} diff --git a/common/gsm-datetime.c b/common/gsm-datetime.c new file mode 100644 index 0000000..274e640 --- /dev/null +++ b/common/gsm-datetime.c @@ -0,0 +1,88 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#include +#include + +#include "misc.h" +#include "gsm-datetime.h" +#include "gsm-common.h" + +char DayOfWeekChar; + +/* Based on article in Polish PC-Kurier 8/1998 page 104 */ +/* Archive on http://www.pckurier.pl */ +char *DayOfWeek (int year, int month, int day) { + int p,q,r,w; + + p=(14-month) / 12; + q=month+12*p-2; + r=year-p; + w=(day+(31*q) / 12 + r + r / 4 - r / 100 + r / 400) % 7; + strcpy(&DayOfWeekChar,""); + switch (w) { + case 0: strcpy(&DayOfWeekChar,"Sun"); break; + case 1: strcpy(&DayOfWeekChar,"Mon"); break; + case 2: strcpy(&DayOfWeekChar,"Tue"); break; + case 3: strcpy(&DayOfWeekChar,"Wed"); break; + case 4: strcpy(&DayOfWeekChar,"Thu"); break; + case 5: strcpy(&DayOfWeekChar,"Fri"); break; + case 6: strcpy(&DayOfWeekChar,"Sat"); break; + } + return &DayOfWeekChar; +} + +/* GetMachineDateTime ---------------------------------------------------------- +Purpose: Gets system date and time. +Use: - +Input: - +Output: date - System date in the format "aaaa-mm-gg". + time - System time in the format "hh:mm:ss". +Return: - +----------------------------------------------------------------------------- */ +void GetMachineDateTime( char nowdate[], char nowtime[] ) +{ + struct tm *now; + time_t nowh; + + nowh=time(NULL); + now=localtime(&nowh); + + /* I have 100 (for 2000) Year now :-) */ + if (now->tm_year>99 && now->tm_year<1900) { + now->tm_year=now->tm_year+1900; + } + + sprintf(nowdate,"%04d-%02d-%02d",now->tm_year,now->tm_mon+1,now->tm_mday); + sprintf(nowtime, "%02d:%02d:%02d",now->tm_hour,now->tm_min,now->tm_sec); + +} + +void EncodeDateTime(unsigned char* buffer, GSM_DateTime *datetime) +{ + buffer[0] = datetime->Year / 256; + buffer[1] = datetime->Year % 256; + buffer[2] = datetime->Month; + buffer[3] = datetime->Day; + + buffer[4] = datetime->Hour; + buffer[5] = datetime->Minute; +} + +void DecodeDateTime(unsigned char* buffer, GSM_DateTime *datetime) +{ + datetime->Year = buffer[0] * 256 + buffer[1]; + datetime->Month = buffer[2]; + datetime->Day = buffer[3]; + + datetime->Hour = buffer[4]; + datetime->Minute = buffer[5]; + datetime->Second = buffer[6]; +} diff --git a/common/gsm-networks.c b/common/gsm-networks.c new file mode 100644 index 0000000..4101a38 --- /dev/null +++ b/common/gsm-networks.c @@ -0,0 +1,482 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This file implements GSM networks searching. + +*/ + +#include + +#include "gsm-common.h" +#include "gsm-networks.h" +#include "gsm-coding.h" + +GSM_Country GSM_Countries[] = +{ + { "202", "Greece" }, + { "204", "Netherlands" }, + { "206", "Belgium" }, + { "208", "France" }, + { "213", "Andorra" }, + { "214", "Spain" }, + { "216", "Hungary" }, + { "218", "Bosnia Herzegovina" }, + { "219", "Croatia" }, + { "220", "Yugoslavia" }, + { "222", "Italy" }, + { "226", "Romania" }, + { "228", "Switzerland" }, + { "230", "Czech Republic" }, + { "231", "Slovak Republic" }, + { "232", "Austria" }, + { "234", "United Kingdom" }, + { "238", "Denmark" }, + { "240", "Sweden" }, + { "242", "Norway" }, + { "244", "Finland" }, + { "246", "Lithuania" }, + { "247", "Latvia" }, + { "248", "Estonia" }, + { "250", "Russia" }, + { "255", "Ukraine" }, + { "259", "Moldova" }, + { "260", "Poland" }, + { "262", "Germany" }, + { "266", "Gibraltar" }, + { "268", "Portugal" }, + { "270", "Luxembourg" }, + { "272", "Ireland" }, + { "274", "Iceland" }, + { "276", "Albania" }, + { "278", "Malta" }, + { "280", "Cyprus" }, + { "282", "Georgia" }, + { "283", "Armenia" }, + { "284", "Bulgaria" }, + { "286", "Turkey" }, + { "290", "Greenland" }, + { "293", "Slovenia" }, + { "294", "Macedonia" }, + { "302", "Canada" }, + { "310", "Papua New Guinea" }, + { "310", "U.S.A." }, + { "340", "French West Indies" }, + { "400", "Azerbaijan" }, + { "404", "India" }, + { "410", "Pakistan" }, + { "413", "Sri Lanka" }, + { "415", "Lebanon" }, + { "416", "Jordan" }, + { "417", "Syria" }, + { "418", "Iraq" }, + { "419", "Kuwait" }, + { "420", "Saudi Arabia" }, + { "422", "Oman" }, + { "424", "United Arab Emirates" }, + { "425", "Israel" }, + { "426", "Bahrain" }, + { "427", "Qatar" }, + { "432", "Iran" }, + { "434", "Uzbekistan" }, + { "437", "Kyrgyz Republic" }, + { "452", "Vietnam" }, + { "454", "Hong Kong" }, + { "455", "Macau" }, + { "456", "Cambodia" }, + { "457", "Lao" }, + { "460", "China" }, + { "466", "Taiwan" }, + { "470", "Bangladesh" }, + { "502", "Malaysia" }, + { "505", "Australia" }, + { "510", "Indonesia" }, + { "515", "Philippines" }, + { "520", "Thailand" }, + { "525", "Singapore" }, + { "528", "Brunei Darussalam" }, + { "530", "New Zealand" }, + { "542", "Fiji" }, + { "546", "New Caledonia" }, + { "547", "French Polynesia" }, + { "602", "Egypt" }, + { "603", "Algeria" }, + { "604", "Morocco" }, + { "605", "Tunisia" }, + { "608", "Senegal" }, + { "611", "Guinea" }, + { "612", "Cote d'Ivoire" }, + { "615", "Togo" }, + { "617", "Mauritius" }, + { "618", "Liberia" }, + { "620", "Ghana" }, + { "624", "Cameroon" }, + { "625", "Cape Verde" }, + { "633", "Seychelles" }, + { "634", "Mozambique" }, + { "634", "Sudan" }, + { "635", "Rwanda" }, + { "636", "Ethiopia" }, + { "640", "Tanzania" }, + { "641", "Uganda" }, + { "645", "Zambia" }, + { "646", "Madagascar" }, + { "647", "Reunion" }, + { "648", "Zimbabwe" }, + { "649", "Namibia" }, + { "650", "Malawi" }, + { "651", "Lesotho" }, + { "652", "Botswana" }, + { "655", "South Africa" }, + { "730", "Chile" }, + { "734", "Venezuela" }, + + { "undefined", "unknown" } +}; + +GSM_Network GSM_Networks[] = +{ + { "202 01", "Cosmote" }, + { "202 05", "PANAFON" }, + { "202 10", "TELESTET" }, + { "204 04", "LIBERTEL" }, + { "204 08", "KPN Telecom" }, + { "204 12", "Telfort" }, + { "204 16", "BEN" }, + { "204 20", "Dutchtone NV" }, + { "206 01", "PROXIMUS" }, + { "206 10", "Mobistar" }, + { "208 01", "ITINERIS" }, + { "208 10", "SFR" }, + { "208 20", "Bouygues Telecom" }, + { "213 03", "MOBILAND" }, + { "214 01", "Airtel GSM 900-Spain" }, + { "214 03", "Retevision Movil" }, + { "214 07", "MOVISTAR" }, + { "216 01", "Pannon GSM" }, + { "216 70", "Vodafone" }, + { "216 30", "Westel 900" }, + { "218 90", "GSMBIH" }, + { "219 01", "CRONET" }, + { "219 10", "VIP" }, + { "220 01", "MOBTEL" }, + { "220 02", "ProMonte GSM" }, + { "222 01", "Telecom Italia Mobile" }, + { "222 10", "OMNITEL" }, + { "222 88", "Wind Telecomunicazioni SpA" }, + { "226 01", "CONNEX GSM" }, + { "226 10", "DIALOG" }, + { "228 01", "NATEL International" }, + { "228 02", "diAx Mobile AG" }, + { "230 01", "Paegas" }, + { "230 02", "EuroTel" }, + { "230 03", "Oskar" }, + { "231 01", "Globtel" }, + { "231 02", "EuroTel GSM" }, + { "232 01", "A1" }, + { "232 03", "max.mobil." }, + { "232 05", "ONE" }, + { "232 07", "tele.ring" }, + { "234 10", "Cellnet" }, + { "234 15", "Vodafone" }, + { "234 30", "One 2 One" }, + { "234 33", "ORANGE" }, + { "234 50", "Jersey Telecoms GSM" }, + { "234 55", "Guernsey Telecoms GSM" }, + { "234 58", "PRONTO GSM" }, + { "238 01", "TDK-MOBIL" }, + { "238 02", "SONOFON" }, + { "238 20", "TELIA DK" }, + { "238 30", "Mobilix" }, + { "240 01", "Telia AB" }, + { "240 07", "COMVIQ" }, + { "240 08", "EUROPOLITAN" }, + { "242 01", "Telenor Mobil" }, + { "242 02", "NetCom GSM" }, + { "244 03", "Telia City (Finland)" }, + { "244 05", "Radiolinja" }, + { "244 09", "Finnet" }, + { "244 91", "Sonera" }, + { "246 01", "OMNITEL" }, + { "246 02", "Bite GSM" }, + { "247 01", "LMT LV" }, + { "247 02", "BALTCOM GSM" }, + { "248 01", "EMT GSM" }, + { "248 02", "Radiolinja Eesti AS" }, + { "248 03", "Q GSM" }, + { "250 01", "Mobile Telesystems" }, + { "250 02", "North-West GSM" }, + { "250 05", "Siberian Cellular Systems 900" }, + { "250 07", "BM Telecom" }, + { "250 10", "Don Telecom" }, + { "250 12", "FECS-900" }, + { "250 13", "Kuban GSM" }, + { "250 39", "Uraltel" }, + { "250 44", "North Caucasian GSM" }, + { "250 99", "BeeLine" }, + { "255 01", "UMC" }, + { "255 02", "WellCOM" }, + { "255 03", "Kyivstar" }, + { "255 05", "Golden Telecom" }, + { "259 01", "VOXTEL" }, + { "260 01", "PLUS GSM" }, + { "260 02", "ERA GSM" }, + { "260 03", "IDEA Centertel" }, + { "262 01", "D1 TELEKOM" }, + { "262 02", "D2 PRIVAT" }, + { "262 03", "E-Plus" }, + { "262 07", "Interkom" }, + { "266 01", "Gibtel GSM" }, + { "268 01", "TELECEL" }, + { "268 03", "OPTIMUS" }, + { "268 06", "TMN" }, + { "270 01", "LUXGSM" }, + { "270 77", "TANGO" }, + { "272 01", "EIRCELL-GSM" }, + { "272 02", "Digifone" }, + { "274 01", "Landssiminn GSM 900" }, + { "274 02", "TAL hf" }, + { "276 01", "AMC" }, + { "278 01", "Vodafone Malta Limited" }, + { "280 01", "CYTAGSM" }, + { "282 01", "Geocell Limited" }, + { "282 02", "Magti GSM" }, + { "283 01", "ArmGSM" }, + { "284 01", "M-TEL GSM BG" }, + { "286 01", "Turkcell" }, + { "286 02", "TELSIM GSM" }, + { "288 01", "Faroese Telecom" }, + { "290 01", "Tele Greenland" }, + { "293 40", "SI.MOBIL d. d." }, + { "293 41", "MOBITEL" }, + { "294 01", "MobiMak" }, + { "302 37", "Microcell Connexions Inc" }, + { "310 01", "Cellnet" }, + { "310 02", "Sprint Spectrum" }, + { "310 11", "Wireless 2000 Telephone Co." }, + { "310 15", "BellSouth Mobility DCS" }, + { "310 16", "Omnipoint" }, + { "310 17", "Pac Bell" }, + { "310 26", "VOICESTREAM" }, + { "310 27", "Powertel" }, + { "310 31", "AERIAL" }, + { "310 77", "Iowa Wireless Services LP" }, + { "340 01", "AMERIS" }, + { "400 01", "AZERCELL GSM" }, + { "400 02", "Bakcell GSM 2000" }, + + { "404 01", "AIRCELL"}, + { "404 02", "Evergrowth"}, + { "404 03", "Bharthi Telenet"}, + { "404 05", "Fascel"}, + { "404 07", "Tata Cell"}, //TATA Cellular + { "404 08", "Koshika"}, + { "404 09", "Reliance"}, + { "404 10", "AIRTEL"}, //AirTel + { "404 11", "Essar"}, //Essar Cellphone + { "404 12", "Escotel"}, + { "404 14", "Spice"}, //Modicom + { "404 15", "AIRCELL"}, //Essar Cellphone + { "404 18", "Reliance"}, + { "404 19", "Escotel"}, + { "404 20", "Orange"}, //Max Touch + { "404 21", "BPL Mobile"}, //BPL - Mobile + { "404 22", "Birla AT&T"}, + { "404 24", "Birla AT&T"}, + { "404 26", "Koshika"}, + { "404 27", "BPL Mobile"}, //BPL USWEST Cellular + { "404 30", "Usha"}, //Command + { "404 31", "AIRCELL"}, //? + { "404 31", "Command"}, //? + { "404 32", "Koshika"}, + { "404 34", "Koshika"}, + { "404 36", "Reliance"}, + { "404 40", "SkyCell"}, + { "404 41", "RPG"}, //RPG Cellular + { "404 42", "AIRCELL"}, //AIRCEL + { "404 43", "BPL Mobile"}, + { "404 44", "Spice"}, + { "404 45", "AIRTEL-blr"}, + { "404 46", "BPL Moibile"}, + { "404 49", "AIRTEL"}, + { "404 50", "Reliance"}, + { "404 52", "Reliance"}, + { "404 56", "Escotel"}, + { "404 60", "AIRCELL"}, + { "404 67", "Reliance"}, + { "404 70", "Hexacom"}, + { "404 78", "RPG"}, + { "404 85", "Reliance"}, + + { "410 01", "Mobilink" }, + { "413 02", "DIALOG GSM" }, + { "415 01", "CELLIS" }, + { "415 03", "LIBANCELL" }, + { "416 01", "Fastlink" }, + { "417 09", "MOBILE SYRIA" }, + { "419 02", "MTCNet" }, + { "420 01", "Al Jawwal" }, + { "420 07", "E.A.E" }, + { "422 02", "GTO" }, + { "424 02", "UAE-ETISALAT" }, + { "425 01", "Partner Communications Company Ltd" }, + { "426 01", "BHR MOBILE PLUS" }, + { "427 01", "QATARNET" }, + { "432 11", "TCI" }, + { "434 04", "Daewoo Unitel" }, + { "434 05", "Coscom" }, + { "437 01", "Bitel" }, + { "454 00", "TCSL GSM" }, + { "454 04", "HKGHT" }, + { "454 06", "SMARTONE GSM" }, + { "454 10", "New World PCS" }, + { "454 12", "PEOPLES" }, + { "454 16", "SUNDAY" }, + { "455 01", "TELEMOVEL+ GSM900-Macau" }, + { "456 01", "MobiTel" }, + { "456 02", "SAMART-GSM" }, + { "457 01", "Lao Shinawatra Telecom" }, + { "460 00", "China Telecom GSM" }, + { "460 01", "CU-GSM" }, + { "466 01", "Far EasTone Telecoms 900" }, + { "466 06", "TUNTEX GSM 1800" }, + { "466 88", "KG Telecom" }, + { "466 92", "Chunghwa GSM" }, + { "466 93", "MobiTai" }, + { "466 97", "TWNGSM" }, + { "466 99", "TransAsia" }, + { "470 01", "GrameenPhone Ltd" }, + { "470 19", "Mobile 2000" }, + { "502 12", "Maxis Mobile" }, + { "502 13", "TM Touch" }, + { "502 16", "DiGi 1800" }, + { "502 17", "ADAM" }, + { "502 19", "CELCOM" }, + { "505 01", "MobileNet" }, + { "505 02", "OPTUS" }, + { "505 03", "VODAFONE" }, + { "505 08", "One.Tel" }, + { "510 01", "SATELINDO" }, + { "510 10", "TELKOMSEL" }, + { "510 11", "Excelcom" }, + { "515 01", "ISLACOM" }, + { "515 02", "Globe Telecom" }, + { "520 01", "AIS GSM" }, + { "520 10", "WCS" }, + { "520 18", "Worldphone 1800" }, + { "520 23", "HELLO" }, + { "525 01", "SingTel Mobile" }, + { "525 02", "ST-PCN" }, + { "525 03", "MOBILEONE" }, + { "528 11", "DSTCom" }, + { "530 01", "Vodafone New Zealand Limited" }, + { "542 01", "Vodafone" }, + { "546 01", "Mobilis" }, + { "547 20", "VINI" }, + { "602 01", "MobiNil" }, + { "602 02", "Tunicell" }, + { "603 01", "ALGERIAN MOBILE NETWORK" }, + { "604 01", "I A M" }, + { "608 01", "ALIZE" }, + { "611 02", "Lagui" }, + { "612 03", "IVOIRIS" }, + { "612 05", "Telecel" }, + { "615 01", "TOGO CELL" }, + { "617 01", "Cellplus Mobile Comms" }, + { "618 01", "Omega" }, + { "620 01", "SPACEFON" }, + { "625 01", "CVMOVEL" }, + { "633 01", "Seychelles Cellular Services" }, + { "633 10", "AIRTEL" }, + { "634 01", "MobiTel" }, + { "635 10", "Rwandacell" }, + { "636 01", "ETMTN" }, + { "640 01", "TRITEL" }, + { "641 10", "MTN-Uganda" }, + { "642 02", "ANTARIS" }, + { "643 01", "T.D.M GSM 900" }, + { "645 01", "ZAMCELL" }, + { "646 01", "Madacom" }, + { "646 03", "Sacel Madagascar S.A." }, + { "647 10", "SRR" }, + { "648 01", "NET*ONE" }, + { "648 03", "Telecel" }, + { "649 01", "MTC" }, + { "650 01", "Callpoint 900" }, + { "651 01", "Vodacom Lesotho (Pty) Ltd" }, + { "655 01", "Vodacom" }, + { "655 10", "MTN" }, + { "680 38", "NPI Wireless" }, + { "730 01", "Entel Telefonia Movi" }, + { "730 10", "Entel PCS" }, + { "734 01", "Infonet" }, + + { "undefined", "unknown" } +}; + +char *GSM_GetNetworkName(char *NetworkCode) +{ + + int index=0; + + while ( strcmp(GSM_Networks[index].Code, NetworkCode) && + strcmp(GSM_Networks[index].Code, "undefined") ) + index++; + + return GSM_Networks[index].Name; +} + +char *GSM_GetNetworkCode(char *NetworkName) +{ + + int index=0; + + while ( strcmp(GSM_Networks[index].Name, NetworkName) && + strcmp(GSM_Networks[index].Code, "undefined") ) + index++; + + return GSM_Networks[index].Code; +} + +char *GSM_GetCountryName(char *CountryCode) +{ + + int index=0; + + while ( strncmp(GSM_Countries[index].Code, CountryCode, 3) && + strcmp(GSM_Countries[index].Code, "undefined") ) + index++; + + return GSM_Countries[index].Name; +} + +char *GSM_GetCountryCode(char *CountryName) +{ + + int index=0; + + while ( strcmp(GSM_Countries[index].Name, CountryName) && + strcmp(GSM_Countries[index].Code, "undefined") ) + index++; + + return GSM_Countries[index].Code; +} + +void EncodeNetworkCode(unsigned char* buffer, unsigned char* output) +{ + EncodeBCD (buffer, output, 6, false); + buffer[1]=buffer[1] | 0xf0; +} + +void DecodeNetworkCode(unsigned char* buffer, unsigned char* output) +{ + DecodeBCD (output, buffer, 3); + output[6]=output[5]; + output[5]=output[4]; + output[4]=output[3]; + output[3]=' '; +} diff --git a/common/gsm-phonebook.c b/common/gsm-phonebook.c new file mode 100644 index 0000000..bf0fdd3 --- /dev/null +++ b/common/gsm-phonebook.c @@ -0,0 +1,162 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Functions for manipulating phonebook + +*/ + +#include +#include +#include +#include +#include + +#ifdef WIN32 + #include "misc_win32.h" +#endif + +#include "gsm-api.h" +#include "gsm-coding.h" + +char *GSM_GetVCARD(GSM_PhonebookEntry *entry, int version) { + + static char Buffer[1000]=""; + + u8 buffer[50*3]; + + int len=0,i; + + bool pref=false; + + char memory_type_string[20]; + + GetMemoryTypeString(memory_type_string, &entry->MemoryType); + + switch (version) { + case 10: + len+=sprintf(Buffer+len,_("BEGIN:VCARD%c%c"),13,10); + len+=sprintf(Buffer+len,_("N:%s%c%c"),entry->Name,13,10); + if (*entry->Number) + len+=sprintf(Buffer+len,_("TEL:%s%c%c"),entry->Number,13,10); + len+=sprintf(Buffer+len,_("END:VCARD%c%c"),13,10); + break; + case 21: + len+=sprintf(Buffer+len,_("BEGIN:VCARD%c%cVERSION:2.1%c%c"),13,10,13,10); + + EncodeUTF8(buffer,entry->Name,strlen(entry->Name)); + if (strlen(entry->Name)==strlen(buffer)) { + len+=sprintf(Buffer+len,_("N:%s%c%c"),entry->Name,13,10); + } else { + len+=sprintf(Buffer+len,_("N;CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:%s%c%c"),buffer,13,10); + } + + if (*entry->Number) { + len+=sprintf(Buffer+len,_("TEL;PREF:%s%c%c"),entry->Number,13,10); + pref=true; + } + + /* Rest of the subentries */ + for (i = 0; i < entry->SubEntriesCount; i++) { + switch( entry->SubEntries[i].EntryType ) { + case GSM_Number: + switch( entry->SubEntries[i].NumberType ) { + case GSM_General :len+=sprintf(Buffer+len,_("TEL"));break; + case GSM_Home :len+=sprintf(Buffer+len,_("TEL;HOME;VOICE"));break; + case GSM_Mobile :len+=sprintf(Buffer+len,_("TEL;CELL"));break; + case GSM_Work :len+=sprintf(Buffer+len,_("TEL;WORK;VOICE"));break; + case GSM_Fax :len+=sprintf(Buffer+len,_("TEL;FAX"));break; + default :break; + } + if (!pref) { + len+=sprintf(Buffer+len,_(";PREF")); + pref=true; + } + break; + case GSM_Note :len+=sprintf(Buffer+len,_("NOTE"));break; + case GSM_Postal: + len+=sprintf(Buffer+len,_("LABEL")); + EncodeUTF8(buffer,entry->SubEntries[i].data.Number,strlen(entry->SubEntries[i].data.Number)); + if (strlen(entry->SubEntries[i].data.Number)==strlen(buffer)) { + len+=sprintf(Buffer+len,_(":%s%c%c"),entry->SubEntries[i].data.Number,13,10); + } else { + len+=sprintf(Buffer+len,_(";CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:%s%c%c"),buffer,13,10); + } + len+=sprintf(Buffer+len,_("ADR")); + break; + case GSM_Email :len+=sprintf(Buffer+len,_("EMAIL"));break; + default :break; + } + + EncodeUTF8(buffer,entry->SubEntries[i].data.Number,strlen(entry->SubEntries[i].data.Number)); + if (strlen(entry->SubEntries[i].data.Number)==strlen(buffer)) { + len+=sprintf(Buffer+len,_(":%s%c%c"),entry->SubEntries[i].data.Number,13,10); + } else { + len+=sprintf(Buffer+len,_(";CHARSET=UTF-8;ENCODING=QUOTED-PRINTABLE:%s%c%c"),buffer,13,10); + } + } + len+=sprintf(Buffer+len,_("END:VCARD%c%c"),13,10); + break; + case 30: + len+=sprintf(Buffer+len,_("BEGIN:VCARD\nVERSION:3.0\n")); + len+=sprintf(Buffer+len,_("FN:%s\n"),entry->Name); + len+=sprintf(Buffer+len,_("TEL;PREF:%s\n"),entry->Number); + len+=sprintf(Buffer+len,_("X_GSM_STORE_AT:%s%i\n"),memory_type_string,entry->Location); + len+=sprintf(Buffer+len,_("X_GSM_CALLERGROUP:%i\n"),entry->Group); + for( i = 0; i < entry->SubEntriesCount; i++ ) + { + if( entry->SubEntries[i].EntryType == GSM_Number ) { + len+=sprintf(Buffer+len,_("TEL;UNKNOWN_%d:%s\n"), + entry->SubEntries[i].NumberType, + entry->SubEntries[i].data.Number ); + } + } + len+=sprintf(Buffer+len,_("END:VCARD\n\n")); + break; + } + + return Buffer; +} + +int GSM_SavePhonebookEntryToSMS(GSM_MultiSMSMessage *SMS, + GSM_PhonebookEntry *entry, int version) +{ + char Buffer[1000]=""; + int length; + GSM_UDH UDH=GSM_NoUDH; + GSM_Coding_Type Coding=GSM_Coding_Default; + + sprintf(Buffer,GSM_GetVCARD(entry,version)); + + switch (version) { + case 10: + /* 1 SMS: no UDH */ + if (strlen(Buffer)<=160-8) { //8==length of ..SCKE2. + sprintf(Buffer,"//SCKE2 "); + sprintf(Buffer,GSM_GetVCARD(entry,version)); + } else { + UDH=GSM_PhonebookUDH; //FIXME:is this true ? +// Coding=GSM_Coding_8bit; //FIXME:is this true ? + } + break; + case 21: + /* 1 SMS: no UDH */ + if (strlen(Buffer)<=160-12) { //12==length of ..SCKL... + sprintf(Buffer,_("//SCKL23F4%c%c"),13,10); + sprintf(Buffer,GSM_GetVCARD(entry,version)); + } else { + UDH=GSM_PhonebookUDH; +// Coding=GSM_Coding_8bit; //can be 8 bit, but no abligatory + } + break; + } + + length=strlen(Buffer); + GSM_MakeMultiPartSMS2(SMS,Buffer,length, UDH, Coding); + + return 0; +} diff --git a/common/gsm-ringtones.c b/common/gsm-ringtones.c new file mode 100644 index 0000000..3db43b6 --- /dev/null +++ b/common/gsm-ringtones.c @@ -0,0 +1,1036 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This file provides support for ringtones. + +*/ + +#ifdef WIN32 + #include + #include "misc_win32.h" +#else + #include +#endif + +#include "gsm-api.h" + +GSM_Ringtone SMringtone; +GSM_BinRingtone ringtone; + +/* Beats-per-Minute Encoding */ + +int BeatsPerMinute[] = { + 25, 28, 31, 35, 40, 45, 50, 56, 63, 70, + 80, 90, 100, 112, 125, 140, 160, 180, 200, 225, + 250, 285, 320, 355, 400, 450, 500, 565, 635, 715, + 800, 900 +}; + +struct OneRingtone RingingTones[] = { + {"",0,0}, +/* 1 */ {"Uploaded #1",0,0}, /* 2 */ {"Ring ring",0,0}, +/* 3 */ {"Low",0,0}, /* 4 */ {"Fly",0,0}, +/* 5 */ {"Mosquito",0,0}, /* 6 */ {"Bee",0,0}, +/* 7 */ {"Intro",0,0}, /* 8 */ {"Etude",0,0}, +/* 9 */ {"Hunt",0,0}, /* 10 */ {"Going up",0,0}, +/* 11 */ {"City bird",0,0}, /* 12 */ {"Chase",0,0}, +/* 13 */ {"Scifi",0,0}, /* 14 */ {"Kick",0,0}, +/* 15 */ {"Do-mi-so",0,0}, /* 16 */ {"Robo N1X",0,0}, +/* 17 */ {"Dizzy",0,0}, /* 18 */ {"Playground",0,0}, +/* 19 */ {"That's it!",0,0}, /* 20 */ {"Grande valse",0,0}, +/* 21 */ {"Knock knock",0,0}, /* 22 */ {"Knock again",0,0}, +/* 23 */ {"Helan",0,0}, /* 24 */ {"Fuga",0,0}, +/* 25 */ {"Menuet",0,0}, /* 26 */ {"Ode to Joy",0,0}, +/* 27 */ {"Elise",0,0}, /* 28 */ {"Mozart 40",0,0}, +/* 29 */ {"Piano Concerto",0,0},/* 30 */ {"William Tell",0,0}, +/* 31 */ {"Badinerie",0,0}, /* 32 */ {"Polka",0,0}, +/* 33 */ {"Attraction",0,0}, /* 34 */ {"Polite",0,0}, +/* 35 */ {"Persuasion",0,0}, /* 36 */ {"Tick tick",0,0}, +/* 37 */ {"Samba",0,0}, /* 38 */ {"Orient",0,0}, +/* 39 */ {"Charleston",0,0}, /* 40 */ {"Songette",0,0}, +/* 41 */ {"Jumping",0,0}, /* 42 */ {"Lamb",0,0}, +/* 43 */ {"Marry",0,0}, /* 44 */ {"Tango",0,0}, +/* 45 */ {"Tangoed",0,0}, /* 46 */ {"Down",0,0}, +/* 47 */ {"Polska",0,0}, /* 48 */ {"WalzeBrilliant",0,0}, +/* 49 */ {"Cicada",0,0}, /* 50 */ {"Trio",0,0}, +/* 51 */ {"Circles",0,0}, /* 52 */ {"Nokia tune",0,0}, +/* 53 */ {"Sunny walks",0,0}, /* 54 */ {"Basic rock",0,0}, +/* 55 */ {"Reveille",0,0}, /* 56 */ {"Groovy Blue",0,0}, +/* 57 */ {"Brave Scotland",0,0},/* 58 */ {"Matilda",0,0}, +/* 59 */ {"Bumblebee",0,0}, /* 60 */ {"Hungarian",0,0}, +/* 61 */ {"Valkyrie",0,0}, /* 62 */ {"Bach #3",0,0}, +/* 63 */ {"Toreador",0,0}, /* 64 */ {"9th Symphony",0,0}, +/* 65 */ {"Uploaded #2",0,0}, /* 66 */ {"Uploaded #3",0,0}, +/* 67 */ {"Uploaded #4",0,0}, /* 68 */ {"Uploaded #5",0,0}, + {"",0,0} +}; + +int OctetAlign(unsigned char *Dest, int CurrentBit) +{ + int i=0; + + while((CurrentBit+i)%8) { + ClearBit(Dest, CurrentBit+i); + i++; + } + + return CurrentBit+i; +} + +int OctetAlignNumber(int CurrentBit) +{ + int i=0; + + while((CurrentBit+i)%8) { i++; } + + return CurrentBit+i; +} + +int BitPack(unsigned char *Dest, int CurrentBit, unsigned char *Source, int Bits) +{ + + int i; + + for (i=0; iNrNotes;i++) { + switch (ringtone->notes[i].duration) { + case 192: buffer[0]++; break; + case 128: buffer[0]++; break; + case 96: buffer[1]++; break; + case 64: buffer[1]++; break; + case 48: buffer[2]++; break; + case 32: buffer[2]++; break; + case 24: buffer[3]++; break; + case 16: buffer[3]++; break; + case 12: buffer[4]++; break; + case 8: buffer[4]++; break; + case 6: buffer[5]++; break; + case 4: buffer[5]++; break; + } + } + + /* Now find the most frequently used */ + j=0; + for (i=0;i<6;i++) { + if (buffer[i]>j) { + k=i; + j=buffer[i]; + } + } + + /* Finally convert the default duration */ + switch (k) { + case 0: DefNoteDuration=128; break; + case 1: DefNoteDuration= 64; break; + case 2: DefNoteDuration= 32; break; + case 3: DefNoteDuration= 16; break; + case 4: DefNoteDuration= 8; break; + case 5: DefNoteDuration= 4; break; + default: DefNoteDuration= 16; break; + } + + /* Find the most frequently used scale and use this for the default */ + for (i=0;i<6;i++) buffer[i]=0; + for (i=0;iNrNotes;i++) { + if (ringtone->notes[i].note!=255) { + buffer[ringtone->notes[i].note/14]++; + } + } + j=0; + for (i=0;i<6;i++) { + if (buffer[i]>j) { + DefNoteScale=i; + j=buffer[i]; + } + } + + StartBit=BitPackByte(package, StartBit, CommandLength, 8); + StartBit=BitPackByte(package, StartBit, RingingToneProgramming, 7); + + /* The page 3-23 of the specs says that is always + octet-aligned. */ + StartBit=OctetAlign(package, StartBit); + + StartBit=BitPackByte(package, StartBit, Sound, 7); + StartBit=BitPackByte(package, StartBit, BasicSongType, 3); + + /* Set special chars in ringtone name */ + for (i=0;iname);i++) { + if (ringtone->name[i]=='~') ringtone->name[i]=1; //enables/disables blinking + if (ringtone->name[i]=='`') ringtone->name[i]=0; //hides rest ot contents + } + + /* Packing the name of the tune. */ + StartBit=BitPackByte(package, StartBit, strlen(ringtone->name)<<4, 4); + StartBit=BitPack(package, StartBit, ringtone->name, 8*strlen(ringtone->name)); + + /* Set special chars in ringtone name */ + for (i=0;iname);i++) { + if (ringtone->name[i]==1) ringtone->name[i]='~'; //enables/disables blinking + if (ringtone->name[i]==0) ringtone->name[i]='`'; //hides rest ot contents + } + + /* Info about song pattern */ + StartBit=BitPackByte(package, StartBit, 0x01, 8); /* One song pattern */ + StartBit=BitPackByte(package, StartBit, PatternHeaderId, 3); + StartBit=BitPackByte(package, StartBit, A_part, 2); + StartBit=BitPackByte(package, StartBit, ringtone->Loop<<4, 4); + + /* Info, how long is contents for SMS */ + HowLong=8+8+7+3+4+8*strlen(ringtone->name)+8+3+2+4+8+3+2+3+5; + + /* Calculating number of instructions in the tune. + Each Note contains Note and (sometimes) Scale. + Default Tempo and Style are instructions too. */ + HowMany=2; /* Default Tempo and Style */ + + /* Default style and tempo */ + DefNoteStyle=ringtone->notes[0].style; + DefNoteTempo=ringtone->notes[0].tempo; + oldstyle=DefNoteStyle; + oldtempo=DefNoteTempo; + + for(i=0; iNrNotes; i++) { + + /* PC Composer 2.0.010 doesn't like, when we start ringtone from pause: + displays, that format is invalid and + hangs, when you move mouse over place, where pause is */ + if (GSM_GetNote(ringtone->notes[i].note)==Note_Pause && oldscale==10) { + StartNote++; + } else { + + thisnote=0; + thisnotelong=0; + + /* we don't write Scale/Style info before "Pause" note - it saves place */ + if (GSM_GetNote(ringtone->notes[i].note)!=Note_Pause) { + + if (ringtone->allnotesscale || + oldscale!=(newscale=GSM_GetScale(ringtone->notes[i].note))) { + + /* We calculate, if we have space to add next scale instruction */ + if (((OctetAlignNumber(HowLong+5)+8)/8)<=(*maxlength)) { + oldscale=newscale; + HowLong+=5; + HowMany++; + thisnote++; + thisnotelong+=5; + } else { + break; + } + } + if (ringtone->notes[i].style!=oldstyle) { + /* We calculate, if we have space to add next style instruction */ + if (((OctetAlignNumber(HowLong+5)+8)/8)<=(*maxlength)) { + oldstyle=ringtone->notes[i].style; + HowLong+=5; + HowMany++; + thisnote++; + thisnotelong+=5; + } else { + HowLong=HowLong-thisnotelong; + HowMany=HowMany-thisnote; + break; + } + } + } + + if (ringtone->notes[i].tempo!=oldtempo) { + /* We calculate, if we have space to add next tempo instruction */ + if (((OctetAlignNumber(HowLong+8)+8)/8)<=(*maxlength)) { + oldtempo=ringtone->notes[i].tempo; + HowLong+=8; + HowMany++; + thisnote++; + thisnotelong+=8; + } else { + HowLong=HowLong-thisnotelong; + HowMany=HowMany-thisnote; + break; + } + } + + /* We calculate, if we have space to add next note instruction */ + if (((OctetAlignNumber(HowLong+12)+8)/8)<=(*maxlength)) { + HowMany++; + EndNote++; + HowLong+=12; + } else { + HowLong=HowLong-thisnotelong; + HowMany=HowMany-thisnote; + break; + } + } + + /* We are sure, we pack it for SMS or setting to phone, not for OTT file */ + if (*maxlength<1000) { + /* Like Pc Composer say - before of phone limitations...*/ + if ((EndNote-StartNote)==FB61_MAX_RINGTONE_NOTES-1) break; + } + } + + StartBit=BitPackByte(package, StartBit, HowMany, 8); +#ifdef DEBUG +// fprintf(stdout,_("length of new pattern: %i %i\n"),HowMany,StartBit); +#endif + + /* Style */ + StartBit=BitPackByte(package, StartBit, StyleInstructionId, 3); + StartBit=BitPackByte(package, StartBit, DefNoteStyle, 2); + + /* Beats per minute/tempo of the tune */ + StartBit=BitPackByte(package, StartBit, TempoInstructionId, 3); + StartBit=BitPackByte(package, StartBit, GSM_GetTempo(DefNoteTempo), 5); +#ifdef DEBUG +// fprintf(stdout,_("def temp: %i %i\n"),GSM_GetTempo(DefNoteTempo),StartBit); +#endif + + /* Default scale */ + oldscale=10; + + /* Default style */ + oldstyle=DefNoteStyle; + + /* Default tempo */ + oldtempo=DefNoteTempo; + + /* Notes packing */ + for(i=StartNote; i<(EndNote+StartNote); i++) { + + /* we don't write Scale info before "Pause" note - it saves place */ + if (GSM_GetNote(ringtone->notes[i].note)!=Note_Pause) { + if (ringtone->allnotesscale || + oldscale!=(newscale=GSM_GetScale(ringtone->notes[i].note))) { +#ifdef DEBUG +// fprintf(stdout,_("Scale\n")); +#endif + oldscale=newscale; + StartBit=BitPackByte(package, StartBit, ScaleInstructionId, 3); + StartBit=BitPackByte(package, StartBit, GSM_GetScale(ringtone->notes[i].note), 2); + } + if (ringtone->notes[i].style!=oldstyle) { + /* Style */ + StartBit=BitPackByte(package, StartBit, StyleInstructionId, 3); + StartBit=BitPackByte(package, StartBit, ringtone->notes[i].style, 2); + oldstyle=ringtone->notes[i].style; + } + } + + if (ringtone->notes[i].tempo!=oldtempo) { + /* Beats per minute/tempo of the tune */ + StartBit=BitPackByte(package, StartBit, TempoInstructionId, 3); + StartBit=BitPackByte(package, StartBit, GSM_GetTempo(ringtone->notes[i].tempo), 5); + oldtempo=ringtone->notes[i].tempo; + } + + /* Note */ + StartBit=BitPackByte(package, StartBit, NoteInstructionId, 3); + StartBit=BitPackByte(package, StartBit, GSM_GetNote(ringtone->notes[i].note), 4); + StartBit=BitPackByte(package, StartBit, GSM_GetDuration(ringtone->notes[i].duration,&spec), 3); + StartBit=BitPackByte(package, StartBit, spec, 2); + +#ifdef DEBUG +// fprintf(stdout,_("note(%i): %i, scale: %i, duration: %i, spec: %i\n"),i,ringtone->notes[i].note,GSM_GetScale(ringtone->notes[i].note),GSM_GetDuration(ringtone->notes[i].duration,&spec),spec); +#endif + + } + + StartBit=OctetAlign(package, StartBit); + + StartBit=BitPackByte(package, StartBit, CommandEnd, 8); + +#ifdef DEBUG + if (StartBit!=OctetAlignNumber(HowLong)+8) + fprintf(stdout,_("Error in PackRingtone - StartBit different to HowLong %d - %d)\n"),StartBit,OctetAlignNumber(HowLong)+8); +#endif + + *maxlength=StartBit/8; + + return(EndNote+StartNote); +} + +int BitUnPack(unsigned char *Dest, int CurrentBit, unsigned char *Source, int Bits) +{ + int i; + + for (i=0; iallnotesscale=false; + + StartBit=BitUnPackInt(package,StartBit,&l,8); +#ifdef DEBUG + if (l!=0x02) + fprintf(stdout,_("Not header\n")); +#endif + if (l!=0x02) return GE_SUBFORMATNOTSUPPORTED; + + StartBit=BitUnPackInt(package,StartBit,&l,7); +#ifdef DEBUG + if (l!=RingingToneProgramming) + fprintf(stdout,_("Not RingingToneProgramming\n")); +#endif + if (l!=RingingToneProgramming) return GE_SUBFORMATNOTSUPPORTED; + + /* The page 3-23 of the specs says that is always + octet-aligned. */ + StartBit=OctetUnAlign(StartBit); + + StartBit=BitUnPackInt(package,StartBit,&l,7); +#ifdef DEBUG + if (l!=Sound) + fprintf(stdout,_("Not Sound\n")); +#endif + if (l!=Sound) return GE_SUBFORMATNOTSUPPORTED; + + StartBit=BitUnPackInt(package,StartBit,&l,3); +#ifdef DEBUG + if (l!=BasicSongType) + fprintf(stdout,_("Not BasicSongType\n")); +#endif + if (l!=BasicSongType) return GE_SUBFORMATNOTSUPPORTED; + + /* Getting length of the tune name */ + StartBit=BitUnPackInt(package,StartBit,&l,4); + l=l>>4; +#ifdef DEBUG +// fprintf(stdout,_("Length of name: %i\n"),l); +#endif + + /* Unpacking the name of the tune. */ + StartBit=BitUnPack(package, StartBit, ringtone->name, 8*l); + ringtone->name[l]=0; + + /* Set special chars in ringtone name */ + for (i=0;iname);i++) { + if (ringtone->name[i]==1) ringtone->name[i]='~'; //enables/disables blinking + if (ringtone->name[i]==0) ringtone->name[i]='`'; //hides rest ot contents + } + +#ifdef DEBUG +// fprintf(stdout,_("Name: %s\n"),ringtone->name); +#endif + + StartBit=BitUnPackInt(package,StartBit,&l,8); +#ifdef DEBUG +// fprintf(stdout,_("Number of song patterns: %i\n"),l); +#endif + if (l!=1) return GE_SUBFORMATNOTSUPPORTED; //we support only one song pattern + + StartBit=BitUnPackInt(package,StartBit,&l,3); +#ifdef DEBUG + if (l!=PatternHeaderId) + fprintf(stdout,_("Not PatternHeaderId\n")); +#endif + if (l!=PatternHeaderId) return GE_SUBFORMATNOTSUPPORTED; + + StartBit+=2; //Pattern ID - we ignore it + + StartBit=BitUnPackInt(package,StartBit,&l,4); + l=l>>4; +#ifdef DEBUG + fprintf(stdout,_("Loop value: %i\n"),l); +#endif + ringtone->Loop=l; + + HowMany=0; + StartBit=BitUnPackInt(package, StartBit, &HowMany, 8); +#ifdef DEBUG + fprintf(stdout,_("length of new pattern: %i %i\n"),HowMany,StartBit); +#endif + + ringtone->NrNotes=0; + + for (i=0;i>6); +#endif + switch (l) { + case StaccatoStyle : DefNoteStyle=StaccatoStyle; break; + case ContinuousStyle: DefNoteStyle=ContinuousStyle; break; + case NaturalStyle : DefNoteStyle=NaturalStyle; break; + } + break; + case TempoInstructionId: + StartBit=BitUnPackInt(package,StartBit,&l,5); + l=l>>3; + DefNoteTempo=BeatsPerMinute[l]; +#ifdef DEBUG +// fprintf(stdout,_("Tempo %i\n"),l); +#endif + break; + case ScaleInstructionId: + StartBit=BitUnPackInt(package,StartBit,&l,2); + DefNoteScale=l>>6; +#ifdef DEBUG +// fprintf(stdout,_("scale: %i %i\n"),DefNoteScale,ringtone->NrNotes); +#endif + break; + case NoteInstructionId: + StartBit=BitUnPackInt(package,StartBit,&l,4); + + switch (l) { + case Note_C :ringtone->notes[ringtone->NrNotes].note=0;break; + case Note_Cis:ringtone->notes[ringtone->NrNotes].note=1;break; + case Note_D :ringtone->notes[ringtone->NrNotes].note=2;break; + case Note_Dis:ringtone->notes[ringtone->NrNotes].note=3;break; + case Note_E :ringtone->notes[ringtone->NrNotes].note=4;break; + case Note_F :ringtone->notes[ringtone->NrNotes].note=6;break; + case Note_Fis:ringtone->notes[ringtone->NrNotes].note=7;break; + case Note_G :ringtone->notes[ringtone->NrNotes].note=8;break; + case Note_Gis:ringtone->notes[ringtone->NrNotes].note=9;break; + case Note_A :ringtone->notes[ringtone->NrNotes].note=10;break; + case Note_Ais:ringtone->notes[ringtone->NrNotes].note=11;break; + case Note_H :ringtone->notes[ringtone->NrNotes].note=12;break; + default :ringtone->notes[ringtone->NrNotes].note=255;break; //Pause ? + } + + if (ringtone->notes[ringtone->NrNotes].note!=255) + ringtone->notes[ringtone->NrNotes].note=ringtone->notes[ringtone->NrNotes].note+DefNoteScale*14; + + StartBit=BitUnPackInt(package,StartBit,&l,3); + DefNoteDuration=l; + + StartBit=BitUnPackInt(package,StartBit,&spec,2); + + if (DefNoteDuration==Duration_Full && spec==DottedNote) + ringtone->notes[ringtone->NrNotes].duration=128*3/2; + if (DefNoteDuration==Duration_Full && spec==Length_2_3) + ringtone->notes[ringtone->NrNotes].duration=128*2/3; + if (DefNoteDuration==Duration_Full && spec==NoSpecialDuration) + ringtone->notes[ringtone->NrNotes].duration=128; + if (DefNoteDuration==Duration_1_2 && spec==DottedNote) + ringtone->notes[ringtone->NrNotes].duration=64*3/2; + if (DefNoteDuration==Duration_1_2 && spec==Length_2_3) + ringtone->notes[ringtone->NrNotes].duration=64*2/3; + if (DefNoteDuration==Duration_1_2 && spec==NoSpecialDuration) + ringtone->notes[ringtone->NrNotes].duration=64; + if (DefNoteDuration==Duration_1_4 && spec==DottedNote) + ringtone->notes[ringtone->NrNotes].duration=32*3/2; + if (DefNoteDuration==Duration_1_4 && spec==Length_2_3) + ringtone->notes[ringtone->NrNotes].duration=32*2/3; + if (DefNoteDuration==Duration_1_4 && spec==NoSpecialDuration) + ringtone->notes[ringtone->NrNotes].duration=32; + if (DefNoteDuration==Duration_1_8 && spec==DottedNote) + ringtone->notes[ringtone->NrNotes].duration=16*3/2; + if (DefNoteDuration==Duration_1_8 && spec==Length_2_3) + ringtone->notes[ringtone->NrNotes].duration=16*2/3; + if (DefNoteDuration==Duration_1_8 && spec==NoSpecialDuration) + ringtone->notes[ringtone->NrNotes].duration=16; + if (DefNoteDuration==Duration_1_16 && spec==DottedNote) + ringtone->notes[ringtone->NrNotes].duration=8*3/2; + if (DefNoteDuration==Duration_1_16 && spec==Length_2_3) + ringtone->notes[ringtone->NrNotes].duration=8*2/3; + if (DefNoteDuration==Duration_1_16 && spec==NoSpecialDuration) + ringtone->notes[ringtone->NrNotes].duration=8; + if (DefNoteDuration==Duration_1_32 && spec==DottedNote) + ringtone->notes[ringtone->NrNotes].duration=4*3/2; + if (DefNoteDuration==Duration_1_32 && spec==Length_2_3) + ringtone->notes[ringtone->NrNotes].duration=4*2/3; + if (DefNoteDuration==Duration_1_32 && spec==NoSpecialDuration) + ringtone->notes[ringtone->NrNotes].duration=4; + + ringtone->notes[ringtone->NrNotes].style=DefNoteStyle; + + ringtone->notes[ringtone->NrNotes].tempo=DefNoteTempo; + +#ifdef DEBUG +// fprintf(stdout,_("note(%i): %i, scale: %i, duration: %i, spec: %i\n"),ringtone->NrNotes,ringtone->notes[ringtone->NrNotes].note,DefNoteScale,DefNoteDuration,spec); +#endif + if (ringtone->NrNotes==FB61_MAX_RINGTONE_NOTES) break; + + ringtone->NrNotes++; + break; + default: +#ifdef DEBUG + fprintf(stdout,_("Unsupported block %i %i\n"),q,i); +#endif + return GE_SUBFORMATNOTSUPPORTED; + } + } + +#ifdef DEBUG +// printf("Number of notes=%d\n",ringtone->NrNotes); +#endif + + return GE_NONE; +} + +GSM_Error GSM_ReadRingtone(GSM_SMSMessage *message, GSM_Ringtone *ringtone) +{ + if (message->UDHType==GSM_RingtoneUDH) { + return GSM_UnPackRingtone(ringtone, message->MessageText, message->Length); + } else return GE_SUBFORMATNOTSUPPORTED; +} + +int GSM_GetFrequency(int number) { + + int freq=0; + + /* Values according to the software from http://iki.fi/too/sw/xring/ + generated with: + perl -e 'print int(4400 * (2 **($_/12)) + .5)/10, "\n" for(3..14)' + */ + if (number!=255) { + freq=number%14; + switch (freq) { + + case 0: freq=523.3; break; // C + case 1: freq=554.4; break; // Cis + + case 2: freq=587.3; break; //D + case 3: freq=622.3; break; //Dis + + case 4: freq=659.3; break; //E + + case 6: freq=698.5; break; //F + case 7: freq=740; break; //Fis + + case 8: freq=784; break; //G + case 9: freq=830.6; break; //Gis + + case 10: freq=880; break; //A + case 11: freq=932.3; break; //Ais + + case 12: freq=987.8; break; //H + + default: freq=0; break; + } + } + else freq = 0; + + if ((number/14)!=0) freq=freq*(number/14); + else freq=freq/2; + + return freq; + +} + +/* Very fast hack. It should be written correctly ! */ +void GSM_PlayOneNote (GSM_RingtoneNote note) { + int Hz; + + Hz=GSM_GetFrequency(note.note); + + GSM->PlayTone(Hz,5); + + /* Is it correct ? Experimental values here */ + switch (note.style) { + case StaccatoStyle: + usleep (7500); + GSM->PlayTone(0,0); + usleep ((1500000/note.tempo*note.duration)-(7500)); + break; + case ContinuousStyle: + usleep (1500000/note.tempo*note.duration); + break; + case NaturalStyle: + usleep (1500000/note.tempo*note.duration-50); + GSM->PlayTone(0,0); + usleep (50); + break; + } +} + +void GSM_PlayRingtone (GSM_Ringtone *ringtone) { + + int i; + + for (i=0;iNrNotes;i++) { + GSM_PlayOneNote(ringtone->notes[i]); + } + + /* Disables buzzer */ + GSM->PlayTone(255*255,0); +} + +/* Initializes one ringtone: first is number of ringtone in + RingingTones in gnokii.h, second its' code, last position in phone menu */ +void RT(int number, int code, int menu) { + RingingTones[number].code=code; + RingingTones[number].menu=menu; +} + +/* This function initializes structures with ringtones names adequate for + your phone model and firmware; if your phone is not now supported: + 1.set first ringtone in 1'st profile in your phone + 2.make ./gnokii --getprofile 1 + 3.read ringtone code + 4.see in gnokii.h, if ringtone name is gnokii.h in RingingTones (if not, add) + 5.put here RT(a,b,c), where a is number of name in RingingTones in gnokii.h, + b is its' code and c is number of ringtone in phone menu + 6.repeat steps 1-5 for all ringtones + 7.send me (Marcin-Wiacek@Topnet.PL) all RT and phone model */ +void PrepareRingingTones(char model[64], char rev[64]) { + + char rev2[64]; + int i; + bool doit; + + if (!RingingTones[0].code) { + if (!strcmp(model,"NSE-1")) //5110 + { + RT( 2,18, 1);RT( 3,19, 2);RT( 7,23, 3);RT( 5,21, 4);RT( 9,25, 5); + RT(20,48, 7);RT(11,27, 8);RT(33,59, 9);RT(35,62,10); + RT(46,60,11);RT(16,36,12);RT(17,37,13);RT(13,32,14);RT(14,34,15); + RT(19,43,16);RT(18,39,17);RT(24,50,18);RT(31,57,19);RT(28,54,20); + RT(30,56,21);RT(40,73,22);RT(39,72,23);RT(37,69,24); + RT(23,49,26);RT(38,71,27); RT(41,74,29); + + strcpy(rev2,"05.23"); //5.24 and higher + doit=false; + for(i=0;i<5;i++) + { + if (rev[i]rev2[i]) doit=true; + } + + if (doit) { + RT(22,47, 6);RT(47,58,25);RT(45,80,28);RT(43,75,30); + } else + { + RT(21,47, 6);RT(32,58,25);RT(44,80,28);RT(42,75,30); + } + RingingTones[0].menu=30; /* How many ringtones in phone */ + } + if (!strcmp(model,"NSM-1")) //6150 + { + RT( 2,18, 1);RT( 3,19, 2);RT( 7,23, 3);RT( 6,22, 4); + RT( 4,20, 5);RT( 5,21, 6);RT(15,35, 7);RT(12,30, 8); + RT( 9,25, 9);RT(20,47,10);RT( 8,24,11);RT(11,27,12); + RT(10,26,13);RT(34,60,14);RT(33,58,15);RT(35,61,16); + RT(16,36,17);RT(13,32,18);RT(19,43,19);RT(18,39,20); + RT(24,49,21);RT(31,56,22);RT(25,50,23);RT(27,52,24); + RT(26,51,25);RT(28,53,26);RT(29,54,27);RT(30,55,28); + RT(39,71,29);RT(37,68,30);RT(47,57,31);RT(23,48,32); + RT(38,70,33);RT(36,67,34);RT(41,73,35); + /*uploadable ringtone*/ + RT( 1,17,36); + RingingTones[0].menu=36; /* How many ringtones in phone */ + } + if (!strcmp(model,"NPE-3")) //6210 + { + RT(19,64, 1);RT( 2,65, 2);RT( 3,66, 3);RT(15,67, 4);RT( 6,68, 5); + RT(49,69, 6);RT(50,70, 7);RT( 7,71, 8);RT(35,72, 9);RT(33,73,10); + RT(18,74,11);RT( 5,75,12);RT(51,76,13);RT(52,77,14);RT(53,78,15); + RT(37,79,16);RT(54,80,17);RT(55,81,18);RT(56,82,19);RT(57,83,20); + RT(58,84,21);RT(59,85,22);RT(25,86,23);RT(27,87,24);RT(30,88,25); + RT(39,89,26);RT(24,90,27);RT( 8,91,28);RT(60,92,29);RT(61,93,30); + RT(31,94,31);RT(62,95,32);RT(63,96,33);RT(64,97,34);RT(48,98,35); + /* Uploadable ringtones */ + RT( 1,137,36);RT(65,138,37);RT(66,139,38);RT(67,140,39);RT(68,141,40); + + RingingTones[0].menu=40; /* How many ringtones in phone */ + } + RingingTones[0].code=true; + } +} + +/* returns names from code or number in menu */ +char *RingingToneName(int code, int menu) +{ + int index=1; + GSM_Error error; + + if (code==0) + { + while (strcmp(RingingTones[index].name,"")) { + if (RingingTones[index].menu==menu) break; + index++; + } + } else + { + while (strcmp(RingingTones[index].name,"")) { + if (RingingTones[index].code==code) break; + index++; + } + } + + if (!strncmp(RingingTones[index].name,"Uploaded ",9)) { + ringtone.location=atoi(&RingingTones[index].name[10]); + + error=GSM_GetPhoneRingtone(&ringtone,&SMringtone); + + if (error==GE_NONE) { + if (GetModelFeature (FN_RINGTONES)==F_RING_SM) return SMringtone.name; + else return ringtone.name; + } + } + + return RingingTones[index].name; +} + +/* returns code from number in menu */ +int RingingToneCode(int menu) +{ + int index=1; + + while ( RingingTones[index].menu!=menu) index++; + + return RingingTones[index].code; +} + +/* returns number in menu from code */ +int RingingToneMenu(int code) +{ + int index=1; + + while ( RingingTones[index].code!=code) index++; + + return RingingTones[index].menu; +} + +int NumberOfRingtones() +{ + return RingingTones[0].menu; +} + +int GSM_SaveRingtoneToSMS(GSM_MultiSMSMessage *SMS, + GSM_Ringtone *ringtone, bool profilestyle) +{ + int i, j; + unsigned char MessageBuffer[GSM_MAX_SMS_8_BIT_LENGTH*4]; + unsigned char MessageBuffer2[GSM_MAX_SMS_8_BIT_LENGTH*4]; + int MessageLength; + GSM_UDH UDHType; + + EncodeUDHHeader(MessageBuffer, GSM_RingtoneUDH); + MessageLength=GSM_MAX_SMS_8_BIT_LENGTH-(MessageBuffer[0]+1); + i=GSM_PackRingtone(ringtone, MessageBuffer, &MessageLength); + + if (i!=ringtone->NrNotes && profilestyle) + { + MessageLength=0; + MessageBuffer[MessageLength++]=0x30; //SM version. Here 3.0 + MessageBuffer[MessageLength++]=SM30_RINGTONE; //ID for ringtone + + MessageBuffer[MessageLength++]=0x01; //length hi.Later changed + MessageBuffer[MessageLength++]=0x00; //length lo.Later changed + + j=SM30_MAX_RINGTONE_FRAME_LENGTH; + i=GSM_PackRingtone(ringtone, MessageBuffer2, &j); + MessageLength=MessageLength+j; + memcpy(MessageBuffer+4,MessageBuffer2,j); + + MessageBuffer[2]=j/256; + MessageBuffer[3]=j%256; + + UDHType=GSM_ProfileUDH; + } else + UDHType=GSM_RingtoneUDH; + + GSM_MakeMultiPartSMS2(SMS,MessageBuffer,MessageLength, UDHType, GSM_Coding_Default); + + return i; +} + +GSM_Error GSM_GetPhoneRingtone(GSM_BinRingtone *ringtone,GSM_Ringtone *SMringtone) +{ + GSM_Error error; + int i; + + error=GSM->GetBinRingtone(ringtone); + + if (error==GE_UNKNOWNMODEL) + { + /* In 3310,... we have normal "Smart Messaging" format */ + if (GetModelFeature (FN_RINGTONES)==F_RING_SM) { + i=7; + if (ringtone->frame[9]==0x4a && ringtone->frame[10]==0x3a) i=8; + ringtone->frame[i]=0x02; + + GSM_UnPackRingtone(SMringtone, ringtone->frame+i, ringtone->length-i); + + return GE_NONE; + } + } + + return error; +} diff --git a/common/gsm-sms.c b/common/gsm-sms.c new file mode 100644 index 0000000..52020c1 --- /dev/null +++ b/common/gsm-sms.c @@ -0,0 +1,1020 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#include +#include +#include +#include +#include + +#include "gsm-api.h" +#include "gsm-coding.h" + +/* User data headers */ +GSM_UDHHeader UDHHeaders[] = { + { GSM_ConcatenatedMessages, 0x05, "\x00\x03\x01\x00\x00" }, + /* See GSM 03.40 section 9.2.3.24.1 */ + { GSM_DisableVoice, 0x04, "\x01\x02\x00\x00" }, + { GSM_DisableFax, 0x04, "\x01\x02\x01\x00" }, + { GSM_DisableEmail, 0x04, "\x01\x02\x02\x00" }, + { GSM_EnableVoice, 0x04, "\x01\x02\x00\x01" }, + { GSM_EnableFax, 0x04, "\x01\x02\x01\x01" }, + { GSM_EnableEmail, 0x04, "\x01\x02\x02\x01" }, + /* See GSM 03.40 section 9.2.3.24.2 for voice, fax and email messages */ + { GSM_VoidSMS, 0x08, "\x01\x02\x02\x01\x01\x02\x02\x00" }, + /* When send such SMS to some phones, they don't display anything, + only beep and enable vibra/light */ + { GSM_BugSMS, 0x09, "\x01\x02\x02\x01\x01\x02\x02\x00\xc0" }, + + /* Short Smart Messaging UDH */ + /* General format: */ + /* 1 byte 0x05 : IEI application port addressing scheme, 16 bit address */ + /* 1 byte 0x04 : IEI length */ + /* 2 bytes : destination address: high & low byte */ + /* 2 bytes 0x00 0x00: originator address: high & low byte */ + { GSM_RingtoneUDH, 0x06, "\x05\x04\x15\x81\x00\x00" }, + { GSM_OpLogo, 0x06, "\x05\x04\x15\x82\x00\x00" }, + { GSM_CallerIDLogo, 0x06, "\x05\x04\x15\x83\x00\x00" }, + { GSM_WAPBookmarkUDH, 0x06, "\x05\x04\xc3\x4f\x00\x00" }, + + /* Long Smart Messaging UDH */ + /* General format: */ + /* 1 byte 0x05 : IEI application port addressing scheme, 16 bit address */ + /* 1 byte 0x04 : IEI length */ + /* 2 bytes 0x00 0x00: destination address: high & low byte */ + /* 2 bytes 0x00 0x00: originator address: high & low byte */ + /* 1 byte 0x00 : null byte for end first part ? */ + /* 1 byte 0x03 : length for rest ? */ + /* 1 byte */ + /* 1 byte : number of all SMS */ + /* 1 byte : number of current SMS */ + { GSM_CalendarNoteUDH, 0x0b, "\x05\x04\x00\xe4\x00\x00\x00\x03\xc7\x00\x00" }, //from 3310 ? + { GSM_CalendarNoteUDH2, 0x0b, "\x05\x04\x23\xf5\x00\x00\x00\x03\x01\x00\x00" }, //from 6210 or 9210 Note: last 0x01 changes according to note type + { GSM_ProfileUDH, 0x0b, "\x05\x04\x15\x8a\x00\x00\x00\x03\xce\x00\x00" }, + { GSM_WAPBookmarkUDH, 0x0b, "\x05\x04\xc3\x4f\x00\x00\x00\x03\x01\x00\x00" },//note last 0x01 can change + { GSM_WAPSettingsUDH, 0x0b, "\x05\x04\xc3\x4f\x00\x00\x00\x03\x7f\x00\x00" }, + { GSM_PhonebookUDH, 0x0b, "\x05\x04\x23\xf4\x00\x00\x00\x03\x01\x00\x00" }, + + { GSM_NoUDH, 0x00, "" } +}; + +#define ByteMask ((1 << Bits) - 1) + +int GSM_PackSevenBitsToEight(int offset, unsigned char *input, unsigned char *output) +{ + unsigned char *OUT = output; /* Current pointer to the output buffer */ + unsigned char *IN = input; /* Current pointer to the input buffer */ + int Bits; /* Number of bits directly copied to + the output buffer */ + Bits = (7 + offset) % 8; + + /* If we don't begin with 0th bit, we will write only a part of the + first octet */ + if (offset) { + *OUT = 0x00; + OUT++; + } + + while ((IN - input) < strlen(input)) { + unsigned char Byte = EncodeWithDefaultAlphabet(*IN); + + *OUT = Byte >> (7 - Bits); + /* If we don't write at 0th bit of the octet, we should write + a second part of the previous octet */ + if (Bits != 7) + *(OUT-1) |= (Byte & ((1 << (7-Bits)) - 1)) << (Bits+1); + + Bits--; + + if (Bits == -1) Bits = 7; + else OUT++; + + IN++; + } + return (OUT - output); +} + +int GSM_UnpackEightBitsToSeven(int offset, int in_length, int out_length, + unsigned char *input, unsigned char *output) +{ + unsigned char *OUT = output; /* Current pointer to the output buffer */ + unsigned char *IN = input; /* Current pointer to the input buffer */ + unsigned char Rest = 0x00; + int Bits; + + Bits = offset ? offset : 7; + + while ((IN - input) < in_length) { + + *OUT = ((*IN & ByteMask) << (7 - Bits)) | Rest; + Rest = *IN >> Bits; + + /* If we don't start from 0th bit, we shouldn't go to the + next char. Under *OUT we have now 0 and under Rest - + _first_ part of the char. */ + if ((IN != input) || (Bits == 7)) OUT++; + IN++; + + if ((OUT - output) >= out_length) break; + + /* After reading 7 octets we have read 7 full characters but + we have 7 bits as well. This is the next character */ + if (Bits == 1) { + *OUT = Rest; + OUT++; + Bits = 7; + Rest = 0x00; + } else { + Bits--; + } + } + + return OUT - output; +} + +/* This function implements packing of numbers (SMS Center number and + destination number) for SMS sending function. */ +/* See GSM 03.40 9.1.1: + 1 byte - length of number given in semioctets or bytes (when given in bytes, + includes one byte for byte with number format. + Returned by function (set semioctet to true, if want result + in semioctets). + 1 byte - format of number. See GSM_NumberType; in gsm-common.h. Returned + in u8 *Output. + n bytes - 2n or 2n-1 semioctets with number. For some types of numbers + in the most significant bits of the last byte with 0x0f + (1111 binary) are filled if the number is represented + with odd number of digits. Returned in u8 *Output. */ +/* 1 semioctet = 4 bits = half of byte */ +int GSM_PackSemiOctetNumber(u8 *Number, u8 *Output, bool semioctet) { + + u8 *IN=Number; /* Pointer to the input number */ + u8 *OUT=Output; /* Pointer to the output */ + int length=0,j; + unsigned char format=GNT_UNKNOWN; // format of number used by us + + /* Checking for format number */ + while (*IN) { + if (length==0 && *IN=='+') + format=GNT_INTERNATIONAL; // first byte is '+'. It can be international + else { + if (*IN>'9' || *IN<'0') { + format=GNT_ALPHANUMERIC; //char is not number. It must be alphanumeric + } + } + IN++;length++; + } + + /* Now we return to first byte */ + for (j=0;jDay,DT->Month,DT->Year,DT->Hour,DT->Minute,DT->Second); +#endif + + req[0]=EncodeWithBCDAlphabet(DT->Year); + req[1]=EncodeWithBCDAlphabet(DT->Month); + req[2]=EncodeWithBCDAlphabet(DT->Day); + req[3]=EncodeWithBCDAlphabet(DT->Hour); + req[4]=EncodeWithBCDAlphabet(DT->Minute); + req[5]=EncodeWithBCDAlphabet(DT->Second); + + /* FIXME: do it */ + req[6]=0; /* TimeZone = +-0 */ + + return GE_NONE; +} + +/* See GSM 03.40 section 9.2.3.11 */ +GSM_Error GSM_DecodeSMSDateTime(GSM_DateTime *DT, unsigned char *req) +{ + DT->Year = DecodeWithBCDAlphabet(req[0]); + DT->Month = DecodeWithBCDAlphabet(req[1]); + DT->Day = DecodeWithBCDAlphabet(req[2]); + DT->Hour = DecodeWithBCDAlphabet(req[3]); + DT->Minute = DecodeWithBCDAlphabet(req[4]); + DT->Second = DecodeWithBCDAlphabet(req[5]); + + DT->Timezone=(10*(req[6]&0x07)+(req[6]>>4))/4; + if (req[6]&0x08) DT->Timezone = -DT->Timezone; + +#ifdef DEBUG + fprintf(stdout, _("%d%d-"), req[0]&0xf, req[0]>>4); + fprintf(stdout, _("%d%d-"), req[1]&0xf, req[1]>>4); + fprintf(stdout, _("%d%d "), req[2]&0xf, req[2]>>4); + fprintf(stdout, _("%d%d:"), req[3]&0xf, req[3]>>4); + fprintf(stdout, _("%d%d:"), req[4]&0xf, req[4]>>4); + fprintf(stdout, _("%d%d "), req[5]&0xf, req[5]>>4); + + if (req[6]) { + if (req[6] & 0x08) fprintf(stdout, "-"); + else fprintf(stdout, "+"); + + fprintf(stdout, _("%02d00"), (10*(req[6]&0x07)+(req[6]>>4))/4); + } + + fprintf(stdout, "\n"); +#endif + + return GE_NONE; +} + +int GSM_EncodeETSISMSSubmitData(GSM_SMSMessage *SMS, GSM_ETSISMSMessage *ETSI) +{ + int off,size=0,size2=0,w,i; + + /* off - length of the user data header */ + off = 0; + + if (SMS->UDHType) { + /* GSM 03.40 section 9.2.3.23 (TP-User-Data-Header-Indicator) */ + ETSI->firstbyte |= 0x40; + + /* off - length of the user data header */ + off = 1 + SMS->UDH[0]; + + /* we copy the udh */ + memcpy(ETSI->MessageText, SMS->UDH, off); + +// if (SMS->UDHType==GSM_HangSMS) ETSI->TPDCS=0x08; //Such SMS hangs phone (5110, 5.07), + //when saved to Outbox atry try to read it + /*from phone's menu*/ + } + + switch (SMS->Coding) { + /* When save SMS to SIM and it's 8 bit SMS, + "Edit" is not displayed in phone menu and + "Message cannot be displayed here" instead of message text */ + case GSM_Coding_8bit: + + /* the mask for the 8-bit data */ + /* GSM 03.40 section 9.2.3.10 (TP-Data-Coding-Scheme) and GSM 03.38 section 4 */ + ETSI->TPDCS |= 0xf4; + + memcpy(ETSI->MessageText + off, SMS->MessageText, SMS->Length); + + size2 = size = SMS->Length+off; + + break; + + case GSM_Coding_Default: + + w=(7-off)%7; + if (w<0) w=(14-off)%14; + + size = GSM_PackSevenBitsToEight(w, SMS->MessageText, ETSI->MessageText + off); + size += off; + size2 = (off*8 + w) / 7 + strlen(SMS->MessageText); + + break; + + case GSM_Coding_Unicode: + + /* GSM 03.40 section 9.2.3.10 (TP-Data-Coding-Scheme) and GSM 03.38 section 4 */ + ETSI->TPDCS |= 0x08; + +#ifdef DEBUG + fprintf(stdout,_("SMS Length is %i\n"),strlen(SMS->MessageText)); +#endif + + EncodeUnicode (ETSI->MessageText+off,SMS->MessageText,strlen(SMS->MessageText)); + /* here we code "special" chars */ + for (i=0;iMessageText);i++) { + if (SMS->MessageText[i]=='~') ETSI->MessageText[off+1+i*2]=1; //enables/disables blinking + if (SMS->MessageText[i]=='`') ETSI->MessageText[off+1+i*2]=0; //hides rest ot contents + } + + size=size2=strlen(SMS->MessageText)*2+off; + + break; + } + + /* FIXME: support for compression */ + /* GSM 03.40 section 9.2.3.10 (TP-Data-Coding-Scheme) and GSM 03.38 section 4 */ + /* See also GSM 03.42 */ + /* if (SMS->Compression) ETSI->TPDCS |= 0x20; */ + + /* SMS->Length is: + - integer representation of the number od octets within the user data when UD is coded using 8bit data + - the sum of the number of septets in UDH including any padding and number of septets in UD in other case */ + /* GSM 03.40 section 9.2.3.16 (TP-User-Data-Length) */ + ETSI->TPUDL = size2; + + return size; +} + +GSM_Error GSM_DecodeETSISMSSubmitData(GSM_SMSMessage *SMS, GSM_ETSISMSMessage *ETSI) +{ + int off,w,i,tmp=0; + unsigned char output[161]; + bool UDHOK; + + /* off - length of the user data header */ + off = 0; + + SMS->UDHType = GSM_NoUDH; + + if (ETSI->firstbyte & 64) { /* UDH header available */ + + off = (ETSI->MessageText[0] + 1); /* Length of UDH header */ + + /* Copy UDH header into SMS->UDH */ + for (i = 0; i < off; i++) SMS->UDH[i] = ETSI->MessageText[i]; + +#ifdef DEBUG + fprintf(stdout, " UDH header available (length %i",off); +#endif + + SMS->UDHType = GSM_UnknownUDH; + + i=-1; + while (true) { + i++; + if (UDHHeaders[i].UDHType==GSM_NoUDH) break; + tmp=UDHHeaders[i].Length; + if (tmp==SMS->UDH[0]) { //if length is the same + + if (tmp==0x05) tmp=tmp-2;/*two last bytes can be different for such UDH*/ + if (tmp==0x0b) tmp=tmp-3;/*three last bytes can be different for such UDH*/ + + UDHOK=true; + for (w=0;wUDH[w+1]) { + UDHOK=false; + break; + } + } + if (UDHOK) { + SMS->UDHType=UDHHeaders[i].UDHType; + break; + } + } + } + +#ifdef DEBUG + switch (SMS->UDHType) { + case GSM_ConcatenatedMessages: + fprintf(stdout,_(", concatenated (linked) message %d/%d"),SMS->UDH[5],SMS->UDH[4]);break; + case GSM_DisableVoice: + fprintf(stdout,_(", disables voice indicator"));break; + case GSM_EnableVoice: + fprintf(stdout,_(", enables voice indicator"));break; + case GSM_DisableFax: + fprintf(stdout,_(", disables fax indicator"));break; + case GSM_EnableFax: + fprintf(stdout,_(", enables fax indicator"));break; + case GSM_DisableEmail: + fprintf(stdout,_(", disables email indicator"));break; + case GSM_EnableEmail: + fprintf(stdout,_(", enables email indicator"));break; + case GSM_VoidSMS: + fprintf(stdout,_(", void SMS"));break; + case GSM_WAPBookmarkUDH: + fprintf(stdout,_(", WAP Bookmark"));break; + case GSM_WAPBookmarkUDHLong: + fprintf(stdout,_(", WAP Bookmark, part %i/%i"),SMS->UDH[11],SMS->UDH[10]);break; + case GSM_WAPSettingsUDH: + fprintf(stdout,_(", WAP Settings, part %i/%i"),SMS->UDH[11],SMS->UDH[10]);break; + case GSM_RingtoneUDH: + fprintf(stdout,_(", ringtone"));break; + case GSM_OpLogo: + fprintf(stdout,_(", GSM Operator Logo"));break; + case GSM_CallerIDLogo: + fprintf(stdout,_(", Caller Logo"));break; + case GSM_ProfileUDH: + fprintf(stdout,_(", Profile SMS, part %i/%i"),SMS->UDH[11],SMS->UDH[10]);break; + case GSM_CalendarNoteUDH: + fprintf(stdout,_(", Calendar note SMS, part %i/%i"),SMS->UDH[11],SMS->UDH[10]);break; + case GSM_CalendarNoteUDH2: + fprintf(stdout,_(", Calendar note SMS, part %i/%i"),SMS->UDH[11],SMS->UDH[10]);break; + case GSM_PhonebookUDH: + fprintf(stdout,_(", Phonebook Entry, part %i/%i"),SMS->UDH[11],SMS->UDH[10]);break; + default: + fprintf(stdout,_(", UNKNOWN"));break; + } + + fprintf(stdout, ")\n"); + + hexdump(off,SMS->UDH); +#endif + } + + SMS->Coding = GSM_Coding_Default; + + /* GSM 03.40 section 9.2.3.10 (TP-Data-Coding-Scheme) and GSM 03.38 section 4 */ + if ((ETSI->TPDCS & 0xf4) == 0xf4) SMS->Coding=GSM_Coding_8bit; + if ((ETSI->TPDCS & 0x08) == 0x08) SMS->Coding=GSM_Coding_Unicode; + + switch (SMS->Coding) { + case GSM_Coding_Default: + w=(7-off)%7; + if (w<0) w=(14-off)%14; + + SMS->Length=ETSI->TPUDL - (off*8 + w) / 7; + + tmp=GSM_UnpackEightBitsToSeven(w,ETSI->TPUDL-off, SMS->Length, ETSI->MessageText+off, output); + +#ifdef DEBUG + fprintf(stdout, " 7 bit SMS, body is (length %i): ",SMS->Length); +#endif /* DEBUG */ + + DecodeDefault (SMS->MessageText, output, SMS->Length); + +#ifdef DEBUG + fprintf(stdout, "%s\n",SMS->MessageText); +#endif + + break; + case GSM_Coding_8bit: + SMS->Length=ETSI->TPUDL - off; + + memcpy(SMS->MessageText,ETSI->MessageText+off,SMS->Length); + +#ifdef DEBUG + fprintf(stdout, " 8 bit SMS, body is (length %i)\n",SMS->Length); + hexdump(SMS->Length,SMS->MessageText); +#endif /* DEBUG */ + + break; + case GSM_Coding_Unicode: + SMS->Length=(ETSI->TPUDL - off) / 2; + +#ifdef DEBUG + fprintf(stdout, " 7 bit SMS, body is (length %i), Unicode coding: ",SMS->Length); + for (i=0; iLength;i++) { + fprintf(stdout, "[%02x %02x]", ETSI->MessageText[off+i*2] , ETSI->MessageText[off+i*2+1]); + } + fprintf(stdout, "\n"); +#endif /* DEBUG */ + + /* here we decode "special" chars */ + for (i=0; iLength;i++) { + if (ETSI->MessageText[off+i*2] ==0x00 && + ETSI->MessageText[off+i*2+1]==0x01) + ETSI->MessageText[off+i*2+1]='~'; //enables/disables blinking + if (ETSI->MessageText[off+i*2] ==0x00 && + ETSI->MessageText[off+i*2+1]==0x00) + ETSI->MessageText[off+i*2+1]='`'; //hides rest ot contents + } + + DecodeUnicode (SMS->MessageText, ETSI->MessageText+off, SMS->Length); + + break; + } + + return GE_NONE; +} + +GSM_Error GSM_DecodeETSISMSStatusReportData(GSM_SMSMessage *SMS, GSM_ETSISMSMessage *ETSI) +{ + /* See GSM 03.40 section 9.2.3.11 (TP-Service-Centre-Time-Stamp) */ +#ifdef DEBUG + fprintf(stdout, _(" SMSC response date: ")); +#endif + GSM_DecodeSMSDateTime(&SMS->SMSCTime, ETSI->SMSCDateTime); + + if (ETSI->TPStatus < 0x03) { + strcpy(SMS->MessageText,_("Delivered")); + +#ifdef DEBUG + /* more detailed reason only for debug */ + /* See GSM 03.40 section 9.2.3.15 (TP-Status) */ + switch (ETSI->TPStatus) { + case 0x00: fprintf(stdout, _(" SM received by the SME"));break; + case 0x01: fprintf(stdout, _(" SM forwarded by the SC to the SME but the SC is unable to confirm delivery"));break; + case 0x02: fprintf(stdout, _(" SM replaced by the SC"));break; + } +#endif /* DEBUG */ + + SMS->Length = 10; + + } else if (ETSI->TPStatus & 0x40) { + + strcpy(SMS->MessageText,_("Failed")); + +#ifdef DEBUG + /* more detailed reason only for debug */ + if (ETSI->TPStatus & 0x20) { + + /* See GSM 03.40 section 9.2.3.15 (TP-Status) */ + fprintf(stdout, _(" Temporary error, SC is not making any more transfer attempts\n")); + switch (ETSI->TPStatus) { + case 0x60: fprintf(stdout, _(" Congestion"));break; + case 0x61: fprintf(stdout, _(" SME busy"));break; + case 0x62: fprintf(stdout, _(" No response from SME"));break; + case 0x63: fprintf(stdout, _(" Service rejected"));break; + case 0x64: fprintf(stdout, _(" Quality of service not available"));break; + case 0x65: fprintf(stdout, _(" Error in SME"));break; + default : fprintf(stdout, _(" Reserved/Specific to SC: %x"),ETSI->TPStatus);break; + } + + } else { + + /* See GSM 03.40 section 9.2.3.15 (TP-Status) */ + fprintf(stdout, _(" Permanent error, SC is not making any more transfer attempts\n")); + switch (ETSI->TPStatus) { + case 0x40: fprintf(stdout, _(" Remote procedure error"));break; + case 0x41: fprintf(stdout, _(" Incompatibile destination"));break; + case 0x42: fprintf(stdout, _(" Connection rejected by SME"));break; + case 0x43: fprintf(stdout, _(" Not obtainable"));break; + case 0x44: fprintf(stdout, _(" Quality of service not available"));break; + case 0x45: fprintf(stdout, _(" No internetworking available"));break; + case 0x46: fprintf(stdout, _(" SM Validity Period Expired"));break; + case 0x47: fprintf(stdout, _(" SM deleted by originating SME"));break; + case 0x48: fprintf(stdout, _(" SM Deleted by SC Administration"));break; + case 0x49: fprintf(stdout, _(" SM does not exist"));break; + default : fprintf(stdout, _(" Reserved/Specific to SC: %x"),ETSI->TPStatus);break; + } + } +#endif /* DEBUG */ + + SMS->Length = 6; + } else if (ETSI->TPStatus & 0x20) { + strcpy(SMS->MessageText,_("Pending")); + +#ifdef DEBUG + /* more detailed reason only for debug */ + /* See GSM 03.40 section 9.2.3.15 (TP-Status) */ + fprintf(stdout, _(" Temporary error, SC still trying to transfer SM\n")); + switch (ETSI->TPStatus) { + case 0x20: fprintf(stdout, _(" Congestion"));break; + case 0x21: fprintf(stdout, _(" SME busy"));break; + case 0x22: fprintf(stdout, _(" No response from SME"));break; + case 0x23: fprintf(stdout, _(" Service rejected"));break; + case 0x24: fprintf(stdout, _(" Quality of service not aviable"));break; + case 0x25: fprintf(stdout, _(" Error in SME"));break; + default : fprintf(stdout, _(" Reserved/Specific to SC: %x"),ETSI->TPStatus);break; + } +#endif /* DEBUG */ + SMS->Length = 7; + } else { + strcpy(SMS->MessageText,_("Unknown")); + +#ifdef DEBUG + /* more detailed reason only for debug */ + fprintf(stdout, _(" Reserved/Specific to SC: %x"),ETSI->TPStatus); +#endif /* DEBUG */ + SMS->Length = 8; + } + +#ifdef DEBUG + fprintf(stdout, _("\n")); +#endif /* DEBUG */ + + return GE_NONE; +} + +GSM_Error GSM_EncodeETSISMSSubmitHeader(GSM_SMSMessage *SMS,GSM_ETSISMSMessage *ETSI) +{ + GSM_Error error; + + /* First of all we should get SMSC number */ + if (SMS->MessageCenter.No) { + error = GSM->GetSMSCenter(&SMS->MessageCenter); + if (error != GE_NONE) return error; + SMS->MessageCenter.No = 0; + } + +#ifdef DEBUG + fprintf(stdout, _("Packing SMS to \"%s\" via message center \"%s\"\n"), SMS->Destination, SMS->MessageCenter.Number); +#endif /* DEBUG */ + + ETSI->SMSCNumber[0]=GSM_PackSemiOctetNumber(SMS->MessageCenter.Number, ETSI->SMSCNumber+1, false); + + /* GSM 03.40 section 9.2.3.17 (TP-Reply-Path) */ + if (SMS->ReplyViaSameSMSC) ETSI->firstbyte |= 128; + + /* When save to Outbox with SMS Class, "Edit" is not displayed in phone menu + and can forward it to another phone with set class (for example, 0=Flash) */ + /* Message Class*/ + /* GSM 03.40 section 9.2.3.10 (TP-Data-Coding-Scheme) and GSM 03.38 section 4 */ + if (SMS->Class>=0 && SMS->Class<5) ETSI->TPDCS |= (240+SMS->Class); + + /* When is not set for SMS saved for Inbox, phone displays "Message" instead + of number and doesn't display "Details" info */ + ETSI->Number[0] = GSM_PackSemiOctetNumber(SMS->Destination, ETSI->Number+1, true); + + return GE_NONE; +} + +GSM_Error GSM_DecodeETSISMSHeader(GSM_SMSMessage *SMS, GSM_ETSISMSMessage *ETSI) +{ +#ifdef DEBUG + fprintf(stdout, _(" SMS center number: %s"), GSM_UnpackSemiOctetNumber(ETSI->SMSCNumber,false)); + if (SMS->folder==0 && (ETSI->firstbyte & 128)!=0) //GST_INBOX + fprintf(stdout, _(" (centre set for reply)")); +#endif + + strcpy(SMS->MessageCenter.Number, GSM_UnpackSemiOctetNumber(ETSI->SMSCNumber,false)); + + SMS->ReplyViaSameSMSC=false; + if ((ETSI->firstbyte & 128)!=0) SMS->ReplyViaSameSMSC=true; + +#ifdef DEBUG + fprintf(stdout, _("\n Remote number (recipient or sender): %s\n"), GSM_UnpackSemiOctetNumber(ETSI->Number,true)); +#endif + + strcpy(SMS->Sender, GSM_UnpackSemiOctetNumber(ETSI->Number,true)); + + return GE_NONE; +} + +/* FIXME: we should allow for all validity formats */ +GSM_Error GSM_EncodeETSISMSSubmitValidity(GSM_SMSMessage *SMS,GSM_ETSISMSMessage *ETSI) +{ + /* GSM 03.40 section 9.2.3.3 (TP-Validity-Period-Format) */ + /* Bits 4 and 3: 10. TP-VP field present and integer represent (relative) */ + ETSI->firstbyte |= 0x10; + + /* GSM 03.40 section 9.2.3.12 (TP-Validity Period) */ + /* FIXME: error-checking for correct Validity - it should not be bigger then + 63 weeks and smaller then 5minutes. We should also test intervals because + the SMS->Validity to TP-VP is not continuos. I think that the simplest + solution will be an array of correct values. We should parse it and if we + find the closest TP-VP value we should use it. Or is it good to take + closest smaller TP-VP as we do now? I think it is :-) */ + + /* 5 minutes intervals up to 12 hours = 720 minutes */ + if (SMS->Validity <= 720) + ETSI->TPVP = (unsigned char) (SMS->Validity/5)-1; + + /* 30 minutes intervals up to 1 day */ + else if ((SMS->Validity > 720) && (SMS->Validity <= 1440)) + ETSI->TPVP = (unsigned char) ((SMS->Validity-720)/30)+143; + + /* 1 day intervals up to 30 days */ + else if ((SMS->Validity > 1440) && (SMS->Validity <= 43200)) + ETSI->TPVP = (unsigned char) (SMS->Validity/1440)+166; + + /* 1 week intervals up to 63 weeks */ + else if ((SMS->Validity > 43200) && (SMS->Validity <= 635040)) + ETSI->TPVP = (unsigned char) (SMS->Validity/10080)+192; + + return GE_NONE; +} + +/* FIXME: do we need more than SMS_Submit and SMS_Deliver ? */ +GSM_Error GSM_EncodeETSISMS(GSM_SMSMessage *SMS, GSM_ETSISMSMessage *ETSI, SMS_MessageType PDU, int *length) +{ + int size=0; + + ETSI->firstbyte=0; + ETSI->TPPID=0; + ETSI->TPDCS=0; + ETSI->TPUDL=0; + ETSI->TPStatus=0; + ETSI->TPVP=0; + + switch (PDU) { + case SMS_Submit: + + /* GSM 03.40 section 9.2.3.1 (TP-Message-Type-Indicator) */ + /* Bits 1 and 0: 01. SMS-Submit */ + ETSI->firstbyte |= 0x01; + + /* GSM 03.40 section 9.2.3.5 (TP-Status-Raport-Request) */ + /* Mask for request for delivery report from SMSC */ + if (SMS->Type == GST_DR) ETSI->firstbyte |= 32; + + GSM_EncodeETSISMSSubmitHeader(SMS, ETSI); + GSM_EncodeETSISMSSubmitValidity(SMS, ETSI); + size=GSM_EncodeETSISMSSubmitData(SMS, ETSI); + + break; + case SMS_Deliver: + + /* GSM 03.40 section 9.2.3.1 (TP-Message-Type-Indicator) */ + /* Bits 1 and 0: 00. SMS-Deliver */ + ETSI->firstbyte |= 0x00; + + GSM_EncodeETSISMSSubmitHeader(SMS, ETSI); + GSM_EncodeSMSDateTime(&SMS->Time, ETSI->DeliveryDateTime); + size=GSM_EncodeETSISMSSubmitData(SMS, ETSI); + + break; + default: + break; + } + + /* size is the length of the data in octets including udh */ + *length=size; + + return GE_NONE; +} + +/* This function decodes parts of SMS coded according to GSM 03.40 + (given in GSM_ETSISMSMessage) to GSM_SMSMessage */ +GSM_Error GSM_DecodeETSISMS(GSM_SMSMessage *SMS, GSM_ETSISMSMessage *ETSI) +{ + SMS_MessageType PDU=SMS_Deliver; + + /* See GSM 03.40 section 9.2.3.1 */ + if ((ETSI->firstbyte & 0x03) == 0x01) PDU=SMS_Submit; + if ((ETSI->firstbyte & 0x03) == 0x02) PDU=SMS_Status_Report; + + GSM_DecodeETSISMSHeader(SMS, ETSI); + + switch (PDU) { + case SMS_Submit: +#ifdef DEBUG + fprintf(stdout, _(" SMS submit ")); +#endif + SMS->SMSData=false; + GSM_DecodeETSISMSSubmitData(SMS,ETSI); + break; + case SMS_Deliver: +#ifdef DEBUG + fprintf(stdout, _(" SMS deliver ")); + fprintf(stdout, _(" Date: ")); +#endif + SMS->SMSData=true; + GSM_DecodeSMSDateTime(&SMS->Time, ETSI->DeliveryDateTime); + GSM_DecodeETSISMSSubmitData(SMS,ETSI); + break; + case SMS_Status_Report: +#ifdef DEBUG + fprintf(stdout, _(" SMS status report ")); + fprintf(stdout, _(" Date: ")); +#endif + SMS->SMSData=true; + GSM_DecodeSMSDateTime(&SMS->Time, ETSI->DeliveryDateTime); + GSM_DecodeETSISMSStatusReportData(SMS,ETSI); + break; + default: + break; + } + + SMS->MessageText[SMS->Length]=0; + + return GE_NONE; +} + +void GSM_SetDefaultSMSData (GSM_SMSMessage *SMS) +{ + struct tm *now; + time_t nowh; + GSM_DateTime Date; + + /* Default settings for SMS message: + - no delivery report + - Class Message 1 + - no compression + - SMSC no. 1 + - validity 3 days */ + + SMS->folder = GST_OUTBOX; + SMS->Type = GST_SMS; + SMS->Class = -1; + SMS->Compression = false; + SMS->MessageCenter.No = 1; + SMS->Validity = 4320; /* 4320 minutes == 72 hours */ + SMS->ReplyViaSameSMSC = false; + SMS->UDHType = GSM_NoUDH; + SMS->Coding=GSM_Coding_Default; + strcpy(SMS->Destination,""); + + /* This part is required to save SMS */ + + SMS->Status = GSS_NOTSENTREAD; + SMS->Location = 0; + + nowh=time(NULL); + now=localtime(&nowh); + + Date.Year = now->tm_year; + Date.Month = now->tm_mon+1; + Date.Day = now->tm_mday; + Date.Hour = now->tm_hour; + Date.Minute = now->tm_min; + Date.Second = now->tm_sec; + + /* I have 100 (for 2000) Year now :-) */ + if (Date.Year>99 && Date.Year<1900) { + Date.Year=Date.Year+1900; + } + + /* We need to have only two last digits of year */ + if (Date.Year>1900) + { + if (Date.Year<2000) Date.Year = Date.Year-1900; + else Date.Year = Date.Year-2000; + } + + SMS->Time.Year=Date.Year; + SMS->Time.Month=Date.Month; + SMS->Time.Day=Date.Day; + SMS->Time.Hour=Date.Hour; + SMS->Time.Minute=Date.Minute; + SMS->Time.Second=Date.Second; + + SMS->Name[0]=0; +} + +/* This function encodes the UserDataHeader as described in: + - GSM 03.40 version 6.1.0 Release 1997, section 9.2.3.24 + - Smart Messaging Specification, Revision 1.0.0, September 15, 1997 +*/ +GSM_Error EncodeUDHHeader(char *text, GSM_UDH UDHType) +{ + int i=0; + + if (UDHType!=GSM_NoUDH) { + while (true) { + if (UDHHeaders[i].UDHType==GSM_NoUDH) { +#ifdef DEBUG + fprintf(stderr,_("Not supported User Data Header type\n")); +#endif + break; + } + if (UDHHeaders[i].UDHType==UDHType) { + text[0] = UDHHeaders[i].Length; // UDH Length + memcpy(text+1, UDHHeaders[i].Text, UDHHeaders[i].Length); + break; + } + i++; + } + } + return GE_NONE; +} + +int GSM_MakeSinglePartSMS2(GSM_SMSMessage *SMS, + unsigned char *MessageBuffer,int cur, GSM_UDH UDHType, GSM_Coding_Type Coding){ + + int j; + int current,smsudhlength; + + GSM_SetDefaultSMSData(SMS); + + EncodeUDHHeader(SMS->UDH, UDHType); + SMS->UDHType=UDHType; + + switch (UDHType) { + case GSM_EnableVoice: + case GSM_DisableVoice: + case GSM_EnableEmail: + case GSM_DisableEmail: + case GSM_EnableFax: + case GSM_DisableFax: + SMS->Class=1; + SMS->Coding=Coding; + break; + case GSM_NoUDH: + case GSM_ConcatenatedMessages: + case GSM_VoidSMS: + case GSM_HangSMS: + case GSM_BugSMS: + case GSM_PhonebookUDH: + case GSM_CalendarNoteUDH: //class=1? + SMS->Class=-1; + SMS->Coding=Coding; + break; + case GSM_OpLogo: + case GSM_CallerIDLogo: + case GSM_RingtoneUDH: + case GSM_WAPBookmarkUDH: + case GSM_WAPBookmarkUDHLong: + case GSM_WAPSettingsUDH: + case GSM_ProfileUDH: + SMS->Class=1; + SMS->Coding=GSM_Coding_8bit; + break; + default: + fprintf(stderr,_("Error in makesinglepartsms !\n\n\n")); + } + + current=cur; + + smsudhlength=0; + if (UDHType!=GSM_NoUDH) + smsudhlength=SMS->UDH[0]+1; + + j=0; + switch (SMS->Coding) { + case GSM_Coding_8bit: + j=(GSM_MAX_SMS_8_BIT_LENGTH-smsudhlength); //max=140 + break; + case GSM_Coding_Default: + j=(GSM_MAX_SMS_8_BIT_LENGTH-smsudhlength)*8/7; //max=160 + break; + case GSM_Coding_Unicode: + j=(GSM_MAX_SMS_8_BIT_LENGTH-smsudhlength)/2; //max=70 + break; + } + if (current>j) current=j; + + memcpy(SMS->MessageText,MessageBuffer,current); + SMS->MessageText[current]=0; + SMS->Length=current; + + return current; +} + +void GSM_MakeMultiPartSMS2(GSM_MultiSMSMessage *SMS, + unsigned char *MessageBuffer,int MessageLength, GSM_UDH UDHType, GSM_Coding_Type Coding){ + + int i=0,j,pos=0,current=0; + + for (i=0;i<4;i++) { + if (pos==MessageLength) break; + + current=MessageLength-pos; + + pos=pos+GSM_MakeSinglePartSMS2(&SMS->SMS[i],MessageBuffer+pos,current,UDHType,Coding); + } + + for (j=0;jSMS[j].UDH[10]=i; + SMS->SMS[j].UDH[11]=j+1; + break; + case GSM_ConcatenatedMessages: + SMS->SMS[j].UDH[4]=i; + SMS->SMS[j].UDH[5]=j+1; + break; + default: + break; + } + } + + SMS->number=i; +} diff --git a/common/gsm-wap.c b/common/gsm-wap.c new file mode 100644 index 0000000..0ef16cc --- /dev/null +++ b/common/gsm-wap.c @@ -0,0 +1,255 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Functions for manipulating WAP settings and bookmarks + +*/ + +#include +#include +#include +#include +#include + +#include "gsm-common.h" +#include "gsm-wap.h" +#include "gsm-sms.h" +#include "gsm-coding.h" + +int GSM_SaveWAPBookmarkToSMS(GSM_MultiSMSMessage *SMS, + GSM_WAPBookmark *bookmark) +{ + unsigned char Data[500]; + GSM_UDH UDHType; + u16 current=0; + u8 buffer[50*3]; + + strcpy(Data+current,"\x01\x06-\x1F");current=current+4; + strcpy(Data+current,"+application/x-wap-prov.browser-bookmarks");current=current+12+29; + Data[current++]=0x00; + + strcpy(Data+current,"\x81\xEA");current=current+2; + + EncodeUTF8(buffer,bookmark->title,strlen(bookmark->title)); + if (strlen(bookmark->title)==strlen(buffer)) { + strcpy(Data+current,"\x00");current=current+1; + strcpy(Data+current,"\x01\x00");current=current+2; + } else { + strcpy(Data+current,"\x01\x01\x87\x68\x00");current=current+5; + } + + strcpy(Data+current,"\x45\xC6\x7F");current=current+3; + + /* The same to "title" block in WAP settings */ + strcpy(Data+current,"\x01\x87\x15\x11\x03");current=current+5; + if (strlen(bookmark->title)==strlen(buffer)) { + strcpy(Data+current,bookmark->title);current=current+strlen(bookmark->title); + } else { + EncodeUnicode (Data+current, bookmark->title, strlen(bookmark->title)); + current=current+2*strlen(bookmark->title); + Data[current++]=0x00; + } + Data[current++]=0x00; + + /* The same to "homepage" block in WAP settings */ + strcpy(Data+current,"\x01\x87\x17\x11\x03");current=current+5; + if (strlen(bookmark->title)==strlen(buffer)) { + strcpy(Data+current,bookmark->address);current=current+strlen(bookmark->address); + } else { + EncodeUnicode (Data+current, bookmark->address, strlen(bookmark->address)); + current=current+2*strlen(bookmark->address); + Data[current++]=0x00; + } + Data[current++]=0x00; + + /* Mark of end */ + strcpy(Data+current,"\x01\x01\x01");current=current+3; + + if (current>(140-7)) { //more than 1 SMS + UDHType=GSM_WAPBookmarkUDHLong; + } else { + UDHType=GSM_WAPBookmarkUDH; + } + + GSM_MakeMultiPartSMS2(SMS, Data,current, UDHType, GSM_Coding_Default); + + return 0; +} + +GSM_Error GSM_ReadWAPBookmark(GSM_SMSMessage *message, GSM_WAPBookmark *bookmark) +{ + unsigned char Data[250]; + int current=0,i,j; + + switch (message->UDHType) { + case GSM_WAPBookmarkUDH: + + strcpy(Data+current,"\x01\x06-\x1F");current=current+4; + strcpy(Data+current,"+application/x-wap-prov.browser-bookmarks");current=current+12+29; + Data[current++]=0x00; + + strcpy(Data+current,"\x81\xEA\x00");current=current+3; + + strcpy(Data+current,"\x01\x00");current=current+2; + strcpy(Data+current,"\x45\xC6\x7F");current=current+3; + + strcpy(Data+current,"\x01\x87\x15\x11\x03");current=current+5; + + for (i=0;iMessageText[i]!=Data[i]) return GE_UNKNOWN; + + j=0; + while (message->MessageText[current]!=0x00) { + bookmark->title[j++]=message->MessageText[current]; + current++; + } + bookmark->title[j]=0; + + current=current+6; + + j=0; + while (message->MessageText[current]!=0x00) { + bookmark->address[j++]=message->MessageText[current]; + current++; + } + bookmark->address[j]=0; + + break; + + default: /* error */ + return GE_UNKNOWN; + break; + } + + return GE_NONE; +} + +/* Made from sniff of WAP settings sent from Logo Manager with such file: +[GSMCSD] +Name=Orange +URL=http://OtherSites/ +Gateway=192.168.71.81 +; 9200=Temporary,Normal 9201=Continuous,Normal 9202=Temp,Secure 9203=Continuous,Secure +Port=9201 +DialString=+447973100501 +; Auth Type can be PAP, CHAP or MS_CHAP +PPPAuthType=PAP +PPPAuthName=Orange +PPPAuthPass=Multimedia +; ISDN or ANALOGUE +CallType=ISDN +CallSpeed=14400 + +SMS contenst: + +0106 +, +1F +*application/x-wap-prov.browser-settings +00 +81ea01016a +0045c606 +0187121145 +0187141101 +0187131103 +00 +0187211103 +00 +0187281172 +018729116b +01872211700101c608 +0187151103 + settings->title +00 +01 +0186071103 + settings->homepage +0001c67f +0187151103 + settings->title +00 +0187171103 + settings->homepage +00 +010101 +*/ + +/* Function created from software from + http://www.tektonica.com/projects/gsmsms/ */ +int GSM_SaveWAPSettingsToSMS(GSM_MultiSMSMessage *SMS, + GSM_WAPSettings *settings) +{ + unsigned char Data[500]; + u16 current=0; + + strcpy(Data+current,"\x01\x06\x04\x03\x94");current=current+5; + + strcpy(Data+current,"\x81\xEA\x00");current=current+3; + + strcpy(Data+current,"\x01\x00");current=current+2; + strcpy(Data+current,"\x45\xC6\x06");current=current+3; + + strcpy(Data+current,"\x01\x87\x12");current=current+3; + switch (settings->bearer) { + case WAPSETTINGS_BEARER_DATA:Data[current++]=0x45;break; + case WAPSETTINGS_BEARER_SMS :Data[current++]=0x41;break; + } + + strcpy(Data+current,"\x01\x87\x13\x11\x03");current=current+5; + strcpy(Data+current,settings->ipaddress);current=current+strlen(settings->ipaddress); + Data[current++]=0x00; + + strcpy(Data+current,"\x01\x87\x14");current=current+3; + if (settings->iscontinuous) { Data[current++]=0x61; } //continuous + else { Data[current++]=0x60; } //temporary + + strcpy(Data+current,"\x01\x87\x21\x11\x03");current=current+5; + strcpy(Data+current,settings->dialup);current=current+strlen(settings->dialup); + Data[current++]=0x00; + + strcpy(Data+current,"\x01\x87\x22");current=current+3; + if (settings->isnormalauthentication) { + Data[current++]=0x70;//OTA_CSD_AUTHTYPE_PAP. Correct ? + } else { + Data[current++]=0x71;//OTA_CSD_AUTHTYPE_CHAP. Correct ? + } + + strcpy(Data+current,"\x01\x87\x23\x11\x03");current=current+5; + strcpy(Data+current,settings->user);current=current+strlen(settings->user); + Data[current++]=0x00; + + strcpy(Data+current,"\x01\x87\x24\x11\x03");current=current+5; + strcpy(Data+current,settings->password);current=current+strlen(settings->password); + Data[current++]=0x00; + + strcpy(Data+current,"\x01\x87\x28");current=current+3; + if (settings->isISDNcall) { Data[current++]=0x73; } //ISDN + else { Data[current++]=0x72; } //analogue + + strcpy(Data+current,"\x01\x87\x29");current=current+3; +//use constant OTA_CSD_CALLSPEED_AUTO => '6A'; + if (settings->isspeed14400) { Data[current++]=0x6C; } //14400 + else { Data[current++]=0x6B; } //9600 + + Data[current++]=0x01; + strcpy(Data+current,"\x01\x86\x07\x11\x03");current=current+5; + strcpy(Data+current,settings->homepage);current=current+strlen(settings->homepage); + Data[current++]=0x00; + + strcpy(Data+current,"\x01\xC6\x08");current=current+3; + strcpy(Data+current,"\x01\x87\x15\x11\x03");current=current+5; + strcpy(Data+current,settings->title);current=current+strlen(settings->title); + Data[current++]=0x00; + + /* Mark of end */ + strcpy(Data+current,"\x01\x01\x01");current=current+3; + + GSM_MakeMultiPartSMS2(SMS, Data,current, GSM_WAPSettingsUDH, GSM_Coding_Default); + + return 0; +} diff --git a/common/newmodules/n7110.c b/common/newmodules/n7110.c new file mode 100644 index 0000000..78bffaf --- /dev/null +++ b/common/newmodules/n7110.c @@ -0,0 +1,3674 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This file provides an API for accessing functions on the 7110 and similar + phones. + +*/ + +/* "Turn on" prototypes in n-7110.h */ + +#define __n_7110_c + +/* System header files */ +#include +#include +#include +#include + +#ifndef WIN32 + #include "devices/device.h" +#endif + +#ifdef WIN32 + #include "misc_win32.h" +#endif + +/* Various header file */ +#ifndef VC6 + #include "config.h" +#endif + +#include "gsm-api.h" +#include "gsm-coding.h" +#include "newmodules/n6110.h" +#include "newmodules/n7110.h" +#include "protocol/fbus.h" + +/* Global variables used by code in gsm-api.c to expose the functions + supported by this model of phone. */ + +/* Here we initialise model specific functions. */ + +GSM_Functions N7110_Functions = { + N7110_Initialise, + N7110_DispatchMessage, + NULL_Terminate, + NULL_KeepAlive, + N7110_GetMemoryLocation, + N7110_WritePhonebookLocation, + N7110_GetSpeedDial, + N7110_SetSpeedDial, + N7110_GetMemoryStatus, + N7110_GetSMSStatus, + N6110_GetSMSCenter, + N6110_SetSMSCenter, + N7110_GetSMSMessage, + N7110_DeleteSMSMessage, + N6110_SendSMSMessage, + N7110_SaveSMSMessage, + N7110_GetRFLevel, + N7110_GetBatteryLevel, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + N7110_GetSecurityCode, + N6110_GetIMEI, + N6110_GetRevision, + N6110_GetModel, + N7110_GetDateTime, + N7110_SetDateTime, + N7110_GetAlarm, + N7110_SetAlarm, + N6110_DialVoice, + N6110_DialData, + N6110_GetIncomingCallNr, + N6110_GetNetworkInfo, + N7110_GetCalendarNote, + N7110_WriteCalendarNote, + N7110_DeleteCalendarNote, + N6110_NetMonitor, + UNIMPLEMENTED, + N7110_GetBitmap, + N7110_SetBitmap, + N7110_SetRingTone, + N7110_SetBinRingTone, + N7110_GetBinRingTone, + N6110_Reset, + N7110_GetProfile, + UNIMPLEMENTED, + N6110_SendRLPFrame, + N6110_CancelCall, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + N6110_EnableCellBroadcast, + N6110_DisableCellBroadcast, + N6110_ReadCellBroadcast, + N6110_PlayTone, + N6110_GetProductProfileSetting, + N6110_SetProductProfileSetting, + UNIMPLEMENTED, + UNIMPLEMENTED, + N7110_GetVoiceMailbox, + N6110_Tests, + N6110_SimlockInfo, + N7110_GetCalendarNotesInfo, + N7110_GetSMSFolders, + UNIMPLEMENTED, + N7110_GetWAPBookmark, + N7110_SetWAPBookmark, + N7110_GetWAPSettings, + N6110_CallDivert, + UNIMPLEMENTED, + N6110_GetManufacturer +}; + +/* Mobile phone information */ + +GSM_Information N7110_Information = { + "6210|6250|7110", /* Supported models in FBUS */ + "6210|6250|7110", /* Supported models in MBUS */ + "", /* Supported models in FBUS over infrared */ + "6210|6250|7110", /* Supported models in FBUS over DLR3 */ + "", + "6210|6250|7110", /* Supported models in FBUS over Irda sockets */ + "", + 5, /* Max RF Level */ + 0, /* Min RF Level */ + GRF_Arbitrary, /* RF level units */ + 5, /* Max Battery Level */ + 0, /* Min Battery Level */ + GBU_Arbitrary, /* Battery level units */ + GDT_DateTime, /* Have date/time support */ + GDT_TimeOnly, /* Alarm supports time only */ + 1 /* Only one alarm available */ +}; + +const char *N7110_MemoryType_String [] = { + "", /* 0x00 */ + "DC", /* 0x01 */ + "MC", /* 0x02 */ + "RC", /* 0x03 */ + "FD", /* 0x04 */ + "ME", /* 0x05 */ + "SM", /* 0x06 */ + "ON", /* 0x07 */ + "EN", /* 0x08 */ + "MT", /* 0x09 */ +}; + +int PictureImageNum; //required during reading Picture Images +int PictureImageIndex; +int PictureImageLoc; + +void N7110_ReplyEnableIncomingSMSInfo(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + switch (MessageBuffer[3]) { + case 0x0e: +#ifdef DEBUG + fprintf(stdout,_("Message: Enabled info for incoming SMS\n")); +#endif /* DEBUG */ + + CurrentMagicError=GE_NONE; + break; + case 0x0f: +#ifdef DEBUG + fprintf(stdout,_("Message: error enabling for incoming SMS\n")); + switch (MessageBuffer[4]) { + case 0x0c:fprintf(stdout,_(" No PIN\n"));break; + default :fprintf(stdout,_(" unknown\n"));break; + } +#endif /* DEBUG */ + + CurrentMagicError=GE_UNKNOWN; + break; + } +} + +GSM_Error N7110_EnableIncomingSMSInfo () +{ + unsigned char req[] = {N6110_FRAME_HEADER, 0x0d, 0x00, 0x00, 0x02}; + + return NULL_SendMessageSequence + (50, &CurrentMagicError, 8, 0x02, req); +} + +/* Initialise variables and state machine. */ +GSM_Error N7110_Initialise(char *port_device, char *initlength, + GSM_ConnectionType connection, + void (*rlp_callback)(RLP_F96Frame *frame)) +{ + + unsigned char init_char = N6110_SYNC_BYTE; + int count; + int InitLength; + + if (Protocol->Initialise(port_device,initlength,connection,rlp_callback)!=GE_NONE) + { + return GE_NOTSUPPORTED; + } + + if (connection!=GCT_MBUS && connection!=GCT_Irda) { + + InitLength = atoi(initlength); + + if ((strcmp(initlength, "default") == 0) || (InitLength == 0)) { + InitLength = 250; /* This is the usual value, lower may work. */ + } + +#ifdef DEBUG + fprintf(stdout,_("Writing init chars....")); +#endif + + /* Initialise link with phone or what have you */ + /* Send init string to phone, this is a bunch of 0x55 characters. Timing is + empirical. */ + for (count = 0; count < InitLength; count ++) { + usleep(100); + Protocol->WritePhone(1,&init_char); + } + +#ifdef DEBUG + fprintf(stdout,_("Done\n")); +#endif + + N6110_SendStatusRequest(); + + } + + usleep(100); + + if (N6110_SendIDFrame()!=GE_NONE) return GE_TIMEOUT; + + if (N6110_SendIMEIFrame()!=GE_NONE) return GE_TIMEOUT; + + if (N6110_SendHWFrame()!=GE_NONE) return GE_TIMEOUT; + +// N7110_EnableIncomingSMSInfo(); + + if (connection==GCT_MBUS || connection==GCT_Irda) { + /* In MBUS doesn't have any init strings, etc. Phone answered with frame, + so connection should be enabled ;-) */ + /* Similiar for Irda */ + CurrentLinkOK = true; + } + + CurrentSMSFoldersCount=1000; + + return (GE_NONE); +} + +/* This function translates GMT_MemoryType to N7110_MEMORY_xx */ +int N7110_GetMemoryType(GSM_MemoryType memory_type) +{ + + int result; + + switch (memory_type) { + +// case GMT_MT: +// result = N7110_MEMORY_MT; +// break; + + case GMT_ME: result = N7110_MEMORY_ME; break; + case GMT_SM: result = N7110_MEMORY_SM; break; + case GMT_FD: result = N7110_MEMORY_FD; break; + case GMT_ON: result = N7110_MEMORY_ON; break; + case GMT_EN: result = N7110_MEMORY_EN; break; + case GMT_DC: result = N7110_MEMORY_DC; break; + case GMT_RC: result = N7110_MEMORY_RC; break; + case GMT_MC: result = N7110_MEMORY_MC; break; + case GMT_CG: result = N7110_MEMORY_CG; break; + default : result = N6110_MEMORY_XX; + } + + return (result); +} + +GSM_Error N7110_GetVoiceMailbox ( GSM_PhonebookEntry *entry) +{ + unsigned char req[] = {N7110_FRAME_HEADER, 0x07, 0x01, 0x01, 0x00, 0x01, + 0x02, //memory type + 0x05, + 0x00, 0x00, //location + 0x00, 0x00}; + + CurrentPhonebookEntry = entry; + + req[9] = N7110_MEMORY_VM; + req[10] = (1>>8); + req[11] = 1 & 0xff; + + return NULL_SendMessageSequence + (50, &CurrentPhonebookError, 14, 0x03, req); +} + +void N7110_ReplyEnableWAPCommands(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ + switch(MessageBuffer[3]) { + + case 0x01: +#ifdef DEBUG + fprintf(stdout, _("Message: WAP functions enabled\n")); +#endif /* DEBUG */ + CurrentGetWAPBookmarkError=GE_NONE; + break; + + case 0x02: +#ifdef DEBUG + fprintf(stdout, _("Message: WAP functions enabled\n")); +#endif /* DEBUG */ + CurrentGetWAPBookmarkError=GE_NONE; + break; + + } +} + +/* To enable WAP frames in phone */ +GSM_Error N7110_EnableWAPCommands () +{ + unsigned char req0[] = { N6110_FRAME_HEADER, 0x00 }; + + return NULL_SendMessageSequence + (50, &CurrentGetWAPBookmarkError, 4, 0x3f, req0); +} + +void N7110_ReplyGetWAPBookmark(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ + int tmp; + + switch(MessageBuffer[3]) { + + case 0x07: + +#ifdef DEBUG + fprintf(stdout, _("Message: WAP bookmark received OK\n")); +#endif /* DEBUG */ + + DecodeUnicode(WAPBookmark->title, MessageBuffer + 7, MessageBuffer[6] ); + +#ifdef DEBUG + fprintf(stdout, _(" Title: \"%s\"\n"),WAPBookmark->title); +#endif /* DEBUG */ + + tmp=MessageBuffer[6]*2+7; + + DecodeUnicode(WAPBookmark->address, MessageBuffer + tmp+1, MessageBuffer[tmp] ); + +#ifdef DEBUG + fprintf(stdout, _(" Address: \"%s\"\n"),WAPBookmark->address); +#endif /* DEBUG */ + + CurrentGetWAPBookmarkError=GE_NONE; + break; + + case 0x08: + +#ifdef DEBUG + fprintf(stdout, _("Message: WAP bookmark receiving error\n")); + switch (MessageBuffer[4]) { + case 0x01:fprintf(stdout, _(" Inside Bookmarks menu. Must leave it\n"));break; + case 0x02:fprintf(stdout, _(" Invalid or empty location\n"));break; + default :fprintf(stdout, _(" Unknown error. Please report it\n")); + } +#endif /* DEBUG */ + + switch (MessageBuffer[4]) { + case 0x01:CurrentGetWAPBookmarkError=GE_INSIDEBOOKMARKSMENU;break; + case 0x02:CurrentGetWAPBookmarkError=GE_INVALIDBOOKMARKLOCATION;break; + default:CurrentGetWAPBookmarkError=GE_UNKNOWN; + } + + break; + } +} + +GSM_Error N7110_GetWAPBookmark (GSM_WAPBookmark *bookmark) +{ + unsigned char req[] = { N6110_FRAME_HEADER, 0x06, 0x00, 0x00}; + + GSM_Error error; + + /* We have to enable WAP frames in phone */ + error=N7110_EnableWAPCommands (); + if (error!=GE_NONE) return error; + + req[2]=0x00; + req[5]=bookmark->location-1; + + WAPBookmark=bookmark; + + return NULL_SendMessageSequence + (50, &CurrentGetWAPBookmarkError, 6, 0x3f, req); +} + +void N7110_ReplySetWAPBookmark(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ + switch(MessageBuffer[3]) { + + case 0x0a: + +#ifdef DEBUG + fprintf(stdout, _("Message: WAP bookmark set OK\n")); +#endif /* DEBUG */ + + CurrentSetWAPBookmarkError=GE_NONE; + break; + + case 0x0b: + +#ifdef DEBUG + fprintf(stdout, _("Message: Error setting WAP bookmark\n")); +#endif /* DEBUG */ + + CurrentSetWAPBookmarkError=GE_UNKNOWN; + break; + } +} + +GSM_Error N7110_SetWAPBookmark (GSM_WAPBookmark *bookmark) +{ + unsigned char req[64] = { N6110_FRAME_HEADER, 0x09 }; + GSM_Error error; + int count; + + /* We have to enable WAP frames in phone */ + error = N7110_EnableWAPCommands (); + if (error != GE_NONE) + return error; + + count = 4; + req[count++] = (bookmark->location & 0xff00) >> 8; + req[count++] = (bookmark->location & 0x00ff); + + req[count++] = strlen(bookmark->title); + EncodeUnicode (req+count,bookmark->title ,strlen(bookmark->title)); + count=count+2*strlen(bookmark->title); + + req[count++] = strlen(bookmark->address); + EncodeUnicode (req+count,bookmark->address ,strlen(bookmark->address)); + count=count+2*strlen(bookmark->address); + + /* ??? */ + req[count++] = 0x01; req[count++] = 0x80; req[count++] = 0x00; + req[count++] = 0x00; req[count++] = 0x00; req[count++] = 0x00; + req[count++] = 0x00; req[count++] = 0x00; req[count++] = 0x00; + + WAPBookmark = bookmark; + + return NULL_SendMessageSequence(50, &CurrentSetWAPBookmarkError, + count, 0x3f, req); +} + +void N7110_ReplyGetWAPSettings(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ + int tmp; + + switch(MessageBuffer[3]) { + + case 0x16: + +#ifdef DEBUG + fprintf(stdout, _("Message: WAP settings received OK\n")); +#endif /* DEBUG */ + + DecodeUnicode(WAPSettings->title, MessageBuffer + 5, MessageBuffer[4] ); + +#ifdef DEBUG + fprintf(stdout, _(" Title: \"%s\"\n"),WAPSettings->title); +#endif /* DEBUG */ + + tmp=5+MessageBuffer[4]*2; + + DecodeUnicode(WAPSettings->homepage, MessageBuffer + tmp+1, MessageBuffer[tmp] ); + +#ifdef DEBUG + fprintf(stdout, _(" Homepage: \"%s\"\n"),WAPSettings->homepage); +#endif /* DEBUG */ + + tmp=tmp+MessageBuffer[tmp]*2+1; + +#ifdef DEBUG + fprintf(stdout, _(" Connection type: ")); + switch (MessageBuffer[tmp]) { + case 0x00: fprintf(stdout,_("temporary"));break; + case 0x01: fprintf(stdout,_("continuous"));break; + default: fprintf(stdout,_("unknown")); + } + fprintf(stdout, _("\n")); + + fprintf(stdout, _(" Connection security: ")); + switch (MessageBuffer[tmp+13]) { + case 0x00: fprintf(stdout,_("off"));break; + case 0x01: fprintf(stdout,_("on"));break; + default: fprintf(stdout,_("unknown")); + } + fprintf(stdout, _("\n")); + +#endif /* DEBUG */ + + switch (MessageBuffer[tmp]) { + case 0x00: WAPSettings->iscontinuous=false;break; + case 0x01: WAPSettings->iscontinuous=true;break; + } + switch (MessageBuffer[tmp+13]) { + case 0x00: WAPSettings->issecurity=false;break; + case 0x01: WAPSettings->issecurity=true;break; + } + + WAPSettings->location=MessageBuffer[tmp+7];//location for second part + + CurrentGetWAPSettingsError=GE_NONE; + break; + + case 0x17: + +#ifdef DEBUG + fprintf(stdout, _("Message: WAP settings receiving error\n")); + switch (MessageBuffer[4]) { + case 0x01:fprintf(stdout, _(" Inside Settings menu. Must leave it\n"));break; + case 0x02:fprintf(stdout, _(" Invalid or empty location\n"));break; + default :fprintf(stdout, _(" Unknown error. Please report it\n")); + } +#endif /* DEBUG */ + + switch (MessageBuffer[4]) { + case 0x01:CurrentGetWAPSettingsError=GE_INSIDESETTINGSMENU;break; + case 0x02:CurrentGetWAPSettingsError=GE_INVALIDSETTINGSLOCATION;break; + default :CurrentGetWAPSettingsError=GE_UNKNOWN; + } + + break; + + case 0x1c: + +#ifdef DEBUG + fprintf(stdout, _("Message: WAP settings received OK\n")); +#endif /* DEBUG */ + + switch (MessageBuffer[5]) { + case 0x00: + + WAPSettings->bearer=WAPSETTINGS_BEARER_SMS; + +#ifdef DEBUG + fprintf(stdout, _(" Settings for SMS bearer:\n")); +#endif /* DEBUG */ + + tmp=6; + + DecodeUnicode(WAPSettings->service, MessageBuffer + tmp+1, + MessageBuffer[tmp] ); + +#ifdef DEBUG + fprintf(stdout, _(" Service number: \"%s\"\n"),WAPSettings->service); +#endif /* DEBUG */ + + tmp=tmp+MessageBuffer[tmp]*2+1; + + DecodeUnicode(WAPSettings->server, MessageBuffer + tmp+ 1, + MessageBuffer[tmp] ); + +#ifdef DEBUG + fprintf(stdout, _(" Server number: \"%s\"\n"),WAPSettings->server); +#endif /* DEBUG */ + + break; + + case 0x01: + + WAPSettings->bearer=WAPSETTINGS_BEARER_DATA; + +#ifdef DEBUG + fprintf(stdout, _(" Settings for data bearer:\n")); +#endif /* DEBUG */ + + tmp=10; + + DecodeUnicode(WAPSettings->ipaddress, MessageBuffer + tmp+ 1, + MessageBuffer[tmp] ); + +#ifdef DEBUG + fprintf(stdout, _(" IP address: \"%s\"\n"),WAPSettings->ipaddress); +#endif /* DEBUG */ + + tmp=tmp+MessageBuffer[tmp]*2+1; + + DecodeUnicode(WAPSettings->dialup, MessageBuffer + tmp+1, + MessageBuffer[tmp] ); + +#ifdef DEBUG + fprintf(stdout, _(" Dial-up number: \"%s\"\n"),WAPSettings->dialup); +#endif /* DEBUG */ + + tmp=tmp+MessageBuffer[tmp]*2+1; + + DecodeUnicode(WAPSettings->user, MessageBuffer + tmp+1, + MessageBuffer[tmp] ); + +#ifdef DEBUG + fprintf(stdout, _(" User name: \"%s\"\n"),WAPSettings->user); +#endif /* DEBUG */ + + tmp=tmp+MessageBuffer[tmp]*2+1; + + DecodeUnicode(WAPSettings->password, MessageBuffer + tmp+1, + MessageBuffer[tmp] ); + +#ifdef DEBUG + fprintf(stdout, _(" Password: \"%s\"\n"),WAPSettings->password); +#endif /* DEBUG */ + +#ifdef DEBUG + fprintf(stdout, _(" Authentication type: ")); + switch (MessageBuffer[6]) { + case 0x00: fprintf(stdout,_("normal"));break; + case 0x01: fprintf(stdout,_("secure"));break; + default: fprintf(stdout,_("unknown"));break; + } + fprintf(stdout, _("\n")); + + fprintf(stdout, _(" Data call type: ")); + switch (MessageBuffer[7]) { + case 0x00: fprintf(stdout,_("analogue"));break; + case 0x01: fprintf(stdout,_("IDSN"));break; + default: fprintf(stdout,_("unknown"));break; + } + fprintf(stdout, _("\n")); + + fprintf(stdout, _(" Data call speed: ")); + switch (MessageBuffer[9]) { + case 0x01: fprintf(stdout,_("9600"));break; + case 0x02: fprintf(stdout,_("14400"));break; + default: fprintf(stdout,_("unknown"));break; + } + fprintf(stdout, _("\n")); + +#endif /* DEBUG */ + + switch (MessageBuffer[6]) { + case 0x00: WAPSettings->isnormalauthentication=true;break; + case 0x01: WAPSettings->isnormalauthentication=false;break; + } + switch (MessageBuffer[7]) { + case 0x00: WAPSettings->isISDNcall=false;break; + case 0x01: WAPSettings->isISDNcall=true;break; + } + switch (MessageBuffer[9]) { + case 0x01: WAPSettings->isspeed14400=false;break; + case 0x02: WAPSettings->isspeed14400=true;break; + } + + break; + + case 0x02: + + WAPSettings->bearer=WAPSETTINGS_BEARER_USSD; + +#ifdef DEBUG + fprintf(stdout, _(" Settings for USSD bearer:\n")); +#endif /* DEBUG */ + + tmp=7; + + DecodeUnicode(WAPSettings->service, MessageBuffer + tmp+1, + MessageBuffer[tmp] ); + +#ifdef DEBUG + if (MessageBuffer[6]==0x01) + fprintf(stdout, _(" Service number: \"%s\"\n"),WAPSettings->service); + else + fprintf(stdout, _(" IP address: \"%s\"\n"),WAPSettings->service); +#endif /* DEBUG */ + + WAPSettings->isIP=true; + if (MessageBuffer[6]==0x01) WAPSettings->isIP=false; + + tmp=tmp+MessageBuffer[tmp]*2+1; + + DecodeUnicode(WAPSettings->code, MessageBuffer + tmp+1, + MessageBuffer[tmp] ); + +#ifdef DEBUG + fprintf(stdout, _(" Service code: \"%s\"\n"),WAPSettings->code); +#endif /* DEBUG */ + + } + + CurrentGetWAPSettingsError=GE_NONE; + break; + } +} + +GSM_Error N7110_GetWAPSettings (GSM_WAPSettings *settings) +{ + unsigned char req[] = { N6110_FRAME_HEADER, 0x15, 0x00}; + unsigned char req2[] = { N6110_FRAME_HEADER, 0x1b, 0x00}; + + GSM_Error error; + + /* We have to enable WAP frames in phone */ + error=N7110_EnableWAPCommands (); + if (error!=GE_NONE) return error; + + req[2]=0x00; + req[4]=settings->location-1; + + WAPSettings=settings; + + error=NULL_SendMessageSequence + (50, &CurrentGetWAPSettingsError, 6, 0x3f, req); + if (error!=GE_NONE) return error; + + req2[2]=0x00; + + req2[4]=settings->location; + + return NULL_SendMessageSequence + (50, &CurrentGetWAPSettingsError, 6, 0x3f, req2); +} + +void N7110_ReplyGetMemoryStatus(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ +#ifdef DEBUG + fprintf(stdout, _("Message: Memory status received:\n")); +#endif + + if (CurrentMemoryStatus && CurrentMemoryStatusError == GE_BUSY) { + /* first Loc. (MessageBuffer[10]<<8) + MessageBuffer[11]; */ + CurrentMemoryStatus->Free = (MessageBuffer[14]<<8) + MessageBuffer[15]; + CurrentMemoryStatus->Used = (MessageBuffer[16]<<8) + MessageBuffer[17]; + CurrentMemoryStatus->Free -= CurrentMemoryStatus->Used; + + CurrentMemoryStatusError = GE_NONE; + +#ifdef DEBUG + fprintf(stdout, _(" Memory Type: %s\n"), N7110_MemoryType_String[MessageBuffer[5]]); + fprintf(stdout, _(" Used: %d\n"), CurrentMemoryStatus->Used); + fprintf(stdout, _(" Free: %d\n"), CurrentMemoryStatus->Free); +#endif /* DEBUG */ + } +} + +/* This function is used to get storage status from the phone. It currently + supports two different memory areas - internal and SIM. */ +GSM_Error N7110_GetMemoryStatus(GSM_MemoryStatus *Status) +{ + unsigned char req[] = { N6110_FRAME_HEADER, + 0x03, /* MemoryStatus request */ + 0x02, + 0x05 /* MemoryType */ + }; + + switch (Status->MemoryType) { + + case GMT_ME: + case GMT_SM: + CurrentMemoryStatus = Status; + + req[5] = N7110_GetMemoryType(Status->MemoryType); + + return NULL_SendMessageSequence + (20, &CurrentMemoryStatusError, 6, 0x03, req); + break; + + case GMT_DC: + case GMT_RC: + case GMT_MC: + Status->Free = 0; + Status->Used = 20; + return GE_NONE; + + default: + return GE_NOTSUPPORTED; + } +} + +void N7110_ReplyGetProfile(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ + switch(MessageBuffer[3]) { + + case 0x02: + +#ifdef DEBUG + fprintf(stdout,_("Profile feature %02x received\n"),MessageBuffer[6]); +#endif /* DEBUG */ + + switch (MessageBuffer[6]) { + case 0xff: /* Profile Name */ + DecodeUnicode (CurrentProfile->Name, MessageBuffer+10, MessageBuffer[9]); +#ifdef DEBUG + fprintf(stdout,_(" Name \"%s\"\n"),CurrentProfile->Name); +#endif /* DEBUG */ + + break; + + case 0x00: /* Keypad tone (Off, Level 1 ... Level 3) */ + switch( MessageBuffer[10] ) { + case 0: + CurrentProfile->KeypadTone = PROFILE_KEYPAD_OFF; break; + case 1: + case 2: + case 3: + CurrentProfile->KeypadTone = MessageBuffer[10]-1; break; + } + break; + + case 0x02: /* Call Alert type (Ringing, Ascending, ..., Off) */ + /* I make it compatible with GetProfileCallAlertString */ + switch( MessageBuffer[10] ) { + case 0: CurrentProfile->CallAlert = PROFILE_CALLALERT_RINGING; break; + case 1: CurrentProfile->CallAlert = PROFILE_CALLALERT_ASCENDING; break; + case 2: CurrentProfile->CallAlert = PROFILE_CALLALERT_RINGONCE; break; + case 3: CurrentProfile->CallAlert = PROFILE_CALLALERT_BEEPONCE; break; + case 5: CurrentProfile->CallAlert = PROFILE_CALLALERT_OFF; break; + } + break; + case 0x03: /* Ringtone number */ + CurrentProfile->Ringtone = MessageBuffer[10]; + break; + case 0x04: /* Ringtone volume (from level 1 to level 5) */ + CurrentProfile->Volume = MessageBuffer[10] + 6; + break; + case 0x05: /* MessageTone Type (Off,Standard,...,Ascending) */ + CurrentProfile->MessageTone = MessageBuffer[10]; + break; + case 0x06: /* Vibration (On/Off) */ + CurrentProfile->Vibration = MessageBuffer[10]; + break; + case 0x07: /* WarningTone (On/Off) */ + switch( MessageBuffer[10] ) { + case 0: + CurrentProfile->WarningTone = PROFILE_WARNING_OFF; break; + case 1: + CurrentProfile->WarningTone = PROFILE_WARNING_ON; break; + } + break; + case 0x08: /* Alert for (caller groups) */ + CurrentProfile->CallerGroups = MessageBuffer[10]; + break; + case 0x09: /* Auto Answer for Handsfree and Headset (On/Off) */ + CurrentProfile->AutomaticAnswer = MessageBuffer[10]; + break; + } + + CurrentProfileError=GE_NONE; + break; + default: + +#ifdef DEBUG + fprintf(stdout, _("Message: Unknown message of type 0x39\n")); +#endif /* DEBUG */ + AppendLogText("Unknown msg\n",false); + break; /* Visual C Don't like empty cases */ + + } +} + +GSM_Error N7110_GetProfile(GSM_Profile *Profile) +{ + int i; + + unsigned char req[] = { N6110_FRAME_HEADER, 0x01, 0x01, 0x01, 0x01, + 0x00, //profile number + 0xff}; //feature. Here 0xff=name + + unsigned char req2[11] = {0x03,0x04,0x05,0x06,0x07,0x08,0x0a,0x22, + 0x00,0x02,0x09 }; + + GSM_Error error; + + CurrentProfile = Profile; + + /* When after sending all frames feature==253, it means, that it is not + supported */ + CurrentProfile->KeypadTone=253; + CurrentProfile->Lights=253; + CurrentProfile->CallAlert=253; + CurrentProfile->Ringtone=253; + CurrentProfile->Volume=253; + CurrentProfile->MessageTone=253; + CurrentProfile->WarningTone=253; + CurrentProfile->Vibration=253; + CurrentProfile->CallerGroups=253; + CurrentProfile->ScreenSaver=253; + CurrentProfile->AutomaticAnswer=253; + + req[7] = Profile->Number+1; + + error=NULL_SendMessageSequence + (20, &CurrentProfileError, 9, 0x39, req); + if (error!=GE_NONE) return error; + + for (i = 0; i < 11; i++) { + + req[7] = Profile->Number+1; + + req[8] = req2[i]; + + error=NULL_SendMessageSequence + (20, &CurrentProfileError, 9, 0x39, req); + if (error!=GE_NONE) return error; + } + + return (GE_NONE); +} + +void N7110_ReplyGetCalendarNotesInfo(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ + int i; + + CurrentCalendarNotesInfo.HowMany = MessageBuffer[4]*256+MessageBuffer[5]; + CurrentCalendarNotesInfo2->HowMany = CurrentCalendarNotesInfo.HowMany; + + for(i=0;iLocation[i]=CurrentCalendarNotesInfo.Location[i]; + } + + CurrentCalendarNotesInfoError=GE_NONE; +} + +GSM_Error N7110_GetCalendarNotesInfo(GSM_NotesInfo *NotesInfo) +{ + unsigned char req[] = { N6110_FRAME_HEADER, + 0x3a, /* get notes info */ + 0xFF, 0xFE //fixed + }; + GSM_Error error; + + CurrentCalendarNotesInfo2=NotesInfo; + + error=NULL_SendMessageSequence(50, &CurrentCalendarNotesInfoError, 6, 0x13, req); + + return error; +} + +void P7110_GetNoteAlarm(int alarmdiff, GSM_DateTime *time, GSM_DateTime *alarm, int alarm2) +{ + time_t t_alarm; + struct tm tm_time; + struct tm *tm_alarm; + +#ifdef DEBUG + if (alarmdiff == 0xffff) fprintf(stdout," No alarm"); + else fprintf(stdout," Alarm is %i seconds before date", alarmdiff*alarm2); + fprintf(stdout,"\n"); +#endif + + if (alarmdiff != 0xffff) { + + memset(&tm_time, 0, sizeof(tm_time)); + tm_time.tm_year = time->Year - 1900; + tm_time.tm_mon = time->Month - 1; + tm_time.tm_mday = time->Day; + tm_time.tm_hour = time->Hour; + tm_time.tm_min = time->Minute; + tm_time.tm_sec = time->Second; + + tzset(); + t_alarm = mktime(&tm_time); + t_alarm -= alarmdiff*alarm2; + + tm_alarm = localtime(&t_alarm); + + alarm->Year = tm_alarm->tm_year + 1900; + alarm->Month = tm_alarm->tm_mon + 1; + alarm->Day = tm_alarm->tm_mday; + alarm->Hour = tm_alarm->tm_hour; + alarm->Minute = tm_alarm->tm_min; + alarm->Second = tm_alarm->tm_sec; + +#ifdef DEBUG + fprintf(stdout, " Alarm: %02i-%02i-%04i %02i:%02i:%02i\n", + alarm->Day,alarm->Month,alarm->Year, + alarm->Hour,alarm->Minute,alarm->Second); +#endif + } +} + +void P7110_GetNoteTimes(unsigned char *block, GSM_CalendarNote *c) +{ + time_t alarmdiff; + + c->Time.Year = block[8]*256+block[9]; + c->Time.Month = block[10]; + c->Time.Day = block[11]; + if (c->Type != GCN_REMINDER) { + c->Time.Hour = block[12]; + c->Time.Minute = block[13]; + } else { + c->Time.Hour = 0; + c->Time.Minute = 0; + } + c->Time.Second = 0; + +#ifdef DEBUG + fprintf(stdout, " Date: %02i-%02i-%04i %02i:%02i:%02i\n", + c->Time.Day,c->Time.Month,c->Time.Year, + c->Time.Hour,c->Time.Minute,c->Time.Second); +#endif + + if (c->Type != GCN_REMINDER) { + alarmdiff = block[14]*256 + block[15]; + P7110_GetNoteAlarm(alarmdiff, &(c->Time), &(c->Alarm), 60); + + c->Recurrance = block[16]*256 + block[17]; + DecodeUnicode(c->Text, block+20, block[18]); + } else { + c->Recurrance = block[12]*256 + block[13]; + DecodeUnicode(c->Text, block+16, block[14]); + } + + /* 0xffff -> 1 Year (8760 hours) */ + if (c->Recurrance == 0xffff) c->Recurrance=8760; + +#ifdef DEBUG + fprintf(stdout, " Recurrance: %i hours\n Text: \"%s\"\n", + c->Recurrance,c->Text); +#endif +} + +void N7110_ReplyGetCalendarNote(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ + int alarm; + + CurrentCalendarNote->YearOfBirth=0; //for other than birthday + CurrentCalendarNote->AlarmType=0x00;//for other than birthday + CurrentCalendarNote->Phone[0]=0; //for other than call + + CurrentCalendarNote->Alarm.Year = 0; + CurrentCalendarNote->Alarm.Month = 0; + CurrentCalendarNote->Alarm.Day = 0; + CurrentCalendarNote->Alarm.Hour = 0; + CurrentCalendarNote->Alarm.Minute = 0; + CurrentCalendarNote->Alarm.Second = 0; + +#ifdef DEBUG + fprintf(stdout, "Message: calendar note received\n"); +#endif + + switch (MessageBuffer[6]) /* entry type */ { + case 0x01: /* Meeting */ +#ifdef DEBUG + fprintf(stdout, " Note type: meeting\n"); +#endif + CurrentCalendarNote->Type = GCN_MEETING; + P7110_GetNoteTimes(MessageBuffer, CurrentCalendarNote); + CurrentCalendarNoteError=GE_NONE; + break; + + case 0x02: /* Call */ +#ifdef DEBUG + fprintf(stdout, " Note type: call\n"); +#endif + CurrentCalendarNote->Type = GCN_CALL; + P7110_GetNoteTimes(MessageBuffer, CurrentCalendarNote); + DecodeUnicode(CurrentCalendarNote->Phone, + MessageBuffer + 20 + MessageBuffer[18] * 2, MessageBuffer[19]); +#ifdef DEBUG + fprintf(stdout, " Phone number: \"%s\"\n",CurrentCalendarNote->Phone); +#endif + CurrentCalendarNoteError=GE_NONE; + break; + + case 0x04: /* Birthday */ +#ifdef DEBUG + fprintf(stdout, " Note type: birthday\n"); +#endif + CurrentCalendarNote->Type = GCN_BIRTHDAY; + + alarm = ((unsigned int)MessageBuffer[14]) << 24; + alarm += ((unsigned int)MessageBuffer[15]) << 16; + alarm += ((unsigned int)MessageBuffer[16]) << 8; + alarm += MessageBuffer[17]; + + /* CurrentCalendarNote->Time.Year is set earlier */ + CurrentCalendarNote->Time.Month = MessageBuffer[10]; + CurrentCalendarNote->Time.Day = MessageBuffer[11]; + CurrentCalendarNote->Time.Hour = 23; + CurrentCalendarNote->Time.Minute = 59; + CurrentCalendarNote->Time.Second = 58; + P7110_GetNoteAlarm(alarm, &(CurrentCalendarNote->Time), &(CurrentCalendarNote->Alarm) ,1); + + CurrentCalendarNote->YearOfBirth = MessageBuffer[18]*256 + MessageBuffer[19]; + CurrentCalendarNote->Time.Year = CurrentCalendarNote->YearOfBirth; + + CurrentCalendarNote->AlarmType = MessageBuffer[20]; + +#ifdef DEBUG + fprintf(stdout,_(" Alarm type: %s\n"), + (CurrentCalendarNote->AlarmType==0x00) ? "Tone " : "Silent"); + + fprintf(stdout, " Birthday date: %02i-%02i-%04i (age %d)\n",CurrentCalendarNote->Time.Day, + CurrentCalendarNote->Time.Month,CurrentCalendarNote->Time.Year, + CurrentCalendarNote->Alarm.Year - CurrentCalendarNote->Time.Year); +#endif + + DecodeUnicode( CurrentCalendarNote->Text,MessageBuffer+22,MessageBuffer[21]); +#ifdef DEBUG + fprintf(stdout, " Text: \"%s\"\n",CurrentCalendarNote->Text); +#endif + + CurrentCalendarNote->Recurrance = 0; + CurrentCalendarNoteError=GE_NONE; + break; + + case 0x08: /* Reminder */ +#ifdef DEBUG + fprintf(stdout, " Note type: reminder\n"); +#endif + CurrentCalendarNote->Type = GCN_REMINDER; + P7110_GetNoteTimes(MessageBuffer, CurrentCalendarNote); + CurrentCalendarNoteError=GE_NONE; + break; + + default: /* unknown */ +#ifdef DEBUG + fprintf(stdout, " Note type: UNKNOWN\n"); +#endif + break; + } +} + +GSM_Error N7110_GetCalendarNote(GSM_CalendarNote *CalendarNote) +{ + unsigned char req[] = { N6110_FRAME_HEADER, + 0x19, /* get calendar note */ + 0x00, 0x00 //location + }; + + GSM_Error error; + GSM_DateTime date_time; + struct tm *now; + time_t nowh; + + if (CalendarNote->ReadNotesInfo || CurrentCalendarNotesInfo.HowMany==2000) { + error=N7110_GetCalendarNotesInfo(&CurrentCalendarNotesInfo); + if (error!=GE_NONE) return error; + } + +#ifdef DEBUG + fprintf(stdout, _("Calendar Notes Location Logical = %d.\n"), + CalendarNote->Location); + fprintf(stdout, _("Calendar Notes Location Phisical = %d.\n"), + CurrentCalendarNotesInfo.Location[CalendarNote->Location-1]); +#endif + + /* this is for making xgnokii work.. */ + if (CalendarNote->Location > CurrentCalendarNotesInfo.HowMany ) + return GE_INVALIDCALNOTELOCATION; + + req[4] = CurrentCalendarNotesInfo.Location[CalendarNote->Location-1]>>8; + req[5] = CurrentCalendarNotesInfo.Location[CalendarNote->Location-1]&0xff; + CurrentCalendarNote = CalendarNote; + + /* We have to get current year. It's NOT written in frame for Birthday */ + error=N7110_GetDateTime(&date_time); + if (error!=GE_NONE) return error; + if (!date_time.IsSet) { + nowh=time(NULL); + now=localtime(&nowh); + + /* I have 100 (for 2000) Year now :-) */ + if (now->tm_year>99 && now->tm_year<1900) { + now->tm_year=now->tm_year+1900; + } + date_time.Year=now->tm_year; + } + CurrentCalendarNote->Time.Year = date_time.Year; + + error=NULL_SendMessageSequence(50, &CurrentCalendarNoteError, 6, 0x13, req); + + CurrentCalendarNote = NULL; + + return error; +} + +void N7110_ReplyWriteCalendarNote(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ +#ifdef DEBUG + char kz_types[][6] = { "MEET", "CALL", "BIRTH", "REM" }; + + fprintf(stdout, + "Succesfully written Calendar Note Type %s on location %d\n", + kz_types[(MessageBuffer[3]/2)-1], + MessageBuffer[4]*256+MessageBuffer[5] ); + + fprintf(stdout, "--> Exit Status is %d (maybe is the size of buffer written to phone)\n", + MessageBuffer[6]*256+MessageBuffer[7] ); +#endif + CurrentCalendarNoteError=GE_NONE; +} + +long P7110_GetNoteAlarmDiff(GSM_DateTime *time, GSM_DateTime *alarm) +{ + time_t t_alarm; + time_t t_time; + struct tm tm_alarm; + struct tm tm_time; + + tzset(); + + tm_alarm.tm_year=alarm->Year-1900; + tm_alarm.tm_mon=alarm->Month-1; + tm_alarm.tm_mday=alarm->Day; + tm_alarm.tm_hour=alarm->Hour; + tm_alarm.tm_min=alarm->Minute; + tm_alarm.tm_sec=alarm->Second; + tm_alarm.tm_isdst=0; + t_alarm = mktime(&tm_alarm); + + tm_time.tm_year=time->Year-1900; + tm_time.tm_mon=time->Month-1; + tm_time.tm_mday=time->Day; + tm_time.tm_hour=time->Hour; + tm_time.tm_min=time->Minute; + tm_time.tm_sec=time->Second; + tm_time.tm_isdst=0; + t_time = mktime(&tm_time); + +#ifdef DEBUG + fprintf(stdout, " Alarm: %02i-%02i-%04i %02i:%02i:%02i\n", + alarm->Day,alarm->Month,alarm->Year, + alarm->Hour,alarm->Minute,alarm->Second); + fprintf(stdout, " Date: %02i-%02i-%04i %02i:%02i:%02i\n", + time->Day,time->Month,time->Year, + time->Hour,time->Minute,time->Second); + fprintf(stdout,_("Difference in alarm time is %f\n"),difftime( t_time, t_alarm )+3600); +#endif + + return difftime( t_time ,t_alarm )+3600; +} + +GSM_Error N7110_WriteCalendarNote(GSM_CalendarNote *CalendarNote) +{ + unsigned char req[200] = { N6110_FRAME_HEADER, + 0x01, /* note type ... */ + 0x00, 0x00, /* location */ + 0x00, /* entry type */ + 0x00, //fixed + 0x00, 0x00, 0x00, 0x00, /* Year(2bytes), Month, Day */ + /* here starts block */ + 0x00, 0x00, 0x00, 0x00,0x00, 0x00 /* ... depends on note type ... */ + }; + + int count=0; + long seconds, minutes; + + GSM_Error error; + int firstFreeLocation; + + /* + * 6210/7110 needs to seek the first free pos to inhabit with next note + */ + error=N7110_FirstCalendarFreePos(&firstFreeLocation); + if (error!=GE_NONE) return error; + +#ifdef DEBUG + fprintf(stdout, _("First free calendar location is = %d.\n"), + firstFreeLocation); +#endif + + /* Location */ + req[4]=0x00; + req[5]=0x00; + + switch( CalendarNote->Type ) { + case GCN_MEETING : req[6]=0x01; req[3]=0x01; break; + case GCN_CALL : req[6]=0x02; req[3]=0x03; break; + case GCN_BIRTHDAY: req[6]=0x04; req[3]=0x05; break; + case GCN_REMINDER: req[6]=0x08; req[3]=0x07; break; + } + + req[8]=CalendarNote->Time.Year>>8; + req[9]=CalendarNote->Time.Year&0xff; + req[10]=CalendarNote->Time.Month; + req[11]=CalendarNote->Time.Day; + + /* From here starts BLOCK */ + count=12; + switch( CalendarNote->Type ) { + + case GCN_MEETING: + req[count++]=CalendarNote->Time.Hour; // 12 + req[count++]=CalendarNote->Time.Minute; // 13 + /* Alarm .. */ + req[count++]=0xff; // 14 + req[count++]=0xff; // 15 + if( CalendarNote->Alarm.Year ) + { + seconds= P7110_GetNoteAlarmDiff(&CalendarNote->Time, + &CalendarNote->Alarm); + if( seconds>=0L ) { /* Otherwise it's an error condition.... */ + minutes=seconds/60L; + count-=2; + req[count++]=minutes>>8; + req[count++]=minutes&0xff; + } + } + /* Recurrance */ + if( CalendarNote->Recurrance >= 8760 ) + CalendarNote->Recurrance = 0xffff; /* setting 1 Year repeat */ + req[count++]=CalendarNote->Recurrance>>8; // 16 + req[count++]=CalendarNote->Recurrance&0xff; // 17 + /* len of text */ + req[count++]=strlen(CalendarNote->Text); // 18 + /* fixed 0x00 */ + req[count++]=0x00; // 19 + /* Text */ +#ifdef DEBUG + fprintf(stdout, "Count before encode = %d\n", count ); + fprintf(stdout, "Meeting Text is = \"%s\"\n", CalendarNote->Text ); +#endif + + EncodeUnicode (req+count,CalendarNote->Text ,strlen(CalendarNote->Text));// 20->N + count=count+2*strlen(CalendarNote->Text); + break; + + case GCN_CALL: + req[count++]=CalendarNote->Time.Hour; // 12 + req[count++]=CalendarNote->Time.Minute; // 13 + /* Alarm .. */ + req[count++]=0xff; // 14 + req[count++]=0xff; // 15 + if( CalendarNote->Alarm.Year ) + { + seconds= P7110_GetNoteAlarmDiff(&CalendarNote->Time, + &CalendarNote->Alarm); + if( seconds>=0L ) { /* Otherwise it's an error condition.... */ + minutes=seconds/60L; + count-=2; + req[count++]=minutes>>8; + req[count++]=minutes&0xff; + } + } + /* Recurrance */ + if( CalendarNote->Recurrance >= 8760 ) + CalendarNote->Recurrance = 0xffff; /* setting 1 Year repeat */ + req[count++]=CalendarNote->Recurrance>>8; // 16 + req[count++]=CalendarNote->Recurrance&0xff; // 17 + /* len of text */ + req[count++]=strlen(CalendarNote->Text); // 18 + /* fixed 0x00 */ + req[count++]=strlen(CalendarNote->Phone); // 19 + /* Text */ + EncodeUnicode (req+count,CalendarNote->Text ,strlen(CalendarNote->Text));// 20->N + count=count+2*strlen(CalendarNote->Text); + EncodeUnicode (req+count,CalendarNote->Phone ,strlen(CalendarNote->Phone));// (N+1)->n + count=count+2*strlen(CalendarNote->Phone); + break; + + case GCN_BIRTHDAY: + req[count++]=0x00; // 12 Fixed + req[count++]=0x00; // 13 Fixed + + /* Alarm .. */ + req[count++]=0x00; req[count++]=0x00; // 14, 15 + req[count++]=0xff; // 16 + req[count++]=0xff; // 17 + if( CalendarNote->Alarm.Year ) { + // I try with Time.Year = Alarm.Year. If negative, I increase 1 year, + // but only once ! This thing, because I may have Alarm period across + // a year. (eg. Birthday on 2001-01-10 and Alarm on 2000-12-27) + + CalendarNote->Time.Year = CalendarNote->Alarm.Year; + if( (seconds= P7110_GetNoteAlarmDiff(&CalendarNote->Time, + &CalendarNote->Alarm)) < 0L ) { + CalendarNote->Time.Year++; + seconds= P7110_GetNoteAlarmDiff(&CalendarNote->Time, + &CalendarNote->Alarm); + } + if( seconds>=0L ) { /* Otherwise it's an error condition.... */ + count-=4; + req[count++]=seconds>>24; // 14 + req[count++]=(seconds>>16) & 0xff; // 15 + req[count++]=(seconds>>8) & 0xff; // 16 + req[count++]=seconds&0xff; // 17 + } + } + + req[count++]=CalendarNote->AlarmType; // 18 + + /* len of text */ + req[count++]=strlen(CalendarNote->Text); // 19 + + /* Text */ +#ifdef DEBUG + fprintf(stdout, "Count before encode = %d\n", count ); + fprintf(stdout, "Meeting Text is = \"%s\" Altype is 0x%02x \n", CalendarNote->Text , CalendarNote->AlarmType ); +#endif + EncodeUnicode (req+count,CalendarNote->Text ,strlen(CalendarNote->Text));// 22->N + count=count+2*strlen(CalendarNote->Text); + break; + + case GCN_REMINDER: + /* Recurrance */ + if( CalendarNote->Recurrance >= 8760 ) + CalendarNote->Recurrance = 0xffff; /* setting 1 Year repeat */ + req[count++]=CalendarNote->Recurrance>>8; // 12 + req[count++]=CalendarNote->Recurrance&0xff; // 13 + /* len of text */ + req[count++]=strlen(CalendarNote->Text); // 14 + /* fixed 0x00 */ + req[count++]=0x00; // 15 + /* Text */ + EncodeUnicode (req+count,CalendarNote->Text ,strlen(CalendarNote->Text));// 16->N + count=count+2*strlen(CalendarNote->Text); + break; + } + + /* padding */ + req[count]=0x00; +#ifdef DEBUG + fprintf(stdout, "Count after padding = %d\n", count ); +#endif + + CurrentCalendarNote = CalendarNote; + + error=NULL_SendMessageSequence(50, &CurrentCalendarNoteError, count, 0x13, req); + + CurrentCalendarNote = NULL; + + return error; +} + +void N7110_ReplyFirstCalendarFreePos(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ + *CurrentFirstCalendarFreePos = MessageBuffer[4]*256+MessageBuffer[5]; + CurrentFirstCalendarFreePosError=GE_NONE; +} + +GSM_Error N7110_FirstCalendarFreePos(int *FreePos) +{ + unsigned char req[] = { N6110_FRAME_HEADER, 0x31 }; + + GSM_Error error; + + CurrentFirstCalendarFreePos = FreePos; + + error=NULL_SendMessageSequence(50, &CurrentFirstCalendarFreePosError, + 4, 0x13, req); + + CurrentFirstCalendarFreePos = NULL; + + return error; +} + +void N7110_ReplyDeleteCalendarNote(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ +#ifdef DEBUG + fprintf(stdout, + "Succesfully Delete Calendar Note on location %d\n", + MessageBuffer[4]*256+MessageBuffer[5] ); + + fprintf(stdout, "--> Other data are :\n" ); + fprintf(stdout, " '%c'[0x%02x](%3d), '%c'[0x%02x](%3d), '%c'[0x%02x](%3d), '%c'[0x%02x](%3d)\n", + MessageBuffer[6], MessageBuffer[6], MessageBuffer[6], + MessageBuffer[7], MessageBuffer[7], MessageBuffer[7], + MessageBuffer[8], MessageBuffer[8], MessageBuffer[8], + MessageBuffer[9], MessageBuffer[9], MessageBuffer[9] ); +#endif + CurrentCalendarNoteError=GE_NONE; +} + +GSM_Error N7110_DeleteCalendarNote(GSM_CalendarNote *CalendarNote) +{ + unsigned char req[] = { N6110_FRAME_HEADER, + 0x0b, /* delete calendar note */ + 0x00, 0x00 //location + }; + + GSM_Error error; + + if (CalendarNote->ReadNotesInfo || CurrentCalendarNotesInfo.HowMany==2000) { + error=N7110_GetCalendarNotesInfo(&CurrentCalendarNotesInfo); + if (error!=GE_NONE) return error; + } + + /* this is for making xgnokii work.. */ + if (CalendarNote->Location > CurrentCalendarNotesInfo.HowMany ) + return GE_INVALIDCALNOTELOCATION; + + req[4] = CurrentCalendarNotesInfo.Location[CalendarNote->Location-1]>>8; + req[5] = CurrentCalendarNotesInfo.Location[CalendarNote->Location-1]&0xff; + + CurrentCalendarNote = CalendarNote; + + error=NULL_SendMessageSequence(50, &CurrentCalendarNoteError, 6, 0x13, req); + + CurrentCalendarNote = NULL; + + return error; +} + +void N7110_ReplyGetSMSFolders(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ + wchar_t wc; + + int i, j, tmp; + +#ifdef DEBUG + fprintf(stdout, _("Message: SMS Folders received:\n")); +#endif /* DEBUG */ + + i=5; + + CurrentSMSFoldersCount=MessageBuffer[4]; + + for (j=0;jFolder[j].Name," "); +#ifdef DEBUG + fprintf(stdout, _(" Folder Index: %d"),MessageBuffer[i]); +#endif /* DEBUG */ + CurrentSMSFolders->FoldersID[j]=MessageBuffer[i]; + + i=i+2; + +#ifdef DEBUG + fprintf(stdout, _(", folder name: ")); +#endif /* DEBUG */ + tmp=0; + while ((MessageBuffer[i]!=0x00) & (MessageBuffer[i+1]==0x00)) { + + wc = MessageBuffer[i] | (MessageBuffer[i+1] << 8); + + CurrentSMSFolders->Folder[j].Name[tmp]=DecodeWithUnicodeAlphabet(wc); +#ifdef DEBUG + fprintf(stdout, _("%c"),CurrentSMSFolders->Folder[j].Name[tmp]); +#endif /* DEBUG */ + tmp++; + i=i+2; + } +#ifdef DEBUG + fprintf(stdout, _("\n")); +#endif /* DEBUG */ + tmp=0; + i=i+1; + } + + CurrentSMSFoldersError=GE_NONE; +} + +GSM_Error N7110_GetSMSFolders ( GSM_SMSFolders *folders) +{ + unsigned char req[] = { N6110_FRAME_HEADER, 0x7A, 0x00, 0x00}; + + GSM_Error error; + + CurrentSMSFolders=folders; + + error=NULL_SendMessageSequence(20, &CurrentSMSFoldersError, 6, 0x14, req); + + folders->number=CurrentSMSFoldersCount; + + return error; +} + +void N7110_ReplyGetSMSFolderStatus(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ + int i; + +#ifdef DEBUG + fprintf(stdout, _("Message: SMS Folder status received\n")); + fprintf(stdout, _(" Number of Entries: %i"),MessageBuffer[4]*256+MessageBuffer[5]); +#endif /* DEBUG */ + CurrentSMSFolder.number=MessageBuffer[4]*256+MessageBuffer[5]; +#ifdef DEBUG + fprintf(stdout, _(" (indexes ")); +#endif /* DEBUG */ + + for (i=0;iLocation; + /* We made "fake" SMS numbering for SMS in 7110/6210/etc. */ + if ((error = N7110_HandleSMSLocation(smsnum, &folderid, &location, NULL, GSH_DELETE))!=GE_NONE) + return(error); + + req[4]=folderid; + req[5]=location / 256; + req[6]=location; + +#ifdef DEBUG + printf("delete sms: folder %d, location %d\n",folderid,location); +#endif + + return NULL_SendMessageSequence + (50, &CurrentSMSMessageError, 8, 0x14, req); +} + +GSM_Error N7110_GetSMSMessage(GSM_SMSMessage *message) +{ + + unsigned char req[] = { N6110_FRAME_HEADER, + 0x07, + 0x08, // folder ID + 0x00, 0x05, // location + 0x01, + 0x65, + 0x01}; + + int smsnum, location; + u8 folderid; + + GSM_Error error; + CurrentSMSMessage = message; + CurrentSMSMessageError = GE_BUSY; + + + smsnum = message->Location; + + /* we make central handling of real location */ + error = N7110_HandleSMSLocation(smsnum, &folderid, &location, message, GSH_GET); + /* if smsnum is 0 (next sms) we need real smsnum */ + N7110_SMS2FakeLocation( &smsnum, folderid, location); + message->Location = smsnum; + switch(error) + { + case GE_SMSISINMEM: /* future use: get already reed sms from mem */ + return GE_NONE; + break; + case GE_NONE: req[4]=folderid; + req[5]=location / 256; + req[6]=location; +#ifdef DEBUG + fprintf(stdout, _("GetSMSMessage: read folder %d, location %d\n"),folderid,location); +#endif + return NULL_SendMessageSequence(100, &CurrentSMSMessageError, 10, 0x14, req); + break; + default: break; + } + + return(error); +} + +void N7110_ReplySaveSMSMessage(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ + int smsnum; + + switch (MessageBuffer[3]) { + + /* save sms */ + case 0x05: +#ifdef DEBUG + fprintf(stdout, _("Message: SMS Message stored at folder %d, location %d\n"), MessageBuffer[4], MessageBuffer[6]); +#endif + + if (CurrentSMSMessage!=NULL) { + N7110_SMS2FakeLocation(&smsnum, (u8) MessageBuffer[4], (int) MessageBuffer[6]); + CurrentSMSMessage->MessageNumber=smsnum; + } + + CurrentSMSMessageError = GE_NONE; + break; + + /* save sms failed */ + case 0x06: + +#ifdef DEBUG + fprintf(stdout, _("Message: SMS Message save failed\n")); +#endif + CurrentSMSMessageError = GE_SMSSAVEFAILED; + break; + + case 0x84: +#ifdef DEBUG + fprintf(stdout, _("Message: Changed name for SMS Message\n")); +#endif + CurrentSMSMessageError = GE_NONE; + break; + + } +} + +GSM_Error N7110_SaveSMSMessage(GSM_SMSMessage *SMS) +{ + unsigned char req[256] = { + N6110_FRAME_HEADER, 0x04, /* SMS save request*/ + 0x03, /* default: mark sms as GSS_NOTSENTREAD */ + 0x10, /* folder (req[5])*/ + 0x00, /* location */ + 0x00, /* location (req[7])*/ + 0x00 /* ??? */ + }; + + unsigned char req2[200] = {N6110_FRAME_HEADER, 0x83}; + + int length,smsnum,location; + u8 folderid; + GSM_Error error; + SMS_MessageType PDU; + + smsnum = SMS->Location; + +#ifdef DEBUG + printf("save sms: smsnum is :%d\n",smsnum); +#endif + + if ( SMS->Status == GSS_SENTREAD) req[4] = 0x01; + + folderid = SMS->folder; + + PDU=SMS_Deliver; + + error=GSM_EncodeNokiaSMSFrame(SMS, req+9, &length, PDU); + if (error != GE_NONE) return error; + + CurrentSMSMessage = SMS; + + error=N7110_HandleSMSLocation(smsnum, &folderid, &location, SMS, GSH_SAVE); + switch (error) + { + + case GE_BUSYSMSLOCATION: /* delete old sms before save */ + error = N7110_DeleteSMSMessage(SMS); + if (error != GE_NONE) return error; + break; + case GE_NONE: + break; + default: + return error; + break; + } + +#ifdef DEBUG + printf("save sms: want to save at folder:%d , location:%d\n",folderid,location); +#endif + + req[5]=folderid; + req[6]=location / 256; + req[7]=location; + + error=NULL_SendMessageSequence + (70, &CurrentSMSMessageError, 40+length, 0x14, req); + + if (error==GE_NONE && SMS->Name[0]!=0) { + length=4; + N7110_Fake2SMSLocation(SMS->MessageNumber, &folderid, &location); + req2[length++]=folderid; + req2[length++]=location / 256; + req2[length++]=location; + EncodeUnicode(req2+length, SMS->Name, strlen(SMS->Name)); + length=length+strlen(SMS->Name)*2; + req2[length++]=0; + req2[length++]=0; + error=NULL_SendMessageSequence + (70, &CurrentSMSMessageError, length, 0x14, req2); + } + + return error; +} + +/* handling for 7110 folders */ +GSM_Error N7110_HandleSMSLocation(int smsnum, u8 *folder, int *location, GSM_SMSMessage *message, GSM_SMSHandleAction action) +{ + /* remember me */ + static int nextSMSmessage = -1; + static GSM_SMSStatus Status; + + bool found = false; + int folderid; + GSM_OneSMSFolder onefolder; + GSM_Error error; + int ismsnum; + int i; + + switch (action) { + case GSH_DELETE: /* future use: delete sms in mem -> free memory */ + /* for now we make same as in GSH_GET */ + case GSH_GET: /* if smsnum == 0 user wants to read next sms */ + if (smsnum == 0 ) + { + /* first time we read folderstatus */ + if ( nextSMSmessage == -1) + { + nextSMSmessage = 0; + error = N7110_GetSMSStatus( &Status); + if (error!=GE_NONE) return error; + } + ismsnum = Status.foldertable[nextSMSmessage].smsnum; + N7110_Fake2SMSLocation( ismsnum, folder, location); + nextSMSmessage++; + if(nextSMSmessage >= Status.Number) + { + nextSMSmessage = -1; +#ifdef DEBUG + printf("HandleSMS: setting nextSMSmessage to -1\n"); +#endif + } + } else /* user give location -> make fake location */ + { + /* future use: get already read sms from mem */ + N7110_Fake2SMSLocation( smsnum, folder, location); + } + break; + case GSH_SAVE: /* if smsnum == 0 user wants to save in specific folder */ + if (smsnum == 0 ) + { + /* calculate correct folderid */ + *folder = ( *folder + 1) * 8; + + *location = 0; + } else /* user give location -> make fake location */ + { + N7110_Fake2SMSLocation( smsnum, folder, location); + folderid = *folder; + + error=N7110_GetSMSFolderStatus(&onefolder, folderid ); + if (error!=GE_NONE) return error; + + /* is there a sms at that location ? */ + for (i=0; iSendMessage(4, 0x0a, request); + + /* Wait for timeout or other error. */ + while (timeout != 0 && CurrentRFLevel == -1 ) { + + if (--timeout == 0) + return (GE_TIMEOUT); + + usleep (100000); + } + + /* Make copy in case it changes. */ + rf_level = CurrentRFLevel; + + if (rf_level == -1) + return (GE_NOLINK); + + /* Now convert between the different units we support. */ + + /* Arbitrary units. */ + *units = GRF_Percentage; + *level = rf_level; + return (GE_NONE); +} + +GSM_Error N7110_GetBatteryLevel(GSM_BatteryUnits *units, float *level) +{ + unsigned char request[] = {N6110_FRAME_HEADER, 0x02}; + + int timeout=10; + int batt_level; + + CurrentBatteryLevel=-1; + + Protocol->SendMessage(4, 0x17, request); + + /* Wait for timeout or other error. */ + while (timeout != 0 && CurrentBatteryLevel == -1 ) { + + if (--timeout == 0) + return (GE_TIMEOUT); + + usleep (100000); + } + + /* Take copy in case it changes. */ + batt_level = CurrentBatteryLevel; + + if (batt_level == -1) + return (GE_NOLINK); + + /* Only units we handle at present are GBU_Arbitrary */ + *units = GBU_Percentage; + *level = batt_level; + return (GE_NONE); +} + +GSM_Error N7110_GetSecurityCode(GSM_SecurityCode *SecurityCode) +{ + unsigned char req[] = {0x00, 0x01, 0x01, 0xee, 0x1c}; + + if (SecurityCode->Type!=GSCT_SecurityCode) return GE_NOTSUPPORTED; + + CurrentSecurityCode=SecurityCode; + + return NULL_SendMessageSequence + (50, &CurrentSecurityCodeError, 5, 0x7a, req); +} + +GSM_Error N7110_GetDateTime(GSM_DateTime *date_time) +{ + return N6110_PrivGetDateTime(date_time,0x19); +} + +/* Needs SIM card with PIN in phone */ +GSM_Error N7110_SetDateTime(GSM_DateTime *date_time) +{ + return N6110_PrivSetDateTime(date_time,0x19); +} + +GSM_Error N7110_GetAlarm(int alarm_number, GSM_DateTime *date_time) +{ + return N6110_PrivGetAlarm(alarm_number,date_time,0x19); +} + +/* FIXME: we should also allow to set the alarm off :-) */ +GSM_Error N7110_SetAlarm(int alarm_number, GSM_DateTime *date_time) +{ + return N6110_PrivSetAlarm(alarm_number,date_time, 0x19); +} + +void N7110_ReplyGetSMSStatus(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ + switch (MessageBuffer[3]) { + + /* sms status */ + case 0x37: + +#ifdef DEBUG + fprintf(stdout, _("Message: SMS Status Received\n")); + fprintf(stdout, _(" Used msg in phone memory: %i\n"),MessageBuffer[10]*256+MessageBuffer[11]); + fprintf(stdout, _(" Unread msg in phone memory: %i\n"),MessageBuffer[12]*256+MessageBuffer[13]); + fprintf(stdout, _(" Used msg in SIM: %i\n"),MessageBuffer[14]*256+MessageBuffer[15]); + fprintf(stdout, _(" Unread msg in SIM: %i\n"),MessageBuffer[16]*256+MessageBuffer[17]); +#endif /* DEBUG */ + CurrentSMSStatus->UnRead = MessageBuffer[13]; + CurrentSMSStatusError = GE_NONE; + break; + + case 0x38: + +#ifdef DEBUG + fprintf(stdout, _("Message: SMS Status error, probably not authorized by PIN\n")); +#endif /* DEBUG */ + CurrentSMSStatusError = GE_INTERNALERROR; + break; + + } +} + +GSM_Error N7110_GetSMSStatus(GSM_SMSStatus *Status) +{ + /* RTH FIXME: what is exact meaning of 0x0037 answer ? */ + /* we check all folders, but get sum of unread sms via 0x0036 request */ + unsigned char req[] = {N6110_FRAME_HEADER, 0x36, 0x64}; + + GSM_SMSFolders folders; + GSM_OneSMSFolder folder; + GSM_Error error; + u8 ifolder; + int ismsnum,ilocation; + int i,j,smsmaxnum; + + CurrentSMSStatus = Status; + + /* read all SMS folders */ + /* check for unread messages in folder 0xf8 */ + error = N7110_GetSMSFolderStatus(&folder, 0xf8); + if (error != GE_NONE) return error; + + smsmaxnum=0; + for(j=0; jfoldertable[smsmaxnum].smsnum = ismsnum; + CurrentSMSStatus->foldertable[smsmaxnum].folder = ifolder; + CurrentSMSStatus->foldertable[smsmaxnum].location = ilocation; + smsmaxnum++; + } + + /* read standard folders */ + N7110_GetSMSFolders (&folders); + for(i=0; iFolder[i], CurrentSMSFolders->FoldersID[i]); + if (error != GE_NONE) return error; + + for(j=0; jFolder[i].number; j++) + { + ifolder = CurrentSMSFolders->FoldersID[i]; + ilocation = CurrentSMSFolders->Folder[i].locations[j]; + N7110_SMS2FakeLocation( &ismsnum, ifolder, ilocation); + CurrentSMSStatus->foldertable[smsmaxnum].smsnum = ismsnum; + CurrentSMSStatus->foldertable[smsmaxnum].folder = ifolder; + CurrentSMSStatus->foldertable[smsmaxnum].location = ilocation; + smsmaxnum++; + } + } + CurrentSMSStatus->Number = smsmaxnum; + + return NULL_SendMessageSequence(10, &CurrentSMSStatusError, 5, 0x14, req); +} + +void N7110_DecodePhonebookFrame(GSM_PhonebookEntry *entry,u8 *MessageBuffer,u16 MessageLength) +{ + int blockcount=0; + unsigned char *pBlock; + int length=0; + +#ifdef DEBUG + int j; +#endif + + pBlock = &MessageBuffer[0]; + + while (length!=MessageLength) { + GSM_SubPhonebookEntry* pEntry = &entry->SubEntries[blockcount]; + +#ifdef DEBUG + fprintf(stdout,_(" ")); + for (j=5;j<(pBlock[3]-6)+5;j++) fprintf(stdout,_("%02x "),pBlock[j]); + fprintf(stdout,_("\n")); +#endif + + switch( pBlock[0] ) { + case N7110_ENTRYTYPE_SPEEDDIAL: + + CurrentSpeedDialEntry->MemoryType = GMT_SM; + if (pBlock[4]==0x02) CurrentSpeedDialEntry->MemoryType = GMT_ME; + + CurrentSpeedDialEntry->Location = pBlock[7]+pBlock[6]*256; + +#ifdef DEBUG + fprintf(stdout, _(" Speed dial\n")); + fprintf(stdout, _(" Location: %d\n"), CurrentSpeedDialEntry->Location); + fprintf(stdout, _(" MemoryType: %i\n"), CurrentSpeedDialEntry->MemoryType); + fprintf(stdout, _(" Number: %d\n"), CurrentSpeedDialEntry->Number); +#endif /* DEBUG */ + + CurrentSpeedDialError=GE_NONE; + break; + + case N7110_ENTRYTYPE_NAME: + DecodeUnicode (entry->Name, pBlock+6, pBlock[5]/2); + if (CurrentGetBitmap && CurrentGetBitmapError == GE_BUSY) + strncpy(CurrentGetBitmap->text,entry->Name,sizeof(CurrentGetBitmap->text)); + entry->Empty = false; +#ifdef DEBUG + fprintf(stdout, _(" Name:\n")); + fprintf(stdout, _(" Name: %s\n"), entry->Name); +#endif /* DEBUG */ + break; + + case N7110_ENTRYTYPE_NUMBER: + pEntry->EntryType = pBlock[0]; + pEntry->NumberType = pBlock[5]; + pEntry->BlockNumber = pBlock[4]; + + DecodeUnicode (pEntry->data.Number, pBlock+10, pBlock[9]/2); + +#ifdef DEBUG + fprintf(stdout, _(" Number:\n")); + fprintf(stdout, _(" Type: %d (%02x)\n"),pEntry->NumberType,pEntry->NumberType); + fprintf(stdout, _(" Number: %s\n"),pEntry->data.Number); +#endif /* DEBUG */ + if( pEntry->EntryType == GSM_Number && + ((pEntry->NumberType == GSM_General && !strcmp(entry->Number,"")) + || pEntry->NumberType == GSM_SIM)) { + strcpy( entry->Number, pEntry->data.Number ); + *pEntry->data.Number = 0; + } else + blockcount++; + break; + case N7110_ENTRYTYPE_DATE: + pEntry->EntryType = pBlock[0]; + pEntry->NumberType = pBlock[5]; + pEntry->BlockNumber = pBlock[4]; + DecodeDateTime(pBlock+6, &pEntry->data.Date); +#ifdef DEBUG + fprintf(stdout, _(" Date:\n")); + fprintf(stdout, _(" Date: %02u.%02u.%04u\n"), pEntry->data.Date.Day, + pEntry->data.Date.Month, pEntry->data.Date.Year ); + fprintf(stdout, _(" Time: %02u:%02u:%02u\n"), pEntry->data.Date.Hour, + pEntry->data.Date.Minute, pEntry->data.Date.Second); +#endif /* DEBUG */ + blockcount++; + break; + case N7110_ENTRYTYPE_NOTE: + case N7110_ENTRYTYPE_POSTAL: + case N7110_ENTRYTYPE_EMAIL: + pEntry->EntryType = pBlock[0]; + pEntry->NumberType = 0; + pEntry->BlockNumber = pBlock[4]; + + DecodeUnicode (pEntry->data.Number, pBlock+6, pBlock[5]/2); + +#ifdef DEBUG + fprintf(stdout, _(" Email or note or postal:\n")); + fprintf(stdout, _(" Type: %d (%02x)\n"),pEntry->EntryType,pEntry->EntryType); + fprintf(stdout, _(" Text: %s\n"),pEntry->data.Number); +#endif /* DEBUG */ + blockcount++; + break; + case N7110_ENTRYTYPE_GROUP: + entry->Group = pBlock[5]-1; /* 0 = family as for 6110 */ + if (CurrentGetBitmap && CurrentGetBitmapError == GE_BUSY) + CurrentGetBitmap->number = entry->Group; +#ifdef DEBUG + fprintf(stdout, _(" Group: %d\n"), entry->Group); +#endif /* DEBUG */ + break; + case N7110_ENTRYTYPE_RINGTONE: + if (CurrentGetBitmap && CurrentGetBitmapError == GE_BUSY) + CurrentGetBitmap->ringtone = pBlock[5]; +#ifdef DEBUG + fprintf(stdout, _(" Group ringtone number %d received.\n"), pBlock[5]); +#endif /* DEBUG */ + break; + case N7110_ENTRYTYPE_LOGOON: + if (CurrentGetBitmap && CurrentGetBitmapError == GE_BUSY) + CurrentGetBitmap->enabled = pBlock[5]; +#ifdef DEBUG + fprintf(stdout, _(" Logo enabled = %d received.\n"), pBlock[5]); +#endif /* DEBUG */ + break; + case N7110_ENTRYTYPE_GROUPLOGO: +#ifdef DEBUG + fprintf(stdout, _(" Caller group logo received.\n")); +#endif /* DEBUG */ + if (CurrentGetBitmap && CurrentGetBitmapError == GE_BUSY) { + CurrentGetBitmap->width = pBlock[5]; + CurrentGetBitmap->height= pBlock[6]; + CurrentGetBitmap->size = pBlock[9]; + if (CurrentGetBitmap->size > sizeof(CurrentGetBitmap->bitmap)) + CurrentGetBitmap->size = CurrentGetBitmap->size; + memcpy(CurrentGetBitmap->bitmap,pBlock+10,CurrentGetBitmap->size); + } + break; + + default: +#ifdef DEBUG + fprintf(stdout, _(" Unknown Entry Code (%u) received.\n"), pBlock[0] ); +#endif /* DEBUG */ + break; + } + +#ifdef DEBUG + fprintf(stdout, _(" Blocksize was: %d (%02x)\n"), (int) pBlock[3], pBlock[3]); +#endif + length=length+pBlock[3]; + + pBlock = &pBlock[(int) pBlock[3]]; + } + + entry->SubEntriesCount = blockcount; + +#ifdef DEBUG + fprintf(stdout, _(" SubBlocks: %d\n"),entry->SubEntriesCount); +#endif /* DEBUG */ +} + +void N7110_ReplyGetMemoryLocation(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ + + CurrentPhonebookEntry->Empty = true; + CurrentPhonebookEntry->Group = 5; /* 5 = no group as 6110 */ + CurrentPhonebookEntry->Name[0] = '\0'; + CurrentPhonebookEntry->Number[0] = '\0'; + CurrentPhonebookEntry->SubEntriesCount = 0; + +#ifdef DEBUG + fprintf(stdout, _("Message: Phonebook entry received:\n")); +#endif + + if( MessageBuffer[6] == 0x0f ) // not found + { +#ifdef DEBUG + fprintf(stdout, _(" Error %i\n"),MessageBuffer[10]); + switch (MessageBuffer[10]) { + case 0x34:fprintf(stdout,_(" Invalid phonebook location\n"));break; + case 0x3b:fprintf(stdout,_(" Speed dial not assigned\n"));break; + default :fprintf(stdout,_(" Unknown.Please report\n"));break; + } +#endif + switch (MessageBuffer[10]) { + case 0x34:CurrentPhonebookError = GE_INVALIDPHBOOKLOCATION;break; + case 0x3b:CurrentPhonebookError = GE_INVALIDSPEEDDIALLOCATION;break; + default :CurrentPhonebookError = GE_UNKNOWN; + } + CurrentSpeedDialError=GE_INVALIDSPEEDDIALLOCATION; + + } else { + CurrentPhonebookEntry->Location=MessageBuffer[13]+MessageBuffer[12]*256; + +#ifdef DEBUG + fprintf(stdout,_(" Location: %i\n"),CurrentPhonebookEntry->Location); +#endif + + N7110_DecodePhonebookFrame(CurrentPhonebookEntry,MessageBuffer+18,MessageLength-18); + + CurrentPhonebookError = GE_NONE; + } +} + +/* Routine to get specifed phone book location. Designed to be called by + application. Will block until location is retrieved or a timeout/error + occurs. */ +GSM_Error N7110_GetMemoryLocation(GSM_PhonebookEntry *entry) { + + unsigned char req[] = {N7110_FRAME_HEADER, 0x07, 0x01, 0x01, 0x00, 0x01, + 0x02, //memory type + 0x05, + 0x00, 0x00, //location + 0x00, 0x00}; + + CurrentPhonebookEntry = entry; + + req[9] = N7110_GetMemoryType(entry->MemoryType); + req[10] = (entry->Location>>8); + req[11] = entry->Location & 0xff; + + return NULL_SendMessageSequence + (50, &CurrentPhonebookError, 14, 0x03, req); +} + +void N7110_ReplyWritePhonebookLocation(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ + // [12,13] = Location + // [14] = Memory + + if( MessageBuffer[6] == 0x0f ) // ERROR + { +#ifdef DEBUG + /* I didn't find any error when the Text,Name or Number was too long + My Phone 7110; NSE-5; SW 04.84 */ + switch( MessageBuffer[10] ) { + case 0x3d: fprintf(stdout, _("Error: Wrong Entry Type.\n")); break; + case 0x3e: fprintf(stdout, _("Error: Too much entries.\n")); break; + default : fprintf(stdout, _("Error: Unknown error (%u).\n"), MessageBuffer[10]); break; + } +#endif /* DEBUG */ + CurrentPhonebookError = GE_NONE; + } else { +#ifdef DEBUG + fprintf(stdout, _("Message: Phonebook written correctly.\n")); +#endif /* DEBUG */ + + CurrentPhonebookError = GE_NONE; + } +} + +int N7110_PackPBKBlock(int id, int size, int no, unsigned char *buf, unsigned char *block) +{ +#ifdef DEBUG + fprintf(stdout,_("Adding block id:%i,number:%i,length:%i\n"),id,no+1,size+6); +#endif + + *(block++) = id; + *(block++) = 0; + *(block++) = 0; + *(block++) = size + 6; + *(block++) = no + 1; + + memcpy(block, buf, size); + block += size; + + *(block++) = 0; + + return (size + 6); +} + +int N7110_EncodePhonebookFrame(unsigned char *req, GSM_PhonebookEntry entry, int *block2) +{ + int count=0, len, i, block=0; + + char string[500]; + + /* Name */ + len = strlen(entry.Name); + string[0] = len * 2; // Length ot the string (without Termination) + EncodeUnicode((string + 1), entry.Name, len); + string[len * 2 + 1] = 0; // Terminating 0 + count += N7110_PackPBKBlock(N7110_ENTRYTYPE_NAME, len * 2 + 2, block++, string, req + count); + + if (*entry.Number) { + len = strlen(entry.Number); + string[0] = N7110_ENTRYTYPE_NUMBER; + string[1] = string[2] = string[3] = 0; + string[4] = len * 2; // length (without Termination) + EncodeUnicode((string + 5), entry.Number, len); + string[len * 2 + 5] = 0; // Terminating 0 + count += N7110_PackPBKBlock(N7110_ENTRYTYPE_NUMBER, len * 2 + 6, block++, string, req + count); + } + + /* Rest of the subentries */ + for (i = 0; i < entry.SubEntriesCount; i++) { + len = strlen(entry.SubEntries[i].data.Number); + if (entry.SubEntries[i].EntryType != GSM_Number) { + string[0] = len * 2; // length (without Termination) + EncodeUnicode((string + 1), entry.SubEntries[i].data.Number, len); + string[len * 2 + 1] = 0; // Terminating 0 + count += N7110_PackPBKBlock(entry.SubEntries[i].EntryType, len * 2 + 2, block++, string, req + count); + } else { + string[0] = entry.SubEntries[i].NumberType; + string[1] = string[2] = string[3] = 0; + string[4] = len * 2; //length (without Termination) + EncodeUnicode((string + 5), entry.SubEntries[i].data.Number, len); + string[len * 2 + 5] = 0; // Terminating 0 + count += N7110_PackPBKBlock(N7110_ENTRYTYPE_NUMBER, len * 2 + 6, block++, string, req + count); + } + } + + if (entry.Group != 5) { + /* Group */ + string[0] = entry.Group + 1; + string[1] = 0; + count += N7110_PackPBKBlock(N7110_ENTRYTYPE_GROUP, 2, block++, string, req + count); + } + + *block2=block; + + return count; +} + +/* Routine to write phonebook location in phone. */ +GSM_Error N7110_WritePhonebookLocation(GSM_PhonebookEntry *entry) +{ + unsigned char req[500] = {N7110_FRAME_HEADER, 0x0b, 0x00, 0x01, 0x01, 0x00, 0x00, 0x0c, + 0x00, 0x00, /* memory type */ + 0x00, 0x00, /* location */ + 0x00, 0x00, 0x00}; + int count = 18, blocks; + + if (entry->Name[0] != '\0' || entry->Number[0] != '\0') { + req[11] = N7110_GetMemoryType(entry->MemoryType); + req[12] = (entry->Location >> 8); + req[13] = entry->Location & 0xff; + +// if (entry->MemoryType == GMT_SM) entry->SubEntriesCount = 0; + + count=count+N7110_EncodePhonebookFrame(req+18, *entry, &blocks); + + req[17]=blocks; + +#ifdef DEBUG + fprintf(stdout, _("Writing phonebook entry %s...\n"),entry->Name); +#endif + + return NULL_SendMessageSequence(50, &CurrentPhonebookError, count, 0x03, req); + + } else { + + /* empty name & number => we have to delete the phonebook record! */ + return N7110_DeletePhonebookLocation( entry ); + + } +} + +void N7110_ReplyDeletePhonebookLocation(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ +#ifdef DEBUG + fprintf(stdout, _("Message: Phonebook entry deleted correctly\n")); +#endif /* DEBUG */ + CurrentPhonebookError = GE_NONE; +} + +/* delete phonebookentry */ +/* Not used in this moment */ +GSM_Error N7110_DeletePhonebookLocation(GSM_PhonebookEntry *entry) +{ + unsigned char req[256] = { + N7110_FRAME_HEADER, 0x0f, 0x00, 0x01, 0x04, + 0x00, 0x00, 0x0c, 0x01, 0xff, + 0x00, /* location low*/ + 0x01, /* location high*/ + 0x05, /* mem location low*/ + 0x00, /* mem location high*/ + 0x00, 0x00 + }; + + req[12] = (entry->Location >> 8); + req[13] = entry->Location & 0xff; + req[14] = N7110_GetMemoryType(entry->MemoryType); + +#ifdef DEBUG + fprintf(stdout, _("Deleting phonebook entry at location %d...\n"),entry->Location); +#endif + + return NULL_SendMessageSequence(50, &CurrentPhonebookError, 18, 0x03, req); +} + +/* for saving group logos only */ +GSM_Error N7110_WriteGroupDataLocation(GSM_Bitmap *bitmap) +{ + unsigned char req[500] = {N6110_FRAME_HEADER, 0x0b, 0x00, 0x01, 0x01, 0x00, 0x00, 0x0c, + 0x00, 0x10, /* memory type */ + 0x00, 0x00, /* location */ + 0x00, 0x00, 0x00}; + char string[500]; + int block=0, i; + unsigned int count = 18; + + req[13] = bitmap->number + 1; + + /* Logo on/off */ + string[0] = bitmap->enabled?1:0; + string[1] = 0; + count += N7110_PackPBKBlock(N7110_ENTRYTYPE_LOGOON, 2, block++, string, req + count); + + /* Ringtone */ + string[0] = bitmap->ringtone; + string[1] = 0; + count += N7110_PackPBKBlock(N7110_ENTRYTYPE_RINGTONE, 2, block++, string, req + count); + + /* Number of group */ + string[0] = bitmap->number+1; + string[1] = 0; + count += N7110_PackPBKBlock(N7110_ENTRYTYPE_GROUP, 2, block++, string, req + count); + + /* Name */ + if (*bitmap->text) { + i = strlen(bitmap->text); + string[0] = i * 2 + 2; + EncodeUnicode((string + 1), bitmap->text, i); + string[i * 2 + 1] = 0; // Terminating 0 + count += N7110_PackPBKBlock(N7110_ENTRYTYPE_NAME, i * 2 + 2, block++, string, req + count); + } + + /* Logo */ + string[0] = bitmap->width; + string[1] = bitmap->height; + string[2] = 0; + string[3] = 0; + string[4] = bitmap->size; + memcpy(string + 5, bitmap->bitmap, bitmap->size); + count += N7110_PackPBKBlock(N7110_ENTRYTYPE_GROUPLOGO, bitmap->size + 5, block++, string, req + count); + + req[17] = block; //number of blocks + + return NULL_SendMessageSequence + (50, &CurrentPhonebookError, count, 0x03, req); +} + +GSM_Error N7110_GetSpeedDial(GSM_SpeedDial *entry) +{ + unsigned char req[] = {N7110_FRAME_HEADER, 0x07, 0x01, 0x01, 0x00, 0x01, + 0x02, //memory type + 0x05, + 0x00, 0x00, //location + 0x00, 0x00}; + + GSM_PhonebookEntry entry2; + GSM_Error error; + + CurrentPhonebookEntry = &entry2; + + CurrentSpeedDialEntry = entry; + + req[9] = N7110_MEMORY_SD; + req[10] = (entry->Number>>8); + req[11] = entry->Number & 0xff; + + error=NULL_SendMessageSequence + (50, &CurrentSpeedDialError, 14, 0x03, req); + + /* Full compatibility with 6110 */ + if (error==GE_INVALIDSPEEDDIALLOCATION) { + entry->Location=0; + entry->MemoryType=GMT_MT; + return GE_NONE; + } else return error; +} + +/* Experimental ! */ +GSM_Error N7110_SetSpeedDial(GSM_SpeedDial *entry) +{ + unsigned char req[500] = {N6110_FRAME_HEADER, 0x0b, 0x00, 0x01, 0x01, 0x00, 0x00, 0x0c, + 0x00, 0x0e, /* memory type */ + 0x00, 0x00, /* location */ + 0x00, 0x00, 0x00}; + char string[500]; + int block=1; + unsigned int count = 18; + + req[13] = entry->Number; + + string[0]= 0xff; + string[1]= entry->Location/256; + string[2]= entry->Location%256; + string[3]= 0x05; + string[4]= string[5] = 0; + count += N7110_PackPBKBlock(N7110_ENTRYTYPE_SPEEDDIAL, 6, block++, string, req + count); + + req[17] = block - 1; //number of blocks + + return NULL_SendMessageSequence + (50, &CurrentPhonebookError, count, 0x03, req); +} + +/* Set a bitmap or welcome-note */ +GSM_Error N7110_SetBitmap(GSM_Bitmap *Bitmap) +{ + unsigned char reqStartup[1000] = { N7110_FRAME_HEADER, + 0xec, 0x15, // Startup Logo + 0x00, 0x00, 0x00, 0x04, + 0xc0, 0x02, 0x00, + 0x00, // Bitmap height + 0xc0, 0x03, 0x00, + 0x00, // Bitmap width + 0xc0, 0x04, 0x03, 0x00 + }; // Bitmap following + unsigned char reqOp[1000] = { N7110_FRAME_HEADER, + 0xa3, 0x01, + 0x00, // logo disabled + 0x00, 0xf0, 0x00, // network code (000 00) + 0x00 ,0x04, + 0x08, // length of rest + 0x00, 0x00, // Bitmap width / height + 0x00, + 0x00, // Bitmap size + 0x00, 0x00 + }; // Bitmap following + + /* Picture Images */ + unsigned char req2[7] = { N6110_FRAME_HEADER, 0x96,0x00,0x0f,0x07 }; + unsigned char req3[9] = { 0x09, 0x11, 0x19, 0x21, 0x29, 0x31, 0x39, 0x41, 0x49 }; + unsigned char req4[500] = { N6110_FRAME_HEADER, 0x50, 0x07, + 0x00, //location + 0x00,0x00, //index + 0x07}; + + unsigned char req5[120] = {0x00, 0x01, 0x01, 0xec, 0x02,0x00}; + + unsigned char req6[]= {0x00,0x01,0x00,0xaf,0x00}; + + u16 count,i; + + int timeout=60; + + GSM_Error error; + + CurrentSetBitmapError=GE_BUSY; + + switch (Bitmap->type) { + case GSM_WelcomeNoteText: + + EncodeUnicode (req5+5, Bitmap->text, strlen(Bitmap->text)); + count=5+strlen(Bitmap->text)*2; + req5[count++]=0x00; + req5[count++]=0x00; + Protocol->SendMessage(count, 0x7a, req5); + break; + + case GSM_DealerNoteText: + CurrentSetBitmapError = GE_NOTIMPLEMENTED; + break; + + case GSM_StartupLogo: + case GSM_7110StartupLogo: + case GSM_6210StartupLogo: + reqStartup[12] = Bitmap->height; + reqStartup[16] = Bitmap->width; + count = 21; + memcpy(reqStartup+count,Bitmap->bitmap,Bitmap->size); + Protocol->SendMessage(count+Bitmap->size, 0x7a, reqStartup); + break; + + case GSM_OperatorLogo: + case GSM_7110OperatorLogo: + count = 18; + + /* set logo */ + if (strcmp(Bitmap->netcode,"000 00")) { + reqOp[5] = 0x01; // Logo enabled + EncodeNetworkCode(reqOp+6, Bitmap->netcode); + reqOp[11] = 8+GSM_GetBitmapSize(Bitmap); + reqOp[12]=Bitmap->width; + reqOp[13]=Bitmap->height; + reqOp[15]=GSM_GetBitmapSize(Bitmap); + memcpy(reqOp+count,Bitmap->bitmap,Bitmap->size); + count += Bitmap->size; + } else { + for (i=0;i<5;i++) { + req6[4]=i; + error=NULL_SendMessageSequence + (50, &CurrentSetBitmapError, 5, 0x0a, req6); + if (error!=GE_NONE) return error; + } + } + Protocol->SendMessage(count, 0x0a, reqOp); + break; + + case GSM_CallerLogo: + CurrentSetBitmapError = N7110_WriteGroupDataLocation(Bitmap); + break; + + case GSM_PictureImage: + CurrentGetBitmap=Bitmap; + PictureImageNum=0; + count=0; + while (count!=9) { + req2[4]=req3[count]; + PictureImageLoc=req3[count]; + count++; + if (NULL_SendMessageSequence (50, &CurrentGetBitmapError, 7, 0x14, req2)!=GE_NONE) break; + if (PictureImageNum==Bitmap->number+1) break; + } + if (CurrentGetBitmapError!=GE_NONE) { + req4[5]=0x21; + req4[6]=0; + req4[7]=0; + } else { + req4[5]=PictureImageLoc; + req4[6]=PictureImageIndex/256; + req4[7]=PictureImageIndex%256; + } + count=7; + for (i=0;i<38;i++) req4[count++]=0x00; + req4[count++]=Bitmap->width; + req4[count++]=Bitmap->height; + req4[count++]=Bitmap->size/256; + req4[count++]=Bitmap->size%256; + memcpy(reqOp+count,Bitmap->bitmap,Bitmap->size); + count += Bitmap->size; + req4[count++]=0x00; + req4[count++]=0x00; + + CurrentSetBitmapError = GE_BUSY; + + Protocol->SendMessage(count, 0x14, req4); + + case GSM_None: + return GE_NONE; + } + + /* Wait for timeout or other error. */ + while (timeout != 0 && CurrentSetBitmapError == GE_BUSY ) { + + if (--timeout == 0) + return (GE_TIMEOUT); + + usleep (100000); + } + + if ((Bitmap->type==GSM_OperatorLogo || Bitmap->type==GSM_7110OperatorLogo) + && CurrentSetBitmapError==GE_NONE && !strcmp(Bitmap->netcode,"000 00")) { + return N6110_Reset(0x03); + } + + return CurrentSetBitmapError; +} + +/* Get a bitmap from the phone */ +GSM_Error N7110_GetBitmap(GSM_Bitmap *Bitmap) +{ + unsigned char req[10] = { N6110_FRAME_HEADER }; + + /* Picture Images */ + unsigned char req2[7] = { N6110_FRAME_HEADER, 0x96,0x00,0x0f,0x07 }; + unsigned char req3[9] = { 0x09, 0x11, 0x19, 0x21, 0x29, 0x31, 0x39, 0x41, 0x49 }; + unsigned char req4[9] = { N6110_FRAME_HEADER, 0x07, + 0x00, //location + 0x00,0x00, //index + 0x00, 0x64}; + + /* Welcome note */ + unsigned char req5[] = {0x00, 0x01, 0x01, 0xee, 0x02}; + + u8 count=3; + int timeout; + GSM_PhonebookEntry entry; + + CurrentGetBitmapError = GE_BUSY; + + CurrentGetBitmap=Bitmap; + + switch (CurrentGetBitmap->type) { + case GSM_StartupLogo: + case GSM_7110StartupLogo: + case GSM_6210StartupLogo: + req[count-1]=0x01; /* change FRAME_HEADER */ + req[count++]=0xee; /* to get 0x01ee */ + req[count++]=0x15; + Protocol->SendMessage(count, 0x7a, req); + break; + + case GSM_WelcomeNoteText: + + Protocol->SendMessage(5, 0x7a, req5); + break; + + case GSM_DealerNoteText: + + return GE_NOTIMPLEMENTED; + + case GSM_OperatorLogo: + case GSM_7110OperatorLogo: + req[count++]=0x70; /* NetworkStatus */ + Protocol->SendMessage(count, 0x0a, req); + break; + + case GSM_CallerLogo: + entry.MemoryType = GMT_CG; + entry.Location = Bitmap->number+1; + *Bitmap->text=0; + Bitmap->ringtone=0xFF; + Bitmap->enabled=true; + CurrentGetBitmapError = N7110_GetMemoryLocation(&entry); + CurrentGetBitmap=NULL; + if (entry.Location!=Bitmap->number+1) return GE_UNKNOWN; + if (!strcmp(Bitmap->text,"")) { + switch(Bitmap->number) { + case 0:strcpy(Bitmap->text,"Family\0");break; + case 1:strcpy(Bitmap->text,"VIP\0");break; + case 2:strcpy(Bitmap->text,"Friends\0");break; + case 3:strcpy(Bitmap->text,"Colleagues\0");break; + case 4:strcpy(Bitmap->text,"Other\0");break; + } + } + break; + + case GSM_PictureImage: + + PictureImageNum=0; + count=0; + while (count!=9) { + req2[4]=req3[count]; + PictureImageLoc=req3[count]; + count++; + if (NULL_SendMessageSequence (50, &CurrentGetBitmapError, 7, 0x14, req2)!=GE_NONE) + return CurrentGetBitmapError; + if (PictureImageNum==Bitmap->number+1) break; + } + if (CurrentGetBitmapError!=GE_NONE) return CurrentGetBitmapError; + + req4[4]=PictureImageLoc; + req4[5]=PictureImageIndex/256; + req4[6]=PictureImageIndex%256; + + CurrentGetBitmapError = GE_BUSY; + + Protocol->SendMessage(9, 0x14, req4); + + break; + + default: + return GE_NOTSUPPORTED; + } + + timeout=150; + + while (timeout != 0 && CurrentGetBitmapError == GE_BUSY) { + + if (--timeout == 0) + return (GE_TIMEOUT); + + usleep (100000); + } + + CurrentGetBitmap=NULL; + + return (CurrentGetBitmapError); +} + +int ReturnBinRingLocation() +{ + char model[64]; + + while (GSM->GetModel(model) != GE_NONE) sleep(1); + + if (strcmp(model,"NSE-5") == 0) return 0x74; //first 0x74 //7110 + if (strcmp(model,"NPE-3") == 0) return 0x89; //first is 0x89; //6210 + + return 0; +} + +/* +this works only for 6210, the 7110 needs upload to a location ? +*/ +GSM_Error N7110_SetRingTone(GSM_Ringtone *ringtone, int *maxlength) +{ + + /* Buffer for preview uploading */ + unsigned char buffer[1000] = {0x7C, 0x01, 0x00, 0x0D, + 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, + 0x00 // Length + }; + int size=FB61_MAX_RINGTONE_FRAME_LENGTH; + + GSM_NetworkInfo NetworkInfo; + + char req[4000] = {N7110_FRAME_HEADER, 0x1F, 0x00, + 0x87, // Location + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x02, 0xFC, 0x09, 0x00, 0x0A, 0x01 + }; + + /* Info from Till Toenshoff [till@uni.de] + + One improvement - for looping you can use an alternative header + normal + 0x02, 0xFC, 0x09, 0x00, 0x0A, 0x01 + + loop + 0x02, 0xFC, 0x09, 0x00, 0x05, 0xLL, 0x0A, 0x01 + + LL=0x01-0x10 + + 0x01=loop once + [...] + 0x10=loop infinite + */ + char tail[] = {0x40, 0x7D, 0x40, 0x5C, 0x0A, 0xFE, 0x40, + 0x20, 0x40, 0x7D, 0x40, 0x37, 0x0A, 0xFE, + 0x0A, 0x0A, 0x40, 0x32, 0x07, 0x0B // 20 Bytes tail + }; + +//{ "c", "c#", "d", "d#", "e", "f", "f#", "g", "g#", "a", "a#", "h" }; + char N7110_notes[14] = + { 0, 1, 2, 3, 4, 4, 5, 6, 7, 8, 9, 10 , 11, 11 }; + + int current = 6, i, note, lastnote = 0, duration; + + /* Preview uploading */ + if (ringtone->location==255) { + *maxlength=GSM_PackRingtone(ringtone, buffer+11, &size); + buffer[10] = size; + Protocol->SendMessage(size+11, 0x00, buffer); + GSM->GetNetworkInfo(&NetworkInfo); //need to make something + sleep(1); + return GE_NONE; //no answer from phone + } + + req[5]=ReturnBinRingLocation()+ringtone->location; + + EncodeUnicode (req+current,ringtone->name ,strlen(ringtone->name)); + + current = 43; + + for (i=0; iNrNotes; i++) { + + if (ringtone->notes[i].note == 255) + note = 0x40; + else + note = 114+12*((ringtone->notes[i].note/14)%4) + N7110_notes[ringtone->notes[i].note%14]; + + duration = 60000*ringtone->notes[i].duration/ringtone->notes[i].tempo/256; // in 8 ms ticks of 7110 + + switch (ringtone->notes[i].style) { + case StaccatoStyle: + if (duration) { + req[current++] = note; // note only for one tick + req[current++] = 1; + duration--; + } + note = 0x40; // rest pause + case NaturalStyle: + if (note != 0x40 && duration) { + req[current++] = 0x40; + req[current++] = 1; // small pause between notes + duration--; + } + default: + if (note != 0x40 && note == lastnote && duration) { + req[current++] = 0x40; + req[current++] = 1; // small pause between same notes + duration--; + } + + while (duration > 125) { + req[current++] = note; + req[current++] = 125; + duration -= 125; + } + req[current++] = note; + req[current++] = duration; + } + lastnote = note; + } + + for (i = 0; i < sizeof(tail); i++) + req[current++] = tail[i]; + + Protocol->SendMessage(current, 0x1F, req); + + sleep(1); + + return GE_NONE; //no answer from phone +} + +void N7110_ReplyGetBinRingtone(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ + int i, tmp; + + switch (MessageBuffer[3]) { + + case 0x23: + + tmp=0;i=4; + while (MessageBuffer[i]!=0 || MessageBuffer[i+1]!=0) { + tmp++; + i=i+2; + } + + DecodeUnicode(CurrentGetBinRingtone->name,MessageBuffer+6,tmp); + +#ifdef DEBUG + fprintf(stdout, _("Message: Received ringtone \"%s\"\n"),CurrentGetBinRingtone->name); +#endif /* DEBUG */ + + CurrentGetBinRingtone->frame[0]=0x00; + CurrentGetBinRingtone->frame[1]=0x00; + CurrentGetBinRingtone->frame[2]=0x0c; + CurrentGetBinRingtone->frame[3]=0x01; + CurrentGetBinRingtone->frame[4]=0x2c; + + memcpy(CurrentGetBinRingtone->frame+5,CurrentGetBinRingtone->name,strlen(CurrentGetBinRingtone->name)); + + CurrentGetBinRingtone->length=5+strlen(CurrentGetBinRingtone->name); + + CurrentGetBinRingtone->frame[CurrentGetBinRingtone->length++]=0x00; + CurrentGetBinRingtone->frame[CurrentGetBinRingtone->length++]=0x00; + + /* Looking for end */ + i=37; + while (true) { + if (MessageBuffer[i]==0x07 && MessageBuffer[i+1]==0x0b) { + i=i+2;break; + } + if (MessageBuffer[i]==0x0e && MessageBuffer[i+1]==0x0b) { + i=i+2;break; + } + i++; + if (i==MessageLength) break; + } + + /* Copying frame */ + memcpy(CurrentGetBinRingtone->frame+CurrentGetBinRingtone->length,MessageBuffer+37,i-37); + CurrentGetBinRingtone->length=CurrentGetBinRingtone->length+i-37; + + CurrentBinRingtoneError=GE_NONE; + break; + + case 0x24: + +#ifdef DEBUG + fprintf(stdout, _("Message: Received empty ringtone\n")); +#endif /* DEBUG */ + + CurrentBinRingtoneError=GE_INVALIDRINGLOCATION; + break; + } +} + +GSM_Error N7110_GetBinRingTone(GSM_BinRingtone *ringtone) +{ + + unsigned char req[6] = { N6110_FRAME_HEADER, 0x22, 0x00, 0x00 }; + + req[2]=0x01; + + req[5]=ReturnBinRingLocation()+ringtone->location; + + CurrentGetBinRingtone=ringtone; + + return NULL_SendMessageSequence + (50, &CurrentBinRingtoneError, 6, 0x1f, req); + +} + +GSM_Error N7110_SetBinRingTone(GSM_BinRingtone *ringtone) +{ + unsigned char req[1000] = { N6110_FRAME_HEADER, 0x1f, 0x00, 0x00 }; + + GSM_NetworkInfo NetworkInfo; + + int i; + + req[2]=0x01; + + req[5]=ReturnBinRingLocation()+ringtone->location; + + for (i=6;i<35;i++) req[i]=0x00; + + i=6; + + EncodeUnicode (req+i,ringtone->frame+5 ,strlen(ringtone->frame+5)); + + i=5; + + while (ringtone->frame[i]!=0 || ringtone->frame[i+1]!=0) i++; + + memcpy(req+35,ringtone->frame+i,ringtone->length-i); + + Protocol->SendMessage(35+ringtone->length-i, 0x1f, req); + + GSM->GetNetworkInfo(&NetworkInfo); //need to make something + + return GE_NONE; //no answer from phone +} + +void N7110_ReplyIncomingSMS(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + + GSM_SMSMessage NullSMS; + +#ifdef DEBUG + fprintf(stdout,_("Message: Incoming SMS\n")); +#endif /* DEBUG */ + + GSM_DecodeNokiaSMSFrame(&NullSMS, MessageBuffer+5, MessageLength-5); + +#ifdef DEBUG + fprintf(stdout, _("\n")); +#endif /* DEBUG */ +} + +void N7110_Dispatch0x0AMessage(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ + int count; + +#ifdef DEBUG + char name[100]; +#endif + + GSM_NetworkInfo NullNetworkInfo; + + switch (MessageBuffer[3]) { + + case 0xb0: + +#ifdef DEBUG + fprintf(stdout, _("Message: Clearing operator logo msg\n")); +#endif + CurrentSetBitmapError=GE_NONE; + break; + + case 0x71: + + /* Make sure we are expecting NetworkInfo frame */ + if ((CurrentNetworkInfo && CurrentNetworkInfoError == GE_BUSY) || + (CurrentGetBitmap && CurrentGetBitmapError == GE_BUSY)) { +#ifdef DEBUG + fprintf(stdout, _("Message: Network informations and operator logo:\n")); +#endif + } else { +#ifdef DEBUG + fprintf(stdout, _("Message: Network informations not requested, but received:\n")); +#endif + } + + sprintf(NullNetworkInfo.NetworkCode, "%x%x%x %x%x", MessageBuffer[14] & 0x0f, MessageBuffer[14] >>4, MessageBuffer[15] & 0x0f, MessageBuffer[16] & 0x0f, MessageBuffer[16] >>4); + + sprintf(NullNetworkInfo.CellID, "%02x%02x", MessageBuffer[10], MessageBuffer[11]); + + sprintf(NullNetworkInfo.LAC, "%02x%02x", MessageBuffer[12], MessageBuffer[13]); + +#ifdef DEBUG + fprintf(stdout, _(" CellID: %s\n"), NullNetworkInfo.CellID); + fprintf(stdout, _(" LAC: %s\n"), NullNetworkInfo.LAC); + fprintf(stdout, _(" Network code: %s\n"), NullNetworkInfo.NetworkCode); + fprintf(stdout, _(" Network name for gnokii: %s (%s)\n"), + GSM_GetNetworkName(NullNetworkInfo.NetworkCode), + GSM_GetCountryName(NullNetworkInfo.NetworkCode)); + + DecodeUnicode(name,MessageBuffer+18,MessageBuffer[17]); + fprintf(stdout, _(" Network name for phone: %s\n"),name); + + fprintf(stdout, _(" Status: ")); + switch (MessageBuffer[8]) { + case 0x01: fprintf(stdout, _("home network selected")); break; + case 0x02: fprintf(stdout, _("roaming network")); break; + case 0x03: fprintf(stdout, _("requesting network")); break; + case 0x04: fprintf(stdout, _("not registered in the network")); break; + default: fprintf(stdout, _("unknown")); + } + + fprintf(stdout, "\n"); + + fprintf(stdout, _(" Network selection: %s\n"), MessageBuffer[9]==1?_("manual"):_("automatic")); +#endif /* DEBUG */ + + /* Make sure we are expecting NetworkInfo frame */ + if (CurrentNetworkInfo && CurrentNetworkInfoError == GE_BUSY) { + *CurrentNetworkInfo=NullNetworkInfo; + CurrentNetworkInfoError = GE_NONE; + } + + /* Make sure we are expecting an operator logo */ + if (CurrentGetBitmap && CurrentGetBitmapError == GE_BUSY) { + + strcpy(CurrentGetBitmap->netcode,NullNetworkInfo.NetworkCode); + +#ifdef DEBUG + if (MessageBuffer[4] == 0x02) + fprintf(stdout, _("Message: Operator Logo for %s (%s) network received.\n"), + CurrentGetBitmap->netcode, + GSM_GetNetworkName(CurrentGetBitmap->netcode)); + else + fprintf(stdout, _("Message: No Operator Logo for %s (%s) network received.\n"), + CurrentGetBitmap->netcode, + GSM_GetNetworkName(CurrentGetBitmap->netcode)); +#endif + + CurrentGetBitmap->type=GSM_7110OperatorLogo; + if (MessageBuffer[4] == 0x02) { /* logo present */ + count = 7; + count += MessageBuffer[count]; /* skip network info */ + count ++; + CurrentGetBitmap->width=MessageBuffer[count++]; /* 78 */ + CurrentGetBitmap->height=MessageBuffer[count++]; /* 21 */ + count+=4; + CurrentGetBitmap->size=GSM_GetBitmapSize(CurrentGetBitmap); /* packed size */ + memcpy(CurrentGetBitmap->bitmap,MessageBuffer+count,CurrentGetBitmap->size); + } else { + CurrentGetBitmap->width=78; + CurrentGetBitmap->height=21; + CurrentGetBitmap->size=GSM_GetBitmapSize(CurrentGetBitmap); /* packed size */ + memset(CurrentGetBitmap->bitmap,0,CurrentGetBitmap->size); + } + CurrentGetBitmapError=GE_NONE; + } + + break; + + case 0x82: +#ifdef DEBUG + fprintf(stdout, _("Message: Network Level received:\n")); + + fprintf(stdout, _(" Network Level: %d\n"), MessageBuffer[4]); +#endif /* DEBUG */ + + CurrentRFLevel=MessageBuffer[4]; + break; + + case 0xa4: + +#ifdef DEBUG + fprintf(stdout, _("Message: Operator logo set correctly.\n")); +#endif + CurrentSetBitmapError = GE_NONE; + break; + + default: +#ifdef DEBUG + fprintf(stdout, _("Message: Unknown message of type 0x0a\n")); +#endif /* DEBUG */ + AppendLogText("Unknown msg\n",false); + break; /* Visual C Don't like empty cases */ + } +} + +void N7110_Dispatch0x14Message(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ + int i, tmp; + GSM_ETSISMSMessage ETSI; + + switch (MessageBuffer[3]) { + + /* We have requested invalid or empty location. */ + case 0x09: + +#ifdef DEBUG + fprintf(stdout, _("Message: SMS reading failed\n")); +#endif /* DEBUG */ + + CurrentSMSMessageError = GE_INVALIDSMSLOCATION; + CurrentGetBitmapError=GE_UNKNOWN; + break; + + /* getsms or picture image */ + case 0x08: + + if (MessageBuffer[8]==0x07) { + + if (CurrentGetBitmap!=NULL) { + + for (i=0;iSender,GSM_UnpackSemiOctetNumber(ETSI.Number,true)); + + CurrentGetBitmap->width=MessageBuffer[47]; + CurrentGetBitmap->height=MessageBuffer[48]; + CurrentGetBitmap->size=GSM_GetBitmapSize(CurrentGetBitmap); + + memcpy(CurrentGetBitmap->bitmap,MessageBuffer+51,CurrentGetBitmap->size); + + tmp=GSM_UnpackEightBitsToSeven(0, 121, 121, MessageBuffer+52+CurrentGetBitmap->size, + CurrentGetBitmap->text); + + CurrentGetBitmap->text[MessageBuffer[51+CurrentGetBitmap->size]]=0; + + CurrentGetBitmapError=GE_NONE; + + } else { +#ifdef DEBUG + fprintf(stdout, _("Message: Picture Image received, but not reqested\n")); +#endif /* DEBUG */ + + CurrentSMSMessageError = GE_SMSTOOLONG; + } + + break; + } else { + /* sms message */ + /* status in byte 4 */ + CurrentSMSMessage->Status = MessageBuffer[4]; + + CurrentSMSMessage->Type = GST_SMS; + if (MessageBuffer[8]==0x01) CurrentSMSMessage->Type = GST_DR; + + CurrentSMSMessage->MessageNumber = CurrentSMSMessage->Location; + + /* RTH FIXME: old folder stuff for xgnokii */ + CurrentSMSMessage->folder = (MessageBuffer[5] / 8)-1; + /* if unreadMessage from folder 0, set INBOX folder */ + if (CurrentSMSMessage->folder==-1) CurrentSMSMessage->folder = 0; +#ifdef DEBUG + fprintf(stdout, _("Message: SMS Message received: Type: %i Folder: %i Location: %i\n") + ,CurrentSMSMessage->Type, CurrentSMSMessage->folder, MessageBuffer[7]); +#endif /* DEBUG */ + + GSM_DecodeNokiaSMSFrame(CurrentSMSMessage, MessageBuffer+9, MessageLength-9); + + /* Signal no error to calling code. */ + CurrentSMSMessageError = GE_NONE; + break; + } + + case 0x97: + +#ifdef DEBUG + fprintf(stdout, _("Message: Received index for Picture Images\n")); +#endif /* DEBUG */ + + for (i=1;inumber+1) { + PictureImageIndex=MessageBuffer[4+i*2]*256+MessageBuffer[5+i*2]; + break; + } + } + + CurrentGetBitmapError=GE_NONE; + CurrentSetBitmapError=GE_NONE; + + break; + + default: + +#ifdef DEBUG + fprintf(stdout, _("Message: Unknown message of type 14\n")); +#endif /* DEBUG */ + AppendLogText("Unknown msg\n",false); + break; /* Visual C Don't like empty cases */ + } +} + +void N7110_Dispatch0x17Message(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ + switch (MessageBuffer[3]) { + + case 0x03: + +#ifdef DEBUG + fprintf(stdout, _("Message: Battery status received:\n")); + + fprintf(stdout, _(" Battery Level: %d\n"), MessageBuffer[5]); +#endif /* DEBUG */ + + CurrentBatteryLevel=MessageBuffer[5]; + break; + + default: + +#ifdef DEBUG + fprintf(stdout, _("Message: Unknown message of type 0x17\n")); +#endif /* DEBUG */ + AppendLogText("Unknown msg\n",false); + break; /* Visual C Don't like empty cases */ + } +} + +void N7110_Dispatch0x7AMessage(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ + int i, tmp; + + switch (MessageBuffer[3]) { + + /* Setting setting request */ + case 0xeb: + + switch (MessageBuffer[4]) { + case 0x02: + +#ifdef DEBUG + fprintf(stdout, _("Message: Startup text set correctly.\n")); +#endif + CurrentSetBitmapError = GE_NONE; + break; + + case 0x15: +#ifdef DEBUG + fprintf(stdout, _("Message: Startup logo set correctly.\n")); +#endif + CurrentSetBitmapError = GE_NONE; + break; + } + + break; + + /* Setting received */ + case 0xed: + + switch (MessageBuffer[4]) { + case 0x02: + +#ifdef DEBUG + fprintf(stdout, _("Message: Startup text received.\n")); +#endif + + tmp=0;i=6; + while (MessageBuffer[i]!=0||MessageBuffer[i+1]!=0) { + i=i+2; + tmp++; + } + + DecodeUnicode (CurrentGetBitmap->text, MessageBuffer+6, tmp); + +#ifdef DEBUG + fprintf(stdout, _(" Text: \"%s\"\n"),CurrentGetBitmap->text); +#endif + + CurrentGetBitmapError = GE_NONE; + break; + + case 0x15: +#ifdef DEBUG + if (CurrentGetBitmap && CurrentGetBitmapError == GE_BUSY) + fprintf(stdout, _("Message: Startup logo received.\n")); + else + fprintf(stdout, _("Message: Startup logo not requested, but received.\n")); +#endif + + /* Make sure we are expecting a startup logo */ + if (CurrentGetBitmap && CurrentGetBitmapError == GE_BUSY) { + CurrentGetBitmap->height=MessageBuffer[13]; /* 96 */ + CurrentGetBitmap->width=MessageBuffer[17]; /* 60/65 */ + CurrentGetBitmap->type=GSM_7110StartupLogo; + if (CurrentGetBitmap->width==60) CurrentGetBitmap->type=GSM_6210StartupLogo; + CurrentGetBitmap->size=GSM_GetBitmapSize(CurrentGetBitmap); /* unpacked size */ + if (CurrentGetBitmap->size > sizeof(CurrentGetBitmap->bitmap)) + CurrentGetBitmap->size=sizeof(CurrentGetBitmap->bitmap); + memcpy(CurrentGetBitmap->bitmap,MessageBuffer+22,CurrentGetBitmap->size); + CurrentGetBitmapError=GE_NONE; + } + break; + case 0x1c: +#ifdef DEBUG + fprintf(stdout, _("Message: security code \"")); + + for (i=6;i<11;i++) { + fprintf(stdout, _("%c"),MessageBuffer[i]); + } + + fprintf(stdout,_("\"received.\n")); +#endif + strncpy(CurrentSecurityCode->Code,MessageBuffer+6,6); + + CurrentSecurityCodeError=GE_NONE; + break; + } + break; + + default: +#ifdef DEBUG + fprintf(stdout, _("Unknown message of type 0x7a.\n")); +#endif + AppendLogText("Unknown msg\n",false); + break; /* Visual C Don't like empty cases */ + } +} + +void N7110_DispatchMessage(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ + bool unknown=false; + + /* Switch on the basis of the message type byte */ + switch (MessageType) { + + /* Call information */ + /* Note, we use N6110_Dispatch0x40Message, but only some of 0x01 + old msg are available in new phones - other returns generally only + errors */ + case 0x01: + + N6110_Dispatch0x01Message(MessageLength, MessageBuffer, MessageType); + break; + + /* SMS handling */ + case 0x02: + switch (MessageBuffer[3]) { + case 0x02: + case 0x03:N6110_ReplySendSMSMessage(MessageLength,MessageBuffer,MessageType);break; + case 0x0e: + case 0x0f:N7110_ReplyEnableIncomingSMSInfo(MessageLength,MessageBuffer,MessageType);break; + case 0x11:N7110_ReplyIncomingSMS (MessageLength,MessageBuffer,MessageType);break; + case 0x21:N6110_ReplySetCellBroadcast (MessageLength, MessageBuffer, MessageType);break; + case 0x23:N6110_ReplyReadCellBroadcast (MessageLength, MessageBuffer, MessageType);break; + case 0x31:N6110_ReplySetSMSCenter (MessageLength,MessageBuffer,MessageType);break; + case 0x34: + case 0x35:N6110_ReplyGetSMSCenter(MessageLength,MessageBuffer,MessageType);break; + default :unknown=true;break; + } + break; + + /* Phonebook and speed dials */ + case 0x03: + switch (MessageBuffer[3]) { + case 0x04:N7110_ReplyGetMemoryStatus (MessageLength,MessageBuffer,MessageType);break; + case 0x08:N7110_ReplyGetMemoryLocation (MessageLength,MessageBuffer,MessageType);break; + case 0x10:N7110_ReplyDeletePhonebookLocation(MessageLength,MessageBuffer,MessageType);break; + case 0x0C:N7110_ReplyWritePhonebookLocation (MessageLength,MessageBuffer,MessageType);break; + default :unknown=true;break; + } + break; + + /* This is call forwarding stuff */ + case 0x06: + switch (MessageBuffer[3]) { + case 0x02: + case 0x03:N6110_ReplyCallDivert (MessageLength,MessageBuffer,MessageType);break; + default :N6110_Dispatch0x06Message(MessageLength,MessageBuffer,MessageType);break; + } + break; + + /* Network and operator logo */ + case 0x0a: + + N7110_Dispatch0x0AMessage(MessageLength, MessageBuffer, MessageType); + break; + + /* Calendar notes handling */ + case 0x13: + switch (MessageBuffer[3]) { + case 0x02: + case 0x04: + case 0x06: + case 0x08:N7110_ReplyWriteCalendarNote (MessageLength,MessageBuffer,MessageType);break; + case 0x0c:N7110_ReplyDeleteCalendarNote (MessageLength,MessageBuffer,MessageType);break; + case 0x1A:N7110_ReplyGetCalendarNote (MessageLength,MessageBuffer,MessageType);break; + case 0x32:N7110_ReplyFirstCalendarFreePos(MessageLength,MessageBuffer,MessageType);break; + case 0x3b:N7110_ReplyGetCalendarNotesInfo(MessageLength,MessageBuffer,MessageType);break; + default :unknown=true;break; + } + break; + + /* SMS stuff */ + case 0x14: + switch (MessageBuffer[3]) { + case 0x05: + case 0x06:N7110_ReplySaveSMSMessage (MessageLength,MessageBuffer,MessageType);break; + case 0x0b:N7110_ReplyDeleteSMSMessage (MessageLength,MessageBuffer,MessageType);break; + case 0x37: + case 0x38:N7110_ReplyGetSMSStatus (MessageLength,MessageBuffer,MessageType);break; + case 0x6C:N7110_ReplyGetSMSFolderStatus(MessageLength,MessageBuffer,MessageType);break; + case 0x7B:N7110_ReplyGetSMSFolders (MessageLength,MessageBuffer,MessageType);break; + case 0x84:N7110_ReplySaveSMSMessage (MessageLength,MessageBuffer,MessageType);break; + default :N7110_Dispatch0x14Message (MessageLength, MessageBuffer, MessageType);break; + } + break; + + /* Battery status */ + case 0x17: + + N7110_Dispatch0x17Message(MessageLength, MessageBuffer, MessageType); + break; + + /* Date and time */ + case 0x19: + switch (MessageBuffer[3]) { + case 0x61:N6110_ReplySetDateTime(MessageLength,MessageBuffer,MessageType);break; + case 0x63:N6110_ReplyGetDateTime(MessageLength,MessageBuffer,MessageType);break; + case 0x6c:N6110_ReplySetAlarm (MessageLength,MessageBuffer,MessageType);break; + case 0x6e:N6110_ReplyGetAlarm (MessageLength,MessageBuffer,MessageType);break; + default :unknown=true;break; + } + break; + + /* Ringtones */ + case 0x1f: + switch (MessageBuffer[3]) { + case 0x23: + case 0x24:N7110_ReplyGetBinRingtone(MessageLength,MessageBuffer,MessageType);break; + default :unknown=true;break; + } + break; + + /* Profiles */ + case 0x39: + + N7110_ReplyGetProfile(MessageLength, MessageBuffer, MessageType); + break; + + /* WAP */ + case 0x3f: + switch (MessageBuffer[3]) { + case 0x01: + case 0x02:N7110_ReplyEnableWAPCommands(MessageLength,MessageBuffer,MessageType);break; + case 0x07: + case 0x08:N7110_ReplyGetWAPBookmark (MessageLength,MessageBuffer,MessageType);break; + case 0x0a: + case 0x0b:N7110_ReplySetWAPBookmark (MessageLength,MessageBuffer,MessageType);break; + case 0x16: + case 0x17: + case 0x1c:N7110_ReplyGetWAPSettings (MessageLength,MessageBuffer,MessageType);break; + default :unknown=true;break; + } + break; + + /* Internal phone functions ? */ + /* Note, we use N6110_Dispatch0x40Message, but only some of 0x40 + old msg are available in new phones - other returns generally only + errors */ + case 0x40: + switch (MessageBuffer[2]) { + case 0x64:N6110_ReplyEnableExtendedCommands (MessageLength,MessageBuffer,MessageType);break; + case 0x65:N6110_ReplyResetPhoneSettings (MessageLength,MessageBuffer,MessageType);break; + case 0x66:N6110_ReplyIMEI (MessageLength,MessageBuffer,MessageType);break; + case 0x6a:N6110_ReplyGetProductProfileSetting(MessageLength,MessageBuffer,MessageType);break; + case 0x6b:N6110_ReplySetProductProfileSetting(MessageLength,MessageBuffer,MessageType);break; + case 0x7e:N6110_ReplyNetmonitor (MessageLength,MessageBuffer,MessageType);break; + case 0x8a:N6110_ReplySimlockInfo (MessageLength,MessageBuffer,MessageType);break; + case 0x8f:N6110_ReplyPlayTone (MessageLength,MessageBuffer,MessageType);break; + case 0xc8:N6110_ReplyHW (MessageLength,MessageBuffer,MessageType);break; + default :N6110_Dispatch0x40Message (MessageLength,MessageBuffer,MessageType);break; + } + break; + + /* Settings */ + case 0x7a: + + N7110_Dispatch0x7AMessage(MessageLength, MessageBuffer, MessageType); + break; + + /***** Acknowlegment of our frames. *****/ + case FBUS_FRTYPE_ACK: + + N6110_DispatchACKMessage(MessageLength, MessageBuffer, MessageType); + break; + + case 0xd2: + + N6110_ReplyID(MessageLength, MessageBuffer, MessageType); + break; + + /***** Unknown message *****/ + /* If you think that you know the exact meaning of other messages - please + let us know. */ + default: + +#ifdef DEBUG + fprintf(stdout, _("Message: Unknown message type.\n")); +#endif /* DEBUG */ + AppendLogText("Unknown msg type\n",false); + break; + + } + + if (unknown) { +#ifdef DEBUG + fprintf(stdout, _("Unknown message of type %02x.\n"),MessageType); +#endif + AppendLogText("Unknown msg\n",false); + } +} diff --git a/common/newmodules/newat.c b/common/newmodules/newat.c new file mode 100644 index 0000000..985eb8c --- /dev/null +++ b/common/newmodules/newat.c @@ -0,0 +1,1935 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This file provides an API for accessing functions on the at and similar + phones. + +*/ + +/* "Turn on" prototypes in n-at.h */ + +#define __n_at_c + +/* System header files */ +#include +#include +#include + +#ifndef WIN32 + #include "devices/device.h" +#endif + +#ifdef WIN32 + #include "misc_win32.h" +#endif + +/* Various header file */ +#ifndef VC6 + #include "config.h" +#endif + +#include "gsm-api.h" +#include "gsm-coding.h" +#include "newmodules/newat.h" +#include "newmodules/n6110.h" +/* Global variables used by code in gsm-api.c to expose the functions + supported by this model of phone. */ + + + + + + +/* Here we initialise model specific functions. */ + +GSM_Functions Nat_Functions = { + Nat_Initialise, + Nat_DispatchMessage, + NULL_Terminate, + NULL_KeepAlive, + Nat_GetMemoryLocation, + Nat_WritePhonebookLocation, + UNIMPLEMENTED, + UNIMPLEMENTED, + Nat_GetMemoryStatus, + Nat_GetSMSStatus, + Nat_GetSMSCenter, + Nat_SetSMSCenter, + Nat_GetSMSMessage, + Nat_DeleteSMSMessage, + Nat_SendSMSMessage, + Nat_SaveSMSMessage, + Nat_GetRFLevel, + Nat_GetBatteryLevel, + Nat_GetPowerSource, + Nat_GetDisplayStatus, //fill it + Nat_EnterSecurityCode, + Nat_GetSecurityCodeStatus, + UNIMPLEMENTED, + N6110_GetIMEI, + N6110_GetRevision, + N6110_GetModel, + Nat_GetDateTime, + Nat_SetDateTime, + Nat_GetAlarm, + Nat_SetAlarm, //doesn't work correctly... + Nat_DialVoice, + UNIMPLEMENTED, + UNIMPLEMENTED, + Nat_GetNetworkInfo, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + Nat_SendDTMF, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + Nat_CancelCall, + Nat_PressKey, //fill it + UNIMPLEMENTED, //DisplayOutput= AT+CDIS + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + N6110_GetSMSFolders, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + UNIMPLEMENTED, + Nat_CallDivert, + UNIMPLEMENTED, + Nat_GetManufacturer +}; + +/* Mobile phone information */ + +GSM_Information Nat_Information = { + "", /* Supported models in FBUS */ + "at", /* Supported models in MBUS */ + "", /* Supported models in FBUS over infrared */ + "", /* Supported models in FBUS over DLR3 */ + "at", /* Supported models in AT commands mode */ + "", + "", + 4, /* Max RF Level */ + 0, /* Min RF Level */ + GRF_Arbitrary, /* RF level units */ + 4, /* Max Battery Level */ + 0, /* Min Battery Level */ + GBU_Arbitrary, /* Battery level units */ + GDT_None, /* No date/time support */ + GDT_None, /* No alarm support */ + 0 /* Max alarms = 0 */ +}; + +/* Type of SMS mode. 0=PDU mode; 1=text mode */ +int SMSATCMGF=-1; //-1 when not used earlier +#define SMS_AT_PDU 0 +#define SMS_AT_TEXT 1 + +/* Type of charset for phonebook 0=GSM; 1=HEX */ +int PBKATCSCS=-1; //-1 when not used earlier +#define PBK_AT_GSM 0 +#define PBK_AT_HEX 1 + +/* Manufacturer of connected AT compatible phone */ +int ATMan=-1; // -1 when not used earlier +#define AT_MAN_NOKIA 0 +#define AT_MAN_SIEMENS 1 + +int ExtractOneParameter(unsigned char *input, unsigned char *output) +{ + int position=0; + + while (*input!=',' && *input!=0x0d) { + *output=*input; + input++; + output++; + position++; + } + *output=0; + position++; + return position; +} + +void ATDecodeDateTime(GSM_DateTime *dt, unsigned char *input) +{ + dt->Year=2000+(*input-'0')*10; input++; + dt->Year=dt->Year+(*input-'0'); input++; + + input++; + dt->Month=(*input-'0')*10; input++; + dt->Month=dt->Month+(*input-'0'); input++; + + input++; + dt->Day=(*input-'0')*10; input++; + dt->Day=dt->Day+(*input-'0'); input++; + + input++; + dt->Hour=(*input-'0')*10; input++; + dt->Hour=dt->Hour+(*input-'0'); input++; + + input++; + dt->Minute=(*input-'0')*10; input++; + dt->Minute=dt->Minute+(*input-'0');input++; + + input++; + dt->Second=(*input-'0')*10; input++; + dt->Second=dt->Second+(*input-'0');input++; + + if (input!=NULL) { + input++; + dt->Timezone=(*input-'0')*10; input++; + dt->Timezone=dt->Timezone+(*input-'0');input++; + input=input-2; + if (*input=='-') dt->Timezone=-dt->Timezone; + } +} + +void Nat_ReplyGetIMEI(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + + strncpy(Current_IMEI,MessageBuffer+10,15); + +#ifdef DEBUG + fprintf(stdout, _("Message: IMEI %s received\n"),Current_IMEI); +#endif + + CurrentGetIMEIError=GE_NONE; +} + +GSM_Error Nat_SendIMEIFrame() +{ + unsigned char req[8] = {"AT+CGSN\r"}; + + return NULL_SendMessageSequence + (50, &CurrentGetIMEIError, 8, 0x00, req); +} + +void Nat_ReplyGetID(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + + int i; + + i=10; + if (strncmp("Nokia Communicator GSM900/1800",MessageBuffer+i,30)==0) { +#ifdef DEBUG + fprintf(stdout, _("Message: Mobile phone model identification received:\n")); + fprintf(stdout, _(" Model: RAE-3\n")); +#endif + strcpy(Current_Model,"RAE-3"); + + } else { + while (MessageBuffer[i]!=0x0d && MessageBuffer[i]!=0x0a) { + Current_Model[i-10]=MessageBuffer[i]; + i++; + } + Current_Model[i-9]=0; + +#ifdef DEBUG + fprintf(stdout, _("Message: Mobile phone model identification received:\n")); + fprintf(stdout, _(" Model: %s\n"),Current_Model); +#endif + } + + CurrentMagicError=GE_NONE; +} + +GSM_Error Nat_SendIDFrame() +{ + unsigned char req[8] = {"AT+CGMM\r"}; + + return NULL_SendMessageSequence + (50, &CurrentMagicError, 8, 0x00, req); +} + +void Nat_ReplyGetHW(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + + int i,current; + +#ifdef DEBUG + fprintf(stdout, _("Message: Mobile phone model identification received:\n")); +#endif + + switch (ATMan) { + case AT_MAN_NOKIA: +#ifdef DEBUG + fprintf(stdout, _(" Firmware: ")); + for (i=12;i<17;i++) fprintf(stdout,_("%c"),MessageBuffer[i]); + fprintf(stdout, _("\n")); + /* Some Nokia phones like 9210 return only firmware */ + if (MessageLength>22) { + fprintf(stdout, _(" Hardware: ")); + for (i=21;i<25;i++) fprintf(stdout,_("%c"),MessageBuffer[i]); + fprintf(stdout, _("\n")); + } +#endif + + strcpy(Current_Revision,"SW");current=2; + for (i=12;i<17;i++) Current_Revision[current++]=MessageBuffer[i]; + Current_Revision[current++]=','; + Current_Revision[current++]=' '; + Current_Revision[current++]='H'; + Current_Revision[current++]='W'; + if (MessageLength>22) { + for (i=21;i<25;i++) Current_Revision[current++]=MessageBuffer[i]; + } else { + /* Some Nokia phones like 9210 return only firmware */ + /* Here we copy firmware as hardware */ + for (i=12;i<17;i++) Current_Revision[current++]=MessageBuffer[i]; + } + break; + case AT_MAN_SIEMENS: + current=0;i=18; + strcpy(Current_Revision,"SW");current=2; + while (MessageBuffer[i]!=0x0d && MessageBuffer[i]!=0x0a) { + Current_Revision[current++]=MessageBuffer[i]; + i++; + } + Current_Revision[current++]=','; + Current_Revision[current++]=' '; + Current_Revision[current++]='H'; + Current_Revision[current++]='W'; + i=18; + while (MessageBuffer[i]!=0x0d && MessageBuffer[i]!=0x0a) { + Current_Revision[current++]=MessageBuffer[i]; + i++; + } + + break; + default: + strcpy(Current_Revision,"SWxx.xx, HWxxxx"); + break; + } + + CurrentGetHWError=GE_NONE; +} + +GSM_Error Nat_SendHWFrame() +{ + unsigned char req[8] = {"AT+CGMR\r"}; + + return NULL_SendMessageSequence + (50, &CurrentGetHWError, 8, 0x00, req); +} + +void Nat_ReplyGetManufacturer(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + +#ifdef DEBUG + fprintf(stdout, _("Message: phone manufacturer received\n")); +#endif + + if (strstr(MessageBuffer,"Nokia")) { +#ifdef DEBUG + fprintf(stdout, _(" Nokia\n")); +#endif + ATMan=AT_MAN_NOKIA; + } + + if (strstr(MessageBuffer,"SIEMENS")) { +#ifdef DEBUG + fprintf(stdout, _(" Siemens\n")); +#endif + ATMan=AT_MAN_SIEMENS; + } + + CurrentMagicError=GE_NONE; +} + +GSM_Error Nat_SendManufacturerFrame() +{ + unsigned char req[8] = {"AT+CGMI\r"}; + + return NULL_SendMessageSequence + (50, &CurrentMagicError, 8, 0x00, req); +} + +/* Initialise variables and state machine. */ +GSM_Error Nat_Initialise(char *port_device, char *initlength, + GSM_ConnectionType connection, + void (*rlp_callback)(RLP_F96Frame *frame)) +{ + if (Protocol->Initialise(port_device,initlength,connection,rlp_callback)!=GE_NONE) + { + return GE_NOTSUPPORTED; + } + + + /* We try to escape AT+CMGS mode, at least Siemens M20 then needs to get some rest + */ +// WRITEPHONE(PortFD,"\x1B\r",2); +// usleep(500000); + + usleep(100); + + if (Nat_SendManufacturerFrame()!=GE_NONE) return GE_TIMEOUT; + + if (Nat_SendIMEIFrame()!=GE_NONE) return GE_TIMEOUT; + + if (Nat_SendHWFrame()!=GE_NONE) return GE_TIMEOUT; + + if (Nat_SendIDFrame()!=GE_NONE) return GE_TIMEOUT; + + /* In AT doesn't have any init strings, etc. Phone answered with frame, + so connection should be enabled ;-) */ + CurrentLinkOK = true; + + return (GE_NONE); +} + +GSM_Error Nat_GetManufacturer(char* manufacturer) +{ + switch (ATMan) { + case AT_MAN_NOKIA :strcpy (manufacturer, "Nokia"); break; + case AT_MAN_SIEMENS:strcpy (manufacturer, "Siemens");break; + default :strcpy (manufacturer, "unknown");break; + } + + return GE_NONE; +} + +void Nat_ReplyPBKSetMemoryType(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + +#ifdef DEBUG + fprintf(stdout, _("Message: memory type set OK\n")); +#endif + + CurrentPhonebookError=GE_NONE; +} + +static GSM_Error PBKSetMemoryType(GSM_MemoryType type) +{ + char req[] = "AT+CPBS=\"XX\"\r"; + char req2[10]; + + GetMemoryTypeString(req2, &type); + + req[9]=req2[0]; + req[10]=req2[1]; + + return NULL_SendMessageSequence + (50, &CurrentPhonebookError, strlen(req), 0x00, req); +} + +void Nat_ReplySetCharset(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + + if (strncmp("AT+CSCS=\"HEX\"",MessageBuffer,13)==0) { +#ifdef DEBUG + fprintf(stdout, _("Message: charset set to HEX\n")); +#endif + CurrentPhonebookError=GE_NONE; + } + if (strncmp("AT+CSCS=\"GSM\"",MessageBuffer,13)==0) { +#ifdef DEBUG + fprintf(stdout, _("Message: charset set to GSM\n")); +#endif + CurrentPhonebookError=GE_NONE; + } +} + +GSM_Error SetCharset() +{ + unsigned char req [14] = {"AT+CSCS=\"HEX\"\r"}; // HEX charset + unsigned char req2[14] = {"AT+CSCS=\"GSM\"\r"}; // GSM charset + GSM_Error error; + + error=NULL_SendMessageSequence + (50, &CurrentPhonebookError, 14, 0x00, req); + if (error==GE_NONE) { + PBKATCSCS=PBK_AT_HEX; + return GE_NONE; + } + + error=NULL_SendMessageSequence + (50, &CurrentPhonebookError, 14, 0x00, req2); + if (error==GE_NONE) { + PBKATCSCS=PBK_AT_GSM; + return GE_NONE; + } + + return error; +} + +/* FIXME: M20 can have " inside name. We can't get endpos by finding first " */ +void Nat_ReplyGetMemoryLocation(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + + char *pos, *endpos; + int l; + +#ifdef DEBUG + fprintf(stdout, _("Message: phonebook entry received\n")); +#endif + + CurrentPhonebookEntry->Empty = true; + *(CurrentPhonebookEntry->Name) = '\0'; + *(CurrentPhonebookEntry->Number) = '\0'; + CurrentPhonebookEntry->SubEntriesCount=0; + CurrentPhonebookEntry->Group = 0; + + pos = strchr(MessageBuffer, '\"'); + endpos = NULL; + if (pos) { + endpos = strchr(++pos, '\"'); + if (endpos) { + *endpos = '\0'; + strcpy(CurrentPhonebookEntry->Number, pos); + } + pos = NULL; + if (endpos) pos = strchr(++endpos, '\"'); + endpos = NULL; + if (pos) { + pos++; + l = pos - (char *)MessageBuffer; + endpos = memchr(pos, '\"', MessageLength - l); + } + if (endpos) { + l = endpos - pos; + switch (PBKATCSCS) { + case PBK_AT_GSM: + DecodeDefault(CurrentPhonebookEntry->Name, pos, l); + break; + case PBK_AT_HEX: + DecodeHexBin(CurrentPhonebookEntry->Name, pos, l); + break; + } + } + } + + CurrentPhonebookError=GE_NONE; +} + +GSM_Error Nat_GetMemoryLocation(GSM_PhonebookEntry *entry) +{ + GSM_Error error; + char req[] = "AT+CPBR=00000\r"; + + if (PBKATCSCS==-1) { + error=SetCharset(); + if (error!=GE_NONE) return error; + } + + error = PBKSetMemoryType(entry->MemoryType); + if (error != GE_NONE) return error; + + CurrentPhonebookEntry = entry; + + sprintf(req + 8, "%5d\r", entry->Location); + + return NULL_SendMessageSequence + (50, &CurrentPhonebookError, strlen(req), 0x00, req); +} + +void Nat_ReplyWritePhonebookLocation(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + +#ifdef DEBUG + fprintf(stdout, _("Message: phonebook entry set OK\n")); +#endif + + CurrentPhonebookError=GE_NONE; +} + +GSM_Error Nat_WritePhonebookLocation(GSM_PhonebookEntry * entry) +{ + GSM_Error error; + char req[128]; + char Name[128]; + char Number[100]; + u8 i; + + switch (entry->MemoryType) { + case GMT_ME: + /* FIXME: the 7110, 6210... supports long phonebookentries. in lack + of documentation we only support SIM memory */ + if(GetModelFeature (FN_PHONEBOOK)==F_PBK71INT) return GE_NOTIMPLEMENTED; + + break; + default: + break; + } + + if (PBKATCSCS==-1) { + error=SetCharset(); + if (error!=GE_NONE) return error; + } + + error = PBKSetMemoryType(entry->MemoryType); + if (error != GE_NONE) return error; + + switch (PBKATCSCS) { + case PBK_AT_HEX: + EncodeHexBin (Name, entry->Name, strlen(entry->Name)); + Name[strlen(entry->Name)*2]=0; + break; + case PBK_AT_GSM: + EncodeDefault (Name, entry->Name, strlen(entry->Name)); + Name[strlen(entry->Name)]=0; + break; + } + + GSM_PackSemiOctetNumber(entry->Number,Number,false); + i=Number[0]; + + sprintf(req, "AT+CPBW=%d, \"%s\", %i, \"%s\"\r", + entry->Location, entry->Number, i, Name); + + return NULL_SendMessageSequence + (50, &CurrentPhonebookError, strlen(req), 0x00, req); +} + +void Nat_ReplyGetMemoryStatusCPBS(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + + char *start; + +#ifdef DEBUG + fprintf(stdout, _("Message: memory status received\n")); +#endif + + CurrentMemoryStatus->Used = 0; + CurrentMemoryStatus->Free = 0; + + start = strchr(MessageBuffer, ','); + + if (start) { + start++; + CurrentMemoryStatus->Used = atoi(start); + start = strchr(start, ','); + if (start) { + start++; + CurrentMemoryStatus->Free = atoi(start) - CurrentMemoryStatus->Used; + CurrentMemoryStatusError=GE_NONE; + } else CurrentMemoryStatusError=GE_UNKNOWN; + } else CurrentMemoryStatusError=GE_UNKNOWN; +} + +void Nat_ReplyGetMemoryStatusCPBR(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + + char *start; + +#ifdef DEBUG + fprintf(stdout, _("Message: memory size received\n")); +#endif + + CurrentMemoryStatus->Used = 0; + CurrentMemoryStatus->Free = 0; + + start = strchr(MessageBuffer, '-'); + + if (start) { + start++; + /* Parse +CPBR: (first-last),max_number_len,max_name_len */ + /* We cannot get Used/Free info. We can get only size of memory + we don't have size in memory status and because of it + we make assigment used=size_of_memory, free=0. + It's better than nothing */ + CurrentMemoryStatus->Used = atoi(start); + CurrentMemoryStatusError=GE_NONE; + } else CurrentMemoryStatusError=GE_UNKNOWN; +} + +GSM_Error Nat_GetMemoryStatus(GSM_MemoryStatus *Status) +{ + GSM_Error error; + char req [] ="AT+CPBS?\r"; /* in some phones doesn't work or doesn't return + memory status inside */ + char req2[] ="AT+CPBR=?\r"; + + error = PBKSetMemoryType(Status->MemoryType); + if (error != GE_NONE) return error; + + CurrentMemoryStatus = Status; + + error=NULL_SendMessageSequence + (20, &CurrentMemoryStatusError, strlen(req), 0x00, req); + if (error==GE_NONE) { + CurrentMemoryStatus = NULL; + return error; + } + + error=NULL_SendMessageSequence + (20, &CurrentMemoryStatusError, strlen(req2), 0x00, req2); + + CurrentMemoryStatus = NULL; + + return error; +} + +void Nat_ReplyCallDivert(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + int current; + +#ifdef DEBUG + fprintf(stdout, _("Message: call forwarding info\n")); +#endif + if (MessageLength>0x20) { + current=27; + while (MessageBuffer[current]!='"') { + CurrentCallDivert->Number[current-27]=MessageBuffer[current]; + current++; + } + CurrentCallDivert->Enabled=true; + CurrentCallDivert->Number[current-27]=0x00; + CurrentCallDivert->Timeout=999;//where is it in frame ? + } else { + CurrentCallDivert->Enabled=false; + } + CurrentCallDivertError=GE_NONE; +} + +GSM_Error Nat_CallDivert(GSM_CallDivert *cd) +{ + char req[64]; + GSM_Error error; + char Number[100]; + int i; + + sprintf(req, "AT+CCFC="); + + switch (cd->DType) { + case GSM_CDV_AllTypes : strcat(req, "4"); break; + case GSM_CDV_Busy : strcat(req, "1"); break; + case GSM_CDV_NoAnswer : strcat(req, "2"); break; + case GSM_CDV_OutOfReach: strcat(req, "3"); break; + default : return GE_NOTIMPLEMENTED; + } + + if (cd->Operation == GSM_CDV_Register) { + GSM_PackSemiOctetNumber(cd->Number,Number,false); + i=Number[0]; + + sprintf(req, "%s,%d,\"%s\",%i,,,%d", req, + cd->Operation,cd->Number,i,cd->Timeout); + } else + sprintf(req, "%s,%d", req, cd->Operation); + + strcat(req, "\r\n"); + + CurrentCallDivert = cd; + + error=NULL_SendMessageSequence + (100, &CurrentCallDivertError, strlen(req), 0x00, req); + + CurrentCallDivert = NULL; + + return error; +} + +void Nat_ReplyGetNetworkInfo(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + int i,current; + GSM_NetworkInfo NullNetworkInfo; + + /* TODO: checking if phone really registered to network */ + + current=23; + + /* Make sure we are expecting NetworkInfo frame */ + if (CurrentNetworkInfo && CurrentNetworkInfoError == GE_BUSY) { +#ifdef DEBUG + fprintf(stdout, _("Message: network info received\n")); +#endif + + NullNetworkInfo.NetworkCode[0]=0; //no exist + + for (i=0;i<4;i++) NullNetworkInfo.CellID[i]=MessageBuffer[i+current]; + + NullNetworkInfo.CellID[4]=0; + + current=current+7; + + for (i=0;i<4;i++) NullNetworkInfo.LAC[i]=MessageBuffer[i+current]; + + NullNetworkInfo.LAC[4]=0; + +#ifdef DEBUG + fprintf(stdout, _(" CellID: %s\n"), NullNetworkInfo.CellID); + fprintf(stdout, _(" LAC: %s\n"), NullNetworkInfo.LAC); +#endif + + } + + /* Make sure we are expecting NetworkInfo frame */ + if (CurrentNetworkInfo && CurrentNetworkInfoError == GE_BUSY) + *CurrentNetworkInfo=NullNetworkInfo; + + CurrentNetworkInfoError = GE_NONE; +} + +GSM_Error Nat_GetNetworkInfo(GSM_NetworkInfo *NetworkInfo) +{ + GSM_Error error; + + Protocol->SendMessage(10, 0x00, "AT+CREG=2\r"); + + CurrentNetworkInfo = NetworkInfo; + + error=NULL_SendMessageSequence + (20, &CurrentNetworkInfoError, 9, 0x00, "AT+CREG?\r"); + + CurrentNetworkInfo = NULL; + + return error; +} + +void Nat_ReplyGetBatteryLevel(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + +#ifdef DEBUG + fprintf(stdout, _("Message: power source and battery info received\n")); +#endif + + CurrentPowerSource=atoi(MessageBuffer+15); + CurrentBatteryLevel=atoi(MessageBuffer+17); +} + +GSM_Error Nat_GetBatteryLevel(GSM_BatteryUnits *units, float *level) +{ + int timeout=10; + int batt_level; + + CurrentBatteryLevel=-1; + + Protocol->SendMessage(7, 0x00, "AT+CBC\r"); + + /* Wait for timeout or other error. */ + while (timeout != 0 && CurrentBatteryLevel == -1 ) { + + if (--timeout == 0) + return (GE_TIMEOUT); + + usleep (100000); + } + + /* Take copy in case it changes. */ + batt_level = CurrentBatteryLevel; + + if (batt_level != -1) { + + /* Only units we handle at present are GBU_Arbitrary */ + if (*units == GBU_Arbitrary) { + if (batt_level >= 70) { *level = 4; return (GE_NONE); } + if (batt_level >= 50) { *level = 3; return (GE_NONE); } + if (batt_level >= 30) { *level = 2; return (GE_NONE); } + if (batt_level >= 10) { *level = 1; return (GE_NONE); } + *level = 0; + return (GE_NONE); + } + + return (GE_INTERNALERROR); + } + else + return (GE_NOLINK); +} + +GSM_Error Nat_GetPowerSource(GSM_PowerSource * source) +{ + *source = CurrentPowerSource; + return (GE_NONE); +} + +void Nat_ReplyGetRFLevel(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + +#ifdef DEBUG + fprintf(stdout, _("Message: RF level info received\n")); +#endif + CurrentRFLevel=atoi(MessageBuffer+15); +} + +GSM_Error Nat_GetRFLevel(GSM_RFUnits *units, float *level) +{ + int timeout=10; + int rf_level; + + CurrentRFLevel=-1; + + Protocol->SendMessage(7, 0x00, "AT+CSQ\r"); + + /* Wait for timeout or other error. */ + while (timeout != 0 && CurrentRFLevel == -1 ) { + + if (--timeout == 0) + return (GE_TIMEOUT); + + usleep (100000); + } + + /* Make copy in case it changes. */ + rf_level = CurrentRFLevel; + + if (rf_level == -1) + return (GE_NOLINK); + + /* Now convert between the different units we support. */ + + if (*units == GRF_Arbitrary) { + if (CurrentRFLevel == 99) { *level = 0;return (GE_NONE); } + if (CurrentRFLevel > 23) { *level = 4;return (GE_NONE); } + if (CurrentRFLevel > 17) { *level = 3;return (GE_NONE); } + if (CurrentRFLevel > 11) { *level = 2;return (GE_NONE); } + if (CurrentRFLevel > 5) { *level = 1;return (GE_NONE); } + *level = 0; + return (GE_NONE); + } + + /* CSQ units. */ + if (*units == GRF_CSQ) { + if ((CurrentRFLevel <= 31) || (CurrentRFLevel >= 0)) + *level = CurrentRFLevel; + else + *level = 99; /* Unknown/undefined */ + return (GE_NONE); + } + + /* Unit type is one we don't handle so return error */ + return (GE_INTERNALERROR); +} + +GSM_Error Nat_GetDisplayStatus(int *Status) { + char req[128]; + + sprintf(req, "AT+CIND?\r"); + + return NULL_SendMessageSequence + (50, &CurrentDisplayStatusError, strlen(req), 0x00, req); +} + +GSM_Error Nat_PressKey(int key, int event) +{ + char req[128]; + + sprintf(req, "AT+CKPD=?\r"); + + return NULL_SendMessageSequence + (50, &CurrentPressKeyError, strlen(req), 0x00, req); +} + +GSM_Error Nat_DialVoice(char *Number) { + char req[39] = "ATDT"; + + if (strlen(Number) > 32) + return (GE_INTERNALERROR); + + strcat(req, Number); + strcat(req, ";\r"); + + return NULL_SendMessageSequence + (50, &CurrentDialVoiceError, 4+2+strlen(Number), 0x00, req); +} + +void Nat_ReplyCancelCall(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + +#ifdef DEBUG + fprintf(stdout, _("Message: call hangup OK\n")); +#endif + + CurrentDialVoiceError=GE_NONE; +} + +GSM_Error Nat_CancelCall(void) +{ + char req[] = "AT+CHUP\r"; + + return NULL_SendMessageSequence + (50, &CurrentDialVoiceError, strlen(req), 0x00, req); +} + +GSM_Error Nat_SendDTMF(char *String) +{ + int n; + char req[80] = "AT+VTS="; + + for (n = 0; n < 32; n++) { + if (String[n] == '\0') break; + if (n != 0) req[6 + 2 * n] = ','; + req[7 + 2 * n] = String[n]; + } + + strcat(req, ";\r"); + + return NULL_SendMessageSequence + (50, &CurrentSendDTMFError,7+2+2*strlen(String) , 0x00, req); +} + +GSM_Error Nat_EnterSecurityCode(GSM_SecurityCode SecurityCode) +{ + char req[128]; + + if ((SecurityCode.Type != GSCT_Pin) + && (SecurityCode.Type != GSCT_Pin2)) return (GE_NOTIMPLEMENTED); + + sprintf(req, "AT+CPIN=\"%s\"\r", SecurityCode.Code); + + return NULL_SendMessageSequence + (20, &CurrentSecurityCodeError, strlen(req), 0x00, req); +} + +void Nat_ReplyGetSecurityCodeStatus(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + + char *start; + +#ifdef DEBUG + fprintf(stdout, _("Message: security code status received\n")); +#endif + + start = strchr(MessageBuffer, ':'); + start+=2; + + *CurrentSecurityCodeStatus = 0; + + if (!strncmp(start, "READY", 5)) *CurrentSecurityCodeStatus = GSCT_None; + + if (!strncmp(start, "SIM ", 4)) { + start += 4; + if (!strncmp(start, "PIN2", 4)) *CurrentSecurityCodeStatus = GSCT_Pin2; + if (!strncmp(start, "PUK2", 4)) *CurrentSecurityCodeStatus = GSCT_Puk2; + if (!strncmp(start, "PIN", 3)) *CurrentSecurityCodeStatus = GSCT_Pin; + if (!strncmp(start, "PUK", 3)) *CurrentSecurityCodeStatus = GSCT_Puk; + } + + CurrentSecurityCodeError=GE_NONE; +} + +GSM_Error Nat_GetSecurityCodeStatus(int *Status) +{ + CurrentSecurityCodeStatus = Status; + + return NULL_SendMessageSequence + (20, &CurrentSecurityCodeError, 9, 0x00, "AT+CPIN?\r"); +} + +void Nat_ReplyGetDateTime(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + int current; + + current=19; + +#ifdef DEBUG + fprintf(stdout,_("Message: date/time received\n")); +#endif + + if (MessageBuffer[current]==0x0d) { + CurrentDateTime->IsSet=false; + } else { + CurrentDateTime->IsSet=true; + + ATDecodeDateTime(CurrentDateTime, MessageBuffer+(current)); + +#ifdef DEBUG + fprintf(stdout,_(" %i/%i/%i %i:%i:%i\n"), + CurrentDateTime->Day,CurrentDateTime->Month,CurrentDateTime->Year, + CurrentDateTime->Hour,CurrentDateTime->Minute,CurrentDateTime->Second); +#endif + } + CurrentDateTimeError=GE_NONE; +} + +GSM_Error Nat_GetDateTime(GSM_DateTime *date_time) +{ + unsigned char req[9] = {"AT+CCLK?\r"}; + + CurrentDateTime=date_time; + + return NULL_SendMessageSequence + (50, &CurrentDateTimeError, 9, 0x00, req); +} + +void Nat_ReplySetDateTime(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + +#ifdef DEBUG + fprintf(stdout,_("Message: date/time set OK\n")); +#endif + CurrentSetDateTimeError=GE_NONE; +} + +GSM_Error Nat_SetDateTime(GSM_DateTime *date_time) +{ + char req[128]; + + sprintf(req, "AT+CCLK=\"%02i/%02i/%02i,%02i:%02i:%02i+00\"\r", + date_time->Year-2000,date_time->Month,date_time->Day, + date_time->Hour,date_time->Minute,date_time->Second); + + return NULL_SendMessageSequence + (20, &CurrentSetDateTimeError, strlen(req), 0x00, req); +} + +void Nat_ReplyGetAlarm(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + int current; + + current=19; +#ifdef DEBUG + fprintf(stdout,_("Message: alarm info received\n")); +#endif + if (MessageBuffer[current-1]==0x0d) { + CurrentAlarm->IsSet=false; + CurrentAlarm->Hour=0; + CurrentAlarm->Minute=0; + } else { + CurrentAlarm->IsSet=true; + + ATDecodeDateTime(CurrentAlarm, MessageBuffer+(current)); + +#ifdef DEBUG + fprintf(stdout,_(" %i:%i\n"),CurrentAlarm->Hour,CurrentAlarm->Minute); +#endif + } + CurrentAlarmError=GE_NONE; +} + +GSM_Error Nat_GetAlarm(int alarm_number, GSM_DateTime *date_time) +{ + unsigned char req[9] = {"AT+CALA?\r"}; + + CurrentAlarm=date_time; + + return NULL_SendMessageSequence + (50, &CurrentAlarmError, 9, 0x00, req); +} + +/* FIXME: we should also allow to set the alarm off :-) */ +/* Doesn't work ? */ +GSM_Error Nat_SetAlarm(int alarm_number, GSM_DateTime *date_time) +{ + char req[128]; + int i=0; + + sprintf(req, "AT+CALA=\"%02i/%02i/%02i,%02i:%02i:%02i+00\",0,1\r", + i,i,i,date_time->Hour,date_time->Minute,i); + + return NULL_SendMessageSequence + (50, &CurrentSetAlarmError, strlen(req), 0x00, req); +} + +void Nat_ReplyGetSMSCenter(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + int i,start; + unsigned char buffer[300]; + + start=18; + + /* FIXME: support for all formats */ + start+=ExtractOneParameter(MessageBuffer+start, buffer); + for (i=1;iNumber,buffer); + + /* Some default values. Is it possible to get them ? */ + CurrentMessageCenter->Name[0]=0; + CurrentMessageCenter->DefaultRecipient[0]=0; + CurrentMessageCenter->Format=GSMF_Text; + CurrentMessageCenter->Validity=GSMV_Max_Time; + +#ifdef DEBUG + fprintf(stdout, _("Message: SMSC number received\n Number: '%s'\n"),buffer); +#endif + + CurrentMessageCenterError=GE_NONE; +} + +/* We only get SMSC number */ +/* Is it possible to get more ? */ +GSM_Error Nat_GetSMSCenter(GSM_MessageCenter *MessageCenter) +{ + unsigned char req[] = {"AT+CSCA?\r"}; + + if (MessageCenter->No!=1) return GE_NOTSUPPORTED; + + CurrentMessageCenter=MessageCenter; + + return NULL_SendMessageSequence + (50, &CurrentMessageCenterError, strlen(req), 0x00, req); +} + +void Nat_ReplySetSMSCenter(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + +#ifdef DEBUG + fprintf(stdout, _("Message: SMSC number set OK\n")); +#endif + + CurrentMessageCenterError=GE_NONE; +} + +GSM_Error Nat_SetSMSCenter(GSM_MessageCenter *MessageCenter) +{ + unsigned char req[50]; + + if (MessageCenter->No!=1) return GE_NOTSUPPORTED; + + sprintf(req, "AT+CSCA=\"%s\"\r",MessageCenter->Number); + + return NULL_SendMessageSequence + (50, &CurrentMessageCenterError, strlen(req), 0x00, req); +} + +void Nat_ReplySMSGetPDUType(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + + if (strncmp("AT+CSDH=1\r",MessageBuffer,10)==0) { +#ifdef DEBUG + fprintf(stdout, _("Message: all SMS parameters will be displayed in text mode\n")); +#endif + CurrentSMSMessageError=GE_NONE; + } + if (strncmp("AT+CMGF=0\r",MessageBuffer,10)==0) { +#ifdef DEBUG + fprintf(stdout, _("Message: set PDU mode for SMS\n")); +#endif + CurrentSMSMessageError=GE_NONE; + } + if (strncmp("AT+CMGF=1\r",MessageBuffer,10)==0) { +#ifdef DEBUG + fprintf(stdout, _("Message: set text mode for SMS\n")); +#endif + CurrentSMSMessageError=GE_NONE; + } +} + +GSM_Error SMSGetPDUType() +{ + unsigned char req [10] = {"AT+CMGF=0\r"}; //sets PDU mode + + unsigned char req2[10] = {"AT+CMGF=1\r"}; //sets text mode + unsigned char req3[10] = {"AT+CSDH=1\r"}; //shows all parameters in text mode + + GSM_Error error; + + error=NULL_SendMessageSequence (50, &CurrentSMSMessageError, 10, 0x00, req); + if (error==GE_NONE) { + SMSATCMGF=SMS_AT_PDU; + return GE_NONE; + } + + error=NULL_SendMessageSequence (50, &CurrentSMSMessageError, 10, 0x00, req2); + if (error==GE_NONE) { + SMSATCMGF=SMS_AT_TEXT; + + error=NULL_SendMessageSequence (50, &CurrentSMSMessageError, 10, 0x00, req3); + } + + return error; +} + +GSM_Error GSM_DecodeETSISMSFrame(GSM_SMSMessage *SMS, unsigned char *req, int length) +{ + SMS_MessageType PDU=SMS_Deliver; + GSM_ETSISMSMessage ETSI; + int i,current=0,current2=0; + + for(i=0;iType = GST_SMS; + SMS->folder= GST_OUTBOX; + current++; //TPMR is ignored now + current2=((req[current])+1)/2+1; + for(i=0;iType = GST_SMS; + SMS->folder= GST_INBOX; + current2=((req[current])+1)/2+1; + for(i=0;iType = GST_DR; + SMS->folder= GST_INBOX; + current++; //TPMR is ignored now + current2=((req[current])+1)/2+1; + for(i=0;iStatus=GSS_NOTSENTREAD; + if (MessageBuffer[start]=='1' || MessageBuffer[start]=='3') + CurrentSMSMessage->Status=GSS_SENTREAD; + + while(true) { + if (MessageBuffer[start]==0x0a) break; + start++; + } + start++; + + /* We need to find last char of PDU text. We can't use MessageLength, + because sometimes some phones (like Siemens M20) return + some strange things after main PDU */ + end=start+1; + while(true) { + if (MessageBuffer[end]==0x0a) break; + end++; + } + + DecodeHexBin (buffer, MessageBuffer+start, end-start-1); + + GSM_DecodeETSISMSFrame(CurrentSMSMessage,buffer,(end-start-1)/2); + + CurrentSMSMessageError=GE_NONE; + break; + case SMS_AT_TEXT: + start=19; + + start+=ExtractOneParameter(MessageBuffer+start, buffer); + + if (!strcmp(buffer,"\"0\"") || !strcmp(buffer,"\"REC UNREAD\"")) { + CurrentSMSMessage->Type=GST_SMS; + CurrentSMSMessage->folder=GST_INBOX; + CurrentSMSMessage->SMSData=true; + CurrentSMSMessage->Status=GSS_NOTSENTREAD; + } else if (!strcmp(buffer,"\"1\"") || !strcmp(buffer,"\"REC READ\"")) { + CurrentSMSMessage->Type=GST_SMS; + CurrentSMSMessage->folder=GST_INBOX; + CurrentSMSMessage->SMSData=true; + CurrentSMSMessage->Status=GSS_SENTREAD; + } else if (!strcmp(buffer,"\"2\"") || !strcmp(buffer,"\"STO UNSENT\"")) { + CurrentSMSMessage->Type=GST_SMS; + CurrentSMSMessage->folder=GST_OUTBOX; + CurrentSMSMessage->SMSData=false; + CurrentSMSMessage->Status=GSS_NOTSENTREAD; + } else if (!strcmp(buffer,"\"3\"") || !strcmp(buffer,"\"STO SENT\"")) { + CurrentSMSMessage->Type=GST_SMS; + CurrentSMSMessage->folder=GST_OUTBOX; + CurrentSMSMessage->SMSData=false; + CurrentSMSMessage->Status=GSS_SENTREAD; + } + + start+=ExtractOneParameter(MessageBuffer+start, buffer); + + /* It's delivery report according to Nokia AT standards */ + if (CurrentSMSMessage->folder==0 && buffer[0]!=0 && //GST_INBOX + buffer[0]!='"') { + + /* ??? */ + start+=ExtractOneParameter(MessageBuffer+start, buffer); + + /* Sender number */ + /* FIXME: support for all formats */ + start+=ExtractOneParameter(MessageBuffer+start, buffer); + for (i=1;iSender,buffer); + + /* ??? */ + start+=ExtractOneParameter(MessageBuffer+start, buffer); + + /* Sending datetime */ + start+=ExtractOneParameter(MessageBuffer+start, buffer); + start+=ExtractOneParameter(MessageBuffer+start, buffer2); + + for (i=1;iTime, buffer); + + /* Date of SMSC response */ + start+=ExtractOneParameter(MessageBuffer+start, buffer); + start+=ExtractOneParameter(MessageBuffer+start, buffer2); + + for (i=1;i=0;i--) { + ETSISMS.TPStatus=ETSISMS.TPStatus+(buffer[i]-'0')*j; + j=j*10; + } + + GSM_DecodeETSISMSStatusReportData(CurrentSMSMessage, &ETSISMS); + + /* NO SMSC number */ + CurrentSMSMessage->MessageCenter.Number[0]=0; + + CurrentSMSMessage->Type = GST_DR; + + /* FIXME: make support for it */ + CurrentSMSMessage->ReplyViaSameSMSC=false; + } else { + /* Sender number */ + /* FIXME: support for all formats */ + for (i=1;iSender,buffer); + + /* Sender number in alphanumeric format ? */ + start+=ExtractOneParameter(MessageBuffer+start, buffer); + if (strlen(buffer)!=0) strcpy(CurrentSMSMessage->Sender,buffer); + + /* Sending datetime */ + if (CurrentSMSMessage->folder==0) { //GST_INBOX + start+=ExtractOneParameter(MessageBuffer+start, buffer); + start+=ExtractOneParameter(MessageBuffer+start, buffer2); + + for (i=1;iTime, buffer); + } + + /* Sender number format */ + start+=ExtractOneParameter(MessageBuffer+start, buffer); + + /* First byte */ + start+=ExtractOneParameter(MessageBuffer+start, buffer); + ETSISMS.firstbyte=0; + j=1; + for (i=strlen(buffer)-1;i>=0;i--) { + ETSISMS.firstbyte=ETSISMS.firstbyte+(buffer[i]-'0')*j; + j=j*10; + } + + CurrentSMSMessage->ReplyViaSameSMSC=false; + /* GSM 03.40 section 9.2.3.17 (TP-Reply-Path) */ + if ((ETSISMS.firstbyte & 128)==128) + CurrentSMSMessage->ReplyViaSameSMSC=true; + + /* TP PID.No support now */ + start+=ExtractOneParameter(MessageBuffer+start, buffer); + + /* TP DCS */ + start+=ExtractOneParameter(MessageBuffer+start, buffer); + ETSISMS.TPDCS=0; + j=1; + for (i=strlen(buffer)-1;i>=0;i--) { + ETSISMS.TPDCS=ETSISMS.TPDCS+(buffer[i]-'0')*j; + j=j*10; + } + + if (CurrentSMSMessage->folder==1) { //GST_OUTBOX + /*TP VP */ + start+=ExtractOneParameter(MessageBuffer+start, buffer); + } + + /* SMSC number */ + /* FIXME: support for all formats */ + start+=ExtractOneParameter(MessageBuffer+start, buffer); + for (i=1;iMessageCenter.Number,buffer); + + /* Format of SMSC number */ + start+=ExtractOneParameter(MessageBuffer+start, buffer); + + /* TPUDL */ + start+=ExtractOneParameter(MessageBuffer+start, buffer); + ETSISMS.TPUDL=0; + j=1; + for (i=strlen(buffer)-1;i>=0;i--) { + ETSISMS.TPUDL=ETSISMS.TPUDL+(buffer[i]-'0')*j; + j=j*10; + } + + start++; + + CurrentSMSMessage->Coding = GSM_Coding_Default; + + /* GSM 03.40 section 9.2.3.10 (TP-Data-Coding-Scheme) and GSM 03.38 section 4 */ + if ((ETSISMS.TPDCS & 0xf4) == 0xf4) CurrentSMSMessage->Coding=GSM_Coding_8bit; + if ((ETSISMS.TPDCS & 0x08) == 0x08) CurrentSMSMessage->Coding=GSM_Coding_Unicode; + + switch (CurrentSMSMessage->Coding) { + case GSM_Coding_Default: + /* GSM 03.40 section 9.2.3.23 (TP-User-Data-Header-Indicator) */ + /* If not SMS with UDH, it's coded normal */ + /* If UDH available, treat it as Unicode or 8 bit */ + if ((ETSISMS.firstbyte & 0x40)!=0x40) { + CurrentSMSMessage->UDHType=GSM_NoUDH; + for (i=0;iGSM_MAX_SMS_LENGTH) break; + CurrentSMSMessage->MessageText[i]=MessageBuffer[i+start]; + } + CurrentSMSMessage->Length=ETSISMS.TPUDL; + break; + } + case GSM_Coding_Unicode: + case GSM_Coding_8bit: + DecodeHexBin (ETSISMS.MessageText, MessageBuffer+start, ETSISMS.TPUDL*2); + GSM_DecodeETSISMSSubmitData(CurrentSMSMessage, &ETSISMS); + break; + } + CurrentSMSMessage->MessageText[CurrentSMSMessage->Length]=0; + } + + CurrentSMSMessageError=GE_NONE; + } +} + +GSM_Error Nat_GetSMSMessage(GSM_SMSMessage *message) +{ + unsigned char req2[20]; + GSM_Error error; + + if (SMSATCMGF==-1) { + error=SMSGetPDUType(); + if (error!=GE_NONE) return error; + } + + CurrentSMSMessage = message; + + sprintf(req2, "AT+CMGR=%i\r",message->Location); //gets SMS + + CurrentSMSMessage->MessageNumber=CurrentSMSMessage->Location; + + return NULL_SendMessageSequence + (50, &CurrentSMSMessageError, strlen(req2), 0x00, req2); +} + +/* FIXME: do we need more than SMS_Submit and SMS_Deliver ? */ +GSM_Error GSM_EncodeETSISMSFrame(GSM_SMSMessage *SMS, unsigned char *req, int *length, SMS_MessageType PDU) +{ + GSM_ETSISMSMessage ETSI; + int i,current=0; + + GSM_EncodeETSISMS(SMS, &ETSI, PDU, length); + + for (i=0;ifolder==0x00) { //GST_INBOX + PDU=SMS_Deliver; + stat=1; + if (message->Status==GSS_NOTSENTREAD) stat=0; + } else { + PDU=SMS_Submit; + stat=3; + if (message->Status==GSS_NOTSENTREAD) stat=2; + } + + endchar[0]=26; //ctrl+z; + + switch (SMSATCMGF) { + case SMS_AT_PDU: /* PDU mode */ + GSM_EncodeETSISMSFrame(message, req3, &length, PDU); + + if (savesms) + sprintf(req2, "AT+CMGW=%i,%i\r",(length-(req3[0]+1)),stat); //saves SMS + else + sprintf(req2, "AT+CMGS=%i\r",(length-(req3[0]+1))); //sends SMS + + EncodeHexBin (req4, req3, length); + current=length*2; + + Protocol->SendMessage(strlen(req2), 0x00, req2); usleep(500); + + break; + case SMS_AT_TEXT: + + if (ATMan!=AT_MAN_NOKIA) { + switch (CurrentSMSMessage->Coding) { + case GSM_Coding_Unicode: + case GSM_Coding_8bit: + return GE_NOTSUPPORTED; + default: + break; + } + } + + GSM_EncodeETSISMS(message, &ETSISMS, PDU, &length); + + sprintf(req4, "AT+CSMP=%i,%i,%i,%i\r", + ETSISMS.firstbyte, ETSISMS.TPVP, + ETSISMS.TPPID, ETSISMS.TPDCS); + + error=NULL_SendMessageSequence + (50, &CurrentSMSMessageError, strlen(req4), 0x00, req4); + if (error!=GE_NONE) return error; + + strcpy(SMSC.Number,message->MessageCenter.Number); + SMSC.No=1; + error=Nat_SetSMSCenter(&SMSC); + if (error!=GE_NONE) return error; + + if (savesms) { + /* Tested AT implementations don't support alphanumeric numbers */ + if ((CurrentSMSMessage->Destination[0]<'0' || + CurrentSMSMessage->Destination[0]>'9') && + CurrentSMSMessage->Destination[0]!='+') + { + CurrentSMSMessage->Destination[0]='1'; + CurrentSMSMessage->Destination[1]=0; + } + + sprintf(req4, "AT+CMGW=\"%s\"\r",CurrentSMSMessage->Destination); + } else { + /* Tested AT implementations don't support alphanumeric numbers */ + if ((CurrentSMSMessage->Destination[0]<'0' || + CurrentSMSMessage->Destination[0]>'9') && + CurrentSMSMessage->Destination[0]!='+') + return GE_NOTSUPPORTED; + + sprintf(req4, "AT+CMGS=\"%s\"\r",CurrentSMSMessage->Destination); + } + + Protocol->SendMessage(strlen(req4), 0x00, req4); usleep(500); + + switch (CurrentSMSMessage->Coding) { + case GSM_Coding_Default: + /* If not SMS with UDH, it's as normal text */ + if (CurrentSMSMessage->UDHType==GSM_NoUDH) { + strcpy(req4,CurrentSMSMessage->MessageText); + current=strlen(req4); + break; + } + case GSM_Coding_Unicode: + case GSM_Coding_8bit: + + EncodeHexBin (req4, ETSISMS.MessageText, length); + current=length*2; + break; + } + + break; + } + + Protocol->SendMessage(current, 0x00, req4); usleep(500); + + return NULL_SendMessageSequence + (500, &CurrentSMSMessageError, 1, 0x00, endchar); +} + +void Nat_ReplySaveSMSMessage(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + int i; + +#ifdef DEBUG + fprintf(stdout, _("Message: SMS Message saved\n")); +#endif + + i=MessageLength-10; + while(MessageBuffer[i]!=0x20) { i++; } + + i++; + CurrentSMSMessage->MessageNumber=MessageBuffer[i]-'0'; + + i++; + if (MessageBuffer[i]!=0x0d) + CurrentSMSMessage->MessageNumber= + CurrentSMSMessage->MessageNumber*10+MessageBuffer[i]-'0'; + +#ifdef DEBUG + fprintf(stdout, _(" location: %i\n"),CurrentSMSMessage->MessageNumber); +#endif + + CurrentSMSMessageError=GE_NONE; +} + +GSM_Error Nat_SaveSMSMessage(GSM_SMSMessage *message) +{ + return Nat_SendSaveSMSMessage(message,true); +} + +void Nat_ReplySendSMSMessage(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + +#ifdef DEBUG + fprintf(stdout, _("Message: SMS Message sent OK\n")); +#endif + + CurrentSMSMessageError=GE_SMSSENDOK; +} + +GSM_Error Nat_SendSMSMessage(GSM_SMSMessage *message) +{ + return Nat_SendSaveSMSMessage(message,false); +} + +void Nat_ReplyDeleteSMSMessage(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + +#ifdef DEBUG + fprintf(stdout, _("Message: SMS deleted OK\n")); +#endif + + CurrentSMSMessageError=GE_NONE; +} + +GSM_Error Nat_DeleteSMSMessage(GSM_SMSMessage * message) +{ + char req[128]; + + sprintf(req, "AT+CMGD=%d\r", message->Location); + + return NULL_SendMessageSequence + (50, &CurrentSMSMessageError, strlen(req), 0x00, req); +} + +void Nat_ReplyGetSMSStatus(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + char *start2; + +#ifdef DEBUG + fprintf(stdout, _("Message: SMS status received\n")); +#endif + + CurrentSMSStatus->UnRead=0; + CurrentSMSStatus->Number=0; + + start2 = strstr(MessageBuffer, "+CPMS: "); + start2 += 7; + + CurrentSMSStatus->Number=atoi(start2); + + CurrentSMSStatusError=GE_NONE; +} + +GSM_Error Nat_GetSMSStatus(GSM_SMSStatus *Status) +{ + CurrentSMSStatus=Status; + + return NULL_SendMessageSequence + (10, &CurrentSMSStatusError, 13, 0x00, "AT+CPMS=\"SM\"\r"); +} + +struct AT_OneReply ATRepliesOK[] = { + +{"AT+CCFC=" ,Nat_ReplyCallDivert }, +{"AT+CGMI\r",Nat_ReplyGetManufacturer }, +{"AT+CPBS?" ,Nat_ReplyGetMemoryStatusCPBS }, +{"AT+CPBR=?",Nat_ReplyGetMemoryStatusCPBR }, +{"AT+CPBR=" ,Nat_ReplyGetMemoryLocation }, +{"AT+CPBW=" ,Nat_ReplyWritePhonebookLocation}, +{"AT+CPBS=" ,Nat_ReplyPBKSetMemoryType }, +{"AT+CSCS=\"HEX\"",Nat_ReplySetCharset }, +{"AT+CSCS=\"GSM\"",Nat_ReplySetCharset }, +{"AT+CSCA?" ,Nat_ReplyGetSMSCenter }, +{"AT+CSCA=" ,Nat_ReplySetSMSCenter }, +{"AT+CSDH=1\r",Nat_ReplySMSGetPDUType }, +{"AT+CMGF=0\r",Nat_ReplySMSGetPDUType }, +{"AT+CMGF=1\r",Nat_ReplySMSGetPDUType }, +{"AT+CMGR=" ,Nat_ReplyGetSMSMessage }, +{"AT+CSMP=" ,Nat_ReplyCSMP }, +{"AT+CMGW=" ,Nat_ReplySaveSMSMessage }, +{"AT+CMGS=" ,Nat_ReplySendSMSMessage }, +{"AT+CMGD=" ,Nat_ReplyDeleteSMSMessage }, +{"AT+CPMS=\"SM\"",Nat_ReplyGetSMSStatus }, +{"AT+CPIN?\r",Nat_ReplyGetSecurityCodeStatus}, +{"AT+CCLK?" ,Nat_ReplyGetDateTime }, +{"AT+CCLK=" ,Nat_ReplySetDateTime }, +{"AT+CALA?" ,Nat_ReplyGetAlarm }, +{"AT+CGMM\r",Nat_ReplyGetID }, +{"AT+CGMR\r",Nat_ReplyGetHW }, +{"AT+CREG?" ,Nat_ReplyGetNetworkInfo }, +{"AT+CGSN\r",Nat_ReplyGetIMEI }, +{"AT+CHUP" ,Nat_ReplyCancelCall }, +{"AT+CBC" ,Nat_ReplyGetBatteryLevel }, +{"AT+CSQ" ,Nat_ReplyGetRFLevel }, + +{"",NULL} +}; + +void Nat_DispatchMessage(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) { + + bool AnswerOK,AnswerError; //if last part is OK or ERROR + + int i,start=0; + + /* In 9210 first answer start with different, random bytes. + Here we try to find first AT to find start byte */ + for (i=0;i +#include +#include + +#ifndef WIN32 + + #include "devices/device.h" + +#endif + +/* Various header file */ +#ifndef VC6 + #include "config.h" +#endif +#include "misc.h" +#include "gsm-api.h" +#include "gsm-common.h" +#include "files/cfgreader.h" +#include "newmodules/sniff/sniff.h" +#include "newmodules/n6110.h" +#include "newmodules/n7110.h" +#include "gsm-networks.h" + +/* Global variables used by code in gsm-api.c to expose the functions + supported by this model of phone. */ + + +static char *realmodel; /* Model from .gnokiirc file. */ +static char *Port; /* Port from .gnokiirc file */ +static char *Initlength; /* Init length from .gnokiirc file */ +static char *Connection; /* Connection type from .gnokiirc file */ +static char *SynchronizeTime; /* If we set date and time from computer to phone (from .gnokiirc file) */ +static char *BinDir; /* Binaries directory from .gnokiirc file - not used here yet */ +static GSM_ConnectionType connectiontype; + + + + + + + +/* Here we initialise model specific functions. */ + +GSM_Functions Nsniff_Functions = { + Nsniff_Initialise, + Nsniff_DispatchMessage, + NULL_Terminate, + NULL_KeepAlive, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED, + NOTSUPPORTED +}; + + + +/* for all these Phones we support sniff */ + +GSM_Information Nsniff_Information = { + "3210sniff|3310sniff|3330sniff|5110sniff|5130sniff|5190sniff|6110sniff|6130sniff|6150sniff|6190sniff|8210sniff|8850sniff|6210sniff|6250sniff|7110sniff", + /* Supported models in FBUS */ + "3210sniff|3310sniff|3330sniff|5110sniff|5130sniff|5190sniff|6110sniff|6130sniff|6150sniff|6190sniff|8210sniff|8850sniff|6210sniff|6250sniff|7110sniff", + /* Supported models in MBUS */ + "", + /* Supported models in FBUS over infrared */ + "", + /* Supported models in FBUS over DLR3 */ + "", + "6210decode|6250decode|7110decode", /* Supported models in FBUS over Irda sockets */ + "", + 4, /* Max RF Level */ + 0, /* Min RF Level */ + GRF_Arbitrary, /* RF level units */ + 4, /* Max Battery Level */ + 0, /* Min Battery Level */ + GBU_Arbitrary, /* Battery level units */ + GDT_None, /* No date/time support */ + GDT_None, /* No alarm support */ + 0 /* Max alarms = 0 */ +}; + +/* Initialise variables and state machine. */ +GSM_Error Nsniff_Initialise(char *port_device, char *initlength, + GSM_ConnectionType connection, + void (*rlp_callback)(RLP_F96Frame *frame)) +{ + + GSM_PhonebookEntry phonebook; + GSM_SpeedDial speed; + GSM_SMSMessage sms; + GSM_MemoryStatus status; + GSM_NetworkInfo netinfo; + GSM_SMSStatus smsstatus; + GSM_SMSFolders folders; + GSM_MessageCenter smsc; + int secstatus; + GSM_SecurityCode seccode; + GSM_DateTime date; + GSM_DateTime alarm; + GSM_CalendarNote note; + char netmon; + GSM_Bitmap logo; + GSM_Profile profile; + GSM_CBMessage cb; + GSM_Network netname; + GSM_BinRingtone binring; + GSM_AllSimlocks siml; if (Protocol->Initialise(port_device,initlength,connection,rlp_callback)!=GE_NONE) + { + return GE_NOTSUPPORTED; + } + + CurrentLinkOK = true; + + CurrentPhonebookEntry=&phonebook; + CurrentSpeedDialEntry=&speed; + CurrentSMSMessage=&sms; + CurrentMemoryStatus=&status; + CurrentNetworkInfo=&netinfo; + CurrentSMSStatus=&smsstatus; + CurrentSMSFolders=&folders; + CurrentMessageCenter=&smsc; + CurrentSecurityCodeStatus=&secstatus; + CurrentSecurityCode=&seccode; + CurrentDateTime=&date; + CurrentAlarm=&alarm; + CurrentCalendarNote=¬e; + CurrentNetmonitor=&netmon; + CurrentGetBitmap=&logo; + CurrentProfile=&profile; + CurrentCBMessage=&cb; + CurrentGetOperatorNameNetwork=&netname; + CurrentGetBinRingtone=&binring; + CurrentSimLock=⪝ + + /* Read config file, once again to get real model */ + if (CFG_ReadConfig(&realmodel, &Port, &Initlength, &Connection, &BinDir, &SynchronizeTime,false) < 0) { + exit(-1); + } + + connectiontype = GetConnectionTypeFromString(Connection); + return (GE_NONE); +} + + +void Nsniff_DispatchMessage(u16 MessageLength, u8 *MessageBuffer, u8 MessageType) +{ + +/* switch to real Model */ + if (CheckModel (N6110_Information, realmodel, connectiontype)) + N6110_DispatchMessage( MessageLength, MessageBuffer, MessageType); + + if (CheckModel (N7110_Information, realmodel, connectiontype)) + N7110_DispatchMessage( MessageLength, MessageBuffer, MessageType); +} diff --git a/common/protocol/at.c b/common/protocol/at.c new file mode 100644 index 0000000..6afbb18 --- /dev/null +++ b/common/protocol/at.c @@ -0,0 +1,195 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This file provides an API for support for AT protocol + +*/ + +/* "Turn on" prototypes in AT.h */ +#define __AT_c + +/* System header files */ +#include +#include +#include + +#ifdef WIN32 + #include + #include "misc_win32.h" +#else + #include +#endif + +/* Various header file */ +#include "devices/device.h" +#include "gsm-api.h" +#include "protocol/at.h" + +GSM_Protocol AT_Functions = { + AT_Initialise, + AT_SendMessage, + AT_SendFrame, + AT_WritePhone, + AT_Terminate, + AT_RX_StateMachine +}; + +/* Local variables */ +u16 BufferCount; + +u16 MessageLength; + +u8 MessageBuffer[AT_MAX_RECEIVE_LENGTH * 6]; + +static bool wascrlf = false; +static char *linestart = MessageBuffer; + +/* N61_RX_DisplayMessage is called when a message we don't know about is + received so that the user can see what is going back and forth, and perhaps + shed some more light/explain another message type! */ + +#ifdef DEBUG +void AT_RX_DisplayMessage() +{ + fprintf(stdout, _("Phone\n")); + + hexdump(MessageLength,MessageBuffer); +} +#endif /* DEBUG */ + +/* Prepares the message header and sends it, prepends the message start byte + (0x1e) and other values according the value specified when called. + Calculates checksum and then sends the lot down the pipe... */ +int AT_SendFrame(u16 message_length, u8 message_type, u8 *buffer) { + +#ifdef DEBUG + int count; +#endif + + /* FIXME - we should check for the message length ... */ + +#ifdef DEBUG + fprintf(stdout, _("PC: ")); + + for (count = 0; count < message_length-1; count++) + fprintf(stdout, "%c", buffer[count]); + + fprintf(stdout, "\n"); +#endif /* DEBUG */ + + /* Send it out... */ + if (!AT_WritePhone(message_length,buffer)) + return (false); + + return (true); +} + +int AT_SendMessage(u16 message_length, u8 message_type, u8 *buffer) { + + AT_SendFrame(message_length, message_type, buffer); + + return (true); +} + +int AT_SendAck(u8 message_type, u8 message_seq) { + + return true; +} + +/* Applications should call AT_Terminate to shut down the AT thread and + close the serial port. */ +void AT_Terminate(void) +{ + /* Request termination of thread */ + CurrentRequestTerminate = true; + + /* Close serial port. */ + device_close(); +} + +/* RX_State machine for receive handling. Called once for each character + received from the phone/phone. */ + +void AT_RX_StateMachine(unsigned char rx_byte) { + + /* FIXME: Check for overflow */ + MessageBuffer[BufferCount] = rx_byte; + MessageBuffer[BufferCount + 1] = '\0'; + +// fprintf(stdout,_("%02x %c\n"),rx_byte,rx_byte); + + if (wascrlf && (rx_byte != 10 && rx_byte != 13)) { + linestart = MessageBuffer + BufferCount; + wascrlf = false; + } + + if ((rx_byte== 10 || rx_byte==13)) wascrlf = true; + + if ((BufferCount > 0) && (10 == MessageBuffer[BufferCount]) + && (13 == MessageBuffer[BufferCount-1]) + && ((0 == strncmp("OK", linestart, 2)) + || (0 == strncmp("ERROR", linestart, 5)) + || (0 == strncmp("+CME ERROR:", linestart, 11)) + || (0 == strncmp("+CMS ERROR:", linestart, 11)))) { + + MessageLength=BufferCount; + +#ifdef DEBUG + AT_RX_DisplayMessage(); +#endif + + GSM->DispatchMessage(MessageLength,MessageBuffer, 0x00); + + BufferCount = 0; + linestart = MessageBuffer; + wascrlf = false; + + } else BufferCount++; +} + +/* Called by initialisation code to open comm port in asynchronous mode. */ +bool AT_OpenSerial(void) +{ +// device_changespeed(115200); + + device_changespeed(19200); + + return (true); +} + +/* Initialise variables and state machine. */ +GSM_Error AT_Initialise(char *port_device, char *initlength, + GSM_ConnectionType connection, + void (*rlp_callback)(RLP_F96Frame *frame)) +{ + + if (!StartConnection (port_device,false,connection)) + return GE_INTERNALERROR; + + CurrentConnectionType = connection; + + if (AT_OpenSerial() != true) return GE_INTERNALERROR; + + BufferCount=0; + + return (GE_NONE); +} + +bool AT_WritePhone (u16 length, u8 *buffer) { + int i; + + for (i=0;i +#include +#include + +#ifdef WIN32 + #include + #include "misc_win32.h" +#else + #include +#endif + +/* Various header file */ +#include "devices/device.h" +#include "gsm-api.h" +#include "protocol/fbusirda.h" +#include "protocol/fbus.h" +#include "misc.h" + +GSM_Protocol FBUSIRDA_Functions = { + FBUSIRDA_Initialise, + FBUSIRDA_SendMessage, + FBUSIRDA_SendFrame, + FBUSIRDA_WritePhone, + FBUSIRDA_Terminate, + FBUSIRDA_RX_StateMachine +}; + +/* Local variables */ +enum FBUS_RX_States RX_State; + +u8 MessageDestination, MessageSource; + +u16 BufferCount; + +u16 MessageLength; + +u8 MessageType; + +u8 MessageBuffer[FBUS_MAX_RECEIVE_LENGTH * 6]; + +#ifdef DEBUG +char *FBUSIRDA_PrintDevice(int Device) +{ + switch (Device) { + + case FBUS_DEVICE_PHONE: + return _("Phone"); + + case FBUS_DEVICE_PC: + return _("PC"); + + default: + return _("Unknown"); + + } +} + +/* FBUSIRDA_RX_DisplayMessage is called when a message we don't know about is + received so that the user can see what is going back and forth, and perhaps + shed some more light/explain another message type! */ +void FBUSIRDA_RX_DisplayMessage() +{ + fprintf(stdout, _("Msg Source: %s\n"), FBUSIRDA_PrintDevice(MessageSource)); + fprintf(stdout, _("Msg Dest: %s\n"), FBUSIRDA_PrintDevice(MessageDestination)); + fprintf(stdout, _("Msg Type: %02x\n"), MessageType); + + hexdump( MessageLength, MessageBuffer); +} +#endif /* DEBUG */ + +/* Prepares the message header and sends it, prepends the message start byte + (0x1e) and other values according the value specified when called. + Calculates checksum and then sends the lot down the pipe... */ +int FBUSIRDA_SendFrame(u16 message_length, u8 message_type, u8 *buffer) { + u8 out_buffer[FBUSIRDA_MAX_CONTENT_LENGTH + 2]; + + int current=0; + int header=0; + + /* FIXME - we should check for the message length ... */ + + /* Now construct the message header. */ + + out_buffer[current++] = FBUSIRDA_FRAME_ID; /* Start of the frame indicator */ + + out_buffer[current++] = FBUS_DEVICE_PHONE; /* Destination */ + + out_buffer[current++] = FBUS_DEVICE_PC; /* Source */ + + out_buffer[current++] = message_type; /* Type */ + + out_buffer[current++] = message_length/256; /* Length1 */ + out_buffer[current++] = message_length%256; /* Length2 */ + + /* Copy in data if any. */ + + if (message_length != 0) { + memcpy(out_buffer + current, buffer, message_length); + header = current; + current+=message_length; + } + +#ifdef DEBUG + NULL_TX_DisplayMessage( current, out_buffer); +#endif /* DEBUG */ + + /* Send it out... */ + return ( FBUSIRDA_WritePhone(current,out_buffer) - header); + +} + +int FBUSIRDA_SendMessage(u16 message_length, u8 message_type, u8 *buffer) { + + u8 frame_buffer[FBUSIRDA_MAX_CONTENT_LENGTH + 2]; + u16 ret; + + memcpy(frame_buffer, buffer, message_length); + ret = FBUSIRDA_SendFrame(message_length, message_type, frame_buffer); + + if (ret != message_length) + { + printf("CAUTION: FBUSIRDA_SendFrame return written %d bytes of %d !\n",ret, message_length); + return(false); + } + else + return (true); +} + +int FBUSIRDA_SendAck(u8 message_type, u8 message_seq) { + return(true); +} + +/* Applications should call MBUS_Terminate to shut down the MBUS thread and + close the serial port. */ +void FBUSIRDA_Terminate(void) +{ + /* Request termination of thread */ + CurrentRequestTerminate = true; + + /* Close serial port. */ + device_close(); +} + +/* RX_State machine for receive handling. Called once for each character + received from the phone/phone. */ +void FBUSIRDA_RX_StateMachine(unsigned char rx_byte) { + + unsigned char max; + + int i; + + i=0; + + switch (RX_State) { + + case FBUS_RX_Discarding: + break; + + /* Messages from the phone start with an 0x14 (IRDA, Nokia:PhoNet). + We use this to "synchronise" with the incoming data stream. */ + + case FBUS_RX_Sync: + + if (rx_byte == FBUSIRDA_FRAME_ID) { + BufferCount = 0; + RX_State = FBUS_RX_GetDestination; + } + + break; + + case FBUS_RX_GetDestination: + + MessageDestination=rx_byte; + RX_State = FBUS_RX_GetSource; + + /* When there is a checksum error and things get out of sync we have to manage to resync */ + /* If doing a data call at the time, finding a 0x1e etc is really quite likely in the data stream */ + /* Then all sorts of horrible things happen because the packet length etc is wrong... */ + /* Therefore we test here for a destination of 0x0c and return to the top if it is not */ + +#ifdef DEBUG + if (strstr(GSM_Info->IrdaModels,"decode")!=NULL) + { + if (rx_byte!=FBUS_DEVICE_PC && rx_byte!=FBUS_DEVICE_PHONE ) + { + RX_State=FBUS_RX_Sync; + fprintf(stdout,"decode: expected FBUS_DEVICE_PC/FBUS_DEVICE_PHONE, got %2x\n",rx_byte); + } + }//decode Model + else + { +#endif + if (rx_byte!=FBUS_DEVICE_PC) + { + RX_State=FBUS_RX_Sync; +#ifdef DEBUG + fprintf(stdout,"The FBUSIRDA stream is out of sync - expected FBUS_DEVICE_PC, got %2x\n",rx_byte); +#endif + } +#ifdef DEBUG + }//not decode Model +#endif + + break; + + case FBUS_RX_GetSource: + + MessageSource=rx_byte; + RX_State = FBUS_RX_GetType; + +#ifdef DEBUG + if (strstr(GSM_Info->IrdaModels,"decode")!=NULL) + { + if (rx_byte!=FBUS_DEVICE_PC && rx_byte!=FBUS_DEVICE_PHONE ) + { + RX_State=FBUS_RX_Sync; + fprintf(stdout,"decode: expected FBUS_DEVICE_PC/FBUS_DEVICE_PHONE, got %2x\n",rx_byte); + } + }//decode Model + else + { +#endif + if (rx_byte!=FBUS_DEVICE_PHONE) + { + RX_State=FBUS_RX_Sync; +#ifdef DEBUG + fprintf(stdout,"The FBUSIRDA stream is out of sync - expected FBUS_DEVICE_PHONE, got %2x\n",rx_byte); +#endif + } +#ifdef DEBUG + }//not decode Model +#endif + + break; + + case FBUS_RX_GetType: + + MessageType=rx_byte; + RX_State = FBUS_RX_GetLength1; + + break; + + case FBUS_RX_GetLength1: + + MessageLength=0; + + /* MW:Here are problems with conversion. For chars 0-127 it's OK, for + higher not (probably because rx_byte is char type) - improtant + for MBUS. So, I make it double and strange - generally it should be + more simple and make simple convert rx_byte into MessageLength */ + if (rx_byte!=0) { + max=rx_byte; + MessageLength=max*256; + } + + RX_State = FBUS_RX_GetLength2; + + break; + + case FBUS_RX_GetLength2: + + /* MW:Here are problems with conversion. For chars 0-127 it's OK, for + higher not (probably because rx_byte is char type) - important + for MBUS. So, I make it double and strange - generally it should be + more simple and make simple convert rx_byte into MessageLength */ +#if defined(__svr4__) || defined(__FreeBSD__) + if (rx_byte!=0) { + for (i=0;iDispatchMessage(MessageLength, MessageBuffer, MessageType); + } + else + { +#ifdef DEBUG + /* for --decodefile */ + fprintf(stdout, _("Msg Source: %s\n"), FBUSIRDA_PrintDevice(MessageSource)); + fprintf(stdout, _("Msg Dest: %s\n"), FBUSIRDA_PrintDevice(MessageDestination)); + fprintf(stdout, _("Msg Type: %02x\n"), MessageType); + hexdump( MessageLength, MessageBuffer); +#endif /* DEBUG */ + } + + RX_State = FBUS_RX_Sync; + } + break; + } +} + +/* Called by initialisation code to open comm port in asynchronous mode. */ +bool FBUSIRDA_OpenSerial(void) +{ +#ifdef DEBUG + fprintf(stdout, _("Setting FBUS Irda communication...\n")); +#endif /* DEBUG */ + + return (true); + +} + +/* Initialise variables and state machine. */ +GSM_Error FBUSIRDA_Initialise(char *port_device, char *initlength, + GSM_ConnectionType connection, + void (*rlp_callback)(RLP_F96Frame *frame)) +{ + CurrentConnectionType = connection; + + if (!StartConnection(port_device,false,connection)) { + return GE_INTERNALERROR; + } + RX_State=FBUS_RX_Sync; + + return (GE_NONE); +} + +bool FBUSIRDA_WritePhone (u16 length, u8 *buffer) { + + if (!CurrentDisableKeepAlive) + usleep(150); + + return (device_write(buffer,length)); +} diff --git a/common/protocol/mbus.c b/common/protocol/mbus.c new file mode 100644 index 0000000..48b4562 --- /dev/null +++ b/common/protocol/mbus.c @@ -0,0 +1,480 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This file provides an API for support for MBUS protocol + +*/ + +/* "Turn on" prototypes in MBUS.h */ +#define __MBUS_c + +/* System header files */ + +#include +#include +#include + +#ifdef WIN32 + #include + #include "misc_win32.h" +#else + #include +#endif + +/* Various header file */ +#include "devices/device.h" +#include "gsm-api.h" +#include "protocol/mbus.h" +#include "protocol/fbus.h" + +GSM_Protocol MBUS_Functions = { + MBUS_Initialise, + MBUS_SendMessage, + MBUS_SendFrame, + MBUS_WritePhone, + MBUS_Terminate, + MBUS_RX_StateMachine +}; + +/* Local variables */ +enum FBUS_RX_States RX_State; + +u8 MessageDestination, MessageSource; + +u16 BufferCount; + +u16 MessageLength; + +u8 MessageType; + +u8 MessageBuffer[MBUS_MAX_RECEIVE_LENGTH * 6]; + +static u8 RequestSequenceNumber = 0x00; + +#ifdef DEBUG +char *MBUS_PrintDevice(int Device) +{ + switch (Device) { + + case FBUS_DEVICE_PHONE: + return _("Phone"); + + case MBUS_DEVICE_PC1: + return _("PC"); + + case MBUS_DEVICE_PC2: + return _("PC"); + + default: + return _("Unknown"); + + } +} + +/* N61_RX_DisplayMessage is called when a message we don't know about is + received so that the user can see what is going back and forth, and perhaps + shed some more light/explain another message type! */ +void MBUS_RX_DisplayMessage() +{ + fprintf(stdout, _("Msg Dest: %s\n"), MBUS_PrintDevice(MessageDestination)); + fprintf(stdout, _("Msg Source: %s\n"), MBUS_PrintDevice(MessageSource)); + fprintf(stdout, _("Msg Type: %02x\n"), MessageType); + + hexdump(MessageLength,MessageBuffer); +} + +#endif /* DEBUG */ + +/* Prepares the message header and sends it, prepends the message start byte + (0x1e) and other values according the value specified when called. + Calculates checksum and then sends the lot down the pipe... */ +int MBUS_SendFrame(u16 message_length, u8 message_type, u8 *buffer) { + u8 out_buffer[MBUS_MAX_CONTENT_LENGTH + 2]; + + int count, current=0; + unsigned char checksum; + + /* FIXME - we should check for the message length ... */ + + /* Now construct the message header. */ + + out_buffer[current++] = MBUS_FRAME_ID; /* Start of the frame indicator */ + + out_buffer[current++] = FBUS_DEVICE_PHONE; /* Destination */ + + out_buffer[current++] = MBUS_DEVICE_PC1; /* Source */ + + out_buffer[current++] = message_type; /* Type */ + + out_buffer[current++] = (message_length-1)/256; /* Length1 */ + out_buffer[current++] = (message_length-1)%256; /* Length2 */ + + /* Copy in data if any. */ + + if (message_length != 0) { + memcpy(out_buffer + current, buffer, message_length); + current+=message_length; + } + + /* Now calculate checksum over entire message and append to message. */ + + /* All bytes */ + checksum = 0; + for (count = 0; count < current; count++) + checksum ^= out_buffer[count]; + + out_buffer[current++] = checksum; + +#ifdef DEBUG + NULL_TX_DisplayMessage(current, out_buffer); +#endif /* DEBUG */ + + /* Send it out... */ + if (!MBUS_WritePhone(current,out_buffer)) + return (false); + + return (true); +} + +int MBUS_SendMessage(u16 message_length, u8 message_type, u8 *buffer) { + + u8 frame_buffer[MBUS_MAX_CONTENT_LENGTH + 2]; + + RequestSequenceNumber++; + + memcpy(frame_buffer, buffer, message_length); + frame_buffer[message_length] = RequestSequenceNumber; + MBUS_SendFrame(message_length + 1, message_type, frame_buffer); + + return (true); +} + +int MBUS_SendAck(u8 message_type, u8 message_seq) { + + unsigned char request[6]; + + int count; + + request[0]=MBUS_FRAME_ID; + request[1]=FBUS_DEVICE_PHONE; + request[2]=MBUS_DEVICE_PC1; + request[3]=FBUS_FRTYPE_ACK; + request[4] = message_seq; + request[5]=0; + + /* Checksum */ + for (count = 0; count < 5; count++) + request[5] ^= request[count]; + +#ifdef DEBUG + fprintf(stdout, _("[Sending Ack of type %02x, seq: %x]\n"), message_type, message_seq); + + NULL_TX_DisplayMessage(5, request); +#endif /* DEBUG */ + + if (!MBUS_WritePhone(6, request)) { +#ifdef DEBUG + fprintf(stdout,_("Sending ACK failed %i !\n"),count); +#endif + return (false); + } + + return(true); +} + +/* Applications should call MBUS_Terminate to shut down the MBUS thread and + close the serial port. */ +void MBUS_Terminate(void) +{ + /* Request termination of thread */ + CurrentRequestTerminate = true; + + /* RTS low */ + device_setdtrrts(0, 0); + + /* Close serial port. */ + device_close(); +} + +/* RX_State machine for receive handling. Called once for each character + received from the phone/phone. */ +void MBUS_RX_StateMachine(unsigned char rx_byte) { + + static struct timeval time_now, time_last, time_diff; + + unsigned char max; + + static int checksum[2]; + +#if defined(__svr4__) || defined(__FreeBSD__) || defined(DEBUG) + int i=0; +#endif + +#ifdef DEBUG + if (strcmp(GSM_Info->MBUSModels, "mbussniff")) + { +#endif + + checksum[0]=checksum[1]; + checksum[1] ^= rx_byte; + + switch (RX_State) { + + /* Messages from the phone start with an 0x1f (MBUS). + We use this to "synchronise" with the incoming data stream. However, + if we see something else, we assume we have lost sync and we require + a gap of at least 5ms before we start looking again. This is because + the data part of the frame could contain a byte which looks like the + sync byte */ + case FBUS_RX_Discarding: +#ifndef VC6 + gettimeofday(&time_now, NULL); + timersub(&time_now, &time_last, &time_diff); + if (time_diff.tv_sec == 0 && time_diff.tv_usec < 5000) { + time_last = time_now; /* no gap seen, continue discarding */ + break; + } + /* else fall through to... */ +#endif + + case FBUS_RX_Sync: + + if (rx_byte == MBUS_FRAME_ID) { + + BufferCount = 0; + + RX_State = FBUS_RX_GetDestination; + + /* Initialize checksum. */ + checksum[1] = MBUS_FRAME_ID; + } else { + /* Lost frame sync */ + RX_State = FBUS_RX_Discarding; +#ifndef VC6 + gettimeofday(&time_last, NULL); +#endif + } + + break; + + case FBUS_RX_GetDestination: + + MessageDestination=rx_byte; + RX_State = FBUS_RX_GetSource; + + /* When there is a checksum error and things get out of sync we have to manage to resync */ + /* If doing a data call at the time, finding a 0x1e etc is really quite likely in the data stream */ + /* Then all sorts of horrible things happen because the packet length etc is wrong... */ + /* Therefore we test here for a destination of 0x0c and return to the top if it is not */ + /* The same testing for MBUS. Only one change: MBUS returns, what we send. + So, the byte can be 0x10 (destination MBUS) or 0x00 (phone) */ + if (rx_byte!=MBUS_DEVICE_PC1 && rx_byte!=MBUS_DEVICE_PC2 && rx_byte!=FBUS_DEVICE_PHONE) { + RX_State=FBUS_RX_Sync; +#ifdef DEBUG + fprintf(stdout,"The mbus stream is out of sync - expected 0x10 or 0x00, got %2x\n",rx_byte); +#endif + } + + break; + + case FBUS_RX_GetSource: + + MessageSource=rx_byte; + RX_State = FBUS_RX_GetType; + + /* Source should be 0x00 or 0x10 */ + if (rx_byte!=FBUS_DEVICE_PHONE && rx_byte!=MBUS_DEVICE_PC1 && rx_byte!=MBUS_DEVICE_PC2) { + RX_State=FBUS_RX_Sync; +#ifdef DEBUG + fprintf(stdout,"The mbus stream is out of sync - expected 0x00 or 0x10, got %2x\n",rx_byte); +#endif + } + + break; + + case FBUS_RX_GetType: + + MessageType=rx_byte; + + RX_State = FBUS_RX_GetLength1; + + break; + + case FBUS_RX_GetLength1: + + MessageLength=0; + + /* MW:Here are problems with conversion. For chars 0-127 it's OK, for + higher not (probably because rx_byte is char type) - improtant + for MBUS. So, I make it double and strange - generally it should be + more simple and make simple convert rx_byte into MessageLength */ + if (rx_byte!=0) { + max=rx_byte; + MessageLength=max*256; + } + + RX_State = FBUS_RX_GetLength2; + + break; + + case FBUS_RX_GetLength2: + + /* MW:Here are problems with conversion. For chars 0-127 it's OK, for + higher not (probably because rx_byte is char type) - improtant + for MBUS. So, I make it double and strange - generally it should be + more simple and make simple convert rx_byte into MessageLength */ +#if defined(__svr4__) || defined(__FreeBSD__) + if (rx_byte!=0) { + for (i=0;iDispatchMessage(MessageLength, MessageBuffer, MessageType); + + } else { +#ifdef DEBUG + if (strstr(GSM_Info->MBUSModels, "sniff") != NULL) { + fprintf(stdout, _("PC: ")); + + fprintf(stdout, "%02x:", MBUS_FRAME_ID); + fprintf(stdout, "%02x:", MBUS_DEVICE_PC1); + fprintf(stdout, "%02x:", FBUS_DEVICE_PHONE); + fprintf(stdout, "%02x:", MessageType); + fprintf(stdout, "%02x:", MessageLength/256); + fprintf(stdout, "%02x:", MessageLength%256); + +// NULL_TX_DisplayMessage(current, out_buffer); + + for (i = 0; i < BufferCount; i++) + fprintf(stdout, "%02x:", MessageBuffer[i]); + + fprintf(stdout, "\n"); + } +#endif /* DEBUG */ + } + } else { +#ifdef DEBUG + fprintf(stdout, _("Bad checksum %02x (should be %02x), msg len=%i !\n"),rx_byte,checksum[0],MessageLength); +#endif /* DEBUG */ + } + RX_State = FBUS_RX_Sync; + } + break; + } + +#ifdef DEBUG + + } else { + if (isprint(rx_byte)) + fprintf(stdout, "[%02x%c]", rx_byte, rx_byte); + else + fprintf(stdout, "[%02x ]", rx_byte); + + } + +#endif +} + +/* Called by initialisation code to open comm port in asynchronous mode. */ +bool MBUS_OpenSerial(void) +{ +#ifdef DEBUG + fprintf(stdout, _("Setting MBUS communication...\n")); +#endif /* DEBUG */ + + device_changespeed(9600); + + usleep(100); + + if (strstr(GSM_Info->MBUSModels, "sniff") == NULL) { + + /* leave RTS high, DTR low for duration of session. */ + device_setdtrrts(0, 1); + + usleep(100); + } + + return (true); + +} + +/* Initialise variables and state machine. */ +GSM_Error MBUS_Initialise(char *port_device, char *initlength, + GSM_ConnectionType connection, + void (*rlp_callback)(RLP_F96Frame *frame)) +{ + if (!StartConnection (port_device,true,connection)) + return GE_INTERNALERROR; + + CurrentConnectionType = connection; + + if (MBUS_OpenSerial() != true) { + /* Fail so sit here till calling code works out there is a problem. */ +// while (!CurrentRequestTerminate) +// usleep (100000); + + return GE_INTERNALERROR; + } + + return (GE_NONE); +} + +bool MBUS_WritePhone (u16 length, u8 *buffer) { + + if (!CurrentDisableKeepAlive) + usleep(150); + + if (device_write(buffer,length)!=length) + return false; + else + return true; +} diff --git a/config/config.guess b/config/config.guess new file mode 100755 index 0000000..6012b39 --- /dev/null +++ b/config/config.guess @@ -0,0 +1,1298 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. + +timestamp='2001-07-12' + +# This file 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 2 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Written by Per Bothner . +# Please send patches to . +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + + +dummy=dummy-$$ +trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int dummy(){}" > $dummy.c ; + for c in cc gcc c89 ; do + ($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ; + if test $? = 0 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + rm -f $dummy.c $dummy.o $dummy.rel ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # Netbsd (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # Determine the machine/vendor (is the vendor relevant). + case "${UNAME_MACHINE}" in + amiga) machine=m68k-unknown ;; + arm32) machine=arm-unknown ;; + atari*) machine=m68k-atari ;; + sun3*) machine=m68k-sun ;; + mac68k) machine=m68k-apple ;; + macppc) machine=powerpc-apple ;; + hp3[0-9][05]) machine=m68k-hp ;; + ibmrt|romp-ibm) machine=romp-ibm ;; + *) machine=${UNAME_MACHINE}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE}" in + i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + cat <$dummy.s + .data +\$Lformat: + .byte 37,100,45,37,120,10,0 # "%d-%x\n" + + .text + .globl main + .align 4 + .ent main +main: + .frame \$30,16,\$26,0 + ldgp \$29,0(\$27) + .prologue 1 + .long 0x47e03d80 # implver \$0 + lda \$2,-1 + .long 0x47e20c21 # amask \$2,\$1 + lda \$16,\$Lformat + mov \$0,\$17 + not \$1,\$18 + jsr \$26,printf + ldgp \$29,0(\$26) + mov 0,\$16 + jsr \$26,exit + .end main +EOF + eval $set_cc_for_build + $CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null + if test "$?" = 0 ; then + case `./$dummy` in + 0-0) + UNAME_MACHINE="alpha" + ;; + 1-0) + UNAME_MACHINE="alphaev5" + ;; + 1-1) + UNAME_MACHINE="alphaev56" + ;; + 1-101) + UNAME_MACHINE="alphapca56" + ;; + 2-303) + UNAME_MACHINE="alphaev6" + ;; + 2-307) + UNAME_MACHINE="alphaev67" + ;; + esac + fi + rm -f $dummy.s $dummy + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit 0;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + arc64:OpenBSD:*:*) + echo mips64el-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hkmips:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mips-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + atari*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + sun3*:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + eval $set_cc_for_build + $CC_FOR_BUILD $dummy.c -o $dummy \ + && ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + eval $set_cc_for_build + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + case "${HPUX_REV}" in + 11.[0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + esac ;; + esac + fi ;; + esac + if [ "${HP_ARCH}" = "" ]; then + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + eval $set_cc_for_build + (CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy` + if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi + rm -f $dummy.c $dummy + fi ;; + esac + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + eval $set_cc_for_build + $CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + hppa*:OpenBSD:*:*) + echo hppa-unknown-openbsd + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*X-MP:*:*:*) + echo xmp-cray-unicos + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3D:*:*:*) + echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY-2:*:*:*) + echo cray2-cray-unicos + exit 0 ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i386-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux + exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + mips:Linux:*:*) + case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in + big) echo mips-unknown-linux-gnu && exit 0 ;; + little) echo mipsel-unknown-linux-gnu && exit 0 ;; + esac + ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit 0 ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev67 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit 0 ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + ld_supported_targets=`cd /; ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit 0 ;; + esac + # Determine whether the default compiler is a.out or elf + cat >$dummy.c < +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif +#ifdef __ELF__ +# ifdef __GLIBC__ +# if __GLIBC__ >= 2 + printf ("%s-pc-linux-gnu\n", argv[1]); +# else + printf ("%s-pc-linux-gnulibc1\n", argv[1]); +# endif +# else + printf ("%s-pc-linux-gnulibc1\n", argv[1]); +# endif +#else + printf ("%s-pc-linux-gnuaout\n", argv[1]); +#endif + return 0; +} +EOF + eval $set_cc_for_build + $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0 + rm -f $dummy.c $dummy + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit 0 ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit 0 ;; + i*86:*:5:[78]*) + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit 0 ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')` + (/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:CPunix:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + echo `uname -p`-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + if test "${UNAME_MACHINE}" = "x86pc"; then + UNAME_MACHINE=pc + fi + echo `uname -p`-${UNAME_MACHINE}-nto-qnx + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-[KW]:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +eval $set_cc_for_build +$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0 +rm -f $dummy.c $dummy + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config/config.sub b/config/config.sub new file mode 100755 index 0000000..578b302 --- /dev/null +++ b/config/config.sub @@ -0,0 +1,1375 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. + +timestamp='2001-06-08' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file 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 2 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. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Please send patches to . +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + tahoe | i860 | ia64 | m32r | m68k | m68000 | m88k | ns32k | arc \ + | arm | arme[lb] | arm[bl]e | armv[2345] | armv[345][lb] | strongarm | xscale \ + | pyramid | mn10200 | mn10300 | tron | a29k \ + | 580 | i960 | h8300 \ + | x86 | ppcbe | mipsbe | mipsle | shbe | shle \ + | hppa | hppa1.0 | hppa1.1 | hppa2.0 | hppa2.0w | hppa2.0n \ + | hppa64 \ + | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] \ + | alphaev6[78] \ + | we32k | ns16k | clipper | i370 | sh | sh[34] \ + | powerpc | powerpcle \ + | 1750a | dsp16xx | pdp10 | pdp11 \ + | mips16 | mips64 | mipsel | mips64el \ + | mips64orion | mips64orionel | mipstx39 | mipstx39el \ + | mips64vr4300 | mips64vr4300el | mips64vr4100 | mips64vr4100el \ + | mips64vr5000 | mips64vr5000el | mcore | s390 | s390x \ + | sparc | sparclet | sparclite | sparc64 | sparcv9 | sparcv9b \ + | v850 | c4x \ + | thumb | d10v | d30v | fr30 | avr | openrisc | tic80 \ + | pj | pjl | h8500 | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + # FIXME: clean up the formatting here. + vax-* | tahoe-* | i*86-* | i860-* | ia64-* | m32r-* | m68k-* | m68000-* \ + | m88k-* | sparc-* | ns32k-* | fx80-* | arc-* | c[123]* \ + | arm-* | armbe-* | armle-* | armv*-* | strongarm-* | xscale-* \ + | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \ + | power-* | none-* | 580-* | cray2-* | h8300-* | h8500-* | i960-* \ + | xmp-* | ymp-* \ + | x86-* | ppcbe-* | mipsbe-* | mipsle-* | shbe-* | shle-* \ + | hppa-* | hppa1.0-* | hppa1.1-* | hppa2.0-* | hppa2.0w-* \ + | hppa2.0n-* | hppa64-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphapca5[67]-* \ + | alphaev6[78]-* \ + | we32k-* | cydra-* | ns16k-* | pn-* | np1-* | xps100-* \ + | clipper-* | orion-* \ + | sparclite-* | pdp10-* | pdp11-* | sh-* | sh[34]-* | sh[34]eb-* \ + | powerpc-* | powerpcle-* | sparc64-* | sparcv9-* | sparcv9b-* | sparc86x-* \ + | mips16-* | mips64-* | mipsel-* \ + | mips64el-* | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* | mips64vr4300-* | mips64vr4300el-* \ + | mipstx39-* | mipstx39el-* | mcore-* \ + | f30[01]-* | f700-* | s390-* | s390x-* | sv1-* | t3e-* \ + | [cjt]90-* \ + | m88110-* | m680[01234]0-* | m683?2-* | m68360-* | z8k-* | d10v-* \ + | thumb-* | v850-* | d30v-* | tic30-* | tic80-* | c30-* | fr30-* \ + | bs2000-* | tic54x-* | c54x-* | x86_64-* | pj-* | pjl-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | ymp) + basic_machine=ymp-cray + os=-unicos + ;; + cray2) + basic_machine=cray2-cray + os=-unicos + ;; + [cjt]90) + basic_machine=${basic_machine}-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mipsel*-linux*) + basic_machine=mipsel-unknown + os=-linux-gnu + ;; + mips*-linux*) + basic_machine=mips-unknown + os=-linux-gnu + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexgen) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon) + basic_machine=i686-pc + ;; + pentiumii | pentium2) + basic_machine=i686-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sparclite-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=t3e-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + windows32) + basic_machine=i386-pc + os=-windows32-msvcrt + ;; + xmp) + basic_machine=xmp-cray + os=-unicos + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + mips) + if [ x$os = x-linux-gnu ]; then + basic_machine=mips-unknown + else + basic_machine=mips-mips + fi + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh3 | sh4) + basic_machine=sh-unknown + ;; + sparc | sparcv9 | sparcv9b) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + c4x*) + basic_machine=c4x-none + os=-coff + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* | -os2*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto*) + os=-nto-qnx + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -vxsim* | -vxworks*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/config/install-sh b/config/install-sh new file mode 100755 index 0000000..398a88e --- /dev/null +++ b/config/install-sh @@ -0,0 +1,251 @@ +#!/bin/sh +# +# install - install a program, script, or datafile +# This comes from X11R5 (mit/util/scripts/install.sh). +# +# Copyright 1991 by the Massachusetts Institute of Technology +# +# Permission to use, copy, modify, distribute, and sell this software and its +# documentation for any purpose is hereby granted without fee, provided that +# the above copyright notice appear in all copies and that both that +# copyright notice and this permission notice appear in supporting +# documentation, and that the name of M.I.T. not be used in advertising or +# publicity pertaining to distribution of the software without specific, +# written prior permission. M.I.T. makes no representations about the +# suitability of this software for any purpose. It is provided "as is" +# without express or implied warranty. +# +# Calling this script install-sh is preferred over install.sh, to prevent +# `make' implicit rules from creating a file called install from it +# when there is no Makefile. +# +# This script is compatible with the BSD install script, but was written +# from scratch. It can only install one file at a time, a restriction +# shared with many OS's install programs. + + +# set DOITPROG to echo to test this script + +# Don't use :- since 4.3BSD and earlier shells don't like it. +doit="${DOITPROG-}" + + +# put in absolute paths if you don't have them in your path; or use env. vars. + +mvprog="${MVPROG-mv}" +cpprog="${CPPROG-cp}" +chmodprog="${CHMODPROG-chmod}" +chownprog="${CHOWNPROG-chown}" +chgrpprog="${CHGRPPROG-chgrp}" +stripprog="${STRIPPROG-strip}" +rmprog="${RMPROG-rm}" +mkdirprog="${MKDIRPROG-mkdir}" + +transformbasename="" +transform_arg="" +instcmd="$mvprog" +chmodcmd="$chmodprog 0755" +chowncmd="" +chgrpcmd="" +stripcmd="" +rmcmd="$rmprog -f" +mvcmd="$mvprog" +src="" +dst="" +dir_arg="" + +while [ x"$1" != x ]; do + case $1 in + -c) instcmd="$cpprog" + shift + continue;; + + -d) dir_arg=true + shift + continue;; + + -m) chmodcmd="$chmodprog $2" + shift + shift + continue;; + + -o) chowncmd="$chownprog $2" + shift + shift + continue;; + + -g) chgrpcmd="$chgrpprog $2" + shift + shift + continue;; + + -s) stripcmd="$stripprog" + shift + continue;; + + -t=*) transformarg=`echo $1 | sed 's/-t=//'` + shift + continue;; + + -b=*) transformbasename=`echo $1 | sed 's/-b=//'` + shift + continue;; + + *) if [ x"$src" = x ] + then + src=$1 + else + # this colon is to work around a 386BSD /bin/sh bug + : + dst=$1 + fi + shift + continue;; + esac +done + +if [ x"$src" = x ] +then + echo "install: no input file specified" + exit 1 +else + : +fi + +if [ x"$dir_arg" != x ]; then + dst=$src + src="" + + if [ -d $dst ]; then + instcmd=: + chmodcmd="" + else + instcmd=$mkdirprog + fi +else + +# Waiting for this to be detected by the "$instcmd $src $dsttmp" command +# might cause directories to be created, which would be especially bad +# if $src (and thus $dsttmp) contains '*'. + + if [ -f $src -o -d $src ] + then + : + else + echo "install: $src does not exist" + exit 1 + fi + + if [ x"$dst" = x ] + then + echo "install: no destination specified" + exit 1 + else + : + fi + +# If destination is a directory, append the input filename; if your system +# does not like double slashes in filenames, you may need to add some logic + + if [ -d $dst ] + then + dst="$dst"/`basename $src` + else + : + fi +fi + +## this sed command emulates the dirname command +dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` + +# Make sure that the destination directory exists. +# this part is taken from Noah Friedman's mkinstalldirs script + +# Skip lots of stat calls in the usual case. +if [ ! -d "$dstdir" ]; then +defaultIFS=' + ' +IFS="${IFS-${defaultIFS}}" + +oIFS="${IFS}" +# Some sh's can't handle IFS=/ for some reason. +IFS='%' +set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` +IFS="${oIFS}" + +pathcomp='' + +while [ $# -ne 0 ] ; do + pathcomp="${pathcomp}${1}" + shift + + if [ ! -d "${pathcomp}" ] ; + then + $mkdirprog "${pathcomp}" + else + : + fi + + pathcomp="${pathcomp}/" +done +fi + +if [ x"$dir_arg" != x ] +then + $doit $instcmd $dst && + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else : ; fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else : ; fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else : ; fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else : ; fi +else + +# If we're going to rename the final executable, determine the name now. + + if [ x"$transformarg" = x ] + then + dstfile=`basename $dst` + else + dstfile=`basename $dst $transformbasename | + sed $transformarg`$transformbasename + fi + +# don't allow the sed command to completely eliminate the filename + + if [ x"$dstfile" = x ] + then + dstfile=`basename $dst` + else + : + fi + +# Make a temp file name in the proper directory. + + dsttmp=$dstdir/#inst.$$# + +# Move or copy the file name to the temp name + + $doit $instcmd $src $dsttmp && + + trap "rm -f ${dsttmp}" 0 && + +# and set any options; do chmod last to preserve setuid bits + +# If any of these fail, we abort the whole thing. If we want to +# ignore errors from any of these, just make sure not to ignore +# errors from the above "$doit $instcmd $src $dsttmp" command. + + if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else :;fi && + if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else :;fi && + if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else :;fi && + if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else :;fi && + +# Now rename the file to the real destination. + + $doit $rmcmd -f $dstdir/$dstfile && + $doit $mvcmd $dsttmp $dstdir/$dstfile + +fi && + + +exit 0 diff --git a/configure.in b/configure.in new file mode 100644 index 0000000..87ea315 --- /dev/null +++ b/configure.in @@ -0,0 +1,528 @@ +dnl +dnl Makefile for the GNOKII tool suite. +dnl +dnl Copyright (C) 1999 Hugh Blemings & Pavel Janík ml. +dnl 2000 Karel Zak, Pawe³ Kot +dnl +dnl $Id$ +dnl + +AC_INIT(gnokii/gnokii.c) + +AC_CONFIG_AUX_DIR(config) + +AC_CANONICAL_SYSTEM +AC_PREFIX_DEFAULT("/usr/local") + +dnl ======================== Default setting +CFLAGS="-O2 -Wall" +ALL_LINGUAS="cs de et fi nl sk pl it" + +dnl ======================== Checks for programs. +AC_PROG_CC +AC_PROG_CPP +AC_PROG_LEX +AC_PATH_PROG(RM, rm, no) +AC_PATH_PROG(FIND, find, no) +AC_CHECK_PROGS(MAKE, gmake make) +AC_PROG_INSTALL + +dnl Let us have $prefix variable aviable here +test x"$prefix" = xNONE && prefix="$ac_default_prefix" + +AC_ARG_ENABLE(debug, + [ --enable-debug compile with debug code], + [ CFLAGS="-g -Wall" + AC_DEFINE(DEBUG) + debug="yes" ], + [ debug="no" ] +) + +AC_ARG_ENABLE(xdebug, + [ --enable-xdebug compile with xdebug code], + [ AC_DEFINE(XDEBUG) + xdebug="yes" ], + [ xdebug="no" ] +) + +AC_ARG_ENABLE(rlpdebug, + [ --enable-rlpdebug compile with RLP debug code], + [ AC_DEFINE(RLP_DEBUG) + rlpdebug="yes" ], + [ rlpdebug="no" ] +) + +dnl ======================== NLS support + +LIBS="" +NLS_LIBS="" +NLS_CFLAGS="" + +AC_ARG_WITH(libintl, + [ --with-libintl=DIR specifies the base NLS], + [ if test "x$withval" = "xyes"; then + AC_MSG_WARN(Usage is --with-libintl=DIR) + else + NLS_LIBS="-L$withval/lib" + NLS_CFLAGS="-I$withval/include" + fi + ] +) + +AC_ARG_ENABLE(nls, + [ --disable-nls do not use NLS], + [ USE_NLS=$enableval ], + [ USE_NLS=yes ] +) + +if test "$USE_NLS" = "yes"; then + AC_PROG_MAKE_SET + AC_CHECK_HEADERS(locale.h) + AC_CHECK_FUNCS(setlocale) + AC_SUBST(HAVE_LOCALE_H) + + CPPFLAGS="$CPPFLAGS $NLS_CFLAGS" + AC_TRY_CPP([#include ], + [ AC_DEFINE(HAVE_LIBINTL_H) + AC_MSG_RESULT([checking for libintl.h... yes]) ], + [ AC_MSG_WARN(not found header file: libintl.h !!!) + USE_NLS=no ] + ) +fi + +if test "$USE_NLS" = "yes"; then + AC_CHECK_FUNC(gettext, + AC_DEFINE(HAVE_LIBINTL), + AC_CHECK_LIB(intl, gettext, + [ NLS_LIBS="$NLS_LIBS -lintl" + AC_DEFINE(HAVE_LIBINTL) ], + [ AC_MSG_WARN(not found library: intl !!!) + USE_NLS=no ], + $NLS_LIBS + ) + ) +fi + +if test "$USE_NLS" = "yes"; then + + AC_SUBST(HAVE_LIBINTL_H) + AC_SUBST(HAVE_LIBINTL) + + dnl Handle localedir + LOCALEDIR='${prefix}/share/locale' + AC_ARG_WITH(locale-dir, + [ --with-locale-dir=DIR Location of the locale file(s) + [PREFIX/share/locale]], + [ if test x$withval = xyes; then + AC_MSG_WARN(Usage is: --with-locale-dir=basedir) + else + if test x$withval = xno; then + AC_MSG_WARN(Usage is: --with-locale-dir=basedir) + else + LOCALEDIR=$withval + fi + fi + ] + ) + AC_SUBST(LOCALEDIR) + + AC_PATH_PROG(MSGFMT, msgfmt, $MSGFMT) + if test -n "$MSGFMT"; then + AC_CHECK_FUNCS(dcgettext) + AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) + AC_PATH_PROG(XGETTEXT, xgettext, $XGETTEXT) + AC_PATH_PROG(MSGMERGE, msgmerge, $MSGMERGE) + + dnl Test whether we really found GNU xgettext. + if test -n "$XGETTEXT"; then + if $XGETTEXT --omit-header /dev/null 2> /dev/null; then + : ; + else + AC_MSG_RESULT([found xgettext program is not GNU xgettext; ignore it]) + XGETTEXT="" + fi + fi + + dnl We add another test for comparing GNU xgettext with openwin xgettext + if test -n "$XGETTEXT"; then + if $XGETTEXT --help > /dev/null 2> /dev/null; then + : ; + else + AC_MSG_RESULT([found xgettext program is not GNU xgettext; ignore it]) + XGETTEXT="" + fi + fi + + dnl Test whether we really found GNU msgfmt. + if test -n "$MSGFMT"; then + if $MSGFMT < /dev/null 2> /dev/null; then + AC_MSG_RESULT([found msgfmt program is not GNU msgfmt; NLS will not be installed]) + MSGFMT="" + fi + fi + + AC_TRY_LINK(, + [ extern int _nl_msg_cat_cntr; + return _nl_msg_cat_cntr], + [ CATOBJEXT=.gmo + DATADIRNAME=share], + [ CATOBJEXT=.mo + DATADIRNAME=lib] + ) + INSTOBJEXT=.mo + fi + + if test -n "$ALL_LINGUAS"; then + for lang in $ALL_LINGUAS; do + CATALOGS="$CATALOGS $lang$CATOBJEXT" + done + fi + AC_SUBST(CATALOGS) + AC_SUBST(CATOBJEXT) + AC_SUBST(INSTOBJEXT) + AC_SUBST(DATADIRNAME) +fi + +dnl don't use NLS, when there is no gettext installed +if test x"$MSGFMT" = x; then + USE_NLS=no +fi + +if test x"$USE_NLS" = xyes; then + AC_DEFINE(USE_NLS) +fi + +dnl ======================== Checks for libraries. + +AC_ARG_WITH(libpthread, + [ --with-libpthread=DIR specifies the base libpthread], + [ if test x$withval = xyes + then + AC_MSG_WARN(Usage is: --with-libpthread=DIR) + else + PTHREAD_LIBS="-L$withval/lib/" + PTHREAD_CFLAGS="-I$withval/include/" + fi + ] +) + +dnl Check for libpthread +PTHREAD_LIBS_SAVE="$PTHREAD_LIBS" +PTHREAD_LIBS=error +AC_CHECK_LIB(pthread, pthread_attr_init, [ + PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_REENTRANT" + PTHREAD_LIBS="$PTHREAD_LIBS_SAVE -lpthread" ]) + +dnl FIXME: test this on *BSD and report results immediatelly to the ml please +dnl If it is not found, try to check for c_r (on FreeBSD) +if test "x$PTHREAD_LIBS" = xerror; then + AC_CHECK_LIB(c_r, pthread_attr_init, [ + PTHREAD_CFLAGS="$PTHREAD_CFLAGS -D_THREAD_SAFE" + PTHREAD_LIBS="-pthread" ]) +fi + +dnl FIXME: do we really test here if libc contains this function? +if test "x$PTHREAD_LIBS" = xerror; then + AC_CHECK_FUNC(pthread_attr_init, PTHREAD_LIBS="", + AC_MSG_ERROR(not found library: pthread !!!)) +fi + +dnl The following is taken from inn sources +AC_MSG_CHECKING(for tm_gmtoff in struct tm) +AC_TRY_LINK([#include ], + [struct tm t; t.tm_gmtoff = 0], + [AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_TM_GMTON)], + [AC_MSG_RESULT(no)]) + +dnl The following is taken from inn sources +AC_MSG_CHECKING(for timersub) +AC_TRY_LINK([#include ], + [timersub(NULL, NULL, NULL)], + [AC_DEFINE(HAVE_TIMEOPS) + AC_DEFINE(HAVE_TIMEOPS) + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)]) + +have_termios="no" +dnl Checking for setspeed in termios.h +AC_MSG_CHECKING(for cfsetspeed in termios.h) +AC_TRY_LINK([#include ], + [struct termios t; cfsetspeed(&t, B9600);], + [AC_DEFINE(HAVE_CFSETSPEED) + have_termios="yes" + AC_MSG_RESULT(yes)], + AC_MSG_RESULT(no)) + +if test $have_termios = "no"; then + AC_MSG_CHECKING(for cfsetispeed and cfsetospeed in termios.h) + AC_TRY_LINK([#include ], + [struct termios t; cfsetispeed(&t, B9600); cfsetospeed(&t, B9600);], + [AC_DEFINE(HAVE_CFSETISPEED) + AC_DEFINE(HAVE_CFSETOSPEED) + have_termios="yes" + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)]) + + if test $have_termios = "no"; then + AC_MSG_CHECKING(for c_ispeed and c_ospeed in struct termios) + AC_TRY_LINK([#include ], + [struct termios t; t.c_iflag = B9600; t.c_oflag = B9600;], + [AC_DEFINE(HAVE_TERMIOS_CSPEED) + AC_MSG_RESULT(yes)], + [AC_MSG_RESULT(no)]) + fi +fi + +dnl ======================== Checks for getopt_long support + +AC_CHECK_HEADER(getopt.h, , + [CFLAGS="$CFLAGS -I../getopt"]) + +AC_ARG_WITH(gnugetopt, + [ --with-getopt=DIR specifies the getopt library location directory], + [ if test x$withval=yes; then + AC_MSG_WARN(Usage is: --with-getopt=DIR) + else + GETOPT_LIBS="-L$withval" + fi + ] +) + +OWN_GETOPT="" +AC_CHECK_FUNC(getopt_long, , [ + LIBS="$LIBS $GETOPT_LIBS" + AC_CHECK_LIB(gnugetopt, getopt_long, LIBS="$LIBS -lgnugetopt", + OWN_GETOPT="1")]) + +dnl ======================== Checks for X base support + +if test "$no_x" = yes -o "$with_x" = "no"; then + x_support="no" + XPM_CFLAGS="" + XPM_LIBS="" + GTK_CFLAGS="" + GTK_LIBS="" +else + AC_PATH_X + CPPFLAGS="$CPPFLAGS -I$x_includes" + AC_CHECK_HEADERS(X11/xpm.h, + [ XPMINC="yes" ], + [ XPMINC="no" ]) + + if test "x$XPMINC" = "xno"; then + x_support="no" + XPM_CFLAGS="" + XPM_LIBS="" + GTK_CFLAGS="" + GTK_LIBS="" + AC_MSG_WARN(Cannot find include X11/xpm.h) + AC_MSG_WARN(Disabling xgnokii.) + elif test "x$x_libraries" = "xNONE"; then + x_support="no" + XPM_CFLAGS="" + XPM_LIBS="" + GTK_CFLAGS="" + GTK_LIBS="" + AC_MSG_WARN(Cannot find library libX11.) + AC_MSG_WARN(Disabling xgnokii.) + else + AC_CHECK_LIB(Xpm, XpmWriteFileFromXpmImage, + [ XPM_CFLAGS="-I$x_includes" XPM_LIBS="-L$x_libraries -lXpm -lX11" + AC_DEFINE(XPM) ], + AC_MSG_WARN(Cannot found library libXpm - disabling XPM support.), + [ -L$x_libraries -lX11 ] + ) + + AC_PATH_PROGS(GTK_CONFIG, gtk-config gtk12-config, no) + if test "$GTK_CONFIG" = no; then + x_support="no" + GTK_CFLAGS="" + GTK_LIBS="" + AC_MSG_WARN(Cannot find gtk-config.) + AC_MSG_WARN(Disabling xgnokii.) + else + GTK_CFLAGS=`$GTK_CONFIG --cflags` + GTK_LIBS=`$GTK_CONFIG --libs` + x_support="yes" + + XGNOKIIDIR='${prefix}/share' + XGNOKIIPATH=${prefix}/share + AC_ARG_WITH(xgnokiidir, + [ --with-xgnokiidir=DIR specifies the base for xgnokii], + [ if test x$withval = xyes; then + AC_MSG_WARN(Usage is: --with-xgnokiilib=DIR) + else + XGNOKIIDIR="$withval" + XGNOKIIPATH="$withval" + fi + ] + ) + fi + fi +fi + +dnl ======================== Check for libsocket +AC_CHECK_LIB(socket, socket) + +dnl ======================== Additional switches + +AC_ARG_ENABLE(security, + [ --enable-security enable all security features ], + [ AC_DEFINE(SECURITY) + security="yes" ], + [ security="no" ] +) + +AC_ARG_ENABLE(win32, + [ --enable-win32 if you want win32 suport ], + [ AC_DEFINE(WIN32) + win32="-DWIN32" ], + [ win32=""] +) + +AC_CHECK_FUNC(grantpt, + [ AC_TRY_RUN([ +#define _XOPEN_SOURCE 500 + +#include +#include +#include +#include +#include +#include + +int main() +{ + char *name = NULL; + int master, err; + + master = open("/dev/ptmx", O_RDWR | O_NOCTTY | O_NONBLOCK); + if (master >= 0) { + err = grantpt(master); + err = err || unlockpt(master); + if (!err) { + name = ptsname(master); + } else { + exit(-1); + } + } else { + exit(-1); + } + close(master); + exit(0); +} + ], + AC_DEFINE(USE_UNIX98PTYS), + AC_MSG_WARN("No unix98ptys"), + AC_MSG_WARN("Ensure to disable unix98ptys when crosscompiling")) + ] +) + +dnl ======================== Checks for header files. +AC_HEADER_STDC +AC_HEADER_SYS_WAIT +AC_CHECK_HEADERS(fcntl.h sys/ioctl.h sys/time.h unistd.h) + +dnl ======================== Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_C_INLINE +AC_TYPE_PID_T +AC_TYPE_SIZE_T +AC_HEADER_TIME +AC_STRUCT_TM + +dnl ======================== Checks for library functions. +AC_PROG_GCC_TRADITIONAL +AC_FUNC_MEMCMP +AC_TYPE_SIGNAL +AC_FUNC_STRFTIME +AC_CHECK_FUNCS(mktime select strdup strstr strtol strtok strsep snprintf) + +CFLAGS="$CFLAGS $NLS_CFLAGS" +LIBS="$LIBS $NLS_LIBS" + +PACKAGE=gnokii +XPACKAGE=xgnokii +VERSION=`cat VERSION` +XVERSION=`cat xgnokii/VERSION` +HAVE_XGNOKII=$x_support + +case "$INSTALL" in + 'config/install-sh -c') INSTALL=`pwd`/$INSTALL + ;; +esac + +SHELL=${CONFIG_SHELL-/bin/sh} + +AC_SUBST(SHELL) +case "$build_os" in + solaris*) SHELL=/bin/ksh + ;; +esac + +AC_CONFIG_HEADER(include/config.h) + +AC_SUBST(PACKAGE) +AC_SUBST(VERSION) +AC_SUBST(XVERSION) +AC_SUBST(XPACKAGE) +AC_SUBST(XGNOKIIDIR) +AC_SUBST(XGNOKIIPATH) +AC_SUBST(exec_prefix) +AC_SUBST(USE_NLS) +AC_SUBST(GTK_CFLAGS) +AC_SUBST(GTK_LIBS) +AC_SUBST(PTHREAD_CFLAGS) +AC_SUBST(PTHREAD_LIBS) +AC_SUBST(XPM_CFLAGS) +AC_SUBST(XPM_LIBS) +AC_SUBST(OWN_GETOPT) +AC_SUBST(USE_UNIX98PTYS) +AC_SUBST(HAVE_XGNOKII) + +AC_OUTPUT( + include/config.h.in + Makefile.global + po/Makefile.in + packaging/RedHat/gnokii.spec + packaging/Slackware/SlackBuild, + [sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile] + ) + + +dnl ======================== Final report + +echo " + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999-2000 The Gnokii Development Team. + + 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 2 of the License, or + (at your option) any later version. + + See file COPYING for more details. + + Host system: $host_os + Gnokii version: $VERSION + Xgnokii version: $XVERSION + X (GTK) support: $x_support + Debug: $debug + XDebug: $xdebug + RLPDebug: $rlpdebug + NLS: $USE_NLS + Security: $security + Win32: $win32 + Prefix: $prefix + + Type '${MAKE}' for compilation or '${MAKE} makelib' when want to compile + all binaries with one shared library + + After it '${MAKE} install', '${MAKE} install-suid', '${MAKE} install-strip' + or '${MAKE} install-ss' to install gnokii. +" diff --git a/getopt/Makefile b/getopt/Makefile new file mode 100644 index 0000000..037269d --- /dev/null +++ b/getopt/Makefile @@ -0,0 +1,28 @@ +TOPDIR=.. +include $(TOPDIR)/Makefile.global + +CFLAGS += $(PTHREAD_CFLAGS) +LDFLAGS = + +SRCS = getopt.c getopt1.c +OBJS = getopt.o getopt1.o + +all: libgetopt.a + +libgetopt.a: $(OBJS) + $(AR) cq $@ $(OBJS) + +depend dep: + $(CPP) -M $(CFLAGS) $(SRCS) > depend + +distclean clean:: + $(RM) $(OBJS) *~ depend *.a + +##### +# DO NOT DELETE THIS LINE -- make depend depends on it. + +ifeq (depend,$(wildcard depend)) +include depend +endif + +.PHONY: all clean dep depend diff --git a/getopt/getopt.c b/getopt/getopt.c new file mode 100644 index 0000000..7b4f938 --- /dev/null +++ b/getopt/getopt.c @@ -0,0 +1,753 @@ +/* Getopt for GNU. + NOTE: getopt is now part of the C library, so if you don't know what + "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu + before changing it! + + Copyright (C) 1987, 88, 89, 90, 91, 92, 93, 94 + Free Software Foundation, Inc. + +This file is part of the GNU C Library. Its master source is NOT part of +the C library, however. The master source lives in /gd/gnu/lib. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* This tells Alpha OSF/1 not to define a getopt prototype in . + Ditto for AIX 3.2 and . */ +#ifndef _NO_PROTO +#define _NO_PROTO +#endif + +#ifdef HAVE_CONFIG_H +#include +#endif + +#if !defined (__STDC__) || !__STDC__ +/* This is a separate conditional since some stdc systems + reject `defined (const)'. */ +#ifndef const +#define const +#endif +#endif + +#include +#include + +/* Comment out all this code if we are using the GNU C Library, and are not + actually compiling the library itself. This code is part of the GNU C + Library, but also included in many other GNU distributions. Compiling + and linking in this code is a waste when using the GNU C library + (especially if it is a shared library). Rather than having every GNU + program understand `configure --with-gnu-libc' and omit the object files, + it is simpler to just do this in the source for each such file. */ + +#if defined (_LIBC) || !defined (__GNU_LIBRARY__) + + +/* This needs to come after some library #include + to get __GNU_LIBRARY__ defined. */ +#ifdef __GNU_LIBRARY__ +/* Don't include stdlib.h for non-GNU C libraries because some of them + contain conflicting prototypes for getopt. */ +#include +#endif /* GNU C library. */ + +/* This version of `getopt' appears to the caller like standard Unix `getopt' + but it behaves differently for the user, since it allows the user + to intersperse the options with the other arguments. + + As `getopt' works, it permutes the elements of ARGV so that, + when it is done, all the options precede everything else. Thus + all application programs are extended to handle flexible argument order. + + Setting the environment variable POSIXLY_CORRECT disables permutation. + Then the behavior is completely standard. + + GNU application programs can use a third alternative mode in which + they can distinguish the relative order of options and other arguments. */ + +#include "getopt.h" + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +char *optarg = NULL; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns EOF, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +/* XXX 1003.2 says this must be 1 before any call. */ +int optind = 0; + +/* The next char to be scanned in the option-element + in which the last option character we returned was found. + This allows us to pick up the scan where we left off. + + If this is zero, or a null string, it means resume the scan + by advancing to the next ARGV-element. */ + +static char *nextchar; + +/* Callers store zero here to inhibit the error message + for unrecognized options. */ + +int opterr = 1; + +/* Set to an option character which was unrecognized. + This must be initialized on some systems to avoid linking in the + system's own getopt implementation. */ + +int optopt = '?'; + +/* Describe how to deal with options that follow non-option ARGV-elements. + + If the caller did not specify anything, + the default is REQUIRE_ORDER if the environment variable + POSIXLY_CORRECT is defined, PERMUTE otherwise. + + REQUIRE_ORDER means don't recognize them as options; + stop option processing when the first non-option is seen. + This is what Unix does. + This mode of operation is selected by either setting the environment + variable POSIXLY_CORRECT, or using `+' as the first character + of the list of option characters. + + PERMUTE is the default. We permute the contents of ARGV as we scan, + so that eventually all the non-options are at the end. This allows options + to be given in any order, even with programs that were not written to + expect this. + + RETURN_IN_ORDER is an option available to programs that were written + to expect options and other ARGV-elements in any order and that care about + the ordering of the two. We describe each non-option ARGV-element + as if it were the argument of an option with character code 1. + Using `-' as the first character of the list of option characters + selects this mode of operation. + + The special argument `--' forces an end of option-scanning regardless + of the value of `ordering'. In the case of RETURN_IN_ORDER, only + `--' can cause `getopt' to return EOF with `optind' != ARGC. */ + +static enum +{ + REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER +} ordering; + +/* Value of POSIXLY_CORRECT environment variable. */ +static char *posixly_correct; + +#ifdef __GNU_LIBRARY__ +/* We want to avoid inclusion of string.h with non-GNU libraries + because there are many ways it can cause trouble. + On some systems, it contains special magic macros that don't work + in GCC. */ +#include +#define my_index strchr +#else + +/* Avoid depending on library functions or files + whose names are inconsistent. */ + +char *getenv (); + +static char * +my_index (str, chr) + const char *str; + int chr; +{ + while (*str) + { + if (*str == chr) + return (char *) str; + str++; + } + return 0; +} + +/* If using GCC, we can safely declare strlen this way. + If not using GCC, it is ok not to declare it. */ +#ifdef __GNUC__ +/* Note that Motorola Delta 68k R3V7 comes with GCC but not stddef.h. + That was relevant to code that was here before. */ +#if !defined (__STDC__) || !__STDC__ +/* gcc with -traditional declares the built-in strlen to return int, + and has done so at least since version 2.4.5. -- rms. */ +extern int strlen (const char *); +#endif /* not __STDC__ */ +#endif /* __GNUC__ */ + +#endif /* not __GNU_LIBRARY__ */ + +/* Handle permutation of arguments. */ + +/* Describe the part of ARGV that contains non-options that have + been skipped. `first_nonopt' is the index in ARGV of the first of them; + `last_nonopt' is the index after the last of them. */ + +static int first_nonopt; +static int last_nonopt; + +/* Exchange two adjacent subsequences of ARGV. + One subsequence is elements [first_nonopt,last_nonopt) + which contains all the non-options that have been skipped so far. + The other is elements [last_nonopt,optind), which contains all + the options processed since those non-options were skipped. + + `first_nonopt' and `last_nonopt' are relocated so that they describe + the new indices of the non-options in ARGV after they are moved. */ + +static void +exchange (argv) + char **argv; +{ + int bottom = first_nonopt; + int middle = last_nonopt; + int top = optind; + char *tem; + + /* Exchange the shorter segment with the far end of the longer segment. + That puts the shorter segment into the right place. + It leaves the longer segment in the right place overall, + but it consists of two parts that need to be swapped next. */ + + while (top > middle && middle > bottom) + { + if (top - middle > middle - bottom) + { + /* Bottom segment is the short one. */ + int len = middle - bottom; + register int i; + + /* Swap it with the top part of the top segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[top - (middle - bottom) + i]; + argv[top - (middle - bottom) + i] = tem; + } + /* Exclude the moved bottom segment from further swapping. */ + top -= len; + } + else + { + /* Top segment is the short one. */ + int len = top - middle; + register int i; + + /* Swap it with the bottom part of the bottom segment. */ + for (i = 0; i < len; i++) + { + tem = argv[bottom + i]; + argv[bottom + i] = argv[middle + i]; + argv[middle + i] = tem; + } + /* Exclude the moved top segment from further swapping. */ + bottom += len; + } + } + + /* Update records for the slots the non-options now occupy. */ + + first_nonopt += (optind - last_nonopt); + last_nonopt = optind; +} + +/* Initialize the internal data when the first call is made. */ + +static const char * +_getopt_initialize (optstring) + const char *optstring; +{ + /* Start processing options with ARGV-element 1 (since ARGV-element 0 + is the program name); the sequence of previously skipped + non-option ARGV-elements is empty. */ + + first_nonopt = last_nonopt = optind = 1; + + nextchar = NULL; + + posixly_correct = getenv ("POSIXLY_CORRECT"); + + /* Determine how to handle the ordering of options and nonoptions. */ + + if (optstring[0] == '-') + { + ordering = RETURN_IN_ORDER; + ++optstring; + } + else if (optstring[0] == '+') + { + ordering = REQUIRE_ORDER; + ++optstring; + } + else if (posixly_correct != NULL) + ordering = REQUIRE_ORDER; + else + ordering = PERMUTE; + + return optstring; +} + +/* Scan elements of ARGV (whose length is ARGC) for option characters + given in OPTSTRING. + + If an element of ARGV starts with '-', and is not exactly "-" or "--", + then it is an option element. The characters of this element + (aside from the initial '-') are option characters. If `getopt' + is called repeatedly, it returns successively each of the option characters + from each of the option elements. + + If `getopt' finds another option character, it returns that character, + updating `optind' and `nextchar' so that the next call to `getopt' can + resume the scan with the following option character or ARGV-element. + + If there are no more option characters, `getopt' returns `EOF'. + Then `optind' is the index in ARGV of the first ARGV-element + that is not an option. (The ARGV-elements have been permuted + so that those that are not options now come last.) + + OPTSTRING is a string containing the legitimate option characters. + If an option character is seen that is not listed in OPTSTRING, + return '?' after printing an error message. If you set `opterr' to + zero, the error message is suppressed but we still return '?'. + + If a char in OPTSTRING is followed by a colon, that means it wants an arg, + so the following text in the same ARGV-element, or the text of the following + ARGV-element, is returned in `optarg'. Two colons mean an option that + wants an optional arg; if there is text in the current ARGV-element, + it is returned in `optarg', otherwise `optarg' is set to zero. + + If OPTSTRING starts with `-' or `+', it requests different methods of + handling the non-option ARGV-elements. + See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. + + Long-named options begin with `--' instead of `-'. + Their names may be abbreviated as long as the abbreviation is unique + or is an exact match for some defined option. If they have an + argument, it follows the option name in the same ARGV-element, separated + from the option name by a `=', or else the in next ARGV-element. + When `getopt' finds a long-named option, it returns 0 if that option's + `flag' field is nonzero, the value of the option's `val' field + if the `flag' field is zero. + + The elements of ARGV aren't really const, because we permute them. + But we pretend they're const in the prototype to be compatible + with other systems. + + LONGOPTS is a vector of `struct option' terminated by an + element containing a name which is zero. + + LONGIND returns the index in LONGOPT of the long-named option found. + It is only valid when a long-named option has been found by the most + recent call. + + If LONG_ONLY is nonzero, '-' as well as '--' can introduce + long-named options. */ + +int +_getopt_internal (argc, argv, optstring, longopts, longind, long_only) + int argc; + char *const *argv; + const char *optstring; + const struct option *longopts; + int *longind; + int long_only; +{ + optarg = NULL; + + if (optind == 0) + optstring = _getopt_initialize (optstring); + + if (nextchar == NULL || *nextchar == '\0') + { + /* Advance to the next ARGV-element. */ + + if (ordering == PERMUTE) + { + /* If we have just processed some options following some non-options, + exchange them so that the options come first. */ + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange ((char **) argv); + else if (last_nonopt != optind) + first_nonopt = optind; + + /* Skip any additional non-options + and extend the range of non-options previously skipped. */ + + while (optind < argc + && (argv[optind][0] != '-' || argv[optind][1] == '\0')) + optind++; + last_nonopt = optind; + } + + /* The special ARGV-element `--' means premature end of options. + Skip it like a null option, + then exchange with previous non-options as if it were an option, + then skip everything else like a non-option. */ + + if (optind != argc && !strcmp (argv[optind], "--")) + { + optind++; + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange ((char **) argv); + else if (first_nonopt == last_nonopt) + first_nonopt = optind; + last_nonopt = argc; + + optind = argc; + } + + /* If we have done all the ARGV-elements, stop the scan + and back over any non-options that we skipped and permuted. */ + + if (optind == argc) + { + /* Set the next-arg-index to point at the non-options + that we previously skipped, so the caller will digest them. */ + if (first_nonopt != last_nonopt) + optind = first_nonopt; + return EOF; + } + + /* If we have come to a non-option and did not permute it, + either stop the scan or describe it to the caller and pass it by. */ + + if ((argv[optind][0] != '-' || argv[optind][1] == '\0')) + { + if (ordering == REQUIRE_ORDER) + return EOF; + optarg = argv[optind++]; + return 1; + } + + /* We have found another option-ARGV-element. + Skip the initial punctuation. */ + + nextchar = (argv[optind] + 1 + + (longopts != NULL && argv[optind][1] == '-')); + } + + /* Decode the current option-ARGV-element. */ + + /* Check whether the ARGV-element is a long option. + + If long_only and the ARGV-element has the form "-f", where f is + a valid short option, don't consider it an abbreviated form of + a long option that starts with f. Otherwise there would be no + way to give the -f short option. + + On the other hand, if there's a long option "fubar" and + the ARGV-element is "-fu", do consider that an abbreviation of + the long option, just like "--fu", and not "-f" with arg "u". + + This distinction seems to be the most useful approach. */ + + if (longopts != NULL + && (argv[optind][1] == '-' + || (long_only && (argv[optind][2] || !my_index (optstring, argv[optind][1]))))) + { + char *nameend; + const struct option *p; + const struct option *pfound = NULL; + int exact = 0; + int ambig = 0; + int indfound = 0; + int option_index; + + for (nameend = nextchar; *nameend && *nameend != '='; nameend++) + /* Do nothing. */ ; + + /* Test all long options for either exact match + or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; p++, option_index++) + if (!strncmp (p->name, nextchar, nameend - nextchar)) + { + if (nameend - nextchar == strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else + /* Second or later nonexact match found. */ + ambig = 1; + } + + if (ambig && !exact) + { + if (opterr) + fprintf (stderr, "%s: option `%s' is ambiguous\n", + argv[0], argv[optind]); + nextchar += strlen (nextchar); + optind++; + return '?'; + } + + if (pfound != NULL) + { + option_index = indfound; + optind++; + if (*nameend) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + optarg = nameend + 1; + else + { + if (opterr) + { + if (argv[optind - 1][1] == '-') + /* --option */ + fprintf (stderr, + "%s: option `--%s' doesn't allow an argument\n", + argv[0], pfound->name); + else + /* +option or -option */ + fprintf (stderr, + "%s: option `%c%s' doesn't allow an argument\n", + argv[0], argv[optind - 1][0], pfound->name); + } + nextchar += strlen (nextchar); + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (optind < argc) + optarg = argv[optind++]; + else + { + if (opterr) + fprintf (stderr, "%s: option `%s' requires an argument\n", + argv[0], argv[optind - 1]); + nextchar += strlen (nextchar); + return optstring[0] == ':' ? ':' : '?'; + } + } + nextchar += strlen (nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + + /* Can't find it as a long option. If this is not getopt_long_only, + or the option starts with '--' or is not a valid short + option, then it's an error. + Otherwise interpret it as a short option. */ + if (!long_only || argv[optind][1] == '-' + || my_index (optstring, *nextchar) == NULL) + { + if (opterr) + { + if (argv[optind][1] == '-') + /* --option */ + fprintf (stderr, "%s: unrecognized option `--%s'\n", + argv[0], nextchar); + else + /* +option or -option */ + fprintf (stderr, "%s: unrecognized option `%c%s'\n", + argv[0], argv[optind][0], nextchar); + } + nextchar = (char *) ""; + optind++; + return '?'; + } + } + + /* Look at and handle the next short option-character. */ + + { + char c = *nextchar++; + char *temp = my_index (optstring, c); + + /* Increment `optind' when we start to process its last character. */ + if (*nextchar == '\0') + ++optind; + + if (temp == NULL || c == ':') + { + if (opterr) + { + if (posixly_correct) + /* 1003.2 specifies the format of this message. */ + fprintf (stderr, "%s: illegal option -- %c\n", argv[0], c); + else + fprintf (stderr, "%s: invalid option -- %c\n", argv[0], c); + } + optopt = c; + return '?'; + } + if (temp[1] == ':') + { + if (temp[2] == ':') + { + /* This is an option that accepts an argument optionally. */ + if (*nextchar != '\0') + { + optarg = nextchar; + optind++; + } + else + optarg = NULL; + nextchar = NULL; + } + else + { + /* This is an option that requires an argument. */ + if (*nextchar != '\0') + { + optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + optind++; + } + else if (optind == argc) + { + if (opterr) + { + /* 1003.2 specifies the format of this message. */ + fprintf (stderr, "%s: option requires an argument -- %c\n", + argv[0], c); + } + optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = '?'; + } + else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + optarg = argv[optind++]; + nextchar = NULL; + } + } + return c; + } +} + +int +getopt (argc, argv, optstring) + int argc; + char *const *argv; + const char *optstring; +{ + return _getopt_internal (argc, argv, optstring, + (const struct option *) 0, + (int *) 0, + 0); +} + +#endif /* _LIBC or not __GNU_LIBRARY__. */ + +#ifdef TEST + +/* Compile with -DTEST to make an executable for use in testing + the above definition of `getopt'. */ + +int +main (argc, argv) + int argc; + char **argv; +{ + int c; + int digit_optind = 0; + + while (1) + { + int this_option_optind = optind ? optind : 1; + + c = getopt (argc, argv, "abc:d:0123456789"); + if (c == EOF) + break; + + switch (c) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf ("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf ("option %c\n", c); + break; + + case 'a': + printf ("option a\n"); + break; + + case 'b': + printf ("option b\n"); + break; + + case 'c': + printf ("option c with value `%s'\n", optarg); + break; + + case '?': + break; + + default: + printf ("?? getopt returned character code 0%o ??\n", c); + } + } + + if (optind < argc) + { + printf ("non-option ARGV-elements: "); + while (optind < argc) + printf ("%s ", argv[optind++]); + printf ("\n"); + } + + exit (0); +} + +#endif /* TEST */ diff --git a/getopt/getopt.h b/getopt/getopt.h new file mode 100644 index 0000000..f3696d9 --- /dev/null +++ b/getopt/getopt.h @@ -0,0 +1,133 @@ +/* Declarations for getopt. + Copyright (C) 1989, 90, 91, 92, 93, 94 Free Software Foundation, Inc. + +This file is part of the GNU C Library. Its master source is NOT part of +the C library, however. The master source lives in /gd/gnu/lib. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef _GETOPT_H +#define _GETOPT_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +extern char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns EOF, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +extern int optind; + +/* Callers store zero here to inhibit the error message `getopt' prints + for unrecognized options. */ + +extern int opterr; + +/* Set to an option character which was unrecognized. */ + +extern int optopt; + +/* Describe the long-named options requested by the application. + The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector + of `struct option' terminated by an element containing a name which is + zero. + + The field `has_arg' is: + no_argument (or 0) if the option does not take an argument, + required_argument (or 1) if the option requires an argument, + optional_argument (or 2) if the option takes an optional argument. + + If the field `flag' is not NULL, it points to a variable that is set + to the value given in the field `val' when the option is found, but + left unchanged if the option is not found. + + To have a long-named option do something other than set an `int' to + a compiled-in constant, such as set a value from `optarg', set the + option's `flag' field to zero and its `val' field to a nonzero + value (the equivalent single-letter option character, if there is + one). For long options that have a zero `flag' field, `getopt' + returns the contents of the `val' field. */ + +struct option +{ +#if defined (__STDC__) && __STDC__ + const char *name; +#else + char *name; +#endif + /* has_arg can't be an enum because some compilers complain about + type mismatches in all the code that assumes it is an int. */ + int has_arg; + int *flag; + int val; +}; + +/* Names for the values of the `has_arg' field of `struct option'. */ + +#define no_argument 0 +#define required_argument 1 +#define optional_argument 2 + +#if defined (__STDC__) && __STDC__ +#ifdef __GNU_LIBRARY__ +/* Many other libraries have conflicting prototypes for getopt, with + differences in the consts, in stdlib.h. To avoid compilation + errors, only prototype getopt for the GNU C library. */ +extern int getopt (int argc, char *const *argv, const char *shortopts); +#else /* not __GNU_LIBRARY__ */ +extern int getopt (); +#endif /* __GNU_LIBRARY__ */ +extern int getopt_long (int argc, char *const *argv, const char *shortopts, + const struct option *longopts, int *longind); +extern int getopt_long_only (int argc, char *const *argv, + const char *shortopts, + const struct option *longopts, int *longind); + +/* Internal only. Users should not call this directly. */ +extern int _getopt_internal (int argc, char *const *argv, + const char *shortopts, + const struct option *longopts, int *longind, + int long_only); +#else /* not __STDC__ */ +extern int getopt (); +extern int getopt_long (); +extern int getopt_long_only (); + +extern int _getopt_internal (); +#endif /* __STDC__ */ + +#ifdef __cplusplus +} +#endif + +#endif /* _GETOPT_H */ diff --git a/getopt/getopt1.c b/getopt/getopt1.c new file mode 100644 index 0000000..de8e2ad --- /dev/null +++ b/getopt/getopt1.c @@ -0,0 +1,184 @@ +/* getopt_long and getopt_long_only entry points for GNU getopt. + Copyright (C) 1987, 88, 89, 90, 91, 92, 1993, 1994 + Free Software Foundation, Inc. + +This file is part of the GNU C Library. Its master source is NOT part of +the C library, however. The master source lives in /gd/gnu/lib. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library 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 +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifdef HAVE_CONFIG_H +#include +#endif + +#include "getopt.h" + +#if !defined (__STDC__) || !__STDC__ +/* This is a separate conditional since some stdc systems + reject `defined (const)'. */ +#ifndef const +#define const +#endif +#endif + +#include + +/* Comment out all this code if we are using the GNU C Library, and are not + actually compiling the library itself. This code is part of the GNU C + Library, but also included in many other GNU distributions. Compiling + and linking in this code is a waste when using the GNU C library + (especially if it is a shared library). Rather than having every GNU + program understand `configure --with-gnu-libc' and omit the object files, + it is simpler to just do this in the source for each such file. */ + +#if defined (_LIBC) || !defined (__GNU_LIBRARY__) + + +/* This needs to come after some library #include + to get __GNU_LIBRARY__ defined. */ +#ifdef __GNU_LIBRARY__ +#include +#else +char *getenv (); +#endif + +#ifndef NULL +#define NULL 0 +#endif + +int +getopt_long (argc, argv, options, long_options, opt_index) + int argc; + char *const *argv; + const char *options; + const struct option *long_options; + int *opt_index; +{ + return _getopt_internal (argc, argv, options, long_options, opt_index, 0); +} + +/* Like getopt_long, but '-' as well as '--' can indicate a long option. + If an option that starts with '-' (not '--') doesn't match a long option, + but does match a short option, it is parsed as a short option + instead. */ + +int +getopt_long_only (argc, argv, options, long_options, opt_index) + int argc; + char *const *argv; + const char *options; + const struct option *long_options; + int *opt_index; +{ + return _getopt_internal (argc, argv, options, long_options, opt_index, 1); +} + + +#endif /* _LIBC or not __GNU_LIBRARY__. */ + +#ifdef TEST + +#include + +int +main (argc, argv) + int argc; + char **argv; +{ + int c; + int digit_optind = 0; + + while (1) + { + int this_option_optind = optind ? optind : 1; + int option_index = 0; + static struct option long_options[] = + { + {"add", 1, 0, 0}, + {"append", 0, 0, 0}, + {"delete", 1, 0, 0}, + {"verbose", 0, 0, 0}, + {"create", 0, 0, 0}, + {"file", 1, 0, 0}, + {0, 0, 0, 0} + }; + + c = getopt_long (argc, argv, "abc:d:0123456789", + long_options, &option_index); + if (c == EOF) + break; + + switch (c) + { + case 0: + printf ("option %s", long_options[option_index].name); + if (optarg) + printf (" with arg %s", optarg); + printf ("\n"); + break; + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf ("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf ("option %c\n", c); + break; + + case 'a': + printf ("option a\n"); + break; + + case 'b': + printf ("option b\n"); + break; + + case 'c': + printf ("option c with value `%s'\n", optarg); + break; + + case 'd': + printf ("option d with value `%s'\n", optarg); + break; + + case '?': + break; + + default: + printf ("?? getopt returned character code 0%o ??\n", c); + } + } + + if (optind < argc) + { + printf ("non-option ARGV-elements: "); + while (optind < argc) + printf ("%s ", argv[optind++]); + printf ("\n"); + } + + exit (0); +} + +#endif /* TEST */ diff --git a/getopt/win32/getopt.c b/getopt/win32/getopt.c new file mode 100644 index 0000000..763a245 --- /dev/null +++ b/getopt/win32/getopt.c @@ -0,0 +1,758 @@ +/* Getopt for GNU. + NOTE: getopt is now part of the C library, so if you don't know what + "Keep this file name-space clean" means, talk to roland@gnu.ai.mit.edu + before changing it! + + Copyright (C) 1987, 88, 89, 90, 91, 92, 1993 + Free Software Foundation, Inc. + + 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 2, 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. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +#ifndef __STDC__ +# ifndef const +# define const +# endif +#endif + +/* This tells Alpha OSF/1 not to define a getopt prototype in . */ +#ifndef _NO_PROTO +#define _NO_PROTO +#endif + +#include + +/* Comment out all this code if we are using the GNU C Library, and are not + actually compiling the library itself. This code is part of the GNU C + Library, but also included in many other GNU distributions. Compiling + and linking in this code is a waste when using the GNU C library + (especially if it is a shared library). Rather than having every GNU + program understand `configure --with-gnu-libc' and omit the object files, + it is simpler to just do this in the source for each such file. */ + +#if defined (_LIBC) || !defined (__GNU_LIBRARY__) + + +/* This needs to come after some library #include + to get __GNU_LIBRARY__ defined. */ +#ifdef __GNU_LIBRARY__ +/* Don't include stdlib.h for non-GNU C libraries because some of them + contain conflicting prototypes for getopt. */ +#include +#endif /* GNU C library. */ + +/* If GETOPT_COMPAT is defined, `+' as well as `--' can introduce a + long-named option. Because this is not POSIX.2 compliant, it is + being phased out. */ +/* #define GETOPT_COMPAT */ + +/* This version of `getopt' appears to the caller like standard Unix `getopt' + but it behaves differently for the user, since it allows the user + to intersperse the options with the other arguments. + + As `getopt' works, it permutes the elements of ARGV so that, + when it is done, all the options precede everything else. Thus + all application programs are extended to handle flexible argument order. + + Setting the environment variable POSIXLY_CORRECT disables permutation. + Then the behavior is completely standard. + + GNU application programs can use a third alternative mode in which + they can distinguish the relative order of options and other arguments. */ + +#ifdef VC6 + #include "getopt.h" +#else + #include +#endif + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +char *optarg = 0; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns EOF, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +/* XXX 1003.2 says this must be 1 before any call. */ +int optind = 0; + +/* The next char to be scanned in the option-element + in which the last option character we returned was found. + This allows us to pick up the scan where we left off. + + If this is zero, or a null string, it means resume the scan + by advancing to the next ARGV-element. */ + +static char *nextchar; + +/* Callers store zero here to inhibit the error message + for unrecognized options. */ + +int opterr = 1; + +/* Set to an option character which was unrecognized. + This must be initialized on some systems to avoid linking in the + system's own getopt implementation. */ + +#define BAD_OPTION '\0' +int optopt = BAD_OPTION; + +/* Describe how to deal with options that follow non-option ARGV-elements. + + If the caller did not specify anything, + the default is REQUIRE_ORDER if the environment variable + POSIXLY_CORRECT is defined, PERMUTE otherwise. + + REQUIRE_ORDER means don't recognize them as options; + stop option processing when the first non-option is seen. + This is what Unix does. + This mode of operation is selected by either setting the environment + variable POSIXLY_CORRECT, or using `+' as the first character + of the list of option characters. + + PERMUTE is the default. We permute the contents of ARGV as we scan, + so that eventually all the non-options are at the end. This allows options + to be given in any order, even with programs that were not written to + expect this. + + RETURN_IN_ORDER is an option available to programs that were written + to expect options and other ARGV-elements in any order and that care about + the ordering of the two. We describe each non-option ARGV-element + as if it were the argument of an option with character code 1. + Using `-' as the first character of the list of option characters + selects this mode of operation. + + The special argument `--' forces an end of option-scanning regardless + of the value of `ordering'. In the case of RETURN_IN_ORDER, only + `--' can cause `getopt' to return EOF with `optind' != ARGC. */ + +static enum +{ + REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER +} ordering; + +#ifdef __GNU_LIBRARY__ +/* We want to avoid inclusion of string.h with non-GNU libraries + because there are many ways it can cause trouble. + On some systems, it contains special magic macros that don't work + in GCC. */ +#include +#define my_index strchr +#define my_strlen strlen +#else + +/* Avoid depending on library functions or files + whose names are inconsistent. */ + +#if __STDC__ || defined(PROTO) +extern char *getenv(const char *name); +extern int strcmp (const char *s1, const char *s2); +extern int strncmp(const char *s1, const char *s2, int n); + +static int my_strlen(const char *s); +static char *my_index (const char *str, int chr); +#else +extern char *getenv (); +#endif + +static int +my_strlen (str) + const char *str; +{ + int n = 0; + while (*str++) + n++; + return n; +} + +static char * +my_index (str, chr) + const char *str; + int chr; +{ + while (*str) + { + if (*str == chr) + return (char *) str; + str++; + } + return 0; +} + +#endif /* GNU C library. */ + +/* Handle permutation of arguments. */ + +/* Describe the part of ARGV that contains non-options that have + been skipped. `first_nonopt' is the index in ARGV of the first of them; + `last_nonopt' is the index after the last of them. */ + +static int first_nonopt; +static int last_nonopt; + +/* Exchange two adjacent subsequences of ARGV. + One subsequence is elements [first_nonopt,last_nonopt) + which contains all the non-options that have been skipped so far. + The other is elements [last_nonopt,optind), which contains all + the options processed since those non-options were skipped. + + `first_nonopt' and `last_nonopt' are relocated so that they describe + the new indices of the non-options in ARGV after they are moved. + + To perform the swap, we first reverse the order of all elements. So + all options now come before all non options, but they are in the + wrong order. So we put back the options and non options in original + order by reversing them again. For example: + original input: a b c -x -y + reverse all: -y -x c b a + reverse options: -x -y c b a + reverse non options: -x -y a b c +*/ + +#if __STDC__ || defined(PROTO) +static void exchange (char **argv); +#endif + +static void +exchange (argv) + char **argv; +{ + char *temp, **first, **last; + + /* Reverse all the elements [first_nonopt, optind) */ + first = &argv[first_nonopt]; + last = &argv[optind-1]; + while (first < last) { + temp = *first; *first = *last; *last = temp; first++; last--; + } + /* Put back the options in order */ + first = &argv[first_nonopt]; + first_nonopt += (optind - last_nonopt); + last = &argv[first_nonopt - 1]; + while (first < last) { + temp = *first; *first = *last; *last = temp; first++; last--; + } + + /* Put back the non options in order */ + first = &argv[first_nonopt]; + last_nonopt = optind; + last = &argv[last_nonopt-1]; + while (first < last) { + temp = *first; *first = *last; *last = temp; first++; last--; + } +} + +/* Scan elements of ARGV (whose length is ARGC) for option characters + given in OPTSTRING. + + If an element of ARGV starts with '-', and is not exactly "-" or "--", + then it is an option element. The characters of this element + (aside from the initial '-') are option characters. If `getopt' + is called repeatedly, it returns successively each of the option characters + from each of the option elements. + + If `getopt' finds another option character, it returns that character, + updating `optind' and `nextchar' so that the next call to `getopt' can + resume the scan with the following option character or ARGV-element. + + If there are no more option characters, `getopt' returns `EOF'. + Then `optind' is the index in ARGV of the first ARGV-element + that is not an option. (The ARGV-elements have been permuted + so that those that are not options now come last.) + + OPTSTRING is a string containing the legitimate option characters. + If an option character is seen that is not listed in OPTSTRING, + return BAD_OPTION after printing an error message. If you set `opterr' to + zero, the error message is suppressed but we still return BAD_OPTION. + + If a char in OPTSTRING is followed by a colon, that means it wants an arg, + so the following text in the same ARGV-element, or the text of the following + ARGV-element, is returned in `optarg'. Two colons mean an option that + wants an optional arg; if there is text in the current ARGV-element, + it is returned in `optarg', otherwise `optarg' is set to zero. + + If OPTSTRING starts with `-' or `+', it requests different methods of + handling the non-option ARGV-elements. + See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. + + Long-named options begin with `--' instead of `-'. + Their names may be abbreviated as long as the abbreviation is unique + or is an exact match for some defined option. If they have an + argument, it follows the option name in the same ARGV-element, separated + from the option name by a `=', or else the in next ARGV-element. + When `getopt' finds a long-named option, it returns 0 if that option's + `flag' field is nonzero, the value of the option's `val' field + if the `flag' field is zero. + + The elements of ARGV aren't really const, because we permute them. + But we pretend they're const in the prototype to be compatible + with other systems. + + LONGOPTS is a vector of `struct option' terminated by an + element containing a name which is zero. + + LONGIND returns the index in LONGOPT of the long-named option found. + It is only valid when a long-named option has been found by the most + recent call. + + If LONG_ONLY is nonzero, '-' as well as '--' can introduce + long-named options. */ + +int +_getopt_internal (argc, argv, optstring, longopts, longind, long_only) + int argc; + char *const *argv; + const char *optstring; + const struct option *longopts; + int *longind; + int long_only; +{ + int option_index; + + optarg = 0; + + /* Initialize the internal data when the first call is made. + Start processing options with ARGV-element 1 (since ARGV-element 0 + is the program name); the sequence of previously skipped + non-option ARGV-elements is empty. */ + + if (optind == 0) + { + first_nonopt = last_nonopt = optind = 1; + + nextchar = NULL; + + /* Determine how to handle the ordering of options and nonoptions. */ + + if (optstring[0] == '-') + { + ordering = RETURN_IN_ORDER; + ++optstring; + } + else if (optstring[0] == '+') + { + ordering = REQUIRE_ORDER; + ++optstring; + } + else if (getenv ("POSIXLY_CORRECT") != NULL) + ordering = REQUIRE_ORDER; + else + ordering = PERMUTE; + } + + if (nextchar == NULL || *nextchar == '\0') + { + if (ordering == PERMUTE) + { + /* If we have just processed some options following some non-options, + exchange them so that the options come first. */ + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange ((char **) argv); + else if (last_nonopt != optind) + first_nonopt = optind; + + /* Now skip any additional non-options + and extend the range of non-options previously skipped. */ + + while (optind < argc + && (argv[optind][0] != '-' || argv[optind][1] == '\0') +#ifdef GETOPT_COMPAT + && (longopts == NULL + || argv[optind][0] != '+' || argv[optind][1] == '\0') +#endif /* GETOPT_COMPAT */ + ) + optind++; + last_nonopt = optind; + } + + /* Special ARGV-element `--' means premature end of options. + Skip it like a null option, + then exchange with previous non-options as if it were an option, + then skip everything else like a non-option. */ + + if (optind != argc && !strcmp (argv[optind], "--")) + { + optind++; + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange ((char **) argv); + else if (first_nonopt == last_nonopt) + first_nonopt = optind; + last_nonopt = argc; + + optind = argc; + } + + /* If we have done all the ARGV-elements, stop the scan + and back over any non-options that we skipped and permuted. */ + + if (optind == argc) + { + /* Set the next-arg-index to point at the non-options + that we previously skipped, so the caller will digest them. */ + if (first_nonopt != last_nonopt) + optind = first_nonopt; + return EOF; + } + + /* If we have come to a non-option and did not permute it, + either stop the scan or describe it to the caller and pass it by. */ + + if ((argv[optind][0] != '-' || argv[optind][1] == '\0') +#ifdef GETOPT_COMPAT + && (longopts == NULL + || argv[optind][0] != '+' || argv[optind][1] == '\0') +#endif /* GETOPT_COMPAT */ + ) + { + if (ordering == REQUIRE_ORDER) + return EOF; + optarg = argv[optind++]; + return 1; + } + + /* We have found another option-ARGV-element. + Start decoding its characters. */ + + nextchar = (argv[optind] + 1 + + (longopts != NULL && argv[optind][1] == '-')); + } + + if (longopts != NULL + && ((argv[optind][0] == '-' + && (argv[optind][1] == '-' || long_only)) +#ifdef GETOPT_COMPAT + || argv[optind][0] == '+' +#endif /* GETOPT_COMPAT */ + )) + { + const struct option *p; + char *s = nextchar; + int exact = 0; + int ambig = 0; + const struct option *pfound = NULL; + int indfound = 0; + + while (*s && *s != '=') + s++; + + /* Test all options for either exact match or abbreviated matches. */ + for (p = longopts, option_index = 0; p->name; + p++, option_index++) + if (!strncmp (p->name, nextchar, s - nextchar)) + { + if (s - nextchar == my_strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == NULL) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else + /* Second nonexact match found. */ + ambig = 1; + } + + if (ambig && !exact) + { + if (opterr) + fprintf (stderr, "%s: option `%s' is ambiguous\n", + argv[0], argv[optind]); + nextchar += my_strlen (nextchar); + optind++; + return BAD_OPTION; + } + + if (pfound != NULL) + { + option_index = indfound; + optind++; + if (*s) + { + /* Don't test has_arg with >, because some C compilers don't + allow it to be used on enums. */ + if (pfound->has_arg) + optarg = s + 1; + else + { + if (opterr) + { + if (argv[optind - 1][1] == '-') + /* --option */ + fprintf (stderr, + "%s: option `--%s' doesn't allow an argument\n", + argv[0], pfound->name); + else + /* +option or -option */ + fprintf (stderr, + "%s: option `%c%s' doesn't allow an argument\n", + argv[0], argv[optind - 1][0], pfound->name); + } + nextchar += my_strlen (nextchar); + return BAD_OPTION; + } + } + else if (pfound->has_arg == 1) + { + if (optind < argc) + optarg = argv[optind++]; + else + { + if (opterr) + fprintf (stderr, "%s: option `%s' requires an argument\n", + argv[0], argv[optind - 1]); + nextchar += my_strlen (nextchar); + return optstring[0] == ':' ? ':' : BAD_OPTION; + } + } + nextchar += my_strlen (nextchar); + if (longind != NULL) + *longind = option_index; + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + /* Can't find it as a long option. If this is not getopt_long_only, + or the option starts with '--' or is not a valid short + option, then it's an error. + Otherwise interpret it as a short option. */ + if (!long_only || argv[optind][1] == '-' +#ifdef GETOPT_COMPAT + || argv[optind][0] == '+' +#endif /* GETOPT_COMPAT */ + || my_index (optstring, *nextchar) == NULL) + { + if (opterr) + { + if (argv[optind][1] == '-') + /* --option */ + fprintf (stderr, "%s: unrecognized option `--%s'\n", + argv[0], nextchar); + else + /* +option or -option */ + fprintf (stderr, "%s: unrecognized option `%c%s'\n", + argv[0], argv[optind][0], nextchar); + } + nextchar = (char *) ""; + optind++; + return BAD_OPTION; + } + } + + /* Look at and handle the next option-character. */ + + { + char c = *nextchar++; + char *temp = my_index (optstring, c); + + /* Increment `optind' when we start to process its last character. */ + if (*nextchar == '\0') + ++optind; + + if (temp == NULL || c == ':') + { + if (opterr) + { +#if 0 + if (c < 040 || c >= 0177) + fprintf (stderr, "%s: unrecognized option, character code 0%o\n", + argv[0], c); + else + fprintf (stderr, "%s: unrecognized option `-%c'\n", argv[0], c); +#else + /* 1003.2 specifies the format of this message. */ + fprintf (stderr, "%s: illegal option -- %c\n", argv[0], c); +#endif + } + optopt = c; + return BAD_OPTION; + } + if (temp[1] == ':') + { + if (temp[2] == ':') + { + /* This is an option that accepts an argument optionally. */ + if (*nextchar != '\0') + { + optarg = nextchar; + optind++; + } + else + optarg = 0; + nextchar = NULL; + } + else + { + /* This is an option that requires an argument. */ + if (*nextchar != '\0') + { + optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + optind++; + } + else if (optind == argc) + { + if (opterr) + { +#if 0 + fprintf (stderr, "%s: option `-%c' requires an argument\n", + argv[0], c); +#else + /* 1003.2 specifies the format of this message. */ + fprintf (stderr, "%s: option requires an argument -- %c\n", + argv[0], c); +#endif + } + optopt = c; + if (optstring[0] == ':') + c = ':'; + else + c = BAD_OPTION; + } + else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + optarg = argv[optind++]; + nextchar = NULL; + } + } + return c; + } +} + +int +getopt (argc, argv, optstring) + int argc; + char *const *argv; + const char *optstring; +{ + return _getopt_internal (argc, argv, optstring, + (const struct option *) 0, + (int *) 0, + 0); +} + +int +getopt_long (argc, argv, options, long_options, opt_index) + int argc; + char *const *argv; + const char *options; + const struct option *long_options; + int *opt_index; +{ + return _getopt_internal (argc, argv, options, long_options, opt_index, 0); +} + +#endif /* _LIBC or not __GNU_LIBRARY__. */ + +#ifdef TEST + +/* Compile with -DTEST to make an executable for use in testing + the above definition of `getopt'. */ + +int +main (argc, argv) + int argc; + char **argv; +{ + int c; + int digit_optind = 0; + + while (1) + { + int this_option_optind = optind ? optind : 1; + + c = getopt (argc, argv, "abc:d:0123456789"); + if (c == EOF) + break; + + switch (c) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf ("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf ("option %c\n", c); + break; + + case 'a': + printf ("option a\n"); + break; + + case 'b': + printf ("option b\n"); + break; + + case 'c': + printf ("option c with value `%s'\n", optarg); + break; + + case BAD_OPTION: + break; + + default: + printf ("?? getopt returned character code 0%o ??\n", c); + } + } + + if (optind < argc) + { + printf ("non-option ARGV-elements: "); + while (optind < argc) + printf ("%s ", argv[optind++]); + printf ("\n"); + } + + exit (0); +} + +#endif /* TEST */ diff --git a/getopt/win32/getopt.h b/getopt/win32/getopt.h new file mode 100644 index 0000000..0abce6e --- /dev/null +++ b/getopt/win32/getopt.h @@ -0,0 +1,127 @@ +/* Declarations for getopt. + Copyright (C) 1989, 1990, 1991, 1992, 1993 Free Software Foundation, Inc. + + 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 2, 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. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#ifndef _GETOPT_H +#define _GETOPT_H 1 + +#ifdef __cplusplus +extern "C" { +#endif + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +extern char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns EOF, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +extern int optind; + +/* Callers store zero here to inhibit the error message `getopt' prints + for unrecognized options. */ + +extern int opterr; + +/* Set to an option character which was unrecognized. */ + +extern int optopt; + +/* Describe the long-named options requested by the application. + The LONG_OPTIONS argument to getopt_long or getopt_long_only is a vector + of `struct option' terminated by an element containing a name which is + zero. + + The field `has_arg' is: + no_argument (or 0) if the option does not take an argument, + required_argument (or 1) if the option requires an argument, + optional_argument (or 2) if the option takes an optional argument. + + If the field `flag' is not NULL, it points to a variable that is set + to the value given in the field `val' when the option is found, but + left unchanged if the option is not found. + + To have a long-named option do something other than set an `int' to + a compiled-in constant, such as set a value from `optarg', set the + option's `flag' field to zero and its `val' field to a nonzero + value (the equivalent single-letter option character, if there is + one). For long options that have a zero `flag' field, `getopt' + returns the contents of the `val' field. */ + +struct option +{ +#if __STDC__ + const char *name; +#else + char *name; +#endif + /* has_arg can't be an enum because some compilers complain about + type mismatches in all the code that assumes it is an int. */ + int has_arg; + int *flag; + int val; +}; + +/* Names for the values of the `has_arg' field of `struct option'. */ + +#define no_argument 0 +#define required_argument 1 +#define optional_argument 2 + +#if __STDC__ || defined(PROTO) +#if defined(__GNU_LIBRARY__) +/* Many other libraries have conflicting prototypes for getopt, with + differences in the consts, in stdlib.h. To avoid compilation + errors, only prototype getopt for the GNU C library. */ +extern int getopt (int argc, char *const *argv, const char *shortopts); +#endif /* not __GNU_LIBRARY__ */ +extern int getopt_long (int argc, char *const *argv, const char *shortopts, + const struct option *longopts, int *longind); +extern int getopt_long_only (int argc, char *const *argv, + const char *shortopts, + const struct option *longopts, int *longind); + +/* Internal only. Users should not call this directly. */ +extern int _getopt_internal (int argc, char *const *argv, + const char *shortopts, + const struct option *longopts, int *longind, + int long_only); +#else /* not __STDC__ */ +extern int getopt (); +extern int getopt_long (); +extern int getopt_long_only (); + +extern int _getopt_internal (); +#endif /* not __STDC__ */ + +#ifdef __cplusplus +} +#endif + +#endif /* _GETOPT_H */ diff --git a/gnokii.spec b/gnokii.spec new file mode 100644 index 0000000..e05f1d1 --- /dev/null +++ b/gnokii.spec @@ -0,0 +1,147 @@ +%define name gnokii +%define version 0.4.0pre3 +%define release 1 + +Summary: Linux/Unix tool suite for Nokia mobile phones +Name: %{name} +Version: %{version} +Release: %{release} +Copyright: GPL +Packager: Pavel Janik ml. , Jan Derfinak +Group: Applications/Communications +Source: ftp://ftp.gnokii.org/pub/gnokii/%{name}-%{version}.tar.gz +BuildRoot: /var/tmp/%{name}-%{version}-root + +%description +Gnokii is a Linux/Unix tool suite and (eventually) modem/fax driver for +Nokia's mobile phones, released under the GPL. + +%package xgnokii +Summary: Graphical Linux/Unix tool suite for Nokia mobile phones. +Group: X11/Applications +%description xgnokii +Xgnokii is graphical Linux/Unix tool suite for Nokia's mobile phones. It +allows you to edit your contacts book, send/read SMS's from/in +computer and more other features. + +%prep + +%setup -q + +%build +./configure --prefix=/usr --with-x --enable-nls #--enable-debug --enable-rlpdebug +make + +%install +rm -rf ${RPM_BUILD_ROOT} + +make prefix=${RPM_BUILD_ROOT}/usr install + +mkdir -p ${RPM_BUILD_ROOT}/etc/ + +sed 's#/usr/local/sbin/#/usr/sbin/#' ${RPM_BUILD_ROOT}/etc/gnokiirc + +%pre +/usr/sbin/groupadd -r -f gnokii >/dev/null 2>&1 + +%postun +/usr/sbin/groupdel gnokii >/dev/null 2>&1 + +%clean +rm -rf ${RPM_BUILD_ROOT} + +%files +%defattr(-,root,root) +%doc Docs/CREDITS Docs/DataCalls-QuickStart Docs/FAQ Docs/README +%doc Docs/README-3810 Docs/README-6110 Docs/README-2110 Docs/README-WIN32 +%doc Docs/gettext-howto Docs/gnokii.nol Docs/gnokii-ir-howto Docs/packaging-howto +%doc Docs/README-dancall Docs/logos.txt Docs/gnokii.xpm Docs/Bugs +%doc Docs/sample/gnokiirc Docs/sample/options Docs/sample/pap-secrets +%doc Docs/sample/ppp-gnokii Docs/sample/ppp-on +%doc Docs/protocol/nk2110.txt Docs/protocol/nk3110.txt Docs/protocol/nk6110.txt Docs/protocol/nk6160.txt +%doc Docs/protocol/nk6185.txt Docs/protocol/nk640.txt Docs/protocol/nk7110.txt Docs/protocol/nokia.txt +%attr(0750, root, gnokii) /usr/bin/gnokii +%attr(0750, root, gnokii) /usr/sbin/gnokiid +%attr(4750, root, gnokii) /usr/sbin/mgnokiidev +%config /etc/gnokiirc + +%files xgnokii +%defattr(-,root,root) +/usr/X11R6/bin/xgnokii +/usr/bin/todologo +/usr/share/xgnokii + +%changelog + +* Fri Sep 28 2001 Pawel Kot +- last minute fixes. + +* Thu Sep 27 2001 Pawel Kot +- updates to 0.3.3 version - new docs, new ftp server + +* Sun Sep 2 2001 Pawel Kot +- removes xlogos + +* Thu Jan 11 2001 Pawel Kot +- misc updates + +* Fri Oct 27 2000 Pavel Janik ml. +- todologo added to the package + +* Mon May 15 2000 Pavel Janik ml. +- proper access rights for gnokiid, gnokii and mgnokiidev + +* Sat May 13 2000 Pavel Janik ml. +- new doc files added + +* Tue Mar 21 2000 Pavel Janik ml. +- permission on /usr/sbin fixed +- correct /etc/gnokiirc file + +* Mon Mar 20 2000 Pavel Janik ml. +- mkdir of directories in install removed +- xgnokii package should contain lib/xgnokii directory + +* Mon Mar 20 2000 Jan Derfinak +- split package into gnokii and xgnokii +- added configure +- correct xgnokii installation +- installation with make install +- fixing paths + +* Thu Aug 5 1999 Pavel Janik ml. +- documentation files changed + +* Thu Aug 5 1999 Pavel Janik ml. +- xkeyb and xlogos added to RPM package + +* Sat Jul 24 1999 Pavel Janik ml. +- stripping of binaries + +* Thu Jul 22 1999 Pavel Janik ml. +- gnokii.nol added - nice example for logo uploading + +* Sun Jul 18 1999 Pavel Janik ml. +- mgnokiidev added to RPM package +- config file in /etc (it is not used now...) + +* Sat Jul 10 1999 Pavel Janik ml. +- use of ~/.gnokiirc so not magic model stuff +- new doc files + +* Mon Jun 28 1999 Pavel Janik ml. +- Nokia auth. protocol is there now +- xgnokii and gnokiid added to RPM + +* Sun May 9 1999 Pavel Janik ml. +- included 6110-patch updated to my prepatches + +* Thu May 6 1999 Pavel Janik ml. +- TODO-6110 file added to documentation files + +* Sun Mar 28 1999 Pavel Janik ml. +- upgraded to gnokii-0.2.4 +- 6110 version of gnokii added + +* Fri Mar 5 1999 Pavel Janik ml. +- the first SPEC file for gnokii diff --git a/gnokii/Makefile b/gnokii/Makefile new file mode 100644 index 0000000..2018e7d --- /dev/null +++ b/gnokii/Makefile @@ -0,0 +1,84 @@ + +# +# Makefile for the GNOKII tool suite. +# + +TOPDIR=.. +include $(TOPDIR)/Makefile.global + + +CFLAGS += $(PTHREAD_CFLAGS) +LDLIBS += $(PTHREAD_LIBS) + +ifdef XPM_LIBS + LDLIBS += $(XPM_LIBS) +endif + +OBJS = gnokii.o + +ifdef OWN_GETOPT + OBJS += $(TOPDIR)/getopt/libgetopt.a +endif + +all: gnokii + +gnokii: $(OBJS) $(TOPDIR)/common/COMMON.o $(TOPDIR)/common/gsm-filetypes.o + $(CC) $(LDFLAGS) $(TARGET_ARCH) $^ $(LOADLIBES) $(LDLIBS) -o $@ + +$(TOPDIR)/common/COMMON.o: + $(MAKE) -C $(TOPDIR)/common COMMON.o + +$(TOPDIR)/common/gsm-filetypes.o: + $(MAKE) -C $(TOPDIR)/common gsm-filetypes.o + +$(TOPDIR)/getopt/libgetopt.a: + $(MAKE) -C $(TOPDIR)/getopt + +$(TOPDIR)/common/libmygnokii.so: + $(MAKE) -C $(TOPDIR)/common makelib + +gnokiilib: $(OBJS) $(TOPDIR)/common/libmygnokii.so + $(CC) $(LDFLAGS) $(TARGET_ARCH) $(OBJS) -L$(TOPDIR)/common -lmygnokii $(LOADLIBES) $(LDLIBS) -o $@ + +makelib: gnokiilib + +clean: + $(RM) $(OBJS) *~ depend gnokii gnokiilib *.exe core *.bak + +install: all + $(INSTALL) -d $(bindir) + $(INSTALL) gnokii $(bindir) + $(INSTALL) gnokiilib $(bindir)/gnokii + +install-strip: all + $(INSTALL) -d $(bindir) + $(INSTALL) -s gnokii $(bindir) + $(INSTALL) -s gnokiilib $(bindir)/gnokii + @echo "done" + +install-suid: all + @if [ -z "/bin/grep -e '^gnokii:' /etc/group" ]; then \ + /usr/sbin/groupadd gnokii; \ + fi + $(INSTALL) -d $(bindir) + $(INSTALL) -o root -g gnokii -m 0750 gnokii $(bindir) + $(INSTALL) -o root -g gnokii -m 0750 gnokiilib $(bindir)/gnokii + @echo + +install-ss: all + @if [ -z "/bin/grep -e '^gnokii:' /etc/group" ]; then \ + /usr/sbin/groupadd gnokii; \ + fi + $(INSTALL) -d $(bindir) + $(INSTALL) -o root -g gnokii -m 0750 -s gnokii $(bindir) + $(INSTALL) -o root -g gnokii -m 0750 -s gnokiilib $(bindir)/gnokii + @echo + +depend dep: + $(CC) $(CFLAGS) -MM *.c >depend + +ifeq (depend,$(wildcard depend)) +include depend +endif + +.PHONY: all install clean dep depend diff --git a/gnokii/gnokii.h b/gnokii/gnokii.h new file mode 100644 index 0000000..f4feaa1 --- /dev/null +++ b/gnokii/gnokii.h @@ -0,0 +1,280 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Header file for test utility. + +*/ + +/* Prototypes */ + +int monitormode(int argc, char *argv[]); + +#ifdef SECURITY + int entersecuritycode(char *type); + int getsecuritycodestatus(void); + int getsecuritycode(char *type); +#endif + +#ifdef DEBUG + int sniff(int nargc, char *nargv[]); + int decodefile(int nargc, char *nargv[]); + int getbinringfromfile(int nargc, char *nargv[]); +#endif + +int getmemory(int argc, char *argv[]); +int writephonebook(int argc, char *argv[]); +int getspeeddial(char *number); +int setspeeddial(char *argv[]); +int getsms(int argc, char *argv[]); +int renamesmsc(int argc, char *argv[]); +int deletesms(int argc, char *argv[]); +int sendsms(int argc, char *argv[]); +int savesms(int argc, char *argv[]); +int sendlogo(int argc, char *argv[]); +int savelogo(int argc, char *argv[]); +int sendringtone(int argc, char *argv[]); +int saveringtone(int argc, char *argv[]); +int getsmsc(char *mcn); +int setdatetime(int argc, char *argv[]); +int getdatetime(void); +int setalarm(char *argv[]); +int getalarm(void); +int dialvoice(char *number); +int cancelcall(void); +int getcalendarnote(int argc, char *argv[]); +int writecalendarnote(char *argv[]); +int deletecalendarnote(char *index); +int getdisplaystatus(); +int netmonitor(char *_mode); +int identify(void); +int senddtmf(char *String); +int foogle(char *argv[]); +int pmon(void); +int setlogo(int argc, char *argv[]); +int getlogo(int argc, char *argv[]); +int binringtoneconvert(int argc, char *argv[]); +int setringtone(int argc, char *argv[]); +int getringtone(int argc, char *argv[]); +int reset(int argc, char *argv[]); +int getprofile(int argc, char *argv[]); +int setprofile(int argc, char *argv[]); +int allringtones(); +int displayoutput(); +int presskeysequence(char *argv[]); +int restoresettings(char *argv[]); +int backupsettings(char *argv[]); +int playringtone(int argc, char *argv[]); +int ringtoneconvert(int argc, char *argv[]); +int bitmapconvert(int argc, char *argv[]); +int composer(int argc, char *argv[]); +int getphoneprofile(); +int setphoneprofile(int argc, char *argv[]); +int getoperatorname(); +int setoperatorname(int argc, char *argv[]); +int getvoicemailbox(); +int phonetests(); +int simlockinfo(); +int geteeprom (); +int setsimlock (); +int getsmsfolders (); +int resetphonesettings (); +int sendprofile(int argc, char *argv[]); +int showbitmap(int argc, char *argv[]); +int nm_collect(int argc, char *argv[]); +int netmonitordata(int argc, char *argv[]); +int getwapbookmark(int argc, char *argv[]); +int setwapbookmark(int argc, char *argv[]); +int savewapbookmark(int argc, char *argv[]); +int sendwapbookmark(int argc, char *argv[]); +int getwapsettings(int argc, char *argv[]); +int savewapsettings(int argc, char *argv[]); +int sendwapsettings(int argc, char *argv[]); +int savecalendarnote(int argc, char *argv[]); +int sendcalendarnote(int argc, char *argv[]); +int receivesms(int argc, char *argv[]); +int getsmsstatus(int argc, char *argv[]); +int divert(int argc, char *argv[]); +int savephonebookentry(int argc, char *argv[]); +int sendphonebookentry(int argc, char *argv[]); + +typedef enum { + OPT_HELP, + OPT_VERSION, + OPT_MONITOR, + OPT_ENTERSECURITYCODE, + OPT_GETSECURITYCODESTATUS, + OPT_GETSECURITYCODE, + OPT_SETDATETIME, + OPT_GETDATETIME, + OPT_SETALARM, + OPT_GETALARM, + OPT_DIALVOICE, + OPT_CANCELCALL, + OPT_GETCALENDARNOTE, + OPT_WRITECALENDARNOTE, + OPT_DELCALENDARNOTE, + OPT_GETDISPLAYSTATUS, + OPT_GETMEMORY, + OPT_WRITEPHONEBOOK, + OPT_GETSPEEDDIAL, + OPT_SETSPEEDDIAL, + OPT_GETSMS, + OPT_DELETESMS, + OPT_SENDSMS, + OPT_SAVESMS, + OPT_GETSMSC, + OPT_RENAMESMSC, + OPT_PMON, + OPT_NETMONITOR, + OPT_NM_COLLECT, + OPT_NETMONITORDATA, + OPT_IDENTIFY, + OPT_SENDDTMF, + OPT_RESET, + OPT_SETLOGO, + OPT_GETLOGO, + OPT_SENDLOGO, + OPT_SAVELOGO, + OPT_BITMAPCONVERT, + OPT_SENDRINGTONE, + OPT_SAVERINGTONE, + OPT_SETRINGTONE, + OPT_PLAYRINGTONE, + OPT_RINGTONECONVERT, + OPT_COMPOSER, + OPT_ALLRINGTONES, + OPT_GETRINGTONE, + OPT_SNIFFER, + OPT_GETPROFILE, + OPT_SETPROFILE, + OPT_DISPLAYOUTPUT, + OPT_PRESSKEYSEQUENCE, + OPT_RESTORESETTINGS, + OPT_BACKUPSETTINGS, + OPT_GETPHONEPROFILE, + OPT_SETPHONEPROFILE, + OPT_GETOPERATORNAME, + OPT_SETOPERATORNAME, + OPT_GETVOICEMAILBOX, + OPT_PHONETESTS, + OPT_FOOGLE, + OPT_SIMLOCKINFO, + OPT_SETSIMLOCK, + OPT_GETEEPROM=128, + OPT_GETSMSFOLDERS=129, + OPT_RESETPHONESETTINGS=130, + OPT_SENDPROFILE=131, + OPT_SHOWBITMAP=132, + OPT_BINRINGTONECONVERT=133, + OPT_GETWAPBOOKMARK=134, + OPT_SAVEWAPBOOKMARK=135, + OPT_SENDWAPBOOKMARK=136, + OPT_GETWAPSETTINGS=137, + OPT_SAVEWAPSETTINGS=138, + OPT_SAVECALENDARNOTE=139, + OPT_SENDCALENDARNOTE=140, + OPT_SAVEPHONEBOOKENTRY=141, + OPT_SENDPHONEBOOKENTRY=142, + OPT_DECODEFILE=143, + OPT_RECEIVESMS=144, + OPT_GETSMSSTATUS=145, + OPT_DIVERT=146, + OPT_SENDWAPSETTINGS=147, + OPT_SETWAPBOOKMARK=148, + OPT_GETBINRINGFROMFILE=149 +} opt_index; + +struct gnokii_arg_len { + int gal_opt; + int gal_min; + int gal_max; + int gal_flags; +}; + +/* This is used for checking correct argument count. If it is used then if + the user specifies some argument, their count should be equivalent to the + count the programmer expects. */ + +#define GAL_XOR 0x01 + +/* for --presskeysequence */ +struct keys_table_position { + char whatchar; + int whatcode; +}; + +/* for --presskeysequence */ +struct keys_table_position Keys[] = { +{'m',PHONEKEY_MENU}, +{'M',PHONEKEY_MENU}, +{'n',PHONEKEY_NAMES}, +{'N',PHONEKEY_NAMES}, +{'p',PHONEKEY_POWER}, +{'P',PHONEKEY_POWER}, +{'u',PHONEKEY_UP}, +{'U',PHONEKEY_UP}, +{'d',PHONEKEY_DOWN}, +{'D',PHONEKEY_DOWN}, +{'+',PHONEKEY_INCREASEVOLUME}, +{'-',PHONEKEY_DECREASEVOLUME}, +{'1',PHONEKEY_1}, +{'2',PHONEKEY_2}, +{'3',PHONEKEY_3}, +{'4',PHONEKEY_4}, +{'5',PHONEKEY_5}, +{'6',PHONEKEY_6}, +{'7',PHONEKEY_7}, +{'8',PHONEKEY_8}, +{'9',PHONEKEY_9}, +{'*',PHONEKEY_ASTERISK}, +{'0',PHONEKEY_0}, +{'#',PHONEKEY_HASH}, +{'g',PHONEKEY_GREEN}, +{'G',PHONEKEY_GREEN}, +{'r',PHONEKEY_RED}, +{'R',PHONEKEY_RED}, +{' ',0} +}; + +/* for NETMONITOR */ + +//maximal number of screens for --nm_collect +#define MAX_NM_COLLECT 20 + +/* 255 used internally by functions */ +#define NM_MAX_SCREEN 254 + +/* in 6150 v4.13 effectively used was 296 FIELDS + date + time ... */ +#define NM_MAX_FIELDS 512 + +typedef struct { + char *name; + int x; + int y; + int len; + char *mname; + int s_nr; + char type; + char value[NM_MAX_SCREEN_WIDTH]; + void *next; +} PARAM_INFO_MON; + +// info for make ouput, filled in by parse_process() +typedef struct { + int req_header; + unsigned long req_wait; + int req_n; + char req_fs[11]; + char req_ls[11]; + PARAM_INFO_MON *data[NM_MAX_FIELDS]; + char out_f[NM_MAX_FIELDS]; + unsigned char req_screen[NM_MAX_SCREEN]; +} OUT_INFO_MON; + +int semicolon_pipe_substitution( GSM_PhonebookEntry *pentry, unsigned int direction ); +int str_substch( char *str, const char toric, const char sost ); diff --git a/gnokiid/Makefile b/gnokiid/Makefile new file mode 100644 index 0000000..fde8ac2 --- /dev/null +++ b/gnokiid/Makefile @@ -0,0 +1,72 @@ + +# +# Makefile for the GNOKII tool suite. +# +# Copyright (C) 1999 Hugh Blemings & Pavel Janík ml. +# 2000 Karel Zak +# + +TOPDIR=.. +include $(TOPDIR)/Makefile.global + +CFLAGS += $(PTHREAD_CFLAGS) +LDFLAGS += $(PTHREAD_LIBS) + +OBJS = gnokiid.o + +all: gnokiid + +gnokiid: $(OBJS) $(TOPDIR)/common/COMMON.o $(TOPDIR)/common/DATA.o + +$(TOPDIR)/common/COMMON.o: + $(MAKE) -C $(TOPDIR)/common COMMON.o + +$(TOPDIR)/common/DATA.o: + $(MAKE) -C $(TOPDIR)/common DATA.o + +$(TOPDIR)/common/libmygnokii.so: + $(MAKE) -C $(TOPDIR)/common makelib + +makelib: $(OBJS) $(TOPDIR)/common/libmygnokii.so + $(CC) $(LDFLAGS) -L$(TOPDIR)/common -lmygnokii $(OBJS) -o gnokiidlib + +clean: + $(RM) $(OBJS) *~ depend gnokiid gnokiidlib *.exe core *.bak + +install: all + $(INSTALL) -d $(sbindir) + $(INSTALL) gnokiid $(sbindir) + $(INSTALL) gnokiidlib $(sbindir)/gnokiid + +install-strip: all + $(INSTALL) -d $(sbindir) + $(INSTALL) -s gnokiid $(sbindir) + $(INSTALL) -s gnokiidlib $(sbindir)/gnokiid + @echo "done" + +install-suid: all + @if [ -z "/bin/grep -e '^gnokii:' /etc/group" ]; then \ + /usr/sbin/groupadd gnokii; \ + fi + $(INSTALL) -d $(sbindir) + $(INSTALL) -o root -g gnokii -m 4750 gnokiid $(sbindir) + $(INSTALL) -o root -g gnokii -m 4750 gnokiidlib $(sbindir)/gnokiid + @echo "done" + +install-ss: all + @if [ -z "/bin/grep -e '^gnokii:' /etc/group" ]; then \ + /usr/sbin/groupadd gnokii; \ + fi + $(INSTALL) -d $(sbindir) + $(INSTALL) -o root -g gnokii -m 4750 -s gnokiid $(sbindir) + $(INSTALL) -o root -g gnokii -m 4750 -s gnokiidlib $(sbindir)/gnokiid + @echo "done" + +depend dep: + $(CC) $(CFLAGS) -MM *.c >depend + +ifeq (depend,$(wildcard depend)) +include depend +endif + +.PHONY: all install clean dep depend diff --git a/gnokiid/gnokiid.c b/gnokiid/gnokiid.c new file mode 100644 index 0000000..0b589ae --- /dev/null +++ b/gnokiid/gnokiid.c @@ -0,0 +1,128 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Mainline code for gnokiid daemon. Handles command line parsing and + various daemon functions. + +*/ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "misc.h" +#include "files/cfgreader.h" +#include "gsm-common.h" +#include "gsm-api.h" +#include "data/virtmodem.h" + +/* Global variables */ +bool DebugMode; /* When true, run in debug mode */ +char *Model; /* Model from .gnokiirc file. */ +char *Port; /* Port from .gnokiirc file */ +char *Initlength; /* Init length from .gnokiirc file */ +char *Connection; /* Connection type from .gnokiirc file */ +char *SynchronizeTime; +char *BinDir; /* Directory of the mgnokiidev command */ + +bool TerminateThread; + +void version(void) +{ + + fprintf(stdout, _("gnokiid Version %s\n" +"Copyright (C) Hugh Blemings , 1999\n" +"Copyright (C) Pavel Janík ml. , 1999\n" +"Built %s %s for %s on %s \n"), VERSION, __TIME__, __DATE__, Model, Port); +} + +/* The function usage is only informative - it prints this program's usage and + command-line options.*/ + +void usage(void) +{ + + fprintf(stdout, _(" usage: gnokiid {--help|--version}\n" +" --help display usage information." +" --version displays version and copyright information." +" --debug uses stdin/stdout for virtual modem comms.\n")); +} + +/* Main function - handles command line arguments, passes them to separate + functions accordingly. */ + +int main(int argc, char *argv[]) +{ + + GSM_ConnectionType connection; + + /* For GNU gettext */ + + #ifdef USE_NLS + textdomain("gnokii"); + #endif + +#ifndef WIN32 + if (strcmp(GetMygnokiiVersion(),VERSION)!=0) + fprintf(stderr,_("WARNING: version of installed libmygnokii.so (%s) is different to version of gnokiid (%s)\n"),GetMygnokiiVersion(),VERSION); +#endif + + if (CFG_ReadConfig(&Model, &Port, &Initlength, &Connection, &BinDir, &SynchronizeTime,true) < 0) { + exit(-1); + } + + /* Handle command line arguments. */ + + if (argc >= 2 && strcmp(argv[1], "--help") == 0) { + usage(); + exit(0); + } + + /* Display version, copyright and build information. */ + + if (argc >= 2 && strcmp(argv[1], "--version") == 0) { + version(); + exit(0); + } + + if (argc >= 2 && strcmp(argv[1], "--debug") == 0) { + DebugMode = true; + } + else { + DebugMode = false; + } + + connection=GetConnectionTypeFromString(Connection); + + /* MBUS wasn't tested */ + if (connection!=GCT_FBUS && connection!=GCT_MBUS && + connection!=GCT_Infrared && connection!=GCT_Tekram) { + fprintf(stdout,_("Incorrect connection type!\n")); + exit(0); + } + + TerminateThread=false; + + if (VM_Initialise(Model, Port, Initlength, connection, BinDir, DebugMode, true, SynchronizeTime) == false) + exit (-1); + + while (1) { + if (TerminateThread==true) { + VM_Terminate(); + exit(1); + } + sleep (1); + } + exit (0); +} diff --git a/include/data/at-emulator.h b/include/data/at-emulator.h new file mode 100644 index 0000000..3f95297 --- /dev/null +++ b/include/data/at-emulator.h @@ -0,0 +1,97 @@ +/* + + $Id$ + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Header file for AT emulator code. + +*/ + +#ifndef __data_at_emulator_h +#define __data_at_emulator_h + + /* Prototypes */ +bool ATEM_Initialise(int read_fd, int write_fd, char *model, char *port); +void ATEM_HandleIncomingData(char *buffer, int length); +void ATEM_InitRegisters(void); +void ATEM_StringOut(char *buffer); +void ATEM_ParseAT(char *cmd_buffer); +void ATEM_ParseSMS(char *cmd_buffer); +void ATEM_ParseDIR(char *cmd_buffer); +bool ATEM_CommandPlusC(char **buf); +bool ATEM_CommandPlusG(char **buf); +int ATEM_GetNum(char **p); +void ATEM_ModemResult(int code); +void ATEM_CallPassup(char c); + + /* Global variables */ +bool ATEM_Initialised; + + /* Definition of modem result codes - these are returned to "terminal" + numerically or as a string depending on the setting of S12 */ + + /* FIX ME - Numeric values for everything except OK and ERROR + are guesses as I've not got an AT reference handy. HAB */ + +#define MR_OK (0) +#define MR_ERROR (4) +#define MR_NOCARRIER (5) +#define MR_CARRIER (2) +#define MR_CONNECT (3) +#define MR_RING (6) + + /* All defines and prototypes from here down are specific to + the at-emulator code and so are #ifdef out if __at_emulator_c isn't + defined. */ +#ifdef __data_at_emulator_c + + +#define MAX_CMD_BUFFERS (2) +#define CMD_BUFFER_LENGTH (100) + + /* Definition of some special Registers of AT-Emulator, pinched in + part from ISDN driver in Linux kernel */ +#define REG_RINGATA 0 +#define REG_RINGCNT 1 +#define REG_ESC 2 +#define REG_CR 3 +#define REG_LF 4 +#define REG_BS 5 +#define S35 6 + +#define REG_RESP 12 +#define BIT_RESP 1 +#define REG_RESPNUM 12 +#define BIT_RESPNUM 2 +#define REG_ECHO 12 +#define BIT_ECHO 4 +#define REG_DCD 12 +#define BIT_DCD 8 +#define REG_CTS 12 +#define BIT_CTS 16 +#define REG_DTRR 12 +#define BIT_DTRR 32 +#define REG_DSR 12 +#define BIT_DSR 64 +#define REG_CPPP 12 +#define BIT_CPPP 128 + + +#define MAX_MODEM_REGISTERS 20 + +/* Message format definitions */ +#define PDU_MODE 0 +#define TEXT_MODE 1 +#define INTERACT_MODE 2 + +#endif /* __data_at_emulator_c */ + +#endif /* __data_at_emulator_h */ + + + diff --git a/include/data/datapump.h b/include/data/datapump.h new file mode 100644 index 0000000..c1e48d1 --- /dev/null +++ b/include/data/datapump.h @@ -0,0 +1,38 @@ +/* + + $Id$ + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Header file for data pump code. + +*/ + +#ifndef __data_datapump_h +#define __data_datapump_h + + /* Prototypes */ + +void DP_CallFinished(void); +bool DP_Initialise(int read_fd, int write_fd); +int DP_CallBack(RLP_UserInds ind, u8 *buffer, int length); +void DP_CallPassup(char c); + + /* All defines and prototypes from here down are specific to + the datapump code and so are #ifdef out if __datapump_c isn't + defined. */ +#ifdef __data_datapump_c + + + + + + + +#endif /* __data_datapump_c */ + +#endif /* __data_datapump_h */ diff --git a/include/data/rlp-common.h b/include/data/rlp-common.h new file mode 100644 index 0000000..a03a497 --- /dev/null +++ b/include/data/rlp-common.h @@ -0,0 +1,182 @@ +/* + + $Id$ + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + The development of RLP protocol is sponsored by SuSE CR, s.r.o. (Pavel use + the SIM card from SuSE for testing purposes). + + Header file for RLP protocol. + +*/ + +#ifndef __data_rlp_common_h +#define __data_rlp_common_h + +#ifndef __misc_h + #include "misc.h" +#endif + +/* Global variables */ + +/* Defines */ + +/* Data types */ + +/* Typedef for frame type - they are the same for RLP version 0, 1 and 2. */ + +typedef enum { + RLPFT_X, /* Unknown. */ + RLPFT_U, /* Unnumbered frame. */ + RLPFT_S, /* Supervisory frame. */ + RLPFT_IS /* Information plus Supervisory (I+S) frame. */ +} RLP_FrameType; + +/* Define the various Unnumbered frame types. Numbering is bit reversed + relative to ETSI GSM 04.22 for easy parsing. */ + +typedef enum { + RLPU_SABM = 0x07, /* Set Asynchronous Balanced Mode. */ + RLPU_UA = 0x0c, /* Unnumbered Acknowledge. */ + RLPU_DISC = 0x08, /* Disconnect. */ + RLPU_DM = 0x03, /* Disconnected Mode. */ + RLPU_NULL = 0x0f, /* Null information. */ + RLPU_UI = 0x00, /* Unnumbered Information. */ + RLPU_XID = 0x17, /* Exchange Identification. */ + RLPU_TEST = 0x1c, /* Test. */ + RLPU_REMAP = 0x11 /* Remap. */ +} RLP_UFrameType; + +/* Define supervisory frame field. */ + +typedef enum { + RLPS_RR = 0x00, /* Receive Ready. */ + RLPS_REJ = 0x02, /* Reject. */ + RLPS_RNR = 0x01, /* Receive Not Ready. */ + RLPS_SREJ = 0x03 /* Selective Reject. */ +} RLP_SFrameField; + +/* Used for CurrentFrameType. */ + +typedef enum { + RLPFT_U_SABM = 0x00, + RLPFT_U_UA, + RLPFT_U_DISC, + RLPFT_U_DM, + RLPFT_U_NULL, + RLPFT_U_UI, + RLPFT_U_XID, + RLPFT_U_TEST, + RLPFT_U_REMAP, + RLPFT_S_RR, + RLPFT_S_REJ, + RLPFT_S_RNR, + RLPFT_S_SREJ, + RLPFT_SI_RR, + RLPFT_SI_REJ, + RLPFT_SI_RNR, + RLPFT_SI_SREJ, + RLPFT_BAD +} RLP_FrameTypes; + +/* Frame definition for TCH/F9.6 frame. */ + +typedef struct { + u8 Header[2]; + u8 Data[25]; + u8 FCS[3]; +} RLP_F96Frame; + +/* Header data "split up" for TCH/F9.6 frame. */ + +typedef struct { + u8 Ns; /* Send sequence number. */ + u8 Nr; /* Receive sequence number. */ + u8 M; /* Unumbered frame type. */ + u8 S; /* Status. */ + bool PF; /* Poll/Final. */ + bool CR; /* Command/Response. */ + RLP_FrameType Type; /* Frame type. */ +} RLP_F96Header; + + +/* RLP User requests */ + +typedef struct { + bool Conn_Req; + bool Attach_Req; + bool Conn_Req_Neg; + bool Reset_Resp; + bool Disc_Req; +} RLP_UserRequestStore; + +typedef enum { + Conn_Req, + Attach_Req, + Conn_Req_Neg, + Reset_Resp, + Disc_Req +} RLP_UserRequests; + +typedef enum { + Conn_Ind, + Conn_Conf, + Disc_Ind, + Reset_Ind, + Data, /* FIXME: This should really be called RLP_Data, otherwise it hogs name "Data"! */ + StatusChange, + GetData +} RLP_UserInds; + +/* RLP (main) states. See GSM specification 04.22 Annex A, Section A.1.1. */ + +typedef enum { + RLP_S0, /* ADM and Detached */ + RLP_S1, /* ADM and Attached */ + RLP_S2, /* Pending Connect Request */ + RLP_S3, /* Pending Connect Indication */ + RLP_S4, /* ABM and Connection Established */ + RLP_S5, /* Disconnect Initiated */ + RLP_S6, /* Pending Reset Request */ + RLP_S7, /* Pending Reset Indication */ + RLP_S8 /* Error */ +} RLP_State; + +/* RLP specification defines several states in which variables can be. */ + +typedef enum { + _idle=0, + _send, + _wait, + _rcvd, + _ackn, + _rej, + _srej +} RLP_StateVariable; + + +/* RLP Data */ + +typedef struct { + u8 Data[25]; + RLP_StateVariable State; +} RLP_Data; + + + +/* Prototypes for functions. */ + +void RLP_DisplayF96Frame(RLP_F96Frame *frame); +void RLP_DecodeF96Header(RLP_F96Frame *frame, RLP_F96Header *header); +void RLP_DisplayXID(u8 *frame); +void RLP_Initialise(bool (*rlp_send_function)(RLP_F96Frame *frame, bool out_dtx), int (*rlp_passup)(RLP_UserInds ind, u8 *buffer, int length)); +void RLP_Init_link_vars(void); +void RLP_SetUserRequest(RLP_UserRequests type, bool value); +void RLP_Send(char *buffer, int length); + +#endif /* __data_rlp_common_h */ diff --git a/include/data/rlp-crc24.h b/include/data/rlp-crc24.h new file mode 100644 index 0000000..6789510 --- /dev/null +++ b/include/data/rlp-crc24.h @@ -0,0 +1,27 @@ +/* + + $Id$ + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Header file for CRC24 (aka FCS) implementation in RLP. + +*/ + +#ifndef __data_rlp_crc24_h +#define __data_rlp_crc24_h + +#ifndef __misc_h + #include "misc.h" +#endif + +/* Prototypes for functions */ + +void RLP_CalculateCRC24Checksum(u8 *data, int length, u8 *crc); +bool RLP_CheckCRC24FCS(u8 *data, int length); + +#endif diff --git a/include/data/virtmodem.h b/include/data/virtmodem.h new file mode 100644 index 0000000..6fe838d --- /dev/null +++ b/include/data/virtmodem.h @@ -0,0 +1,37 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Header file for virtmodem code in virtmodem.c + +*/ + +#ifndef __virtmodem_h +#define __virtmodem_h + +/* Prototypes */ + +bool VM_Initialise(char *model, + char *port, + char *initlength, + GSM_ConnectionType connection, + char *bindir, + bool debug_mode, + bool GSM_Init, + char *synchronizetime); +int VM_PtySetup(char *bindir); +void VM_ThreadLoop(void); +void VM_CharHandler(void); +int VM_GetMasterPty(char **name); +void VM_Terminate(void); +GSM_Error VM_GSMInitialise(char *model, + char *port, + char *initlength, + GSM_ConnectionType connection, + char *synchronizetime); + +#endif /* __virtmodem_h */ diff --git a/include/devices/device.h b/include/devices/device.h new file mode 100644 index 0000000..5ad2dd3 --- /dev/null +++ b/include/devices/device.h @@ -0,0 +1,63 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Header file device access code. + +*/ + +#ifndef __device_h +#define __device_h + +#include "misc.h" + +/* Maximum length of device name for serial port */ +#define GSM_MAX_DEVICE_NAME_LENGTH (100) + +/* Type of connection. Now we support serial connection with FBUS cable and + IR (only with 61x0 models) and MBUS (61x0, 640, 6160) */ +typedef enum { + GCT_FBUS, /* FBUS connection. */ + GCT_Infrared, /* FBUS over direct infrared connection - 61xx. */ + GCT_Irda, /* FBUS over Irda sockets - 7110, 6210, etc. */ + GCT_MBUS, /* MBUS */ + GCT_DLR3, /* FBUS over DLR3 cable */ + GCT_Tekram, /* FBUS over direct infrared connection (Tekram device) - 61xx. */ + GCT_AT, /* AT commands */ + GCT_Default /* Old style module */ +} GSM_ConnectionType; + +#ifndef WIN32 + #include + #include "misc.h" + + int device_getfd(void); + + int device_open(__const char *__file, int __with_odd_parity); + void device_reset(void); + + size_t device_read(__ptr_t __buf, size_t __nbytes); + size_t device_write(__const __ptr_t __buf, size_t __n); + + #ifdef DEBUG + void device_dumpserial(void); + #endif +#else + size_t device_write(const __ptr_t __buf, size_t __n); +#endif + + void device_close(void); + + void device_setdtrrts(int __dtr, int __rts); + void device_changespeed(int __speed); + + +extern char PortDevice[GSM_MAX_DEVICE_NAME_LENGTH]; + +bool StartConnection (char *port_device, bool with_odd_parity, GSM_ConnectionType con); + +#endif /* __device_h */ diff --git a/include/devices/linuxirda.h b/include/devices/linuxirda.h new file mode 100644 index 0000000..e86fb5b --- /dev/null +++ b/include/devices/linuxirda.h @@ -0,0 +1,211 @@ +/********************************************************************* + * + * Filename: irda.h + * Version: 1.0 + * Description: IrDA header file to be used by IrDA applications + * Status: Experimental. + * Author: Dag Brattli + * Created at: Mon Mar 8 14:06:12 1999 + * Modified at: Sat Dec 25 16:07:54 1999 + * Modified by: Dag Brattli + * + * Copyright (c) 1999 Dag Brattli, All Rights Reserved. + * + * 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 2 of + * the License, or (at your option) any later version. + * + * Neither Dag Brattli nor University of Tromsø admit liability nor + * provide warranty for any of this software. This material is + * provided "AS-IS" and at no charge. + * + ********************************************************************/ + +/* + * $Id$ + * + */ + +#ifndef IRDA_H +#define IRDA_H + +#include +#include + +/* Hint bit positions for first hint byte */ +#define HINT_PNP 0x01 +#define HINT_PDA 0x02 +#define HINT_COMPUTER 0x04 +#define HINT_PRINTER 0x08 +#define HINT_MODEM 0x10 +#define HINT_FAX 0x20 +#define HINT_LAN 0x40 +#define HINT_EXTENSION 0x80 + +/* Hint bit positions for second hint byte (first extension byte) */ +#define HINT_TELEPHONY 0x01 +#define HINT_FILE_SERVER 0x02 +#define HINT_COMM 0x04 +#define HINT_MESSAGE 0x08 +#define HINT_HTTP 0x10 +#define HINT_OBEX 0x20 + +/* IrLMP character code values */ +#define CS_ASCII 0x00 +#define CS_ISO_8859_1 0x01 +#define CS_ISO_8859_2 0x02 +#define CS_ISO_8859_3 0x03 +#define CS_ISO_8859_4 0x04 +#define CS_ISO_8859_5 0x05 +#define CS_ISO_8859_6 0x06 +#define CS_ISO_8859_7 0x07 +#define CS_ISO_8859_8 0x08 +#define CS_ISO_8859_9 0x09 +#define CS_UNICODE 0xff + +/* These are the currently known dongles */ +typedef enum { + IRDA_TEKRAM_DONGLE = 0, + IRDA_ESI_DONGLE = 1, + IRDA_ACTISYS_DONGLE = 2, + IRDA_ACTISYS_PLUS_DONGLE = 3, + IRDA_GIRBIL_DONGLE = 4, + IRDA_LITELINK_DONGLE = 5, + IRDA_AIRPORT_DONGLE = 6, + IRDA_OLD_BELKIN_DONGLE = 7, +} IRDA_DONGLE; + +/* Protocol types to be used for SOCK_DGRAM */ +enum { + IRDAPROTO_UNITDATA = 0, + IRDAPROTO_ULTRA = 1, + IRDAPROTO_MAX +}; + +#define SOL_IRLMP 266 /* Same as SOL_IRDA for now */ +#define SOL_IRTTP 266 /* Same as SOL_IRDA for now */ + +#define IRLMP_ENUMDEVICES 1 +#define IRLMP_IAS_SET 2 +#define IRLMP_IAS_QUERY 3 +#define IRLMP_HINTS_SET 4 +#define IRLMP_QOS_SET 5 +#define IRLMP_QOS_GET 6 +#define IRLMP_MAX_SDU_SIZE 7 +#define IRLMP_IAS_GET 8 + +#define IRTTP_MAX_SDU_SIZE IRLMP_MAX_SDU_SIZE /* Compatibility */ + +/* LM-IAS Limits */ +#define IAS_MAX_STRING 256 +#define IAS_MAX_OCTET_STRING 1024 +#define IAS_MAX_CLASSNAME 64 +#define IAS_MAX_ATTRIBNAME 256 + +/* LM-IAS Attribute types */ +#define IAS_MISSING 0 +#define IAS_INTEGER 1 +#define IAS_OCT_SEQ 2 +#define IAS_STRING 3 + +#define LSAP_ANY 0xff +#define DEV_ADDR_ANY 0xffffffff + +struct sockaddr_irda { + sa_family_t sir_family; /* AF_IRDA */ + uint8_t sir_lsap_sel; /* LSAP selector */ + uint32_t sir_addr; /* Device address */ + char sir_name[25]; /* Usually :IrDA:TinyTP */ +}; + +struct irda_device_info { + uint32_t saddr; /* Address of local interface */ + uint32_t daddr; /* Address of remote device */ + char info[22]; /* Description */ + uint8_t charset; /* Charset used for description */ + uint8_t hints[2]; /* Hint bits */ +}; + +struct irda_device_list { + uint32_t len; + struct irda_device_info dev[1]; +}; + +struct irda_ias_set { + char irda_class_name[IAS_MAX_CLASSNAME]; + char irda_attrib_name[IAS_MAX_ATTRIBNAME]; + unsigned int irda_attrib_type; + union { + unsigned int irda_attrib_int; + struct { + unsigned short len; + u_char octet_seq[IAS_MAX_OCTET_STRING]; + } irda_attrib_octet_seq; + struct { + unsigned char len; + unsigned char charset; + unsigned char string[IAS_MAX_STRING]; + } irda_attrib_string; + } attribute; + uint32_t daddr; + +}; + +/* Some private IOCTL's (max 16) */ +#define SIOCSDONGLE (SIOCDEVPRIVATE + 0) +#define SIOCGDONGLE (SIOCDEVPRIVATE + 1) +#define SIOCSBANDWIDTH (SIOCDEVPRIVATE + 2) +#define SIOCSMEDIABUSY (SIOCDEVPRIVATE + 3) +#define SIOCGMEDIABUSY (SIOCDEVPRIVATE + 4) +#define SIOCGRECEIVING (SIOCDEVPRIVATE + 5) +#define SIOCSMODE (SIOCDEVPRIVATE + 6) +#define SIOCGMODE (SIOCDEVPRIVATE + 7) +#define SIOCSDTRRTS (SIOCDEVPRIVATE + 8) +#define SIOCGQOS (SIOCDEVPRIVATE + 9) + +/* No reason to include just because of this one ;-) */ +#define IRNAMSIZ 16 + +/* IrDA quality of service information (must not exceed 16 bytes) */ +struct if_irda_qos { + uint32_t baudrate; + uint16_t data_size; + uint16_t window_size; + uint16_t min_turn_time; + uint16_t max_turn_time; + uint8_t add_bofs; + uint8_t link_disc; +}; + +/* For setting RTS and DTR lines of a dongle */ +struct if_irda_line { + unsigned char dtr; + unsigned char rts; +}; + +/* IrDA interface configuration (data part must not exceed 16 bytes) */ +struct if_irda_req { + union { + char ifrn_name[IRNAMSIZ]; /* if name, e.g. "irda0" */ + } ifr_ifrn; + + /* Data part */ + union { + struct if_irda_line ifru_line; + struct if_irda_qos ifru_qos; + unsigned short ifru_flags; + unsigned int ifru_receiving; + unsigned int ifru_mode; + unsigned int ifru_dongle; + } ifr_ifru; +}; + +#define ifr_baudrate ifr_ifru.ifru_qos.baudrate +#define ifr_receiving ifr_ifru.ifru_receiving +#define ifr_dongle ifr_ifru.ifru_dongle +#define ifr_mode ifr_ifru.ifru_mode +#define ifr_dtr ifr_ifru.ifru_line.dtr +#define ifr_rts ifr_ifru.ifru_line.rts + +#endif /* IRDA_H */ diff --git a/include/devices/tekram.h b/include/devices/tekram.h new file mode 100644 index 0000000..36dfaf0 --- /dev/null +++ b/include/devices/tekram.h @@ -0,0 +1,64 @@ +/* + * $Id$ + * + * + * G N O K I I + * + * A Linux/Unix toolset and driver for Nokia mobile phones. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#ifndef __devices_tekram_h +#define __devices_tekram_h + +#ifdef WIN32 + #include + /* FIXME: this should be solved in config.h in 0.4.0 */ + #define __const const + typedef void * __ptr_t; +#else + #include +#endif /* WIN32 */ + +#include "misc.h" + + +#define TEKRAM_B115200 0x00 +#define TEKRAM_B57600 0x01 +#define TEKRAM_B38400 0x02 +#define TEKRAM_B19200 0x03 +#define TEKRAM_B9600 0x04 + +#define TEKRAM_PW 0x10 /* Pulse select bit */ + + +int tekram_open(__const char *__file); +void tekram_close(int __fd); + +void tekram_setdtrrts(int __fd, int __dtr, int __rts); +void tekram_changespeed(int __fd, int __speed); + +size_t tekram_read(int __fd, __ptr_t __buf, size_t __nbytes); +size_t tekram_write(int __fd, __const __ptr_t __buf, size_t __n); + +int tekram_select(int fd, struct timeval *timeout); + +#endif /* __devices_tekram_h */ + + + + diff --git a/include/devices/unixirda.h b/include/devices/unixirda.h new file mode 100644 index 0000000..a852f39 --- /dev/null +++ b/include/devices/unixirda.h @@ -0,0 +1,41 @@ +/* + * $Id$ + * + * G N O K I I + * + * A Linux/Unix toolset and driver for Nokia mobile phones. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library 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 + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the Free + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "linuxirda.h" +#include "misc.h" + +int irda_open(void); +int irda_close(int fd); +int irda_write(int __fd, __const __ptr_t __bytes, int __size); +int irda_read(int __fd, __ptr_t __bytes, int __size); +int irda_select(int fd, struct timeval *timeout); diff --git a/include/devices/unixserial.h b/include/devices/unixserial.h new file mode 100644 index 0000000..b044d43 --- /dev/null +++ b/include/devices/unixserial.h @@ -0,0 +1,44 @@ +/* + + $Id$ + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#ifndef __devices_unixserial_h +#define __devices_unixserial_h + +#ifdef WIN32 + #include + /* FIXME: this should be solved in config.h in 0.4.0 */ + #define __const const + typedef void * __ptr_t; +#else + #include +#endif /* WIN32 */ + +#include "misc.h" + +int serial_open(__const char *__file, int __oflag); +int serial_close(int __fd); + +int serial_opendevice(__const char *__file, int __with_odd_parity, int __with_async, int __with_hw_handshake); + +void serial_setdtrrts(int __fd, int __dtr, int __rts); +void serial_changespeed(int __fd, int __speed); + +size_t serial_read(int __fd, __ptr_t __buf, size_t __nbytes); +size_t serial_write(int __fd, __const __ptr_t __buf, size_t __n); + +int serial_select(int fd, struct timeval *timeout); + +#endif /* __devices_unixserial_h */ + + + + diff --git a/include/devices/winserial.h b/include/devices/winserial.h new file mode 100644 index 0000000..675aa73 --- /dev/null +++ b/include/devices/winserial.h @@ -0,0 +1,7 @@ +typedef void (*sigcallback)(char); +typedef void (*keepalive)(); + +int OpenConnection(char *szPort, sigcallback fn, keepalive ka); +int CloseConnection(); +int WriteCommBlock(LPSTR lpByte, DWORD dwBytesToWrite); + diff --git a/include/files/cfgreader.h b/include/files/cfgreader.h new file mode 100644 index 0000000..15513d7 --- /dev/null +++ b/include/files/cfgreader.h @@ -0,0 +1,52 @@ +/* + + $Id$ + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Header file for config file reader. + +*/ + +#ifndef _CFGREADER_H +#define _CFGREADER_H + +#ifndef WIN32 + #include "config.h" +#endif + +/* Structure definitions */ + +/* A linked list of key/value pairs */ + +struct CFG_Entry { + struct CFG_Entry *next, *prev; + char *key; + char *value; +}; + +struct CFG_Header { + struct CFG_Header *next, *prev; + struct CFG_Entry *entries; + char *section; +}; + +/* Function prototypes */ + +struct CFG_Header *CFG_ReadFile(char *filename); +char *CFG_Get(struct CFG_Header *cfg, char *section, char *key); +char *CFG_Set(struct CFG_Header *cfg, char *section, char *key, + char *value); +int CFG_WriteFile(struct CFG_Header *cfg, char *filename); + +int CFG_ReadConfig(char **model, char **port, char **initlength, + char **connection, char **bindir, char **synchronizetime, + bool isgnokiid); + +struct CFG_Header *CFG_FindGnokiirc(); + +#endif /* _CFGREADER_H */ diff --git a/include/files/gsm-filetypes.h b/include/files/gsm-filetypes.h new file mode 100644 index 0000000..3e998dc --- /dev/null +++ b/include/files/gsm-filetypes.h @@ -0,0 +1,102 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Functions to read and write common file types. + +*/ + +#include "gsm-api.h" +#include "gsm-calendar.h" +#include "gsm-ringtones.h" +#include "gsm-bitmaps.h" + +/* ---------- Calendar file --------- */ + +GSM_Error GSM_ReadVCalendarFile(char *FileName, GSM_CalendarNote *cnote, + int *number); + +int GetvCalTime(GSM_DateTime *dt, char *time); +int FillCalendarNote(GSM_CalendarNote *note, char *type, + char *text, char *time, char *alarm); + +/* ----------- Text files ----------- */ + +int GSM_SaveTextFile(char *FileName, char *text, int mode); + +/* ----------- Ringtones functions and constans ----------- */ + +int GetScale (char *num); +int GetDuration (char *num); + +/* Defines the character that separates fields in rtttl files. */ +#define RTTTL_SEP ":" + +/* ----------- Ringtones files ----------- */ + +GSM_Error GSM_ReadBinRingtoneFile(char *FileName, GSM_BinRingtone *ringtone); +GSM_Error GSM_SaveBinRingtoneFile(char *FileName, GSM_BinRingtone *ringtone); + +GSM_Error GSM_ReadRingtoneFile(char *FileName, GSM_Ringtone *ringtone); +GSM_Error GSM_SaveRingtoneFile(char *FileName, GSM_Ringtone *ringtone); + +void saverttl(FILE *file, GSM_Ringtone *ringtone); +void saveott(FILE *file, GSM_Ringtone *ringtone); +void savemid(FILE* file, GSM_Ringtone *ringtone); + +GSM_Error loadrttl(FILE *file, GSM_Ringtone *ringtone); +GSM_Error loadott(FILE *file, GSM_Ringtone *ringtone); +GSM_Error loadcommunicator(FILE *file, GSM_Ringtone *ringtone); + +/* ----------- Bitmap files ----------- */ + +GSM_Error GSM_ReadBitmapFile(char *FileName, GSM_Bitmap *bitmap); +GSM_Error GSM_SaveBitmapFile(char *FileName, GSM_Bitmap *bitmap); + +void savenol(FILE *file, GSM_Bitmap *bitmap); +void savengg(FILE *file, GSM_Bitmap *bitmap); +void savensl(FILE *file, GSM_Bitmap *bitmap); +void savenlm(FILE *file, GSM_Bitmap *bitmap); +void saveota(FILE *file, GSM_Bitmap *bitmap); +void savebmp(FILE *file, GSM_Bitmap *bitmap); +void savexpm(FILE *file, GSM_Bitmap *bitmap); + +GSM_Error loadngg(FILE *file, GSM_Bitmap *bitmap); +GSM_Error loadnol(FILE *file, GSM_Bitmap *bitmap); +GSM_Error loadnsl(FILE *file, GSM_Bitmap *bitmap); +GSM_Error loadnlm(FILE *file, GSM_Bitmap *bitmap); +GSM_Error loadota(FILE *file, GSM_Bitmap *bitmap); +GSM_Error loadbmp(FILE *file, GSM_Bitmap *bitmap); + +#ifdef XPM + GSM_Error loadxpm(char *filename, GSM_Bitmap *bitmap); +#endif + +/* ----------- Backup files ----------- */ + +GSM_Error GSM_ReadBackupFile(char *FileName, GSM_Backup *backup); +GSM_Error GSM_SaveBackupFile(char *FileName, GSM_Backup *backup); + +void savelmb(FILE *file, GSM_Backup *backup); + +GSM_Error loadlmb(FILE *file, GSM_Backup *backup); + +typedef enum { + None=0, + NOL, + NGG, + NSL, + NLM, + BMP, + OTA, + XPMF, + RTTL, + OTT, + MIDI, + COMMUNICATOR, + LMB +} GSM_Filetypes; diff --git a/include/files/midifile.h b/include/files/midifile.h new file mode 100644 index 0000000..009896f --- /dev/null +++ b/include/files/midifile.h @@ -0,0 +1 @@ +GSM_Error loadmid(char *filename, GSM_Ringtone *ringtone); diff --git a/include/gsm-api.h b/include/gsm-api.h new file mode 100644 index 0000000..7f45115 --- /dev/null +++ b/include/gsm-api.h @@ -0,0 +1,545 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Header file for the various functions, definitions etc. used to implement + the handset interface. See gsm-api.c for more details. + +*/ + +#ifndef __gsm_api_h +#define __gsm_api_h + +#include "misc.h" +#include "gsm-common.h" +#include "data/rlp-common.h" +#include "devices/device.h" +#include "gsm-phonebook.h" +#include "gsm-networks.h" +#include "gsm-bitmaps.h" +#include "gsm-datetime.h" +#include "gsm-calendar.h" +#include "gsm-sms.h" +#include "gsm-ringtones.h" +#include "gsm-wap.h" + +/* Undefined functions in fbus/mbus files */ +extern GSM_Error Unimplemented(void); +#define UNIMPLEMENTED (void *) Unimplemented +extern GSM_Error NotSupported(void); +#define NOTSUPPORTED (void *) NotSupported + +/* Define the structure used to hold pointers to the various API functions. + This is in effect the master list of functions provided by the gnokii API. + Modules containing the model specific code each contain one of these + structures which is "filled in" with the corresponding function within the + model specific code. If a function is not supported or not implemented, a + generic not implemented function is used to return a GE_NOTIMPLEMENTED + error code. */ + +typedef struct { + + /* FIXME: comment this. */ + + GSM_Error (*Initialise)( char *port_device, char *initlength, + GSM_ConnectionType connection, + void (*rlp_callback)(RLP_F96Frame *frame)); + + void (*DispatchMessage) (u16 MessageLength, u8 *MessageBuffer, u8 MessageType); + + void (*Terminate)(void); + + void (*KeepAlive)(void); + + GSM_Error (*GetMemoryLocation)( GSM_PhonebookEntry *entry ); + + GSM_Error (*WritePhonebookLocation)( GSM_PhonebookEntry *entry ); + + GSM_Error (*GetSpeedDial)( GSM_SpeedDial *entry); + + GSM_Error (*SetSpeedDial)( GSM_SpeedDial *entry); + + GSM_Error (*GetMemoryStatus)( GSM_MemoryStatus *Status); + + GSM_Error (*GetSMSStatus)( GSM_SMSStatus *Status); + + GSM_Error (*GetSMSCenter)( GSM_MessageCenter *MessageCenter ); + + GSM_Error (*SetSMSCenter)( GSM_MessageCenter *MessageCenter ); + + GSM_Error (*GetSMSMessage)( GSM_SMSMessage *Message ); + + GSM_Error (*DeleteSMSMessage)( GSM_SMSMessage *Message ); + + GSM_Error (*SendSMSMessage)( GSM_SMSMessage *Message); + + GSM_Error (*SaveSMSMessage)( GSM_SMSMessage *Message); + + /* If units is set to a valid GSM_RFUnits value, the code + will return level in these units if it is able. Otherwise + value will be returned as GRF_Arbitary. If phone doesn't + support GetRFLevel, function returns GE_NOTSUPPORTED */ + GSM_Error (*GetRFLevel)( GSM_RFUnits *units, float *level ); + + /* Works the same as GetRFLevel, except returns battery + level if known. */ + GSM_Error (*GetBatteryLevel)( GSM_BatteryUnits *units, float *level ); + + GSM_Error (*GetPowerSource)( GSM_PowerSource *source); + + GSM_Error (*GetDisplayStatus)( int *Status); + + GSM_Error (*EnterSecurityCode)( GSM_SecurityCode Code); + + GSM_Error (*GetSecurityCodeStatus)( int *Status ); + + GSM_Error (*GetSecurityCode)( GSM_SecurityCode *Code); + + GSM_Error (*GetIMEI)( char *imei ); + + GSM_Error (*GetRevision)( char *revision ); + + GSM_Error (*GetModel)( char *model ); + + GSM_Error (*GetDateTime)( GSM_DateTime *date_time); + + GSM_Error (*SetDateTime)( GSM_DateTime *date_time); + + GSM_Error (*GetAlarm)( int alarm_number, GSM_DateTime *date_time ); + + GSM_Error (*SetAlarm)( int alarm_number, GSM_DateTime *date_time ); + + GSM_Error (*DialVoice)( char *Number); + + GSM_Error (*DialData)( char *Number, char type, void (* callpassup)(char c)); + + GSM_Error (*GetIncomingCallNr)( char *Number ); + + GSM_Error (*GetNetworkInfo) ( GSM_NetworkInfo *NetworkInfo ); + + GSM_Error (*GetCalendarNote) ( GSM_CalendarNote *CalendarNote); + + GSM_Error (*WriteCalendarNote) ( GSM_CalendarNote *CalendarNote); + + GSM_Error (*DeleteCalendarNote) ( GSM_CalendarNote *CalendarNote); + + GSM_Error (*NetMonitor) ( unsigned char mode, char *Screen ); + + GSM_Error (*SendDTMF) ( char *String ); + + GSM_Error (*GetBitmap) ( GSM_Bitmap *Bitmap ); + + GSM_Error (*SetBitmap) ( GSM_Bitmap *Bitmap ); + + GSM_Error (*SetRingtone) ( GSM_Ringtone *ringtone , int *maxlength); + + GSM_Error (*SetBinRingtone) ( GSM_BinRingtone *ringtone); + + GSM_Error (*GetBinRingtone) ( GSM_BinRingtone *ringtone); + + GSM_Error (*Reset) ( unsigned char type ); + + GSM_Error (*GetProfile) ( GSM_Profile *Profile ); + + GSM_Error (*SetProfile) ( GSM_Profile *Profile ); + + bool (*SendRLPFrame) ( RLP_F96Frame *frame, bool out_dtx ); + + GSM_Error (*CancelCall) (); + + GSM_Error (*PressKey) (int key, int event); + + GSM_Error (*EnableDisplayOutput) (); + + GSM_Error (*DisableDisplayOutput) (); + + GSM_Error (*EnableCellBroadcast) (); + + GSM_Error (*DisableCellBroadcast) (); + + GSM_Error (*ReadCellBroadcast) ( GSM_CBMessage *Message ); + + GSM_Error (*PlayTone) (int Herz, u8 Volume); + + GSM_Error (*GetProductProfileSetting) ( GSM_PPS *PPS); + + GSM_Error (*SetProductProfileSetting) ( GSM_PPS *PPS); + + GSM_Error (*GetOperatorName) ( GSM_Network *operator); + + GSM_Error (*SetOperatorName) ( GSM_Network *operator); + + GSM_Error (*GetVoiceMailbox) ( GSM_PhonebookEntry *entry); + + GSM_Error (*PhoneTests) (); + + GSM_Error (*SimlockInfo) ( GSM_AllSimlocks *siml); + + GSM_Error (*GetCalendarNotesInfo) (GSM_NotesInfo *NotesInfo); + + GSM_Error (*GetSMSFolders) ( GSM_SMSFolders *folders); + + GSM_Error (*ResetPhoneSettings) (); + + GSM_Error (*GetWAPBookmark) ( GSM_WAPBookmark *bookmark); + + GSM_Error (*SetWAPBookmark) ( GSM_WAPBookmark *bookmark); + + GSM_Error (*GetWAPSettings) ( GSM_WAPSettings *settings); + + GSM_Error (*CallDivert) ( GSM_CallDivert *cd ); + + GSM_Error (*AnswerCall) (char s); + + GSM_Error (*GetManufacturer)( char *manufacturer ); + +} GSM_Functions; + +typedef struct { + + /* FIXME: comment this. */ + + GSM_Error (*Initialise)( char *port_device, char *initlength, + GSM_ConnectionType connection, + void (*rlp_callback)(RLP_F96Frame *frame)); + + int (*SendMessage) (u16 message_length, u8 message_type, u8 *buffer); + + int (*SendFrame) (u16 message_length, u8 message_type, u8 *buffer); + + int (*WritePhone) (u16 length, u8 *buffer); + + void (*Terminate)(void); + + void (*StateMachine)(unsigned char rx_byte); + +} GSM_Protocol; + +/* This structure is provided to allow common information about the particular + model to be looked up in a model independant way. Some of the values here + define minimum and maximum levels for values retrieved by the various Get + functions for example battery level. They are not defined as constants to + allow model specific code to set them during initialisation */ + +typedef struct { + + char *FBUSModels; /* Models covered by this type, pipe '|' delimited. */ + + char *MBUSModels; /* Models covered by this type, pipe '|' delimited. */ + + char *InfraredModels; /* Models covered by this type, pipe '|' delimited. */ + + char *DLR3Models; /* Models covered by this type, pipe '|' delimited. */ + + char *ATModels; /* Models covered by this type, pipe '|' delimited. */ + + char *IrdaModels; /* Models covered by this type, pipe '|' delimited. */ + + char *TekramModels; /* Models covered by this type, pipe '|' delimited. */ + +/* Minimum and maximum levels for RF signal strength. Units are as per the + setting of RFLevelUnits. The setting of RFLevelUnits indicates the + default or "native" units used. In the case of the 3110 and 6110 series + these are arbitrary, ranging from 0 to 4. */ + + float MaxRFLevel; + float MinRFLevel; + GSM_RFUnits RFLevelUnits; + +/* Minimum and maximum levels for battery level. Again, units are as per the + setting of GSM_BatteryLevelUnits. The value that BatteryLevelUnits is set + to indicates the "native" or default value that the phone supports. In the + case of the 3110 and 6110 series these are arbitrary, ranging from 0 to 4. */ + + float MaxBatteryLevel; + float MinBatteryLevel; + GSM_BatteryUnits BatteryLevelUnits; + +/* Information about date, time and alarm support. In case of alarm + information we provide value for the number of alarms supported. */ + + GSM_DateTimeSupport DateTimeSupport; + GSM_DateTimeSupport AlarmSupport; + int MaximumAlarms; +} GSM_Information; + +void NULL_Terminate(void); +void NULL_KeepAlive(); +bool NULL_WritePhone (u16 length, u8 *buffer); +void NULL_TX_DisplayMessage(u16 MessageLength, u8 *MessageBuffer); + +GSM_Error NULL_WaitUntil (int time, GSM_Error *value); +GSM_Error NULL_SendMessageSequence (int time, GSM_Error *value, + u16 message_length, u8 message_type, u8 *buffer); + +GSM_ConnectionType GetConnectionTypeFromString(char *Connection); + +bool GetMemoryTypeString(char *memorytext, GSM_MemoryType *type); +bool GetMemoryTypeID(char *memorytext, GSM_MemoryType *type); + +/* Define these as externs so that app code can pick them up. */ + +extern bool *GSM_LinkOK; +extern GSM_Information *GSM_Info; +extern GSM_Functions *GSM; +extern GSM_Protocol *Protocol; + +GSM_PhonebookEntry *CurrentPhonebookEntry; +GSM_Error CurrentPhonebookError; + +GSM_SpeedDial *CurrentSpeedDialEntry; +GSM_Error CurrentSpeedDialError; + +unsigned char Current_IMEI[GSM_MAX_IMEI_LENGTH]; +unsigned char Current_Revision[GSM_MAX_REVISION_LENGTH]; +unsigned char Current_Model[GSM_MAX_MODEL_LENGTH]; + +GSM_SMSMessage *CurrentSMSMessage; +GSM_Error CurrentSMSMessageError; +int CurrentSMSPointer; + +GSM_SMSFolders *CurrentSMSFolders; +GSM_Error CurrentSMSFoldersError; +int CurrentSMSFoldersCount; + +GSM_OneSMSFolder CurrentSMSFolder; +GSM_Error CurrentSMSFolderError; +int CurrentSMSFolderID; + +GSM_MemoryStatus *CurrentMemoryStatus; +GSM_Error CurrentMemoryStatusError; + +GSM_NetworkInfo *CurrentNetworkInfo; +GSM_Error CurrentNetworkInfoError; + +GSM_SMSStatus *CurrentSMSStatus; +GSM_Error CurrentSMSStatusError; + +GSM_MessageCenter *CurrentMessageCenter; +GSM_Error CurrentMessageCenterError; + +int *CurrentSecurityCodeStatus; +GSM_Error CurrentSecurityCodeError; +GSM_SecurityCode *CurrentSecurityCode; + +GSM_DateTime *CurrentDateTime; +GSM_Error CurrentDateTimeError; + +GSM_Error CurrentResetPhoneSettingsError; + +GSM_DateTime *CurrentAlarm; +GSM_Error CurrentAlarmError; + +GSM_CalendarNote *CurrentCalendarNote; +GSM_Error CurrentCalendarNoteError; + +GSM_NotesInfo CurrentCalendarNotesInfo,*CurrentCalendarNotesInfo2; +GSM_Error CurrentCalendarNotesInfoError; + +int *CurrentFirstCalendarFreePos; +GSM_Error CurrentFirstCalendarFreePosError; + +GSM_Error CurrentSetDateTimeError; +GSM_Error CurrentSetAlarmError; + +GSM_Error CurrentEnableExtendedCommandsError; + +int CurrentRFLevel, + CurrentBatteryLevel, + CurrentPowerSource; + +int CurrentDisplayStatus; +GSM_Error CurrentDisplayStatusError; + +char *CurrentNetmonitor; +GSM_Error CurrentNetmonitorError; + +GSM_Bitmap *CurrentGetBitmap; +GSM_Error CurrentGetBitmapError; + +GSM_Error CurrentSetBitmapError; + +GSM_Error CurrentSendDTMFError; + +GSM_Profile *CurrentProfile; +GSM_Error CurrentProfileError; + +GSM_Error CurrentDisplayOutputError; + +GSM_CBMessage *CurrentCBMessage; +GSM_Error CurrentCBError; + +int CurrentPressKeyEvent; +GSM_Error CurrentPressKeyError; + +GSM_Error CurrentPlayToneError; + +GSM_Error CurrentDialVoiceError; + +GSM_Error CurrentGetOperatorNameError; +GSM_Network *CurrentGetOperatorNameNetwork; +GSM_Error CurrentSetOperatorNameError; + +GSM_Error CurrentGetIMEIError; + +GSM_Error CurrentGetHWError; + +unsigned char CurrentPPS[4]; +GSM_Error CurrentProductProfileSettingsError; + +char CurrentIncomingCall[20]; + +GSM_Error CurrentBinRingtoneError; +GSM_BinRingtone *CurrentGetBinRingtone; + +GSM_Error CurrentRingtoneError; + +GSM_Error CurrentMagicError; + +GSM_Error CurrentSimlockInfoError; +GSM_AllSimlocks *CurrentSimLock; + +GSM_Error CurrentGetWAPBookmarkError; +GSM_Error CurrentSetWAPBookmarkError; +GSM_WAPBookmark *WAPBookmark; + +GSM_Error CurrentGetWAPSettingsError; +GSM_WAPSettings *WAPSettings; + +GSM_Error CurrentCallDivertError; +GSM_CallDivert *CurrentCallDivert; + +char *CurrentManufacturer; + +/* This is the connection type used in gnokii. */ +GSM_ConnectionType CurrentConnectionType; + +/* Pointer to a callback function used to return changes to a calls status */ +/* This saves unreliable polling */ +void (*CurrentCallPassup)(char c); + +/* Pointer to callback function in user code to be called when RLP frames + are received. */ +void (*CurrentRLP_RXCallback)(RLP_F96Frame *frame); + +/* Used to disconnect the call */ +u8 CurrentCallSequenceNumber; + +bool CurrentLinkOK; + +bool CurrentRequestTerminate; + +bool CurrentDisableKeepAlive; + +/* Prototype for the functions actually provided by gsm-api.c. */ + +GSM_Error GSM_Initialise(char *model, char *device, char *initlength, GSM_ConnectionType connection, void (*rlp_callback)(RLP_F96Frame *frame), char* SynchronizeTime); + +bool CheckModel (GSM_Information InfoToCheck, char *model, GSM_ConnectionType connection); + +char *GetMygnokiiVersion(); + +typedef enum { + F_CAL61=0,/*Calendar in 6110 style - 4 types,...*/ + F_CAL33, /*Calendar in 3310 style - 10 reminders, Unicode, 3 coding types*/ + F_CAL71, /*Calendar in 7110 style - 4 types, recurrance, etc.*/ + + F_PBK33SIM,/*Phonebook in Unicode(3310 style).Name and number.No internal*/ + F_PBK33INT,/*Phonebook in Unicode(3310 style).Name and number.Internal available*/ + F_PBK71INT,/*Extended phonebook-multiple numbers,Unicode(7110 style).Internal available*/ + F_PBK61INT,/*Name and number,no Unicode(6110 style).Internal available*/ + + F_DATA61, /*We can make data calls using gnokiid. Like in 6110*/ + F_DATA71, /*Datacalls using AT commands*/ + + F_SMS, /*SMS with Inbox, Outbox*/ + F_SMS71, /*SMS with SMS folders like in 7110*/ /*10*/ + + F_AUTH, /*We can make authentication and have "Accessory connected" like in 6110*/ + F_NETMON, /*Netmonitor available*/ + F_CALER61,/*Caller groups in 6110 style - 5 groups with members*/ + F_KEYB, /*We can press keys*/ + F_SMSCDEF,/*SMSC can have default recipient*/ + F_SPEED, /*We can handle speed dials*/ + F_SCRSAV, /*We have screen savers*/ + F_DTMF, /*We can handle DTMF sequences*/ + F_NOPOWER,/*We must get power/battery info from netmonitor*/ + + F_STANIM, /*Startup logo animated or static*/ /*20*/ + F_STA , /*Startup logo static*/ + F_STA62 , /*Startup logo static size 6210*/ + F_STA71 , /*Startup logo static size 7110*/ + + F_PROF61, /*Profiles numbered like in N6110*/ + F_PROF51, /*Profiles numbered like in N5110*/ + F_PROF33, /*Profiles numbered like in N3310.Unicode names*/ + + F_RING_SM,/*Binary ringtone in Smart Messaging*/ + F_RINGBIN,/*Binary ringtone in binary format*/ + + F_WAP /*WAP functions available*/ +} feat_index; + +typedef enum { + FN_CALENDAR=0, + FN_NETMONITOR, + FN_CALLERGROUPS, + FN_PHONEBOOK, + FN_AUTHENTICATION, + FN_DATACALLS, + FN_KEYPRESS, + FN_SMSCDEFAULT, + FN_SPEEDDIAL, + FN_SCREENSAVER, + FN_DTMF, /*10*/ + FN_SMS, + FN_NOPOWERFRAME, + FN_STARTUP, + FN_PROFILES, + FN_RINGTONES, + FN_WAP, + FN_RINGNUMBER +} featnum_index; + +/* For models table */ +typedef struct { + char *model; + char *number; + feat_index features[18]; +} OnePhoneModel; + +extern char *GetModelName (); +int GetModelFeature (featnum_index num); + +extern bool AppendLog(u8 *buffer, int length,bool format); +extern bool AppendLogText(u8 *buffer,bool format); + +typedef struct { + int SIMPhonebookUsed; + int SIMPhonebookSize; + GSM_PhonebookEntry SIMPhonebook[250]; + + int PhonePhonebookUsed; + int PhonePhonebookSize; + GSM_PhonebookEntry PhonePhonebook[500]; + + bool CallerAvailable; + GSM_Bitmap CallerGroups[5]; + + bool SpeedAvailable; + GSM_SpeedDial SpeedDials[8]; + + bool OperatorLogoAvailable; + GSM_Bitmap OperatorLogo; + + bool StartupLogoAvailable; + GSM_Bitmap StartupLogo; + + GSM_Bitmap StartupText; +} GSM_Backup; + +#endif /* __gsm_api_h */ diff --git a/include/gsm-bitmaps.h b/include/gsm-bitmaps.h new file mode 100644 index 0000000..9d40713 --- /dev/null +++ b/include/gsm-bitmaps.h @@ -0,0 +1,60 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Functions for manipulating bitmaps + +*/ + +#ifndef __gsm_bitmaps_h +#define __gsm_bitmaps_h + +#include "gsm-sms.h" + +/* Bitmap types. */ +typedef enum { + GSM_None=0, + GSM_StartupLogo, /*size 84*48*/ + GSM_OperatorLogo, /*size 72*14*/ + GSM_CallerLogo, /*size 72*14*/ + GSM_PictureImage, /*size 72*28*/ + GSM_7110OperatorLogo, /*size 78*21*/ + GSM_7110StartupLogo, /*size 96*65*/ + GSM_6210StartupLogo, /*size 96*60*/ + GSM_WelcomeNoteText, + GSM_DealerNoteText +} GSM_Bitmap_Types; + +#define MAX_BITMAP_TEXT_LENGTH 256 + +/* Structure to hold incoming/outgoing bitmaps (and welcome-notes). */ +typedef struct { + u8 height; /* Bitmap height (pixels) */ + u8 width; /* Bitmap width (pixels) */ + u16 size; /* Bitmap size (bytes) */ + GSM_Bitmap_Types type; /* Bitmap type */ + char netcode[7]; /* Network operator code */ + char text[MAX_BITMAP_TEXT_LENGTH]; /* Text used for (dealer) welcome-note + or callergroup name or Picture Image text */ + unsigned char bitmap[864]; /* Actual Bitmap ((65+7)/8*96=864) */ + unsigned char number; /* Caller group number */ + char ringtone; /* Ringtone no sent with caller group */ + bool enabled; /* With caller logos = displayed or not */ + char Sender[GSM_MAX_SENDER_LENGTH+1];/* For Picture Images - number of sender */ +} GSM_Bitmap; + +void GSM_SetPointBitmap(GSM_Bitmap *bmp, int x, int y); +void GSM_ClearPointBitmap(GSM_Bitmap *bmp, int x, int y); +bool GSM_IsPointBitmap(GSM_Bitmap *bmp, int x, int y); +void GSM_ClearBitmap(GSM_Bitmap *bmp); +void GSM_ResizeBitmap(GSM_Bitmap *bitmap, GSM_Bitmap_Types target); +void GSM_PrintBitmap(GSM_Bitmap *bitmap); +GSM_Error GSM_ReadBitmap(GSM_SMSMessage *message, GSM_Bitmap *bitmap); +int GSM_SaveBitmapToSMS(GSM_MultiSMSMessage *SMS, GSM_Bitmap *bitmap,bool ScreenSaver, bool UnicodeText); +int GSM_GetBitmapSize(GSM_Bitmap *bitmap); + +#endif diff --git a/include/gsm-calendar.h b/include/gsm-calendar.h new file mode 100644 index 0000000..310088a --- /dev/null +++ b/include/gsm-calendar.h @@ -0,0 +1,61 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#ifndef __gsm_calendar_h +#define __gsm_calendar_h + +#include "gsm-datetime.h" +#include "gsm-sms.h" + +/* Define enums for Calendar Note types */ +typedef enum { + GCN_REMINDER=1, /* Reminder */ + GCN_CALL, /* Call */ + GCN_MEETING, /* Meeting */ + GCN_BIRTHDAY /* Birthday */ +} GSM_CalendarNoteType; + +#define MAX_CALENDAR_TEXT_LENGTH 0x3a /* In 6210 max. 48 chars. 10 more precaution bytes*/ +#define MAX_CALENDAR_PHONE_LENGTH 0x24 + +/* Calendar note type */ + +typedef struct { + int Location; /* The number of the note in the phone memory */ + GSM_CalendarNoteType Type; /* The type of the note */ + GSM_DateTime Time; /* The time of the note */ + GSM_DateTime Alarm; /* The alarm of the note */ + char Text[MAX_CALENDAR_TEXT_LENGTH+1]; /* The text of the note */ + char Phone[MAX_CALENDAR_PHONE_LENGTH+1]; /* For Call only: the phone number */ + + /* the following are only used for N7110/N6210 */ + int Recurrance; /* after how many hours note repeats. 0x0000 = No Repeat */ + int YearOfBirth; /* Only in GCN_BIRTHDAY for 62/71 - The Year of birth of recurrance */ + u8 AlarmType; /* Only in GCN_BIRTHDAY for 62/71 - 0x00 = Tone, 0x01 = Silent */ + + bool ReadNotesInfo; /* Important in 6210/7110 - if we should read notes info or not */ +} GSM_CalendarNote; + +/* NotesInfo type : Nowadays only N6210/7110 */ +#define MAX_NOTES_INFO_ELEMS 1024 + +typedef struct { + u16 HowMany; /* How many notes info used */ + u16 Location[MAX_NOTES_INFO_ELEMS]; /* In N6210/7110 adresses for notes */ +} GSM_NotesInfo; + +char *GSM_GetVCALENDARStart(int version); +char *GSM_GetVCALENDARNote(GSM_CalendarNote *note, int version); +char *GSM_GetVCALENDAREnd(int version); + +int GSM_SaveCalendarNoteToSMS(GSM_MultiSMSMessage *SMS, + GSM_CalendarNote *note); + +#endif /* __gsm_calendar_h */ diff --git a/include/gsm-coding.h b/include/gsm-coding.h new file mode 100644 index 0000000..3414f1f --- /dev/null +++ b/include/gsm-coding.h @@ -0,0 +1,36 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#ifndef __gsm_coding_h +#define __gsm_coding_h + +extern void EncodeDefault (unsigned char* dest, const unsigned char* src, int len); +extern void DecodeDefault (unsigned char* dest, const unsigned char* src, int len); +extern void EncodeUnicode (unsigned char* dest, const unsigned char* src, int len); +extern void DecodeUnicode (unsigned char* dest, const unsigned char* src, int len); +extern void EncodeUTF8 (unsigned char* dest, const unsigned char* src, int len); +extern void DecodeUTF8 (unsigned char* dest, const unsigned char* src, int len); +extern void DecodeHexBin (unsigned char* dest, const unsigned char* src, int len); +extern void EncodeHexBin (unsigned char* dest, const unsigned char* src, int len); +extern void DecodeBCD (unsigned char* dest, const unsigned char* src, int len); +extern void EncodeBCD (unsigned char* dest, const unsigned char* src, int len, bool fill); + +extern unsigned char EncodeWithDefaultAlphabet(unsigned char); +extern unsigned char DecodeWithDefaultAlphabet(unsigned char); +extern wchar_t EncodeWithUnicodeAlphabet(unsigned char); +extern unsigned char DecodeWithUnicodeAlphabet(wchar_t); +extern void DecodeWithUTF8Alphabet (u8 mychar3, u8 mychar4, u8 *ret); +extern bool EncodeWithUTF8Alphabet (u8 mychar, u8 *ret1, u8 *ret2); +extern int DecodeWithHexBinAlphabet (unsigned char mychar); +extern unsigned char EncodeWithHexBinAlphabet (int digit); +extern unsigned char EncodeWithBCDAlphabet (int value); +extern int DecodeWithBCDAlphabet (unsigned char value); + +#endif diff --git a/include/gsm-common.h b/include/gsm-common.h new file mode 100644 index 0000000..a87900f --- /dev/null +++ b/include/gsm-common.h @@ -0,0 +1,327 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Header file for the definitions, enums etc. that are used by all models of + handset. + +*/ + +#ifndef __gsm_common_h +#define __gsm_common_h + +#include "misc.h" + +#define MYGNOKII + +/* Maximum length of SMS center name */ +#define GSM_MAX_SMS_CENTER_NAME_LENGTH (20) + +/* Limits of SMS messages. */ +#define GSM_MAX_SMS_CENTER_LENGTH (40) +#define GSM_MAX_RECIPIENT_LENGTH (40) +#define GSM_MAX_SENDER_LENGTH (40) +#define GSM_MAX_DESTINATION_LENGTH (40) +#define GSM_MAX_SMS_LENGTH (160) +#define GSM_MAX_SMS_8_BIT_LENGTH (140) +#define GSM_MAX_USER_DATA_HEADER_LENGTH (140) +/* The maximum length of an uncompressed concatenated short message is + 255 * 153 = 39015 default alphabet characters */ +#define GSM_MAX_CONCATENATED_SMS_LENGTH (39015) + +#define GSM_MAX_CB_MESSAGE (160) + +/* Correct for phones in fbus-6110.c */ +/* For other translation could be required */ +#define PHONEKEY_1 0x01 +#define PHONEKEY_2 0x02 +#define PHONEKEY_3 0x03 +#define PHONEKEY_4 0x04 +#define PHONEKEY_5 0x05 +#define PHONEKEY_6 0x06 +#define PHONEKEY_7 0x07 +#define PHONEKEY_8 0x08 +#define PHONEKEY_9 0x09 +#define PHONEKEY_0 0x0a +#define PHONEKEY_HASH 0x0b /* # */ +#define PHONEKEY_ASTERISK 0x0c /* * */ +#define PHONEKEY_POWER 0x0d +#define PHONEKEY_INCREASEVOLUME 0x10 /* doesn't available in some phones as separate button: ie. N5110 */ +#define PHONEKEY_DECREASEVOLUME 0x11 /* doesn't available in some phones as separate button: ie. N5110 */ +#define PHONEKEY_UP 0x17 +#define PHONEKEY_DOWN 0x18 +#define PHONEKEY_MENU 0x19 +#define PHONEKEY_NAMES 0x1a /* doesn't available in some phone: ie. N5110 */ +#define PHONEKEY_GREEN 0x0e /* in some phone ie. N5110 sometimes works identical to POWER */ +#define PHONEKEY_RED 0x0f /* (c) key in some phone: ie. N5110 */ + +/* Correct for phones in fbus-6110.c */ +/* For other translation could be required */ +#define PRESSPHONEKEY 0x01 +#define RELEASEPHONEKEY 0x02 + +/* Limits for IMEI, Revision and Model string storage. */ +#define GSM_MAX_IMEI_LENGTH (20) +#define GSM_MAX_REVISION_LENGTH (20) +#define GSM_MAX_MODEL_LENGTH (10) + +/* In 6210 test 57 there seems to be 75 chars */ +#define NM_MAX_SCREEN_WIDTH 75 + +/* Power source types */ +typedef enum { + GPS_ACDC=1, /* AC/DC powered (charging) */ + GPS_BATTERY /* Internal battery */ +} GSM_PowerSource; + +/* Definition of security codes. */ +typedef enum { + GSCT_SecurityCode = 0x01, /* Security code. */ + GSCT_Pin, /* PIN. */ + GSCT_Pin2, /* PIN 2. */ + GSCT_Puk, /* PUK. */ + GSCT_Puk2, /* PUK 2. */ + GSCT_None /* Code not needed. */ +} GSM_SecurityCodeType; + +/* Security code definition. */ +typedef struct { + GSM_SecurityCodeType Type; /* Type of the code. */ + char Code[10]; /* Actual code. */ +} GSM_SecurityCode; + +/* Define an enum for specifying memory types for retrieving phonebook + entries, SMS messages etc. This type is not mobile specific - the model + code should take care of translation to mobile specific numbers - see 6110 + code. + 01/07/99: Two letter codes follow GSM 07.07 release 6.2.0 +*/ +typedef enum { + GMT_ME, /* Internal memory of the mobile equipment */ + GMT_SM, /* SIM card memory */ + GMT_FD, /* Fixed dial numbers */ + GMT_ON, /* Own numbers */ + GMT_EN, /* Emergency numbers */ + GMT_DC, /* Dialled numbers */ + GMT_RC, /* Received numbers */ + GMT_MC, /* Missed numbers */ + GMT_LD, /* Last dialed */ + GMT_MT, /* combined ME and SIM phonebook */ + GMT_TA, /* for compatibility only: TA=computer memory */ + GMT_CB, /* Currently selected memory */ + GMT_CG, /* Caller groups */ + GMT_XX = 0xff /* Error code for unknown memory type (returned by fbus-xxxx functions. */ +} GSM_MemoryType; + +/* This define speed dialing entries. */ +typedef struct { + int Number; /* Which number is used to dialing? */ + GSM_MemoryType MemoryType; /* Memory type of the number. */ + int Location; /* Location of the number in MemoryType. */ +} GSM_SpeedDial; + +/* Define enums for Battery units. */ +typedef enum { + GBU_Arbitrary, + GBU_Volts, + GBU_Minutes, + GBU_Percentage +} GSM_BatteryUnits; + +/* This enum is used for display status. */ + +typedef enum { + DS_Call_In_Progress, /* Call in progress. */ + DS_Unknown, /* The meaning is unknown now :-( */ + DS_Unread_SMS, /* There is Unread SMS. */ + DS_Voice_Call, /* Voice call active. */ + DS_Fax_Call, /* Fax call active. */ + DS_Data_Call, /* Data call active. */ + DS_Keyboard_Lock, /* Keyboard lock status. */ + DS_SMS_Storage_Full /* Full SMS Memory. */ +} DisplayStatusEntity; + +/* Constants for Profiles. */ + +#define PROFILE_MESSAGE_NOTONE 0x00 +#define PROFILE_MESSAGE_STANDARD 0x01 +#define PROFILE_MESSAGE_SPECIAL 0x02 +#define PROFILE_MESSAGE_BEEPONCE 0x03 +#define PROFILE_MESSAGE_ASCENDING 0x04 + +#define PROFILE_WARNING_OFF 0xff +#define PROFILE_WARNING_ON 0x04 + +#define PROFILE_CALLALERT_RINGING 0x01 +#define PROFILE_CALLALERT_BEEPONCE 0x02 +#define PROFILE_CALLALERT_OFF 0x04 +#define PROFILE_CALLALERT_RINGONCE 0x05 +#define PROFILE_CALLALERT_ASCENDING 0x06 +#define PROFILE_CALLALERT_CALLERGROUPS 0x07 + +#define PROFILE_KEYPAD_OFF 0xff +#define PROFILE_KEYPAD_LEVEL1 0x00 +#define PROFILE_KEYPAD_LEVEL2 0x01 +#define PROFILE_KEYPAD_LEVEL3 0x02 +//in 5110 I had also once 0x03 + +#define PROFILE_VOLUME_LEVEL1 0x06 +#define PROFILE_VOLUME_LEVEL2 0x07 +#define PROFILE_VOLUME_LEVEL3 0x08 +#define PROFILE_VOLUME_LEVEL4 0x09 +#define PROFILE_VOLUME_LEVEL5 0x0a + +#define PROFILE_CALLERGROUPS_ALL 0xff +#define PROFILE_CALLERGROUPS_FAMILY 0x01 +#define PROFILE_CALLERGROUPS_VIP 0x02 +#define PROFILE_CALLERGROUPS_FRIENDS 0x04 +#define PROFILE_CALLERGROUPS_COLLEAGUES 0x08 +#define PROFILE_CALLERGROUPS_OTHERS 0x10 + +#define PROFILE_VIBRATION_OFF 0x00 +#define PROFILE_VIBRATION_ON 0x01 +#define PROFILE_VIBRATION_FIRST 0x02 + +/* Structure to hold profile entries. */ + +typedef struct { + int Number; /* The number of the profile. */ + char Name[40]; /* The name of the profile. */ + int DefaultName; /* 0-6, when default name is used, -1, when not */ + int KeypadTone; /* Volumen level for keypad tones. */ + int Lights; /* Lights on/off. */ + int CallAlert; /* Incoming call alert. */ + int Ringtone; /* Ringtone for incoming call alert. */ + int Volume; /* Volume of the ringing. */ + int MessageTone; /* The tone for message indication. */ + int WarningTone; /* The tone for warning messages. */ + int Vibration; /* Vibration? */ + int CallerGroups; /* CallerGroups. */ + int ScreenSaver; /* ScreenSaver */ + int AutomaticAnswer; /* Does the phone auto-answer incoming call? */ +} GSM_Profile; + +typedef enum { + PPS_ALS=0, + PPS_HRData, + PPS_14400Data, + PPS_LCDContrast, + PPS_EFR, + PPS_FR, + PPS_HR, + PPS_GamesMenu, /* N3210 5.26 and higher */ + PPS_VibraMenu /* N3210 */ +} GSM_PPS_Settings; + +typedef struct { + GSM_PPS_Settings Name; + bool bool_value; + int int_value; +} GSM_PPS; + +typedef struct { + char data[10+1];//detailed info about this simlock + bool enabled; //is enabled or not ? + int counter; //how many times user tried to disable simlock using keypad + bool factory; //is factory simlock ? +} GSM_OneSimlock; + +typedef struct { + GSM_OneSimlock simlocks[4]; +} GSM_AllSimlocks; + +/* Data structures for the call divert */ +typedef enum { + GSM_CDV_Busy = 0x01, /* Divert when busy */ + GSM_CDV_NoAnswer, /* Divert when not answered */ + GSM_CDV_OutOfReach, /* Divert when phone off or no coverage */ + GSM_CDV_AllTypes /* Divert all calls without ringing */ +} GSM_CDV_DivertTypes; + +typedef enum { + GSM_CDV_VoiceCalls = 0x01, + GSM_CDV_FaxCalls, + GSM_CDV_DataCalls, + GSM_CDV_AllCalls +} GSM_CDV_CallTypes; + +/* See GSM 02.82 for diverts types */ +typedef enum { + GSM_CDV_Disable = 0x00, + GSM_CDV_Enable = 0x01, + GSM_CDV_Query = 0x02, /* Is concrete divert enabled ? */ + GSM_CDV_Register = 0x03, /* Sets divert */ + GSM_CDV_Erasure = 0x04 /* Erase concrete divert */ +} GSM_CDV_Opers; + +typedef struct { + GSM_CDV_DivertTypes DType; + GSM_CDV_CallTypes CType; + GSM_CDV_Opers Operation; + char Number[GSM_MAX_SENDER_LENGTH + 1]; + unsigned int Timeout; + bool Enabled; +} GSM_CallDivert; + +/* Define standard GSM error/return code values. These codes are also used for + some internal functions such as SIM read/write in the model specific code. */ + +typedef enum { + GE_NONE = 0, /* No error. */ + GE_DEVICEOPENFAILED, /* Couldn't open specified serial device. */ + GE_UNKNOWNMODEL, /* Model specified isn't known/supported. */ + GE_NOTSUPPORTED, /* We are sure, that function not supported by phone model */ + GE_NOLINK, /* Couldn't establish link with phone. */ + GE_TIMEOUT, /* Command timed out. */ + GE_TRYAGAIN, /* Try again. */ + GE_INVALIDSECURITYCODE, /* Invalid Security code. */ + GE_NOTIMPLEMENTED, /* Command called isn't implemented in model. */ + GE_INVALIDSMSLOCATION, /* Invalid SMS location. */ + GE_INVALIDPHBOOKLOCATION, /* Invalid phonebook location. */ /*10*/ + GE_INVALIDMEMORYTYPE, /* Invalid type of memory. */ + GE_INVALIDSPEEDDIALLOCATION, /* Invalid speed dial location. */ + GE_INVALIDCALNOTELOCATION,/* Invalid calendar note location. */ + GE_INVALIDDATETIME, /* Invalid date, time or alarm specification. */ + GE_EMPTYSMSLOCATION, /* SMS location is empty. */ + GE_PHBOOKNAMETOOLONG, /* Phonebook name is too long. */ + GE_PHBOOKNUMBERTOOLONG, /* Phonebook number is too long. */ + GE_PHBOOKWRITEFAILED, /* Phonebook write failed. */ + GE_SMSSENDOK, /* SMS was send correctly. */ + GE_SMSSENDFAILED, /* SMS send fail. */ /*20*/ + GE_SMSWAITING, /* Waiting for the next part of SMS. */ + GE_SMSTOOLONG, /* SMS message too long. */ + GE_NONEWCBRECEIVED, /* Attempt to read CB when no new CB received */ + GE_INTERNALERROR, /* Problem occured internal to model specific code. */ + GE_CANTOPENFILE, /* Can't open file with bitmap/ringtone */ + GE_WRONGNUMBEROFCOLORS, /* Wrong number of colors in specified bitmap file */ + GE_WRONGCOLORS, /* Wrong colors in bitmap file */ + GE_INVALIDFILEFORMAT, /* Invalid format of file */ + GE_SUBFORMATNOTSUPPORTED, /* Subformat of file not supported */ + GE_TOOSHORT, /* Too short file, structure, etc. to read */ /*30*/ + GE_TOOLONG, /* Too long file, structure, etc. to read */ + GE_INVALIDIMAGESIZE, /* Invalid size of bitmap (in file, etc.) */ + GE_BUSY, /* Command is still being executed. */ + GE_UNKNOWN, /* Unknown error - well better than nothing!! */ /*34*/ + GE_NOACCESS, + GE_USERCANCELED, + GE_MEMORYFULL, + GE_INVALIDRINGLOCATION, + GE_INSIDEBOOKMARKSMENU, + GE_INVALIDBOOKMARKLOCATION, + GE_INSIDESETTINGSMENU, + GE_INVALIDSETTINGSLOCATION, + + /* The following are here in anticipation of data call requirements. */ + + GE_LINEBUSY, /* Outgoing call requested reported line busy */ + GE_NOCARRIER, /* No Carrier error during data call setup ? */ + GE_SMSSAVEFAILED, /* save sms failed */ + GE_SMSISINMEM, /* sms is already in memory */ + GE_BUSYSMSLOCATION /* there is a sms at the requested sms location */ +} GSM_Error; + +#endif /* __gsm_common_h */ diff --git a/include/gsm-datetime.h b/include/gsm-datetime.h new file mode 100644 index 0000000..9dc8b9f --- /dev/null +++ b/include/gsm-datetime.h @@ -0,0 +1,42 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#ifndef __gsm_datetime_h +#define __gsm_datetime_h + +/* Define enum used to describe what sort of date/time support is + available. */ +typedef enum { + GDT_None, /* The mobile phone doesn't support time and date. */ + GDT_TimeOnly, /* The mobile phone supports only time. */ + GDT_DateOnly, /* The mobile phone supports only date. */ + GDT_DateTime /* Wonderful phone - it supports date and time. */ +} GSM_DateTimeSupport; + +/* Structure used for passing dates/times to date/time functions such as + GSM_GetTime and GSM_GetAlarm etc. */ +typedef struct { + bool IsSet; /* for time=is set and available ? for alarm=is set ? */ + int Year; /* The complete year specification - e.g. 1999. Y2K :-) */ + int Month; /* January = 1 */ + int Day; + int Hour; + int Minute; + int Second; + int Timezone; /* The difference between local time and GMT */ +} GSM_DateTime; + +char *DayOfWeek (int year, int month, int day); +void GetMachineDateTime( char nowdate[], char nowtime[] ); + +void EncodeDateTime(unsigned char* buffer, GSM_DateTime *datetime); +void DecodeDateTime(unsigned char* buffer, GSM_DateTime *datetime); + +#endif diff --git a/include/gsm-networks.h b/include/gsm-networks.h new file mode 100644 index 0000000..367a964 --- /dev/null +++ b/include/gsm-networks.h @@ -0,0 +1,59 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Header file for GSM networks. + +*/ + +#ifndef __gsm_networks_h +#define __gsm_networks_h + +/* Define enums for RF units. GRF_CSQ asks for units in form used + in AT+CSQ command as defined by GSM 07.07 */ +typedef enum { + GRF_Arbitrary, + GRF_dBm, + GRF_mV, + GRF_uV, + GRF_CSQ, + GRF_Percentage +} GSM_RFUnits; + +/* This structure is used to get the current network status */ + +typedef struct { + char NetworkCode[10]; /* GSM network code */ + char CellID[10]; /* CellID */ + char LAC[10]; /* LAC */ +} GSM_NetworkInfo; + +/* This type is used to hold information about various GSM networks. */ + +typedef struct { + char Code[9+1]; /* GSM network code */ + char Name[50]; /* GSM network name */ +} GSM_Network; + +/* This type is used to hold information about various GSM countries. */ + +typedef struct { + char *Code; /* GSM country code */ + char *Name; /* GSM country name */ +} GSM_Country; + +/* These functions are used to search the structure defined above.*/ +char *GSM_GetNetworkName(char *NetworkCode); +char *GSM_GetNetworkCode(char *NetworkName); + +char *GSM_GetCountryName(char *CountryCode); +char *GSM_GetCountryCode(char *CountryName); + +void EncodeNetworkCode(unsigned char* buffer, unsigned char* output); +void DecodeNetworkCode(unsigned char* buffer, unsigned char* output); + +#endif /* __gsm_networks_h */ diff --git a/include/gsm-phonebook.h b/include/gsm-phonebook.h new file mode 100644 index 0000000..86b2dfa --- /dev/null +++ b/include/gsm-phonebook.h @@ -0,0 +1,103 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#ifndef __gsm_phonebook_h +#define __gsm_phonebook_h + +#include "gsm-sms.h" + +/* Limits for sizing of array in GSM_PhonebookEntry. Individual handsets may + not support these lengths so they have their own limits set. */ + +#define GSM_MAX_PHONEBOOK_NAME_LENGTH (50) /* For 7110 */ +#define GSM_MAX_PHONEBOOK_NUMBER_LENGTH (48) /* For 7110 */ +#define GSM_MAX_PHONEBOOK_TEXT_LENGTH (60) /* For 7110 */ +#define GSM_MAX_PHONEBOOK_SUB_ENTRIES (8) /* For 7110 */ +#define GSM_MAX_PHONEBOOK_LOGO_LENGTH (126) /* For 7110 */ + /* 7110 is able to in one + * entry 5 numbers and 2 + * texts [email,notice,postal] */ + +/* Here is a macro for models that do not support caller groups. */ + +#define GSM_GROUPS_NOT_SUPPORTED -1 + +/* This data type is used to report the number of used and free positions in + memory (sim or internal). */ + +typedef struct { + GSM_MemoryType MemoryType; /* Type of the memory */ + int Used; /* Number of used positions */ + int Free; /* Number of free positions */ +} GSM_MemoryStatus; + +/* Some phones (in this moment 6210/7110) supports extended phonebook + with additional datas. Here we have structure for them */ +typedef enum +{ + GSM_General = 0x0a, + GSM_Mobile = 0x03, + GSM_Work = 0x06, + GSM_Fax = 0x04, + GSM_Home = 0x02, + GSM_SIM = 0x00 +} GSM_Number_Type; + +typedef enum +{ + GSM_Number = 0x0b, + GSM_Note = 0x0a, + GSM_Postal = 0x09, + GSM_Email = 0x08, + GSM_Name = 0x07, + GSM_RingtoneNo = 0x0C, + GSM_Date = 0x13, /* Date is used for DC,RC,etc (last calls) */ + GSM_LogoOn = 0x1C, + GSM_GroupLogo = 0x1B, + GSM_GroupNo = 0x1E +} GSM_EntryType; + +typedef struct { + char Number[GSM_MAX_PHONEBOOK_TEXT_LENGTH+1]; /* Number */ + GSM_DateTime Date; /* or the last calls list */ +} GSM_SubPhonebookEntrydata; + +typedef struct { + GSM_EntryType EntryType; + GSM_Number_Type NumberType; + GSM_SubPhonebookEntrydata data; + int BlockNumber; +} GSM_SubPhonebookEntry; + +/* Define datatype for phonebook entry, used for getting/writing phonebook + entries. */ + +typedef struct { + bool Empty; /* Is this entry empty? */ + char Name[GSM_MAX_PHONEBOOK_NAME_LENGTH + 1]; /* Plus 1 for + nullterminator. */ + char Number[GSM_MAX_PHONEBOOK_NUMBER_LENGTH + 1]; /* Number */ + GSM_MemoryType MemoryType; /* Type of memory */ + int Group; /* Group */ + int Location; /* Location */ + GSM_SubPhonebookEntry SubEntries[GSM_MAX_PHONEBOOK_SUB_ENTRIES]; + /* For phones with + * additional phonebook + * entries */ + int SubEntriesCount; /* Should be 0, if extended + phonebook is not used */ +} GSM_PhonebookEntry; + +char *GSM_GetVCARD(GSM_PhonebookEntry *entry, int version); + +int GSM_SavePhonebookEntryToSMS(GSM_MultiSMSMessage *SMS, + GSM_PhonebookEntry *entry, int version); + +#endif /* __gsm_phonebook_h */ diff --git a/include/gsm-ringtones.h b/include/gsm-ringtones.h new file mode 100644 index 0000000..948966d --- /dev/null +++ b/include/gsm-ringtones.h @@ -0,0 +1,196 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This file provides definitions of macros from the Smart Messaging + Specification. It is mainly rewrite of the spec to C :-) Viva Nokia! + +*/ + +#ifndef __gsm_ringtones_h +#define __gsm_ringtones_h + +#include +#include +#include +#include +#include "misc.h" +#include "gsm-common.h" +#include "gsm-sms.h" + +#define MAX_RINGTONE_NOTES 255 + +/* Structure to hold note of ringtone. */ +/* NoteValue is encoded as octave(scale)*14 + note */ +/* where for note: c=0, d=2, e=4 .... */ +/* ie. c#=1 and 5 and 13 are invalid */ +/* note=255 means a pause */ +typedef struct { + u8 duration; + u8 note; + int tempo; + u8 style; +} GSM_RingtoneNote; + +/* Structure to hold ringtones. */ +typedef struct { + char name[20]; + unsigned char Loop; + u8 NrNotes; + GSM_RingtoneNote notes[256]; + bool allnotesscale; /* Some Nokia phones doesn't receive correctly some + ringtones without it. N3310 4.02 */ + int location; +} GSM_Ringtone; + +/* Structure to hold binary ringtones. */ + +typedef struct { + char name[20]; + unsigned char frame[1000]; + int length; + int location; +} GSM_BinRingtone; + +#define GetBit(Stream,BitNr) Stream[(BitNr)/8] & 1<<(7-((BitNr)%8)) +#define SetBit(Stream,BitNr) Stream[(BitNr)/8] |= 1<<(7-((BitNr)%8)) +#define ClearBit(Stream,BitNr) Stream[(BitNr)/8] &= 255 - (1 << (7-((BitNr)%8))) + +/* These values are from Smart Messaging Specification Revision 2.0.0 pages + 3-23, ..., 3-29 */ + +/* Command-Part Encoding */ + +#define CancelCommand (0x05<<1) /* binary 0000 101 */ +#define RingingToneProgramming (0x25<<1) /* binary 0100 101 */ +#define Sound (0x1d<<1) /* binary 0011 101 */ +/* MW: I didn't find phone, which can unpack ringtone with Unicode + command. Tested 3310, 6150 */ +#define Unicode (0x22<<1) /* binary 0100 010 */ + +/* Song-Type Encoding */ + +#define BasicSongType (0x01<<5) /* binary 001 */ +#define TemporarySongType (0x02<<5) /* binary 010 */ +#define MidiSongType (0x03<<5) /* binary 011 */ +#define DigitizedSongType (0x04<<5) /* binary 100 */ + +/* Instruction ID Encoding */ + +#define PatternHeaderId (0x00<<5) /* binary 000 */ +#define NoteInstructionId (0x01<<5) /* binary 001 */ +#define ScaleInstructionId (0x02<<5) /* binary 010 */ +#define StyleInstructionId (0x03<<5) /* binary 011 */ +#define TempoInstructionId (0x04<<5) /* binary 100 */ +#define VolumeInstructionId (0x05<<5) /* binary 101 */ + +/* Style-Value Encoding*/ + +#define NaturalStyle (0x00<<6) /* binary 00 */ +#define ContinuousStyle (0x01<<6) /* binary 01 */ +#define StaccatoStyle (0x02<<6) /* binary 10 */ + +/* Note-Scale Encoding */ + +#define Scale1 (0x00<<6) /* binary 00 */ +#define Scale2 (0x01<<6) /* binary 01 */ +#define Scale3 (0x02<<6) /* binary 10 */ +#define Scale4 (0x03<<6) /* binary 11 */ + +/* Note-Value Encoding */ + +#define Note_Pause (0x00<<4) /* binary 0000 */ +#define Note_C (0x01<<4) /* binary 0001 */ +#define Note_Cis (0x02<<4) /* binary 0010 */ +#define Note_D (0x03<<4) /* binary 0011 */ +#define Note_Dis (0x04<<4) /* binary 0100 */ +#define Note_E (0x05<<4) /* binary 0101 */ +#define Note_F (0x06<<4) /* binary 0110 */ +#define Note_Fis (0x07<<4) /* binary 0111 */ +#define Note_G (0x08<<4) /* binary 1000 */ +#define Note_Gis (0x09<<4) /* binary 1001 */ +#define Note_A (0x0a<<4) /* binary 1010 */ +#define Note_Ais (0x0b<<4) /* binary 1011 */ +#define Note_H (0x0c<<4) /* binary 1100 */ + +/* Note-Duration Encoding */ + +#define Duration_Full (0x00<<5) /* binary 000 */ +#define Duration_1_2 (0x01<<5) /* binary 001 */ +#define Duration_1_4 (0x02<<5) /* binary 010 */ +#define Duration_1_8 (0x03<<5) /* binary 011 */ +#define Duration_1_16 (0x04<<5) /* binary 100 */ +#define Duration_1_32 (0x05<<5) /* binary 101 */ + +/* Note-Duration-Specifier Encoding */ + +#define NoSpecialDuration (0x00<<6) /* binary 00 */ +#define DottedNote (0x01<<6) /* binary 01 */ +#define DoubleDottedNote (0x02<<6) /* binary 10 */ +#define Length_2_3 (0x03<<6) /* binary 11 */ + +/* Pattern ID Encoding */ +#define A_part (0x00<<6) /* binary 00 */ +#define B_part (0x01<<6) /* binary 01 */ +#define C_part (0x02<<6) /* binary 10 */ +#define D_part (0x03<<6) /* binary 11 */ + +/* Command-End */ +#define CommandEnd (0x00) /* binary 00000000 */ + +u8 GSM_PackRingtone(GSM_Ringtone *ringtone, unsigned char *package, int *maxlength); +GSM_Error GSM_UnPackRingtone(GSM_Ringtone *ringtone, char *package, int maxlength); + +int GSM_GetDuration(int number, unsigned char *spec); +int GSM_GetNote(int number); +int GSM_GetScale(int number); +int GSM_GetTempo(int Beats); + +void GSM_PlayOneNote (GSM_RingtoneNote note); +void GSM_PlayRingtone (GSM_Ringtone *ringtone); + +int GSM_GetFrequency(int number); + +GSM_Error GSM_ReadRingtone(GSM_SMSMessage *message, GSM_Ringtone *ringtone); + +int GSM_SaveRingtoneToSMS(GSM_MultiSMSMessage *SMS, + GSM_Ringtone *ringtone,bool profilestyle); + +/* FIXME: For each phone probaby different */ +#define FB61_MAX_RINGTONE_FRAME_LENGTH 200 + +/* Smart Messaging 3.0 says: 16*9=144 bytes, + but on 3310 4.02 it was possible to save about 196 chars (without cutting) */ +#define SM30_MAX_RINGTONE_FRAME_LENGTH 196 + +/* Like PC Composer help say */ +#define FB61_MAX_RINGTONE_NOTES 130 + +/* Nokia ringtones codes. */ + +struct OneRingtone { + char name[30]; + int menu; + int code; +}; + +void PrepareRingingTones(char model[64], char rev[64]); + +/* returns names from code or number in menu */ +char *RingingToneName(int code, int menu); + +/* returns code from number in menu */ +int RingingToneCode(int menu); + +/* returns number in menu from code */ +int RingingToneMenu(int code); + +int NumberOfRingtones(); + +GSM_Error GSM_GetPhoneRingtone(GSM_BinRingtone *ringtone,GSM_Ringtone *SMringtone); + +#endif /* __gsm_ringtones_h */ diff --git a/include/gsm-sms.h b/include/gsm-sms.h new file mode 100644 index 0000000..fac18b9 --- /dev/null +++ b/include/gsm-sms.h @@ -0,0 +1,292 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#ifndef __gsm_sms_h +#define __gsm_sms_h + +#include "gsm-common.h" +#include "gsm-datetime.h" + +/* This data-type is used to specify the type of the number. See the official + GSM specification 03.40, version 5.3.0, section 9.1.2.5, page 33. */ +typedef enum { + GNT_UNKNOWN=0x81, /* Unknown number */ + GNT_INTERNATIONAL=0x91, /* International number */ + GNT_ALPHANUMERIC=0xD0 /* Alphanumeric number */ +} GSM_NumberType; + +/* For folder table */ +typedef struct { + int smsnum; + u8 folder; + int location; +//future use GSM_SMSMessage *message; +} GSM_SMS2Foldertable; + +/* This data type is used to hold the current SMS status. */ +typedef struct { + int UnRead; /* The number of unread messages */ + int Number; /* The number of messages */ + GSM_SMS2Foldertable foldertable[255]; /* for 6210/7110 */ +} GSM_SMSStatus; + +/* Define datatype for SMS Message Type */ +typedef enum { + GST_SMS, + GST_DR, /* Delivery Report */ + GST_UN /* Unknown */ +} GSM_SMSMessageType; + +#define GST_INBOX 0; /* Mobile Terminated (MT) message - Inbox message */ +#define GST_OUTBOX 1; /* Mobile Originated (MO) message - Outbox message */ +#define GST_7110_INBOX 0x08; /* Inbox in 6210/7110 */ +#define GST_7110_OUTBOX 0x10; /* Outbox in 6210/7110 */ + +/* Datatype for SMS status */ +typedef enum { + GSS_SENTREAD = 0x01, /* Sent or read message */ + GSS_NOTSENTREAD = 0x03, /* Not sent or not read message */ + GSS_UNKNOWN = 0x05, /* RTH FIXME: ? */ + GSS_TEMPLATE = 0x07 /* Template ? */ +} GSM_SMSMessageStatus; + +/* SMS Messages sent as... */ +typedef enum { + GSMF_Text = 0x00, /* Plain text message. */ + GSMF_Fax = 0x22, /* Fax message. */ + GSMF_Voice = 0x24, /* Voice mail message. */ + GSMF_ERMES = 0x25, /* ERMES message. */ + GSMF_Paging = 0x26, /* Paging. */ + GSMF_UCI = 0x2d, /* Email message in 8110i. */ + GSMF_Email = 0x32, /* Email message. */ + GSMF_X400 = 0x31 /* X.400 message. */ +} GSM_SMSMessageFormat; + +/* Validity of SMS Messages. */ +/* Ready values for TP-VP. Don't give them for function packing SMS validity + (creating TP-VP from validity value in minutes) */ +typedef enum { + GSMV_1_Hour = 0x0b, + GSMV_6_Hours = 0x47, + GSMV_24_Hours = 0xa7, + GSMV_72_Hours = 0xa9, + GSMV_1_Week = 0xad, + GSMV_Max_Time = 0xff +} GSM_SMSMessageValidity; + +/* 7 bit SMS Coding type */ +typedef enum { + GSM_Coding_Unicode = 0x01, + GSM_Coding_Default = 0x02, + GSM_Coding_8bit = 0x03 +} GSM_Coding_Type; + +/* Define datatype for SMS Message Center */ +typedef struct { + int No; /* Number of the SMSC in the phone memory. */ + char Name[GSM_MAX_SMS_CENTER_NAME_LENGTH]; /* Name of the SMSC. */ + GSM_SMSMessageFormat Format; /* SMS is sent as text/fax/paging/email. */ + GSM_SMSMessageValidity Validity; /* Validity of SMS Message. */ + char Number[GSM_MAX_SMS_CENTER_LENGTH]; /* Number of the SMSC. */ + char DefaultRecipient[GSM_MAX_RECIPIENT_LENGTH]; /* Number of default recipient */ +} GSM_MessageCenter; + +/* Define datatype for Cell Broadcast message */ +typedef struct { + int Channel; /* channel number */ + char Message[GSM_MAX_CB_MESSAGE + 1]; + int New; +} GSM_CBMessage; + +/* types of User Data Header */ +typedef enum { + GSM_NoUDH, + GSM_ConcatenatedMessages, + GSM_OpLogo, + GSM_CallerIDLogo, + GSM_RingtoneUDH, + GSM_EnableVoice, + GSM_DisableVoice, + GSM_EnableEmail, + GSM_DisableEmail, + GSM_EnableFax, + GSM_DisableFax, + GSM_VoidSMS, + GSM_HangSMS, + GSM_BugSMS, + GSM_UnknownUDH, //Gnokii doesn't know this UDH + GSM_WAPBookmarkUDH, + GSM_WAPBookmarkUDHLong, + GSM_WAPSettingsUDH, + GSM_CalendarNoteUDH, + GSM_CalendarNoteUDH2, + GSM_PhonebookUDH, + GSM_ProfileUDH, +} GSM_UDH; + +/* Define datatype for SMS messages, used for getting SMS messages from the + phones memory. */ +typedef struct { + GSM_Coding_Type Coding; + GSM_DateTime Time; /* Date of reception/response of messages. */ + GSM_DateTime SMSCTime; /* Date of SMSC response if DeliveryReport messages. */ + int Length; /* Length of the SMS message. */ + int Validity; /* Validity Period of the SMS message. */ + GSM_UDH UDHType; /* If UDH is present - type of UDH */ + unsigned char UDH[GSM_MAX_USER_DATA_HEADER_LENGTH]; /* If UDH is present - content of UDH */ + unsigned char MessageText[GSM_MAX_SMS_LENGTH + 1]; /* Room for null term. */ + GSM_MessageCenter MessageCenter; /* SMS Center. */ + char Sender[GSM_MAX_SENDER_LENGTH + 1]; /* Sender of the SMS message. */ + char Destination[GSM_MAX_DESTINATION_LENGTH+1];/* Destination of the message. */ + int MessageNumber; /* Location in the memory, where SMS is saved */ + GSM_MemoryType MemoryType; /* Type of memory message is stored in. */ + GSM_SMSMessageType Type; /* Type of the SMS message */ + GSM_SMSMessageStatus Status; /* Status of the SMS message */ + int Class; /* Class Message: 0, 1, 2, 3 or none; see GSM 03.38 */ + bool Compression; /* Indicates whether SMS contains compressed data */ + int Location; /* Location in the memory, when save SMS */ + bool ReplyViaSameSMSC; /* Indicates whether "Reply via same center" is set */ + int folder; /* Folder: 0-Inbox,1-Outbox, etc. */ + bool SMSData; /* if folder contains sender, SMSC number and sending date */ + unsigned char Name[25+1]; /* Name in Nokia 6210/7110, etc. Ignored in other */ +} GSM_SMSMessage; + +typedef struct { + int number; + GSM_SMSMessage SMS[6]; +} GSM_MultiSMSMessage; + +/* Maximal number of SMS folders */ +/* #define MAX_SMS_FOLDERS 10 */ +#define MAX_SMS_FOLDERS 24 + +typedef struct { + char Name[15]; /* Name for SMS folder */ + u8 locations[160]; /* locations of SMS messages in that folder (6210 specific) */ + u8 number; /* number of SMS messages in that folder*/ +} GSM_OneSMSFolder; + +typedef struct { + GSM_OneSMSFolder Folder[MAX_SMS_FOLDERS]; + u8 FoldersID[MAX_SMS_FOLDERS]; // ID specific for this folder and phone. + // Used in internal functions. Do not use it. + u8 number; //number of SMS folders +} GSM_SMSFolders; + +/* Identifiers for Smart Messaging 3.0 multipart SMS */ +#define SM30_ISOTEXT 0 // ISO 8859-1 text +#define SM30_UNICODETEXT 1 +#define SM30_OTA 2 +#define SM30_RINGTONE 3 +#define SM30_PROFILENAME 4 +#define SM30_SCREENSAVER 6 + +/* TP-Message-Type-Indicator */ +/* See GSM 03.40 version 6.1.0 Release 1997 Section 9.2.3.1 */ +typedef enum { + SMS_Deliver = 0x00, /* when we save SMS in Inbox */ + SMS_Deliver_Report, + SMS_Status_Report, /* Delivery Report received by phone */ + SMS_Command, + SMS_Submit, /* when we send SMS or save it in Outbox */ + SMS_Submit_Report +} SMS_MessageType; + +/* Structure to hold UDH Header */ +typedef struct { + GSM_UDH UDHType; /* Type */ + int Length; /* Length */ + unsigned char *Text; /* Text */ +} GSM_UDHHeader; + +typedef struct { + unsigned char MessageText[GSM_MAX_SMS_LENGTH + 1]; + /* TP-User-Data. See GSM 03.40 section 9.2.3.24. Room for null term. */ + + unsigned char Number[GSM_MAX_SENDER_LENGTH + 1]; + /*In SMS-Deliver TP-Originating-Address.See GSM 03.40 section 9.2.3.7 */ + /*In SMS-Submit TP-Destination-Address.See GSM 03.40 section 9.2.3.8 */ + /*In SMS-Status-Report TP-Recipient-Address. See GSM 03.40 section 9.2.3.14*/ + + unsigned char SMSCNumber[GSM_MAX_SMS_CENTER_LENGTH]; + /* SMSC number */ + + unsigned char TPPID; + /* TP-Protocol-Identifier. See GSM 03.40 section 9.2.3.9 */ + + unsigned char TPDCS; + /* TP-Data-Coding-Scheme. See GSM 03.40 section 9.2.3.10 */ + + unsigned char DeliveryDateTime[7]; + /* For SMS-Submit TP-Validity-Period. See GSM 03.40 section 9.2.3.12 */ + /* For SMS-Status-Report TP-Discharge Time. See GSM 03.40 section 9.2.3.13 */ + + unsigned char SMSCDateTime[7]; + /* TP-Service-Centre-Time-Stamp in SMS-Status-Report. + See GSM 03.40 section 9.2.3.11 */ + + unsigned char TPStatus; + /* TP-Status in SMS-Status-Report. See GSM 03.40 section 9.2.3.15 */ + + unsigned char TPUDL; + /* TP-User-Data-Length. See GSM 03.40 section 9.2.3.16 */ + + unsigned char TPVP; + /* TP-Validity Period in SMS-Submit. See GSM 03.40 section 9.2.3.12 */ + + unsigned char TPMR; + /* TP-Message Reference in SMS-Submit. See GSM 03.40 section 9.2.3.6 */ + + unsigned char firstbyte; + /* Byte contains in SMS-Deliver: + TP-Message-Type-Indicator (2 bits) See GSM 03.40 section 9.2.3.1 + + TP-More-Messages-To-Send (1 bit). See GSM 03.40 section 9.2.3.2 + + TP-Reply-Path (1 bit). See GSM 03.40 section 9.2.3.17 + TP-User-Data-Header-Indicator (1 bit). See GSM 03.40 section 9.2.3.23 + TP-Status-Report-Indicator (1 bit). See GSM 03.40 section 9.2.3.4 + + Byte contains in SMS-Submit: + + TP-Message-Type-Indicator (2 bits) See GSM 03.40 section 9.2.3.1 + + TP-Reject-Duplicates (1 bit). See GSM 03.40 section + TP-Validity-Period-Format (2 bits).See GSM 03.40 section 9.2.3.3 + + TP-Reply-Path (1 bit). See GSM 03.40 section 9.2.3.17 + TP-User-Data-Header-Indicator (1 bit). See GSM 03.40 section 9.2.3.23 + TP-Status-Report-Request (1 bit). See GSM 03.40 section 9.2.3.5 */ +} GSM_ETSISMSMessage; + +int GSM_PackSemiOctetNumber (u8 *Number, u8 *Output, bool semioctet); +char *GSM_UnpackSemiOctetNumber(u8 *Number, bool semioctet); + +int GSM_UnpackEightBitsToSeven(int fillbits, int in_length, int out_length, unsigned char *input, unsigned char *output); +int GSM_PackSevenBitsToEight (int offset, unsigned char *input, unsigned char *output); + +GSM_Error GSM_EncodeETSISMS(GSM_SMSMessage *SMS, GSM_ETSISMSMessage *ETSI, SMS_MessageType PDU, int *length); +GSM_Error GSM_DecodeETSISMS(GSM_SMSMessage *SMS, GSM_ETSISMSMessage *ETSI); + +GSM_Error GSM_EncodeSMSDateTime(GSM_DateTime *DT, unsigned char *req); + +GSM_Error GSM_DecodeETSISMSSubmitData(GSM_SMSMessage *SMS, GSM_ETSISMSMessage *ETSI); + +GSM_Error GSM_DecodeETSISMSStatusReportData(GSM_SMSMessage *SMS, GSM_ETSISMSMessage *ETSI); + +void GSM_SetDefaultSMSData(GSM_SMSMessage *SMS); +GSM_Error EncodeUDHHeader(char *text, GSM_UDH UDHType); + +int GSM_MakeSinglePartSMS2(GSM_SMSMessage *SMS, + unsigned char *MessageBuffer,int cur, GSM_UDH UDHType, GSM_Coding_Type Coding); +void GSM_MakeMultiPartSMS2(GSM_MultiSMSMessage *SMS, + unsigned char *MessageBuffer,int MessageLength, GSM_UDH UDHType, GSM_Coding_Type Coding); + +#endif /* __gsm_sms_h */ diff --git a/include/gsm-wap.h b/include/gsm-wap.h new file mode 100644 index 0000000..b47a13b --- /dev/null +++ b/include/gsm-wap.h @@ -0,0 +1,64 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Functions for manipulating WAP Settings and bookmarks + +*/ + +#ifndef __gsm_wap_h +#define __gsm_wap_h + +#include "gsm-sms.h" + +typedef struct { + char address[255+1]; + char title[50+1]; + u16 location; +} GSM_WAPBookmark; + +typedef struct { + u8 location; + char homepage[100+1]; + char title[20+1]; + int bearer; + bool issecurity; + bool iscontinuous; + + /* for data bearer */ + char ipaddress[20+1]; + char dialup[20+1]; + char user[50+1]; //is length OK ? + char password[50+1]; //is length OK ? + bool isspeed14400; + bool isISDNcall; + bool isnormalauthentication; + + /* for sms bearer */ + char server[21+1]; + + /* for sms or ussd bearer */ + char service[20+1]; + bool isIP; + + /* for ussd bearer */ + char code[10+1]; +} GSM_WAPSettings; + +#define WAPSETTINGS_BEARER_SMS 0x00 +#define WAPSETTINGS_BEARER_DATA 0x01 +#define WAPSETTINGS_BEARER_USSD 0x02 + +int GSM_SaveWAPBookmarkToSMS(GSM_MultiSMSMessage *SMS, + GSM_WAPBookmark *bookmark); + +GSM_Error GSM_ReadWAPBookmark(GSM_SMSMessage *message, GSM_WAPBookmark *bookmark); + +int GSM_SaveWAPSettingsToSMS(GSM_MultiSMSMessage *SMS, + GSM_WAPSettings *settings); + +#endif diff --git a/include/misc.h b/include/misc.h new file mode 100644 index 0000000..2a16e51 --- /dev/null +++ b/include/misc.h @@ -0,0 +1,125 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Header file for miscellaneous defines, typedefs etc. + +*/ + +#ifndef __misc_h +#define __misc_h + +#include +#include + +#ifndef VC6 + #include "config.h" + + /* Use gsprintf instead of sprintf and sprintf */ + #ifdef HAVE_SNPRINTF + # define gsprintf(a, b, c...) snprintf(a, b, c) + #else + # define gsprintf(a, b, c...) sprintf(a, c) + #endif + +#endif + +/* Some general defines. */ + +#ifndef false + #define false (0) +#endif + +#ifndef true + #define true (!false) +#endif + +#ifndef bool + #define bool int +#endif + +/* This one is for NLS. */ + +#ifdef USE_NLS + + #ifndef VC6 + #include + #define _(x) gettext(x) + #else + #define _(x) (x) + #endif + +#else + #define _(x) (x) +#endif /* USE_NLS */ + +/* Definitions for u8, u16, u32 and u64, borrowed from + /usr/src/linux/include/asm-i38/types.h */ + +#ifndef u8 + typedef unsigned char u8; +#endif + +#ifndef u16 + typedef unsigned short u16; +#endif + +#ifndef u32 + typedef unsigned int u32; +#endif + +#ifndef s32 + typedef int s32; +#endif + +#if defined(__GNUC__) && !defined(__STRICT_ANSI__) + #ifndef u64 + typedef unsigned long long u64; + #endif + + #ifndef s64 + typedef signed long long s64; + #endif +#endif + +/* This one is for FreeBSD and similar systems without __ptr_t_ */ +/* FIXME: autoconf should take care of this. */ + +#ifndef __ptr_t + typedef void * __ptr_t; +#endif /* __ptr_t */ + + +/* Add here any timer operations which are not supported by libc5 */ + +#ifndef HAVE_TIMEOPS +#include + +#ifndef timersub +#define timersub(a, b, result) \ + do { \ + (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ + (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ + if ((result)->tv_usec < 0) { \ + --(result)->tv_sec; \ + (result)->tv_usec += 1000000; \ + } \ + } while (0) +#endif + +#endif /* HAVE_TIMEOPS */ + +#include + +extern int GetLine(FILE *File, char *Line, int count); + +int mem_to_int(const char str[], int len); + +void hexdump(u16 MessageLength, u8 *MessageBuffer); +void txhexdump(u16 MessageLength, u8 *MessageBuffer); + +#endif /* __misc_h */ diff --git a/include/misc_win32.h b/include/misc_win32.h new file mode 100644 index 0000000..8da3c6f --- /dev/null +++ b/include/misc_win32.h @@ -0,0 +1,21 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Header file for miscellaneous defines, typedefs etc. + +*/ + +#ifndef __misc_win32_h +#define __misc_win32_h + +#include + +#define sleep(x) Sleep((x) * 1000) +#define usleep(x) Sleep(((x) < 1000) ? 1 : ((x) / 1000)) + +#endif \ No newline at end of file diff --git a/include/newmodules/n6110.h b/include/newmodules/n6110.h new file mode 100644 index 0000000..ab2c8cb --- /dev/null +++ b/include/newmodules/n6110.h @@ -0,0 +1,218 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Header file for the various functions, definitions etc. used to implement + the handset interface. See fbus-6110.c for more details. + +*/ + +#ifndef __n_6110_h +#define __n_6110_h + +#include "gsm-api.h" + +/* Nokia 6110 supports phonebook entries of max. 16 characters and numbers of + max. 30 digits */ +#define N6110_MAX_PHONEBOOK_NAME_LENGTH (16) +#define N6110_MAX_PHONEBOOK_NUMBER_LENGTH (30) + +/* Alternate defines for memory types. Two letter codes follow GSM 07.07 + release 6.2.0, AT+CPBS "Select Phonebook Memory Storage" */ +#define N6110_MEMORY_MT 0x01 /* combined ME and SIM phonebook */ +#define N6110_MEMORY_ME 0x02 /* ME (Mobile Equipment) phonebook */ +#define N6110_MEMORY_SM 0x03 /* SIM phonebook */ +#define N6110_MEMORY_FD 0x04 /* SIM fixdialling-phonebook */ +#define N6110_MEMORY_ON 0x05 /* SIM (or ME) own numbers list */ +#define N6110_MEMORY_EN 0x06 /* SIM (or ME) emergency number */ +#define N6110_MEMORY_DC 0x07 /* ME dialled calls list */ +#define N6110_MEMORY_RC 0x08 /* ME received calls list */ +#define N6110_MEMORY_MC 0x09 /* ME missed (unanswered received) calls list */ +#define N6110_MEMORY_VOICE 0x0b /* Voice Mailbox */ +#define N6110_MEMORY_XX 0xff /* This is used when the memory type is unknown. */ + +/* This byte is used to synchronize FBUS channel over cable or IR. */ +#define N6110_SYNC_BYTE 0x55 + +/* This byte is send after all N6110_SYNC_BYTE bytes when init infrared. */ +#define N6110_IR_END_SYNC_BYTE 0xc1 + +/* Every (well, almost every) frame from the computer starts with this + sequence. */ +#define N6110_FRAME_HEADER 0x00, 0x01, 0x00 + +/* Global variables */ +extern bool N6110_LinkOK; +extern GSM_Functions N6110_Functions; +extern GSM_Information N6110_Information; + +/* Prototypes for the functions designed to be used externally. */ +GSM_Error N6110_Initialise(char *port_device, char *initlength, + GSM_ConnectionType connection, + void (*rlp_callback)(RLP_F96Frame *frame)); + +void N6110_DispatchMessage(u16 MessageLength, u8 *MessageBuffer, + u8 MessageType); + +GSM_Error N6110_SendStatusRequest(void); + +int N6110_GetMemoryType(GSM_MemoryType memory_type); + +GSM_Error N6110_GetVoiceMailbox ( GSM_PhonebookEntry *entry); + +GSM_Error N6110_GetOperatorName ( GSM_Network *operator); +GSM_Error N6110_SetOperatorName ( GSM_Network *operator); + +GSM_Error N6110_GetMemoryLocation(GSM_PhonebookEntry *entry); +GSM_Error N6110_WritePhonebookLocation(GSM_PhonebookEntry *entry); + +GSM_Error N6110_GetSpeedDial(GSM_SpeedDial *entry); +GSM_Error N6110_SetSpeedDial(GSM_SpeedDial *entry); + +GSM_Error N6110_GetMemoryStatus(GSM_MemoryStatus *Status); +GSM_Error N6110_GetSMSStatus(GSM_SMSStatus *Status); +GSM_Error N6110_GetSMSCenter(GSM_MessageCenter *MessageCenter); + +GSM_Error N6110_GetSMSMessage(GSM_SMSMessage *Message); +GSM_Error N6110_DeleteSMSMessage(GSM_SMSMessage *Message); +GSM_Error N6110_SendSMSMessage(GSM_SMSMessage *Message); +GSM_Error N6110_SaveSMSMessage(GSM_SMSMessage *Message); + +GSM_Error N6110_GetRFLevel(GSM_RFUnits *units, float *level); +GSM_Error N6110_GetBatteryLevel(GSM_BatteryUnits *units, float *level); +GSM_Error N6110_GetPowerSource(GSM_PowerSource *source); +GSM_Error N6110_GetDisplayStatus(int *Status); + +GSM_Error N6110_EnterSecurityCode(GSM_SecurityCode SecurityCode); +GSM_Error N6110_GetSecurityCodeStatus(int *Status); +GSM_Error N6110_GetSecurityCode(GSM_SecurityCode *SecurityCode); + +GSM_Error N6110_GetSMSCenter(GSM_MessageCenter *MessageCenter); +GSM_Error N6110_SetSMSCenter(GSM_MessageCenter *MessageCenter); + +GSM_Error N6110_GetIMEI(char *imei); +GSM_Error N6110_GetRevision(char *revision); +GSM_Error N6110_GetModel(char *model); +GSM_Error N6110_GetManufacturer(char *manufacturer); + +GSM_Error N6110_GetDateTime(GSM_DateTime *date_time); +GSM_Error N6110_SetDateTime(GSM_DateTime *date_time); + +GSM_Error N6110_PrivGetDateTime(GSM_DateTime *date_time, int msgtype); +GSM_Error N6110_PrivSetDateTime(GSM_DateTime *date_time, int msgtype); + +GSM_Error N6110_GetAlarm(int alarm_number, GSM_DateTime *date_time); +GSM_Error N6110_SetAlarm(int alarm_number, GSM_DateTime *date_time); + +GSM_Error N6110_PrivGetAlarm(int alarm_number, GSM_DateTime *date_time, int msgtype); +GSM_Error N6110_PrivSetAlarm(int alarm_number, GSM_DateTime *date_time, int msgtype); + +GSM_Error N6110_DialVoice(char *Number); +GSM_Error N6110_DialData(char *Number, char type, void (* callpassup)(char c)); +GSM_Error N6110_AnswerCall(char s); + +GSM_Error N6110_GetIncomingCallNr(char *Number); + +GSM_Error N6110_SendBitmap(char *NetworkCode, int width, int height, + unsigned char *bitmap); +GSM_Error N6110_GetNetworkInfo(GSM_NetworkInfo *NetworkInfo); + +GSM_Error N6110_GetCalendarNote(GSM_CalendarNote *CalendarNote); +GSM_Error N6110_WriteCalendarNote(GSM_CalendarNote *CalendarNote); +GSM_Error N6110_DeleteCalendarNote(GSM_CalendarNote *CalendarNote); + +GSM_Error N6110_NetMonitor(unsigned char mode, char *Screen); + +GSM_Error N6110_PlayTone(int Herz, u8 Volume); + +GSM_Error N6110_SetBitmap( GSM_Bitmap *Bitmap ); +GSM_Error N6110_GetBitmap( GSM_Bitmap *Bitmap ); + +GSM_Error N6110_SetRingTone(GSM_Ringtone *ringtone, int *maxlength); +GSM_Error N6110_SetBinRingTone(GSM_BinRingtone *ringtone); +GSM_Error N6110_GetBinRingTone(GSM_BinRingtone *ringtone); + +GSM_Error N6110_EnableDisplayOutput(); +GSM_Error N6110_DisableDisplayOutput(); + +GSM_Error N6110_EnableCellBroadcast (); +GSM_Error N6110_DisableCellBroadcast(void); +GSM_Error N6110_ReadCellBroadcast (GSM_CBMessage *Message); + +GSM_Error N6110_SendDTMF(char *String); + +GSM_Error N6110_Reset(unsigned char type); + +GSM_Error N6110_GetProfile(GSM_Profile *Profile); +GSM_Error N6110_SetProfile(GSM_Profile *Profile); +bool N6110_SendRLPFrame(RLP_F96Frame *frame, bool out_dtx); + +GSM_Error N6110_CancelCall(void); + +GSM_Error N6110_PressKey(int key, int event); + +GSM_Error N6110_GetProductProfileSetting (GSM_PPS *PPS); +GSM_Error N6110_SetProductProfileSetting (GSM_PPS *PPS); + +GSM_Error N6110_CallDivert(GSM_CallDivert *cd); + +void N6110_RX_HandleRLPMessage(u8 *MessageBuffer); + +GSM_Error N6110_SendIMEIFrame(); +GSM_Error N6110_SendIDFrame(); +GSM_Error N6110_SendHWFrame(); + +GSM_Error N6110_EnableExtendedCommands (unsigned char status); + +GSM_Error N6110_Tests(); + +void N6110_DisplayTestsInfo(u8 *MessageBuffer); + +GSM_Error N6110_SimlockInfo(GSM_AllSimlocks *siml); +GSM_Error N6110_GetSMSFolders ( GSM_SMSFolders *folders); + +GSM_Error N6110_ResetPhoneSettings(); + +void N6110_Dispatch0x01Message(u16 MessageLength, u8 *MessageBuffer, u8 MessageType); + +void N6110_ReplySendSMSMessage(u16 MessageLength, u8 *MessageBuffer, u8 MessageType); +void N6110_ReplySetSMSCenter (u16 MessageLength, u8 *MessageBuffer, u8 MessageType); +void N6110_ReplyGetSMSCenter (u16 MessageLength, u8 *MessageBuffer, u8 MessageType); +void N6110_Dispatch0x02Message(u16 MessageLength, u8 *MessageBuffer, u8 MessageType); +void N6110_ReplySetCellBroadcast (u16 MessageLength, u8 *MessageBuffer, u8 MessageType); +void N6110_ReplyReadCellBroadcast(u16 MessageLength, u8 *MessageBuffer, u8 MessageType); + +void N6110_ReplyCallDivert (u16 MessageLength, u8 *MessageBuffer, u8 MessageType); +void N6110_Dispatch0x06Message(u16 MessageLength, u8 *MessageBuffer, u8 MessageType); + +void N6110_ReplySetDateTime(u16 MessageLength,u8 *MessageBuffer, u8 MessageType); +void N6110_ReplyGetDateTime(u16 MessageLength,u8 *MessageBuffer, u8 MessageType); +void N6110_ReplySetAlarm (u16 MessageLength,u8 *MessageBuffer, u8 MessageType); +void N6110_ReplyGetAlarm (u16 MessageLength,u8 *MessageBuffer, u8 MessageType); + +void N6110_ReplyEnableExtendedCommands (u16 MessageLength,u8 *MessageBuffer,u8 MessageType); +void N6110_ReplyResetPhoneSettings (u16 MessageLength,u8 *MessageBuffer,u8 MessageType); +void N6110_ReplyIMEI (u16 MessageLength,u8 *MessageBuffer,u8 MessageType); +void N6110_ReplyGetProductProfileSetting(u16 MessageLength,u8 *MessageBuffer,u8 MessageType); +void N6110_ReplySetProductProfileSetting(u16 MessageLength,u8 *MessageBuffer,u8 MessageType); +void N6110_ReplyNetmonitor (u16 MessageLength,u8 *MessageBuffer,u8 MessageType); +void N6110_ReplySimlockInfo (u16 MessageLength,u8 *MessageBuffer,u8 MessageType); +void N6110_ReplyPlayTone (u16 MessageLength,u8 *MessageBuffer,u8 MessageType); +void N6110_ReplyHW (u16 MessageLength,u8 *MessageBuffer,u8 MessageType); +void N6110_Dispatch0x40Message (u16 MessageLength,u8 *MessageBuffer,u8 MessageType); + +void N6110_DispatchACKMessage (u16 MessageLength, u8 *MessageBuffer, u8 MessageType); +void N6110_ReplyID(u16 MessageLength, u8 *MessageBuffer, u8 MessageType); + +GSM_Error GSM_EncodeNokiaSMSFrame(GSM_SMSMessage *SMS, unsigned char *req, int *length, SMS_MessageType PDU); +GSM_Error GSM_DecodeNokiaSMSFrame(GSM_SMSMessage *SMS, unsigned char *req, int length); + +int N6110_MakeCallerGroupFrame (unsigned char *req,GSM_Bitmap Bitmap); +int N6110_MakeOperatorLogoFrame(unsigned char *req,GSM_Bitmap Bitmap); +int N6110_MakeStartupLogoFrame (unsigned char *req,GSM_Bitmap Bitmap); + +#endif /* __n_6110_h */ diff --git a/include/newmodules/n7110.h b/include/newmodules/n7110.h new file mode 100644 index 0000000..75f79ca --- /dev/null +++ b/include/newmodules/n7110.h @@ -0,0 +1,147 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Header file for the various functions, definitions etc. used to implement + the handset interface. See fbus-7110.c for more details. + +*/ + +#ifndef __n_7110_h +#define __n_7110_h + +#include "gsm-api.h" + +/* Entry Types of 7110 for enhanced phonebook */ +#define N7110_ENTRYTYPE_SPEEDDIAL 0x04 /* Speed dial */ +#define N7110_ENTRYTYPE_NAME 0x07 /* Name always the only one */ +#define N7110_ENTRYTYPE_EMAIL 0x08 /* Email Adress (TEXT) */ +#define N7110_ENTRYTYPE_POSTAL 0x09 /* Postal Address (Text) */ +#define N7110_ENTRYTYPE_NOTE 0x0a /* Note (Text) */ +#define N7110_ENTRYTYPE_NUMBER 0x0b /* Phonenumber */ +#define N7110_ENTRYTYPE_RINGTONE 0x0c /* Ringtone number */ +#define N7110_ENTRYTYPE_DATE 0x13 /* Date for a Called List */ +#define N7110_ENTRYTYPE_GROUPLOGO 0x1b /* Caller group logo */ +#define N7110_ENTRYTYPE_LOGOON 0x1c /* Logo On? */ +#define N7110_ENTRYTYPE_GROUP 0x1e /* Group number for phonebook entry */ + +/* Alternate defines for memory types. Two letter codes follow GSM 07.07 + release 6.2.0, AT+CPBS "Select Phonebook Memory Storage" */ +#define N7110_MEMORY_DC 0x01 /* ME dialled calls list */ +#define N7110_MEMORY_MC 0x02 /* ME missed (unanswered received) calls list */ +#define N7110_MEMORY_RC 0x03 /* ME received calls list */ +#define N7110_MEMORY_FD 0x04 /* ?? SIM fixdialling-phonebook */ +#define N7110_MEMORY_ME 0x05 /* ME (Mobile Equipment) phonebook */ +#define N7110_MEMORY_SM 0x06 /* SIM phonebook */ +#define N7110_MEMORY_ON 0x07 /* ?? SIM (or ME) own numbers list */ +#define N7110_MEMORY_EN 0x08 /* ?? SIM (or ME) emergency number */ +#define N7110_MEMORY_VM 0x09 /* voice mailbox */ +#define N7110_MEMORY_SD 0x0e /* speed dials */ +#define N7110_MEMORY_CG 0x10 /* Caller groups */ + +/* Every (well, almost every) frame from the computer starts with this + sequence. */ +#define N7110_FRAME_HEADER 0x00, 0x01, 0x01 + +/* some 6210/7110 folder stuff */ +#define N7110_MAXSMSINFOLDER 160 + +/* Datatype for action in HandleSMSLocation */ +typedef enum { + GSH_GET, /* Get SMS location */ + GSH_SAVE, /* want to save at SMS location */ + GSH_INIT, /* init folder table */ + GSH_DELETE /* Delete SMS location */ +} GSM_SMSHandleAction; + +/* Global variables */ +extern bool N7110_LinkOK; +extern GSM_Functions N7110_Functions; +extern GSM_Information N7110_Information; + +/* Prototypes for the functions designed to be used externally. */ +GSM_Error N7110_Initialise(char *port_device, char *initlength, + GSM_ConnectionType connection, + void (*rlp_callback)(RLP_F96Frame *frame)); + +void N7110_DispatchMessage(u16 MessageLength, u8 *MessageBuffer, + u8 MessageType); + +int N7110_GetMemoryType(GSM_MemoryType memory_type); + +GSM_Error N7110_GetVoiceMailbox ( GSM_PhonebookEntry *entry); + +GSM_Error N7110_GetMemoryStatus(GSM_MemoryStatus *Status); + +GSM_Error N7110_GetProfile(GSM_Profile *Profile); + +GSM_Error N7110_GetCalendarNote(GSM_CalendarNote *CalendarNote); +GSM_Error N7110_WriteCalendarNote(GSM_CalendarNote *CalendarNote); +GSM_Error N7110_DeleteCalendarNote(GSM_CalendarNote *CalendarNote); + +GSM_Error N7110_GetRFLevel(GSM_RFUnits *units, float *level); +GSM_Error N7110_GetBatteryLevel(GSM_BatteryUnits *units, float *level); + +GSM_Error N7110_DialVoice(char *Number); + +GSM_Error N7110_GetSecurityCode(GSM_SecurityCode *SecurityCode); + +GSM_Error N7110_GetDateTime(GSM_DateTime *date_time); +GSM_Error N7110_SetDateTime(GSM_DateTime *date_time); + +GSM_Error N7110_GetAlarm(int alarm_number, GSM_DateTime *date_time); +GSM_Error N7110_SetAlarm(int alarm_number, GSM_DateTime *date_time); + +GSM_Error N7110_GetSMSStatus(GSM_SMSStatus *Status); +GSM_Error N7110_DeleteSMSMessage(GSM_SMSMessage *Message); +GSM_Error N7110_SaveSMSMessage(GSM_SMSMessage *SMS); + +GSM_Error N7110_GetMemoryLocation(GSM_PhonebookEntry *entry); +void N7110_DecodePhonebookFrame(GSM_PhonebookEntry *entry,u8 *MessageBuffer,u16 MessageLength); +GSM_Error N7110_WritePhonebookLocation(GSM_PhonebookEntry *entry); +int N7110_EncodePhonebookFrame(unsigned char *req, GSM_PhonebookEntry entry, int *block); +GSM_Error N7110_DeletePhonebookLocation(GSM_PhonebookEntry *entry); +GSM_Error N7110_WriteGroupDataLocation(GSM_Bitmap *bitmap); + +GSM_Error N7110_SendDTMF(char *String); + +GSM_Error N7110_GetSpeedDial(GSM_SpeedDial *entry); +GSM_Error N7110_SetSpeedDial(GSM_SpeedDial *entry); + +GSM_Error N7110_GetSMSMessage(GSM_SMSMessage *message); + +GSM_Error N7110_SetBitmap(GSM_Bitmap *Bitmap); +GSM_Error N7110_GetBitmap(GSM_Bitmap *Bitmap); + +GSM_Error N7110_SetRingTone(GSM_Ringtone *ringtone, int *maxlength); + +GSM_Error N7110_GetBinRingTone(GSM_BinRingtone *ringtone); +GSM_Error N7110_SetBinRingTone(GSM_BinRingtone *ringtone); + +GSM_Error N7110_GetCalendarNotesInfo(GSM_NotesInfo *NotesInfo); + +GSM_Error N7110_FirstCalendarFreePos(int *FirstFreePos); + +GSM_Error N7110_GetSMSFolders (GSM_SMSFolders *folders); + +GSM_Error N7110_GetWAPBookmark (GSM_WAPBookmark *bookmark); + +GSM_Error N7110_SetWAPBookmark (GSM_WAPBookmark *bookmark); + +GSM_Error N7110_GetWAPSettings (GSM_WAPSettings *settings); + +GSM_Error N7110_HandleSMSLocation (int smsnum, u8 *folderid, int *location, GSM_SMSMessage *message, GSM_SMSHandleAction action); + +void N7110_ReplyEnableWAPCommands(u16 MessageLength,u8 *MessageBuffer,u8 MessageType); +void N7110_ReplyGetWAPBookmark (u16 MessageLength,u8 *MessageBuffer,u8 MessageType); +void N7110_ReplySetWAPBookmark (u16 MessageLength, u8 *MessageBuffer, u8 MessageType); +void N7110_ReplyGetWAPSettings (u16 MessageLength,u8 *MessageBuffer,u8 MessageType); + +void N7110_Fake2SMSLocation(int smsnum, u8 *folder, int *location); +void N7110_SMS2FakeLocation(int *smsnum, u8 folder, int location); + +#endif /* __n_7110_h */ diff --git a/include/newmodules/newat.h b/include/newmodules/newat.h new file mode 100644 index 0000000..473ffd2 --- /dev/null +++ b/include/newmodules/newat.h @@ -0,0 +1,79 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Header file for the various functions, definitions etc. used to implement + the handset interface. See fbus-at.c for more details. + +*/ + +#ifndef __n_at_h +#define __n_at_h + +#include "gsm-api.h" + +/* Global variables */ +extern bool Nat_LinkOK; +extern GSM_Functions Nat_Functions; +extern GSM_Information Nat_Information; + +/* Prototypes for the functions designed to be used externally. */ +GSM_Error Nat_Initialise(char *port_device, char *initlength, + GSM_ConnectionType connection, + void (*rlp_callback)(RLP_F96Frame *frame)); + +void Nat_DispatchMessage(u16 MessageLength, u8 *MessageBuffer, + u8 MessageType); + +GSM_Error Nat_DialVoice(char *Number); +GSM_Error Nat_CancelCall(void); + +GSM_Error Nat_SetDateTime(GSM_DateTime *date_time); +GSM_Error Nat_GetDateTime(GSM_DateTime *date_time); + +GSM_Error Nat_GetAlarm(int alarm_number, GSM_DateTime *date_time); + +GSM_Error Nat_SendDTMF(char *String); + +GSM_Error Nat_GetSMSMessage(GSM_SMSMessage *message); +GSM_Error Nat_SaveSMSMessage(GSM_SMSMessage *message); +GSM_Error Nat_DeleteSMSMessage(GSM_SMSMessage *message); +GSM_Error Nat_GetSMSStatus(GSM_SMSStatus *Status); +GSM_Error Nat_SendSMSMessage(GSM_SMSMessage *message); + +GSM_Error Nat_EnterSecurityCode(GSM_SecurityCode SecurityCode); +GSM_Error Nat_GetSecurityCodeStatus(int *Status); +GSM_Error Nat_GetSecurityCodeStatus(int *Status); + +GSM_Error Nat_GetMemoryLocation(GSM_PhonebookEntry *entry); +GSM_Error Nat_WritePhonebookLocation(GSM_PhonebookEntry * entry); +GSM_Error Nat_GetMemoryStatus(GSM_MemoryStatus *Status); + +GSM_Error Nat_GetBatteryLevel(GSM_BatteryUnits *units, float *level); +GSM_Error Nat_GetRFLevel(GSM_RFUnits *units, float *level); +GSM_Error Nat_GetPowerSource(GSM_PowerSource * source); + +GSM_Error Nat_GetSMSCenter(GSM_MessageCenter *MessageCenter); +GSM_Error Nat_SetSMSCenter(GSM_MessageCenter *MessageCenter); + +GSM_Error Nat_GetNetworkInfo(GSM_NetworkInfo *NetworkInfo); + +GSM_Error Nat_GetManufacturer(char* manufacturer); + +GSM_Error Nat_CallDivert(GSM_CallDivert *cd); + +/* FIXME: not functional or returns errors with tested AT implementation */ +GSM_Error Nat_GetDisplayStatus(int *Status); +GSM_Error Nat_PressKey(int key, int event); +GSM_Error Nat_SetAlarm(int alarm_number, GSM_DateTime *date_time); + +struct AT_OneReply { + char *ReplyString; + void (*ReplyFunction) (u16 message_length, u8 *buffer, u8 message_type); +}; + +#endif /* __n_at_h */ diff --git a/include/newmodules/sniff/sniff.h b/include/newmodules/sniff/sniff.h new file mode 100644 index 0000000..27b979c --- /dev/null +++ b/include/newmodules/sniff/sniff.h @@ -0,0 +1,32 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Header file for the various functions, definitions etc. used to implement + the handset interface. See fbus-sniff.c for more details. + +*/ + +#ifndef __n_sniff_h +#define __n_sniff_h + +#include "gsm-api.h" + +/* Global variables */ +extern bool Nsniff_LinkOK; +extern GSM_Functions Nsniff_Functions; +extern GSM_Information Nsniff_Information; + +/* Prototypes for the functions designed to be used externally. */ +GSM_Error Nsniff_Initialise(char *port_device, char *initlength, + GSM_ConnectionType connection, + void (*rlp_callback)(RLP_F96Frame *frame)); + +void Nsniff_DispatchMessage(u16 MessageLength, u8 *MessageBuffer, + u8 MessageType); + +#endif /* __n_sniff_h */ diff --git a/include/protocol/at.h b/include/protocol/at.h new file mode 100644 index 0000000..054e2ea --- /dev/null +++ b/include/protocol/at.h @@ -0,0 +1,37 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Header file for the various functions, definitions etc. used to implement + the handset interface. See AT-6110.c for more details. + +*/ + +#ifndef __AT_h +#define __AT_h + +#include "gsm-api.h" + +#define AT_MAX_RECEIVE_LENGTH 2000 +#define AT_MAX_CONTENT_LENGTH 2000 + +/* Global variables */ +extern GSM_Protocol AT_Functions; + +/* States for receive code. */ + +GSM_Error AT_Initialise(char *port_device, char *initlength, + GSM_ConnectionType connection, + void (*rlp_callback)(RLP_F96Frame *frame)); + +int AT_SendMessage(u16 message_length, u8 message_type, u8 *buffer); +int AT_SendFrame(u16 message_length, u8 message_type, u8 *buffer); +void AT_Terminate(void); +void AT_RX_StateMachine(unsigned char rx_byte); +bool AT_WritePhone (u16 length, u8 *buffer); + +#endif /* __AT_h */ diff --git a/include/protocol/fbusirda.h b/include/protocol/fbusirda.h new file mode 100644 index 0000000..6372fa6 --- /dev/null +++ b/include/protocol/fbusirda.h @@ -0,0 +1,40 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Header file for the various functions, definitions etc. used to implement + the handset interface. See mbus-6110.c for more details. + +*/ + +#ifndef __fbusirda_h +#define __fbusirda_h + +#include "gsm-api.h" + +/* This byte is at the beginning of all GSM Frames sent over MBUS to Nokia + 6110 phones. */ +#define FBUSIRDA_FRAME_ID 0x14 + +#define FBUSIRDA_MAX_TRANSMIT_LENGTH (1000) +#define FBUSIRDA_MAX_RECEIVE_LENGTH (1000) +#define FBUSIRDA_MAX_CONTENT_LENGTH (1000) + +/* Global variables */ +extern GSM_Protocol FBUSIRDA_Functions; + +GSM_Error FBUSIRDA_Initialise(char *port_device, char *initlength, + GSM_ConnectionType connection, + void (*rlp_callback)(RLP_F96Frame *frame)); + +int FBUSIRDA_SendMessage(u16 message_length, u8 message_type, u8 *buffer); +int FBUSIRDA_SendFrame(u16 message_length, u8 message_type, u8 *buffer); +void FBUSIRDA_Terminate(void); +bool FBUSIRDA_WritePhone (u16 length, u8 *buffer); +void FBUSIRDA_RX_StateMachine(unsigned char rx_byte); + +#endif /* __fbus_h */ diff --git a/include/protocol/mbus.h b/include/protocol/mbus.h new file mode 100644 index 0000000..65eaa82 --- /dev/null +++ b/include/protocol/mbus.h @@ -0,0 +1,44 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + Header file for the various functions, definitions etc. used to implement + the handset interface. See mbus-6110.c for more details. + +*/ + +#ifndef __mbus_h +#define __mbus_h + +#include "gsm-api.h" + +/* This byte is at the beginning of all GSM Frames sent over MBUS to Nokia + 6110 phones. */ +#define MBUS_FRAME_ID 0x1f + +/* Our PC (MBUS). */ +#define MBUS_DEVICE_PC1 0x10 +#define MBUS_DEVICE_PC2 0x1d + +#define MBUS_MAX_TRANSMIT_LENGTH (1000) +#define MBUS_MAX_RECEIVE_LENGTH (1000) +#define MBUS_MAX_CONTENT_LENGTH (1000) + +/* Global variables */ +extern GSM_Protocol MBUS_Functions; + +GSM_Error MBUS_Initialise(char *port_device, char *initlength, + GSM_ConnectionType connection, + void (*rlp_callback)(RLP_F96Frame *frame)); + +int MBUS_SendMessage(u16 message_length, u8 message_type, u8 *buffer); +int MBUS_SendFrame(u16 message_length, u8 message_type, u8 *buffer); +void MBUS_Terminate(void); +bool MBUS_WritePhone (u16 length, u8 *buffer); +void MBUS_RX_StateMachine(unsigned char rx_byte); + +#endif /* __fbus_h */ diff --git a/mgnetd/Makefile b/mgnetd/Makefile new file mode 100644 index 0000000..da31e1b --- /dev/null +++ b/mgnetd/Makefile @@ -0,0 +1,69 @@ + +# +# Makefile for the GNOKII tool suite. +# +# Copyright (C) 1999 Hugh Blemings & Pavel Janík ml. +# 2000 Karel Zak +# + +TOPDIR=.. +include $(TOPDIR)/Makefile.global + +CFLAGS += $(PTHREAD_CFLAGS) +LDFLAGS += $(PTHREAD_LIBS) + +OBJS = mgnetd.o + +all: mgnetd + +mgnetd: $(OBJS) $(TOPDIR)/common/COMMON.o + +$(TOPDIR)/common/COMMON.o: + $(MAKE) -C $(TOPDIR)/common COMMON.o + +$(TOPDIR)/common/libmygnokii.so: + $(MAKE) -C $(TOPDIR)/common makelib + +makelib: $(OBJS) $(TOPDIR)/common/libmygnokii.so + $(CC) $(LDFLAGS) -L$(TOPDIR)/common -lmygnokii $(OBJS) -o mgnetdlib + +clean: + $(RM) $(OBJS) *~ depend mgnetd mgnetdlib *.exe core *.bak + +install: all + $(INSTALL) -d $(sbindir) + $(INSTALL) mgnetd $(sbindir) + $(INSTALL) mgnetdlib $(sbindir)/mgnetd + +install-strip: all + $(INSTALL) -d $(sbindir) + $(INSTALL) -s mgnetd $(sbindir) + $(INSTALL) -s mgnetdlib $(sbindir)/mgnetd + @echo "done" + +install-suid: all + @if [ -z "/bin/grep -e '^gnokii:' /etc/group" ]; then \ + /usr/sbin/groupadd gnokii; \ + fi + $(INSTALL) -d $(sbindir) + $(INSTALL) -o root -g gnokii -m 0750 mgnetd $(sbindir) + $(INSTALL) -o root -g gnokii -m 0750 mgnetdlib $(sbindir)/mgnetd + @echo + +install-ss: all + @if [ -z "/bin/grep -e '^gnokii:' /etc/group" ]; then \ + /usr/sbin/groupadd gnokii; \ + fi + $(INSTALL) -d $(sbindir) + $(INSTALL) -o root -g gnokii -m 0750 -s mgnetd $(sbindir) + $(INSTALL) -o root -g gnokii -m 0750 -s mgnetdlib $(sbindir)/mgnetd + @echo + +depend dep: + $(CC) $(CFLAGS) -MM *.c >depend + +ifeq (depend,$(wildcard depend)) +include depend +endif + +.PHONY: all install clean dep depend diff --git a/mgnetd/mg_demo_client/Makefile b/mgnetd/mg_demo_client/Makefile new file mode 100644 index 0000000..e3d8a32 --- /dev/null +++ b/mgnetd/mg_demo_client/Makefile @@ -0,0 +1,57 @@ + +# +# Makefile for the GNOKII tool suite. +# +# Copyright (C) 1999 Hugh Blemings & Pavel Janík ml. +# 2000 Karel Zak +# + +TOPDIR=../.. +include $(TOPDIR)/Makefile.global + +OBJS = mg_demo_client.o \ + mg_net_api.o + +all: mg_demo_client + +mg_demo_client: $(OBJS) + +makelib: mg_demo_client + @echo + +clean: + $(RM) $(OBJS) *~ depend mg_demo_client *.exe core *.bak + +install: all + $(INSTALL) -d $(sbindir) + $(INSTALL) mg_demo_client $(sbindir) + +install-strip: all + $(INSTALL) -d $(sbindir) + $(INSTALL) -s mg_demo_client $(sbindir) + @echo "done" + +install-suid: all + @if [ -z "/bin/grep -e '^gnokii:' /etc/group" ]; then \ + /usr/sbin/groupadd gnokii; \ + fi + $(INSTALL) -d $(sbindir) + $(INSTALL) -o root -g gnokii -m 0750 mg_demo_client $(sbindir) + @echo + +install-ss: all + @if [ -z "/bin/grep -e '^gnokii:' /etc/group" ]; then \ + /usr/sbin/groupadd gnokii; \ + fi + $(INSTALL) -d $(sbindir) + $(INSTALL) -o root -g gnokii -m 0750 -s mg_demo_client $(sbindir) + @echo + +depend dep: + $(CC) $(CFLAGS) -MM *.c >depend + +ifeq (depend,$(wildcard depend)) +include depend +endif + +.PHONY: all install clean dep depend diff --git a/mgnetd/mg_demo_client/mg_demo_client.c b/mgnetd/mg_demo_client/mg_demo_client.c new file mode 100644 index 0000000..daa1996 --- /dev/null +++ b/mgnetd/mg_demo_client/mg_demo_client.c @@ -0,0 +1,186 @@ +/* + Demo/test prg for MYGNOKII net_api + Ralf Thelen 20.01.2002 + */ + +#include +#include +#include +#include "mg_net_api.h" + +/* usage */ +void usage(void) +{ + fprintf(stderr, "\n\nUsage: mg_demo_client

", + accel_group); + + gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, NULL); + + gtk_accel_group_attach (accel_group, GTK_OBJECT (GUI_CalendarWindow)); + + /* Finally, return the actual menu bar created by the item factory. */ + menubar = gtk_item_factory_get_widget (item_factory, "
"); + + main_vbox = gtk_vbox_new (FALSE, 1); + gtk_container_border_width (GTK_CONTAINER (main_vbox), 1); + gtk_container_add (GTK_CONTAINER (GUI_CalendarWindow), main_vbox); + gtk_widget_show (main_vbox); + + gtk_box_pack_start (GTK_BOX (main_vbox), menubar, FALSE, FALSE, 0); + gtk_widget_show (menubar); + + /* Create the toolbar */ + toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS); + gtk_toolbar_set_button_relief (GTK_TOOLBAR (toolbar), GTK_RELIEF_NORMAL); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Read from phone"), NULL, + NewPixmap(Read_xpm, GUI_CalendarWindow->window, + &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) ReadCalNotes, NULL); + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Save to phone"), NULL, + NewPixmap(Send_xpm, GUI_CalendarWindow->window, + &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) NULL, NULL); + + gtk_toolbar_append_space (GTK_TOOLBAR (toolbar)); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Send via SMS"), NULL, + NewPixmap(SendSMS_xpm, GUI_CalendarWindow->window, + &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) NULL, NULL); + + gtk_toolbar_append_space (GTK_TOOLBAR (toolbar)); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Import from file"), NULL, + NewPixmap(Open_xpm, GUI_CalendarWindow->window, + &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) NULL, NULL); + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Export to file"), NULL, + NewPixmap(Save_xpm, GUI_CalendarWindow->window, + &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) NULL, NULL); + + gtk_toolbar_append_space (GTK_TOOLBAR (toolbar)); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Edit note"), NULL, + NewPixmap(Edit_xpm, GUI_CalendarWindow->window, + &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) NULL, NULL); + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Add reminder"), NULL, + NewPixmap(NewRem_xpm, GUI_CalendarWindow->window, + &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) AddReminder, NULL); + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Add call"), NULL, + NewPixmap(NewCall_xpm, GUI_CalendarWindow->window, + &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) AddCall, NULL); + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Add meeting"), NULL, + NewPixmap(NewMeet_xpm, GUI_CalendarWindow->window, + &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) AddMeeting, NULL); + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Add birthday"), NULL, + NewPixmap(NewBD_xpm, GUI_CalendarWindow->window, + &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) AddBirthday, NULL); + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Delete note"), NULL, + NewPixmap(Delete_xpm, GUI_CalendarWindow->window, + &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) DeleteNote, NULL); + + gtk_box_pack_start (GTK_BOX (main_vbox), toolbar, FALSE, FALSE, 0); + gtk_widget_show (toolbar); + + hpaned = gtk_hpaned_new (); + //gtk_paned_set_handle_size (GTK_PANED (hpaned), 10); + //gtk_paned_set_gutter_size (GTK_PANED (hpaned), 15); + gtk_box_pack_start (GTK_BOX (main_vbox), hpaned, TRUE, TRUE, 0); + gtk_widget_show (hpaned); + + /* Note viewer */ + cal.noteText = gtk_text_new (NULL, NULL); + gtk_text_set_editable (GTK_TEXT (cal.noteText), FALSE); + gtk_text_set_word_wrap (GTK_TEXT (cal.noteText), TRUE); + + scrolledWindow = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledWindow), + GTK_POLICY_NEVER, + GTK_POLICY_AUTOMATIC); + + gtk_paned_add1 (GTK_PANED (hpaned), scrolledWindow); + + gtk_container_add (GTK_CONTAINER (scrolledWindow), cal.noteText); + gtk_widget_show_all (scrolledWindow); + + /* Calendar */ + cal.calendar = gtk_calendar_new (); + + t = time (NULL); + tm = localtime (&t); + gtk_calendar_select_month (GTK_CALENDAR (cal.calendar), tm->tm_mon, tm->tm_year + 1900); + gtk_calendar_select_day (GTK_CALENDAR (cal.calendar), tm->tm_mday); + + gtk_paned_add2 (GTK_PANED (hpaned), cal.calendar); + gtk_widget_show (cal.calendar); + + /* Notes list */ + cal.notesClist = gtk_clist_new_with_titles (6, titles); + gtk_clist_set_shadow_type (GTK_CLIST (cal.notesClist), GTK_SHADOW_OUT); + gtk_clist_set_compare_func (GTK_CLIST (cal.notesClist), CListCompareFunc); + gtk_clist_set_sort_column (GTK_CLIST (cal.notesClist), 0); + gtk_clist_set_sort_type (GTK_CLIST (cal.notesClist), GTK_SORT_ASCENDING); + gtk_clist_set_auto_sort (GTK_CLIST (cal.notesClist), FALSE); + gtk_clist_set_selection_mode (GTK_CLIST (cal.notesClist), GTK_SELECTION_EXTENDED); + + gtk_clist_set_column_width (GTK_CLIST (cal.notesClist), 0, 15); + gtk_clist_set_column_width (GTK_CLIST (cal.notesClist), 1, 52); + gtk_clist_set_column_width (GTK_CLIST (cal.notesClist), 2, 110); + gtk_clist_set_column_width (GTK_CLIST (cal.notesClist), 3, 130); + gtk_clist_set_column_width (GTK_CLIST (cal.notesClist), 4, 110); + gtk_clist_set_column_justification (GTK_CLIST (cal.notesClist), 0, GTK_JUSTIFY_RIGHT); + + for (i = 0; i < 6; i++) + { + if ((sColumn = g_malloc (sizeof (SortColumn))) == NULL) + { + g_print (_("Error: %s: line %d: Can't allocate memory!\n"), __FILE__, __LINE__); + gtk_main_quit (); + } + sColumn->clist = cal.notesClist; + sColumn->column = i; + gtk_signal_connect (GTK_OBJECT (GTK_CLIST (cal.notesClist)->column[i].button), "clicked", + GTK_SIGNAL_FUNC (SetSortColumn), (gpointer) sColumn); + } + + gtk_signal_connect (GTK_OBJECT (cal.notesClist), "select_row", + GTK_SIGNAL_FUNC (ClickEntry), NULL); + + scrolledWindow = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_set_usize (scrolledWindow, 550, 100); + gtk_container_add (GTK_CONTAINER (scrolledWindow), cal.notesClist); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledWindow), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + + gtk_box_pack_end (GTK_BOX (main_vbox), scrolledWindow, + TRUE, TRUE, 0); + + gtk_widget_show (cal.notesClist); + gtk_widget_show (scrolledWindow); + + cmap = gdk_colormap_get_system(); + cal.colour.red = 0xffff; + cal.colour.green = 0; + cal.colour.blue = 0; + if (!gdk_color_alloc (cmap, &(cal.colour))) + g_error (_("couldn't allocate colour")); + + questMark.pixmap = gdk_pixmap_create_from_xpm_d (GUI_CalendarWindow->window, + &questMark.mask, + &GUI_CalendarWindow->style->bg[GTK_STATE_NORMAL], + quest_xpm); + + CreateErrorDialog (&errorDialog, GUI_CalendarWindow); +} diff --git a/xgnokii/xgnokii_calendar.h b/xgnokii/xgnokii_calendar.h new file mode 100644 index 0000000..d0c8b8f --- /dev/null +++ b/xgnokii/xgnokii_calendar.h @@ -0,0 +1,18 @@ +/* + + X G N O K I I + + A Linux/Unix GUI for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#ifndef XGNOKII_CALENDAR_H +#define XGNOKII_CALENDAR_H + +extern void GUI_CreateCalendarWindow (); + +extern void GUI_ShowCalendar (); + +#endif diff --git a/xgnokii/xgnokii_cfg.c b/xgnokii/xgnokii_cfg.c new file mode 100644 index 0000000..c4cf9cb --- /dev/null +++ b/xgnokii/xgnokii_cfg.c @@ -0,0 +1,221 @@ +/* + + X G N O K I I + + A Linux/Unix GUI for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#include +#include +#include +#include + +#include "xgnokii_cfg.h" +#include "xgnokii.h" + +ConfigEntry config[] = { + {"name", &(xgnokiiConfig.user.name)}, + {"title", &(xgnokiiConfig.user.title)}, + {"company", &(xgnokiiConfig.user.company)}, + {"telephone", &(xgnokiiConfig.user.telephone)}, + {"fax", &(xgnokiiConfig.user.fax)}, + {"email", &(xgnokiiConfig.user.email)}, + {"address", &(xgnokiiConfig.user.address)}, + {"viewer", &(xgnokiiConfig.helpviewer)}, + {"mailbox", &(xgnokiiConfig.mailbox)}, + {"simlen", &(xgnokiiConfig.maxSIMLen)}, + {"phonelen", &(xgnokiiConfig.maxPhoneLen)}, + {"", NULL} +}; + + +static void GetDefaultValues () +{ + gchar *homedir; + + xgnokiiConfig.user.name = g_strdup (""); + xgnokiiConfig.user.title = g_strdup (""); + xgnokiiConfig.user.company = g_strdup (""); + xgnokiiConfig.user.telephone = g_strdup (""); + xgnokiiConfig.user.fax = g_strdup (""); + xgnokiiConfig.user.email = g_strdup (""); + xgnokiiConfig.user.address = g_strdup (""); + xgnokiiConfig.helpviewer = g_strdup ("netscape"); + if ((homedir = g_get_home_dir ()) == NULL) + homedir = ""; + xgnokiiConfig.mailbox = g_strdup_printf ("%s/Mail/smsbox", homedir); + xgnokiiConfig.maxSIMLen = g_strdup ("14"); + xgnokiiConfig.maxPhoneLen = g_strdup ("16"); +} + + +void GUI_ReadXConfig () +{ + FILE *file; + gchar *line; + gchar *homedir; + gchar *rcfile; + gchar *current; + register gint len; + register gint i; + + GetDefaultValues (); + +#ifdef WIN32 +/* homedir = getenv("HOMEDRIVE"); + g_strconcat(homedir, getenv("HOMEPATH"), NULL); */ + homedir = g_get_home_dir (); + rcfile=g_strconcat(homedir, "\\_xgnokiirc", NULL); +#else + if ((homedir = g_get_home_dir ()) == NULL) + { + g_print (_("WARNING: Can't find HOME enviroment variable!\n")); + return; + } + + if ((rcfile = g_strconcat (homedir, "/.xgnokiirc", NULL)) == NULL) + { + g_print (_("WARNING: Can't allocate memory for config reading!\n")); + return; + } +#endif + + if ((file = fopen (rcfile, "r")) == NULL) + { + g_free (rcfile); + return; + } + + g_free (rcfile); + + if ((line = (char *) g_malloc (255)) == NULL) + { + g_print (_("WARNING: Can't allocate memory for config reading!\n")); + fclose (file); + return; + } + + while (fgets (line, 255, file) != NULL) + { + gint v; + current = line; + + /* Strip leading, trailing whitespace */ + while (isspace ((gint) *current)) + current++; + + while ((strlen (current) > 0) && isspace ((gint) current[strlen (current) - 1])) + current[strlen (current) - 1] = '\0'; + + /* Ignore blank lines and comments */ + + if ((*current == '\n') || (*current == '\0') || (*current == '#')) + continue; + + i = 0; + while (*config[i].key != '\0') + { + len = strlen (config[i].key); + if (g_strncasecmp (config[i].key, current, len) == 0) + { + current += len; + while (isspace ((int) *current)) + current++; + if (*current == '=') + { + current++; + while(isspace ((int) *current)) + current++; + g_free (*config[i].value); + switch (i) + { + case 3: + case 4: + *config[i].value = g_strndup (current, max_phonebook_number_length); + break; + + case 7: + *config[i].value = g_strndup (current, HTMLVIEWER_LENGTH); + break; + + case 8: + *config[i].value = g_strndup (current, MAILBOX_LENGTH); + break; + + case 9: + case 10: + v = atoi (current); + if ( v > 0 && v < 100 ) + *config[i].value = g_strndup (current, 3); + break; + + default: + *config[i].value = g_strndup (current, MAX_BUSINESS_CARD_LENGTH); + break; + } + } + } + i++; + } + } + + fclose (file); + g_free (line); +} + + +gint GUI_SaveXConfig () +{ + FILE *file; + gchar *line; + gchar *homedir; + gchar *rcfile; + register gint i; + + if ((homedir = getenv ("HOME")) == NULL) + { + g_print (_("ERROR: Can't find HOME enviroment variable!\n")); + return (1); + } + + if ((rcfile = g_strconcat (homedir, "/.xgnokiirc", NULL)) == NULL) + { + g_print (_("ERROR: Can't allocate memory for config writing!\n")); + return (2); + } + + if ((file = fopen (rcfile, "w")) == NULL) + { + g_print (_("ERROR: Can't open file %s for writing!\n"), rcfile); + g_free (rcfile); + return (3); + } + + g_free (rcfile); + + i = 0; + while (*config[i].key != '\0') + { + if ((line = g_strdup_printf ("%s = %s\n", config[i].key, *config[i].value)) == NULL) + { + g_print (_("ERROR: Can't allocate memory for config writing!\n")); + fclose (file); + return (2); + } + if (fputs (line, file) == EOF) + { + g_print (_("ERROR: Can't write config file!\n")); + g_free (line); + fclose (file); + return (4); + } + g_free (line); + i++; + } + + fclose (file); + return (0); +} diff --git a/xgnokii/xgnokii_cfg.h b/xgnokii/xgnokii_cfg.h new file mode 100644 index 0000000..f258a19 --- /dev/null +++ b/xgnokii/xgnokii_cfg.h @@ -0,0 +1,28 @@ +/* + + X G N O K I I + + A Linux/Unix GUI for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#ifndef XGNOKII_CFG_H +#define XGNOKII_CFG_H + +#include +#include "xgnokii.h" + +#define HTMLVIEWER_LENGTH 200 +#define MAILBOX_LENGTH 200 + +typedef struct { + gchar key[10]; + gchar **value; +} ConfigEntry; + +extern void GUI_ReadXConfig(); +extern gint GUI_SaveXConfig(); + +#endif diff --git a/xgnokii/xgnokii_common.c b/xgnokii/xgnokii_common.c new file mode 100644 index 0000000..9f7acd4 --- /dev/null +++ b/xgnokii/xgnokii_common.c @@ -0,0 +1,332 @@ +/* + + X G N O K I I + + A Linux/Unix GUI for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#ifndef WIN32 +# include +# include +# include +# include +#endif +#include +#include +#include "misc.h" /* for _() */ +#include "xgnokii_common.h" +#include "xgnokii.h" +#include "xpm/quest.xpm" +#include "xpm/stop.xpm" +#include "xpm/info.xpm" + +typedef struct { + GUIEventType type; + void (*func)(void); +} GUIEvent; + +static GSList *guiEvents = NULL; + + +inline void DeleteEvent (const GtkWidget *widget, const GdkEvent *event, const gpointer data) +{ + gtk_widget_hide (GTK_WIDGET (widget)); +} + + +inline void CancelDialog (const GtkWidget *widget, const gpointer data) +{ + gtk_widget_hide (GTK_WIDGET (data)); +} + + +void CreateErrorDialog (ErrorDialog *errorDialog, GtkWidget *window) +{ + GtkWidget *button, *hbox, *pixmap; + + errorDialog->dialog = gtk_dialog_new (); + gtk_window_set_title (GTK_WINDOW (errorDialog->dialog), _("Error")); + gtk_window_set_modal (GTK_WINDOW (errorDialog->dialog), TRUE); + gtk_window_position (GTK_WINDOW (errorDialog->dialog), GTK_WIN_POS_MOUSE); + gtk_container_set_border_width (GTK_CONTAINER (errorDialog->dialog), 5); + gtk_signal_connect (GTK_OBJECT (errorDialog->dialog), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + + button = gtk_button_new_with_label (_("Cancel")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (errorDialog->dialog)->action_area), + button, FALSE, FALSE, 0); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (CancelDialog), (gpointer) errorDialog->dialog); + GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); + gtk_widget_grab_default (button); + gtk_widget_show (button); + + hbox = gtk_hbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (GTK_DIALOG (errorDialog->dialog)->vbox), hbox); + gtk_widget_show (hbox); + + if (window) + { + pixmap = NewPixmap (stop_xpm, window->window, + &window->style->bg[GTK_STATE_NORMAL]); + gtk_box_pack_start (GTK_BOX(hbox), pixmap, FALSE, FALSE, 10); + gtk_widget_show (pixmap); + } + + errorDialog->text = gtk_label_new (""); + gtk_box_pack_start (GTK_BOX(hbox), errorDialog->text, FALSE, FALSE, 10); + gtk_widget_show (errorDialog->text); +} + + +void CreateInfoDialog (InfoDialog *infoDialog, GtkWidget *window) +{ + GtkWidget *hbox, *pixmap; + + infoDialog->dialog = gtk_dialog_new (); + gtk_window_set_title (GTK_WINDOW (infoDialog->dialog), _("Info")); + gtk_window_set_modal (GTK_WINDOW (infoDialog->dialog), TRUE); + gtk_window_position (GTK_WINDOW (infoDialog->dialog), GTK_WIN_POS_MOUSE); + gtk_container_set_border_width (GTK_CONTAINER (infoDialog->dialog), 5); + gtk_signal_connect (GTK_OBJECT (infoDialog->dialog), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + + hbox = gtk_hbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (GTK_DIALOG (infoDialog->dialog)->vbox), hbox); + gtk_widget_show_now (hbox); + + if (window) + { + pixmap = NewPixmap (info_xpm, window->window, + &window->style->bg[GTK_STATE_NORMAL]); + gtk_box_pack_start (GTK_BOX(hbox), pixmap, FALSE, FALSE, 10); + gtk_widget_show_now (pixmap); + } + + infoDialog->text = gtk_label_new (""); + gtk_box_pack_start (GTK_BOX(hbox), infoDialog->text, FALSE, FALSE, 10); + gtk_widget_show_now (infoDialog->text); +} + + +void CreateYesNoDialog (YesNoDialog *yesNoDialog, const GtkSignalFunc yesFunc, + const GtkSignalFunc noFunc, GtkWidget *window) +{ + GtkWidget *button, *hbox, *pixmap; + + yesNoDialog->dialog = gtk_dialog_new (); + gtk_window_position (GTK_WINDOW (yesNoDialog->dialog), GTK_WIN_POS_MOUSE); + gtk_window_set_modal (GTK_WINDOW (yesNoDialog->dialog), TRUE); + gtk_container_set_border_width (GTK_CONTAINER (yesNoDialog->dialog), 5); + gtk_signal_connect (GTK_OBJECT (yesNoDialog->dialog), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + + + button = gtk_button_new_with_label (_("Yes")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (yesNoDialog->dialog)->action_area), + button, FALSE, TRUE, 0); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (yesFunc), (gpointer) yesNoDialog->dialog); + GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); + gtk_widget_grab_default (button); + gtk_widget_show (button); + + button = gtk_button_new_with_label (_("No")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (yesNoDialog->dialog)->action_area), + button, FALSE, TRUE, 0); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (noFunc), (gpointer) yesNoDialog->dialog); + gtk_widget_show (button); + + button = gtk_button_new_with_label (_("Cancel")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (yesNoDialog->dialog)->action_area), + button, FALSE, TRUE, 0); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (CancelDialog), (gpointer) yesNoDialog->dialog); + gtk_widget_show (button); + + hbox = gtk_hbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (GTK_DIALOG (yesNoDialog->dialog)->vbox), hbox); + gtk_widget_show (hbox); + + if (window) + { + pixmap = NewPixmap (quest_xpm, window->window, + &window->style->bg[GTK_STATE_NORMAL]); + gtk_box_pack_start (GTK_BOX (hbox), pixmap, FALSE, FALSE, 10); + gtk_widget_show (pixmap); + } + + yesNoDialog->text = gtk_label_new (""); + gtk_box_pack_start (GTK_BOX (hbox), yesNoDialog->text, FALSE, FALSE, 10); + gtk_widget_show (yesNoDialog->text); +} + + +GtkWidget* NewPixmap (gchar **data, GdkWindow *window, GdkColor *background) +{ + GtkWidget *wpixmap; + GdkPixmap *pixmap; + GdkBitmap *mask; + + pixmap = gdk_pixmap_create_from_xpm_d (window, &mask, background, data); + + wpixmap = gtk_pixmap_new (pixmap, mask); + + return wpixmap; +} + + +gint LaunchProcess (const gchar *p, const gchar *arg, const gint infile, + const gint outfile, const gint errfile) +{ + pid_t pid; + + if (p == 0) + return (1); + pid = fork (); + if (pid == -1) + return (-1); + if (pid == 0) + { + pid = getpid (); + setpgid (pid, pid); + if (getuid () != geteuid ()) + seteuid (getuid ()); + + signal (SIGINT, SIG_DFL); + signal (SIGQUIT, SIG_DFL); + signal (SIGTSTP, SIG_DFL); + signal (SIGTTIN, SIG_DFL); + signal (SIGTTOU, SIG_DFL); + signal (SIGCHLD, SIG_DFL); + + if (infile != STDIN_FILENO) + { + dup2 (infile, STDIN_FILENO); + close (infile); + } + if (outfile != STDOUT_FILENO) + { + dup2 (outfile, STDOUT_FILENO); + close (outfile); + } + if (errfile != STDERR_FILENO) + { + dup2 (errfile, STDERR_FILENO); + close (errfile); + } + + execlp (p, p, arg, NULL); + g_print (_("Can't exec %s\n"), p); + execlp ("/bin/false", p, NULL); + return (-1); + } + + setpgid (pid, pid); + return (0); +} + + +void RemoveZombie (const gint sign) +{ + gint status; + + wait (&status); +} + + +void Help (const GtkWidget *w, const gpointer data) +{ + gchar buf[255] = "file:"; + + strncat (buf, xgnokiiConfig.xgnokiidocsdir, 255 - strlen (buf)); + buf[254] = '\0'; + strncat (buf, (gchar *) data, 255 - strlen (buf)); + buf[254] = '\0'; + LaunchProcess (xgnokiiConfig.helpviewer, buf, STDIN_FILENO, STDOUT_FILENO, STDERR_FILENO); +} + + +inline gint strrncmp (const gchar * const s1, const gchar * const s2, size_t n) +{ + gint l1 = strlen (s1); + gint l2 = strlen (s2); + + if (l1 == 0 && l2 != 0) + return (-1); + else if (l1 != 0 && l2 == 0) + return (1); + + while (l1-- > 0 && l2-- > 0 && n-- > 0) + { + if (s1[l1] < s2[l2]) + return (-1); + else if (s1[l1] > s2[l2]) + return (1); + } + + return (0); +} + + +inline void GUI_Refresh (void) +{ + while (gtk_events_pending()) + gtk_main_iteration(); +} + + +inline void SetSortColumn (GtkWidget *widget, SortColumn *data) +{ + gtk_clist_set_sort_column (GTK_CLIST (data->clist), data->column); + gtk_clist_sort (GTK_CLIST (data->clist)); +} + + +inline void GUIEventAdd (GUIEventType type, void (*func)(void)) +{ + GUIEvent *event = g_malloc (sizeof (GUIEvent)); + + event->type = type; + event->func = func; + + guiEvents = g_slist_append (guiEvents, event); +} + + +bool GUIEventRemove (GUIEventType type, void (*func)(void)) +{ + GUIEvent event; + GSList *list; + + event.type = type; + event.func = func; + + list = g_slist_find (guiEvents, &event); + if (list) + { + g_print ("Nasiel som\n"); + guiEvents = g_slist_remove_link (guiEvents, list); + g_slist_free_1 (list); + return (TRUE); + } + + return (FALSE); +} + +static inline void CallEvent (gpointer data, gpointer user_data) +{ + GUIEvent *event = (GUIEvent *) data; + + if (event->type == GPOINTER_TO_INT (user_data)) + event->func (); +} + +inline void GUIEventSend (GUIEventType type) +{ + g_slist_foreach (guiEvents, CallEvent, GINT_TO_POINTER (type)); +} diff --git a/xgnokii/xgnokii_common.h b/xgnokii/xgnokii_common.h new file mode 100644 index 0000000..e90439a --- /dev/null +++ b/xgnokii/xgnokii_common.h @@ -0,0 +1,77 @@ +/* + + X G N O K I I + + A Linux/Unix GUI for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#ifndef XGNOKII_COMMON_H +#define XGNOKII_COMMON_H + +#include +#include /* for size_t */ + +typedef struct { + GtkWidget *clist; + gint column; +} SortColumn; + +typedef struct { + GtkWidget *dialog; + GtkWidget *text; +} ErrorDialog; + +typedef struct { + GtkWidget *dialog; + GtkWidget *text; +} InfoDialog; + +typedef struct { + GtkWidget *dialog; + GtkWidget *text; +} YesNoDialog; + +typedef struct { + GdkPixmap *pixmap; + GdkBitmap *mask; +} QuestMark; + +typedef enum { + GUI_EVENT_CONTACTS_CHANGED, + GUI_EVENT_CALLERS_GROUPS_CHANGED, + GUI_EVENT_SMS_NUMBER_CHANGED, + GUI_EVENT_SMS_CENTERS_CHANGED, + GUI_EVENT_NETMON_CHANGED, + GUI_EVENT_SMS_FOLDERS_CHANGED +} GUIEventType; + +extern void CancelDialog (const GtkWidget *, const gpointer); +extern void CreateErrorDialog (ErrorDialog *, GtkWidget *); +extern void CreateInfoDialog (InfoDialog *, GtkWidget *); +extern void CreateYesNoDialog (YesNoDialog *, const GtkSignalFunc, + const GtkSignalFunc, GtkWidget *); +extern GtkWidget* NewPixmap (gchar **, GdkWindow *, GdkColor *); +extern void DeleteEvent (const GtkWidget *, const GdkEvent *, const gpointer ); +extern gint LaunchProcess (const gchar *, const gchar *, const gint, + const gint, const gint); +extern void RemoveZombie (const gint); +extern void Help (const GtkWidget *, const gpointer); +extern gint strrncmp (const gchar * const, const gchar * const, size_t); +extern gchar *GetModel (const gchar *); +extern bool CallerGroupSupported (const gchar *); +extern bool NetmonitorSupported (const gchar *); +extern bool KeyboardSupported (const gchar *); +extern bool SMSSupported (const gchar *); +extern bool CalendarSupported (const gchar *); +extern bool DTMFSupported (const gchar *); +extern bool DataSupported (const gchar *); +extern bool SpeedDialSupported (const gchar *); +extern void GUI_Refresh (void); +extern void SetSortColumn (GtkWidget *, SortColumn *); +extern void GUIEventAdd (GUIEventType, void (*)(void)); +extern bool GUIEventRemove (GUIEventType, void (*)(void)); +extern void GUIEventSend (GUIEventType); +#endif diff --git a/xgnokii/xgnokii_contacts.c b/xgnokii/xgnokii_contacts.c new file mode 100644 index 0000000..39ef62b --- /dev/null +++ b/xgnokii/xgnokii_contacts.c @@ -0,0 +1,3433 @@ +/* + + X G N O K I I + + A Linux/Unix GUI for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + $Id$ + +*/ + + +#include "misc.h" + +#include +#include + +#ifndef WIN32 +# include +#else +# include +# define sleep(x) Sleep((x) * 1000) +# define usleep(x) Sleep(((x) < 1000) ? 1 : ((x) / 1000)) +# define index strchr +#endif + +#include +#include +#if __unices__ +# include +#endif +#include + +#include "gsm-api.h" +#include "gsm-common.h" +#include "xgnokii_contacts.h" +#include "xgnokii_lowlevel.h" +#include "xgnokii.h" +#include "xgnokii_common.h" +#include "xgnokii_lowlevel.h" +#include "xgnokii_sms.h" +#include "xpm/Read.xpm" +#include "xpm/Send.xpm" +#include "xpm/Open.xpm" +#include "xpm/Save.xpm" +#include "xpm/New.xpm" +#include "xpm/Duplicate.xpm" +#include "xpm/Edit.xpm" +#include "xpm/Delete.xpm" +#include "xpm/Dial.xpm" +#include "xpm/sim.xpm" +#include "xpm/phone.xpm" +#include "xpm/quest.xpm" + + +typedef struct { + GtkWidget *dialog; + GtkWidget *entry; +} DialVoiceDialog; + +typedef struct { + GtkWidget *dialog; + GtkWidget *entry; + gint row; + GtkWidget *gbutton; + GtkWidget *mbutton; + GtkWidget *wbutton; + GtkWidget *fbutton; + GtkWidget *hbutton; + PhonebookEntry *pbEntry; +} ExtPbkDialog; + +static GtkWidget *GUI_ContactsWindow; +static bool fbus3810; +static bool contactsMemoryInitialized; +static MemoryStatus memoryStatus; +static ContactsMemory contactsMemory; /* Hold contacts. */ +static GtkWidget *clist; +static StatusInfo statusInfo; +static ProgressDialog progressDialog = {NULL, NULL, NULL}; +static ErrorDialog errorDialog = {NULL, NULL}; +static FindEntryStruct findEntryStruct = { "", 0}; +static ExportDialogData exportDialogData = {NULL}; +static MemoryPixmaps memoryPixmaps; +static QuestMark questMark; +static EditEntryData newEditEntryData = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}; +static EditEntryData editEditEntryData = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}; +static EditEntryData duplicateEditEntryData = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL}; +static EditNumbersData editNumbersData = {NULL, NULL}; + +/* return != 0 if user has unsaved changes in contacts memory */ +inline gint GUI_ContactsIsChanged (void) +{ + return statusInfo.ch_ME | statusInfo.ch_SM; +} + + +/* return TRUE if Contacts memory was read from phone or from file */ +inline bool GUI_ContactsIsIntialized (void) +{ + return contactsMemoryInitialized; +} + + +static inline void Help1 (GtkWidget *w, gpointer data) +{ + gchar *indx = g_strdup_printf ("/help/%s/windows/contacts/index.html", xgnokiiConfig.locale); + Help (w, indx); + g_free (indx); +} + + +void RefreshStatusInfo (void) +{ + char p,s; + + if (statusInfo.ch_ME) + p = '*'; + else + p = ' '; + + if (statusInfo.ch_SM) + s = '*'; + else + s = ' '; + g_snprintf(statusInfo.text, STATUS_INFO_LENGTH, "SIM: %d/%d%c Phone: %d/%d%c", + memoryStatus.UsedSM, memoryStatus.MaxSM, s, + memoryStatus.UsedME, memoryStatus.MaxME, p); + gtk_label_set_text(GTK_LABEL (statusInfo.label), statusInfo.text); +} + + +static inline void SetGroup0 (GtkWidget *item, gpointer data) +{ + ((EditEntryData *) data)->newGroup = 0; +} + + +static inline void SetGroup1 (GtkWidget *item, gpointer data) +{ + ((EditEntryData *) data)->newGroup = 1; +} + + +static inline void SetGroup2 (GtkWidget *item, gpointer data) +{ + ((EditEntryData *) data)->newGroup = 2; +} + + +static inline void SetGroup3 (GtkWidget *item, gpointer data) +{ + ((EditEntryData *) data)->newGroup = 3; +} + + +static inline void SetGroup4 (GtkWidget *item, gpointer data) +{ + ((EditEntryData *) data)->newGroup = 4; +} + + +static inline void SetGroup5 (GtkWidget *item, gpointer data) +{ + ((EditEntryData *) data)->newGroup = 5; +} + + +PhonebookEntry *FindFreeEntry (GSM_MemoryType type) +{ + PhonebookEntry *entry; + gint start, end; + register gint i; + + if (type == GMT_ME) + { + if (memoryStatus.FreeME == 0) + return NULL; + start = 0; + end = memoryStatus.MaxME; + } + else + { + if (memoryStatus.FreeSM == 0) + return NULL; + start = memoryStatus.MaxME; + end = memoryStatus.MaxME + memoryStatus.MaxSM; + } + + for(i = start; i < end; i++) + { + entry = g_ptr_array_index(contactsMemory, i); + if (entry->status == E_Empty || entry->status == E_Deleted) + return entry; + } + + return NULL; +} + + +inline PhonebookEntry *GUI_GetEntry (GSM_MemoryType type, gint nr) +{ + if ((type == GMT_ME && (nr < 1 || nr >= memoryStatus.MaxME)) || + (type == GMT_SM && (nr < 1 || nr >= memoryStatus.MaxSM))) + return NULL; + + if (type == GMT_ME) + return g_ptr_array_index (contactsMemory, nr - 1); + else + return g_ptr_array_index (contactsMemory, nr + memoryStatus.MaxME - 1); +} + + +static void CloseContacts (GtkWidget *w, gpointer data) +{ + gtk_widget_hide (GUI_ContactsWindow); +} + + +/* I don't want to allow window to close */ +static void ProgressDialogDeleteEvent (GtkWidget *w, gpointer data) +{ + return; +} + + +static void CancelEditDialog (GtkWidget *widget, gpointer data ) +{ + gtk_widget_hide(GTK_WIDGET(((EditEntryData*) data)->dialog)); +} + + + +static void OkEditEntryDialog (GtkWidget *widget, gpointer data) +{ + gchar *clist_row[4]; + PhonebookEntry *entry; + + if (GTK_TOGGLE_BUTTON(((EditEntryData*) data)->memoryTypePhone)->active && + ((EditEntryData*) data)->pbEntry->entry.MemoryType == GMT_SM) + { + if ((entry = FindFreeEntry(GMT_ME)) == NULL) + { + gtk_label_set_text(GTK_LABEL(errorDialog.text), _("Can't change memory type!")); + gtk_widget_show (errorDialog.dialog); + return; + } + strncpy(entry->entry.Name, + gtk_entry_get_text(GTK_ENTRY (((EditEntryData*) data)->name)), + max_phonebook_name_length); + entry->entry.Name[max_phonebook_name_length] = '\0'; + + if (GetModelFeature(FN_PHONEBOOK)==F_PBK71INT) + { + } + else + { + strncpy(entry->entry.Number, + gtk_entry_get_text (GTK_ENTRY(((EditEntryData*) data)->number)), + max_phonebook_number_length); + entry->entry.Name[max_phonebook_number_length] = '\0'; + } + + entry->entry.Group = ((EditEntryData*) data)->newGroup; + + entry->status = E_Changed; + + ((EditEntryData*) data)->pbEntry->status = E_Deleted; + + memoryStatus.UsedME++; + memoryStatus.FreeME--; + memoryStatus.UsedSM--; + memoryStatus.FreeSM++; + statusInfo.ch_ME = statusInfo.ch_SM = 1; + + ((EditEntryData*) data)->pbEntry = entry; + } + else if (GTK_TOGGLE_BUTTON(((EditEntryData*) data)->memoryTypeSIM)->active && + ((EditEntryData*) data)->pbEntry->entry.MemoryType == GMT_ME) + { + if ((entry = FindFreeEntry(GMT_SM)) == NULL) + { + gtk_label_set_text(GTK_LABEL (errorDialog.text), _("Can't change memory type!")); + gtk_widget_show (errorDialog.dialog); + return; + } + strncpy(entry->entry.Name, + gtk_entry_get_text(GTK_ENTRY (((EditEntryData*) data)->name)), + max_phonebook_sim_name_length); + entry->entry.Name[max_phonebook_sim_name_length] = '\0'; + + if (strlen(gtk_entry_get_text(GTK_ENTRY (((EditEntryData*) data)->name))) > max_phonebook_sim_name_length) + { + gtk_label_set_text( GTK_LABEL (errorDialog.text), _("Sorry, phonebook name will be truncated,\n\ +because you save it into SIM memory!")); + gtk_widget_show (errorDialog.dialog); + } + + if (GetModelFeature(FN_PHONEBOOK)==F_PBK71INT) + { + } + else + { + strncpy(entry->entry.Number, + gtk_entry_get_text (GTK_ENTRY(((EditEntryData*) data)->number)), + max_phonebook_sim_number_length); + entry->entry.Name[max_phonebook_sim_number_length] = '\0'; + } + + entry->entry.Group = ((EditEntryData*) data)->newGroup; + + entry->status = E_Changed; + + ((EditEntryData*) data)->pbEntry->status = E_Deleted; + + memoryStatus.UsedME--; + memoryStatus.FreeME++; + memoryStatus.UsedSM++; + memoryStatus.FreeSM--; + statusInfo.ch_ME = statusInfo.ch_SM = 1; + + ((EditEntryData*) data)->pbEntry = entry; + } + else + { + if (GTK_TOGGLE_BUTTON(((EditEntryData*) data)->memoryTypePhone)->active) + { + strncpy(((EditEntryData*) data)->pbEntry->entry.Name, + gtk_entry_get_text(GTK_ENTRY (((EditEntryData*) data)->name)), + max_phonebook_name_length); + ((EditEntryData*) data)->pbEntry->entry.Name[max_phonebook_name_length] = '\0'; + + if (GetModelFeature(FN_PHONEBOOK)==F_PBK71INT) + { + } + else + { + strncpy(((EditEntryData*) data)->pbEntry->entry.Number, + gtk_entry_get_text (GTK_ENTRY(((EditEntryData*) data)->number)), + max_phonebook_number_length); + ((EditEntryData*) data)->pbEntry->entry.Name[max_phonebook_number_length] = '\0'; + } + } + else + { + strncpy(((EditEntryData*) data)->pbEntry->entry.Name, + gtk_entry_get_text(GTK_ENTRY (((EditEntryData*) data)->name)), + max_phonebook_sim_name_length); + ((EditEntryData*) data)->pbEntry->entry.Name[max_phonebook_sim_name_length] = '\0'; + + if (strlen(gtk_entry_get_text(GTK_ENTRY (((EditEntryData*) data)->name))) > max_phonebook_sim_name_length) + { + gtk_label_set_text (GTK_LABEL (errorDialog.text), _("Sorry, phonebook name will be truncated,\n\ +because you save it into SIM memory!")); + gtk_widget_show (errorDialog.dialog); + } + + if (GetModelFeature(FN_PHONEBOOK)==F_PBK71INT) + { + } + else + { + strncpy(((EditEntryData*) data)->pbEntry->entry.Number, + gtk_entry_get_text (GTK_ENTRY(((EditEntryData*) data)->number)), + max_phonebook_sim_number_length); + ((EditEntryData*) data)->pbEntry->entry.Name[max_phonebook_sim_number_length] = '\0'; + } + } + + ((EditEntryData*) data)->pbEntry->entry.Group = ((EditEntryData*) data)->newGroup; + + ((EditEntryData*) data)->pbEntry->status = E_Changed; + + if (((EditEntryData*) data)->pbEntry->entry.MemoryType == GMT_ME) + statusInfo.ch_ME = 1; + else + statusInfo.ch_SM = 1; + } + + gtk_widget_hide (GTK_WIDGET(((EditEntryData*) data)->dialog)); + + RefreshStatusInfo (); + + gtk_clist_freeze (GTK_CLIST (clist)); + gtk_clist_remove (GTK_CLIST (clist), ((EditEntryData*) data)->row); + + clist_row[0] = ((EditEntryData*) data)->pbEntry->entry.Name; + + clist_row[1] = ((EditEntryData*) data)->pbEntry->entry.Number; + + if( ((EditEntryData*) data)->pbEntry->entry.MemoryType == GMT_ME) + clist_row[2] = "P"; + else + clist_row[2] = "S"; + if (GetModelFeature(FN_CALLERGROUPS)!=0) + clist_row[3] = xgnokiiConfig.callerGroups[((EditEntryData*) data)->pbEntry->entry.Group]; + else + clist_row[3] = ""; + gtk_clist_insert(GTK_CLIST (clist), ((EditEntryData*) data)->row, clist_row); + if (((EditEntryData*) data)->pbEntry->entry.MemoryType == GMT_ME) + gtk_clist_set_pixmap( GTK_CLIST (clist), ((EditEntryData*) data)->row, 2, + memoryPixmaps.phoneMemPix, memoryPixmaps.mask); + else + gtk_clist_set_pixmap( GTK_CLIST (clist), ((EditEntryData*) data)->row, 2, + memoryPixmaps.simMemPix, memoryPixmaps.mask); + + gtk_clist_set_row_data(GTK_CLIST (clist), ((EditEntryData*) data)->row, (gpointer) ((EditEntryData*) data)->pbEntry); + + gtk_clist_sort(GTK_CLIST (clist)); + gtk_clist_thaw(GTK_CLIST (clist)); +} + + +static void OkDeleteEntryDialog(GtkWidget *widget, gpointer data ) +{ + PhonebookEntry *pbEntry; + GList *sel; + gint row; + + sel = GTK_CLIST (clist)->selection; + + gtk_clist_freeze(GTK_CLIST (clist)); + + while (sel != NULL) + { + row = GPOINTER_TO_INT(sel->data); + pbEntry = (PhonebookEntry *) gtk_clist_get_row_data(GTK_CLIST (clist), row); + sel = sel->next; + + pbEntry->status = E_Deleted; + + if (pbEntry->entry.MemoryType == GMT_ME) + { + memoryStatus.UsedME--; + memoryStatus.FreeME++; + statusInfo.ch_ME = 1; + } + else + { + memoryStatus.UsedSM--; + memoryStatus.FreeSM++; + statusInfo.ch_SM = 1; + } + + gtk_clist_remove(GTK_CLIST (clist), row); + } + + RefreshStatusInfo (); + + gtk_widget_hide(GTK_WIDGET (data)); + + gtk_clist_thaw(GTK_CLIST (clist)); +} + + +static void OkNewEntryDialog(GtkWidget *widget, gpointer data ) +{ + gchar *clist_row[4]; + PhonebookEntry *entry; + + if (GTK_TOGGLE_BUTTON(((EditEntryData*) data)->memoryTypePhone)->active && + ((EditEntryData*) data)->pbEntry->entry.MemoryType == GMT_SM) + { + if ((entry = FindFreeEntry (GMT_ME)) == NULL) + { + gtk_label_set_text (GTK_LABEL (errorDialog.text), _("Can't change memory type!")); + gtk_widget_show (errorDialog.dialog); + return; + } + strncpy(entry->entry.Name, + gtk_entry_get_text(GTK_ENTRY (((EditEntryData*) data)->name)), + max_phonebook_name_length); + entry->entry.Name[max_phonebook_name_length] = '\0'; + + if (GetModelFeature(FN_PHONEBOOK)==F_PBK71INT) + { + } + else + { + strncpy(entry->entry.Number, + gtk_entry_get_text (GTK_ENTRY(((EditEntryData*) data)->number)), + max_phonebook_number_length); + entry->entry.Name[max_phonebook_number_length] = '\0'; + } + + entry->entry.Group = ((EditEntryData*) data)->newGroup; + + entry->status = E_Changed; + + ((EditEntryData*) data)->pbEntry = entry; + } + else if (GTK_TOGGLE_BUTTON(((EditEntryData*) data)->memoryTypeSIM)->active && + ((EditEntryData*) data)->pbEntry->entry.MemoryType == GMT_ME) + { + if ((entry = FindFreeEntry (GMT_SM)) == NULL) + { + gtk_label_set_text (GTK_LABEL (errorDialog.text), _("Can't change memory type!")); + gtk_widget_show (errorDialog.dialog); + return; + } + strncpy(entry->entry.Name, + gtk_entry_get_text (GTK_ENTRY (((EditEntryData*) data)->name)), + max_phonebook_sim_name_length); + entry->entry.Name[max_phonebook_sim_name_length] = '\0'; + + if (strlen(gtk_entry_get_text (GTK_ENTRY (((EditEntryData*) data)->name))) > max_phonebook_sim_name_length) + { + gtk_label_set_text (GTK_LABEL (errorDialog.text), _("Sorry, phonebook name will be truncated\n\ +because you save it into SIM memory!")); + gtk_widget_show (errorDialog.dialog); + } + + if (GetModelFeature(FN_PHONEBOOK)==F_PBK71INT) + { + } + else + { + strncpy(entry->entry.Number, + gtk_entry_get_text (GTK_ENTRY(((EditEntryData*) data)->number)), + max_phonebook_sim_number_length); + entry->entry.Name[max_phonebook_sim_number_length] = '\0'; + } + + entry->entry.Group = ((EditEntryData*) data)->newGroup; + + entry->status = E_Changed; + + ((EditEntryData*) data)->pbEntry = entry; + } + else + { + if (GTK_TOGGLE_BUTTON(((EditEntryData*) data)->memoryTypePhone)->active) + { + strncpy(((EditEntryData*) data)->pbEntry->entry.Name, + gtk_entry_get_text(GTK_ENTRY (((EditEntryData*) data)->name)), + max_phonebook_name_length); + ((EditEntryData*) data)->pbEntry->entry.Name[max_phonebook_name_length] = '\0'; + + if (GetModelFeature(FN_PHONEBOOK)==F_PBK71INT) + { + } + else + { + strncpy(((EditEntryData*) data)->pbEntry->entry.Number, + gtk_entry_get_text (GTK_ENTRY(((EditEntryData*) data)->number)), + max_phonebook_number_length); + ((EditEntryData*) data)->pbEntry->entry.Name[max_phonebook_number_length] = '\0'; + } + } + else + { + strncpy (((EditEntryData*) data)->pbEntry->entry.Name, + gtk_entry_get_text(GTK_ENTRY (((EditEntryData*) data)->name)), + max_phonebook_sim_name_length); + ((EditEntryData*) data)->pbEntry->entry.Name[max_phonebook_sim_name_length] = '\0'; + + if (strlen(gtk_entry_get_text (GTK_ENTRY (((EditEntryData*) data)->name))) > max_phonebook_sim_name_length) + { + gtk_label_set_text (GTK_LABEL (errorDialog.text), _("Sorry, phonebook name will be truncated\n\ +because you save it into SIM memory!")); + gtk_widget_show (errorDialog.dialog); + } + + if (GetModelFeature(FN_PHONEBOOK)==F_PBK71INT) + { + } + else + { + strncpy (((EditEntryData*) data)->pbEntry->entry.Number, + gtk_entry_get_text (GTK_ENTRY(((EditEntryData*) data)->number)), + max_phonebook_sim_number_length); + ((EditEntryData*) data)->pbEntry->entry.Name[max_phonebook_sim_number_length] = '\0'; + } + } + + ((EditEntryData*) data)->pbEntry->entry.Group = ((EditEntryData*) data)->newGroup; + + ((EditEntryData*) data)->pbEntry->status = E_Changed; + } + + if (((EditEntryData*) data)->pbEntry->entry.MemoryType == GMT_ME) + { + memoryStatus.UsedME++; + memoryStatus.FreeME--; + statusInfo.ch_ME = 1; + } + else + { + memoryStatus.UsedSM++; + memoryStatus.FreeSM--; + statusInfo.ch_SM = 1; + } + + gtk_widget_hide(GTK_WIDGET(((EditEntryData*) data)->dialog)); + + RefreshStatusInfo (); + + gtk_clist_freeze (GTK_CLIST (clist)); + clist_row[0] = ((EditEntryData*) data)->pbEntry->entry.Name; + + clist_row[1] = ((EditEntryData*) data)->pbEntry->entry.Number; + + if( ((EditEntryData*) data)->pbEntry->entry.MemoryType == GMT_ME) + clist_row[2] = "P"; + else + clist_row[2] = "S"; + if (GetModelFeature(FN_CALLERGROUPS)!=0) + clist_row[3] = xgnokiiConfig.callerGroups[((EditEntryData*) data)->pbEntry->entry.Group]; + else + clist_row[3] = ""; + gtk_clist_insert (GTK_CLIST (clist), 1, clist_row); + + if (((EditEntryData*) data)->pbEntry->entry.MemoryType == GMT_ME) + gtk_clist_set_pixmap (GTK_CLIST (clist), 1, 2, + memoryPixmaps.phoneMemPix, memoryPixmaps.mask); + else + gtk_clist_set_pixmap (GTK_CLIST (clist), 1, 2, + memoryPixmaps.simMemPix, memoryPixmaps.mask); + + gtk_clist_set_row_data (GTK_CLIST (clist), 1, (gpointer) ((EditEntryData*) data)->pbEntry); + + gtk_clist_sort (GTK_CLIST (clist)); + gtk_clist_thaw (GTK_CLIST (clist)); +} + + +static void OkChangeEntryDialog( GtkWidget *widget, gpointer data) +{ + gchar *clist_row[4]; + gint row; + PhonebookEntry *oldPbEntry, *newPbEntry; + GList *sel; + gchar string[100]; + + sel = GTK_CLIST (clist)->selection; + + gtk_widget_hide(GTK_WIDGET (data)); + + gtk_clist_freeze(GTK_CLIST (clist)); + + while (sel != NULL) + { + row = GPOINTER_TO_INT (sel->data); + oldPbEntry = (PhonebookEntry *) gtk_clist_get_row_data(GTK_CLIST (clist), row); + + sel = sel->next; + + if (oldPbEntry->entry.MemoryType == GMT_SM) + { + if ((newPbEntry = FindFreeEntry (GMT_ME)) == NULL) + { + gtk_label_set_text (GTK_LABEL (errorDialog.text), _("Can't change memory type!")); + gtk_widget_show (errorDialog.dialog); + return; + } + + newPbEntry->entry = oldPbEntry->entry; + newPbEntry->entry.MemoryType = GMT_ME; + + newPbEntry->status = E_Changed; + oldPbEntry->status = E_Deleted; + + memoryStatus.UsedME++; + memoryStatus.FreeME--; + memoryStatus.UsedSM--; + memoryStatus.FreeSM++; + statusInfo.ch_ME = statusInfo.ch_SM = 1; + + } + else + { + if ((newPbEntry = FindFreeEntry(GMT_SM)) == NULL) + { + gtk_label_set_text(GTK_LABEL (errorDialog.text), _("Can't change memory type!")); + gtk_widget_show (errorDialog.dialog); + return; + } + + newPbEntry->entry = oldPbEntry->entry; + newPbEntry->entry.Name[max_phonebook_sim_name_length] = '\0'; + newPbEntry->entry.MemoryType = GMT_SM; + + newPbEntry->status = E_Changed; + oldPbEntry->status = E_Deleted; + + memoryStatus.UsedME--; + memoryStatus.FreeME++; + memoryStatus.UsedSM++; + memoryStatus.FreeSM--; + statusInfo.ch_ME = statusInfo.ch_SM = 1; + } + + gtk_clist_remove(GTK_CLIST (clist), row); + + clist_row[0] = newPbEntry->entry.Name; + + if (newPbEntry->entry.SubEntriesCount>0) { + snprintf(string,100,"%s *",newPbEntry->entry.Number); + clist_row[1]=string; + } else clist_row[1] = newPbEntry->entry.Number; + + if( newPbEntry->entry.MemoryType == GMT_ME) + clist_row[2] = "P"; + else + clist_row[2] = "S"; + if (GetModelFeature(FN_CALLERGROUPS)!=0) + clist_row[3] = xgnokiiConfig.callerGroups[newPbEntry->entry.Group]; + else + clist_row[3] = ""; + gtk_clist_insert (GTK_CLIST (clist), row, clist_row); + if (newPbEntry->entry.MemoryType == GMT_ME) + gtk_clist_set_pixmap (GTK_CLIST (clist), row, 2, + memoryPixmaps.phoneMemPix, memoryPixmaps.mask); + else + gtk_clist_set_pixmap (GTK_CLIST (clist), row, 2, + memoryPixmaps.simMemPix, memoryPixmaps.mask); + + gtk_clist_set_row_data (GTK_CLIST (clist), row, (gpointer) newPbEntry); + } + + RefreshStatusInfo (); + gtk_clist_sort (GTK_CLIST (clist)); + gtk_clist_thaw (GTK_CLIST (clist)); +} + + +static void SearchEntry (void) +{ + gchar *buf; + gchar *entry; + gint i; + + if (!contactsMemoryInitialized || *findEntryStruct.pattern == '\0') + return; + + gtk_clist_unselect_all( GTK_CLIST (clist)); + g_strup(findEntryStruct.pattern); + + gtk_clist_get_text( GTK_CLIST (clist), findEntryStruct.lastRow, + findEntryStruct.type, &entry); + i = (findEntryStruct.lastRow + 1) % (memoryStatus.MaxME + memoryStatus.MaxSM); + + while (findEntryStruct.lastRow != i) + { + buf = g_strdup (entry); + g_strup (buf); + + if (strstr( buf, findEntryStruct.pattern)) + { + g_free(buf); + findEntryStruct.lastRow = i; + gtk_clist_select_row( GTK_CLIST (clist), + (i + memoryStatus.MaxME + memoryStatus.MaxSM - 1) + % (memoryStatus.MaxME + memoryStatus.MaxSM), + findEntryStruct.type); + gtk_clist_moveto( GTK_CLIST (clist), + (i + memoryStatus.MaxME + memoryStatus.MaxSM - 1) + % (memoryStatus.MaxME + memoryStatus.MaxSM), + findEntryStruct.type, 0.5, 0.5); + return; + } + g_free(buf); + gtk_clist_get_text (GTK_CLIST (clist), i, findEntryStruct.type, &entry); + + i = (i + 1) % (memoryStatus.MaxME + memoryStatus.MaxSM); + } + + gtk_label_set_text (GTK_LABEL (errorDialog.text), _("Can't find pattern!")); + gtk_widget_show (errorDialog.dialog); +} + + +static void OkFindEntryDialog (GtkWidget *widget, gpointer data) +{ + if (GTK_TOGGLE_BUTTON (((FindEntryData*) data)->nameB)->active) + findEntryStruct.type = FIND_NAME; + else + findEntryStruct.type = FIND_NUMBER; + + strncpy(findEntryStruct.pattern, + gtk_entry_get_text (GTK_ENTRY (((FindEntryData*) data)->pattern)), + max_phonebook_number_length); + findEntryStruct.pattern[max_phonebook_number_length] = '\0'; + + findEntryStruct.lastRow = 0; + + gtk_widget_hide( ((FindEntryData*) data)->dialog); + + SearchEntry (); +} + + +void CreateGroupMenu (EditEntryData *data) +{ + GtkWidget *item; + + if (data->groupMenu) + { + gtk_option_menu_remove_menu (GTK_OPTION_MENU (data->group)); + if (GTK_IS_WIDGET (data->groupMenu)) + gtk_widget_destroy (GTK_WIDGET (data->groupMenu)); + data->groupMenu = NULL; + } + + data->groupMenu = gtk_menu_new (); + + item = gtk_menu_item_new_with_label (xgnokiiConfig.callerGroups[0]); + gtk_signal_connect (GTK_OBJECT (item), "activate", + GTK_SIGNAL_FUNC (SetGroup0), + (gpointer) data); + gtk_widget_show (item); + gtk_menu_append (GTK_MENU (data->groupMenu), item); + + item = gtk_menu_item_new_with_label (xgnokiiConfig.callerGroups[1]); + gtk_signal_connect (GTK_OBJECT (item), "activate", + GTK_SIGNAL_FUNC (SetGroup1), + (gpointer) data); + gtk_widget_show (item); + gtk_menu_append (GTK_MENU (data->groupMenu), item); + + item = gtk_menu_item_new_with_label (xgnokiiConfig.callerGroups[2]); + gtk_signal_connect (GTK_OBJECT (item), "activate", + GTK_SIGNAL_FUNC (SetGroup2), + (gpointer) data); + gtk_widget_show (item); + gtk_menu_append (GTK_MENU (data->groupMenu), item); + + item = gtk_menu_item_new_with_label (xgnokiiConfig.callerGroups[3]); + gtk_signal_connect (GTK_OBJECT (item), "activate", + GTK_SIGNAL_FUNC (SetGroup3), + (gpointer) data); + gtk_widget_show (item); + gtk_menu_append (GTK_MENU (data->groupMenu), item); + + item = gtk_menu_item_new_with_label (xgnokiiConfig.callerGroups[4]); + gtk_signal_connect (GTK_OBJECT (item), "activate", + GTK_SIGNAL_FUNC (SetGroup4), + (gpointer) data); + gtk_widget_show (item); + gtk_menu_append (GTK_MENU (data->groupMenu), item); + + item = gtk_menu_item_new_with_label (xgnokiiConfig.callerGroups[5]); + gtk_signal_connect (GTK_OBJECT (item), "activate", + GTK_SIGNAL_FUNC (SetGroup5), + (gpointer) data); + gtk_widget_show (item); + gtk_menu_append (GTK_MENU (data->groupMenu), item); + + gtk_option_menu_set_menu (GTK_OPTION_MENU (data->group), data->groupMenu); +} + + +inline void GUI_RefreshGroupMenu (void) +{ + if (newEditEntryData.group) + CreateGroupMenu (&newEditEntryData); + + if (editEditEntryData.group) + CreateGroupMenu (&editEditEntryData); + + if (duplicateEditEntryData.group) + CreateGroupMenu (&duplicateEditEntryData); +} + + +static void EditSubEntries (GtkWidget *clist, + gint row, + gint column, + GdkEventButton *event, + gpointer data ) +{ + if(event && event->type == GDK_2BUTTON_PRESS) +// EditPbEntry((PhonebookEntry *) gtk_clist_get_row_data(GTK_CLIST (clist), row), +// row); + { + gchar *buf; + + gtk_clist_get_text (GTK_CLIST (clist), row, 1, &buf); + g_print (buf); + } +} + + +static void EditNumbers (GtkWidget *widget, void *data) +{ + GtkWidget *button, *clistScrolledWindow; + gchar *row[3]; + register gint i; + + + if (editNumbersData.dialog == NULL) + { + editNumbersData.dialog = gtk_dialog_new (); + gtk_window_set_title (GTK_WINDOW (editNumbersData.dialog), _("Numbers")); + gtk_window_set_modal (GTK_WINDOW (editNumbersData.dialog), TRUE); + gtk_container_set_border_width (GTK_CONTAINER (editNumbersData.dialog), 10); + gtk_signal_connect (GTK_OBJECT (editNumbersData.dialog), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + + button = gtk_button_new_with_label (_("Ok")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (editNumbersData.dialog)->action_area), + button, TRUE, TRUE, 10); +// gtk_signal_connect (GTK_OBJECT (button), "clicked", +// GTK_SIGNAL_FUNC (okFunc), (gpointer) editEntryData); + GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); + gtk_widget_grab_default (button); + gtk_widget_show (button); + + button = gtk_button_new_with_label (_("New")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (editNumbersData.dialog)->action_area), + button, TRUE, TRUE, 10); +// gtk_signal_connect (GTK_OBJECT (button), "clicked", +// GTK_SIGNAL_FUNC (okFunc), (gpointer) editEntryData); + gtk_widget_show (button); + + button = gtk_button_new_with_label (_("Cancel")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (editNumbersData.dialog)->action_area), + button, TRUE, TRUE, 10); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (CancelDialog), (gpointer) editNumbersData.dialog); + gtk_widget_show (button); + + gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (editNumbersData.dialog)->vbox), 5); + + editNumbersData.clist = gtk_clist_new (3); + gtk_clist_set_shadow_type (GTK_CLIST (editNumbersData.clist), GTK_SHADOW_OUT); + + gtk_clist_set_column_width (GTK_CLIST (editNumbersData.clist), 0, 4); + gtk_clist_set_column_width (GTK_CLIST (editNumbersData.clist), 1, 115); + gtk_clist_set_column_width (GTK_CLIST (editNumbersData.clist), 2, 10); + //gtk_clist_set_column_justification (GTK_CLIST (editNumbersData.clist), 2, GTK_JUSTIFY_CENTER); + + gtk_signal_connect (GTK_OBJECT (editNumbersData.clist), "select_row", + GTK_SIGNAL_FUNC (EditSubEntries), NULL); + + clistScrolledWindow = gtk_scrolled_window_new (NULL, NULL); + gtk_container_add (GTK_CONTAINER (clistScrolledWindow), editNumbersData.clist); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (clistScrolledWindow), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + + gtk_container_add (GTK_CONTAINER (GTK_DIALOG (editNumbersData.dialog)->vbox), + clistScrolledWindow); + + gtk_widget_show (editNumbersData.clist); + gtk_widget_show (clistScrolledWindow); + } + + gtk_clist_freeze (GTK_CLIST (editNumbersData.clist)); + gtk_clist_clear (GTK_CLIST (editNumbersData.clist)); + + for(i = 0; i < editNumbersData.pbEntry->entry.SubEntriesCount; i++) + { + if (strcmp (editNumbersData.pbEntry->entry.Number, + editNumbersData.pbEntry->entry.SubEntries[i].data.Number) == 0) + row[0] = "*"; + else + row[0] = ""; + + row[1] = editNumbersData.pbEntry->entry.SubEntries[i].data.Number; + + switch (editNumbersData.pbEntry->entry.SubEntries[i].EntryType) + { + case GSM_Number: + switch (editNumbersData.pbEntry->entry.SubEntries[i].NumberType) + { + case GSM_General: + row[2] = "General"; + break; + + case GSM_Mobile: + row[2] = "Mobile"; + break; + + case GSM_Work: + row[2] = "Work"; + break; + + case GSM_Fax: + row[2] = "Fax"; + break; + + case GSM_Home: + row[2] = "Home"; + break; + + default: + row[2] = "Unknown"; + break; + } + break; + + case GSM_Note: + row[2] = "Note"; + break; + + case GSM_Postal: + row[2] = "Postal"; + break; + + case GSM_Email: + row[2] = "E-Mail"; + break; + + case GSM_Name: + row[2] = "Name"; + break; + + default: + row[2] = "Unknown"; + break; + } + + gtk_clist_append (GTK_CLIST (editNumbersData.clist), row); +/* if (pbEntry->entry.MemoryType == GMT_ME) + gtk_clist_set_pixmap (GTK_CLIST (clist), row_i, 2, + memoryPixmaps.phoneMemPix, memoryPixmaps.mask); + else + gtk_clist_set_pixmap (GTK_CLIST (clist), row_i, 2, + memoryPixmaps.simMemPix, memoryPixmaps.mask); +*/ + } + + gtk_clist_thaw (GTK_CLIST (editNumbersData.clist)); + + gtk_widget_show (editNumbersData.dialog); +} + + +static void CreateEditDialog (EditEntryData *editEntryData, gchar *title, + GtkSignalFunc okFunc) +{ + GtkWidget *button, *label, *hbox; + + editEntryData->dialog = gtk_dialog_new (); + gtk_window_set_title (GTK_WINDOW (editEntryData->dialog), title); + gtk_window_set_modal (GTK_WINDOW (editEntryData->dialog), TRUE); + gtk_container_set_border_width (GTK_CONTAINER (editEntryData->dialog), 10); + gtk_signal_connect (GTK_OBJECT (editEntryData->dialog), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + + button = gtk_button_new_with_label (_("Ok")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (editEntryData->dialog)->action_area), + button, TRUE, TRUE, 10); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (okFunc), (gpointer) editEntryData); + GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); + gtk_widget_grab_default (button); + gtk_widget_show (button); + button = gtk_button_new_with_label (_("Cancel")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (editEntryData->dialog)->action_area), + button, TRUE, TRUE, 10); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (CancelEditDialog), (gpointer) editEntryData); + gtk_widget_show (button); + + gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (editEntryData->dialog)->vbox), 5); + + hbox = gtk_hbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (GTK_DIALOG (editEntryData->dialog)->vbox), hbox); + gtk_widget_show (hbox); + + label = gtk_label_new (_("Name:")); + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); + gtk_widget_show (label); + + editEntryData->name = gtk_entry_new_with_max_length (100); + + gtk_box_pack_end(GTK_BOX(hbox), editEntryData->name, FALSE, FALSE, 2); + gtk_widget_show (editEntryData->name); + + hbox = gtk_hbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (GTK_DIALOG (editEntryData->dialog)->vbox), hbox); + gtk_widget_show (hbox); + + label = gtk_label_new (_("Number:")); + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); + gtk_widget_show (label); + + if (GetModelFeature(FN_PHONEBOOK)==F_PBK71INT) + { + button = gtk_button_new (); + editEntryData->number = gtk_label_new (""); + + gtk_container_add (GTK_CONTAINER (button), editEntryData->number); + + gtk_box_pack_end(GTK_BOX(hbox), button, TRUE, TRUE, 2); + + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (EditNumbers), NULL); + gtk_widget_show_all (button); + } + else + { + editEntryData->number = gtk_entry_new_with_max_length (max_phonebook_number_length); + gtk_box_pack_end(GTK_BOX(hbox), editEntryData->number, FALSE, FALSE, 2); + gtk_widget_show (editEntryData->number); + } + +/* if (GetModelFeature(FN_PHONEBOOK)==F_PBK71INT) { + + hbox = gtk_hbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (GTK_DIALOG (editEntryData->dialog)->vbox), hbox); +// gtk_widget_show (hbox); + + label = gtk_label_new (_("Extended:")); + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 2); +// gtk_widget_show (label); + + editEntryData->extended = gtk_combo_new(); + gtk_box_pack_end(GTK_BOX(hbox), editEntryData->extended, FALSE, FALSE, 2); +// gtk_widget_show (editEntryData->extended); + + gtk_signal_connect (GTK_OBJECT (GTK_COMBO(editEntryData->extended)->entry), "activate", + GTK_SIGNAL_FUNC (ExtPbkChanged), (gpointer) editEntryData); + } +*/ + + editEntryData->memoryBox = gtk_hbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (GTK_DIALOG (editEntryData->dialog)->vbox), + editEntryData->memoryBox); + + label = gtk_label_new (_("Memory:")); + gtk_box_pack_start(GTK_BOX (editEntryData->memoryBox), label, FALSE, FALSE, 2); + gtk_widget_show (label); + + editEntryData->memoryTypePhone = gtk_radio_button_new_with_label (NULL, _("phone")); + gtk_box_pack_end (GTK_BOX (editEntryData->memoryBox), editEntryData->memoryTypePhone, TRUE, FALSE, 2); + gtk_widget_show (editEntryData->memoryTypePhone); + + editEntryData->memoryTypeSIM = gtk_radio_button_new_with_label( + gtk_radio_button_group (GTK_RADIO_BUTTON (editEntryData->memoryTypePhone)), "SIM"); + gtk_box_pack_end(GTK_BOX (editEntryData->memoryBox), editEntryData->memoryTypeSIM, TRUE, FALSE, 2); + gtk_widget_show (editEntryData->memoryTypeSIM); + + hbox = gtk_hbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (GTK_DIALOG (editEntryData->dialog)->vbox), hbox); + gtk_widget_show (hbox); + + editEntryData->groupLabel = gtk_label_new (_("Caller group:")); + gtk_box_pack_start (GTK_BOX (hbox), editEntryData->groupLabel, FALSE, FALSE, 2); + + editEntryData->group = gtk_option_menu_new (); + + CreateGroupMenu (editEntryData); + + gtk_box_pack_start (GTK_BOX (hbox), editEntryData->group, TRUE, TRUE, 0); +} + + +static void EditPbEntry(PhonebookEntry *pbEntry, gint row) +{ + if (editEditEntryData.dialog == NULL) + CreateEditDialog(&editEditEntryData, _("Edit entry"), OkEditEntryDialog); + + editEditEntryData.pbEntry = pbEntry; + editEditEntryData.newGroup = pbEntry->entry.Group; + editEditEntryData.row = row; + editNumbersData.pbEntry = pbEntry; + + gtk_entry_set_text (GTK_ENTRY (editEditEntryData.name), pbEntry->entry.Name); + + if (GetModelFeature(FN_PHONEBOOK)==F_PBK71INT) + gtk_label_set_text (GTK_LABEL (editEditEntryData.number), pbEntry->entry.Number); + else + gtk_entry_set_text (GTK_ENTRY (editEditEntryData.number), pbEntry->entry.Number); + + if (pbEntry->entry.MemoryType == GMT_ME) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editEditEntryData.memoryTypePhone), TRUE); + else + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (editEditEntryData.memoryTypeSIM), TRUE); + + gtk_option_menu_set_history( GTK_OPTION_MENU (editEditEntryData.group), + pbEntry->entry.Group); + + if (GetModelFeature(FN_CALLERGROUPS)!=0) + { + gtk_widget_show (editEditEntryData.group); + gtk_widget_show (editEditEntryData.groupLabel); + } + else + { + gtk_widget_hide (editEditEntryData.group); + gtk_widget_hide (editEditEntryData.groupLabel); + } + + if (memoryStatus.MaxME > 0) + gtk_widget_show (GTK_WIDGET (editEditEntryData.memoryBox)); + else + gtk_widget_hide (GTK_WIDGET (editEditEntryData.memoryBox)); + + gtk_widget_show (GTK_WIDGET (editEditEntryData.dialog)); +} + + +void DeletePbEntry (void) +{ + static GtkWidget *dialog = NULL; + GtkWidget *button, *hbox, *label, *pixmap; + + if (dialog == NULL) + { + dialog = gtk_dialog_new (); + gtk_window_set_title (GTK_WINDOW (dialog), _("Delete entries")); + gtk_window_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE); + gtk_window_set_modal(GTK_WINDOW (dialog), TRUE); + gtk_container_set_border_width (GTK_CONTAINER (dialog), 10); + gtk_signal_connect (GTK_OBJECT (dialog), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + + button = gtk_button_new_with_label (_("Ok")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), + button, TRUE, TRUE, 10); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (OkDeleteEntryDialog), (gpointer) dialog); + GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); + gtk_widget_grab_default (button); + gtk_widget_show (button); + button = gtk_button_new_with_label (_("Cancel")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), + button, TRUE, TRUE, 10); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (CancelDialog), (gpointer) dialog); + gtk_widget_show (button); + + gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), 5); + + hbox = gtk_hbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), hbox); + gtk_widget_show (hbox); + + pixmap = gtk_pixmap_new (questMark.pixmap, questMark.mask); + gtk_box_pack_start(GTK_BOX(hbox), pixmap, FALSE, FALSE, 10); + gtk_widget_show(pixmap); + + label = gtk_label_new(_("Do you want to delete selected entries?")); + gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, FALSE, 10); + gtk_widget_show(label); + } + + gtk_widget_show(GTK_WIDGET (dialog)); +} + + +void NewPbEntry(PhonebookEntry *pbEntry) +{ + if (newEditEntryData.dialog == NULL) + CreateEditDialog (&newEditEntryData, _("New entry"), OkNewEntryDialog); + + newEditEntryData.pbEntry = pbEntry; + newEditEntryData.newGroup = 5; + editNumbersData.pbEntry = pbEntry; + + gtk_entry_set_text (GTK_ENTRY (newEditEntryData.name), ""); + + if (GetModelFeature(FN_PHONEBOOK)==F_PBK71INT) + gtk_label_set_text (GTK_LABEL (newEditEntryData.number), ""); + else + gtk_entry_set_text (GTK_ENTRY (newEditEntryData.number), ""); + + if (pbEntry->entry.MemoryType == GMT_ME) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (newEditEntryData.memoryTypePhone), TRUE); + else + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (newEditEntryData.memoryTypeSIM), TRUE); + + gtk_option_menu_set_history( GTK_OPTION_MENU (newEditEntryData.group), + pbEntry->entry.Group); + + if (GetModelFeature(FN_CALLERGROUPS)!=0) + { + gtk_widget_show (newEditEntryData.group); + gtk_widget_show (newEditEntryData.groupLabel); + } + else + { + gtk_widget_hide (newEditEntryData.group); + gtk_widget_hide (newEditEntryData.groupLabel); + } + + if (memoryStatus.MaxME > 0) + gtk_widget_show (GTK_WIDGET (newEditEntryData.memoryBox)); + else + gtk_widget_hide (GTK_WIDGET (newEditEntryData.memoryBox)); + + gtk_widget_show(GTK_WIDGET (newEditEntryData.dialog)); +} + + +void DuplicatePbEntry (PhonebookEntry *pbEntry) +{ + if (duplicateEditEntryData.dialog == NULL) + CreateEditDialog (&duplicateEditEntryData, _("Duplicate entry"), OkNewEntryDialog); + + duplicateEditEntryData.pbEntry = pbEntry; + duplicateEditEntryData.newGroup = pbEntry->entry.Group; + editNumbersData.pbEntry = pbEntry; + + gtk_entry_set_text (GTK_ENTRY (duplicateEditEntryData.name), pbEntry->entry.Name); + + if (GetModelFeature(FN_PHONEBOOK)==F_PBK71INT) + gtk_label_set_text (GTK_LABEL (duplicateEditEntryData.number), pbEntry->entry.Number); + else + gtk_entry_set_text (GTK_ENTRY (duplicateEditEntryData.number), pbEntry->entry.Number); + + if (pbEntry->entry.MemoryType == GMT_ME) + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (duplicateEditEntryData.memoryTypePhone), TRUE); + else + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (duplicateEditEntryData.memoryTypeSIM), TRUE); + + gtk_option_menu_set_history( GTK_OPTION_MENU (duplicateEditEntryData.group), + pbEntry->entry.Group); + + if (GetModelFeature(FN_CALLERGROUPS)!=0) + { + gtk_widget_show (duplicateEditEntryData.group); + gtk_widget_show (duplicateEditEntryData.groupLabel); + } + else + { + gtk_widget_hide (duplicateEditEntryData.group); + gtk_widget_hide (duplicateEditEntryData.groupLabel); + } + + if (memoryStatus.MaxME > 0) + gtk_widget_show (GTK_WIDGET (duplicateEditEntryData.memoryBox)); + else + gtk_widget_hide (GTK_WIDGET (duplicateEditEntryData.memoryBox)); + + gtk_widget_show(GTK_WIDGET (duplicateEditEntryData.dialog)); +} + + +static void EditEntry (void) +{ + if (contactsMemoryInitialized) + { + if (GTK_CLIST (clist)->selection == NULL) + return; + + EditPbEntry((PhonebookEntry *) gtk_clist_get_row_data(GTK_CLIST (clist), + GPOINTER_TO_INT(GTK_CLIST (clist)->selection->data)), + GPOINTER_TO_INT(GTK_CLIST (clist)->selection->data)); + } +} + + +static void DuplicateEntry (void) +{ + PhonebookEntry *new, *old; + + if (contactsMemoryInitialized) + { + if (GTK_CLIST (clist)->selection == NULL) + return; + + old = (PhonebookEntry *) gtk_clist_get_row_data (GTK_CLIST (clist), GPOINTER_TO_INT(GTK_CLIST (clist)->selection->data)); + + if ( old->entry.MemoryType == GMT_ME) + { + if ((new = FindFreeEntry (GMT_ME)) == NULL) + if ((new = FindFreeEntry (GMT_SM)) == NULL) + { + gtk_label_set_text (GTK_LABEL (errorDialog.text), _("Can't find free memory.")); + gtk_widget_show (errorDialog.dialog); + return; + } + } + else + { + if ((new = FindFreeEntry(GMT_SM)) == NULL) + if ((new = FindFreeEntry(GMT_ME)) == NULL) + { + gtk_label_set_text (GTK_LABEL (errorDialog.text), _("Can't find free memory.")); + gtk_widget_show (errorDialog.dialog); + return; + } + } + + new->entry = old->entry; + + DuplicatePbEntry (new); + } +} + + +static void NewEntry (void) +{ + PhonebookEntry *entry; + + if (contactsMemoryInitialized) + { + if ((entry = FindFreeEntry (GMT_SM)) != NULL) + NewPbEntry(entry); + else if ((entry = FindFreeEntry (GMT_ME)) != NULL) + NewPbEntry(entry); + else + { + gtk_label_set_text (GTK_LABEL (errorDialog.text), _("Can't find free memory.")); + gtk_widget_show (errorDialog.dialog); + } + } +} + + +static inline void ClickEntry (GtkWidget *clist, + gint row, + gint column, + GdkEventButton *event, + gpointer data ) +{ + if(event && event->type == GDK_2BUTTON_PRESS) + EditPbEntry((PhonebookEntry *) gtk_clist_get_row_data(GTK_CLIST (clist), row), + row); +} + + +static inline void DeleteEntry (void) +{ + if (contactsMemoryInitialized) + { + if (GTK_CLIST (clist)->selection == NULL) + return; + + DeletePbEntry (); + } +} + + +static void ChMemType (void) +{ + static GtkWidget *dialog = NULL; + GtkWidget *button, *hbox, *label; + + if (contactsMemoryInitialized) + { + if (GTK_CLIST (clist)->selection == NULL) + return; + + if (dialog == NULL) + { + dialog = gtk_dialog_new (); + gtk_window_set_title (GTK_WINDOW (dialog), _("Changing memory type")); + gtk_window_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE); + gtk_window_set_modal(GTK_WINDOW (dialog), TRUE); + gtk_container_set_border_width (GTK_CONTAINER (dialog), 5); + gtk_signal_connect (GTK_OBJECT (dialog), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + + button = gtk_button_new_with_label (_("Continue")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), + button, FALSE, FALSE, 0); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (OkChangeEntryDialog), (gpointer) dialog); + GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); + gtk_widget_grab_default (button); + gtk_widget_show (button); + + button = gtk_button_new_with_label (_("Cancel")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), + button, FALSE, FALSE, 0); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (CancelDialog), (gpointer) dialog); + gtk_widget_show (button); + + hbox = gtk_hbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), hbox); + gtk_widget_show (hbox); + + label = gtk_label_new (_("If you change from phone memory to SIM memory\nsome entries may be truncated.")); + gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 10); + gtk_widget_show (label); + } + + gtk_widget_show (dialog); + } +} + + +static void FindFirstEntry (void) +{ + static FindEntryData findEntryData = { NULL }; + GtkWidget *button, *label, *hbox; + + if (contactsMemoryInitialized) + { + if (findEntryData.dialog == NULL) + { + findEntryData.dialog = gtk_dialog_new (); + gtk_window_set_title (GTK_WINDOW (findEntryData.dialog), _("Find")); + gtk_window_set_modal (GTK_WINDOW (findEntryData.dialog), TRUE); + gtk_container_set_border_width (GTK_CONTAINER (findEntryData.dialog), 10); + gtk_signal_connect (GTK_OBJECT (findEntryData.dialog), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + + button = gtk_button_new_with_label (_("Find")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (findEntryData.dialog)->action_area), + button, TRUE, TRUE, 10); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (OkFindEntryDialog), (gpointer) &findEntryData); + GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); + gtk_widget_grab_default (button); + gtk_widget_show (button); + + button = gtk_button_new_with_label (_("Cancel")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (findEntryData.dialog)->action_area), + button, TRUE, TRUE, 10); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (CancelEditDialog), (gpointer) &findEntryData); + gtk_widget_show (button); + + gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (findEntryData.dialog)->vbox), 5); + + hbox = gtk_hbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (GTK_DIALOG (findEntryData.dialog)->vbox), hbox); + gtk_widget_show (hbox); + + label = gtk_label_new (_("Pattern:")); + gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 2); + gtk_widget_show (label); + + findEntryData.pattern = gtk_entry_new_with_max_length (max_phonebook_name_length); + + gtk_box_pack_end (GTK_BOX (hbox), findEntryData.pattern, FALSE, FALSE, 2); + gtk_widget_show (findEntryData.pattern); + + hbox = gtk_hbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (GTK_DIALOG (findEntryData.dialog)->vbox), hbox); + gtk_widget_show (hbox); + + findEntryData.nameB = gtk_radio_button_new_with_label (NULL, _("Name")); + gtk_box_pack_start (GTK_BOX (hbox), findEntryData.nameB, TRUE, FALSE, 2); + gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (findEntryData.nameB), TRUE); + gtk_widget_show (findEntryData.nameB); + + findEntryData.numberB = gtk_radio_button_new_with_label ( + gtk_radio_button_group (GTK_RADIO_BUTTON (findEntryData.nameB)), _("Number")); + gtk_box_pack_start (GTK_BOX(hbox), findEntryData.numberB, TRUE, FALSE, 2); + gtk_widget_show (findEntryData.numberB); + } + + gtk_widget_show (findEntryData.dialog); + } +} + + +static inline void SelectAll (void) +{ + gtk_clist_select_all (GTK_CLIST (clist)); +} + + +static inline void OkDialVoiceDialog (GtkWidget *w, gpointer data) +{ + PhoneEvent *e; + gchar *buf = g_strdup (gtk_entry_get_text (GTK_ENTRY (((DialVoiceDialog *) data)->entry))); + + if (strlen (buf) > 0) + { + e = (PhoneEvent *) g_malloc (sizeof (PhoneEvent)); + e->event = Event_DialVoice; + e->data = buf; + GUI_InsertEvent (e); + } + else + g_free (buf); + + gtk_widget_hide (((DialVoiceDialog *) data)->dialog); +} + + +static void DialVoice (void) +{ + static DialVoiceDialog dialVoiceDialog = {NULL, NULL}; + GtkWidget *button, *label; + PhonebookEntry *pbEntry; + + if (dialVoiceDialog.dialog == NULL) + { + dialVoiceDialog.dialog = gtk_dialog_new (); + gtk_window_set_title (GTK_WINDOW (dialVoiceDialog.dialog), _("Dial voice")); + gtk_window_set_modal(GTK_WINDOW (dialVoiceDialog.dialog), TRUE); + gtk_container_set_border_width (GTK_CONTAINER (dialVoiceDialog.dialog), 10); + gtk_signal_connect (GTK_OBJECT (dialVoiceDialog.dialog), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + + button = gtk_button_new_with_label (_("Ok")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialVoiceDialog.dialog)->action_area), + button, TRUE, TRUE, 10); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (OkDialVoiceDialog), (gpointer) &dialVoiceDialog); + GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); + gtk_widget_grab_default (button); + gtk_widget_show (button); + + button = gtk_button_new_with_label (_("Cancel")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialVoiceDialog.dialog)->action_area), + button, TRUE, TRUE, 10); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (CancelDialog), (gpointer) dialVoiceDialog.dialog); + gtk_widget_show (button); + + gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialVoiceDialog.dialog)->vbox), 5); + + label = gtk_label_new (_("Number:")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialVoiceDialog.dialog)->vbox), label, FALSE, FALSE, 5); + gtk_widget_show (label); + + dialVoiceDialog.entry = gtk_entry_new_with_max_length (GSM_MAX_PHONEBOOK_NUMBER_LENGTH); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialVoiceDialog.dialog)->vbox), dialVoiceDialog.entry, FALSE, FALSE, 5); + gtk_widget_show (dialVoiceDialog.entry); + } + + if (GTK_CLIST (clist)->selection != NULL) + { + pbEntry = (PhonebookEntry *) gtk_clist_get_row_data (GTK_CLIST (clist), + GPOINTER_TO_INT (GTK_CLIST (clist)->selection->data)); + + gtk_entry_set_text (GTK_ENTRY (dialVoiceDialog.entry), pbEntry->entry.Number); + } + + gtk_widget_show (dialVoiceDialog.dialog); +} + + +static gint CListCompareFunc (GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2) +{ + static gchar phoneText[] = "B"; + static gchar simText[] = "A"; + char *text1 = NULL; + char *text2 = NULL; + gint ret; + + GtkCListRow *row1 = (GtkCListRow *) ptr1; + GtkCListRow *row2 = (GtkCListRow *) ptr2; + + switch (row1->cell[clist->sort_column].type) + { + case GTK_CELL_TEXT: + text1 = GTK_CELL_TEXT (row1->cell[clist->sort_column])->text; + break; + case GTK_CELL_PIXTEXT: + text1 = GTK_CELL_PIXTEXT (row1->cell[clist->sort_column])->text; + break; + default: + break; + } + switch (row2->cell[clist->sort_column].type) + { + case GTK_CELL_TEXT: + text2 = GTK_CELL_TEXT (row2->cell[clist->sort_column])->text; + break; + case GTK_CELL_PIXTEXT: + text2 = GTK_CELL_PIXTEXT (row2->cell[clist->sort_column])->text; + break; + default: + break; + } + + if (clist->sort_column == 2) + { + if (((PhonebookEntry *) row1->data)->entry.MemoryType == GMT_ME) + text1 = phoneText; + else + text1 = simText; + if (((PhonebookEntry *) row2->data)->entry.MemoryType == GMT_ME) + text2 = phoneText; + else + text2 = simText; + } + + if (!text2) + return (text1 != NULL); + + if (!text1) + return -1; + + if ((ret = g_strcasecmp (text1, text2)) == 0) + { + if (((PhonebookEntry *) row1->data)->entry.MemoryType < ((PhonebookEntry *) row2->data)->entry.MemoryType) + ret = -1; + else if (((PhonebookEntry *) row1->data)->entry.MemoryType > ((PhonebookEntry *) row2->data)->entry.MemoryType) + ret = 1; + } + + return ret; +} + + +static void CreateProgressDialog (gint maxME, gint maxSM) +{ + GtkWidget *vbox, *label; + GtkAdjustment *adj; + + progressDialog.dialog = gtk_window_new (GTK_WINDOW_DIALOG); + gtk_window_position (GTK_WINDOW (progressDialog.dialog), GTK_WIN_POS_MOUSE); + gtk_window_set_modal (GTK_WINDOW (progressDialog.dialog), TRUE); + gtk_signal_connect (GTK_OBJECT (progressDialog.dialog), "delete_event", + GTK_SIGNAL_FUNC (ProgressDialogDeleteEvent), NULL); + + vbox = gtk_vbox_new (FALSE, 10); + gtk_container_set_border_width (GTK_CONTAINER (vbox), 5); + gtk_container_add (GTK_CONTAINER (progressDialog.dialog), vbox); + + gtk_widget_show (vbox); + + label = gtk_label_new (_("Phone memory...")); + gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); + + gtk_widget_show (label); + + adj = (GtkAdjustment *) gtk_adjustment_new (0, 1, maxME, 0, 0, 0); + progressDialog.pbarME = gtk_progress_bar_new_with_adjustment (adj); + + gtk_box_pack_start (GTK_BOX (vbox), progressDialog.pbarME, FALSE, FALSE, 0); + gtk_widget_show (progressDialog.pbarME); + + label = gtk_label_new (_("SIM memory...")); + gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); + + gtk_widget_show (label); + + adj = (GtkAdjustment *) gtk_adjustment_new (0, 1, maxSM, 0, 0, 0); + progressDialog.pbarSM = gtk_progress_bar_new_with_adjustment (adj); + + gtk_box_pack_start (GTK_BOX (vbox), progressDialog.pbarSM, FALSE, FALSE, 0); + gtk_widget_show (progressDialog.pbarSM); +} + + +static void SaveContacts (void) +{ + register gint i; + PhonebookEntry *pbEntry; + PhoneEvent *e; + D_MemoryLocation *ml; + + if (progressDialog.dialog == NULL) + { + CreateProgressDialog (memoryStatus.MaxME, memoryStatus.MaxSM); + } + + if (contactsMemoryInitialized && progressDialog.dialog) + { + gtk_progress_set_value (GTK_PROGRESS (progressDialog.pbarME), 0); + gtk_progress_set_value (GTK_PROGRESS (progressDialog.pbarSM), 0); + gtk_window_set_title (GTK_WINDOW (progressDialog.dialog), _("Saving entries")); + gtk_widget_show_now (progressDialog.dialog); + + /* Save Phone memory */ + for(i = 0; i < memoryStatus.MaxME; i++) + { + pbEntry = g_ptr_array_index(contactsMemory, i); +#ifdef XDEBUG + g_print ("%d;%s;%s;%d;%d;%d\n", pbEntry->entry.Empty, pbEntry->entry.Name, + pbEntry->entry.Number, (int) pbEntry->entry.MemoryType, pbEntry->entry.Group, + (int) pbEntry->status); +#endif + if (pbEntry->status == E_Changed || pbEntry->status == E_Deleted) + { + if (pbEntry->status == E_Deleted) + { + pbEntry->entry.Name[0] = '\0'; + pbEntry->entry.Number[0] = '\0'; + pbEntry->entry.Group = 5; + } + + pbEntry->entry.Location = i + 1; + ml = (D_MemoryLocation *) g_malloc (sizeof (D_MemoryLocation)); + ml->entry = &(pbEntry->entry); + e = (PhoneEvent *) g_malloc (sizeof (PhoneEvent)); + e->event = Event_WriteMemoryLocation; + e->data = ml; + GUI_InsertEvent (e); + pthread_mutex_lock (&memoryMutex); + pthread_cond_wait (&memoryCond, &memoryMutex); + pthread_mutex_unlock (&memoryMutex); + + if (ml->status != GE_NONE) + { + g_print (_("%s: line: %d:Can't write ME memory entry number %d! Error: %d\n"), + __FILE__, __LINE__, i + 1, ml->status); + } + g_free (ml); + } + gtk_progress_set_value (GTK_PROGRESS (progressDialog.pbarME), i + 1); + GUI_Refresh (); + } + + /* Save SIM memory */ + for (i = memoryStatus.MaxME; i < memoryStatus.MaxME + memoryStatus.MaxSM; i++) + { + pbEntry = g_ptr_array_index (contactsMemory, i); + +#ifdef XDEBUG + g_print ("%d;%s;%s;%d;%d;%d\n", pbEntry->entry.Empty, pbEntry->entry.Name, + pbEntry->entry.Number, (int) pbEntry->entry.MemoryType, pbEntry->entry.Group, + (int) pbEntry->status); +#endif + + if (pbEntry->status == E_Changed || pbEntry->status == E_Deleted) + { + if (pbEntry->status == E_Deleted) + { + pbEntry->entry.Name[0] = '\0'; + pbEntry->entry.Number[0] = '\0'; + pbEntry->entry.Group = 5; + } + + pbEntry->entry.Location = i - memoryStatus.MaxME + 1; + ml = (D_MemoryLocation *) g_malloc (sizeof (D_MemoryLocation)); + ml->entry = &(pbEntry->entry); + e = (PhoneEvent *) g_malloc (sizeof (PhoneEvent)); + e->event = Event_WriteMemoryLocation; + e->data = ml; + GUI_InsertEvent (e); + pthread_mutex_lock (&memoryMutex); + pthread_cond_wait (&memoryCond, &memoryMutex); + pthread_mutex_unlock (&memoryMutex); + + if (ml->status != GE_NONE) + { + g_print(_("%s: line %d:Can't write SM memory entry number %d! Error: %d\n"), + __FILE__, __LINE__, i - memoryStatus.MaxME + 1, ml->status); + } + g_free (ml); + } + gtk_progress_set_value (GTK_PROGRESS (progressDialog.pbarSM), i - memoryStatus.MaxME + 1); + GUI_Refresh (); + } + + statusInfo.ch_ME = statusInfo.ch_SM = 0; + RefreshStatusInfo (); + gtk_widget_hide (progressDialog.dialog); + } +} + + +static GtkWidget *CreateSaveQuestionDialog (GtkSignalFunc SaveFunc, + GtkSignalFunc DontSaveFunc) +{ + GtkWidget *dialog; + GtkWidget *button, *label, *hbox, *pixmap; + + dialog = gtk_dialog_new (); + gtk_window_set_title (GTK_WINDOW (dialog), _("Save changes?")); + gtk_window_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE); + gtk_window_set_modal (GTK_WINDOW (dialog), TRUE); + gtk_container_set_border_width (GTK_CONTAINER (dialog), 10); + gtk_signal_connect (GTK_OBJECT (dialog), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + + button = gtk_button_new_with_label (_("Save")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), + button, TRUE, TRUE, 10); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (SaveFunc), (gpointer) dialog); + GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); + gtk_widget_grab_default (button); + gtk_widget_show (button); + + button = gtk_button_new_with_label (_("Don't save")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), + button, TRUE, TRUE, 10); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (DontSaveFunc), (gpointer) dialog); + gtk_widget_show (button); + + button = gtk_button_new_with_label (_("Cancel")); + gtk_box_pack_start(GTK_BOX (GTK_DIALOG (dialog)->action_area), + button, TRUE, TRUE, 10); + gtk_signal_connect(GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (CancelDialog), (gpointer) dialog); + gtk_widget_show (button); + + gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), 5); + + hbox = gtk_hbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), hbox); + gtk_widget_show (hbox); + + pixmap = gtk_pixmap_new (questMark.pixmap, questMark.mask); + gtk_box_pack_start (GTK_BOX (hbox), pixmap, FALSE, FALSE, 10); + gtk_widget_show (pixmap); + + label = gtk_label_new (_("You have made changes in your\ncontacts directory.\n\ +\n\nDo you want save these changes into phone?\n")); + gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 2); + gtk_widget_show (label); + + return dialog; +} + + +static void OkExtPbkDialog (GtkWidget *w, gpointer data) { + + ExtPbkDialog *d=(ExtPbkDialog*)data; + GSM_NumberType numtype; + gint i, found=999; + gchar *chars; + + if (w==d->gbutton) numtype=GSM_General; + else if (w==d->mbutton) numtype=GSM_Mobile; + else if (w==d->wbutton) numtype=GSM_Work; + else if (w==d->fbutton) numtype=GSM_Fax; + else if (w==d->hbutton) numtype=GSM_Home; + else numtype=GSM_General; + + /* Search through subentries */ + + for (i=0;ipbEntry->entry.SubEntriesCount;i++) { + if (d->pbEntry->entry.SubEntries[i].EntryType==GSM_Number) + if (d->pbEntry->entry.SubEntries[i].NumberType==numtype) + found=i; + } + + if (found>i) { /* Not found */ + found=d->pbEntry->entry.SubEntriesCount; + d->pbEntry->entry.SubEntriesCount++; + d->pbEntry->entry.SubEntries[found].EntryType=GSM_Number; + d->pbEntry->entry.SubEntries[found].NumberType=numtype; + } + + chars=gtk_editable_get_chars(GTK_EDITABLE(d->entry),0,-1); + strcpy(d->pbEntry->entry.SubEntries[found].data.Number,chars); + g_free(chars); + + /* Update the entry dialog */ + EditPbEntry(d->pbEntry,d->row); + + gtk_widget_hide (d->dialog); +} + + +void ExtPbkChanged (GtkWidget *widget, gpointer data ) +{ + static ExtPbkDialog dialog = {NULL,NULL,0,NULL,NULL,NULL,NULL,NULL}; + GtkWidget *button; + static GtkWidget *label; + gchar *chars; + + + if (dialog.dialog==NULL) { + + dialog.dialog=gtk_dialog_new(); + + gtk_window_set_title (GTK_WINDOW (dialog.dialog), _("Which Extended Phonebook Entry?")); + gtk_window_set_modal(GTK_WINDOW (dialog.dialog), TRUE); + gtk_container_set_border_width (GTK_CONTAINER (dialog.dialog), 10); + gtk_signal_connect (GTK_OBJECT (dialog.dialog), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + + dialog.gbutton = gtk_button_new_with_label (_("General")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog.dialog)->vbox), + dialog.gbutton, TRUE, TRUE, 10); + gtk_signal_connect (GTK_OBJECT (dialog.gbutton), "clicked", + GTK_SIGNAL_FUNC (OkExtPbkDialog), (gpointer)&dialog ); + gtk_widget_show (dialog.gbutton); + dialog.mbutton = gtk_button_new_with_label (_("Mobile")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog.dialog)->vbox), + dialog.mbutton, TRUE, TRUE, 10); + gtk_signal_connect (GTK_OBJECT (dialog.mbutton), "clicked", + GTK_SIGNAL_FUNC (OkExtPbkDialog), (gpointer)&dialog ); + gtk_widget_show (dialog.mbutton); + dialog.wbutton = gtk_button_new_with_label (_("Work")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog.dialog)->vbox), + dialog.wbutton, TRUE, TRUE, 10); + gtk_signal_connect (GTK_OBJECT (dialog.wbutton), "clicked", + GTK_SIGNAL_FUNC (OkExtPbkDialog), (gpointer)&dialog ); + gtk_widget_show (dialog.wbutton); + dialog.fbutton = gtk_button_new_with_label (_("Fax")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog.dialog)->vbox), + dialog.fbutton, TRUE, TRUE, 10); + gtk_signal_connect (GTK_OBJECT (dialog.fbutton), "clicked", + GTK_SIGNAL_FUNC (OkExtPbkDialog), (gpointer)&dialog ); + gtk_widget_show (dialog.fbutton); + dialog.hbutton = gtk_button_new_with_label (_("Home")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog.dialog)->vbox), + dialog.hbutton, TRUE, TRUE, 10); + gtk_signal_connect (GTK_OBJECT (dialog.hbutton), "clicked", + GTK_SIGNAL_FUNC (OkExtPbkDialog), (gpointer)&dialog ); + gtk_widget_show (dialog.hbutton); + + button = gtk_button_new_with_label (_("Cancel")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog.dialog)->action_area), + button, TRUE, TRUE, 10); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (CancelDialog), (gpointer) dialog.dialog); + gtk_widget_show (button); + + label = gtk_label_new(""); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog.dialog)->vbox), label, FALSE, FALSE, 5); + gtk_widget_show(label); + } + + chars=gtk_editable_get_chars(GTK_EDITABLE(widget),0,-1); + gtk_label_set_text(GTK_LABEL(label),chars); + g_free(chars); + dialog.pbEntry=((EditEntryData*)data)->pbEntry; + dialog.row=((EditEntryData*)data)->row; + dialog.entry=widget; + gtk_widget_show(dialog.dialog); +} + + + +void GUI_RefreshContacts (void) +{ + PhonebookEntry *pbEntry; + gint row_i = 0; + register gint i; + + if (contactsMemoryInitialized == FALSE) + return; + + gtk_clist_freeze (GTK_CLIST (clist)); + gtk_clist_clear (GTK_CLIST (clist)); + + for (i = 0; i < memoryStatus.MaxME + memoryStatus.MaxSM; i++) + { + gchar *row[4]; + + pbEntry = g_ptr_array_index (contactsMemory, i); + if (pbEntry->status != E_Empty && pbEntry->status != E_Deleted) + { + row[0] = pbEntry->entry.Name; + + row[1] = pbEntry->entry.Number; + + if (pbEntry->entry.MemoryType == GMT_ME) + row[2] = "P"; + else + row[2] = "S"; + if (GetModelFeature(FN_CALLERGROUPS)!=0) + row[3] = xgnokiiConfig.callerGroups[pbEntry->entry.Group]; + else + row[3] = ""; + gtk_clist_append (GTK_CLIST (clist), row); + if (pbEntry->entry.MemoryType == GMT_ME) + gtk_clist_set_pixmap (GTK_CLIST (clist), row_i, 2, + memoryPixmaps.phoneMemPix, memoryPixmaps.mask); + else + gtk_clist_set_pixmap (GTK_CLIST (clist), row_i, 2, + memoryPixmaps.simMemPix, memoryPixmaps.mask); + + gtk_clist_set_row_data (GTK_CLIST (clist), row_i++, (gpointer) pbEntry); + } +#ifdef XDEBUG + g_print ("%d;%s;%s;%d;%d;%d\n", pbEntry->entry.Empty, pbEntry->entry.Name, + pbEntry->entry.Number, (int) pbEntry->entry.MemoryType, pbEntry->entry.Group, + (int) pbEntry->status); +#endif + } + + gtk_clist_sort (GTK_CLIST (clist)); + gtk_clist_thaw (GTK_CLIST (clist)); +} + + +static gint InsertPBEntryME (GSM_PhonebookEntry *entry) +{ + PhonebookEntry *pbEntry; + + if ((pbEntry = (PhonebookEntry *) g_malloc (sizeof (PhonebookEntry))) == NULL) + { + g_print (_("%s: line %d: Can't allocate memory!\n"), __FILE__, __LINE__); + g_ptr_array_free (contactsMemory, TRUE); + gtk_widget_hide (progressDialog.dialog); + return (-1); + } + + pbEntry->entry = *entry; + + if (*pbEntry->entry.Name == '\0' && *pbEntry->entry.Number == '\0') + pbEntry->status = E_Empty; + else + pbEntry->status = E_Unchanged; + + g_ptr_array_add (contactsMemory, (gpointer) pbEntry); + gtk_progress_set_value (GTK_PROGRESS (progressDialog.pbarME), entry->Location); + GUI_Refresh (); + + return (GE_NONE); +} + + +static gint InsertPBEntrySM (GSM_PhonebookEntry *entry) +{ + PhonebookEntry *pbEntry; + + if ((pbEntry = (PhonebookEntry *) g_malloc (sizeof (PhonebookEntry))) == NULL) + { + g_print (_("%s: line %d: Can't allocate memory!\n"), __FILE__, __LINE__); + g_ptr_array_free (contactsMemory, TRUE); + gtk_widget_hide (progressDialog.dialog); + return (-1); + } + + pbEntry->entry = *entry; + + if (*pbEntry->entry.Name == '\0' && *pbEntry->entry.Number == '\0') + pbEntry->status = E_Empty; + else + { + pbEntry->status = E_Unchanged; + if (fbus3810) + { + memoryStatus.UsedSM++; + memoryStatus.FreeSM--; + } + } + + g_ptr_array_add (contactsMemory, (gpointer) pbEntry); + gtk_progress_set_value (GTK_PROGRESS (progressDialog.pbarSM), entry->Location); + GUI_Refresh (); + + return (GE_NONE); +} + + +static inline gint ReadFailedPBEntry (gint i) +{ + g_ptr_array_free (contactsMemory, TRUE); + gtk_widget_hide (progressDialog.dialog); + return (0); +} + + +static void ReadContactsMain (void) +{ + PhoneEvent *e; + D_MemoryStatus *ms; + D_MemoryLocationAll *mla; + PhonebookEntry *pbEntry; + register gint i; + + fbus3810 = FALSE; + + if (contactsMemoryInitialized == TRUE) + { + for (i = 0; i < memoryStatus.MaxME + memoryStatus.MaxSM; i++) + { + pbEntry = g_ptr_array_index (contactsMemory, i); + g_free (pbEntry); + } + g_ptr_array_free (contactsMemory, TRUE); + contactsMemory = NULL; + gtk_clist_clear (GTK_CLIST (clist)); + contactsMemoryInitialized = FALSE; + memoryStatus.MaxME = memoryStatus.UsedME = memoryStatus.FreeME = + memoryStatus.MaxSM = memoryStatus.UsedSM = memoryStatus.FreeSM = 0; + statusInfo.ch_ME = statusInfo.ch_SM = 0; + RefreshStatusInfo (); + } + + ms = (D_MemoryStatus *) g_malloc (sizeof (D_MemoryStatus)); + ms->memoryStatus.MemoryType = GMT_ME; + e = (PhoneEvent *) g_malloc (sizeof (PhoneEvent)); + e->event = Event_GetMemoryStatus; + e->data = ms; + GUI_InsertEvent (e); + pthread_mutex_lock (&memoryMutex); + pthread_cond_wait (&memoryCond, &memoryMutex); + pthread_mutex_unlock (&memoryMutex); + + if (ms->status != GE_NONE) + /* Phone don't support ME (5110) */ + memoryStatus.MaxME = memoryStatus.UsedME = memoryStatus.FreeME = 0; + else + { + memoryStatus.MaxME = ms->memoryStatus.Used + ms->memoryStatus.Free; + memoryStatus.UsedME = ms->memoryStatus.Used; + memoryStatus.FreeME = ms->memoryStatus.Free; + } + + ms->memoryStatus.MemoryType = GMT_SM; + e = (PhoneEvent *) g_malloc (sizeof (PhoneEvent)); + e->event = Event_GetMemoryStatus; + e->data = ms; + GUI_InsertEvent (e); + pthread_mutex_lock (&memoryMutex); + pthread_cond_wait (&memoryCond, &memoryMutex); + pthread_mutex_unlock (&memoryMutex); + + if (ms->status != GE_NONE) + { + fbus3810 = TRUE; /* I try to recognize memoryStatus.UsedSM while reading */ + gtk_label_set_text (GTK_LABEL (errorDialog.text), _("Can't get SM memory status!\n\n\ +Setting max SIM entries to 100!\n")); + memoryStatus.MaxSM = memoryStatus.FreeSM = 100; + memoryStatus.UsedSM = 0; + gtk_widget_show (errorDialog.dialog); + } + else + { + memoryStatus.MaxSM = ms->memoryStatus.Used + ms->memoryStatus.Free; + memoryStatus.UsedSM = ms->memoryStatus.Used; + memoryStatus.FreeSM = ms->memoryStatus.Free; + } + g_free (ms); + + statusInfo.ch_ME = statusInfo.ch_SM = 0; + + RefreshStatusInfo (); + + if (progressDialog.dialog == NULL) + { + CreateProgressDialog (memoryStatus.MaxME, memoryStatus.MaxSM); + } + + gtk_progress_set_value (GTK_PROGRESS (progressDialog.pbarME), 0); + gtk_progress_set_value (GTK_PROGRESS (progressDialog.pbarSM), 0); + gtk_window_set_title (GTK_WINDOW (progressDialog.dialog), _("Getting entries")); + gtk_widget_show_now (progressDialog.dialog); + + contactsMemory = g_ptr_array_new (); + + mla = (D_MemoryLocationAll *) g_malloc (sizeof (D_MemoryLocationAll)); + if (memoryStatus.MaxME > 0) + { + mla->min = 1; + mla->max = memoryStatus.MaxME; + mla->type = GMT_ME; + mla->used = memoryStatus.UsedME; //MW + mla->InsertEntry = InsertPBEntryME; + mla->ReadFailed = ReadFailedPBEntry; + + e = (PhoneEvent *) g_malloc (sizeof (PhoneEvent)); + e->event = Event_GetMemoryLocationAll; + e->data = mla; + GUI_InsertEvent (e); + pthread_mutex_lock (&memoryMutex); + pthread_cond_wait (&memoryCond, &memoryMutex); + pthread_mutex_unlock (&memoryMutex); + + if (mla->status != GE_NONE) + { + g_free (mla); + gtk_widget_hide (progressDialog.dialog); + return; + } + } + + mla->min = 1; + mla->max = memoryStatus.MaxSM; + mla->type = GMT_SM; + mla->used = memoryStatus.UsedSM; //MW + mla->InsertEntry = InsertPBEntrySM; + mla->ReadFailed = ReadFailedPBEntry; + + e = (PhoneEvent *) g_malloc (sizeof (PhoneEvent)); + e->event = Event_GetMemoryLocationAll; + e->data = mla; + GUI_InsertEvent (e); + pthread_mutex_lock (&memoryMutex); + pthread_cond_wait (&memoryCond, &memoryMutex); + pthread_mutex_unlock (&memoryMutex); + + if (mla->status != GE_NONE) + { + g_free (mla); + gtk_widget_hide (progressDialog.dialog); + return; + } + + g_free (mla); + + gtk_widget_hide (progressDialog.dialog); + + contactsMemoryInitialized = TRUE; + statusInfo.ch_ME = statusInfo.ch_SM = 0; + GUIEventSend (GUI_EVENT_CONTACTS_CHANGED); + GUIEventSend (GUI_EVENT_SMS_NUMBER_CHANGED); +} + + +static void ReadSaveCallback (GtkWidget *widget, gpointer data) +{ + gtk_widget_hide (GTK_WIDGET (data)); + SaveContacts (); + ReadContactsMain (); +} + + +static void ReadDontSaveCallback (GtkWidget *widget, gpointer data) +{ + gtk_widget_hide (GTK_WIDGET (data)); + ReadContactsMain (); +} + + +static void ReadSaveContacts (void) +{ + static GtkWidget *dialog = NULL; + + if (dialog == NULL) + dialog = CreateSaveQuestionDialog (ReadSaveCallback, ReadDontSaveCallback); + + gtk_widget_show (dialog); +} + + +static void ReadContacts (void) +{ + if (contactsMemoryInitialized == TRUE && (statusInfo.ch_ME || statusInfo.ch_SM)) + ReadSaveContacts (); + else + ReadContactsMain (); +} + + +inline void GUI_ReadContacts (void) +{ + ReadContacts (); +} + + +inline void GUI_SaveContacts (void) +{ + SaveContacts (); +} + + +inline void GUI_ShowContacts (void) +{ + if (xgnokiiConfig.callerGroups[0] == NULL) + { + GUI_Refresh (); + GUI_InitCallerGroupsInf (); + } + gtk_clist_set_column_visibility (GTK_CLIST (clist), 3, (GetModelFeature(FN_CALLERGROUPS)!=0)); + GUI_RefreshContacts (); + gtk_widget_show (GUI_ContactsWindow); +// if (!contactsMemoryInitialized) +// ReadContacts (); +} + +static void ExportVCARD (FILE *f) +{ + gchar buf2[10]; + register gint i,j; + PhonebookEntry *pbEntry; + + for(i = 0; i < memoryStatus.MaxME + memoryStatus.MaxSM; i++) + { + pbEntry = g_ptr_array_index (contactsMemory, i); + + if (pbEntry->status == E_Deleted || pbEntry->status == E_Empty) + continue; + + fprintf (f, "BEGIN:VCARD\n"); + fprintf (f, "VERSION:3.0\n"); + fprintf (f, "FN:%s\n", pbEntry->entry.Name); + fprintf (f, "TEL;PREF:%s\n", pbEntry->entry.Number); + + if (pbEntry->entry.MemoryType == GMT_ME) + sprintf (buf2, "ME%d", i + 1); + else + sprintf (buf2, "SM%d", i - memoryStatus.MaxME + 1); + + fprintf (f, "X_GSM_STORE_AT:%s\n", buf2); + fprintf (f, "X_GSM_CALLERGROUP:%d\n", pbEntry->entry.Group); + + /* Add ext. pbk info if required */ + if (GetModelFeature(FN_PHONEBOOK)==F_PBK71INT) + for (j = 0; j < pbEntry->entry.SubEntriesCount; j++) + { + if (pbEntry->entry.SubEntries[j].EntryType == GSM_Number) + fprintf (f, "TEL;UNKNOWN_%d:%s\n", pbEntry->entry.SubEntries[j].NumberType, + pbEntry->entry.SubEntries[j].data.Number); + } + + fprintf (f, "END:VCARD\n\n"); + } + + fclose (f); +} + + +static void ExportNative (FILE *f) +{ + gchar buf[IO_BUF_LEN], buf2[10]; + register gint i,j; + PhonebookEntry *pbEntry; + + + for(i = 0; i < memoryStatus.MaxME + memoryStatus.MaxSM; i++) + { + pbEntry = g_ptr_array_index (contactsMemory, i); + + if (pbEntry->status != E_Deleted && pbEntry->status != E_Empty) + { + if (index (pbEntry->entry.Name, ';') != NULL) + { + strcpy (buf, "\""); + strcat (buf, pbEntry->entry.Name); + strcat (buf, "\";"); + } + else + { + strcpy (buf, pbEntry->entry.Name); + strcat (buf, ";"); + } + + if (index (pbEntry->entry.Number, ';') != NULL) + { + strcat (buf, "\""); + strcat (buf, pbEntry->entry.Number); + strcat (buf, "\";"); + } + else + { + strcat (buf, pbEntry->entry.Number); + strcat (buf, ";"); + } + + if (pbEntry->entry.MemoryType == GMT_ME) + sprintf (buf2, "B;%d;%d;", i + 1, pbEntry->entry.Group); + else + sprintf (buf2, "A;%d;%d;", i - memoryStatus.MaxME + 1, pbEntry->entry.Group); + strcat (buf, buf2); + + /* Add ext. pbk info if required */ + if (GetModelFeature(FN_PHONEBOOK)==F_PBK71INT) + { + for (j = 0; j < pbEntry->entry.SubEntriesCount; j++) + if (pbEntry->entry.SubEntries[j].EntryType==GSM_Number) + { + sprintf(buf2,"%d;",pbEntry->entry.SubEntries[j].NumberType); + strcat(buf,buf2); + + if (index (pbEntry->entry.SubEntries[j].data.Number, ';') != NULL) + { + strcat (buf, "\""); + strcat (buf, pbEntry->entry.SubEntries[j].data.Number); + strcat (buf, "\";"); + } + else + { + strcat (buf, pbEntry->entry.SubEntries[j].data.Number); + strcat (buf, ";"); + } + } + } + fprintf (f, "%s\n", buf); + } + } + + fclose(f); +} + + +static void ExportContactsMain (gchar *name) +{ + FILE *f; + gchar buf[IO_BUF_LEN]; + + if ((f = fopen (name, "w")) == NULL) + { + g_snprintf (buf, IO_BUF_LEN, _("Can't open file %s for writing!"), name); + gtk_label_set_text (GTK_LABEL (errorDialog.text), buf); + gtk_widget_show (errorDialog.dialog); + return; + } + + if (strstr (name, ".vcard") || strstr (name, ".gcrd")) + ExportVCARD (f); + else + ExportNative (f); +} + + +static void YesExportDialog (GtkWidget *w, gpointer data) +{ + gtk_widget_hide (GTK_WIDGET (data)); + ExportContactsMain (exportDialogData.fileName); +} + + +static void OkExportDialog (GtkWidget *w, GtkFileSelection *fs) +{ + static YesNoDialog dialog = { NULL, NULL}; + FILE *f; + gchar err[80]; + + exportDialogData.fileName = gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs)); + gtk_widget_hide (GTK_WIDGET (fs)); + + if ((f = fopen (exportDialogData.fileName, "r")) != NULL) + { + fclose (f); + if (dialog.dialog == NULL) + { + CreateYesNoDialog (&dialog, YesExportDialog, CancelDialog, GUI_ContactsWindow); + gtk_window_set_title (GTK_WINDOW (dialog.dialog), _("Overwrite file?")); + g_snprintf ( err, 80, _("File %s already exist.\nOverwrite?"), exportDialogData.fileName); + gtk_label_set_text (GTK_LABEL(dialog.text), err); + } + gtk_widget_show (dialog.dialog); + } + else + ExportContactsMain (exportDialogData.fileName); +} + + +static void ExportContacts (void) +{ + static GtkWidget *fileDialog = NULL; + + if (contactsMemoryInitialized) + { + if (fileDialog == NULL) + { + fileDialog = gtk_file_selection_new (_("Export")); + gtk_signal_connect (GTK_OBJECT (fileDialog), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (fileDialog)->ok_button), + "clicked", GTK_SIGNAL_FUNC (OkExportDialog), (gpointer) fileDialog); + gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (fileDialog)->cancel_button), + "clicked", GTK_SIGNAL_FUNC (CancelDialog), (gpointer) fileDialog); + } + + gtk_widget_show (fileDialog); + } +} + + +static bool ParseLine (GSM_PhonebookEntry *entry, gint *num, gchar *buf) +{ + register gint i = 0; + size_t len; + gchar s_num[5]; + gchar *endptr; + + entry->Empty = FALSE; + entry->SubEntriesCount=0; + + len = strlen (buf); + if (buf[i] == '"') + { + i++; + while (i < len && i <= GSM_MAX_PHONEBOOK_NAME_LENGTH && buf[i] != '"') + { + entry->Name[i - 1] = buf[i]; + i++; + } + entry->Name[i - 1] = '\0'; + if (i >= len) + return FALSE; + if (buf[++i] != ';') + return FALSE; + } + else + { + while (i < len && i < GSM_MAX_PHONEBOOK_NAME_LENGTH && buf[i] != ';') + { + entry->Name[i] = buf[i]; + i++; + } + entry->Name[i] = '\0'; + if (buf[i] != ';') + return FALSE; + if (i >= len) + return FALSE; + } + buf += (i + 1); + i = 0; + + len = strlen (buf); + if (buf[i] == '"') + { + i++; + while (i < len && i <= GSM_MAX_PHONEBOOK_NUMBER_LENGTH && buf[i] != '"') + { + entry->Number[i - 1] = buf[i]; + i++; + } + entry->Number[i - 1] = '\0'; + if (i >= len) + return FALSE; + if (buf[++i] != ';') + return FALSE; + } + else + { + while (i < len && i < GSM_MAX_PHONEBOOK_NUMBER_LENGTH && buf[i] != ';') + { + entry->Number[i] = buf[i]; + i++; + } + entry->Number[i] = '\0'; + if (buf[i] != ';') + return FALSE; + if (i >= len) + return FALSE; + } + buf += (i + 1); + i = 0; + + if (!strncmp(buf, "B;", 2)) + { + entry->MemoryType = GMT_ME; + buf += 2; + } + else + if (!strncmp(buf, "A;", 2)) + { + entry->MemoryType = GMT_SM; + buf += 2; + } + else + if (!strncmp(buf, "ME;", 3)) + { + entry->MemoryType = GMT_ME; + buf += 3; + } + else + if (!strncmp(buf, "SM;", 3)) + { + entry->MemoryType = GMT_SM; + buf += 3; + } + else + return FALSE; + + len = strlen (buf); + while (i < len && i < 4 && buf[i] != ';') + { + s_num[i] = buf[i]; + i++; + } + s_num[i] = '\0'; + if (buf[i] != ';') + return FALSE; + if (i >= len) + return FALSE; + buf += (i + 1); + i = 0; + + *num = strtol (s_num, &endptr, 10); + if (s_num == endptr) + return FALSE; + if (*num == LONG_MIN || *num == LONG_MAX) + return FALSE; + + + if ( *buf == '\n' || *buf == '\r') /* for compatibility with NCDS */ + entry->Group = 5; + else + { + len = strlen (buf); + while (i < len && i < 4 && buf[i] != ';') + { + s_num[i] = buf[i]; + i++; + } + s_num[i] = '\0'; + if (buf[i] != ';') + return FALSE; + if (i >= len) + return FALSE; + + entry->Group = strtol (s_num, &endptr, 10); + if (s_num == endptr) + return FALSE; + if (entry->Group == LONG_MIN || entry->Group == LONG_MAX) + return FALSE; + if (entry->Group < 0 || entry->Group > 5) + return FALSE; + + buf += (i + 1); + i = 0; + + /* Ext Pbk Support */ + + while (*buf!='\n') + { + entry->SubEntries[entry->SubEntriesCount].EntryType=GSM_Number; + len = strlen (buf); + while (i < len && i < 4 && buf[i] != ';') + { + s_num[i] = buf[i]; + i++; + } + s_num[i] = '\0'; + if (buf[i] != ';') + return FALSE; + if (i >= len) + return FALSE; + entry->SubEntries[entry->SubEntriesCount].NumberType=(GSM_NumberType)strtol (s_num, &endptr, 10); + if (s_num == endptr) + return FALSE; + buf += (i + 1); + i = 0; + len = strlen (buf); + while (i < len && i < GSM_MAX_PHONEBOOK_TEXT_LENGTH && buf[i] != ';') + { + entry->SubEntries[entry->SubEntriesCount].data.Number[i] = buf[i]; + i++; + } + entry->SubEntries[entry->SubEntriesCount].data.Number[i] = '\0'; + buf += (i + 1); + i = 0; + if (i >= len) + return FALSE; + entry->SubEntriesCount++; + } + } + + return TRUE; +} + + +static void OkImportDialog (GtkWidget *w, GtkFileSelection *fs) +{ + FILE *f; + PhoneEvent *e; + D_MemoryStatus *ms; + PhonebookEntry *pbEntry; + GSM_PhonebookEntry gsmEntry; + gchar buf[IO_BUF_LEN]; + gchar *fileName; + gint i; + + fileName = gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs)); + gtk_widget_hide (GTK_WIDGET (fs)); + + if ((f = fopen (fileName, "r")) == NULL) + { + g_snprintf (buf, IO_BUF_LEN, _("Can't open file %s for reading!"), fileName); + gtk_label_set_text (GTK_LABEL(errorDialog.text), buf); + gtk_widget_show (errorDialog.dialog); + return; + } + + if (contactsMemoryInitialized == TRUE) + { + for(i = 0; i < memoryStatus.MaxME + memoryStatus.MaxSM; i++) + { + pbEntry = g_ptr_array_index(contactsMemory, i); + g_free(pbEntry); + } + g_ptr_array_free (contactsMemory, TRUE); + contactsMemory = NULL; + gtk_clist_clear (GTK_CLIST (clist)); + contactsMemoryInitialized = FALSE; + memoryStatus.MaxME = memoryStatus.UsedME = memoryStatus.FreeME = + memoryStatus.MaxSM = memoryStatus.UsedSM = memoryStatus.FreeSM = 0; + statusInfo.ch_ME = statusInfo.ch_SM = 0; + RefreshStatusInfo (); + } + + ms = (D_MemoryStatus *) g_malloc (sizeof (D_MemoryStatus)); + ms->memoryStatus.MemoryType = GMT_ME; + e = (PhoneEvent *) g_malloc (sizeof (PhoneEvent)); + e->event = Event_GetMemoryStatus; + e->data = ms; + GUI_InsertEvent (e); + pthread_mutex_lock (&memoryMutex); + pthread_cond_wait (&memoryCond, &memoryMutex); + pthread_mutex_unlock (&memoryMutex); + + if (ms->status != GE_NONE) + /* Phone don't support ME (5110) */ + memoryStatus.MaxME = memoryStatus.UsedME = memoryStatus.FreeME = 0; + else + { + memoryStatus.MaxME = ms->memoryStatus.Used + ms->memoryStatus.Free; + memoryStatus.UsedME = 0; + memoryStatus.FreeME = memoryStatus.MaxME; + } + + ms->memoryStatus.MemoryType = GMT_SM; + e = (PhoneEvent *) g_malloc (sizeof (PhoneEvent)); + e->event = Event_GetMemoryStatus; + e->data = ms; + GUI_InsertEvent (e); + pthread_mutex_lock (&memoryMutex); + pthread_cond_wait (&memoryCond, &memoryMutex); + pthread_mutex_unlock (&memoryMutex); + + if (ms->status != GE_NONE) + { + gtk_label_set_text (GTK_LABEL (errorDialog.text), _("Can't get SM memory status!\n\n\ +Setting max SIM entries set to 100!\n")); + memoryStatus.MaxSM = memoryStatus.FreeSM = 100; + memoryStatus.UsedSM = 0; + gtk_widget_show (errorDialog.dialog); + } + else + { + memoryStatus.MaxSM = ms->memoryStatus.Used + ms->memoryStatus.Free; + memoryStatus.UsedSM = 0; + memoryStatus.FreeSM = memoryStatus.MaxSM; + } + g_free (ms); + + statusInfo.ch_ME = statusInfo.ch_SM = 0; + + RefreshStatusInfo (); + + contactsMemory = g_ptr_array_new (); + + for (i = 1; i <= memoryStatus.MaxME; i++) + { + if ((pbEntry = (PhonebookEntry *) g_malloc (sizeof (PhonebookEntry))) == NULL) + { + fclose (f); + g_print (_("%s: line %d: Can't allocate memory!\n"), __FILE__, __LINE__); + g_ptr_array_free (contactsMemory, TRUE); + return; + } + + pbEntry->entry.Empty = FALSE; + pbEntry->entry.Name[0] = '\0'; + pbEntry->entry.Number[0] = '\0'; + pbEntry->entry.MemoryType = GMT_ME; + pbEntry->entry.Group = 5; + pbEntry->status = E_Deleted; /* I must set status to E_Deleted, since I */ + /* I want clear empty entries when saving to */ + /* to phone */ + pbEntry->entry.SubEntriesCount=0; + + g_ptr_array_add (contactsMemory, (gpointer) pbEntry); + pbEntry = NULL; + } + + for (i = 1; i <= memoryStatus.MaxSM; i++) + { + if ((pbEntry = (PhonebookEntry *) g_malloc (sizeof (PhonebookEntry))) == NULL) + { + fclose (f); + g_print (_("%s: line %d: Can't allocate memory!\n"), __FILE__, __LINE__); + g_ptr_array_free (contactsMemory, TRUE); + return; + } + + pbEntry->entry.Empty = FALSE; + pbEntry->entry.Name[0] = '\0'; + pbEntry->entry.Number[0] = '\0'; + pbEntry->entry.MemoryType = GMT_SM; + pbEntry->entry.Group = 5; + pbEntry->status = E_Deleted; + pbEntry->entry.SubEntriesCount=0; + + g_ptr_array_add (contactsMemory, (gpointer) pbEntry); + pbEntry = NULL; + } + + + while (fgets (buf, IO_BUF_LEN, f)) + { + if (ParseLine (&gsmEntry, &i, buf)) + { + if (gsmEntry.MemoryType == GMT_ME && memoryStatus.FreeME > 0 + && i > 0 && i <= memoryStatus.MaxME) + { + pbEntry = g_ptr_array_index (contactsMemory, i - 1); + + if (pbEntry->status == E_Deleted) + { + pbEntry->entry = gsmEntry; + pbEntry->status = E_Changed; + memoryStatus.UsedME++; + memoryStatus.FreeME--; + statusInfo.ch_ME = 1; + } + } + else if (gsmEntry.MemoryType == GMT_SM && memoryStatus.FreeSM > 0 + && i > 0 && i <= memoryStatus.MaxSM) + { + pbEntry = g_ptr_array_index (contactsMemory, memoryStatus.MaxME + i - 1); + + if (pbEntry->status == E_Deleted) + { + pbEntry->entry = gsmEntry; + pbEntry->status = E_Changed; + memoryStatus.UsedSM++; + memoryStatus.FreeSM--; + statusInfo.ch_SM = 1; + } + } + } + } + + contactsMemoryInitialized = TRUE; + RefreshStatusInfo (); + GUIEventSend (GUI_EVENT_CONTACTS_CHANGED); + GUIEventSend (GUI_EVENT_SMS_NUMBER_CHANGED); +} + + +static void ImportContactsFileDialog () +{ + static GtkWidget *fileDialog = NULL; + + if (fileDialog == NULL) + { + fileDialog = gtk_file_selection_new (_("Import")); + gtk_signal_connect (GTK_OBJECT (fileDialog), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (fileDialog)->ok_button), + "clicked", GTK_SIGNAL_FUNC (OkImportDialog), (gpointer) fileDialog); + gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (fileDialog)->cancel_button), + "clicked", GTK_SIGNAL_FUNC (CancelDialog), (gpointer) fileDialog); + } + + gtk_widget_show (fileDialog); +} + + +static void ImportSaveCallback (GtkWidget *widget, gpointer data) +{ + gtk_widget_hide (GTK_WIDGET (data)); + SaveContacts (); + ImportContactsFileDialog (); +} + + +static void ImportDontSaveCallback (GtkWidget *widget, gpointer data) +{ + gtk_widget_hide (GTK_WIDGET (data)); + ImportContactsFileDialog (); +} + + +void static ImportSaveContacts (void) +{ + static GtkWidget *dialog = NULL; + + if (dialog == NULL) + dialog = CreateSaveQuestionDialog (ImportSaveCallback, ImportDontSaveCallback); + + gtk_widget_show (dialog); +} + + +static void ImportContacts (void) +{ + if (contactsMemoryInitialized == TRUE && (statusInfo.ch_ME || statusInfo.ch_SM)) + ImportSaveContacts (); + else + ImportContactsFileDialog (); +} + + +static void QuitSaveCallback (GtkWidget *widget, gpointer data) +{ + PhoneEvent *e; + + gtk_widget_hide (GTK_WIDGET (data)); + SaveContacts (); + e = (PhoneEvent *) g_malloc (sizeof (PhoneEvent)); + e->event = Event_Exit; + e->data = NULL; + GUI_InsertEvent (e); + pthread_join (monitor_th, NULL); + gtk_main_quit (); +} + + +static void QuitDontSaveCallback (GtkWidget *widget, gpointer data) +{ + PhoneEvent *e; + + gtk_widget_hide (GTK_WIDGET (data)); + e = (PhoneEvent *) g_malloc (sizeof (PhoneEvent)); + e->event = Event_Exit; + e->data = NULL; + GUI_InsertEvent (e); + pthread_join (monitor_th, NULL); + gtk_main_quit (); +} + + +void GUI_QuitSaveContacts (void) +{ + static GtkWidget *dialog = NULL; + + if (dialog == NULL) + dialog = CreateSaveQuestionDialog (QuitSaveCallback, QuitDontSaveCallback); + + gtk_widget_show (dialog); +} + + +/* Function take number and return name belonged to number. + If no name is found, return NULL; + Do not modify returned name! +*/ +gchar *GUI_GetName (gchar *number) +{ + PhonebookEntry *pbEntry; + register gint i; + + if (contactsMemoryInitialized == FALSE || number == NULL) + return (gchar *)NULL; + + for(i = 0; i < memoryStatus.MaxME + memoryStatus.MaxSM; i++) + { + pbEntry = g_ptr_array_index (contactsMemory, i); + + if (pbEntry->status == E_Empty || pbEntry->status == E_Deleted) + continue; + + if (strcmp (pbEntry->entry.Number, number) == 0) + return pbEntry->entry.Name; + } + + for (i = 0; i < memoryStatus.MaxME + memoryStatus.MaxSM; i++) + { + pbEntry = g_ptr_array_index (contactsMemory, i); + + if (pbEntry->status == E_Empty || pbEntry->status == E_Deleted) + continue; + + if (strrncmp (pbEntry->entry.Number, number, 9) == 0) + return pbEntry->entry.Name; + } + + return NULL; +} + + +gchar *GUI_GetNameExact (gchar *number) +{ + PhonebookEntry *pbEntry; + register gint i; + + if (contactsMemoryInitialized == FALSE || number == NULL) + return (gchar *)NULL; + + for(i = 0; i < memoryStatus.MaxME + memoryStatus.MaxSM; i++) + { + pbEntry = g_ptr_array_index (contactsMemory, i); + + if (pbEntry->status == E_Empty || pbEntry->status == E_Deleted) + continue; + + if (strcmp (pbEntry->entry.Number, number) == 0) + return pbEntry->entry.Name; + } + + return NULL; +} + + +gchar *GUI_GetNumber (gchar *name) +{ + PhonebookEntry *pbEntry; + register gint i; + + if (contactsMemoryInitialized == FALSE || name == NULL || *name == '\0') + return (gchar *)NULL; + + for(i = 0; i < memoryStatus.MaxME + memoryStatus.MaxSM; i++) + { + pbEntry = g_ptr_array_index (contactsMemory, i); + + if (pbEntry->status == E_Empty || pbEntry->status == E_Deleted) + continue; + + if (strcmp (pbEntry->entry.Name, name) == 0) + return pbEntry->entry.Number; + } + + return NULL; +} + + +static void SelectDialogClickEntry (GtkWidget *clist, + gint row, + gint column, + GdkEventButton *event, + SelectContactData *data ) +{ + if(event && event->type == GDK_2BUTTON_PRESS) + gtk_signal_emit_by_name(GTK_OBJECT (data->okButton), "clicked"); +} + + +SelectContactData *GUI_SelectContactDialog (void) +{ + PhonebookEntry *pbEntry; + static SelectContactData selectContactData; + SortColumn *sColumn; + gchar *titles[4] = { "Name", "Number", "Memory", "Group"}; + gint row_i = 0; + register gint i; + gchar string[100]; + + if (contactsMemoryInitialized == FALSE) + return NULL; + + selectContactData.dialog = gtk_dialog_new (); + gtk_widget_set_usize (GTK_WIDGET (selectContactData.dialog), 436, 200); + gtk_window_set_title (GTK_WINDOW (selectContactData.dialog), _("Select contacts")); + gtk_window_set_modal (GTK_WINDOW (selectContactData.dialog), TRUE); + + selectContactData.okButton = gtk_button_new_with_label (_("Ok")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (selectContactData.dialog)->action_area), + selectContactData.okButton, TRUE, TRUE, 10); + GTK_WIDGET_SET_FLAGS (selectContactData.okButton, GTK_CAN_DEFAULT); + gtk_widget_grab_default (selectContactData.okButton); + gtk_widget_show (selectContactData.okButton); + + selectContactData.cancelButton = gtk_button_new_with_label (_("Cancel")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (selectContactData.dialog)->action_area), + selectContactData.cancelButton, TRUE, TRUE, 10); + gtk_widget_show (selectContactData.cancelButton); + + selectContactData.clist = gtk_clist_new_with_titles (4, titles); + gtk_clist_set_shadow_type (GTK_CLIST (selectContactData.clist), GTK_SHADOW_OUT); + gtk_clist_set_compare_func (GTK_CLIST (selectContactData.clist), CListCompareFunc); + gtk_clist_set_sort_column (GTK_CLIST (selectContactData.clist), 0); + gtk_clist_set_sort_type (GTK_CLIST (selectContactData.clist), GTK_SORT_ASCENDING); + gtk_clist_set_auto_sort (GTK_CLIST (selectContactData.clist), FALSE); + gtk_clist_set_selection_mode (GTK_CLIST (selectContactData.clist), GTK_SELECTION_EXTENDED); + + gtk_clist_set_column_width (GTK_CLIST(selectContactData.clist), 0, 150); + gtk_clist_set_column_width (GTK_CLIST(selectContactData.clist), 1, 115); + gtk_clist_set_column_width (GTK_CLIST(selectContactData.clist), 3, 70); + gtk_clist_set_column_justification (GTK_CLIST(selectContactData.clist), 2, GTK_JUSTIFY_CENTER); + gtk_clist_set_column_visibility (GTK_CLIST(selectContactData.clist), 3, (GetModelFeature(FN_CALLERGROUPS)!=0)); + + for (i = 0; i < 4; i++) + { + if ((sColumn = g_malloc (sizeof (SortColumn))) == NULL) + { + g_print (_("Error: %s: line %d: Can't allocate memory!\n"), __FILE__, __LINE__); + return NULL; + } + sColumn->clist = selectContactData.clist; + sColumn->column = i; + gtk_signal_connect (GTK_OBJECT (GTK_CLIST (selectContactData.clist)->column[i].button), "clicked", + GTK_SIGNAL_FUNC (SetSortColumn), (gpointer) sColumn); + } + + gtk_signal_connect (GTK_OBJECT (selectContactData.clist), "select_row", + GTK_SIGNAL_FUNC (SelectDialogClickEntry), + (gpointer) &selectContactData); + + selectContactData.clistScrolledWindow = gtk_scrolled_window_new (NULL, NULL); + gtk_container_add (GTK_CONTAINER (selectContactData.clistScrolledWindow), + selectContactData.clist); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (selectContactData.clistScrolledWindow), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (selectContactData.dialog)->vbox), + selectContactData.clistScrolledWindow, + TRUE, TRUE, 0); + + gtk_widget_show (selectContactData.clist); + gtk_widget_show (selectContactData.clistScrolledWindow); + + if (xgnokiiConfig.callerGroups[0] == NULL) + GUI_InitCallerGroupsInf (); + + gtk_clist_freeze (GTK_CLIST (selectContactData.clist)); + for (i = 0; i < memoryStatus.MaxME + memoryStatus.MaxSM; i++) + { + gchar *row[4]; + + pbEntry = g_ptr_array_index (contactsMemory, i); + if (pbEntry->status != E_Empty && pbEntry->status != E_Deleted) + { + row[0] = pbEntry->entry.Name; + + if (pbEntry->entry.SubEntriesCount>0) { + snprintf(string,100,"%s *",pbEntry->entry.Number); + row[1]=string; + } else row[1] = pbEntry->entry.Number; + + + if (pbEntry->entry.MemoryType == GMT_ME) + row[2] = "P"; + else + row[2] = "S"; + if (GetModelFeature(FN_CALLERGROUPS)!=0) + row[3] = xgnokiiConfig.callerGroups[pbEntry->entry.Group]; + else + row[3] = ""; + gtk_clist_append (GTK_CLIST (selectContactData.clist), row); + if (pbEntry->entry.MemoryType == GMT_ME) + gtk_clist_set_pixmap (GTK_CLIST (selectContactData.clist), row_i, 2, + memoryPixmaps.phoneMemPix, memoryPixmaps.mask); + else + gtk_clist_set_pixmap (GTK_CLIST (selectContactData.clist), row_i, 2, + memoryPixmaps.simMemPix, memoryPixmaps.mask); + + gtk_clist_set_row_data (GTK_CLIST (selectContactData.clist), row_i++, (gpointer) pbEntry); + } + } + + gtk_clist_sort (GTK_CLIST (selectContactData.clist)); + gtk_clist_thaw (GTK_CLIST (selectContactData.clist)); + + gtk_widget_show (selectContactData.dialog); + + return &selectContactData; +} + + +static GtkItemFactoryEntry menu_items[] = { + { NULL, NULL, NULL, 0, ""}, + { NULL, "R", ReadContacts, 0, NULL}, + { NULL, "S", SaveContacts, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "I", ImportContacts, 0, NULL}, + { NULL, "E", ExportContacts, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "W", CloseContacts, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "N", NewEntry, 0, NULL}, + { NULL, "U", DuplicateEntry, 0, NULL}, + { NULL, NULL, EditEntry, 0, NULL}, + { NULL, "D", DeleteEntry, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "C", ChMemType, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "F", FindFirstEntry, 0, NULL}, + { NULL, "L", SearchEntry, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "A", SelectAll, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "V", DialVoice, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, NULL, Help1, 0, NULL}, + { NULL, NULL, GUI_ShowAbout, 0, NULL}, +}; + + +static void InitMainMenu (void) +{ + menu_items[0].path = g_strdup (_("/_File")); + menu_items[1].path = g_strdup (_("/File/_Read from phone")); + menu_items[2].path = g_strdup (_("/File/_Save to phone")); + menu_items[3].path = g_strdup (_("/File/Sep1")); + menu_items[4].path = g_strdup (_("/File/_Import from file")); + menu_items[5].path = g_strdup (_("/File/_Export to file")); + menu_items[6].path = g_strdup (_("/File/Sep2")); + menu_items[7].path = g_strdup (_("/File/_Close")); + menu_items[8].path = g_strdup (_("/_Edit")); + menu_items[9].path = g_strdup (_("/Edit/_New")); + menu_items[10].path = g_strdup (_("/Edit/D_uplicate")); + menu_items[11].path = g_strdup (_("/Edit/_Edit")); + menu_items[12].path = g_strdup (_("/Edit/_Delete")); + menu_items[13].path = g_strdup (_("/Edit/Sep3")); + menu_items[14].path = g_strdup (_("/Edit/_Change memory type")); + menu_items[15].path = g_strdup (_("/Edit/Sep4")); + menu_items[16].path = g_strdup (_("/Edit/_Find")); + menu_items[17].path = g_strdup (_("/Edit/Find ne_xt")); + menu_items[18].path = g_strdup (_("/Edit/Sep5")); + menu_items[19].path = g_strdup (_("/Edit/Select _all")); + menu_items[20].path = g_strdup (_("/_Dial")); + menu_items[21].path = g_strdup (_("/Dial/Dial _voice")); + menu_items[22].path = g_strdup (_("/_Help")); + menu_items[23].path = g_strdup (_("/Help/_Help")); + menu_items[24].path = g_strdup (_("/Help/_About")); +} + + +void GUI_CreateContactsWindow (void) +{ + int nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]); + GtkItemFactory *item_factory; + GtkAccelGroup *accel_group; + SortColumn *sColumn; + GtkWidget *menubar; + GtkWidget *main_vbox; + GtkWidget *toolbar; + GtkWidget *clistScrolledWindow; + GtkWidget *status_hbox; + register gint i; + gchar *titles[4] = { _("Name"), _("Number"), _("Memory"), _("Group")}; + + InitMainMenu (); + contactsMemoryInitialized = FALSE; + GUI_ContactsWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_window_set_title (GTK_WINDOW (GUI_ContactsWindow), _("Contacts")); + gtk_widget_set_usize (GTK_WIDGET (GUI_ContactsWindow), 436, 220); + //gtk_container_set_border_width (GTK_CONTAINER (GUI_ContactsWindow), 10); + gtk_signal_connect (GTK_OBJECT (GUI_ContactsWindow), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + gtk_widget_realize (GUI_ContactsWindow); + + accel_group = gtk_accel_group_new (); + item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "
", + accel_group); + + gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, NULL); + + gtk_accel_group_attach (accel_group, GTK_OBJECT (GUI_ContactsWindow)); + + /* Finally, return the actual menu bar created by the item factory. */ + menubar = gtk_item_factory_get_widget (item_factory, "
"); + + main_vbox = gtk_vbox_new (FALSE, 1); + gtk_container_border_width (GTK_CONTAINER (main_vbox), 1); + gtk_container_add (GTK_CONTAINER (GUI_ContactsWindow), main_vbox); + gtk_widget_show (main_vbox); + + gtk_box_pack_start (GTK_BOX (main_vbox), menubar, FALSE, FALSE, 0); + gtk_widget_show (menubar); + + /* Create the toolbar */ + + toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS); + gtk_toolbar_set_button_relief (GTK_TOOLBAR (toolbar), GTK_RELIEF_NORMAL); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Read from phone"), NULL, + NewPixmap(Read_xpm, GUI_ContactsWindow->window, + &GUI_ContactsWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) ReadContacts, NULL); + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Save to phone"), NULL, + NewPixmap(Send_xpm, GUI_ContactsWindow->window, + &GUI_ContactsWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) SaveContacts, NULL); + + gtk_toolbar_append_space (GTK_TOOLBAR (toolbar)); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Import from file"), NULL, + NewPixmap(Open_xpm, GUI_ContactsWindow->window, + &GUI_ContactsWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) ImportContacts, NULL); + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Export to file"), NULL, + NewPixmap(Save_xpm, GUI_ContactsWindow->window, + &GUI_ContactsWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) ExportContacts, NULL); + + gtk_toolbar_append_space (GTK_TOOLBAR (toolbar)); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("New entry"), NULL, + NewPixmap(New_xpm, GUI_ContactsWindow->window, + &GUI_ContactsWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) NewEntry, NULL); + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Duplicate entry"), NULL, + NewPixmap(Duplicate_xpm, GUI_ContactsWindow->window, + &GUI_ContactsWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) DuplicateEntry, NULL); + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Edit entry"), NULL, + NewPixmap(Edit_xpm, GUI_ContactsWindow->window, + &GUI_ContactsWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) EditEntry, NULL); + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Delete entry"), NULL, + NewPixmap(Delete_xpm, GUI_ContactsWindow->window, + &GUI_ContactsWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) DeleteEntry, NULL); + + gtk_toolbar_append_space (GTK_TOOLBAR(toolbar)); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Dial voice"), NULL, + NewPixmap(Dial_xpm, GUI_ContactsWindow->window, + &GUI_ContactsWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) DialVoice, NULL); + +// gtk_toolbar_set_style (GTK_TOOLBAR (toolbar), GTK_TOOLBAR_ICONS); + + gtk_box_pack_start (GTK_BOX (main_vbox), toolbar, FALSE, FALSE, 0); + gtk_widget_show (toolbar); + + + clist = gtk_clist_new_with_titles (4, titles); + gtk_clist_set_shadow_type (GTK_CLIST (clist), GTK_SHADOW_OUT); + gtk_clist_set_compare_func (GTK_CLIST (clist), CListCompareFunc); + gtk_clist_set_sort_column (GTK_CLIST (clist), 0); + gtk_clist_set_sort_type (GTK_CLIST (clist), GTK_SORT_ASCENDING); + gtk_clist_set_auto_sort (GTK_CLIST (clist), FALSE); + gtk_clist_set_selection_mode (GTK_CLIST (clist), GTK_SELECTION_EXTENDED); + + gtk_clist_set_column_width (GTK_CLIST (clist), 0, 150); + gtk_clist_set_column_width (GTK_CLIST (clist), 1, 115); + gtk_clist_set_column_width (GTK_CLIST (clist), 3, 70); + gtk_clist_set_column_justification (GTK_CLIST (clist), 2, GTK_JUSTIFY_CENTER); +// gtk_clist_set_column_visibility (GTK_CLIST (clist), 3, (GetModelFeature(FN_CALLERGROUPS)!=0)); + + for (i = 0; i < 4; i++) + { + if ((sColumn = g_malloc (sizeof (SortColumn))) == NULL) + { + g_print (_("Error: %s: line %d: Can't allocate memory!\n"), __FILE__, __LINE__); + gtk_main_quit (); + } + sColumn->clist = clist; + sColumn->column = i; + gtk_signal_connect (GTK_OBJECT (GTK_CLIST (clist)->column[i].button), "clicked", + GTK_SIGNAL_FUNC (SetSortColumn), (gpointer) sColumn); + } + + gtk_signal_connect (GTK_OBJECT (clist), "select_row", + GTK_SIGNAL_FUNC (ClickEntry), NULL); + + clistScrolledWindow = gtk_scrolled_window_new (NULL, NULL); + gtk_container_add (GTK_CONTAINER (clistScrolledWindow), clist); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (clistScrolledWindow), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_box_pack_start (GTK_BOX (main_vbox), clistScrolledWindow, + TRUE, TRUE, 0); + + gtk_widget_show (clist); + gtk_widget_show (clistScrolledWindow); + + status_hbox = gtk_hbox_new (FALSE,20); + gtk_box_pack_start (GTK_BOX (main_vbox), status_hbox, FALSE, FALSE, 0); + gtk_widget_show (status_hbox); + + memoryStatus.MaxME = memoryStatus.UsedME = memoryStatus.FreeME = + memoryStatus.MaxSM = memoryStatus.UsedSM = memoryStatus.FreeSM = 0; + statusInfo.ch_ME = statusInfo.ch_SM = 0; + + statusInfo.label = gtk_label_new (""); + RefreshStatusInfo (); + gtk_box_pack_start (GTK_BOX (status_hbox), statusInfo.label, FALSE, FALSE, 10); + gtk_widget_show (statusInfo.label); + + memoryPixmaps.simMemPix = gdk_pixmap_create_from_xpm_d (GUI_ContactsWindow->window, + &memoryPixmaps.mask, + &GUI_ContactsWindow->style->bg[GTK_STATE_NORMAL], + sim_xpm); + + memoryPixmaps.phoneMemPix = gdk_pixmap_create_from_xpm_d (GUI_ContactsWindow->window, + &memoryPixmaps.mask, + &GUI_ContactsWindow->style->bg[GTK_STATE_NORMAL], + phone_xpm); + + questMark.pixmap = gdk_pixmap_create_from_xpm_d (GUI_ContactsWindow->window, + &questMark.mask, + &GUI_ContactsWindow->style->bg[GTK_STATE_NORMAL], + quest_xpm); + + CreateErrorDialog (&errorDialog, GUI_ContactsWindow); + GUIEventAdd (GUI_EVENT_CONTACTS_CHANGED, GUI_RefreshContacts); + GUIEventAdd (GUI_EVENT_CALLERS_GROUPS_CHANGED, GUI_RefreshGroupMenu); +} + diff --git a/xgnokii/xgnokii_contacts.h b/xgnokii/xgnokii_contacts.h new file mode 100644 index 0000000..66a4dcf --- /dev/null +++ b/xgnokii/xgnokii_contacts.h @@ -0,0 +1,181 @@ +/* + + X G N O K I I + + A Linux/Unix GUI for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + $Id$ + +*/ + +#ifndef XGNOKII_CONTACTS_H +#define XGNOKII_CONTACTS_H + +#include +#include "misc.h" +#include "gsm-common.h" +#include "gsm-api.h" + +#define IO_BUF_LEN 160 + +/* Structure to keep memory status information */ +typedef struct { + int MaxME; /* Maximum Phone memory entries. */ + int UsedME; /* Actualy used Phone memory entries. */ + int FreeME; /* FreeME = MaxME - UsedME */ + int MaxSM; /* Maximum SIM memory entries. */ + int UsedSM; + int FreeSM; +} MemoryStatus; + +/* Array to hold contacts entry */ +typedef GPtrArray* ContactsMemory; + +/* Structure to keep contacts memory entry status */ +typedef enum { + E_Unchanged, /* Entry is not empty and is unchanged. */ + E_Changed, /* Entry is not empty and is changed. */ + E_Deleted, /* Entry was deleted. */ + E_Empty /* Entry is empty. */ +} EntryStatus; + +/* Memory entry data */ +typedef struct { + GSM_PhonebookEntry entry; /* Phonebook entry self. */ + EntryStatus status; /* Entry status. */ +} PhonebookEntry; + +/* Structure to hold information of Edit and New dialogs */ +typedef struct { + PhonebookEntry *pbEntry; + GtkWidget *dialog; + GtkWidget *name; + GtkWidget *number; + GtkWidget *extended; + GtkWidget *memoryBox; + GtkWidget *memoryTypePhone; + GtkWidget *memoryTypeSIM; + GtkWidget *group; + GtkWidget *groupLabel; + GtkWidget *groupMenu; + gint newGroup; + gint row; +} EditEntryData; + + +typedef struct { + PhonebookEntry *pbEntry; + GtkWidget *dialog; + GtkWidget *clist; +} EditNumbersData; + + +/* Structure to hold information for FindEntry dialog. */ +typedef struct { + GtkWidget *dialog; + GtkWidget *pattern; + GtkWidget *nameB; + GtkWidget *numberB; +} FindEntryData; + + +/* Contains fileName for Export dialog. */ +typedef struct { + gchar *fileName; +} ExportDialogData; + + +/* Hold widgets for SelectContactDialog */ +typedef struct { + GtkWidget *dialog; + GtkWidget *clist; /* list of contacts */ + GtkWidget *clistScrolledWindow; + GtkWidget *okButton; /* Ok and Cancel button widgets */ + GtkWidget *cancelButton; +} SelectContactData; + + +/* Max length for status line. (Line that shows used/max information for + memories). */ +#define STATUS_INFO_LENGTH 40 + + +/* Structure to hold information for status line (bottom line of window) */ +typedef struct { + GtkWidget *label; + gchar text[STATUS_INFO_LENGTH]; /* Status line text. */ + gint ch_ME:1; /* 1 if phone memory was changed */ + gint ch_SM:1; /* 1 if phone SIM was changed */ +} StatusInfo; + + +/* Structure to hold information for progress dialog */ +typedef struct { + GtkWidget *dialog; + GtkWidget *pbarME; + GtkWidget *pbarSM; +} ProgressDialog; + + +/* Search type. */ +typedef enum { + FIND_NAME = 0, + FIND_NUMBER +} FindType; + + +typedef struct { + gchar pattern[GSM_MAX_PHONEBOOK_NAME_LENGTH + 1]; + gint lastRow; + FindType type; +} FindEntryStruct; + + +typedef struct { + GdkPixmap *simMemPix, *phoneMemPix; + GdkBitmap *mask; +} MemoryPixmaps; + + +extern void GUI_CreateContactsWindow (void); + +extern void GUI_ShowContacts (void); + +/* return != 0 if user has unsaved changes in contacts memory */ +extern gint GUI_ContactsIsChanged (void); + +/* return TRUE if Contacts memory was read from phone or from file */ +extern bool GUI_ContactsIsIntialized (void); + +/* Read contacts from phone */ +extern void GUI_ReadContacts (void); + +/* Save contacts to phone */ +extern void GUI_SaveContacts (void); + +/* Create save question dialog and can end application */ +extern void GUI_QuitSaveContacts (void); + +extern void GUI_RefreshContacts (void); + +/* Function take number and return name belonged to number. + If no name is found, return NULL; + Do not modify returned name! */ +extern gchar *GUI_GetName (gchar *number); + +extern gchar *GUI_GetNameExact (gchar *number); + +extern gchar *GUI_GetNumber (gchar *name); +/* Function show dialog with contacts and let select entries. + See xgnokii_contacts.c for sample of use. */ +extern SelectContactData *GUI_SelectContactDialog (void); + +extern void GUI_RefreshGroupMenu (void); + +extern PhonebookEntry *GUI_GetEntry (GSM_MemoryType, gint); + +void ExtPbkChanged (GtkWidget *widget, gpointer data ); + +#endif diff --git a/xgnokii/xgnokii_data.c b/xgnokii/xgnokii_data.c new file mode 100644 index 0000000..fb0aa34 --- /dev/null +++ b/xgnokii/xgnokii_data.c @@ -0,0 +1,129 @@ +/* + + X G N O K I I + + A Linux/Unix GUI for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#include +#include +#include "misc.h" +#include "xgnokii_common.h" +#include "xgnokii.h" +#include "xgnokii_lowlevel.h" +#include "xgnokii_data.h" +#include "data/virtmodem.h" + +static GtkWidget *GUI_DataWindow; +bool TerminateThread = false; +bool enabled = false; +static GtkWidget *label = NULL; + +static inline void Help1 (GtkWidget *w, gpointer data) +{ + gchar *indx = g_strdup_printf ("/%s/gnokii/xgnokii/data/index.htm", xgnokiiConfig.locale); + Help (w, indx); + g_free (indx); +} + +static void UpdateStatus (void) +{ + gchar *buf; + + if (!enabled) + buf = g_strdup_printf (_("Data calls are currently\nDisabled\n ")); + else + buf = g_strdup_printf (_("Data calls are currently\nEnabled\n ")); + + if (label != NULL) + gtk_label_set_text (GTK_LABEL (label), buf); + + g_free (buf); +} + + +inline void GUI_ShowData (void) +{ + if (GetModelFeature(FN_DATACALLS)==0) + return; + + if (TerminateThread) + { + VM_Terminate (); + enabled = false; + TerminateThread = false; + } + UpdateStatus (); + + gtk_widget_show (GUI_DataWindow); +} + + +inline void GUI_HideData(void) +{ + gtk_widget_hide (GUI_DataWindow); +} + +static inline void DisableData (GtkWidget *widget, + gpointer data ) +{ + VM_Terminate (); + enabled = false; + UpdateStatus (); +} + + +static inline void EnableData (GtkWidget *widget, + gpointer data) +{ + + TerminateThread = false; + VM_Initialise (xgnokiiConfig.model, xgnokiiConfig.port, + 0, 0, xgnokiiConfig.bindir, false, false, + xgnokiiConfig.synchronizetime); + enabled = true; + UpdateStatus (); +} + + +void GUI_CreateDataWindow (void) +{ + GtkWidget *button, *hbox, *vbox; + + GUI_DataWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_window_set_title (GTK_WINDOW (GUI_DataWindow), _("Virtual Modem")); + gtk_container_set_border_width (GTK_CONTAINER (GUI_DataWindow), 10); + gtk_signal_connect (GTK_OBJECT (GUI_DataWindow), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + + vbox = gtk_vbox_new (FALSE, 1); + gtk_container_border_width (GTK_CONTAINER (vbox), 1); + gtk_container_add (GTK_CONTAINER (GUI_DataWindow), vbox); + gtk_widget_show (vbox); + + label = gtk_label_new (""); + gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0); + gtk_widget_show (label); + + hbox = gtk_hbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (vbox), hbox); + gtk_widget_show (hbox); + + button = gtk_button_new_with_label (_("Enable")); + gtk_box_pack_start (GTK_BOX (hbox), + button, TRUE, FALSE, 5); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (EnableData), NULL); + gtk_widget_show (button); + button = gtk_button_new_with_label (_("Disable")); + gtk_box_pack_start (GTK_BOX (hbox), + button, TRUE, FALSE, 5); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (DisableData), NULL); + GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); + gtk_widget_grab_default (button); + gtk_widget_show (button); +} diff --git a/xgnokii/xgnokii_data.h b/xgnokii/xgnokii_data.h new file mode 100644 index 0000000..75c33a3 --- /dev/null +++ b/xgnokii/xgnokii_data.h @@ -0,0 +1,20 @@ +/* + + X G N O K I I + + A Linux/Unix GUI for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#ifndef XGNOKII_DATA_H +#define XGNOKII_DATA_H + +void GUI_CreateDataWindow (void); +inline void GUI_ShowData (void); +inline void GUI_HideData (void); + +#endif + + diff --git a/xgnokii/xgnokii_dtmf.c b/xgnokii/xgnokii_dtmf.c new file mode 100644 index 0000000..7022db8 --- /dev/null +++ b/xgnokii/xgnokii_dtmf.c @@ -0,0 +1,336 @@ +/* + + X G N O K I I + + A Linux/Unix GUI for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#include +#include +#include "misc.h" +#include "xgnokii_common.h" +#include "xgnokii.h" +#include "xgnokii_lowlevel.h" +#include "xgnokii_dtmf.h" +#include "xpm/Send.xpm" +#include "xpm/Delete.xpm" + +#define MAX_DTMF_LENGTH 50 + +static GtkWidget *GUI_DTMFWindow; +static GtkWidget *displayEntry; +static ErrorDialog errorDialog = {NULL, NULL}; +static gchar *saveFileName; + + +static inline void Help1 (GtkWidget *w, gpointer data) +{ + gchar *indx = g_strdup_printf ("/%s/gnokii/xgnokii/dtmf/index.htm", xgnokiiConfig.locale); + Help (w, indx); + g_free (indx); +} + + +static inline void ButtonCB (GtkWidget *widget, + gpointer data ) +{ + gchar buf[2] = " "; + + *buf = GPOINTER_TO_INT (data); + gtk_entry_append_text (GTK_ENTRY (displayEntry), buf); +} + + +static inline void ClearCB (GtkWidget *widget, + gpointer data ) +{ + gtk_entry_set_text (GTK_ENTRY (displayEntry), ""); +} + + +static inline void SendCB (GtkWidget *widget, + gpointer data ) +{ + PhoneEvent *e; + gchar *buf = g_strdup (gtk_entry_get_text (GTK_ENTRY (displayEntry))); + + if (*buf == '\0') + { + g_free (buf); + return; + } + + e = g_malloc (sizeof (PhoneEvent)); + e->event = Event_SendDTMF; + e->data = buf; + GUI_InsertEvent (e); +} + + +static void OkLoadDialog (GtkWidget *w, GtkFileSelection *fs) +{ + FILE *f; + gchar *fileName; + gchar line[MAX_DTMF_LENGTH + 1]; + gchar buf[80]; + + fileName = gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs)); + gtk_widget_hide (GTK_WIDGET (fs)); + + if ((f = fopen (fileName, "r")) == NULL) + { + g_snprintf (buf, 80, _("Can't open file %s for reading!"), fileName); + gtk_label_set_text (GTK_LABEL(errorDialog.text), buf); + gtk_widget_show (errorDialog.dialog); + return; + } + + fgets (line, MAX_DTMF_LENGTH + 1, f); + gtk_entry_set_text (GTK_ENTRY (displayEntry), line); + fclose (f); +} + + +static void LoadFileDialog () +{ + static GtkWidget *fileDialog = NULL; + + if (fileDialog == NULL) + { + fileDialog = gtk_file_selection_new (_("Load")); + gtk_signal_connect (GTK_OBJECT (fileDialog), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (fileDialog)->ok_button), + "clicked", GTK_SIGNAL_FUNC (OkLoadDialog), (gpointer) fileDialog); + gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (fileDialog)->cancel_button), + "clicked", GTK_SIGNAL_FUNC (CancelDialog), (gpointer) fileDialog); + } + + gtk_widget_show (fileDialog); +} + + +static void SaveDTMF () +{ + FILE *f; + gchar buf[80]; + + if ((f = fopen (saveFileName, "w")) == NULL) + { + g_snprintf (buf, 80, _("Can't open file %s for writing!"), saveFileName); + gtk_label_set_text (GTK_LABEL(errorDialog.text), buf); + gtk_widget_show (errorDialog.dialog); + return; + } + + fputs (gtk_entry_get_text (GTK_ENTRY (displayEntry)), f); + fclose (f); +} + + +static inline void YesSaveDialog (GtkWidget *w, gpointer data) +{ + gtk_widget_hide (GTK_WIDGET (data)); + SaveDTMF(); +} + + +static void OkSaveDialog (GtkWidget *w, GtkFileSelection *fs) +{ + FILE *f; + static YesNoDialog dialog = { NULL, NULL}; + gchar err[80]; + + saveFileName = gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs)); + gtk_widget_hide (GTK_WIDGET (fs)); + + if ((f = fopen (saveFileName, "r")) != NULL) + { + fclose (f); + if (dialog.dialog == NULL) + { + CreateYesNoDialog (&dialog, YesSaveDialog, CancelDialog, GUI_DTMFWindow); + gtk_window_set_title (GTK_WINDOW (dialog.dialog), _("Overwrite file?")); + g_snprintf ( err, 80, _("File %s already exist.\nOverwrite?"), saveFileName); + gtk_label_set_text (GTK_LABEL(dialog.text), err); + } + gtk_widget_show (dialog.dialog); + } + else + SaveDTMF (); +} + + +static void SaveFileDialog () +{ + static GtkWidget *fileDialog = NULL; + + if (fileDialog == NULL) + { + fileDialog = gtk_file_selection_new (_("Save")); + gtk_signal_connect (GTK_OBJECT (fileDialog), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (fileDialog)->ok_button), + "clicked", GTK_SIGNAL_FUNC (OkSaveDialog), (gpointer) fileDialog); + gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (fileDialog)->cancel_button), + "clicked", GTK_SIGNAL_FUNC (CancelDialog), (gpointer) fileDialog); + } + + gtk_widget_show (fileDialog); +} + + +static inline void CloseDTMF (GtkWidget *w, gpointer data) +{ + gtk_widget_hide (GUI_DTMFWindow); +} + + +inline void GUI_ShowDTMF () +{ + gtk_widget_show (GUI_DTMFWindow); +} + + +static GtkItemFactoryEntry menu_items[] = { + { NULL, NULL, NULL, 0, ""}, + { NULL, "O", LoadFileDialog, 0, NULL}, + { NULL, "S", SaveFileDialog, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "W", CloseDTMF, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, NULL, Help1, 0, NULL}, + { NULL, NULL, GUI_ShowAbout, 0, NULL}, +}; + + +static void InitMainMenu (void) +{ + menu_items[0].path = g_strdup (_("/_File")); + menu_items[1].path = g_strdup (_("/File/_Open")); + menu_items[2].path = g_strdup (_("/File/_Save")); + menu_items[3].path = g_strdup (_("/File/Sep1")); + menu_items[4].path = g_strdup (_("/File/_Close")); + menu_items[5].path = g_strdup (_("/_Help")); + menu_items[6].path = g_strdup (_("/Help/_Help")); + menu_items[7].path = g_strdup (_("/Help/_About")); +} + + +void GUI_CreateDTMFWindow () +{ + int nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]); + GtkItemFactory *item_factory; + GtkAccelGroup *accel_group; + GtkWidget *menubar; + GtkWidget *main_vbox; + GtkWidget *table; + GtkWidget *frame; + GtkWidget *button; + GtkWidget *pixmap; + gchar buf[2]; + gint i,j; + + + InitMainMenu (); + GUI_DTMFWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_window_set_title (GTK_WINDOW (GUI_DTMFWindow), _("Dial Tone")); + //gtk_widget_set_usize (GTK_WIDGET (GUI_DTMFWindow), 436, 220); + gtk_signal_connect (GTK_OBJECT (GUI_DTMFWindow), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + gtk_widget_realize (GUI_DTMFWindow); + + accel_group = gtk_accel_group_new (); + item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "
", + accel_group); + + gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, NULL); + + gtk_accel_group_attach (accel_group, GTK_OBJECT (GUI_DTMFWindow)); + + /* Finally, return the actual menu bar created by the item factory. */ + menubar = gtk_item_factory_get_widget (item_factory, "
"); + + main_vbox = gtk_vbox_new (FALSE, 1); + gtk_container_border_width (GTK_CONTAINER (main_vbox), 1); + gtk_container_add (GTK_CONTAINER (GUI_DTMFWindow), main_vbox); + gtk_widget_show (main_vbox); + + gtk_box_pack_start (GTK_BOX (main_vbox), menubar, FALSE, FALSE, 0); + gtk_widget_show (menubar); + + table = gtk_table_new (8, 3, TRUE); + + frame = gtk_frame_new (NULL); + gtk_container_add (GTK_CONTAINER (frame), table); + gtk_container_border_width (GTK_CONTAINER (frame), 10); + gtk_container_border_width (GTK_CONTAINER (table), 3); + gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0); + gtk_widget_show (frame); + + gtk_table_set_row_spacings (GTK_TABLE (table), 2); + gtk_table_set_col_spacings (GTK_TABLE (table), 2); + + displayEntry = gtk_entry_new_with_max_length (MAX_DTMF_LENGTH); + gtk_table_attach_defaults (GTK_TABLE (table), displayEntry, 0, 3, 0, 1); + gtk_widget_set_usize (displayEntry, 110, 22); + + for (i = 0; i < 3; i++) + for (j = 0; j < 3; j++) + { + g_snprintf (buf, 2, "%d", j * 3 + i + 1); + button = gtk_button_new_with_label (buf); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (ButtonCB), (gpointer) ((gint) *buf)); + gtk_table_attach_defaults (GTK_TABLE (table), button, i, i + 1, j + 2, j + 3); + } + + button = gtk_button_new_with_label ("*"); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (ButtonCB), (gpointer) '*'); + gtk_table_attach_defaults (GTK_TABLE (table), button, 0, 1, 5, 6); + + button = gtk_button_new_with_label ("0"); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (ButtonCB), (gpointer) '0'); + gtk_table_attach_defaults (GTK_TABLE (table), button, 1, 2, 5, 6); + + button = gtk_button_new_with_label ("#"); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (ButtonCB), (gpointer) '#'); + gtk_table_attach_defaults (GTK_TABLE (table), button, 2, 3, 5, 6); + + + button = gtk_button_new_with_label ("Pause"); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (ButtonCB), (gpointer) 'p'); + gtk_table_attach_defaults (GTK_TABLE (table), button, 0, 1, 6, 7); + + button = gtk_button_new_with_label ("Wait"); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (ButtonCB), (gpointer) 'w'); + gtk_table_attach_defaults (GTK_TABLE (table), button, 1, 2, 6, 7); + + button = gtk_button_new (); + pixmap = NewPixmap(Send_xpm, GUI_DTMFWindow->window, + &GUI_DTMFWindow->style->bg[GTK_STATE_NORMAL]); + gtk_container_add (GTK_CONTAINER (button), pixmap); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (SendCB), (gpointer) NULL); + gtk_table_attach_defaults (GTK_TABLE (table), button, 0, 3, 7, 8); + + button = gtk_button_new (); + pixmap = NewPixmap(Delete_xpm, GUI_DTMFWindow->window, + &GUI_DTMFWindow->style->bg[GTK_STATE_NORMAL]); + gtk_container_add (GTK_CONTAINER (button), pixmap); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (ClearCB), (gpointer) NULL); + gtk_table_attach_defaults (GTK_TABLE (table), button, 2, 3, 6, 7); + + gtk_widget_show_all (table); + + CreateErrorDialog (&errorDialog, GUI_DTMFWindow); +} diff --git a/xgnokii/xgnokii_dtmf.h b/xgnokii/xgnokii_dtmf.h new file mode 100644 index 0000000..2bc2649 --- /dev/null +++ b/xgnokii/xgnokii_dtmf.h @@ -0,0 +1,18 @@ +/* + + X G N O K I I + + A Linux/Unix GUI for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#ifndef XGNOKII_DTMF_H +#define XGNOKII_DTMF_H + +extern void GUI_CreateDTMFWindow (); + +extern void GUI_ShowDTMF (); + +#endif diff --git a/xgnokii/xgnokii_logos.c b/xgnokii/xgnokii_logos.c new file mode 100644 index 0000000..61a6ae9 --- /dev/null +++ b/xgnokii/xgnokii_logos.c @@ -0,0 +1,1739 @@ +#include +#include +#include +#include +#include +#include +#include + +#include "misc.h" +#include "gsm-common.h" +#include "gsm-api.h" +#include "gsm-networks.h" +#include "files/gsm-filetypes.h" +#include "gsm-bitmaps.h" + +#include "xgnokii_logos.h" +#include "xgnokii_common.h" +#include "xgnokii_lowlevel.h" +#include "xgnokii.h" + +#include "xpm/Operator_logo.xpm" +#include "xpm/Startup_logo.xpm" +#include "xpm/Caller_logo.xpm" + +#include "xpm/Black_point.xpm" +#include "xpm/Green_point.xpm" +#include "xpm/Green_pixel.xpm" + +#include "xpm/New.xpm" +#include "xpm/Send.xpm" +#include "xpm/Read.xpm" + +#include "xpm/Edit_invert.xpm" +#include "xpm/Edit_flip_horizontal.xpm" +#include "xpm/Edit_flip_vertical.xpm" + +#include "xpm/Tool_brush.xpm" +#include "xpm/Tool_line.xpm" +#include "xpm/Tool_rectangle.xpm" +#include "xpm/Tool_filled_rectangle.xpm" + +extern GSM_Network GSM_Networks[]; + +static GtkWidget *GUI_LogosWindow; + +static ErrorDialog errorDialog = {NULL, NULL}; +static InfoDialog infoDialog = {NULL, NULL}; + +/* stuff for drawingArea */ +static GtkWidget *drawingArea = NULL; +static GdkPixmap *drawingPixmap = NULL; +static GdkPixmap *greenPointPixmap, *blackPointPixmap; +static int drawingAreaWidth, drawingAreaHeight; /* in pixels */ +static int mouseButtonPushed = 0; + +/* stuff for previewArea */ +static GtkWidget *previewArea = NULL; +static GdkPixmap *previewPixmap = NULL; +static GdkPixmap *greenPixelPixmap; +static int previewPixmapWidth, previewPixmapHeight; +static int previewAvailable = 1, showPreviewErrorDialog = 1; +static int previewPixmapNumber = 0; + +static GSM_Bitmap bitmap, oldBitmap; +static GSM_NetworkInfo networkInfo; + +/* widgets for toolbar - some, need global variables */ +static GtkWidget *buttonStartup, *buttonOperator, *buttonCaller, *buttonPicture; +static GtkWidget *networkCombo, *callerCombo; + +static int activeTool = TOOL_BRUSH; +static int toolStartX, toolStartY, toolLastX, toolLastY; + +/* tools for drawing */ +static GtkWidget *buttonBrush, *buttonLine, *buttonRectangle; +static GtkWidget *buttonFilledRectangle; + +/* Contains fileName for Export dialog. */ +typedef struct { + gchar *fileName; +} ExportDialogData; + +static ExportDialogData exportDialogData = {NULL}; + +GtkWidget *FileSelection; + +static int callersGroupsInitialized = 0; + +/* returns lowest number from three numbers */ +int GetMinFrom3(int a, int b, int c) { + if (a > b) { + if (b > c) + return c; + else + return b; + } else { + if (a > c) + return c; + else + return a; + } +} + +/* returns highest number from three numbers */ +int GetMaxFrom3(int a, int b, int c) { + if (a > b) { + if (c > a) + return c; + else + return a; + } else { + if (c > b) + return c; + else + return b; + } +} + +/* load preview pixmap from file */ +GdkPixmap *GetPreviewPixmap (GtkWidget *widget) { + GdkPixmap *pixmap; + GdkBitmap *mask; + gchar *file; + + if (previewPixmapNumber == 0) + { + if (!strcmp (xgnokiiConfig.model, "6110") || + !strcmp (xgnokiiConfig.model, "6120")) + { + file = g_strdup_printf("%s%s",xgnokiiConfig.xgnokiidir, + "/xpm/Preview_6110.xpm"); + previewPixmapNumber = 1; + } + else if (!strcmp (xgnokiiConfig.model, "6130") || + !strcmp (xgnokiiConfig.model, "6150") || + !strcmp (xgnokiiConfig.model, "616x") || + !strcmp (xgnokiiConfig.model, "6185") || + !strcmp (xgnokiiConfig.model, "6190")) + { + file = g_strdup_printf("%s%s",xgnokiiConfig.xgnokiidir, + "/xpm/Preview_6150.xpm"); + previewPixmapNumber = 2; + } + else if (!strcmp (xgnokiiConfig.model, "3210")) + { + file = g_strdup_printf("%s%s", xgnokiiConfig.xgnokiidir, + "/xpm/Preview_3210.xpm"); + previewPixmapNumber = 3; + } + else if (!strcmp (xgnokiiConfig.model, "3310") || + !strcmp (xgnokiiConfig.model, "3330")) + { + file = g_strdup_printf("%s%s", xgnokiiConfig.xgnokiidir, + "/xpm/Preview_3310.xpm"); + previewPixmapNumber = 4; + } + else if (!strcmp (xgnokiiConfig.model, "5110") || + !strcmp (xgnokiiConfig.model, "5130")) + { + file = g_strdup_printf("%s%s", xgnokiiConfig.xgnokiidir, + "/xpm/Preview_5110.xpm"); + previewPixmapNumber = 5; + } + else if (!strcmp (xgnokiiConfig.model, "6250")) + { + file = g_strdup_printf("%s%s", xgnokiiConfig.xgnokiidir, + "/xpm/Preview_6250.xpm"); + previewPixmapNumber = 6; + } + else if (!strcmp (xgnokiiConfig.model, "7110")) + { + file = g_strdup_printf("%s%s", xgnokiiConfig.xgnokiidir, + "/xpm/Preview_7110.xpm"); + previewPixmapNumber = 7; + } + else + { + file = g_strdup_printf("%s%s",xgnokiiConfig.xgnokiidir, + "/xpm/Preview_6210.xpm"); + previewPixmapNumber = 8; + } + } + else + switch (previewPixmapNumber) + { + case 1: file = g_strdup_printf("%s%s",xgnokiiConfig.xgnokiidir, + "/xpm/Preview_6110.xpm"); + break; + case 2: file = g_strdup_printf("%s%s",xgnokiiConfig.xgnokiidir, + "/xpm/Preview_6150.xpm"); + break; + case 3: file = g_strdup_printf("%s%s",xgnokiiConfig.xgnokiidir, + "/xpm/Preview_3210.xpm"); + break; + case 4: file = g_strdup_printf("%s%s",xgnokiiConfig.xgnokiidir, + "/xpm/Preview_3310.xpm"); + break; + case 5: file = g_strdup_printf("%s%s",xgnokiiConfig.xgnokiidir, + "/xpm/Preview_5110.xpm"); + break; + case 6: file = g_strdup_printf("%s%s",xgnokiiConfig.xgnokiidir, + "/xpm/Preview_6250.xpm"); + break; + case 7: file = g_strdup_printf("%s%s",xgnokiiConfig.xgnokiidir, + "/xpm/Preview_7110.xpm"); + break; + default: file = g_strdup_printf("%s%s",xgnokiiConfig.xgnokiidir, + "/xpm/Preview_6210.xpm"); + break; + } + + pixmap = gdk_pixmap_create_from_xpm(widget->window,&mask, + &widget->style->bg[GTK_STATE_NORMAL], + file); + g_free(file); + + return pixmap; +} + +/* ******************************************************** + * ** SET/CLEAR POINTS ************************************ + * ******************************************************** + */ +void SetPreviewPoint(GtkWidget *widget, int x, int y, int update) { + if (!previewAvailable) return; + + /* there is difference between positiong of startupLogo and others */ + if (bitmap.type != GSM_StartupLogo && bitmap.type != GSM_7110StartupLogo && + bitmap.type != GSM_6210StartupLogo) { + x += PREVIEWJUMPX; + y += PREVIEWJUMPY; + } + + /* draw point to pixmap */ + if (previewPixmap) + gdk_draw_point(previewPixmap,widget->style->black_gc, + x+PREVIEWSTARTX,y+PREVIEWSTARTY); + + if (update) { + GdkRectangle updateRect; + + /* update point on screen */ + updateRect.width = 1; + updateRect.height = 1; + updateRect.x = PREVIEWSTARTX+x; + updateRect.y = PREVIEWSTARTY+y; + + gtk_widget_draw(previewArea,&updateRect); + } +} + +void ClearPreviewPoint(GtkWidget *widget, int x, int y, int update) { + if (!previewAvailable) return; + + /* there is difference between positiong of startupLogo and others */ + if (bitmap.type != GSM_StartupLogo && bitmap.type != GSM_7110StartupLogo && + bitmap.type != GSM_6210StartupLogo) { + x += PREVIEWJUMPX; + y += PREVIEWJUMPY; + } + + /* clean point from pixmap - any idea how to draw green point without pixmap? */ + if (previewPixmap) + gdk_draw_pixmap(previewPixmap, + widget->style->fg_gc[GTK_WIDGET_STATE(widget)], + greenPixelPixmap,0,0,x+PREVIEWSTARTX,y+PREVIEWSTARTY,1,1); + if (update) { + GdkRectangle updateRect; + + /* clean from screen too */ + updateRect.width = 1; + updateRect.height = 1; + updateRect.x = PREVIEWSTARTX+x; + updateRect.y = PREVIEWSTARTY+y; + + gtk_widget_draw(previewArea,&updateRect); + } +} + +int IsPoint(int x, int y) { + return GSM_IsPointBitmap(&bitmap,x,y); +} + +void SetPoint(GtkWidget *widget, int x, int y, int update) { + + GSM_SetPointBitmap(&bitmap,x,y); + + /* draw point to pixmap */ + gdk_draw_pixmap(drawingPixmap,widget->style->fg_gc[GTK_WIDGET_STATE(widget)], + blackPointPixmap,0,0,x*(POINTSIZE+1),y*(POINTSIZE+1),-1,-1); + + if (update) { + GdkRectangle updateRect; + + /* calculate update rectangle */ + updateRect.width = POINTSIZE+2; + updateRect.height = POINTSIZE+2; + updateRect.x = x * (POINTSIZE+1); + updateRect.y = y * (POINTSIZE+1); + + /* update on screen */ + gtk_widget_draw(drawingArea,&updateRect); + } + + /* draw preview point too */ + if (previewAvailable) SetPreviewPoint(widget,x,y,update); +} + +void ClearPoint(GtkWidget *widget, int x, int y, int update) { + + GSM_ClearPointBitmap(&bitmap,x,y); + + /* clear point from pixmap */ + gdk_draw_pixmap(drawingPixmap,widget->style->fg_gc[GTK_WIDGET_STATE(widget)], + greenPointPixmap,0,0,x*(POINTSIZE+1),y*(POINTSIZE+1),-1,-1); + + if (update) { + GdkRectangle updateRect; + + /* calculate update rectangle */ + updateRect.width = POINTSIZE+2; + updateRect.height = POINTSIZE+2; + updateRect.x = x * (POINTSIZE+1); + updateRect.y = y * (POINTSIZE+1); + + /* update on screen */ + gtk_widget_draw(drawingArea,&updateRect); + } + + /* clear point from previewArea too */ + if (previewAvailable) ClearPreviewPoint(widget,x,y,update); +} + +/* **************************************************** + * *** UPDATES - PREVIEW & DRAWING AREAS ************** + * **************************************************** + */ + +/* this redraw all logo points - preview & drawing area */ +void UpdatePointsRectangle(GtkWidget *widget, int x1, int y1, int x2, int y2) { + GdkRectangle updateRect; + int x, y, dx = 0, dy = 0; + + if (bitmap.type != GSM_StartupLogo && bitmap.type != GSM_7110StartupLogo && + bitmap.type != GSM_6210StartupLogo) { + dx = PREVIEWJUMPX; + dy = PREVIEWJUMPY; + } + + if (x1 > x2) { + x = x1; + x1 = x2; + x2 = x; + } + + if (y1 > y2) { + y = y1; + y1 = y2; + y2 = y; + } + + for (y = y1;y <= y2;y++) + for (x = x1;x <= x2;x++) { + if (IsPoint(x,y)) { + /* set on drawing area */ + gdk_draw_pixmap(drawingPixmap, + drawingArea->style->fg_gc[GTK_WIDGET_STATE(drawingArea)], + blackPointPixmap,0,0,x*(POINTSIZE+1),y*(POINTSIZE+1),-1,-1); + + /* set on preview */ + if (previewAvailable && previewPixmap) + gdk_draw_point(previewPixmap,previewArea->style->black_gc, + x+PREVIEWSTARTX+dx,y+PREVIEWSTARTY+dy); + } else { + /* clear from drawing */ + gdk_draw_pixmap(drawingPixmap, + drawingArea->style->fg_gc[GTK_WIDGET_STATE(drawingArea)], + greenPointPixmap,0,0,x*(POINTSIZE+1),y*(POINTSIZE+1),-1,-1); + + /* clear from preview */ + if (previewAvailable && previewPixmap) + gdk_draw_pixmap(previewPixmap, + previewArea->style->fg_gc[GTK_WIDGET_STATE(previewArea)], + greenPixelPixmap,0,0,x+PREVIEWSTARTX+dx,y+PREVIEWSTARTY+dy, + 1,1); + } + } + + if (previewAvailable) { + updateRect.x = PREVIEWSTARTX+dx+x1; + updateRect.y = PREVIEWSTARTY+dy+y1; + updateRect.width = x2-x1+1; + updateRect.height = y2-y1+1; + gtk_widget_draw(previewArea,&updateRect); + } + + updateRect.x = x1*(POINTSIZE+1); + updateRect.y = y1*(POINTSIZE+1); + updateRect.width = (x2-x1+1)*(POINTSIZE+1)+1; + updateRect.height = (y2-y1+1)*(POINTSIZE+1)+1; + gtk_widget_draw(drawingArea,&updateRect); +} + +void UpdatePoints(GtkWidget *widget) { + UpdatePointsRectangle(widget,0,0,bitmap.width-1,bitmap.height-1); +} + +/* this redraw all logo points in previewArea, NO DRAWING AREA */ +void UpdatePreviewPoints (void) { + GdkRectangle updateRect; + int x, y, dx = 0, dy = 0; + + if (!previewPixmap || !previewAvailable) return; + + if (bitmap.type != GSM_StartupLogo && bitmap.type != GSM_7110StartupLogo && + bitmap.type != GSM_6210StartupLogo) { + dx = PREVIEWJUMPX; + dy = PREVIEWJUMPY; + } + + for (y = 0;y < bitmap.height;y++) + for (x = 0;x < bitmap.width;x++) { + if (IsPoint(x,y)) { + gdk_draw_point(previewPixmap,previewArea->style->black_gc, + x+PREVIEWSTARTX+dx,y+PREVIEWSTARTY+dy); + } else { + gdk_draw_pixmap(previewPixmap, + previewArea->style->fg_gc[GTK_WIDGET_STATE(previewArea)], + greenPixelPixmap,0,0, + x+PREVIEWSTARTX+dx,y+PREVIEWSTARTY+dy,1,1); + } + } + + updateRect.x = dx; + updateRect.y = dy; + updateRect.width = bitmap.width; + updateRect.height = bitmap.height; + gtk_widget_draw(previewArea,&updateRect); +} + +/* ****************************************************** + * **** DRAWING TOOLS *********************************** + * ****************************************************** + */ + +/* TOOL - BRUSH */ +void ToolBrush(GtkWidget *widget, int column, int row, int button) { + /* only this tool directly update bitmap & screen */ + if (button > 1) + ClearPoint(widget,column,row,1); + else + SetPoint(widget,column,row,1); +} + +/* TOOL - LINE */ +/* going to rewrite to Bresenham algorithm */ +static void ToolLineUpdate(GtkWidget *widget, int column, int row) { + double delta, y, x; + int i, x1, y1, x2, y2; + + if (abs(toolStartX-toolLastX) >= abs(toolStartY-toolLastY)) { + if (toolStartX > toolLastX) { + x1 = toolLastX; + x2 = toolStartX; + y1 = toolLastY; + y2 = toolStartY; + } else { + x1 = toolStartX; + x2 = toolLastX; + y1 = toolStartY; + y2 = toolLastY; + } + + delta = ((double)(y2-y1))/((double)(x2-x1)); + y = (double)y1; + for (i = x1;i <= x2;i++) { + if (!GSM_IsPointBitmap(&oldBitmap,i,(int)y)) ClearPoint(widget,i,(int)y,0); + y += delta; + } + } else { + if (toolStartY > toolLastY) { + x1 = toolLastX; + x2 = toolStartX; + y1 = toolLastY; + y2 = toolStartY; + } else { + x1 = toolStartX; + x2 = toolLastX; + y1 = toolStartY; + y2 = toolLastY; + } + delta = ((double)(x2-x1))/((double)(y2-y1)); + + x = (double)x1; + for (i = y1;i <= y2;i++) { + if (!GSM_IsPointBitmap(&oldBitmap,(int)x,i)) ClearPoint(widget,(int)x,i,0); + x += delta; + } + } + + if (abs(toolStartX-column) >= abs(toolStartY-row)) { + if (toolStartX > column) { + x1 = column; + x2 = toolStartX; + y1 = row; + y2 = toolStartY; + } else { + x1 = toolStartX; + x2 = column; + y1 = toolStartY; + y2 = row; + } + + delta = ((double)(y2-y1))/((double)(x2-x1)); + y = (double)y1; + for (i = x1;i <= x2;i++) { + SetPoint(widget,i,(int)y,0); + y += delta; + } + } else { + if (toolStartY > row) { + x1 = column; + x2 = toolStartX; + y1 = row; + y2 = toolStartY; + } else { + x1 = toolStartX; + x2 = column; + y1 = toolStartY; + y2 = row; + } + + delta = ((double)(x2-x1))/((double)(y2-y1)); + + x = (double)x1; + for (i = y1;i <= y2;i++) { + SetPoint(widget,(int)x,i,0); + x += delta; + } + } +} + +/* TOOL - FILLED RECT */ +static void ToolFilledRectangleUpdate(GtkWidget *widget, int column, int row) { + int i, j, x1, y1, x2, y2; + + if (toolStartX > toolLastX) { + x1 = toolLastX; + x2 = toolStartX; + } else { + x1 = toolStartX; + x2 = toolLastX; + } + + if (toolStartY > toolLastY) { + y1 = toolLastY; + y2 = toolStartY; + } else { + y1 = toolStartY; + y2 = toolLastY; + } + + for (j = y1;j <= y2;j++) + for (i = x1;i <= x2;i++) + if (!GSM_IsPointBitmap(&oldBitmap,i,j)) ClearPoint(widget,i,j,0); + + if (toolStartX > column) { + x1 = column; + x2 = toolStartX; + } else { + x1 = toolStartX; + x2 = column; + } + + if (toolStartY > row) { + y1 = row; + y2 = toolStartY; + } else { + y1 = toolStartY; + y2 = row; + } + + for (j = y1;j <= y2;j++) + for (i = x1;i <= x2;i++) + SetPoint(widget,i,j,0); +} + +/* TOOL - RECTANGLE */ +static void ToolRectangleUpdate(GtkWidget *widget, int column, int row) { + int i, j, x1, y1, x2, y2; + + /* clear old rectangle */ + if (toolStartX > toolLastX) { + x1 = toolLastX; + x2 = toolStartX; + } else { + x1 = toolStartX; + x2 = toolLastX; + } + + if (toolStartY > toolLastY) { + y1 = toolLastY; + y2 = toolStartY; + } else { + y1 = toolStartY; + y2 = toolLastY; + } + + for (i = x1;i <= x2;i++) { + if (!GSM_IsPointBitmap(&oldBitmap,i,y1)) ClearPoint(widget,i,y1,0); + if (!GSM_IsPointBitmap(&oldBitmap,i,y2)) ClearPoint(widget,i,y2,0); + } + + for (j = y1;j <= y2;j++) { + if (!GSM_IsPointBitmap(&oldBitmap,x1,j)) ClearPoint(widget,x1,j,0); + if (!GSM_IsPointBitmap(&oldBitmap,x2,j)) ClearPoint(widget,x2,j,0); + } + + /* draw new rectangle */ + if (toolStartX > column) { + x1 = column; + x2 = toolStartX; + } else { + x1 = toolStartX; + x2 = column; + } + + if (toolStartY > row) { + y1 = row; + y2 = toolStartY; + } else { + y1 = toolStartY; + y2 = row; + } + + for (i = x1;i <= x2;i++) { + if (!IsPoint(i,y1)) SetPoint(widget,i,y1,0); + if (!IsPoint(i,y2)) SetPoint(widget,i,y2,0); + } + + for (j = y1;j <= y2;j++) { + if (!IsPoint(x1,j)) SetPoint(widget,x1,j,0); + if (!IsPoint(x2,j)) SetPoint(widget,x2,j,0); + } +} + +static void UpdateToolScreen(GtkWidget *widget, int x1, int y1, int x2, int y2) { + GdkRectangle updateRect; + + /* update preview area */ + updateRect.x = PREVIEWSTARTX+x1; + updateRect.y = PREVIEWSTARTY+y1; + if (bitmap.type != GSM_StartupLogo && bitmap.type != GSM_7110StartupLogo && + bitmap.type != GSM_6210StartupLogo) { + updateRect.x += PREVIEWJUMPX; + updateRect.y += PREVIEWJUMPY; + } + updateRect.width = x2-x1+1; + updateRect.height = y2-y1+1; + gtk_widget_draw(previewArea,&updateRect); + + /* update drawing area */ + updateRect.x = x1 * (POINTSIZE+1); + updateRect.y = y1 * (POINTSIZE+1); + updateRect.width = (x2-x1+1)*(POINTSIZE+2); + updateRect.height = (y2-y1+1)*(POINTSIZE+2); + gtk_widget_draw(drawingArea,&updateRect); +} + +/* ************************************* + * ** PREVIEW AREA EVENTS ************** + * ************************************* + */ + +static gint PreviewAreaButtonPressEvent(GtkWidget *widget, GdkEventButton *event) { + previewPixmapNumber = (previewPixmapNumber % 8) + 1; + + gtk_drawing_area_size(GTK_DRAWING_AREA(previewArea), + previewPixmapWidth,previewPixmapHeight); + + return TRUE; +} + +static gint PreviewAreaConfigureEvent(GtkWidget *widget, GdkEventConfigure *event) { + if (previewPixmap) gdk_pixmap_unref(previewPixmap); + previewPixmap = GetPreviewPixmap(widget); + + UpdatePreviewPoints(); + + return TRUE; +} + +static gint PreviewAreaExposeEvent(GtkWidget *widget, GdkEventExpose *event) { + /* got previewPixmap? */ + if (previewPixmap) + /* yes - simply redraw some rectangle */ + gdk_draw_pixmap(widget->window,widget->style->fg_gc[GTK_WIDGET_STATE(widget)], + previewPixmap,event->area.x,event->area.y,event->area.x, + event->area.y,event->area.width,event->area.height); + + return FALSE; +} + +/* ******************************** + * ** DRAWING AREA EVENTS ********* + * ******************************** + */ + +static gint DrawingAreaButtonPressEvent(GtkWidget *widget, GdkEventButton *event) { + /* got drawingPixmap? */ + if (drawingPixmap == NULL) return TRUE; + + if (!mouseButtonPushed) { + if ((event->button == 1 && activeTool != TOOL_BRUSH) || + (activeTool == TOOL_BRUSH)) { + /* position from we starting drawing */ + toolStartX = event->x / (POINTSIZE+1); + if (toolStartX < 0) toolStartX = 0; + if (toolStartX > bitmap.width-1) toolStartX = bitmap.width-1; + + toolStartY = event->y / (POINTSIZE+1); + if (toolStartY < 0) toolStartY = 0; + if (toolStartY > bitmap.height-1) toolStartY = bitmap.height-1; + + toolLastX = toolStartX; + toolLastY = toolStartY; + + /* store old bitmap for drawing, resp. for moving, resizing primitive */ + memcpy(&oldBitmap,&bitmap,sizeof(oldBitmap)); + } + + if (event->button == 1) mouseButtonPushed = 1; + + switch (activeTool) { + case TOOL_BRUSH: + ToolBrush(widget,toolStartX,toolStartY,event->button); + break; + case TOOL_LINE: + case TOOL_RECTANGLE: + if (event->button == 1) ToolBrush(widget,toolStartX,toolStartY,event->button); + break; + } + } + + /* user is drawing some tool other than TOOL_BRUSH and pushed mouse button + * another than first => cancel tool and redraw to oldBitmap (bitmap when + * user start drawing) + */ + if (mouseButtonPushed && activeTool != TOOL_BRUSH && event->button != 1) { + int lowestX, lowestY, highestX, highestY; + int i, j; + + lowestX = GetMinFrom3(toolStartX,toolLastX,toolLastX); + lowestY = GetMinFrom3(toolStartY,toolLastY,toolLastY); + highestX = GetMaxFrom3(toolStartX,toolLastX,toolLastX); + highestY = GetMaxFrom3(toolStartY,toolLastY,toolLastY); + + for (j = lowestY;j <= highestY;j++) + for (i = lowestX;i <= highestX;i++) + if (GSM_IsPointBitmap(&oldBitmap,i,j)) + SetPoint(widget,i,j,0); + else + ClearPoint(widget,i,j,0); + UpdateToolScreen(widget,lowestX,lowestY,highestX,highestY); + + mouseButtonPushed = 0; + } + + return TRUE; +} + +static gint DrawingAreaButtonReleaseEvent(GtkWidget *widget, GdkEventButton *event) { + if (event->button == 1) + mouseButtonPushed = 0; + + return TRUE; +} + +static gint DrawingAreaMotionNotifyEvent(GtkWidget *widget, GdkEventMotion *event) { + int x,y; + GdkModifierType state; + + if (!mouseButtonPushed && activeTool != TOOL_BRUSH) return TRUE; + + if (event->is_hint) + gdk_window_get_pointer(event->window,&x,&y,&state); + else { + x = event->x; + y = event->y; + state = event->state; + } + + x = x / (POINTSIZE+1); + y = y / (POINTSIZE+1); + if (x < 0) x = 0; + if (y < 0) y = 0; + if (x > bitmap.width-1) x = bitmap.width-1; + if (y > bitmap.height-1) y = bitmap.height-1; + + if (y == toolLastY && x == toolLastX) return TRUE; + + switch (activeTool) { + case TOOL_BRUSH: + if (state & GDK_BUTTON1_MASK && drawingPixmap != NULL) ToolBrush(widget,x,y,1); + if (state & GDK_BUTTON2_MASK && drawingPixmap != NULL) ToolBrush(widget,x,y,2); + if (state & GDK_BUTTON3_MASK && drawingPixmap != NULL) ToolBrush(widget,x,y,3); + break; + case TOOL_RECTANGLE: + if (drawingPixmap != NULL) ToolRectangleUpdate(widget,x,y); + break; + case TOOL_FILLED_RECTANGLE: + if (drawingPixmap != NULL) ToolFilledRectangleUpdate(widget,x,y); + break; + case TOOL_LINE: + if (drawingPixmap != NULL) ToolLineUpdate(widget,x,y); + break; + } + + /* what is this? + * it's simple, above tools updates only bitmap in memory and this + * function update from bitmap to screen, it's made as non-blinking + * drawing functions with this, simply draw everything we need and + * after that, redraw to screen rectangle in which we made changes + * it's not redrawing pixel by pixel (blinking) + */ + if (activeTool != TOOL_BRUSH) { + int lowestX, lowestY, highestX, highestY; + + lowestX = GetMinFrom3(toolStartX,toolLastX,x); + lowestY = GetMinFrom3(toolStartY,toolLastY,y); + highestX = GetMaxFrom3(toolStartX,toolLastX,x); + highestY = GetMaxFrom3(toolStartY,toolLastY,y); + + UpdateToolScreen(widget,lowestX,lowestY,highestX,highestY); + } + + toolLastX = x; + toolLastY = y; + return TRUE; +} + +/* configureEvent? -> event when someone resize windows, ... */ +static gint DrawingAreaConfigureEvent(GtkWidget *widget, GdkEventConfigure *event) { + int x, y; + /* got drawingPixmap? */ + if (drawingPixmap) gdk_pixmap_unref(drawingPixmap); /* got, erase it */ + + /* make a new pixmap */ + drawingPixmap = gdk_pixmap_new(widget->window,drawingAreaWidth, + drawingAreaHeight,-1); + + /* draw grid into pixmap */ + for (y = 0;y < bitmap.height;y++) + for (x = 0;x < bitmap.width;x++) + if (IsPoint(x,y)) + gdk_draw_pixmap(drawingPixmap,widget->style->fg_gc[GTK_WIDGET_STATE(widget)], + blackPointPixmap,0,0,x*(POINTSIZE+1),y*(POINTSIZE+1),-1,-1); + else + gdk_draw_pixmap(drawingPixmap,widget->style->fg_gc[GTK_WIDGET_STATE(widget)], + greenPointPixmap,0,0,x*(POINTSIZE+1),y*(POINTSIZE+1),-1,-1); + + return TRUE; +} + +static gint DrawingAreaExposeEvent(GtkWidget *widget, GdkEventExpose *event) { + /* got drawingPixmap? */ + if (drawingPixmap) + /* got - draw it */ + gdk_draw_pixmap(widget->window,widget->style->fg_gc[GTK_WIDGET_STATE(widget)], + drawingPixmap, + event->area.x,event->area.y,event->area.x,event->area.y, + event->area.width,event->area.height); + return FALSE; +} + +/* ***************************************** + * ** TOOLBAR & MENU EVENTS **************** + * ***************************************** + */ + +static void GetNetworkInfoEvent(GtkWidget *widget) { + GSM_Error error; + PhoneEvent *e = (PhoneEvent *)g_malloc(sizeof(PhoneEvent)); + D_NetworkInfo *data = (D_NetworkInfo *)g_malloc(sizeof(D_NetworkInfo)); + + /* prepare data for event */ + data->info = &networkInfo; + e->event = Event_GetNetworkInfo; + e->data = data; + + /* launch event and wait for result */ + GUI_InsertEvent(e); + pthread_mutex_lock(&getNetworkInfoMutex); + pthread_cond_wait(&getNetworkInfoCond,&getNetworkInfoMutex); + pthread_mutex_unlock(&getNetworkInfoMutex); + error = data->status; + g_free(data); + + /* watch for errors */ + if (error != GE_NONE) { + gchar *buf = g_strdup_printf(_("Error getting network info\n(error=%d)"),error); + gtk_label_set_text(GTK_LABEL(errorDialog.text),buf); + gtk_widget_show(errorDialog.dialog); + g_free(buf); + } + + /* set new operator name to combo */ + gtk_entry_set_text(GTK_ENTRY(GTK_COMBO(networkCombo)->entry), + GSM_GetNetworkName(networkInfo.NetworkCode)); +} + +static void GetLogoEvent(GtkWidget *widget) { + int i; + GSM_Error error; + PhoneEvent *e = (PhoneEvent *) g_malloc(sizeof(PhoneEvent)); + D_Bitmap *data = (D_Bitmap *)g_malloc(sizeof(D_Bitmap)); + char *operator = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(networkCombo)->entry)); + + /* prepare data for event */ + strncpy(bitmap.netcode,GSM_GetNetworkCode(operator),7); + data->bitmap = &bitmap; + e->event = Event_GetBitmap; + e->data = data; + if (GetModelFeature(FN_CALLERGROUPS)!=0) { + for (i = 0;i < 6;i++) + if (strcmp(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(callerCombo)->entry)), + xgnokiiConfig.callerGroups[i]) == 0) bitmap.number = i; + } + + /* launch event and wait for result */ + GUI_InsertEvent(e); + pthread_mutex_lock(&getBitmapMutex); + pthread_cond_wait(&getBitmapCond,&getBitmapMutex); + pthread_mutex_unlock(&getBitmapMutex); + error = data->status; + g_free(data); + + /* watch for errors */ + if (error != GE_NONE) { + gchar *buf = g_strdup_printf(_("Error getting bitmap\n(error=%d)"),error); + gtk_label_set_text(GTK_LABEL(errorDialog.text),buf); + gtk_widget_show(errorDialog.dialog); + g_free(buf); + } else { + /* no error, draw logo from phone */ + UpdatePoints(drawingArea); + } +} + +static void SetLogoEvent(GtkWidget *widget) { + GSM_Error error; + PhoneEvent *e = (PhoneEvent *)g_malloc(sizeof(PhoneEvent)); + D_Bitmap *data = (D_Bitmap *)g_malloc(sizeof(D_Bitmap)); + char *operator = gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(networkCombo)->entry)); + int i; + + /* prepare data */ + strncpy(bitmap.netcode,GSM_GetNetworkCode(operator),7); + + if (bitmap.type == GSM_CallerLogo) { + /* above condition must be there, because if you launch logos before + * callerGroups are available, you will see segfault - callerGroups not initialized + */ + if (GetModelFeature(FN_CALLERGROUPS)!=0) { + for (i = 0;i < 6;i++) + if (strcmp(gtk_entry_get_text(GTK_ENTRY(GTK_COMBO(callerCombo)->entry)), + xgnokiiConfig.callerGroups[i]) == 0) bitmap.number = i; + } + } + if (bitmap.type == GSM_StartupLogo) { + bitmap.number=0; + } + + data->bitmap = &bitmap; + e->event = Event_SetBitmap; + e->data = data; + + /* launch event and wait for result */ + GUI_InsertEvent(e); + pthread_mutex_lock(&setBitmapMutex); + pthread_cond_wait(&setBitmapCond,&setBitmapMutex); + pthread_mutex_unlock(&setBitmapMutex); + error = data->status; + g_free(data); + + /* watch for errors */ + if (error != GE_NONE) { + gchar *buf = g_strdup_printf(_("Error setting bitmap\n(error=%d)"),error); + gtk_label_set_text(GTK_LABEL(errorDialog.text),buf); + gtk_widget_show(errorDialog.dialog); + g_free(buf); + } +} + +static void ClearLogoEvent(GtkWidget *widget) { + + bitmap.size=GSM_GetBitmapSize(&bitmap); + + GSM_ClearBitmap(&bitmap); + + UpdatePoints(widget); +} + +static void InvertLogoEvent(GtkWidget *widget) { + int column, row; + + for (column = 0;column < bitmap.width;column++) + for (row = 0;row < bitmap.height;row++) + if (IsPoint(column,row)) + GSM_ClearPointBitmap(&bitmap,column,row); + else + GSM_SetPointBitmap(&bitmap,column,row); + + UpdatePoints(widget); +} + +static void UpLogoEvent(GtkWidget *widget) { + int column, row; + + GSM_Bitmap tbitmap; + + tbitmap=bitmap; + + for (row = 0;row < bitmap.height-1;row++) + for (column = 0;column < bitmap.width;column++) + if (IsPoint(column,row+1)) + GSM_SetPointBitmap(&bitmap,column,row); + else + GSM_ClearPointBitmap(&bitmap,column,row); + + for (column = 0;column < bitmap.width;column++) + if (GSM_IsPointBitmap(&tbitmap,column,0)) + GSM_SetPointBitmap(&bitmap,column,row); + else + GSM_ClearPointBitmap(&bitmap,column,row); + + UpdatePoints(widget); +} + +static void DownLogoEvent(GtkWidget *widget) { + int column, row; + + GSM_Bitmap tbitmap; + + tbitmap=bitmap; + + for (row = bitmap.height-1;row > 0;row--) + for (column = 0;column < bitmap.width;column++) + if (IsPoint(column,row-1)) + GSM_SetPointBitmap(&bitmap,column,row); + else + GSM_ClearPointBitmap(&bitmap,column,row); + + for (column = 0;column < bitmap.width;column++) + if (GSM_IsPointBitmap(&tbitmap,column,bitmap.height-1)) + GSM_SetPointBitmap(&bitmap,column,0); + else + GSM_ClearPointBitmap(&bitmap,column,0); + + UpdatePoints(widget); +} + +static void LeftLogoEvent(GtkWidget *widget) { + int column, row; + + GSM_Bitmap tbitmap; + + tbitmap=bitmap; + + for (column = 0; column < bitmap.width-1;column++) + for (row = 0;row < bitmap.height;row++) + if (IsPoint(column+1,row)) + GSM_SetPointBitmap(&bitmap,column,row); + else + GSM_ClearPointBitmap(&bitmap,column,row); + + for (row = 0;row < bitmap.height;row++) + if (GSM_IsPointBitmap(&tbitmap,0,row)) + GSM_SetPointBitmap(&bitmap,bitmap.width-1,row); + else + GSM_ClearPointBitmap(&bitmap,bitmap.width-1,row); + + UpdatePoints(widget); +} + +static void RightLogoEvent(GtkWidget *widget) { + int column, row; + + GSM_Bitmap tbitmap; + + tbitmap=bitmap; + + for (column = bitmap.width-1;column > 0;column--) + for (row = 0;row < bitmap.height;row++) + if (IsPoint(column-1,row)) + GSM_SetPointBitmap(&bitmap,column,row); + else + GSM_ClearPointBitmap(&bitmap,column,row); + + for (row = 0;row < bitmap.height;row++) + if (GSM_IsPointBitmap(&tbitmap,bitmap.width-1,row)) + GSM_SetPointBitmap(&bitmap,0,row); + else + GSM_ClearPointBitmap(&bitmap,0,row); + + UpdatePoints(widget); +} + +static void FlipVerticalLogoEvent(GtkWidget *widget) { + int row, column, temp; + + for (row = 0;row < (bitmap.height/2);row++) + for (column = 0;column < bitmap.width;column++) { + temp = IsPoint(column,row); + if (IsPoint(column,bitmap.height-1-row)) + GSM_SetPointBitmap(&bitmap,column,row); + else + GSM_ClearPointBitmap(&bitmap,column,row); + + if (temp) + GSM_SetPointBitmap(&bitmap,column,bitmap.height-1-row); + else + GSM_ClearPointBitmap(&bitmap,column,bitmap.height-1-row); + } + + UpdatePoints(widget); +} + +static void FlipHorizontalLogoEvent(GtkWidget *widget) { + int row, column, temp; + + for (row = 0;row < bitmap.height;row++) + for (column = 0;column < (bitmap.width/2);column++) { + temp = IsPoint(column,row); + + if (IsPoint(bitmap.width-1-column,row)) + GSM_SetPointBitmap(&bitmap,column,row); + else + GSM_ClearPointBitmap(&bitmap,column,row); + + if (temp) + GSM_SetPointBitmap(&bitmap,bitmap.width-1-column,row); + else + GSM_ClearPointBitmap(&bitmap,bitmap.width-1-column,row); + } + + UpdatePoints(widget); +} + +/* this is launched when tool was changed */ +static gint ToolTypeEvent(GtkWidget *widget) { + if (GTK_TOGGLE_BUTTON(buttonBrush)->active) activeTool = TOOL_BRUSH; else + if (GTK_TOGGLE_BUTTON(buttonLine)->active) activeTool = TOOL_LINE; else + if (GTK_TOGGLE_BUTTON(buttonRectangle)->active) activeTool = TOOL_RECTANGLE; else + if (GTK_TOGGLE_BUTTON(buttonFilledRectangle)->active) + activeTool = TOOL_FILLED_RECTANGLE; + + return 0; +} + +/* this is launched when logo type was change by buttons on toolbar */ +static gint LogoTypeEvent(GtkWidget *widget) { + int clear = 0; + + /* is startupLogo? */ + if (GTK_TOGGLE_BUTTON(buttonStartup)->active && + bitmap.type != GSM_StartupLogo && bitmap.type != GSM_6210StartupLogo && + bitmap.type != GSM_7110StartupLogo) { + /* look for old bitmap type, clean if another */ + clear = 1; + + if (!strcmp(xgnokiiConfig.model,"7110")) { + GSM_ResizeBitmap(&bitmap,GSM_7110StartupLogo); + } else if (!strcmp(xgnokiiConfig.model,"6210") || !strcmp(xgnokiiConfig.model,"6250")) { + GSM_ResizeBitmap(&bitmap,GSM_6210StartupLogo); + } else { + GSM_ResizeBitmap(&bitmap,GSM_StartupLogo); + } + } + + /* new type is PictureImage */ + if (GTK_TOGGLE_BUTTON(buttonPicture)->active && bitmap.type != GSM_PictureImage) { + /* look for old bitmap type, clean if another */ + clear = 1; + GSM_ResizeBitmap(&bitmap,GSM_PictureImage); + } + + /* new type is callerLogo */ + if (GTK_TOGGLE_BUTTON(buttonCaller)->active && bitmap.type != GSM_CallerLogo) { + /* previous was startup or Picture ? clear and draw batteries, signal, ... */ + if (bitmap.type != GSM_OperatorLogo) clear = 1; + GSM_ResizeBitmap(&bitmap,GSM_CallerLogo); + } + + /* is new type operatorLogo? */ + if (GTK_TOGGLE_BUTTON(buttonOperator)->active && bitmap.type != GSM_OperatorLogo && + bitmap.type != GSM_7110OperatorLogo) { + + /* previous startup or Picture ? clear and draw batteries, signal, ... */ + if (bitmap.type != GSM_CallerLogo) clear = 1; + + if (!strcmp(xgnokiiConfig.model,"7110")) { + GSM_ResizeBitmap(&bitmap,GSM_7110OperatorLogo); + } else if (!strcmp(xgnokiiConfig.model,"6210") || !strcmp(xgnokiiConfig.model,"6250")) { + GSM_ResizeBitmap(&bitmap,GSM_7110OperatorLogo); + } else { + GSM_ResizeBitmap(&bitmap,GSM_OperatorLogo); + } + } + + /* must clear? */ + if (clear) { + if (previewAvailable) { + /* configure event reload pixmap from disk and redraws */ + gtk_drawing_area_size(GTK_DRAWING_AREA(previewArea), + previewPixmapWidth,previewPixmapHeight); + } + + /* change new drawingArea size */ + drawingAreaWidth = bitmap.width * (POINTSIZE+1)+1; + drawingAreaHeight = bitmap.height * (POINTSIZE+1)+1; + + gtk_drawing_area_size(GTK_DRAWING_AREA(drawingArea), + drawingAreaWidth,drawingAreaHeight); + } + + return 0; +} + +static inline void CloseLogosWindow (void) { + gtk_widget_hide(GUI_LogosWindow); +} + +void ExportLogoFileMain(gchar *name) +{ + GSM_Bitmap tbitmap; + GSM_Error error; + + tbitmap=bitmap; + + strncpy(tbitmap.netcode,GSM_GetNetworkCode(networkInfo.NetworkCode),7); + + error=GSM_SaveBitmapFile(name,&tbitmap); + if (error!=GE_NONE) { + gchar *buf = g_strdup_printf(_("Error saving file\n(error=%d)"),error); + gtk_label_set_text(GTK_LABEL(errorDialog.text),buf); + gtk_widget_show(errorDialog.dialog); + g_free(buf); + } +} + +static void YesLogoFileExportDialog (GtkWidget *w, gpointer data) +{ + gtk_widget_hide (GTK_WIDGET (data)); + ExportLogoFileMain(exportDialogData.fileName); +} + +static void ExportFileSelected (GtkWidget *w, GtkFileSelection *fs) +{ + static YesNoDialog dialog = { NULL, NULL}; + FILE *f; + gchar err[80]; + + exportDialogData.fileName = gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs)); + gtk_widget_hide (GTK_WIDGET (fs)); + + if ((f = fopen (exportDialogData.fileName, "r")) != NULL) + { + fclose (f); + if (dialog.dialog == NULL) + { + CreateYesNoDialog (&dialog, YesLogoFileExportDialog, CancelDialog, GUI_LogosWindow); + gtk_window_set_title (GTK_WINDOW (dialog.dialog), _("Overwrite file?")); + g_snprintf ( err, 80, _("File %s already exist.\nOverwrite?"), exportDialogData.fileName); + gtk_label_set_text (GTK_LABEL(dialog.text), err); + } + gtk_widget_show (dialog.dialog); + } + else + ExportLogoFileMain(exportDialogData.fileName); +} + +void ImportFileSelected(GtkWidget *w, GtkFileSelection *fs) +{ + GSM_Bitmap tbitmap; + GSM_Error error=0; + + gchar *fileName; + FILE *f; + + fileName = gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs)); + gtk_widget_hide (GTK_WIDGET (fs)); + + if ((f = fopen (fileName, "r")) == NULL) { + gchar *buf = g_strdup_printf(_("Can't open file %s for reading !"),fileName); + gtk_label_set_text(GTK_LABEL(errorDialog.text),buf); + gtk_widget_show(errorDialog.dialog); + g_free(buf); + return; + } + + error=GSM_ReadBitmapFile(fileName,&tbitmap); + if (error!=GE_NONE) { + gchar *buf = g_strdup_printf(_("Error reading file\n(error=%d)"),error); + gtk_label_set_text(GTK_LABEL(errorDialog.text),buf); + gtk_widget_show(errorDialog.dialog); + g_free(buf); + return; + } + + exportDialogData.fileName=fileName; + + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(buttonStartup),false); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(buttonOperator),false); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(buttonCaller),false); + gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(buttonPicture),false); + + if (tbitmap.type==GSM_OperatorLogo || tbitmap.type==GSM_7110OperatorLogo) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(buttonOperator),true); + if (tbitmap.type==GSM_StartupLogo || tbitmap.type==GSM_7110StartupLogo || tbitmap.type==GSM_6210StartupLogo) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(buttonStartup),true); + if (tbitmap.type==GSM_CallerLogo) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(buttonCaller),true); + if (tbitmap.type==GSM_PictureImage) gtk_toggle_button_set_state(GTK_TOGGLE_BUTTON(buttonPicture),true); + + memcpy(&bitmap,&tbitmap,sizeof(GSM_Bitmap)); + + if (!strcmp(xgnokiiConfig.model,"7110")) { //7110 + if (bitmap.type==GSM_StartupLogo || bitmap.type==GSM_6210StartupLogo) + GSM_ResizeBitmap(&bitmap,GSM_7110StartupLogo); + + if (bitmap.type==GSM_OperatorLogo) + GSM_ResizeBitmap(&bitmap,GSM_7110OperatorLogo); + + } else if (!strcmp(xgnokiiConfig.model,"6210") || !strcmp(xgnokiiConfig.model,"6250")) { //6210,6250 + if (bitmap.type==GSM_StartupLogo || bitmap.type==GSM_7110StartupLogo) + GSM_ResizeBitmap(&bitmap,GSM_6210StartupLogo); + + if (bitmap.type==GSM_OperatorLogo) + GSM_ResizeBitmap(&bitmap,GSM_7110OperatorLogo); + + } else { + if (bitmap.type==GSM_6210StartupLogo || bitmap.type==GSM_7110StartupLogo) + GSM_ResizeBitmap(&bitmap,GSM_StartupLogo); + if (bitmap.type==GSM_7110OperatorLogo) + GSM_ResizeBitmap(&bitmap,GSM_OperatorLogo); + } + + UpdatePoints(drawingArea); +} + +void SaveLogoAs(GtkWidget *widget) +{ + FileSelection=gtk_file_selection_new ("Save logo as ..."); + + gtk_signal_connect ( + GTK_OBJECT (GTK_FILE_SELECTION (FileSelection)->ok_button), + "clicked", (GtkSignalFunc) ExportFileSelected, FileSelection); + + gtk_signal_connect_object ( + GTK_OBJECT(GTK_FILE_SELECTION(FileSelection)->cancel_button), + "clicked", (GtkSignalFunc) gtk_widget_destroy, + GTK_OBJECT (FileSelection)); + + gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(FileSelection)); + + gtk_widget_show(FileSelection); +} + +void SaveLogo(GtkWidget *widget) +{ + if (exportDialogData.fileName==NULL) { + SaveLogoAs(widget); + } else { + ExportLogoFileMain(exportDialogData.fileName); + } +} + +void OpenLogo(GtkWidget *widget) +{ + FileSelection=gtk_file_selection_new ("Open logo..."); + + gtk_signal_connect ( + GTK_OBJECT (GTK_FILE_SELECTION (FileSelection)->ok_button), + "clicked", (GtkSignalFunc) ImportFileSelected, FileSelection); + + gtk_signal_connect_object ( + GTK_OBJECT(GTK_FILE_SELECTION(FileSelection)->cancel_button), + "clicked", (GtkSignalFunc) gtk_widget_destroy, + GTK_OBJECT (FileSelection)); + + gtk_file_selection_hide_fileop_buttons(GTK_FILE_SELECTION(FileSelection)); + + gtk_widget_show(FileSelection); +} + +static GtkItemFactoryEntry logosMenuItems[] = { + { NULL, NULL, NULL, 0, ""}, + { NULL, "O", OpenLogo, 0, NULL}, + { NULL, "S", SaveLogo, 0, NULL}, + { NULL, NULL, SaveLogoAs, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "G", GetNetworkInfoEvent, 0, NULL}, + { NULL, NULL, GetLogoEvent, 0, NULL}, + { NULL, "T", SetLogoEvent, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "W", CloseLogosWindow, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "C", ClearLogoEvent, 0, NULL}, + { NULL, "I", InvertLogoEvent, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "U", UpLogoEvent, 0, NULL}, + { NULL, "D", DownLogoEvent, 0, NULL}, + { NULL, "L", LeftLogoEvent, 0, NULL}, + { NULL, "R", RightLogoEvent, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "H", FlipHorizontalLogoEvent, 0, NULL}, + { NULL, "V", FlipVerticalLogoEvent, 0, NULL}, +}; + +static void InitLogosMenu (void) { + logosMenuItems[0].path = g_strdup(_("/_File")); + logosMenuItems[1].path = g_strdup(_("/File/_Open")); + logosMenuItems[2].path = g_strdup(_("/File/_Save")); + logosMenuItems[3].path = g_strdup(_("/File/Save _as ...")); + logosMenuItems[4].path = g_strdup(_("/File/Sep1")); + logosMenuItems[5].path = g_strdup(_("/File/_Get operator")); + logosMenuItems[6].path = g_strdup(_("/File/Get _logo")); + logosMenuItems[7].path = g_strdup(_("/File/Se_t logo")); + logosMenuItems[8].path = g_strdup(_("/File/Sep2")); + logosMenuItems[9].path = g_strdup(_("/File/_Close")); + logosMenuItems[10].path = g_strdup(_("/_Edit")); + logosMenuItems[11].path = g_strdup(_("/Edit/_Clear")); + logosMenuItems[12].path = g_strdup(_("/Edit/_Invert")); + logosMenuItems[13].path = g_strdup(_("/Edit/Sep3")); + logosMenuItems[14].path = g_strdup(_("/Edit/_Up logo")); + logosMenuItems[15].path = g_strdup(_("/Edit/_Down logo")); + logosMenuItems[16].path = g_strdup(_("/Edit/_Left logo")); + logosMenuItems[17].path = g_strdup(_("/Edit/_Right logo")); + logosMenuItems[18].path = g_strdup(_("/Edit/Sep4")); + logosMenuItems[19].path = g_strdup(_("/Edit/Flip _horizontal")); + logosMenuItems[20].path = g_strdup(_("/Edit/Flip _vertical")); +} + +void GUI_CreateLogosWindow (void) { + int nMenuItems = sizeof (logosMenuItems) / sizeof (logosMenuItems[0]); + GtkAccelGroup *accelGroup; + GtkItemFactory *itemFactory; + GtkWidget *menuBar; + GtkWidget *toolBar, *vertToolBar; + GtkWidget *vbox; + GtkWidget *hbox; + GtkWidget *drawingBox; + GtkWidget *separator; + GdkBitmap *mask; + + GList *glistNetwork = NULL; + + int i = 0; + + previewPixmapWidth = PREVIEWWIDTH; + previewPixmapHeight = PREVIEWHEIGHT; + + InitLogosMenu(); + + /* realize top level window for logos */ + GUI_LogosWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); + gtk_window_set_policy(GTK_WINDOW(GUI_LogosWindow),1,1,1); + gtk_window_set_title(GTK_WINDOW(GUI_LogosWindow),_("Logos")); + gtk_signal_connect(GTK_OBJECT(GUI_LogosWindow),"delete_event", + GTK_SIGNAL_FUNC(DeleteEvent),NULL); + gtk_widget_realize(GUI_LogosWindow); + + CreateErrorDialog(&errorDialog,GUI_LogosWindow); + CreateInfoDialog(&infoDialog,GUI_LogosWindow); + + accelGroup = gtk_accel_group_new(); + gtk_accel_group_attach(accelGroup,GTK_OBJECT(GUI_LogosWindow)); + + /* create main vbox */ + vbox = gtk_vbox_new(FALSE,1); + gtk_container_add(GTK_CONTAINER(GUI_LogosWindow),vbox); + gtk_widget_show(vbox); + + itemFactory = gtk_item_factory_new(GTK_TYPE_MENU_BAR,"
",accelGroup); + gtk_item_factory_create_items(itemFactory,nMenuItems,logosMenuItems,NULL); + menuBar = gtk_item_factory_get_widget(itemFactory,"
"); + + gtk_box_pack_start(GTK_BOX(vbox),menuBar,FALSE,FALSE,0); + gtk_widget_show(menuBar); + + /* toolbar */ + toolBar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL,GTK_TOOLBAR_ICONS); + gtk_toolbar_set_button_relief(GTK_TOOLBAR(toolBar),GTK_RELIEF_NORMAL); + gtk_toolbar_set_style(GTK_TOOLBAR(toolBar),GTK_TOOLBAR_ICONS); + + gtk_toolbar_append_item(GTK_TOOLBAR(toolBar),NULL,"Clear logo",NULL, + NewPixmap(New_xpm,GUI_LogosWindow->window, + &GUI_LogosWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc)ClearLogoEvent,toolBar); + + gtk_toolbar_append_space(GTK_TOOLBAR(toolBar)); + + gtk_toolbar_append_item(GTK_TOOLBAR(toolBar),NULL,"Get logo",NULL, + NewPixmap(Read_xpm,GUI_LogosWindow->window, + &GUI_LogosWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc)GetLogoEvent,toolBar); + + gtk_toolbar_append_item(GTK_TOOLBAR(toolBar),NULL,"Set logo",NULL, + NewPixmap(Send_xpm,GUI_LogosWindow->window, + &GUI_LogosWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc)SetLogoEvent,toolBar); + + gtk_toolbar_append_space(GTK_TOOLBAR(toolBar)); + + buttonStartup = gtk_toolbar_append_element(GTK_TOOLBAR(toolBar), + GTK_TOOLBAR_CHILD_RADIOBUTTON,NULL,NULL,"Startup logo", + "",NewPixmap(Startup_logo_xpm,GUI_LogosWindow->window, + &GUI_LogosWindow->style->bg[GTK_STATE_NORMAL]), + GTK_SIGNAL_FUNC(LogoTypeEvent),NULL); + + buttonOperator = gtk_toolbar_append_element(GTK_TOOLBAR(toolBar), + GTK_TOOLBAR_CHILD_RADIOBUTTON,buttonStartup,NULL,"Operator logo", + "",NewPixmap(Operator_logo_xpm,GUI_LogosWindow->window, + &GUI_LogosWindow->style->bg[GTK_STATE_NORMAL]), + GTK_SIGNAL_FUNC(LogoTypeEvent),NULL); + + buttonCaller = gtk_toolbar_append_element(GTK_TOOLBAR(toolBar), + GTK_TOOLBAR_CHILD_RADIOBUTTON, + buttonOperator, + NULL,"Caller logo", + "",NewPixmap(Caller_logo_xpm,GUI_LogosWindow->window, + &GUI_LogosWindow->style->bg[GTK_STATE_NORMAL]), + GTK_SIGNAL_FUNC(LogoTypeEvent),NULL); + + buttonPicture = gtk_toolbar_append_element(GTK_TOOLBAR(toolBar), + GTK_TOOLBAR_CHILD_RADIOBUTTON, + buttonOperator, + NULL,"Picture image", + "",NewPixmap(Caller_logo_xpm,GUI_LogosWindow->window, + &GUI_LogosWindow->style->bg[GTK_STATE_NORMAL]), + GTK_SIGNAL_FUNC(LogoTypeEvent),NULL); + + gtk_toolbar_append_space(GTK_TOOLBAR(toolBar)); + + networkCombo = gtk_combo_new(); + gtk_combo_set_use_arrows_always(GTK_COMBO(networkCombo),1); + while (strcmp(GSM_Networks[i].Name,"unknown")) + glistNetwork = g_list_insert_sorted(glistNetwork,GSM_Networks[i++].Name, + (GCompareFunc)strcmp); + gtk_combo_set_popdown_strings(GTK_COMBO(networkCombo),glistNetwork); + gtk_entry_set_editable(GTK_ENTRY(GTK_COMBO(networkCombo)->entry),FALSE); + gtk_toolbar_append_widget(GTK_TOOLBAR(toolBar),networkCombo,"",""); + gtk_widget_show(networkCombo); + g_list_free(glistNetwork); + + callerCombo = gtk_combo_new(); + gtk_entry_set_editable(GTK_ENTRY(GTK_COMBO(callerCombo)->entry),FALSE); + gtk_toolbar_append_widget(GTK_TOOLBAR(toolBar),callerCombo,"",""); + gtk_widget_show(callerCombo); + + gtk_box_pack_start(GTK_BOX(vbox),toolBar,FALSE,FALSE,0); + gtk_widget_show(toolBar); + + /* vertical separator */ + separator = gtk_hseparator_new(); + gtk_box_pack_start(GTK_BOX(vbox),GTK_WIDGET(separator),FALSE,FALSE,0); + + /* create horizontal box for preview and drawing areas */ + hbox = gtk_hbox_new(FALSE,5); + gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0); + gtk_widget_show(hbox); + + /* set GSM_Bitmap width,height needed for creating drawinArea + * we are starting, default is startupLogo + */ + bitmap.type = GSM_7110StartupLogo; + bitmap.height = 65; + bitmap.width = 96; + bitmap.size = bitmap.height * bitmap.width / 8; + if (!strcmp(xgnokiiConfig.model,"7110")) { //7110 + GSM_ResizeBitmap(&bitmap,GSM_7110StartupLogo); + } else if (!strcmp(xgnokiiConfig.model,"6210") || !strcmp(xgnokiiConfig.model,"6250")) { //6210,6250 + GSM_ResizeBitmap(&bitmap,GSM_6210StartupLogo); + } else { + GSM_ResizeBitmap(&bitmap,GSM_StartupLogo); + } + drawingAreaWidth = bitmap.width * (POINTSIZE+1)+1; + drawingAreaHeight = bitmap.height * (POINTSIZE+1)+1; + + /* previewArea */ + previewPixmap = GetPreviewPixmap(GUI_LogosWindow); + + if (previewPixmap != NULL) { + previewArea = gtk_drawing_area_new(); + gtk_drawing_area_size(GTK_DRAWING_AREA(previewArea), + previewPixmapWidth,previewPixmapHeight); + + greenPixelPixmap = gdk_pixmap_create_from_xpm_d(GUI_LogosWindow->window, + &mask,&GUI_LogosWindow->style->bg[GTK_STATE_NORMAL], + Green_pixel_xpm); + + gtk_signal_connect(GTK_OBJECT(previewArea),"expose_event", + (GtkSignalFunc)PreviewAreaExposeEvent,NULL); + gtk_signal_connect(GTK_OBJECT(previewArea),"configure_event", + (GtkSignalFunc)PreviewAreaConfigureEvent,NULL); + gtk_signal_connect(GTK_OBJECT(previewArea),"button_press_event", + (GtkSignalFunc)PreviewAreaButtonPressEvent,NULL); + + gtk_widget_set_events(previewArea,GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK ); + + gtk_box_pack_start(GTK_BOX(hbox),previewArea,FALSE,FALSE,0); + gtk_widget_show(previewArea); + + /* clear battery, signal, menu & names from preview phone */ + UpdatePreviewPoints (); + + } else previewAvailable = 0; + + /* drawingArea */ + greenPointPixmap = gdk_pixmap_create_from_xpm_d(GUI_LogosWindow->window, + &mask,&GUI_LogosWindow->style->bg[GTK_STATE_NORMAL],Green_point_xpm); + blackPointPixmap = gdk_pixmap_create_from_xpm_d(GUI_LogosWindow->window, + &mask,&GUI_LogosWindow->style->bg[GTK_STATE_NORMAL],Black_point_xpm); + + drawingBox = gtk_vbox_new(FALSE,3); + gtk_box_pack_start(GTK_BOX(hbox),drawingBox,FALSE,FALSE,0); + gtk_widget_show(drawingBox); + + drawingArea = gtk_drawing_area_new(); + gtk_drawing_area_size(GTK_DRAWING_AREA(drawingArea), + drawingAreaWidth,drawingAreaHeight); + + gtk_signal_connect(GTK_OBJECT(drawingArea),"configure_event", + (GtkSignalFunc)DrawingAreaConfigureEvent,NULL); + gtk_signal_connect(GTK_OBJECT(drawingArea),"expose_event", + (GtkSignalFunc)DrawingAreaExposeEvent,NULL); + gtk_signal_connect(GTK_OBJECT(drawingArea),"button_press_event", + (GtkSignalFunc)DrawingAreaButtonPressEvent,NULL); + gtk_signal_connect(GTK_OBJECT(drawingArea),"button_release_event", + (GtkSignalFunc)DrawingAreaButtonReleaseEvent,NULL); + gtk_signal_connect(GTK_OBJECT(drawingArea),"motion_notify_event", + (GtkSignalFunc)DrawingAreaMotionNotifyEvent,NULL); + + gtk_widget_set_events(drawingArea,GDK_EXPOSURE_MASK | GDK_LEAVE_NOTIFY_MASK | + GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK); + + gtk_box_pack_start(GTK_BOX(drawingBox),drawingArea,FALSE,FALSE,0); + gtk_widget_show(drawingArea); + + /* vertical tool bar */ + vertToolBar = gtk_toolbar_new(GTK_ORIENTATION_VERTICAL,GTK_TOOLBAR_ICONS); + gtk_toolbar_set_button_relief(GTK_TOOLBAR(vertToolBar),GTK_RELIEF_NORMAL); + gtk_toolbar_set_style(GTK_TOOLBAR(vertToolBar),GTK_TOOLBAR_ICONS); + + buttonBrush = gtk_toolbar_append_element(GTK_TOOLBAR(vertToolBar), + GTK_TOOLBAR_CHILD_RADIOBUTTON,NULL,NULL,"Brush tool", + "",NewPixmap(Tool_brush_xpm,GUI_LogosWindow->window, + &GUI_LogosWindow->style->bg[GTK_STATE_NORMAL]), + GTK_SIGNAL_FUNC(ToolTypeEvent),NULL); + + buttonLine = gtk_toolbar_append_element(GTK_TOOLBAR(vertToolBar), + GTK_TOOLBAR_CHILD_RADIOBUTTON,buttonBrush,NULL,"Line tool", + "",NewPixmap(Tool_line_xpm,GUI_LogosWindow->window, + &GUI_LogosWindow->style->bg[GTK_STATE_NORMAL]), + GTK_SIGNAL_FUNC(ToolTypeEvent),NULL); + + buttonRectangle = gtk_toolbar_append_element(GTK_TOOLBAR(vertToolBar), + GTK_TOOLBAR_CHILD_RADIOBUTTON,buttonLine,NULL,"Rectangle tool", + "",NewPixmap(Tool_rectangle_xpm,GUI_LogosWindow->window, + &GUI_LogosWindow->style->bg[GTK_STATE_NORMAL]), + GTK_SIGNAL_FUNC(ToolTypeEvent),NULL); + + buttonFilledRectangle = gtk_toolbar_append_element(GTK_TOOLBAR(vertToolBar), + GTK_TOOLBAR_CHILD_RADIOBUTTON,buttonRectangle,NULL, + "Filled rectangle tool", + "",NewPixmap(Tool_filled_rectangle_xpm, + GUI_LogosWindow->window, + &GUI_LogosWindow->style->bg[GTK_STATE_NORMAL]), + GTK_SIGNAL_FUNC(ToolTypeEvent),NULL); + + gtk_toolbar_append_space(GTK_TOOLBAR(vertToolBar)); + + gtk_toolbar_append_item(GTK_TOOLBAR(vertToolBar),NULL,"Invert logo",NULL, + NewPixmap(Edit_invert_xpm,GUI_LogosWindow->window, + &GUI_LogosWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc)InvertLogoEvent,vertToolBar); + + gtk_toolbar_append_item(GTK_TOOLBAR(vertToolBar),NULL,"Horizontal flip",NULL, + NewPixmap(Edit_flip_horizontal_xpm,GUI_LogosWindow->window, + &GUI_LogosWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc)FlipHorizontalLogoEvent,vertToolBar); + + gtk_toolbar_append_item(GTK_TOOLBAR(vertToolBar),NULL,"Vertical flip",NULL, + NewPixmap(Edit_flip_vertical_xpm,GUI_LogosWindow->window, + &GUI_LogosWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc)FlipVerticalLogoEvent,vertToolBar); + + + gtk_box_pack_start(GTK_BOX(hbox),vertToolBar,FALSE,FALSE,0); + gtk_widget_show(vertToolBar); + + GUIEventAdd(GUI_EVENT_CALLERS_GROUPS_CHANGED,&GUI_RefreshLogosGroupsCombo); +} + +void GUI_RefreshLogosGroupsCombo (void) { + GList *callerList = NULL; + int i; + + for (i = 0;i < 6;i++) + callerList = g_list_insert(callerList,xgnokiiConfig.callerGroups[i],i); + + gtk_combo_set_popdown_strings(GTK_COMBO(callerCombo),callerList); + g_list_free(callerList); + + if (!callersGroupsInitialized) callersGroupsInitialized = 1; +} + +void GUI_ShowLogosWindow (void) { + + gtk_widget_show(buttonCaller); + gtk_widget_show(callerCombo); + + if (xgnokiiConfig.callerGroups[0] == NULL) { + GUI_Refresh(); + GUI_InitCallerGroupsInf (); + } + + if (!callersGroupsInitialized) GUI_RefreshLogosGroupsCombo (); + + gtk_widget_show(GUI_LogosWindow); + + if (!previewAvailable && showPreviewErrorDialog) { + gchar *buf = g_strdup(_("Load preview pixmap error, feature disabled.")); + gtk_label_set_text(GTK_LABEL(errorDialog.text),buf); + gtk_widget_show(errorDialog.dialog); + g_free(buf); + + showPreviewErrorDialog = 0; + } +} diff --git a/xgnokii/xgnokii_logos.h b/xgnokii/xgnokii_logos.h new file mode 100644 index 0000000..9d7c780 --- /dev/null +++ b/xgnokii/xgnokii_logos.h @@ -0,0 +1,39 @@ +#ifndef XGNOKII_LOGOS_H +#define XGNOKII_LOGOS_H + +/* drawable point size - depends on .xpm file */ +#define POINTSIZE 5 + +/* maximal size for drawing area */ +#define MAXWIDTH 82 +#define MAXHEIGHT 48 + +/* where to draw preview logos in previewPixmap */ +#define PREVIEWSTARTX 28 +#define PREVIEWSTARTY 160 + +#define PREVIEWWIDTH 138 +#define PREVIEWHEIGHT 289 + +/* relative movement caller & operator logo from startuplogo */ +#define PREVIEWJUMPX 6 +#define PREVIEWJUMPY 6 + +#define TOOL_BRUSH 0 +#define TOOL_LINE 1 +#define TOOL_RECTANGLE 2 +#define TOOL_FILLED_RECTANGLE 3 +#define TOOL_CIRCLE 4 +#define TOOL_FILLED_CIRCLE 5 +#define TOOL_ELIPSE 6 +#define TOOL_FILLED_ELIPSE 7 +#define TOOL_TEXT 8 + +extern void GUI_ShowLogosWindow (void); +extern void GUI_CreateLogosWindow (void); + +/* this is called from optionsApplyCallback when some changes + * caller groups names */ +extern void GUI_RefreshLogosGroupsCombo (void); + +#endif diff --git a/xgnokii/xgnokii_lowlevel.c b/xgnokii/xgnokii_lowlevel.c new file mode 100644 index 0000000..78a9ba4 --- /dev/null +++ b/xgnokii/xgnokii_lowlevel.c @@ -0,0 +1,1000 @@ +/* + + X G N O K I I + + A Linux/Unix GUI for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#include +#include +#include +#include +#include "gsm-api.h" +#include "xgnokii_lowlevel.h" +#include "xgnokii.h" +#include "xgnokii_common.h" + +pthread_t monitor_th; +PhoneMonitor phoneMonitor; +pthread_mutex_t memoryMutex; +pthread_cond_t memoryCond; +pthread_mutex_t calendarMutex; +pthread_cond_t calendarCond; +pthread_mutex_t smsMutex; +pthread_mutex_t sendSMSMutex; +pthread_cond_t sendSMSCond; +pthread_mutex_t callMutex; +pthread_mutex_t netMonMutex; +pthread_mutex_t speedDialMutex; +pthread_cond_t speedDialCond; +pthread_mutex_t callerGroupMutex; +pthread_cond_t callerGroupCond; +pthread_mutex_t smsCenterMutex; +pthread_cond_t smsCenterCond; +pthread_mutex_t alarmMutex; +pthread_cond_t alarmCond; +pthread_mutex_t getBitmapMutex; +pthread_cond_t getBitmapCond; +pthread_mutex_t setBitmapMutex; +pthread_cond_t setBitmapCond; +pthread_mutex_t getNetworkInfoMutex; +pthread_cond_t getNetworkInfoCond; +static pthread_mutex_t eventsMutex; +static GSList *ScheduledEvents = NULL; + + +inline void GUI_InsertEvent (PhoneEvent *event) +{ + while (phoneMonitor.working) { + usleep(1); + } + +# ifdef XDEBUG + g_print ("Inserting Event: %d\n", event->event); +# endif + pthread_mutex_lock (&eventsMutex); + ScheduledEvents = g_slist_prepend (ScheduledEvents, event); + pthread_mutex_unlock (&eventsMutex); +} + + +inline static PhoneEvent *RemoveEvent (void) +{ + GSList *list; + PhoneEvent *event = NULL; + + pthread_mutex_lock (&eventsMutex); + list = g_slist_last (ScheduledEvents); + if (list) + { + event = (PhoneEvent *) list->data; + ScheduledEvents = g_slist_remove_link (ScheduledEvents, list); + g_slist_free_1 (list); + } + pthread_mutex_unlock (&eventsMutex); + + return (event); +} + + +static void InitModelInf (void) +{ + gchar buf[64]; + GSM_Error error; + register gint i = 0; + + while ((error = GSM->GetModel(buf)) != GE_NONE && i++ < 15) + sleep(1); + + if (error == GE_NONE) + { + g_free (phoneMonitor.phone.model); + phoneMonitor.phone.version = g_strdup (buf); + phoneMonitor.phone.model = GetModelName (buf); + if (phoneMonitor.phone.model == NULL) + phoneMonitor.phone.model = g_strdup (_("unknown")); + } + + i = 0; + while ((error = GSM->GetRevision (buf)) != GE_NONE && i++ < 5) + sleep(1); + + if (error == GE_NONE) + { + g_free (phoneMonitor.phone.revision); + phoneMonitor.phone.revision = g_strdup (buf); + } + + i = 0; + while ((error = GSM->GetIMEI (buf)) != GE_NONE && i++ < 5) + sleep(1); + + if (error == GE_NONE) + { + g_free (phoneMonitor.phone.imei); + phoneMonitor.phone.imei = g_strdup (buf); + } + + +#ifdef XDEBUG + g_print ("Version: %s\n", phoneMonitor.phone.version); + g_print ("Model: %s\n", phoneMonitor.phone.model); + g_print ("IMEI: %s\n", phoneMonitor.phone.imei); + g_print ("Revision: %s\n", phoneMonitor.phone.revision); +#endif +} + +static GSM_Error fbusinit(bool enable_monitoring) +{ + int count=0; + static GSM_Error error=GE_NOLINK; + +#ifndef WIN32 + if (strcmp(GetMygnokiiVersion(),VERSION)!=0) + fprintf(stderr,_("WARNING: version of installed libmygnokii.so (%s) is different to version of xgnokii (%s)\n"),GetMygnokiiVersion(),VERSION); +#endif + + /* Initialise the code for the GSM interface. */ + if (error == GE_NOLINK) + error = GSM_Initialise (xgnokiiConfig.model, xgnokiiConfig.port, + xgnokiiConfig.initlength, + GetConnectionTypeFromString(xgnokiiConfig.connection), + RLP_DisplayF96Frame, + xgnokiiConfig.synchronizetime); + +#ifdef XDEBUG + g_print ("fbusinit: error %d\n", error); +#endif + + if (error != GE_NONE) { + g_print (_("GSM/FBUS init failed! (Unknown model ?). Quitting.\n")); + /* FIXME: should popup some message... */ + return (error); + } + + while (count++ < 40 && *GSM_LinkOK == false) + usleep(50000); +#ifdef XDEBUG + g_print("After usleep. GSM_LinkOK: %d\n", *GSM_LinkOK); +#endif + + if (*GSM_LinkOK == true) + InitModelInf (); + + return *GSM_LinkOK; +} + + +void GUI_InitPhoneMonitor (void) +{ + phoneMonitor.phone.model = g_strdup (_("unknown")); + phoneMonitor.phone.version = phoneMonitor.phone.model; + phoneMonitor.phone.revision = g_strdup (_("unknown")); + phoneMonitor.phone.imei = g_strdup (_("unknown")); + phoneMonitor.rfLevel = phoneMonitor.batteryLevel = -1; + phoneMonitor.powerSource = GPS_BATTERY; + phoneMonitor.working = FALSE; + phoneMonitor.alarm = FALSE; + phoneMonitor.sms.unRead = phoneMonitor.sms.number = phoneMonitor.sms.number2 = 0; + phoneMonitor.sms.messages = NULL; + phoneMonitor.call.callInProgress = CS_Idle; + *phoneMonitor.call.callNum = '\0'; + phoneMonitor.netmonitor.number = 0; + *phoneMonitor.netmonitor.screen = *phoneMonitor.netmonitor.screen3 = + *phoneMonitor.netmonitor.screen4 = *phoneMonitor.netmonitor.screen5 = '\0'; + pthread_mutex_init (&memoryMutex, NULL); + pthread_cond_init (&memoryCond, NULL); + pthread_mutex_init (&calendarMutex, NULL); + pthread_cond_init (&calendarCond, NULL); + pthread_mutex_init (&smsMutex, NULL); + pthread_mutex_init (&sendSMSMutex, NULL); + pthread_cond_init (&sendSMSCond, NULL); + pthread_mutex_init (&callMutex, NULL); + pthread_mutex_init (&eventsMutex, NULL); + pthread_mutex_init (&callMutex, NULL); + pthread_mutex_init (&netMonMutex, NULL); + pthread_mutex_init (&speedDialMutex, NULL); + pthread_cond_init (&speedDialCond, NULL); + pthread_mutex_init (&callerGroupMutex, NULL); + pthread_cond_init (&callerGroupCond, NULL); + pthread_mutex_init (&smsCenterMutex, NULL); + pthread_cond_init (&smsCenterCond, NULL); + pthread_mutex_init (&getBitmapMutex, NULL); + pthread_cond_init (&getBitmapCond, NULL); + pthread_mutex_init (&setBitmapMutex, NULL); + pthread_cond_init (&setBitmapCond, NULL); + pthread_mutex_init (&getNetworkInfoMutex, NULL); + pthread_cond_init (&getNetworkInfoCond, NULL); +} + + +static inline void FreeElement (gpointer data, gpointer userData) +{ + g_free ((GSM_SMSMessage *) data); +} + + +static inline void FreeArray (GSList **array) +{ + if (*array) + { + g_slist_foreach (*array, FreeElement, NULL); + g_slist_free (*array); + *array = NULL; + } +} + + +void RefreshSMS (const gint number) +{ + GSM_Error error; + GSM_SMSMessage *msg; + register gint i; + +# ifdef XDEBUG + g_print ("RefreshSMS is running...\n"); +# endif + + pthread_mutex_lock (&smsMutex); + FreeArray (&(phoneMonitor.sms.messages)); + phoneMonitor.sms.number = 0; + phoneMonitor.sms.number2 = 0; + pthread_mutex_unlock (&smsMutex); + + i = 1; + while (1) + { + msg = g_malloc (sizeof (GSM_SMSMessage)); + msg->MemoryType = GMT_SM; + msg->Location = i; +#ifdef XDEBUG + fprintf(stdout, _("test: %d %i %i %i\n"),msg->Location,phoneMonitor.sms.number,phoneMonitor.sms.number2,number); +#endif + pthread_mutex_lock (&smsMutex); + if( GetModelFeature(FN_SMS)==F_SMS71 ) msg->Location = 0; /* read next sms for 6210/7110 */ + error = GSM->GetSMSMessage (msg); + pthread_mutex_unlock (&smsMutex); + switch (error) { + case GE_NONE: + pthread_mutex_lock (&smsMutex); +#ifdef XDEBUG + fprintf(stdout, _("Refresh SMS: g_slist_append: sms message")); + fprintf(stdout, _(" Location: %d"),msg->Location); + fprintf(stdout, _(" folder: %d"),msg->folder); + if ( msg-> SMSData) fprintf(stdout, _(" SMSData true\n")); + else fprintf(stdout, _(" SMSData false\n")); +#endif + /* RTH: unread sms from folder 0 to INBOX */ + phoneMonitor.sms.messages = g_slist_append (phoneMonitor.sms.messages, msg); + phoneMonitor.sms.number++; + phoneMonitor.sms.number2++; + pthread_mutex_unlock (&smsMutex); + if (phoneMonitor.sms.number2 == number) return; + break; + case GE_SMSTOOLONG: /* Picture Image in 7110 comp phone */ + g_free (msg); + phoneMonitor.sms.number2++; + if (phoneMonitor.sms.number2 == number) return; + break; + default: + g_free (msg); + break; + } + i++; + } +} + + +static gint A_GetMemoryStatus (gpointer data) +{ + GSM_Error error; + D_MemoryStatus *ms = (D_MemoryStatus *) data; + + error = ms->status = GE_UNKNOWN; + + if (ms) + { + pthread_mutex_lock (&memoryMutex); + error = ms->status = GSM->GetMemoryStatus (&(ms->memoryStatus)); + pthread_cond_signal (&memoryCond); + pthread_mutex_unlock (&memoryMutex); + } + + return (error); +} + + +static gint A_GetMemoryLocation (gpointer data) +{ + GSM_Error error; + D_MemoryLocation *ml = (D_MemoryLocation *) data; + + error = ml->status = GE_UNKNOWN; + + if (ml) + { + pthread_mutex_lock (&memoryMutex); + error = ml->status = GSM->GetMemoryLocation (ml->entry); + pthread_cond_signal (&memoryCond); + pthread_mutex_unlock (&memoryMutex); + } + + return (error); +} + + +static gint A_GetMemoryLocationAll (gpointer data) +{ + GSM_PhonebookEntry entry; + GSM_Error error; + D_MemoryLocationAll *mla = (D_MemoryLocationAll *) data; + register gint i; + gint readed=0; + + error = mla->status = GE_NONE; + entry.MemoryType = mla->type; + + pthread_mutex_lock (&memoryMutex); + for (i = mla->min; i <= mla->max; i++) + { + entry.Location = i; + if (readedused) { + error = GSM->GetMemoryLocation (&entry); + if (error != GE_NONE) + { + gint err_count = 0; + + while (error != GE_NONE && + error != GE_INVALIDPHBOOKLOCATION && error != GE_UNKNOWN) //n7110.c + { + g_print (_("%s: line %d: Can't get memory entry number %d from memory %d! %d\n"), + __FILE__, __LINE__, i, entry.MemoryType, error); + if (err_count++ > 3) + { + mla->ReadFailed (i); + mla->status = error; + pthread_cond_signal (&memoryCond); + pthread_mutex_unlock (&memoryMutex); + return (error); + } + + error = GSM->GetMemoryLocation (&entry); + sleep (2); + } + } + + if (strcmp(entry.Number, "\0") || strcmp(entry.Name, "\0")) + readed++; + + } else { + entry.Number[0]='\0'; + entry.Name[0]='\0'; + } + + error = mla->InsertEntry (&entry); + if (error != GE_NONE) + break; + } + mla->status = error; + pthread_cond_signal (&memoryCond); + pthread_mutex_unlock (&memoryMutex); + return (error); +} + + +static gint A_WriteMemoryLocation (gpointer data) +{ + GSM_Error error; + D_MemoryLocation *ml = (D_MemoryLocation *) data; + + error = ml->status = GE_UNKNOWN; + + if (ml) + { + pthread_mutex_lock (&memoryMutex); + error = ml->status = GSM->WritePhonebookLocation (ml->entry); + pthread_cond_signal (&memoryCond); + pthread_mutex_unlock (&memoryMutex); + } + + return (error); +} + + +static gint A_WriteMemoryLocationAll (gpointer data) +{ +/* GSM_PhonebookEntry entry; */ + GSM_Error error; + D_MemoryLocationAll *mla = (D_MemoryLocationAll *) data; +/* register gint i; +*/ + error = mla->status = GE_NONE; +/* entry.MemoryType = mla->type; + + pthread_mutex_lock (&memoryMutex); + for (i = mla->min; i <= mla->max; i++) + { + entry.Location = i; + error = GSM->GetMemoryLocation (&entry); + if (error != GE_NONE) + { + gint err_count = 0; + + while (error != GE_NONE) + { + g_print (_("%s: line %d: Can't get memory entry number %d from memory %d! %d\n"), + __FILE__, __LINE__, i, entry.MemoryType, error); + if (err_count++ > 3) + { + mla->ReadFailed (i); + mla->status = error; + pthread_cond_signal (&memoryCond); + pthread_mutex_unlock (&memoryMutex); + return (error); + } + + error = GSM->GetMemoryLocation (&entry); + sleep (2); + } + } + error = mla->InsertEntry (&entry); + if (error != GE_NONE) + break; + } + mla->status = error; + pthread_cond_signal (&memoryCond); + pthread_mutex_unlock (&memoryMutex); */ + return (error); +} + + +static gint A_GetCalendarNote (gpointer data) +{ + GSM_Error error; + D_CalendarNote *cn = (D_CalendarNote *) data; + + error = cn->status = GE_UNKNOWN; + + if (cn) + { + pthread_mutex_lock (&calendarMutex); + error = cn->status = GSM->GetCalendarNote (cn->entry); + pthread_cond_signal (&calendarCond); + pthread_mutex_unlock (&calendarMutex); + } + + return (error); +} + + +static gint A_GetCalendarNoteAll (gpointer data) +{ + GSM_CalendarNote entry; + D_CalendarNoteAll *cna = (D_CalendarNoteAll *) data; + GSM_Error e; + register gint i = 1; + + pthread_mutex_lock (&calendarMutex); + while (1) + { + entry.Location = i++; + + if ((e = GSM->GetCalendarNote (&entry)) != GE_NONE) + break; + + if (cna->InsertEntry (&entry) != GE_NONE) + break; + } + + pthread_mutex_unlock (&calendarMutex); + g_free (cna); + if (e == GE_INVALIDCALNOTELOCATION) + return (GE_NONE); + else + return (e); +} + +static gint A_WriteCalendarNote (gpointer data) +{ + GSM_Error error; + D_CalendarNote *cn = (D_CalendarNote *) data; + + error = cn->status = GE_UNKNOWN; + + if (cn) + { + pthread_mutex_lock (&calendarMutex); + error = cn->status = GSM->WriteCalendarNote (cn->entry); + pthread_cond_signal (&calendarCond); + pthread_mutex_unlock (&calendarMutex); + } + + return (error); +} + + +static gint A_DeleteCalendarNote (gpointer data) +{ + GSM_CalendarNote *note = (GSM_CalendarNote *) data; + GSM_Error error = GE_UNKNOWN; + + if (note) + { + error = GSM->DeleteCalendarNote (note); + g_free (note); + } + + return (error); +} + +static gint A_GetCallerGroup (gpointer data) +{ + GSM_Bitmap bitmap; + GSM_Error error; + D_CallerGroup *cg = (D_CallerGroup *) data; + + error = cg->status = GE_UNKNOWN; + + if (cg) + { + bitmap.type = GSM_CallerLogo; + bitmap.number = cg->number; + + pthread_mutex_lock (&callerGroupMutex); + error = cg->status = GSM->GetBitmap (&bitmap); + strncpy (cg->text, bitmap.text, 256); + cg->text[255] = '\0'; + pthread_cond_signal (&callerGroupCond); + pthread_mutex_unlock (&callerGroupMutex); + } + + return (error); +} + + +static gint A_SendCallerGroup (gpointer data) +{ + GSM_Bitmap bitmap; + D_CallerGroup *cg = (D_CallerGroup *) data; + GSM_Error error; + + if (!cg) + return (GE_UNKNOWN); + + bitmap.type = GSM_CallerLogo; + bitmap.number = cg->number; + if ((error = GSM->GetBitmap (&bitmap)) != GE_NONE) + { + g_free (cg); + return (error); + } + strncpy (bitmap.text, cg->text, 256); + bitmap.text[255] = '\0'; + g_free (cg); + return (GSM->SetBitmap (&bitmap)); +} + + +static gint A_GetSMSCenter (gpointer data) +{ + D_SMSCenter *c = (D_SMSCenter *) data; + GSM_Error error; + + error = c->status = GE_UNKNOWN; + if (c) + { + pthread_mutex_lock (&smsCenterMutex); + error = c->status = GSM->GetSMSCenter (c->center); + pthread_cond_signal (&smsCenterCond); + pthread_mutex_unlock (&smsCenterMutex); + } + + return (error); +} + + +static gint A_SetSMSCenter (gpointer data) +{ + D_SMSCenter *c = (D_SMSCenter *) data; + GSM_Error error; + + error = c->status = GE_UNKNOWN; + if (c) + { + //pthread_mutex_lock (&smsCenterMutex); + error = c->status = GSM->SetSMSCenter (c->center); + g_free (c); + //pthread_cond_signal (&smsCenterCond); + //pthread_mutex_unlock (&smsCenterMutex); + } + + return (error); +} + + +static gint A_SendSMSMessage (gpointer data) +{ + D_SMSMessage *d = (D_SMSMessage *) data; + GSM_Error error; + + error = d->status = GE_UNKNOWN; + if (d) + { + pthread_mutex_lock (&sendSMSMutex); + error = d->status = GSM->SendSMSMessage (d->sms); + pthread_cond_signal (&sendSMSCond); + pthread_mutex_unlock (&sendSMSMutex); + } + + if (d->status == GE_SMSSENDOK) + return (GE_NONE); + else + return (error); +} + + +static gint A_DeleteSMSMessage (gpointer data) +{ + GSM_SMSMessage *sms = (GSM_SMSMessage *) data; + GSM_Error error = GE_UNKNOWN; + + if (sms) + { + error = GSM->DeleteSMSMessage(sms); + g_free (sms); + } + + return (error); +} + + +static gint A_GetSpeedDial (gpointer data) +{ + D_SpeedDial *d = (D_SpeedDial *) data; + GSM_Error error; + + error = d->status = GE_UNKNOWN; + + if (d) + { + pthread_mutex_lock (&speedDialMutex); + error = d->status = GSM->GetSpeedDial (&(d->entry)); + pthread_cond_signal (&speedDialCond); + pthread_mutex_unlock (&speedDialMutex); + } + + return (error); +} + + +static gint A_SendSpeedDial (gpointer data) +{ + D_SpeedDial *d = (D_SpeedDial *) data; + GSM_Error error; + + error = d->status = GE_UNKNOWN; + + if (d) + { + //pthread_mutex_lock (&speedDialMutex); + error = d->status = GSM->SetSpeedDial (&(d->entry)); + g_free (d); + //pthread_cond_signal (&speedDialCond); + //pthread_mutex_unlock (&speedDialMutex); + } + + return (error); +} + + +static gint A_SendDTMF (gpointer data) +{ + gchar *buf = (gchar *) data; + GSM_Error error = GE_UNKNOWN; + + if (buf) + { + error = GSM->SendDTMF (buf); + g_free (buf); + } + + return (error); +} + + +static gint A_NetMonOnOff (gpointer data) +{ + gchar screen[50]; + gint mode = GPOINTER_TO_INT (data); + GSM_Error error = GE_UNKNOWN; + + if (mode) + error = GSM->NetMonitor (0xf3, screen); + else + error = GSM->NetMonitor (0xf1, screen); + + return (error); +} + + +static gint A_NetMonitor (gpointer data) +{ + gint number = GPOINTER_TO_INT (data); + + if (data == 0) + phoneMonitor.netmonitor.number = 0; + else + phoneMonitor.netmonitor.number = number; + + return (0); +} + + +static gint A_DialVoice (gpointer data) +{ + gchar *number = (gchar *) data; + GSM_Error error = GE_UNKNOWN; + + if (number) + { + error = GSM->DialVoice (number); + g_free (number); + } + + return (error); +} + + +static gint A_GetAlarm (gpointer data) +{ + D_Alarm *a = (D_Alarm *) data; + GSM_Error error; + + error = a->status = GE_UNKNOWN; + + if (a) + { + pthread_mutex_lock (&alarmMutex); + error = a->status = GSM->GetAlarm (0, &(a->time)); + pthread_cond_signal (&alarmCond); + pthread_mutex_unlock (&alarmMutex); + } + + return (error); +} + + +static gint A_SetAlarm (gpointer data) +{ + D_Alarm *a = (D_Alarm *) data; + GSM_Error error; + + error = a->status = GE_UNKNOWN; + + if (a) + { + error = a->status = GSM->SetAlarm (0, &(a->time)); + g_free (a); + } + + return (error); +} + + +static gint A_SendKeyStroke (gpointer data) +{ + gchar *buf = (gchar *) data; + + if (buf) + { + GSM->PressKey(buf[1], buf[0]); + g_free (buf); + } + + return (0); +} + +static gint A_GetBitmap(gpointer data) { + GSM_Error error; + D_Bitmap *d = (D_Bitmap *)data; + + pthread_mutex_lock(&getBitmapMutex); + error = d->status = GSM->GetBitmap(d->bitmap); + pthread_cond_signal(&getBitmapCond); + pthread_mutex_unlock(&getBitmapMutex); + return error; +} + +static gint A_SetBitmap(gpointer data) { + GSM_Error error; + D_Bitmap *d = (D_Bitmap *)data; + GSM_Bitmap bitmap; + + pthread_mutex_lock(&setBitmapMutex); + if (d->bitmap->type == GSM_CallerLogo) { + bitmap.type = d->bitmap->type; + bitmap.number = d->bitmap->number; + error = d->status = GSM->GetBitmap(&bitmap); + if (error == GE_NONE) { + strncpy(d->bitmap->text,bitmap.text,sizeof(bitmap.text)); + d->bitmap->ringtone = bitmap.ringtone; + error = d->status = GSM->SetBitmap(d->bitmap); + } + } else { + error = d->status = GSM->SetBitmap(d->bitmap); + } + pthread_cond_signal(&setBitmapCond); + pthread_mutex_unlock(&setBitmapMutex); + return error; +} + +static gint A_GetNetworkInfo(gpointer data) { + GSM_Error error; + D_NetworkInfo *d = (D_NetworkInfo *)data; + + pthread_mutex_lock(&getNetworkInfoMutex); + error = d->status = GSM->GetNetworkInfo(d->info); + pthread_cond_signal(&getNetworkInfoCond); + pthread_mutex_unlock(&getNetworkInfoMutex); + return error; +} + +static gint A_Exit (gpointer data) +{ + pthread_exit (0); + return (0); /* just to be proper */ +} + + +gint (*DoAction[])(gpointer) = { + A_GetMemoryStatus, + A_GetMemoryLocation, + A_GetMemoryLocationAll, + A_WriteMemoryLocation, + A_WriteMemoryLocationAll, + A_GetCalendarNote, + A_GetCalendarNoteAll, + A_WriteCalendarNote, + A_DeleteCalendarNote, + A_GetCallerGroup, + A_SendCallerGroup, + A_GetSMSCenter, + A_SetSMSCenter, + A_SendSMSMessage, + A_DeleteSMSMessage, + A_GetSpeedDial, + A_SendSpeedDial, + A_SendDTMF, + A_NetMonOnOff, + A_NetMonitor, + A_DialVoice, + A_GetAlarm, + A_SetAlarm, + A_SendKeyStroke, + A_GetBitmap, + A_SetBitmap, + A_GetNetworkInfo, + A_Exit +}; + +void *GUI_Connect (void *a) +{ + /* Define required unit types for RF and Battery level meters. */ + GSM_RFUnits rf_units = GRF_Arbitrary; + GSM_BatteryUnits batt_units = GBU_Arbitrary; + + GSM_DateTime Alarm; + gchar number[INCALL_NUMBER_LENGTH]; + PhoneEvent *event=NULL; + GSM_Error error; + gint status; + + +# ifdef XDEBUG + g_print ("Initializing connection...\n"); +# endif + + phoneMonitor.working = _("Connecting..."); + while (!fbusinit (true)) + sleep (1); + +# ifdef XDEBUG + g_print ("Phone connected. Starting monitoring...\n"); +# endif + + while (1) + { + if (event != NULL) { + phoneMonitor.working = _("Working..."); + } else { + phoneMonitor.working = NULL; + + if (GSM->GetRFLevel (&rf_units, &phoneMonitor.rfLevel) != GE_NONE) + phoneMonitor.rfLevel = -1; + + if (rf_units == GRF_Arbitrary) + phoneMonitor.rfLevel *= 25; + + if (GSM->GetPowerSource (&phoneMonitor.powerSource) == GE_NONE + && phoneMonitor.powerSource == GPS_ACDC) + phoneMonitor.batteryLevel = ((gint) phoneMonitor.batteryLevel + 25) % 125; + else + { + if (GSM->GetBatteryLevel (&batt_units, &phoneMonitor.batteryLevel) != GE_NONE) + phoneMonitor.batteryLevel = -1; + if (batt_units == GBU_Arbitrary) + phoneMonitor.batteryLevel *= 25; + } + + if (GSM->GetAlarm (0, &Alarm) == GE_NONE && Alarm.IsSet != 0) + phoneMonitor.alarm = TRUE; + else + phoneMonitor.alarm = FALSE; + + if (GSM->GetIncomingCallNr (number) == GE_NONE) + { +# ifdef XDEBUG + g_print ("Call in progress: %s\n", phoneMonitor.call.callNum); +# endif + + if (GSM->GetDisplayStatus (&status)==GE_NONE) { + if (status & (1<NetMonitor (phoneMonitor.netmonitor.number, + phoneMonitor.netmonitor.screen); + GSM->NetMonitor (3, phoneMonitor.netmonitor.screen3); + GSM->NetMonitor (4, phoneMonitor.netmonitor.screen4); + GSM->NetMonitor (5, phoneMonitor.netmonitor.screen5); + } + else + { + *phoneMonitor.netmonitor.screen = *phoneMonitor.netmonitor.screen3 = + *phoneMonitor.netmonitor.screen4 = *phoneMonitor.netmonitor.screen5 = '\0'; + } + pthread_mutex_unlock (&netMonMutex); + } + while ((event = RemoveEvent ()) != NULL) + { +# ifdef XDEBUG + g_print ("Processing Event: %d\n", event->event); +# endif + phoneMonitor.working = _("Working..."); + if (event->event <= Event_Exit) + if ((error = DoAction[event->event] (event->data)) != GE_NONE) + g_print (_("Event %d failed with return code %d!\n"), event->event, error); + g_free (event); + } + } +} diff --git a/xgnokii/xgnokii_lowlevel.h b/xgnokii/xgnokii_lowlevel.h new file mode 100644 index 0000000..44201fd --- /dev/null +++ b/xgnokii/xgnokii_lowlevel.h @@ -0,0 +1,192 @@ +/* + + X G N O K I I + + A Linux/Unix GUI for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#ifndef XGNOKII_LOWLEVEL_H +#define XGNOKII_LOWLEVEL_H + +#include +#include +#include "gsm-api.h" + +#define INCALL_NUMBER_LENGTH 20 +#define NETMON_SCREEN_LENGTH 60 + +typedef enum { + CS_Idle, + CS_Waiting, + CS_InProgress +} CallState; + +typedef enum { + Event_GetMemoryStatus, + Event_GetMemoryLocation, + Event_GetMemoryLocationAll, + Event_WriteMemoryLocation, + Event_WriteMemoryLocationAll, + Event_GetCalendarNote, + Event_GetCalendarNoteAll, + Event_WriteCalendarNote, + Event_DeleteCalendarNote, + Event_GetCallerGroup, + Event_SendCallerGroup, + Event_GetSMSCenter, + Event_SetSMSCenter, + Event_SendSMSMessage, + Event_DeleteSMSMessage, + Event_GetSpeedDial, + Event_SendSpeedDial, + Event_SendDTMF, + Event_NetMonitorOnOff, + Event_NetMonitor, + Event_DialVoice, + Event_GetAlarm, + Event_SetAlarm, + Event_SendKeyStroke, + Event_GetBitmap, + Event_SetBitmap, + Event_GetNetworkInfo, + Event_Exit +} PhoneAction; + +typedef struct { + PhoneAction event; + gpointer data; +} PhoneEvent; + +typedef struct { + GSM_SpeedDial entry; + GSM_Error status; +} D_SpeedDial; + +typedef struct { + GSM_SMSMessage *sms; + GSM_Error status; +} D_SMSMessage; + +typedef struct { + GSM_MessageCenter *center; + GSM_Error status; +} D_SMSCenter; + +typedef struct { + guchar number; + gchar text[256]; + gint status; +} D_CallerGroup; + +typedef struct { + GSM_DateTime time; + gint status; +} D_Alarm; + +typedef struct { + GSM_MemoryStatus memoryStatus; + gint status; +} D_MemoryStatus; + +typedef struct { + GSM_PhonebookEntry *entry; + gint status; +} D_MemoryLocation; + +typedef struct { + gint min; + gint max; + gint used; + GSM_MemoryType type; + gint status; + gint (*InsertEntry)(GSM_PhonebookEntry *); + gint (*ReadFailed)(gint); +} D_MemoryLocationAll; + +typedef struct { + GSM_CalendarNote *entry; + gint status; +} D_CalendarNote; + +typedef struct { + gint status; + gint (*InsertEntry)(GSM_CalendarNote *); + gint (*ReadFailed)(gint); +} D_CalendarNoteAll; + +typedef struct { + GSM_Error status; + GSM_Bitmap *bitmap; +} D_Bitmap; + +typedef struct { + GSM_Error status; + GSM_NetworkInfo *info; +} D_NetworkInfo; + +typedef struct { + gfloat rfLevel; + gfloat batteryLevel; + GSM_PowerSource powerSource; + gchar *working; + bool alarm; + struct { + gchar *model; + gchar *imei; + gchar *revision; + gchar *version; + } phone; + struct { + gint unRead; + gint number; + gint number2; + GSList *messages; + } sms; + struct { + CallState callInProgress; + gchar callNum[INCALL_NUMBER_LENGTH]; + } call; + struct { + gint number; + gchar screen[NETMON_SCREEN_LENGTH]; + gchar screen3[NETMON_SCREEN_LENGTH]; + gchar screen4[NETMON_SCREEN_LENGTH]; + gchar screen5[NETMON_SCREEN_LENGTH]; + } netmonitor; +} PhoneMonitor; + +extern pthread_t monitor_th; +extern PhoneMonitor phoneMonitor; +extern pthread_mutex_t memoryMutex; +extern pthread_cond_t memoryCond; +extern pthread_mutex_t calendarMutex; +extern pthread_cond_t calendarCond; +extern pthread_mutex_t smsMutex; +extern pthread_mutex_t sendSMSMutex; +extern pthread_cond_t sendSMSCond; +extern pthread_mutex_t callMutex; +extern pthread_mutex_t netMonMutex; +extern pthread_mutex_t speedDialMutex; +extern pthread_cond_t speedDialCond; +extern pthread_mutex_t callerGroupMutex; +extern pthread_cond_t callerGroupCond; +extern pthread_mutex_t smsCenterMutex; +extern pthread_cond_t smsCenterCond; +extern pthread_mutex_t alarmMutex; +extern pthread_cond_t alarmCond; +extern pthread_mutex_t getBitmapMutex; +extern pthread_cond_t getBitmapCond; +extern pthread_mutex_t setBitmapMutex; +extern pthread_cond_t setBitmapCond; +extern pthread_mutex_t getNetworkInfoMutex; +extern pthread_cond_t getNetworkInfoCond; +extern void GUI_InitPhoneMonitor (void); +extern void *GUI_Connect (void *a); +extern void GUI_InsertEvent (PhoneEvent *event); + +extern void RefreshSMS (const gint number); + +#endif diff --git a/xgnokii/xgnokii_netmon.c b/xgnokii/xgnokii_netmon.c new file mode 100644 index 0000000..30a7be0 --- /dev/null +++ b/xgnokii/xgnokii_netmon.c @@ -0,0 +1,579 @@ +/* + + X G N O K I I + + A Linux/Unix GUI for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#ifndef WIN32 +# include +#endif +#include +#include /* for atoi */ +#include +#include +#include "misc.h" +#include "xgnokii_common.h" +#include "xgnokii.h" +#include "xgnokii_lowlevel.h" +#include "xgnokii_netmon.h" +#include "xpm/Display.xpm" + +static GtkWidget *GUI_NetmonWindow; +static DisplayData displayData = {NULL, 0}; +static GtkWidget *tableLabels[4][7]; +static GtkWidget *tableProgress[7]; + + +static inline void Help1 (GtkWidget *w, gpointer data) +{ + gchar *indx = g_strdup_printf ("/%s/gnokii/xgnokii/netmon/index.htm", xgnokiiConfig.locale); + Help (w, indx); + g_free (indx); +} + + +static inline void CloseNetmon (GtkWidget *w, gpointer data) +{ + PhoneEvent *e; + + e = (PhoneEvent *) g_malloc (sizeof (PhoneEvent)); + e->event = Event_NetMonitor; + e->data = (gpointer) 0; + GUI_InsertEvent (e); + gtk_widget_hide (GUI_NetmonWindow); +} + + +static inline void NetmonOnOff (GtkWidget *w, gpointer data) +{ + PhoneEvent *e; + + e = (PhoneEvent *) g_malloc (sizeof (PhoneEvent)); + e->event = Event_NetMonitorOnOff; + e->data = data; + GUI_InsertEvent (e); +} + + +static inline void RefreshDisplay () +{ + static gchar number[3]; + + if (!GTK_WIDGET_VISIBLE(GUI_NetmonWindow)) + return; + + g_snprintf (number, 3, "%.2d", displayData.curDisp); + if (displayData.number) + gtk_label_set_text (GTK_LABEL (displayData.number), number); + + pthread_mutex_lock (&netMonMutex); + if (phoneMonitor.netmonitor.screen && displayData.label) + gtk_label_set_text (GTK_LABEL (displayData.label), + g_strchomp (phoneMonitor.netmonitor.screen)); + pthread_mutex_unlock (&netMonMutex); +} + + +static void SetDisplay (GtkWidget *widget, gpointer data) +{ + PhoneEvent *e; + + e = (PhoneEvent *) g_malloc (sizeof (PhoneEvent)); + e->event = Event_NetMonitor; + e->data = data; + GUI_InsertEvent (e); + displayData.curDisp = GPOINTER_TO_INT (data); + + RefreshDisplay (); +} + +static void ChangedSpinner (GtkWidget *widget, GtkSpinButton *spin) +{ + PhoneEvent *e; + + displayData.curDisp = gtk_spin_button_get_value_as_int (spin); + e = (PhoneEvent *) g_malloc (sizeof (PhoneEvent)); + e->event = Event_NetMonitor; + e->data = (gpointer) displayData.curDisp; + GUI_InsertEvent (e); + + RefreshDisplay (); +} + + +static void ParseScreen (gchar *screen, gint i) +{ + gchar buf[5]; + gchar *ptr = screen; + + if (ptr == NULL || *ptr == '\0') + return; + + strncpy (buf, ptr, 3); + buf[3] = '\0'; + gtk_label_set_text (GTK_LABEL (tableLabels[0][i]), buf); + ptr += 3; + strncpy (buf, ptr, 3); + buf[3] = '\0'; + gtk_label_set_text (GTK_LABEL (tableLabels[2][i]), buf); + ptr += 3; + if (*ptr != '-') + { + buf[0] = '-'; + strncpy (buf + 1, ptr, 3); + buf[4] = '\0'; + } + else + { + strncpy (buf, ptr, 3); + buf[3] = '\0'; + } + gtk_label_set_text (GTK_LABEL (tableLabels[1][i]), buf); + ptr += 3; + gtk_progress_set_value (GTK_PROGRESS (tableProgress[i]), atoi (buf)); + strncpy (buf, ptr, 3); + buf[3] = '\0'; + gtk_label_set_text (GTK_LABEL (tableLabels[3][i]), buf); + ptr += 4; + + if (i == 6) + return; + + i++; + strncpy (buf, ptr, 3); + buf[3] = '\0'; + gtk_label_set_text (GTK_LABEL (tableLabels[0][i]), buf); + ptr += 3; + strncpy (buf, ptr, 3); + buf[3] = '\0'; + gtk_label_set_text (GTK_LABEL (tableLabels[2][i]), buf); + ptr += 3; + if (*ptr != '-') + { + buf[0] = '-'; + strncpy (buf + 1, ptr, 3); + buf[4] = '\0'; + } + else + { + strncpy (buf, ptr, 3); + buf[3] = '\0'; + } + gtk_label_set_text (GTK_LABEL (tableLabels[1][i]), buf); + ptr += 3; + gtk_progress_set_value (GTK_PROGRESS (tableProgress[i]), atoi (buf)); + strncpy (buf, ptr, 3); + buf[3] = '\0'; + gtk_label_set_text (GTK_LABEL (tableLabels[3][i]), buf); + ptr += 4; + + i++; + strncpy (buf, ptr, 3); + buf[3] = '\0'; + gtk_label_set_text (GTK_LABEL (tableLabels[0][i]), buf); + ptr += 3; + strncpy (buf, ptr, 3); + buf[3] = '\0'; + gtk_label_set_text (GTK_LABEL (tableLabels[2][i]), buf); + ptr += 3; + if (*ptr != '-') + { + buf[0] = '-'; + strncpy (buf + 1, ptr, 3); + buf[4] = '\0'; + } + else + { + strncpy (buf, ptr, 3); + buf[3] = '\0'; + } + gtk_label_set_text (GTK_LABEL (tableLabels[1][i]), buf); + ptr += 3; + gtk_progress_set_value (GTK_PROGRESS (tableProgress[i]), atoi (buf)); + strncpy (buf, ptr, 3); + buf[3] = '\0'; + gtk_label_set_text (GTK_LABEL (tableLabels[3][i]), buf); +} + + +void GUI_RefreshNetmon () +{ + if (!GTK_WIDGET_VISIBLE (GUI_NetmonWindow)) + return; + + pthread_mutex_lock (&netMonMutex); + ParseScreen (phoneMonitor.netmonitor.screen3, 0); + ParseScreen (phoneMonitor.netmonitor.screen4, 3); + ParseScreen (phoneMonitor.netmonitor.screen5, 6); + pthread_mutex_unlock (&netMonMutex); + + RefreshDisplay (); +} + + +void AddToBorder (GtkWidget* table, gchar *text, gint i, gint j, gint k, gint l) +{ + GtkWidget *label = gtk_label_new (text); + GtkWidget *frame = gtk_frame_new (NULL); + + gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_OUT); + gtk_container_add (GTK_CONTAINER (frame), label); + gtk_table_attach_defaults (GTK_TABLE (table), frame, i, j, k, l); +} + + +inline void GUI_ShowNetmon () +{ + PhoneEvent *e; + + e = (PhoneEvent *) g_malloc (sizeof (PhoneEvent)); + e->event = Event_NetMonitor; + e->data = (gpointer) displayData.curDisp;; + GUI_InsertEvent (e); + gtk_widget_show (GUI_NetmonWindow); +} + +static GtkItemFactoryEntry menu_items[] = { + { NULL, NULL, NULL, 0, ""}, + { NULL, "W", CloseNetmon, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, NULL, NetmonOnOff, 1, NULL}, + { NULL, NULL, NetmonOnOff, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, NULL, Help1, 0, NULL}, + { NULL, NULL, GUI_ShowAbout, 0, NULL}, +}; + + +static void InitMainMenu (void) +{ + menu_items[0].path = g_strdup (_("/_File")); + menu_items[1].path = g_strdup (_("/File/_Close")); + menu_items[2].path = g_strdup (_("/_Tools")); + menu_items[3].path = g_strdup (_("/Tools/Net monitor o_n")); + menu_items[4].path = g_strdup (_("/Tools/Net monitor o_ff")); + menu_items[5].path = g_strdup (_("/_Help")); + menu_items[6].path = g_strdup (_("/Help/_Help")); + menu_items[7].path = g_strdup (_("/Help/_About")); +} + + +#define DISPLAY_X 12 +#define DISPLAY_Y 15 + +static inline gint ExposeDisplay (GtkWidget *widget, GdkEventExpose *event) +{ + GdkRectangle rec; + GtkRequisition r; + + gtk_widget_size_request (displayData.number, &r); + rec.x = DISPLAY_X; + rec.y = DISPLAY_Y; + rec.width = r.width; + rec.height = r.height; + gtk_widget_draw (displayData.number, &rec); + + gtk_widget_size_request (displayData.label, &r); + rec.x += 3; + rec.y += 12; + rec.width = r.width; + rec.height = r.height; + gtk_widget_draw (displayData.label, &rec); + + return FALSE; +} + + +void GUI_CreateNetmonWindow () +{ + int nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]); + GtkItemFactory *item_factory; + GtkAccelGroup *accel_group; + GtkWidget *menubar; + GtkWidget *main_vbox; + GtkWidget *hbox, *vbox; + GtkWidget *toolbar; + GtkWidget *table; + GtkWidget *display; + GtkWidget *label; + GtkWidget *frame; + GtkWidget *button; + GtkWidget *pixmap; + GtkAdjustment *adj; + gint i,j; + + + InitMainMenu (); + GUI_NetmonWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_window_set_title (GTK_WINDOW (GUI_NetmonWindow), _("Net Monitor")); + //gtk_widget_set_usize (GTK_WIDGET (GUI_NetmonWindow), 436, 220); + gtk_signal_connect (GTK_OBJECT (GUI_NetmonWindow), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + gtk_widget_realize (GUI_NetmonWindow); + + accel_group = gtk_accel_group_new (); + item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "
", + accel_group); + + gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, NULL); + + gtk_accel_group_attach (accel_group, GTK_OBJECT (GUI_NetmonWindow)); + + /* Finally, return the actual menu bar created by the item factory. */ + menubar = gtk_item_factory_get_widget (item_factory, "
"); + + main_vbox = gtk_vbox_new (FALSE, 1); + gtk_container_border_width (GTK_CONTAINER (main_vbox), 1); + gtk_container_add (GTK_CONTAINER (GUI_NetmonWindow), main_vbox); + gtk_widget_show (main_vbox); + + gtk_box_pack_start (GTK_BOX (main_vbox), menubar, FALSE, FALSE, 0); + gtk_widget_show (menubar); + + frame = gtk_frame_new (NULL); + gtk_container_border_width (GTK_CONTAINER (frame), 10); + gtk_widget_show (frame); + + hbox = gtk_hbox_new (FALSE, 0); + gtk_container_border_width (GTK_CONTAINER (hbox), 3); + gtk_container_add (GTK_CONTAINER (frame), hbox); + + gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0); + gtk_widget_show (hbox); + + display = gtk_fixed_new (); + gtk_box_pack_start (GTK_BOX (hbox), display, FALSE, FALSE, 10); + gtk_widget_show (display); + + pixmap = NewPixmap (Display_xpm, GUI_NetmonWindow->window, + &GUI_NetmonWindow->style->bg[GTK_STATE_NORMAL]); + + gtk_signal_connect_after (GTK_OBJECT (pixmap), "expose_event", + (GtkSignalFunc) ExposeDisplay, NULL); + + gtk_fixed_put (GTK_FIXED (display), pixmap, 0 , 0); + gtk_widget_show (pixmap); + + displayData.number = gtk_label_new (""); + gtk_fixed_put (GTK_FIXED (display), displayData.number, DISPLAY_X, DISPLAY_Y); + gtk_widget_show (displayData.number); + displayData.label = gtk_label_new (""); + gtk_fixed_put (GTK_FIXED (display), displayData.label, DISPLAY_X + 3, DISPLAY_Y + 12); + gtk_widget_show (displayData.label); + displayData.curDisp = 0x01; + + vbox = gtk_vbox_new (TRUE, 0); + + /* 1. line */ + toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_TEXT); + gtk_toolbar_set_button_relief (GTK_TOOLBAR (toolbar), GTK_RELIEF_NORMAL); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "1", _("Active cell"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 1); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "2", _("Active cell"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 2); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "3", _("NCELL list I"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 3); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "4", _("NCELL list II"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 4); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "5", _("NCELL list III"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 5); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "6", _("Prefered/Denied networks"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 6); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "7", _("System information bits"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 7); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "10", _("TMSI, Paging, PLU"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 10); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "11", _("Cells info"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 11); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "12", _("DTX, Cipher, Hopping"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 12); + + gtk_box_pack_start (GTK_BOX (vbox), toolbar, FALSE, FALSE, 0); + gtk_widget_show (toolbar); + + /* 2. line */ + toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_TEXT); + gtk_toolbar_set_button_relief (GTK_TOOLBAR (toolbar), GTK_RELIEF_NORMAL); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "13", _("Uplink DTX"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 13); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "17", _("BTS TEST"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 17); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "19", _("CELL BARR-Flag"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 19); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "20", _("Accumulator, Charge status"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 20); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "21", _("?Constant voltage charging display"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 21); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "22", _("?Battery full detection"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 22); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "23", _("Accumulator"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 23); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "35", _("SW-Resets"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 35); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "36", _("Reset-Counter"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 36); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "39", _("Cause codes for last connection abortion"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 39); + + gtk_box_pack_start (GTK_BOX (vbox), toolbar, FALSE, FALSE, 0); + gtk_widget_show (toolbar); + + /* 3. line */ + toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_TEXT); + gtk_toolbar_set_button_relief (GTK_TOOLBAR (toolbar), GTK_RELIEF_NORMAL); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "40", _("Reset handover counters"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 40); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "41", _("Handover Counter"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 41); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "42", _("Handover Counter (Dual)"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 42); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "43", _("L2-Timeouts"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 43); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "51", _("SIM"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 51); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "54", _("?Block display 1"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 54); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "56", NULL, + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 56); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "57", _("Memory status before reset"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 57); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "60", _("Reset Counters"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 60); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "61", _("Counter for PLMN Search and Cell reselection (Singleband)"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 61); + + gtk_box_pack_start (GTK_BOX (vbox), toolbar, FALSE, FALSE, 0); + gtk_widget_show (toolbar); + + /* 4. line */ + toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_TEXT); + gtk_toolbar_set_button_relief (GTK_TOOLBAR (toolbar), GTK_RELIEF_NORMAL); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "62", _("Neighbourhood measurement"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 62); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "63", _("Calls"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 63); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "70", _("Temporary counters of DSP"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 70); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "83", _("Control of task information displays"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 83); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "84", _("Information about task numbers 0-7"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 84); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "85", _("Information about task numbers 8-15"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 85); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "86", _("Information about task numbers 16-23"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 86); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "87", _("Information about OS_SYSTEM_STACK"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 87); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "88", _("Information about current MCU and DSP software versions"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 88); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), "89", _("Hardware version"), + NULL, NULL, (GtkSignalFunc) SetDisplay, (gpointer) 89); + + gtk_box_pack_start (GTK_BOX (vbox), toolbar, FALSE, FALSE, 0); + gtk_widget_show (toolbar); + + gtk_box_pack_start (GTK_BOX (hbox), vbox, FALSE, FALSE, 10); + gtk_widget_show (vbox); + + table = gtk_table_new (6, 8, FALSE); + + frame = gtk_frame_new (NULL); + gtk_container_add (GTK_CONTAINER (frame), table); + gtk_container_border_width (GTK_CONTAINER (frame), 10); + gtk_container_border_width (GTK_CONTAINER (table), 3); + gtk_box_pack_start (GTK_BOX (main_vbox), frame, FALSE, FALSE, 0); + gtk_widget_show (frame); + + AddToBorder (table, "", 0, 1, 0, 1); + AddToBorder (table, _("Chan"), 1, 2, 0, 1); + AddToBorder (table, _("RxLv"), 2, 3, 0, 1); + AddToBorder (table, _("C1"), 3, 4, 0, 1); + AddToBorder (table, _("C2"), 4, 5, 0, 1); + AddToBorder (table, _("ACT"), 0, 1, 1, 2); + AddToBorder (table, _("NC2"), 0, 1, 2, 3); + AddToBorder (table, _("NC3"), 0, 1, 3, 4); + AddToBorder (table, _("NC4"), 0, 1, 4, 5); + AddToBorder (table, _("NC5"), 0, 1, 5, 6); + AddToBorder (table, _("NC6"), 0, 1, 6, 7); + AddToBorder (table, _("NC7"), 0, 1, 7, 8); + + for (i = 0; i < 4; i++) + for (j = 0; j < 7; j++) + { + tableLabels[i][j] = gtk_label_new (""); + frame = gtk_frame_new (NULL); + gtk_frame_set_shadow_type (GTK_FRAME (frame), GTK_SHADOW_IN); + gtk_container_add (GTK_CONTAINER (frame), tableLabels[i][j]); + gtk_table_attach_defaults (GTK_TABLE (table), frame, i + 1, i + 2, j + 1, j + 2); + } + + for (i = 0; i < 7; i++) + { + adj = (GtkAdjustment *) gtk_adjustment_new (-114, -114, -40, 0, 0, 0); + tableProgress[i] = gtk_progress_bar_new_with_adjustment (adj); + gtk_table_attach_defaults (GTK_TABLE (table), tableProgress[i], 5, 6, i + 1, i + 2); + } + + hbox = gtk_hbox_new (FALSE, 0); + gtk_table_attach_defaults (GTK_TABLE (table), hbox, 5, 6, 0, 1); + + adj = (GtkAdjustment *) gtk_adjustment_new (1, 1, 89, 1, 10, 0); + button = gtk_spin_button_new (adj, 0, 0); + gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (button), TRUE); + gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (button), TRUE); + gtk_spin_button_set_shadow_type (GTK_SPIN_BUTTON (button), GTK_SHADOW_OUT); + gtk_signal_connect (GTK_OBJECT (adj), "value_changed", + GTK_SIGNAL_FUNC (ChangedSpinner), (gpointer) button); + gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0); + + label = gtk_label_new (_("Page:")); + gtk_box_pack_end (GTK_BOX (hbox), label, FALSE, FALSE, 5); + + gtk_table_set_col_spacing (GTK_TABLE (table), 4, 10); + gtk_widget_show_all (table); + GUIEventAdd (GUI_EVENT_NETMON_CHANGED, GUI_RefreshNetmon); +} diff --git a/xgnokii/xgnokii_netmon.h b/xgnokii/xgnokii_netmon.h new file mode 100644 index 0000000..c226f13 --- /dev/null +++ b/xgnokii/xgnokii_netmon.h @@ -0,0 +1,28 @@ +/* + + X G N O K I I + + A Linux/Unix GUI for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#ifndef XGNOKII_NETMON_H +#define XGNOKII_NETMON_H + +#include + +typedef struct { + GtkWidget *number; + GtkWidget *label; + gint curDisp; +} DisplayData; + +extern void GUI_CreateNetmonWindow (); + +extern void GUI_ShowNetmon (); + +extern void GUI_RefreshNetmon (); + +#endif diff --git a/xgnokii/xgnokii_sms.c b/xgnokii/xgnokii_sms.c new file mode 100644 index 0000000..a9726b9 --- /dev/null +++ b/xgnokii/xgnokii_sms.c @@ -0,0 +1,1662 @@ +/* + + X G N O K I I + + A Linux/Unix GUI for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "misc.h" +#include "gsm-api.h" +#include "gsm-datetime.h" +#include "gsm-sms.h" +#include "xgnokii_common.h" +#include "xgnokii.h" +#include "xgnokii_lowlevel.h" +#include "xgnokii_contacts.h" +#include "xgnokii_sms.h" +#include "xpm/Edit.xpm" +#include "xpm/Delete.xpm" +#include "xpm/Forward.xpm" +#include "xpm/Reply.xpm" +#include "xpm/Send.xpm" +#include "xpm/SendSMS.xpm" +#include "xpm/Check.xpm" +#include "xpm/Names.xpm" +#include "xpm/BCard.xpm" +#include "xpm/quest.xpm" + +typedef struct { + gint count; // Messages count + gint number; // Number of tail in Long SMS; + gint *msgPtr; // Array of MessageNumber; + gint validity; + gint class; + gchar sender[GSM_MAX_SENDER_LENGTH + 1]; +} MessagePointers; + +typedef struct { + gchar *number; + gchar *name; + gint used:1; +} AddressPar; + +typedef struct { + GtkWidget *smsClist; + GtkWidget *smsText; + GSList *messages; + GdkColor colour; + gint row_i; + gint currentBox; +} SMSWidget; + +typedef struct { + GtkWidget *SMSSendWindow; + GtkWidget *smsSendText; + GtkWidget *addr; + GtkWidget *status; + GtkWidget *report; + GtkWidget *longSMS; + GtkWidget *class; + GtkWidget *smscOptionMenu; + GtkTooltips *addrTip; + gint center; + GSList *addressLine; +} SendSMSWidget; + +int prev_num_of_folders=0; + +static GtkWidget *GUI_SMSWindow; +static SMSWidget SMS = {NULL, NULL, NULL}; +static SendSMSWidget sendSMS = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, NULL}; +static ErrorDialog errorDialog = {NULL, NULL}; +static InfoDialog infoDialog = {NULL, NULL}; +static QuestMark questMark; +static GtkWidget *treeFolderItem[MAX_SMS_FOLDERS], *subTree; + +static inline void Help1 (GtkWidget *w, gpointer data) +{ + gchar *indx = g_strdup_printf ("/%s/gnokii/xgnokii/sms/index.htm", xgnokiiConfig.locale); + Help (w, indx); + g_free (indx); +} + + +static inline void Help2 (GtkWidget *w, gpointer data) +{ + gchar *indx = g_strdup_printf ("/help/%s/sms_send.html", xgnokiiConfig.locale); + Help (w, indx); + g_free (indx); +} + + +static inline void CloseSMS (GtkWidget *w, gpointer data) +{ + gtk_widget_hide (GUI_SMSWindow); +} + + +static inline void CloseSMSSend (GtkWidget *w, gpointer data) +{ + gtk_widget_hide (sendSMS.SMSSendWindow); +} + + +static gint CListCompareFunc (GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2) +{ + gchar *text1 = NULL; + gchar *text2 = NULL; + + GtkCListRow *row1 = (GtkCListRow *) ptr1; + GtkCListRow *row2 = (GtkCListRow *) ptr2; + + switch (row1->cell[clist->sort_column].type) + { + case GTK_CELL_TEXT: + text1 = GTK_CELL_TEXT (row1->cell[clist->sort_column])->text; + break; + case GTK_CELL_PIXTEXT: + text1 = GTK_CELL_PIXTEXT (row1->cell[clist->sort_column])->text; + break; + default: + break; + } + switch (row2->cell[clist->sort_column].type) + { + case GTK_CELL_TEXT: + text2 = GTK_CELL_TEXT (row2->cell[clist->sort_column])->text; + break; + case GTK_CELL_PIXTEXT: + text2 = GTK_CELL_PIXTEXT (row2->cell[clist->sort_column])->text; + break; + default: + break; + } + + if (!text2) + return (text1 != NULL); + + if (!text1) + return -1; + + if (clist->sort_column == 1 && !SMS.currentBox) + { + struct tm bdTime; + time_t time1, time2; + + bdTime.tm_sec = atoi (text1 + 15); + bdTime.tm_min = atoi (text1 + 12); + bdTime.tm_hour = atoi (text1 + 9); + bdTime.tm_mday = atoi (text1); + bdTime.tm_mon = atoi (text1 + 3) - 1; + bdTime.tm_year = atoi (text1 + 6); + if (bdTime.tm_year < 70) + bdTime.tm_year += 100; +#ifdef HAVE_TM_GMTON + if (text1[17] != '\0') + bdTime.tm_gmtoff = atoi (text1 + 18) * 3600; +#endif + bdTime.tm_isdst = -1; + + time1 = mktime (&bdTime); + + bdTime.tm_sec = atoi (text2 + 15); + bdTime.tm_min = atoi (text2 + 12); + bdTime.tm_hour = atoi (text2 + 9); + bdTime.tm_mday = atoi (text2); + bdTime.tm_mon = atoi (text2 + 3) - 1; + bdTime.tm_year = atoi (text2 + 6); + if (bdTime.tm_year < 70) + bdTime.tm_year += 100; +#ifdef HAVE_TM_GMTON + if (text2[17] != '\0') + bdTime.tm_gmtoff = atoi (text2 + 18) * 3600; +#endif + bdTime.tm_isdst = -1; + + time2 = mktime (&bdTime); + + if (time1 < time2) + return (1); + else if (time1 > time2) + return (-1); + else + return 0; + } + + return (g_strcasecmp (text1, text2)); +} + + +static inline void DestroyMsgPtrs (gpointer data) +{ + g_free (((MessagePointers *) data)->msgPtr); + g_free ((MessagePointers *) data); +} + + +static void InsertFolderElement (gpointer d, gpointer userData) +{ + GSM_SMSMessage *data = (GSM_SMSMessage *) d; + MessagePointers *msgPtrs; + GSM_DateTime *dt; + + if (data->folder == SMS.currentBox) + { + gchar *row[4]; + + if (data->Type == GST_DR) + { + row[0] = g_strdup (_("report")); + dt = &(data->SMSCTime); + } + else + { + dt = &(data->Time); + switch (data->Status) + { + case GSS_SENTREAD: + if (data->folder==0) //GST_INBOX + row[0] = g_strdup (_("read")); + else + row[0] = g_strdup (_("sent")); + break; + case GSS_NOTSENTREAD: + if (data->folder==0) //GST_INBOX + row[0] = g_strdup (_("unread")); + else + row[0] = g_strdup (_("not sent")); + break; + case GSS_UNKNOWN: + row[0] = g_strdup (_("not known :-(")); + break; + case GSS_TEMPLATE: + row[0] = g_strdup (_("template")); + break; + default: + row[0] = g_strdup (_("unknown")); + break; + } + } + + if (data->SMSData) { + if (dt->Timezone) + row[1] = g_strdup_printf ("%s %02d/%02d/%02d %02d:%02d:%02d %c%02d00", + DayOfWeek(dt->Year, dt->Month, dt->Day), + dt->Day, dt->Month, dt->Year, + dt->Hour, dt->Minute, dt->Second, + dt->Timezone > 0 ? '+' : '-', abs (dt->Timezone)); + else + row[1] = g_strdup_printf ("%s %02d/%02d/%02d %02d:%02d:%02d", + DayOfWeek(dt->Year, dt->Month, dt->Day), + dt->Day, dt->Month, dt->Year, + dt->Hour, dt->Minute, dt->Second); + } else { + row[1] = g_strdup_printf ("unknown"); + } + + row[2] = GUI_GetName (data->Sender); + if (row[2] == NULL || row[2][0]==0) row[2] = data->Sender; + + row[3] = data->MessageText; + + msgPtrs = (MessagePointers *) g_malloc (sizeof (MessagePointers)); + msgPtrs->validity = data->Validity; + msgPtrs->class = data->Class; + strcpy (msgPtrs->sender, data->Sender); + +// if (data->UDHType == GSM_ConcatenatedMessages) +// { +// msgPtrs->count = data->UDH[5]; +// msgPtrs->number = data->UDH[4]; +// msgPtrs->msgPtr = (gint *) g_malloc (msgPtrs->count * sizeof (gint)); +// *(msgPtrs->msgPtr + msgPtrs->number - 1) = data->MessageNumber; +// } else { + msgPtrs->count = msgPtrs->number = 1; + msgPtrs->msgPtr = (gint *) g_malloc (sizeof (gint)); + *(msgPtrs->msgPtr) = data->MessageNumber; + + gtk_clist_append (GTK_CLIST (SMS.smsClist), row); + gtk_clist_set_row_data_full (GTK_CLIST (SMS.smsClist), SMS.row_i++, + msgPtrs, DestroyMsgPtrs); +// } + + g_free (row[0]); + g_free (row[1]); + } +} + +static inline void RefreshFolder (void) +{ + gtk_clist_freeze (GTK_CLIST (SMS.smsClist)); + + gtk_clist_clear (GTK_CLIST (SMS.smsClist)); + + SMS.row_i = 0; + g_slist_foreach (phoneMonitor.sms.messages, InsertFolderElement, (gpointer) NULL); + + gtk_clist_sort (GTK_CLIST (SMS.smsClist)); + gtk_clist_thaw (GTK_CLIST (SMS.smsClist)); +} + + +inline void GUI_RefreshMessageWindow (void) +{ + if (!GTK_WIDGET_VISIBLE (GUI_SMSWindow)) + return; + + RefreshFolder(); +} + + +static void SelectTreeItem (GtkWidget *item, gpointer data) +{ + SMS.currentBox = GPOINTER_TO_INT (data); + GUI_RefreshMessageWindow (); +} + + +static void ClickEntry (GtkWidget *clist, + gint row, + gint column, + GdkEventButton *event, + gpointer data ) +{ + gchar *buf; + + /* FIXME - We must mark SMS as readed */ + gtk_text_freeze (GTK_TEXT (SMS.smsText)); + + gtk_text_set_point (GTK_TEXT (SMS.smsText), 0); + gtk_text_forward_delete (GTK_TEXT (SMS.smsText), gtk_text_get_length (GTK_TEXT (SMS.smsText))); + + gtk_text_insert (GTK_TEXT (SMS.smsText), NULL, &(SMS.colour), NULL, + _("From: "), -1); + gtk_clist_get_text (GTK_CLIST (clist), row, 2, &buf); + gtk_text_insert (GTK_TEXT (SMS.smsText), NULL, &(SMS.smsText->style->black), NULL, + buf, -1); + gtk_text_insert (GTK_TEXT (SMS.smsText), NULL, &(SMS.smsText->style->black), NULL, + "\n", -1); + + gtk_text_insert (GTK_TEXT (SMS.smsText), NULL, &(SMS.colour), NULL, + _("Date: "), -1); + gtk_clist_get_text (GTK_CLIST (clist), row, 1, &buf); + gtk_text_insert (GTK_TEXT (SMS.smsText), NULL, &(SMS.smsText->style->black), NULL, + buf, -1); + gtk_text_insert (GTK_TEXT (SMS.smsText), NULL, &(SMS.smsText->style->black), NULL, + "\n\n", -1); + + gtk_clist_get_text (GTK_CLIST (clist), row, 3, &buf); + gtk_text_insert (GTK_TEXT (SMS.smsText), NULL, &(SMS.smsText->style->black), NULL, + buf, -1); + + gtk_text_thaw (GTK_TEXT (SMS.smsText)); +} + + +inline void GUI_ShowSMS (void) +{ + int i,j; + + GUI_InitSMSFoldersInf(); + + for (i=1;iprev_num_of_folders) { + treeFolderItem[i-1] = gtk_tree_item_new_with_label (_(folders.Folder[i-1].Name)); + gtk_tree_append (GTK_TREE (subTree), treeFolderItem[i-1]); + gtk_signal_connect (GTK_OBJECT (treeFolderItem[i-1]), "select", + GTK_SIGNAL_FUNC (SelectTreeItem), GINT_TO_POINTER (i-1)); + gtk_widget_show (treeFolderItem[i-1]); + } else { + gtk_widget_set_name(treeFolderItem[i-1],_(folders.Folder[i-1].Name)); + } + } + + for (j=i+1;jselection; + + gtk_clist_freeze (GTK_CLIST (SMS.smsClist)); + + while (sel != NULL) + { + row = GPOINTER_TO_INT (sel->data); + sel = sel->next; + for (count = 0; count < ((MessagePointers *) gtk_clist_get_row_data (GTK_CLIST (SMS.smsClist), row))->count; count++) + { + message = (GSM_SMSMessage *) g_malloc (sizeof (GSM_SMSMessage)); + message->Location = *(((MessagePointers *) gtk_clist_get_row_data (GTK_CLIST (SMS.smsClist), row))->msgPtr + count); + if (message->Location == -1) + { + g_free (message); + continue; + } + message->MemoryType = GMT_SM; + + e = (PhoneEvent *) g_malloc (sizeof (PhoneEvent)); + e->event = Event_DeleteSMSMessage; + e->data = message; + GUI_InsertEvent (e); + +/* error = GSM->DeleteSMSMessage(&message); + + if (error != GE_NONE) + { + if (error == GE_NOTIMPLEMENTED) + { + gtk_label_set_text(GTK_LABEL(errorDialog.text), _("Function not implemented!")); + gtk_widget_show(errorDialog.dialog); + } + else + { + gtk_label_set_text(GTK_LABEL(errorDialog.text), _("Delete SMS failed!")); + gtk_widget_show(errorDialog.dialog); + } + } +*/ + } + } + + gtk_widget_hide (GTK_WIDGET (data)); + + gtk_clist_thaw (GTK_CLIST (SMS.smsClist)); +} + +static void ReadFromPhone (void) +{ + GSM_SMSStatus SMSStatus; + + SMSStatus.UnRead = 0; + SMSStatus.Number = 0; + + if (GSM->GetSMSStatus (&SMSStatus) == GE_NONE) { + if (phoneMonitor.sms.unRead != SMSStatus.UnRead || + phoneMonitor.sms.number2 != SMSStatus.Number) + { + phoneMonitor.working = _("Refreshing SMSes..."); +#ifdef XDEBUG + printf("Refreshing %d SMSes...\n",SMSStatus.Number); +#endif + RefreshSMS (SMSStatus.Number); + phoneMonitor.working = NULL; + } + + phoneMonitor.sms.unRead = SMSStatus.UnRead; + } +} + +static void DeleteSMS (void) +{ + static GtkWidget *dialog = NULL; + GtkWidget *button, *hbox, *label, *pixmap; + + if (dialog == NULL) + { + dialog = gtk_dialog_new(); + gtk_window_set_title (GTK_WINDOW (dialog), _("Delete SMS")); + gtk_window_position (GTK_WINDOW (dialog), GTK_WIN_POS_MOUSE); + gtk_window_set_modal(GTK_WINDOW (dialog), TRUE); + gtk_container_set_border_width (GTK_CONTAINER (dialog), 10); + gtk_signal_connect (GTK_OBJECT (dialog), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + + button = gtk_button_new_with_label (_("Ok")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), + button, TRUE, TRUE, 10); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (OkDeleteSMSDialog), (gpointer) dialog); + GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); + gtk_widget_grab_default (button); + gtk_widget_show (button); + button = gtk_button_new_with_label (_("Cancel")); + gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dialog)->action_area), + button, TRUE, TRUE, 10); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (CancelDialog), (gpointer) dialog); + gtk_widget_show (button); + + gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), 5); + + hbox = gtk_hbox_new (FALSE, 0); + gtk_container_add (GTK_CONTAINER (GTK_DIALOG (dialog)->vbox), hbox); + gtk_widget_show (hbox); + + pixmap = gtk_pixmap_new (questMark.pixmap, questMark.mask); + gtk_box_pack_start (GTK_BOX (hbox), pixmap, FALSE, FALSE, 10); + gtk_widget_show (pixmap); + + label = gtk_label_new (_("Do you want to delete selected SMS?")); + gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 10); + gtk_widget_show (label); + } + + gtk_widget_show (GTK_WIDGET (dialog)); +} + + +static void SaveToMailbox (void) +{ + gchar buf[255]; + FILE *f; + gint fd; + GList *sel; + struct tm t, *loctime; + struct flock lock; + time_t caltime; + gint row; + gchar *number, *text, *loc; + + + if ((f = fopen (xgnokiiConfig.mailbox, "a")) == NULL) + { + snprintf (buf, 255, _("Cannot open mailbox %s for appending!"), xgnokiiConfig.mailbox); + gtk_label_set_text (GTK_LABEL (errorDialog.text), buf); + gtk_widget_show (errorDialog.dialog); + return; + } + + fd = fileno (f); + lock.l_type = F_WRLCK; + lock.l_whence = SEEK_SET; + lock.l_start = 0; + lock.l_len = 0; + + if (fcntl (fd, F_GETLK, &lock) != -1 && lock.l_type != F_UNLCK) + { + snprintf (buf, 255, _("Cannot save to mailbox %s.\n\ +%s is locked for process %d!"), xgnokiiConfig.mailbox, xgnokiiConfig.mailbox, + lock.l_pid); + gtk_label_set_text (GTK_LABEL (errorDialog.text), buf); + gtk_widget_show (errorDialog.dialog); + fclose (f); + return; + } + + lock.l_type = F_WRLCK; + lock.l_whence = SEEK_SET; + lock.l_start = 0; + lock.l_len = 0; + if (fcntl (fd, F_SETLK, &lock) == -1) + { + snprintf (buf, 255, _("Cannot lock mailbox %s!"), xgnokiiConfig.mailbox); + gtk_label_set_text (GTK_LABEL (errorDialog.text), buf); + gtk_widget_show (errorDialog.dialog); + fclose (f); + return; + } + + sel = GTK_CLIST (SMS.smsClist)->selection; + + while (sel != NULL) + { + row = GPOINTER_TO_INT (sel->data); + sel = sel->next; + gtk_clist_get_text (GTK_CLIST (SMS.smsClist), row, 1, &text); + t.tm_sec = atoi (text + 15); + t.tm_min = atoi (text + 12); + t.tm_hour = atoi (text + 9); + t.tm_mday = atoi (text); + t.tm_mon = atoi (text + 3) - 1; + t.tm_year = atoi (text + 6); + if (t.tm_year < 70) + t.tm_year += 100; +#ifdef HAVE_TM_GMTON + if (text[17] != '\0') + t.tm_gmtoff = atoi (text + 18) * 3600; +#endif + + caltime = mktime (&t); + loctime = localtime (&caltime); + + gtk_clist_get_text (GTK_CLIST (SMS.smsClist), row, 2, &number); + gtk_clist_get_text (GTK_CLIST (SMS.smsClist), row, 3, &text); + + fprintf (f, "From %s@xgnokii %s", number, asctime (loctime)); + loc = setlocale (LC_ALL, "C"); + strftime (buf, 255, "Date: %a, %d %b %Y %H:%M:%S %z (%Z)\n", loctime); + setlocale (LC_ALL, loc); + fprintf (f, "%s", buf); + fprintf (f, "From: %s@xgnokii\n", number); + strncpy (buf, text, 20); + buf[20] = '\0'; + fprintf (f, "Subject: %s\n\n", buf); + fprintf (f, "%s\n\n", text); + } + + lock.l_type = F_UNLCK; + lock.l_whence = SEEK_SET; + lock.l_start = 0; + lock.l_len = 0; + if (fcntl (fd, F_SETLK, &lock) == -1) + { + snprintf (buf, 255, _("Cannot unlock mailbox %s!"), xgnokiiConfig.mailbox); + gtk_label_set_text (GTK_LABEL (errorDialog.text), buf); + gtk_widget_show (errorDialog.dialog); + } + + fclose (f); +} + + +static inline void RefreshSMSStatus (void) +{ + gchar *buf; + guint l, m; + + l = gtk_text_get_length (GTK_TEXT (sendSMS.smsSendText)); + + if (l <= GSM_MAX_SMS_LENGTH) + buf = g_strdup_printf ("%d/1", l); + else + { + m = l % 153; + buf = g_strdup_printf ("%d/%d", l > 0 && !m ? 153 : m, l == 0 ? 1 : ((l - 1) / 153) + 1); + } + + gtk_frame_set_label (GTK_FRAME (sendSMS.status), buf); + g_free (buf); +} + + +static inline gint RefreshSMSLength (GtkWidget *widget, + GdkEventKey *event, + gpointer callback_data) +{ + RefreshSMSStatus (); + if (GTK_EDITABLE (widget)->editable == FALSE) + return (FALSE); + if (event->keyval == GDK_BackSpace || event->keyval == GDK_Clear || + event->keyval == GDK_Insert || event->keyval == GDK_Delete || + event->keyval == GDK_Home || event->keyval == GDK_End || + event->keyval == GDK_Left || event->keyval == GDK_Right || + event->keyval == GDK_Up || event->keyval == GDK_Down || + event->keyval == GDK_Return || + (event->keyval >= 0x20 && event->keyval <= 0xFF)) + return (TRUE); + + return (FALSE); +} + + +static inline void SetActiveCenter (GtkWidget *item, gpointer data) +{ + sendSMS.center = GPOINTER_TO_INT (data); +} + + +void GUI_RefreshSMSCenterMenu (void) +{ + static GtkWidget *smscMenu = NULL; + GtkWidget *item; + register gint i; + + if (!sendSMS.smscOptionMenu) + return; + + if (smscMenu) + { + gtk_option_menu_remove_menu (GTK_OPTION_MENU (sendSMS.smscOptionMenu)); + if (GTK_IS_WIDGET (smscMenu)) + gtk_widget_destroy (GTK_WIDGET (smscMenu)); + smscMenu = NULL; + } + + smscMenu = gtk_menu_new(); + + for (i = 0; i < xgnokiiConfig.smsSets; i++) + { + if (*(xgnokiiConfig.smsSetting[i].Name) == '\0') + { + gchar *buf = g_strdup_printf (_("Set %d"), i + 1); + item = gtk_menu_item_new_with_label (buf); + g_free (buf); + } + else + item = gtk_menu_item_new_with_label (xgnokiiConfig.smsSetting[i].Name); + + gtk_signal_connect (GTK_OBJECT (item), "activate", + GTK_SIGNAL_FUNC (SetActiveCenter), + (gpointer) i); + + gtk_widget_show (item); + gtk_menu_append (GTK_MENU (smscMenu), item); + } + gtk_option_menu_set_menu (GTK_OPTION_MENU (sendSMS.smscOptionMenu), smscMenu); +} + + +static inline void InitAddressLine (gpointer d, gpointer userData) +{ + ((AddressPar *) d)->used = 0; +} + + +#ifdef XDEBUG +static inline void PrintAddressLine (gpointer d, gpointer userData) +{ + g_print ("Name: %s\nNumber: %s\nUsed: %d\n", + ((AddressPar *) d)->name, + ((AddressPar *) d)->number, + ((AddressPar *) d)->used); +} +#endif + + +static inline gint CompareAddressLineName (gconstpointer a, gconstpointer b) +{ + return strcmp (((AddressPar *) a)->name, ((AddressPar *) b)->name); +} + + +static inline gint CompareAddressLineUsed (gconstpointer a, gconstpointer b) +{ + return !(((AddressPar *) a)->used == ((AddressPar *) b)->used); +} + + +static gint CheckAddressMain (void) +{ + AddressPar aps; + GSList *r; + register gint i = 0; + gint ret = 0; + gchar *buf; + GString *tooltipBuf; + gchar **strings = g_strsplit (gtk_entry_get_text (GTK_ENTRY (sendSMS.addr)), ",", 0); + + tooltipBuf = g_string_new (""); + gtk_entry_set_text (GTK_ENTRY (sendSMS.addr), ""); + g_slist_foreach (sendSMS.addressLine, InitAddressLine, (gpointer) NULL); + + while (strings[i]) + { + g_strstrip (strings[i]); + if (*strings[i] == '\0') + { + i++; + continue; + } + if ((buf = GUI_GetName (strings[i])) != NULL) + { + AddressPar *ap = g_malloc (sizeof (AddressPar)); + ap->number = g_strdup (strings[i]); + ap->name = g_strdup (buf); + ap->used = 1; + sendSMS.addressLine = g_slist_append (sendSMS.addressLine, ap); + gtk_entry_append_text (GTK_ENTRY (sendSMS.addr), buf); + g_string_append (tooltipBuf, ap->number); + } + else + if ((buf = GUI_GetNumber (strings[i])) != NULL) + { + aps.name = strings[i]; + r = g_slist_find_custom (sendSMS.addressLine, &aps, CompareAddressLineName); + if (r) + { + ((AddressPar *) r->data)->used = 1; + g_string_append (tooltipBuf, ((AddressPar *) r->data)->number); + } + else + g_string_append (tooltipBuf, buf); + gtk_entry_append_text (GTK_ENTRY (sendSMS.addr), strings[i]); + } + else + { + gint len = strlen (strings[i]); + gint j; + + for (j = 0; j < len; j++) + if (strings[i][j] != '*' && strings[i][j] != '#' && strings[i][j] != '+' + && (strings[i][j] < '0' || strings[i][j] > '9')) + ret = 1; + gtk_entry_append_text (GTK_ENTRY (sendSMS.addr), strings[i]); + g_string_append (tooltipBuf, strings[i]); + } + if (strings[i + 1] != NULL) + { + gtk_entry_append_text (GTK_ENTRY (sendSMS.addr), ", "); + g_string_append (tooltipBuf, ", "); + } + i++; + } + + aps.used = 0; + while ((r = g_slist_find_custom (sendSMS.addressLine, &aps, CompareAddressLineUsed))) + sendSMS.addressLine = g_slist_remove (sendSMS.addressLine, r->data); + + if (tooltipBuf->len > 0) + { + gtk_tooltips_set_tip (sendSMS.addrTip, sendSMS.addr, tooltipBuf->str, NULL); + gtk_tooltips_enable (sendSMS.addrTip); + } + else + gtk_tooltips_disable (sendSMS.addrTip); + +#ifdef XDEBUG + g_slist_foreach (sendSMS.addressLine, PrintAddressLine, (gpointer) NULL); +#endif + + g_strfreev (strings); + g_string_free (tooltipBuf, TRUE); + + return ret; +} + + +static inline void CheckAddress (void) +{ + if (CheckAddressMain ()) + { + gtk_label_set_text(GTK_LABEL(errorDialog.text), _("Address line contains illegal address!")); + gtk_widget_show(errorDialog.dialog); + } +} + + +static void DeleteSelectContactDialog (GtkWidget *widget, GdkEvent *event, + SelectContactData *data) +{ + gtk_widget_destroy (GTK_WIDGET (data->clist)); + gtk_widget_destroy (GTK_WIDGET (data->clistScrolledWindow)); + gtk_widget_destroy (GTK_WIDGET (widget)); +} + + +static void CancelSelectContactDialog (GtkWidget *widget, + SelectContactData *data) +{ + gtk_widget_destroy (GTK_WIDGET (data->clist)); + gtk_widget_destroy (GTK_WIDGET (data->clistScrolledWindow)); + gtk_widget_destroy (GTK_WIDGET (data->dialog)); +} + + +static void OkSelectContactDialog (GtkWidget *widget, + SelectContactData *data) +{ + GList *sel; + PhonebookEntry *pbEntry; + + if ((sel = GTK_CLIST (data->clist)->selection) != NULL) + while (sel != NULL) + { + AddressPar *ap = g_malloc (sizeof (AddressPar)); + + pbEntry = gtk_clist_get_row_data (GTK_CLIST (data->clist), + GPOINTER_TO_INT (sel->data)); + ap->number = g_strdup (pbEntry->entry.Number); + ap->name = g_strdup (pbEntry->entry.Name); + ap->used = 1; + sendSMS.addressLine = g_slist_append (sendSMS.addressLine, ap); + if (strlen (gtk_entry_get_text (GTK_ENTRY (sendSMS.addr))) > 0) + gtk_entry_append_text (GTK_ENTRY (sendSMS.addr), ", "); + gtk_entry_append_text (GTK_ENTRY (sendSMS.addr), ap->name); + + sel = sel->next; + } + + gtk_widget_destroy (GTK_WIDGET (data->clist)); + gtk_widget_destroy (GTK_WIDGET (data->clistScrolledWindow)); + gtk_widget_destroy (GTK_WIDGET (data->dialog)); + + CheckAddressMain (); +} + + +static void ShowSelectContactsDialog (void) +{ + SelectContactData *r; + + if (!GUI_ContactsIsIntialized ()) + GUI_ReadContacts (); + + if ((r = GUI_SelectContactDialog ()) == NULL) + return; + + gtk_signal_connect (GTK_OBJECT (r->dialog), "delete_event", + GTK_SIGNAL_FUNC (DeleteSelectContactDialog), (gpointer) r); + + gtk_signal_connect (GTK_OBJECT (r->okButton), "clicked", + GTK_SIGNAL_FUNC (OkSelectContactDialog), (gpointer) r); + gtk_signal_connect (GTK_OBJECT (r->cancelButton), "clicked", + GTK_SIGNAL_FUNC (CancelSelectContactDialog), (gpointer) r); +} + + +static gint SendSMSCore (GSM_SMSMessage *sms) +{ + GSM_Error error; + PhoneEvent *e = (PhoneEvent *) g_malloc (sizeof (PhoneEvent)); + D_SMSMessage *m = (D_SMSMessage *) g_malloc (sizeof (D_SMSMessage)); + + m->sms = sms; + e->event = Event_SendSMSMessage; + e->data = m; + GUI_InsertEvent (e); + pthread_mutex_lock (&sendSMSMutex); + pthread_cond_wait (&sendSMSCond, &sendSMSMutex); + pthread_mutex_unlock (&sendSMSMutex); + +#ifdef XDEBUG + g_print ("Address: %s\nText: %s\nDelivery report: %d\nSMS Center: %d\n", + sms->Destination, + sms->MessageText, + GTK_TOGGLE_BUTTON (sendSMS.report)->active, + sendSMS.center); +#endif + + error = m->status; + g_free (m); + + if (error != GE_SMSSENDOK) + { + gchar *buf = g_strdup_printf (_("SMS send to %s failed\n(error=%d)"), + sms->Destination, error); + gtk_label_set_text (GTK_LABEL(errorDialog.text), buf); + gtk_widget_show (errorDialog.dialog); + g_free (buf); + } + else + g_print ("Message sent to: %s\n", sms->Destination); + + return (error); +} + + +static void SendSMS (void) +{ + GSM_UDH UDHType; + GSM_MultiSMSMessage Multisms; + int chars_read; + AddressPar aps; + GSList *r; + gchar *text, *number; + gchar **addresses; + gchar *buf; + gint l; + gint longSMS; + register gint i = 0, j; + + if (CheckAddressMain ()) + { + gtk_label_set_text(GTK_LABEL(errorDialog.text), _("Address line contains illegal address!")); + gtk_widget_show(errorDialog.dialog); + return; + } + + text = gtk_editable_get_chars (GTK_EDITABLE (sendSMS.smsSendText), 0, -1); + l = strlen (text); + + addresses = g_strsplit (gtk_entry_get_text (GTK_ENTRY (sendSMS.addr)), ",", 0); + + longSMS = GTK_TOGGLE_BUTTON (sendSMS.longSMS)->active; + + while (addresses[i]) + { + g_strstrip (addresses[i]); + if ((number = GUI_GetNumber (addresses[i]))) + { + aps.name = addresses[i]; + if ((r = g_slist_find_custom (sendSMS.addressLine, &aps, CompareAddressLineName))) + number = ((AddressPar *) r->data)->number; + } + else + number = addresses[i]; + + chars_read=strlen(text); + UDHType = GSM_NoUDH; + if (l > GSM_MAX_SMS_LENGTH && longSMS) UDHType = GSM_ConcatenatedMessages; + if (UDHType == GSM_NoUDH && chars_read>160) chars_read=160; + + GSM_MakeMultiPartSMS2(&Multisms,text,chars_read,UDHType,GSM_Coding_Default); + + for (j=0;jactive) Multisms.SMS[j].Type = GST_DR; + + if (GTK_TOGGLE_BUTTON (sendSMS.class)->active) Multisms.SMS[j].Class = 0; + + Multisms.SMS[j].Validity = Multisms.SMS[j].MessageCenter.Validity; + + strncpy (Multisms.SMS[j].Destination, number, GSM_MAX_DESTINATION_LENGTH + 1); + Multisms.SMS[j].Destination[GSM_MAX_DESTINATION_LENGTH] = '\0'; + + buf = g_strdup_printf (_("Sending SMS to %s (%d/%d) ...\n"), + Multisms.SMS[j].Destination, j + 1, Multisms.number); + gtk_label_set_text (GTK_LABEL (infoDialog.text), buf); + gtk_widget_show_now (infoDialog.dialog); + g_free (buf); + GUI_Refresh (); + + if (SendSMSCore (&Multisms.SMS[j]) != GE_SMSSENDOK) + { + gtk_widget_hide (infoDialog.dialog); + GUI_Refresh (); + break; + } + + gtk_widget_hide (infoDialog.dialog); + GUI_Refresh (); + + sleep (1); + } + + i++; + } + + g_strfreev (addresses); + + g_free (text); +} + + +static GtkItemFactoryEntry send_menu_items[] = { + { NULL, NULL, NULL, 0, ""}, + { NULL, "X", SendSMS, 0, NULL}, + { NULL, "S", NULL, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "N", CheckAddress, 0, NULL}, + { NULL, "C", ShowSelectContactsDialog, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "W", CloseSMSSend, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, NULL, Help2, 0, NULL}, + { NULL, NULL, GUI_ShowAbout, 0, NULL}, +}; + + +static void InitSendMenu (void) +{ + send_menu_items[0].path = g_strdup (_("/_File")); + send_menu_items[1].path = g_strdup (_("/File/Sen_d")); + send_menu_items[2].path = g_strdup (_("/File/_Save")); + send_menu_items[3].path = g_strdup (_("/File/Sep1")); + send_menu_items[4].path = g_strdup (_("/File/Check _Names")); + send_menu_items[5].path = g_strdup (_("/File/C_ontacts")); + send_menu_items[6].path = g_strdup (_("/File/Sep2")); + send_menu_items[7].path = g_strdup (_("/File/_Close")); + send_menu_items[8].path = g_strdup (_("/_Help")); + send_menu_items[9].path = g_strdup (_("/Help/_Help")); + send_menu_items[10].path = g_strdup (_("/Help/_About")); +} + + +static void CreateSMSSendWindow (void) +{ + int nmenu_items = sizeof (send_menu_items) / sizeof (send_menu_items[0]); + GtkItemFactory *item_factory; + GtkAccelGroup *accel_group; + GtkWidget *menubar; + GtkWidget *main_vbox; + GtkWidget *hbox, *vbox; + GtkWidget *button; + GtkWidget *pixmap; + GtkWidget *label; + GtkWidget *toolbar; + GtkWidget *scrolledWindow; + GtkTooltips *tooltips; + + if (sendSMS.SMSSendWindow) + return; + + InitSendMenu (); + sendSMS.SMSSendWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); + + //gtk_widget_set_usize (GTK_WIDGET (sendSMS.SMSSendWindow), 436, 220); + gtk_signal_connect (GTK_OBJECT (sendSMS.SMSSendWindow), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + gtk_widget_realize (sendSMS.SMSSendWindow); + + accel_group = gtk_accel_group_new (); + item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "
", + accel_group); + + gtk_item_factory_create_items (item_factory, nmenu_items, send_menu_items, NULL); + + gtk_accel_group_attach (accel_group, GTK_OBJECT (sendSMS.SMSSendWindow)); + + /* Finally, return the actual menu bar created by the item factory. */ + menubar = gtk_item_factory_get_widget (item_factory, "
"); + + main_vbox = gtk_vbox_new (FALSE, 1); + gtk_container_border_width (GTK_CONTAINER (main_vbox), 1); + gtk_container_add (GTK_CONTAINER (sendSMS.SMSSendWindow), main_vbox); + gtk_widget_show (main_vbox); + + gtk_box_pack_start (GTK_BOX (main_vbox), menubar, FALSE, FALSE, 0); + gtk_widget_show (menubar); + + /* Create the toolbar */ + + toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS); + gtk_toolbar_set_button_relief (GTK_TOOLBAR (toolbar), GTK_RELIEF_NORMAL); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Send message"), NULL, + NewPixmap(SendSMS_xpm, GUI_SMSWindow->window, + &GUI_SMSWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) SendSMS, NULL); + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Save message to outbox"), NULL, + NewPixmap(Send_xpm, GUI_SMSWindow->window, + &GUI_SMSWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) NULL, NULL); + + gtk_toolbar_append_space (GTK_TOOLBAR (toolbar)); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Check names"), NULL, + NewPixmap(Check_xpm, GUI_SMSWindow->window, + &GUI_SMSWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) CheckAddress, NULL); + + gtk_box_pack_start (GTK_BOX (main_vbox), toolbar, FALSE, FALSE, 0); + gtk_widget_show (toolbar); + + /* Address line */ + hbox = gtk_hbox_new (FALSE, 3); + gtk_box_pack_start (GTK_BOX (main_vbox), hbox, FALSE, FALSE, 3); + gtk_widget_show (hbox); + + label = gtk_label_new (_("To:")); + gtk_box_pack_start (GTK_BOX (hbox), label, FALSE, FALSE, 3); + gtk_widget_show (label); + + sendSMS.addr = gtk_entry_new (); + gtk_box_pack_start (GTK_BOX (hbox), sendSMS.addr, TRUE, TRUE, 1); + + sendSMS.addrTip = gtk_tooltips_new (); + gtk_tooltips_set_tip (sendSMS.addrTip, sendSMS.addr, "", NULL); + gtk_tooltips_disable (sendSMS.addrTip); + + gtk_widget_show (sendSMS.addr); + + button = gtk_button_new (); + gtk_signal_connect (GTK_OBJECT (button), "clicked", + GTK_SIGNAL_FUNC (ShowSelectContactsDialog), (gpointer) NULL); + + pixmap = NewPixmap(Names_xpm, sendSMS.SMSSendWindow->window, + &sendSMS.SMSSendWindow->style->bg[GTK_STATE_NORMAL]); + gtk_container_add (GTK_CONTAINER (button), pixmap); + gtk_widget_show (pixmap); + gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 5); + + tooltips = gtk_tooltips_new (); + gtk_tooltips_set_tip (tooltips, button, _("Select contacts"), NULL); + + gtk_widget_show (button); + + hbox = gtk_hbox_new (FALSE, 3); + gtk_box_pack_end (GTK_BOX (main_vbox), hbox, TRUE, TRUE, 3); + gtk_widget_show (hbox); + + /* Edit SMS widget */ + vbox = gtk_vbox_new (FALSE, 3); + gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 3); + gtk_widget_show (vbox); + + sendSMS.status = gtk_frame_new ("0/1"); + gtk_frame_set_label_align (GTK_FRAME (sendSMS.status), 1.0, 0.0); + gtk_frame_set_shadow_type (GTK_FRAME (sendSMS.status), GTK_SHADOW_OUT); + + gtk_box_pack_end (GTK_BOX (vbox), sendSMS.status, TRUE, TRUE, 5); + gtk_widget_show (sendSMS.status); + + sendSMS.smsSendText = gtk_text_new (NULL, NULL); + gtk_widget_set_usize (GTK_WIDGET (sendSMS.smsSendText), 0, 120); + gtk_text_set_editable (GTK_TEXT (sendSMS.smsSendText), TRUE); + gtk_text_set_word_wrap (GTK_TEXT (sendSMS.smsSendText), TRUE); + gtk_signal_connect_after (GTK_OBJECT (sendSMS.smsSendText), + "key_press_event", + GTK_SIGNAL_FUNC(RefreshSMSLength), (gpointer) NULL); + gtk_signal_connect_after (GTK_OBJECT (sendSMS.smsSendText), + "button_press_event", + GTK_SIGNAL_FUNC(RefreshSMSLength), (gpointer) NULL); + + scrolledWindow = gtk_scrolled_window_new (NULL, NULL); + gtk_container_set_border_width (GTK_CONTAINER (scrolledWindow), 5); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledWindow), + GTK_POLICY_NEVER, + GTK_POLICY_AUTOMATIC); + + gtk_container_add (GTK_CONTAINER (scrolledWindow), sendSMS.smsSendText); + gtk_container_add (GTK_CONTAINER (sendSMS.status), scrolledWindow); + + gtk_widget_show (sendSMS.smsSendText); + gtk_widget_show (scrolledWindow); + + /* Options widget */ + vbox = gtk_vbox_new (FALSE, 3); + gtk_box_pack_end (GTK_BOX (hbox), vbox, FALSE, FALSE, 5); + gtk_widget_show (vbox); + + sendSMS.report = gtk_check_button_new_with_label (_("Delivery report")); + gtk_box_pack_start (GTK_BOX (vbox), sendSMS.report, FALSE, FALSE, 3); + gtk_widget_show (sendSMS.report); + + sendSMS.longSMS = gtk_check_button_new_with_label (_("Send as Long SMS")); + gtk_box_pack_start (GTK_BOX (vbox), sendSMS.longSMS, FALSE, FALSE, 3); + gtk_widget_show (sendSMS.longSMS); + + sendSMS.class = gtk_check_button_new_with_label (_("Send as Flash SMS (Class 0)")); + gtk_box_pack_start (GTK_BOX (vbox), sendSMS.class, FALSE, FALSE, 3); + gtk_widget_show (sendSMS.class); + + label = gtk_label_new (_("SMS Center:")); + gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 1); + gtk_widget_show (label); + + GUI_InitSMSSettings (); + sendSMS.smscOptionMenu = gtk_option_menu_new(); + + GUIEventSend (GUI_EVENT_SMS_CENTERS_CHANGED); + + gtk_box_pack_start (GTK_BOX (vbox), sendSMS.smscOptionMenu, FALSE, FALSE, 1); + gtk_widget_show (sendSMS.smscOptionMenu); +} + + +static void NewSMS (void) +{ + if (!sendSMS.SMSSendWindow) + CreateSMSSendWindow (); + + gtk_window_set_title (GTK_WINDOW (sendSMS.SMSSendWindow), _("New Message")); + + gtk_tooltips_disable (sendSMS.addrTip); + + gtk_text_freeze (GTK_TEXT (sendSMS.smsSendText)); + gtk_text_set_point (GTK_TEXT (sendSMS.smsSendText), 0); + gtk_text_forward_delete (GTK_TEXT (sendSMS.smsSendText), gtk_text_get_length (GTK_TEXT (sendSMS.smsSendText))); + gtk_text_thaw (GTK_TEXT (sendSMS.smsSendText)); + + gtk_entry_set_text (GTK_ENTRY (sendSMS.addr), ""); + + RefreshSMSStatus (); + + gtk_widget_show (sendSMS.SMSSendWindow); +} + + +static void ForwardSMS (void) +{ + gchar *buf; + + if (GTK_CLIST (SMS.smsClist)->selection == NULL) + return; + + if (!sendSMS.SMSSendWindow) + CreateSMSSendWindow (); + + gtk_window_set_title (GTK_WINDOW (sendSMS.SMSSendWindow), _("Forward Message")); + + gtk_tooltips_disable (sendSMS.addrTip); + + gtk_text_freeze (GTK_TEXT (sendSMS.smsSendText)); + gtk_text_set_point (GTK_TEXT (sendSMS.smsSendText), 0); + gtk_text_forward_delete (GTK_TEXT (sendSMS.smsSendText), gtk_text_get_length (GTK_TEXT (sendSMS.smsSendText))); + gtk_clist_get_text (GTK_CLIST (SMS.smsClist), + GPOINTER_TO_INT(GTK_CLIST (SMS.smsClist)->selection->data), + 3, &buf); + + gtk_text_insert (GTK_TEXT (sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, + buf, -1); + + gtk_text_thaw (GTK_TEXT (sendSMS.smsSendText)); + + gtk_entry_set_text (GTK_ENTRY (sendSMS.addr), ""); + + RefreshSMSStatus (); + + gtk_widget_show (sendSMS.SMSSendWindow); +} + + +/* +static inline gint CompareSMSMessageLocation (gconstpointer a, gconstpointer b) +{ + return !(((GSM_SMSMessage *) a)->Location == ((GSM_SMSMessage *) b)->Location); +} +*/ + + +static void ReplySMS (void) +{ + gchar *buf; +// GSList *r; +// GSM_SMSMessage msg; + + if (GTK_CLIST (SMS.smsClist)->selection == NULL) + return; + + if (!sendSMS.SMSSendWindow) + CreateSMSSendWindow (); + + gtk_window_set_title (GTK_WINDOW (sendSMS.SMSSendWindow), _("Reply Message")); + + gtk_text_freeze (GTK_TEXT (sendSMS.smsSendText)); + gtk_text_set_point (GTK_TEXT (sendSMS.smsSendText), 0); + gtk_text_forward_delete (GTK_TEXT (sendSMS.smsSendText), + gtk_text_get_length (GTK_TEXT (sendSMS.smsSendText))); + gtk_clist_get_text (GTK_CLIST (SMS.smsClist), + GPOINTER_TO_INT(GTK_CLIST (SMS.smsClist)->selection->data), + 3, &buf); + + gtk_text_insert (GTK_TEXT (sendSMS.smsSendText), NULL, + &(sendSMS.smsSendText->style->black), NULL, buf, -1); + + gtk_text_thaw (GTK_TEXT (sendSMS.smsSendText)); + + //msg.Location = *(((MessagePointers *) gtk_clist_get_row_data(GTK_CLIST (SMS.smsClist), + // GPOINTER_TO_INT (GTK_CLIST (SMS.smsClist)->selection->data)))->msgPtr); + + //r = g_slist_find_custom (SMS.messages, &msg, CompareSMSMessageLocation); + //if (r) + gtk_entry_set_text (GTK_ENTRY (sendSMS.addr), + ((MessagePointers *) gtk_clist_get_row_data(GTK_CLIST (SMS.smsClist), + GPOINTER_TO_INT (GTK_CLIST (SMS.smsClist)->selection->data)))->sender); + + CheckAddressMain (); + RefreshSMSStatus (); + + gtk_widget_show (sendSMS.SMSSendWindow); +} + + +static void NewBC (void) +{ + if (!sendSMS.SMSSendWindow) + CreateSMSSendWindow (); + + gtk_window_set_title (GTK_WINDOW (sendSMS.SMSSendWindow), _("Bussiness Card")); + + gtk_tooltips_disable (sendSMS.addrTip); + + gtk_text_freeze (GTK_TEXT (sendSMS.smsSendText)); + gtk_text_set_point (GTK_TEXT (sendSMS.smsSendText), 0); + gtk_text_forward_delete (GTK_TEXT (sendSMS.smsSendText), gtk_text_get_length (GTK_TEXT (sendSMS.smsSendText))); + + gtk_text_insert (GTK_TEXT (sendSMS.smsSendText), NULL, &(SMS.colour), NULL, + "Business Card\n", -1); + + gtk_text_insert (GTK_TEXT (sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, + xgnokiiConfig.user.name, -1); + + gtk_text_insert (GTK_TEXT (sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, + ", ", -1); + + gtk_text_insert (GTK_TEXT (sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, + xgnokiiConfig.user.title, -1); + + gtk_text_insert (GTK_TEXT (sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, + "\n", -1); + + gtk_text_insert (GTK_TEXT (sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, + xgnokiiConfig.user.company, -1); + + gtk_text_insert (GTK_TEXT (sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, + "\n\n", -1); + + gtk_text_insert (GTK_TEXT (sendSMS.smsSendText), NULL, &(SMS.colour), NULL, + "tel ", -1); + + gtk_text_insert (GTK_TEXT (sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, + xgnokiiConfig.user.telephone, -1); + + gtk_text_insert (GTK_TEXT (sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, + "\n", -1); + + gtk_text_insert (GTK_TEXT (sendSMS.smsSendText), NULL, &(SMS.colour), NULL, + "fax ", -1); + + gtk_text_insert (GTK_TEXT (sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, + xgnokiiConfig.user.fax, -1); + + gtk_text_insert (GTK_TEXT (sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, + "\n", -1); + + gtk_text_insert (GTK_TEXT (sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, + xgnokiiConfig.user.email, -1); + + gtk_text_insert (GTK_TEXT (sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, + "\n", -1); + + gtk_text_insert (GTK_TEXT (sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, + xgnokiiConfig.user.address, -1); + + gtk_text_insert (GTK_TEXT (sendSMS.smsSendText), NULL, &(sendSMS.smsSendText->style->black), NULL, + "\n", -1); + + gtk_text_thaw (GTK_TEXT (sendSMS.smsSendText)); + + gtk_entry_set_text (GTK_ENTRY (sendSMS.addr), ""); + + RefreshSMSStatus (); + + gtk_widget_show (sendSMS.SMSSendWindow); +} + + +static GtkItemFactoryEntry menu_items[] = { + { NULL, NULL, NULL, 0, ""}, + { NULL, NULL, ReadFromPhone, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "S", NULL, 0, NULL}, + { NULL, "M", SaveToMailbox, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "W", CloseSMS, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "N", NewSMS, 0, NULL}, + { NULL, "F", ForwardSMS, 0, NULL}, + { NULL, "R", ReplySMS, 0, NULL}, + { NULL, "D", DeleteSMS, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "B", NewBC, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, NULL, Help1, 0, NULL}, + { NULL, NULL, GUI_ShowAbout, 0, NULL}, +}; + + +static void InitMainMenu (void) +{ + register gint i = 0; + + menu_items[i++].path = g_strdup (_("/_File")); + menu_items[i++].path = g_strdup (_("/File/Read from phone")); + menu_items[i++].path = g_strdup (_("/File/Sep0")); + menu_items[i++].path = g_strdup (_("/File/_Save")); + menu_items[i++].path = g_strdup (_("/File/Save to mailbo_x")); + menu_items[i++].path = g_strdup (_("/File/Sep1")); + menu_items[i++].path = g_strdup (_("/File/_Close")); + menu_items[i++].path = g_strdup (_("/_Messages")); + menu_items[i++].path = g_strdup (_("/_Messages/_New")); + menu_items[i++].path = g_strdup (_("/_Messages/_Forward")); + menu_items[i++].path = g_strdup (_("/_Messages/_Reply")); + menu_items[i++].path = g_strdup (_("/_Messages/_Delete")); + menu_items[i++].path = g_strdup (_("/Messages/Sep3")); + menu_items[i++].path = g_strdup (_("/_Messages/_Bussiness card")); + menu_items[i++].path = g_strdup (_("/_Help")); + menu_items[i++].path = g_strdup (_("/Help/_Help")); + menu_items[i++].path = g_strdup (_("/Help/_About")); +} + + +void GUI_CreateSMSWindow (void) +{ + int nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]); + GtkItemFactory *item_factory; + GtkAccelGroup *accel_group; + GtkWidget *menubar; + GtkWidget *main_vbox; + GtkWidget *toolbar; + GtkWidget *scrolledWindow; + GtkWidget *vpaned, *hpaned; + GtkWidget *tree, *treeSMSItem; + SortColumn *sColumn; + GdkColormap *cmap; + register gint i; + gchar *titles[4] = { _("Status"), _("Date / Time"), _("Sender"), _("Message")}; + + InitMainMenu (); + GUI_SMSWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_window_set_title (GTK_WINDOW (GUI_SMSWindow), _("Short Message Service")); + //gtk_widget_set_usize (GTK_WIDGET (GUI_SMSWindow), 436, 220); + gtk_signal_connect (GTK_OBJECT (GUI_SMSWindow), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + gtk_widget_realize (GUI_SMSWindow); + + accel_group = gtk_accel_group_new (); + item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "
", + accel_group); + + gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, NULL); + + gtk_accel_group_attach (accel_group, GTK_OBJECT (GUI_SMSWindow)); + + /* Finally, return the actual menu bar created by the item factory. */ + menubar = gtk_item_factory_get_widget (item_factory, "
"); + + main_vbox = gtk_vbox_new (FALSE, 1); + gtk_container_border_width (GTK_CONTAINER (main_vbox), 1); + gtk_container_add (GTK_CONTAINER (GUI_SMSWindow), main_vbox); + gtk_widget_show (main_vbox); + + gtk_box_pack_start (GTK_BOX (main_vbox), menubar, FALSE, FALSE, 0); + gtk_widget_show (menubar); + + /* Create the toolbar */ + toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS); + gtk_toolbar_set_button_relief (GTK_TOOLBAR (toolbar), GTK_RELIEF_NORMAL); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("New message"), NULL, + NewPixmap(Edit_xpm, GUI_SMSWindow->window, + &GUI_SMSWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) NewSMS, NULL); + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Forward message"), NULL, + NewPixmap(Forward_xpm, GUI_SMSWindow->window, + &GUI_SMSWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) ForwardSMS, NULL); + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Reply message"), NULL, + NewPixmap(Reply_xpm, GUI_SMSWindow->window, + &GUI_SMSWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) ReplySMS, NULL); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Bussiness Card"), NULL, + NewPixmap(BCard_xpm, GUI_SMSWindow->window, + &GUI_SMSWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) NewBC, NULL); + + gtk_toolbar_append_space (GTK_TOOLBAR (toolbar)); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Delete message"), NULL, + NewPixmap(Delete_xpm, GUI_SMSWindow->window, + &GUI_SMSWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) DeleteSMS, NULL); + + gtk_box_pack_start (GTK_BOX (main_vbox), toolbar, FALSE, FALSE, 0); + gtk_widget_show (toolbar); + + vpaned = gtk_vpaned_new (); + gtk_paned_set_handle_size (GTK_PANED (vpaned), 10); + gtk_paned_set_gutter_size (GTK_PANED (vpaned), 15); + gtk_box_pack_end (GTK_BOX (main_vbox), vpaned, TRUE, TRUE, 0); + gtk_widget_show (vpaned); + + hpaned = gtk_hpaned_new (); + gtk_paned_set_handle_size (GTK_PANED (hpaned), 8); + gtk_paned_set_gutter_size (GTK_PANED (hpaned), 10); + gtk_paned_add1 (GTK_PANED (vpaned), hpaned); + gtk_widget_show (hpaned); + + /* Navigation tree */ + tree = gtk_tree_new (); + gtk_tree_set_selection_mode (GTK_TREE (tree), GTK_SELECTION_SINGLE); + gtk_widget_show (tree); + + treeSMSItem = gtk_tree_item_new_with_label (_("SMS's")); + gtk_tree_append (GTK_TREE (tree), treeSMSItem); + gtk_widget_show (treeSMSItem); + + subTree = gtk_tree_new (); + gtk_tree_set_selection_mode (GTK_TREE (subTree), GTK_SELECTION_SINGLE); + gtk_tree_set_view_mode (GTK_TREE (subTree), GTK_TREE_VIEW_ITEM); + gtk_tree_item_set_subtree (GTK_TREE_ITEM (treeSMSItem), subTree); + + scrolledWindow = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_set_usize (scrolledWindow, 75, 80); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledWindow), + GTK_POLICY_AUTOMATIC, + GTK_POLICY_AUTOMATIC); + + gtk_paned_add1 (GTK_PANED (hpaned), scrolledWindow); + + gtk_scrolled_window_add_with_viewport (GTK_SCROLLED_WINDOW (scrolledWindow), + tree); + gtk_widget_show (scrolledWindow); + + /* Message viewer */ + SMS.smsText = gtk_text_new (NULL, NULL); + gtk_text_set_editable (GTK_TEXT (SMS.smsText), FALSE); + gtk_text_set_word_wrap (GTK_TEXT (SMS.smsText), TRUE); + //gtk_text_set_line_wrap (GTK_TEXT (SMS.smsText), TRUE); + + scrolledWindow = gtk_scrolled_window_new (NULL, NULL); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledWindow), + GTK_POLICY_NEVER, + GTK_POLICY_AUTOMATIC); + + gtk_paned_add2 (GTK_PANED (hpaned), scrolledWindow); + + gtk_container_add (GTK_CONTAINER (scrolledWindow), SMS.smsText); + gtk_widget_show_all (scrolledWindow); + + /* Messages list */ + SMS.smsClist = gtk_clist_new_with_titles (4, titles); + gtk_clist_set_shadow_type (GTK_CLIST (SMS.smsClist), GTK_SHADOW_OUT); + gtk_clist_set_compare_func (GTK_CLIST (SMS.smsClist), CListCompareFunc); + gtk_clist_set_sort_column (GTK_CLIST (SMS.smsClist), 1); + gtk_clist_set_sort_type (GTK_CLIST (SMS.smsClist), GTK_SORT_ASCENDING); + gtk_clist_set_auto_sort (GTK_CLIST (SMS.smsClist), FALSE); + gtk_clist_set_selection_mode (GTK_CLIST (SMS.smsClist), GTK_SELECTION_EXTENDED); + + gtk_clist_set_column_width (GTK_CLIST (SMS.smsClist), 0, 40); + gtk_clist_set_column_width (GTK_CLIST (SMS.smsClist), 1, 142); + gtk_clist_set_column_width (GTK_CLIST (SMS.smsClist), 2, 135); + //gtk_clist_set_column_justification (GTK_CLIST (SMS.smsClist), 2, GTK_JUSTIFY_CENTER); + + for (i = 0; i < 4; i++) + { + if ((sColumn = g_malloc (sizeof (SortColumn))) == NULL) + { + g_print (_("Error: %s: line %d: Can't allocate memory!\n"), __FILE__, __LINE__); + gtk_main_quit (); + } + sColumn->clist = SMS.smsClist; + sColumn->column = i; + gtk_signal_connect (GTK_OBJECT (GTK_CLIST (SMS.smsClist)->column[i].button), "clicked", + GTK_SIGNAL_FUNC (SetSortColumn), (gpointer) sColumn); + } + + gtk_signal_connect (GTK_OBJECT (SMS.smsClist), "select_row", + GTK_SIGNAL_FUNC (ClickEntry), NULL); + + scrolledWindow = gtk_scrolled_window_new (NULL, NULL); + gtk_widget_set_usize (scrolledWindow, 550, 100); + gtk_container_add (GTK_CONTAINER (scrolledWindow), SMS.smsClist); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scrolledWindow), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + + gtk_paned_add2 (GTK_PANED (vpaned), scrolledWindow); + + gtk_widget_show (SMS.smsClist); + gtk_widget_show (scrolledWindow); + + CreateErrorDialog (&errorDialog, GUI_SMSWindow); + CreateInfoDialog (&infoDialog, GUI_SMSWindow); + + gtk_signal_emit_by_name(GTK_OBJECT (treeSMSItem), "expand"); + + cmap = gdk_colormap_get_system(); + SMS.colour.red = 0xffff; + SMS.colour.green = 0; + SMS.colour.blue = 0; + if (!gdk_color_alloc (cmap, &(SMS.colour))) + g_error (_("couldn't allocate colour")); + + questMark.pixmap = gdk_pixmap_create_from_xpm_d (GUI_SMSWindow->window, + &questMark.mask, + &GUI_SMSWindow->style->bg[GTK_STATE_NORMAL], + quest_xpm); + + GUIEventAdd (GUI_EVENT_SMS_CENTERS_CHANGED, GUI_RefreshSMSCenterMenu); + GUIEventAdd (GUI_EVENT_SMS_NUMBER_CHANGED, GUI_RefreshMessageWindow); +} diff --git a/xgnokii/xgnokii_sms.h b/xgnokii/xgnokii_sms.h new file mode 100644 index 0000000..d03398c --- /dev/null +++ b/xgnokii/xgnokii_sms.h @@ -0,0 +1,22 @@ +/* + + X G N O K I I + + A Linux/Unix GUI for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#ifndef XGNOKII_SMS_H +#define XGNOKII_SMS_H + +extern void GUI_CreateSMSWindow (void); + +extern void GUI_ShowSMS (void); + +extern void GUI_RefreshMessageWindow (void); + +extern void GUI_RefreshSMSCenterMenu (void); + +#endif diff --git a/xgnokii/xgnokii_speed.c b/xgnokii/xgnokii_speed.c new file mode 100644 index 0000000..d4bb32b --- /dev/null +++ b/xgnokii/xgnokii_speed.c @@ -0,0 +1,662 @@ +/* + + X G N O K I I + + A Linux/Unix GUI for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + + +#include +#include +#include +#include +#include "xgnokii_contacts.h" +#include "xgnokii.h" +#include "xgnokii_lowlevel.h" +#include "xgnokii_common.h" +#include "xgnokii_speed.h" +#include "xpm/Read.xpm" +#include "xpm/Send.xpm" +#include "xpm/Open.xpm" +#include "xpm/Save.xpm" +#include "xpm/Edit.xpm" +#include "xpm/quest.xpm" + + +static GtkWidget *GUI_SpeedDialWindow; +static ErrorDialog errorDialog = {NULL, NULL}; +static InfoDialog infoDialog = {NULL, NULL}; +static ExportDialogData exportDialogData = {NULL}; +static GtkWidget *clist; +static QuestMark questMark; +static gint selectedKey; +static bool speedDialInitialized; + + +static inline void Help1 (GtkWidget *w, gpointer data) +{ + gchar *indx = g_strdup_printf ("/%s/gnokii/xgnokii/speeddial/index.htm", xgnokiiConfig.locale); + Help (w, indx); + g_free (indx); +} + + +static void CloseSpeedDial (GtkWidget *w, gpointer data) +{ + gtk_widget_hide (GUI_SpeedDialWindow); +} + + +static inline void DestroyCListData (gpointer data) +{ + if (data) + g_free ((D_SpeedDial *) data); +} + + +static void DeleteSelectContactDialog (GtkWidget *widget, GdkEvent *event, + SelectContactData *data) +{ + gtk_widget_destroy (GTK_WIDGET (data->clist)); + gtk_widget_destroy (GTK_WIDGET (data->clistScrolledWindow)); + gtk_widget_destroy (GTK_WIDGET (widget)); +} + + +static void CancelSelectContactDialog (GtkWidget *widget, + SelectContactData *data) +{ + gtk_widget_destroy (GTK_WIDGET (data->clist)); + gtk_widget_destroy (GTK_WIDGET (data->clistScrolledWindow)); + gtk_widget_destroy (GTK_WIDGET (data->dialog)); +} + + +static void OkSelectContactDialog (GtkWidget *widget, + SelectContactData *data) +{ + GList *sel; + PhonebookEntry *pbEntry; + gchar *key; + + if ((sel = GTK_CLIST (data->clist)->selection) != NULL) + { + D_SpeedDial *d = (D_SpeedDial *) g_malloc (sizeof (D_SpeedDial)); + + gtk_clist_freeze (GTK_CLIST (clist)); + + pbEntry = gtk_clist_get_row_data (GTK_CLIST (data->clist), + GPOINTER_TO_INT (sel->data)); + + gtk_clist_get_text (GTK_CLIST (clist), selectedKey, 0, &key); + + gtk_clist_set_text (GTK_CLIST (clist), selectedKey, 1, pbEntry->entry.Name); + gtk_clist_set_text (GTK_CLIST (clist), selectedKey, 2, pbEntry->entry.Number); + + d->entry.Number = *key - '0'; + d->entry.MemoryType = pbEntry->entry.MemoryType + 2; + d->entry.Location = pbEntry->entry.Location; + + gtk_clist_set_row_data_full (GTK_CLIST (clist), selectedKey, + (gpointer) d, DestroyCListData); + + gtk_clist_sort (GTK_CLIST (clist)); + gtk_clist_thaw (GTK_CLIST (clist)); + } + + gtk_widget_destroy (GTK_WIDGET (data->clist)); + gtk_widget_destroy (GTK_WIDGET (data->clistScrolledWindow)); + gtk_widget_destroy (GTK_WIDGET (data->dialog)); +} + +static void ShowSelectContactsDialog (void) +{ + SelectContactData *r; + + if (!GUI_ContactsIsIntialized ()) + GUI_ReadContacts (); + + if ((r = GUI_SelectContactDialog ()) == NULL) + return; + + gtk_signal_connect (GTK_OBJECT (r->dialog), "delete_event", + GTK_SIGNAL_FUNC (DeleteSelectContactDialog), (gpointer) r); + + gtk_signal_connect (GTK_OBJECT (r->okButton), "clicked", + GTK_SIGNAL_FUNC (OkSelectContactDialog), (gpointer) r); + gtk_signal_connect (GTK_OBJECT (r->cancelButton), "clicked", + GTK_SIGNAL_FUNC (CancelSelectContactDialog), (gpointer) r); +} + + +static inline void EditKey (void) +{ + GList *sel; + + if ((sel = GTK_CLIST (clist)->selection) != NULL) + { + selectedKey = GPOINTER_TO_INT (sel->data); + ShowSelectContactsDialog (); + } +} + + +static inline void ClickEntry (GtkWidget *clist, + gint row, + gint column, + GdkEventButton *event, + gpointer data ) +{ + if(event && event->type == GDK_2BUTTON_PRESS) + { + selectedKey = row; + ShowSelectContactsDialog (); + } +} + + +static void ReadSpeedDial (void) +{ + PhonebookEntry *pbEntry; + D_SpeedDial *d; + PhoneEvent *e; + gchar *row[3]; + gchar buf[2] = " "; + gint location; + register gint i, row_i = 0; + + + if (!GUI_ContactsIsIntialized ()) + GUI_ReadContacts (); + + gtk_label_set_text (GTK_LABEL (infoDialog.text), _("Reading data ...")); + gtk_widget_show_now (infoDialog.dialog); + GUI_Refresh (); + + gtk_clist_freeze (GTK_CLIST (clist)); + gtk_clist_clear (GTK_CLIST (clist)); + + for (i = 1; i < 10; i++) + { + if ((d = (D_SpeedDial *) g_malloc (sizeof (D_SpeedDial))) == NULL) + { + g_print (_("Cannot allocate memory!")); + return; + } + d->entry.Number = i; + if ((e = (PhoneEvent *) g_malloc (sizeof (PhoneEvent))) == NULL) + { + g_print (_("Cannot allocate memory!")); + g_free (d); + return; + } + e->event = Event_GetSpeedDial; + e->data = d; + GUI_InsertEvent (e); + pthread_mutex_lock (&speedDialMutex); + pthread_cond_wait (&speedDialCond, &speedDialMutex); + pthread_mutex_unlock (&speedDialMutex); + + if (d->status != GE_NONE) + g_print ("Cannot read speed dial key %d!\n", i); + else + { + if (d->entry.Location == 0) + location = i; + else + location = d->entry.Location; + if ((pbEntry = GUI_GetEntry (d->entry.MemoryType - 2, location)) == NULL) + { + g_free (d); + continue; + } + *buf = i + '0'; + row[0] = buf; + row[1] = pbEntry->entry.Name; + row[2] = pbEntry->entry.Number; + + gtk_clist_append (GTK_CLIST (clist), row); + gtk_clist_set_row_data_full (GTK_CLIST (clist), row_i++, + (gpointer) d, DestroyCListData); + } + //GUI_Refresh (); + gtk_widget_hide (infoDialog.dialog); + } + + gtk_clist_sort (GTK_CLIST (clist)); + gtk_clist_thaw (GTK_CLIST (clist)); + speedDialInitialized = TRUE; +} + + +static void SaveSpeedDial (void) +{ + //gchar buf[80]; + D_SpeedDial *d; + PhoneEvent *e; + register gint i; + + if (speedDialInitialized) + for(i = 1; i < 10; i++) + { + if ((d = (D_SpeedDial *) gtk_clist_get_row_data (GTK_CLIST (clist), i - 1))) + { + if (d->entry.Location == 0) + continue; + if ((e = (PhoneEvent *) g_malloc (sizeof (PhoneEvent))) == NULL) + { + g_print (_("Cannot allocate memory!")); + return; + } + e->event = Event_SendSpeedDial; + e->data = d; + GUI_InsertEvent (e); +/* pthread_mutex_lock (&speedDialMutex); + pthread_cond_wait (&speedDialCond, &speedDialMutex); + pthread_mutex_unlock (&speedDialMutex); + + if (d->status != GE_NONE) + { + g_snprintf (buf, 80, _("Error writing speed\ndial for key %d!\n"), + d->entry.Number); + gtk_label_set_text (GTK_LABEL (errorDialog.text), buf); + gtk_widget_show (errorDialog.dialog); + } */ + } +// GUI_Refresh (); + } +} + + +static bool ParseLine (D_SpeedDial *d, gchar *buf) +{ + gchar **strings = g_strsplit (buf, ";", 3); + + d->entry.Number = *strings[0] - '0'; + if (d->entry.Number < 1 || d->entry.Number > 9) + { + g_strfreev (strings); + return FALSE; + } + + d->entry.MemoryType = *strings[1] - '0'; + if (d->entry.MemoryType < 2 || d->entry.MemoryType > 3) + { + g_strfreev (strings); + return FALSE; + } + + d->entry.Location = atoi (strings[2]); + if (d->entry.Location == LONG_MIN || d->entry.Location == LONG_MAX || + d->entry.Location < 0) + { + g_strfreev (strings); + return FALSE; + } + + g_strfreev (strings); + return TRUE; +} + + +static void OkImportDialog (GtkWidget *w, GtkFileSelection *fs) +{ + FILE *f; + D_SpeedDial *d; + PhonebookEntry *pbEntry; + gchar buf[IO_BUF_LEN]; + gchar *row[3]; + gchar *fileName; + gint location; + register gint i, row_i = 0; + + fileName = gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs)); + gtk_widget_hide (GTK_WIDGET (fs)); + + if ((f = fopen (fileName, "r")) == NULL) + { + g_snprintf (buf, IO_BUF_LEN, _("Can't open file %s for reading!"), fileName); + gtk_label_set_text (GTK_LABEL(errorDialog.text), buf); + gtk_widget_show (errorDialog.dialog); + return; + } + + if (!GUI_ContactsIsIntialized ()) + GUI_ReadContacts (); + + gtk_clist_freeze (GTK_CLIST (clist)); + gtk_clist_clear (GTK_CLIST (clist)); + speedDialInitialized = FALSE; + + i = 0; + while (fgets (buf, IO_BUF_LEN, f) && i++ < 9) + { + if ((d = (D_SpeedDial *) g_malloc (sizeof (D_SpeedDial))) == NULL) + { + g_print (_("Cannot allocate memory!\n")); + gtk_clist_clear (GTK_CLIST (clist)); + gtk_clist_sort (GTK_CLIST (clist)); + gtk_clist_thaw (GTK_CLIST (clist)); + return; + } + if (ParseLine (d, buf)) + { + if (d->entry.Number != i) + { + g_free (d); + gtk_clist_clear (GTK_CLIST (clist)); + gtk_label_set_text (GTK_LABEL (errorDialog.text), _("Error reading file!")); + gtk_widget_show (errorDialog.dialog); + gtk_clist_sort (GTK_CLIST (clist)); + gtk_clist_thaw (GTK_CLIST (clist)); + return; + } + if (d->entry.Location == 0) + location = i; + else + location = d->entry.Location; + if ((pbEntry = GUI_GetEntry (d->entry.MemoryType - 2, location)) == NULL) + { + g_free (d); + continue; + } + *buf = i + '0'; + *(buf + 1) = '\0'; + row[0] = buf; + row[1] = pbEntry->entry.Name; + row[2] = pbEntry->entry.Number; + gtk_clist_append (GTK_CLIST (clist), row); + gtk_clist_set_row_data_full (GTK_CLIST (clist), row_i++, + (gpointer) d, DestroyCListData); + } + else + { + g_free (d); + gtk_clist_clear (GTK_CLIST (clist)); + gtk_label_set_text (GTK_LABEL (errorDialog.text), _("Error reading file!")); + gtk_widget_show (errorDialog.dialog); + gtk_clist_sort (GTK_CLIST (clist)); + gtk_clist_thaw (GTK_CLIST (clist)); + return; + } + } + + gtk_clist_sort (GTK_CLIST (clist)); + gtk_clist_thaw (GTK_CLIST (clist)); + speedDialInitialized = TRUE; +} + + +static void ImportSpeedDial (void) +{ + static GtkWidget *fileDialog = NULL; + + if (fileDialog == NULL) + { + fileDialog = gtk_file_selection_new (_("Import")); + gtk_signal_connect (GTK_OBJECT (fileDialog), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (fileDialog)->ok_button), + "clicked", GTK_SIGNAL_FUNC (OkImportDialog), (gpointer) fileDialog); + gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (fileDialog)->cancel_button), + "clicked", GTK_SIGNAL_FUNC (CancelDialog), (gpointer) fileDialog); + } + + gtk_widget_show (fileDialog); +} + + +static void ExportSpeedDialMain (gchar *name) +{ + FILE *f; + D_SpeedDial *d; + gchar buf[IO_BUF_LEN]; + register gint i; + + if ((f = fopen( name, "w")) == NULL) + { + g_snprintf (buf, IO_BUF_LEN, _("Can't open file %s for writing!"), name); + gtk_label_set_text (GTK_LABEL (errorDialog.text), buf); + gtk_widget_show (errorDialog.dialog); + return; + } + + for(i = 1; i < 10; i++) + { + if ((d = (D_SpeedDial *) gtk_clist_get_row_data (GTK_CLIST (clist), i - 1))) + { + sprintf (buf, "%d;%d;%d;", d->entry.Number, d->entry.MemoryType, d->entry.Location); + fprintf (f, "%s\n", buf); + } + } + + fclose(f); +} + + +static void YesExportDialog (GtkWidget *w, gpointer data) +{ + gtk_widget_hide (GTK_WIDGET (data)); + ExportSpeedDialMain (exportDialogData.fileName); +} + + +static void OkExportDialog (GtkWidget *w, GtkFileSelection *fs) +{ + static YesNoDialog dialog = { NULL, NULL}; + FILE *f; + gchar err[80]; + + + exportDialogData.fileName = gtk_file_selection_get_filename (GTK_FILE_SELECTION (fs)); + gtk_widget_hide (GTK_WIDGET (fs)); + + if ((f = fopen (exportDialogData.fileName, "r")) != NULL) + { + fclose (f); + if (dialog.dialog == NULL) + { + CreateYesNoDialog (&dialog, YesExportDialog, CancelDialog, GUI_SpeedDialWindow); + gtk_window_set_title (GTK_WINDOW (dialog.dialog), _("Overwrite file?")); + g_snprintf ( err, 80, _("File %s already exist.\nOverwrite?"), exportDialogData.fileName); + gtk_label_set_text (GTK_LABEL(dialog.text), err); + } + gtk_widget_show (dialog.dialog); + } + else + ExportSpeedDialMain (exportDialogData.fileName); +} + + +static void ExportSpeedDial (void) +{ + static GtkWidget *fileDialog = NULL; + + if (speedDialInitialized) + { + if (fileDialog == NULL) + { + fileDialog = gtk_file_selection_new (_("Export")); + gtk_signal_connect (GTK_OBJECT (fileDialog), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (fileDialog)->ok_button), + "clicked", GTK_SIGNAL_FUNC (OkExportDialog), (gpointer) fileDialog); + gtk_signal_connect (GTK_OBJECT (GTK_FILE_SELECTION (fileDialog)->cancel_button), + "clicked", GTK_SIGNAL_FUNC (CancelDialog), (gpointer) fileDialog); + } + + gtk_widget_show (fileDialog); + } +} + + +inline void GUI_ShowSpeedDial (void) +{ + ReadSpeedDial (); + gtk_widget_show (GUI_SpeedDialWindow); +} + + +static GtkItemFactoryEntry menu_items[] = { + { NULL, NULL, NULL, 0, ""}, + { NULL, "R", ReadSpeedDial, 0, NULL}, + { NULL, "S", SaveSpeedDial, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "I", ImportSpeedDial, 0, NULL}, + { NULL, "E", ExportSpeedDial, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "W", CloseSpeedDial, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, NULL, EditKey, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, NULL, Help1, 0, NULL}, + { NULL, NULL, GUI_ShowAbout, 0, NULL}, +}; + + +static void InitMainMenu (void) +{ + menu_items[0].path = g_strdup (_("/_File")); + menu_items[1].path = g_strdup (_("/File/_Read from phone")); + menu_items[2].path = g_strdup (_("/File/_Save to phone")); + menu_items[3].path = g_strdup (_("/File/Sep1")); + menu_items[4].path = g_strdup (_("/File/_Import from file")); + menu_items[5].path = g_strdup (_("/File/_Export to file")); + menu_items[6].path = g_strdup (_("/File/Sep2")); + menu_items[7].path = g_strdup (_("/File/_Close")); + menu_items[8].path = g_strdup (_("/_Edit")); + menu_items[9].path = g_strdup (_("/Edit/_Edit")); + menu_items[10].path = g_strdup (_("/_Help")); + menu_items[11].path = g_strdup (_("/Help/_Help")); + menu_items[12].path = g_strdup (_("/Help/_About")); +} + + +void GUI_CreateSpeedDialWindow (void) +{ + int nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]); + GtkItemFactory *item_factory; + GtkAccelGroup *accel_group; + SortColumn *sColumn; + GtkWidget *menubar; + GtkWidget *main_vbox; + GtkWidget *toolbar; + GtkWidget *clistScrolledWindow; + register gint i; + gchar *titles[3] = {_("Key"), _("Name"), _("Number")}; + + + InitMainMenu (); + GUI_SpeedDialWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_window_set_title (GTK_WINDOW (GUI_SpeedDialWindow), _("Speed Dial")); + gtk_widget_set_usize (GTK_WIDGET (GUI_SpeedDialWindow), 332, 220); + //gtk_container_set_border_width (GTK_CONTAINER (GUI_SpeedDialWindow), 10); + gtk_signal_connect (GTK_OBJECT (GUI_SpeedDialWindow), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + gtk_widget_realize (GUI_SpeedDialWindow); + + accel_group = gtk_accel_group_new (); + item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "
", + accel_group); + + gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, NULL); + + gtk_accel_group_attach (accel_group, GTK_OBJECT (GUI_SpeedDialWindow)); + + /* Finally, return the actual menu bar created by the item factory. */ + menubar = gtk_item_factory_get_widget (item_factory, "
"); + + main_vbox = gtk_vbox_new (FALSE, 1); + gtk_container_border_width (GTK_CONTAINER (main_vbox), 1); + gtk_container_add (GTK_CONTAINER (GUI_SpeedDialWindow), main_vbox); + gtk_widget_show (main_vbox); + + gtk_box_pack_start (GTK_BOX (main_vbox), menubar, FALSE, FALSE, 0); + gtk_widget_show (menubar); + + /* Create the toolbar */ + + toolbar = gtk_toolbar_new (GTK_ORIENTATION_HORIZONTAL, GTK_TOOLBAR_ICONS); + gtk_toolbar_set_button_relief (GTK_TOOLBAR (toolbar), GTK_RELIEF_NORMAL); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Read from phone"), NULL, + NewPixmap(Read_xpm, GUI_SpeedDialWindow->window, + &GUI_SpeedDialWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) ReadSpeedDial, NULL); + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Save to phone"), NULL, + NewPixmap(Send_xpm, GUI_SpeedDialWindow->window, + &GUI_SpeedDialWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) SaveSpeedDial, NULL); + + gtk_toolbar_append_space (GTK_TOOLBAR (toolbar)); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Import from file"), NULL, + NewPixmap(Open_xpm, GUI_SpeedDialWindow->window, + &GUI_SpeedDialWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) ImportSpeedDial, NULL); + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Export to file"), NULL, + NewPixmap(Save_xpm, GUI_SpeedDialWindow->window, + &GUI_SpeedDialWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) ExportSpeedDial, NULL); + + gtk_toolbar_append_space (GTK_TOOLBAR (toolbar)); + + gtk_toolbar_append_item (GTK_TOOLBAR (toolbar), NULL, _("Edit entry"), NULL, + NewPixmap(Edit_xpm, GUI_SpeedDialWindow->window, + &GUI_SpeedDialWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc) EditKey, NULL); + + gtk_box_pack_start (GTK_BOX (main_vbox), toolbar, FALSE, FALSE, 0); + gtk_widget_show (toolbar); + + clist = gtk_clist_new_with_titles (3, titles); + gtk_clist_set_shadow_type (GTK_CLIST (clist), GTK_SHADOW_OUT); +// gtk_clist_set_compare_func (GTK_CLIST (clist), CListCompareFunc); + gtk_clist_set_sort_column (GTK_CLIST (clist), 0); + gtk_clist_set_sort_type (GTK_CLIST (clist), GTK_SORT_ASCENDING); + gtk_clist_set_auto_sort (GTK_CLIST (clist), FALSE); + //gtk_clist_set_selection_mode (GTK_CLIST (clist), GTK_SELECTION_EXTENDED); + + gtk_clist_set_column_width (GTK_CLIST (clist), 1, 150); + gtk_clist_set_column_width (GTK_CLIST (clist), 2, 115); + gtk_clist_set_column_justification (GTK_CLIST (clist), 0, GTK_JUSTIFY_CENTER); +// gtk_clist_set_column_visibility (GTK_CLIST (clist), 3, xgnokiiConfig.callerGroupsSupported); + + for (i = 0; i < 3; i++) + { + if ((sColumn = g_malloc (sizeof (SortColumn))) == NULL) + { + g_print (_("Error: %s: line %d: Can't allocate memory!\n"), __FILE__, __LINE__); + gtk_main_quit (); + } + sColumn->clist = clist; + sColumn->column = i; + gtk_signal_connect (GTK_OBJECT (GTK_CLIST (clist)->column[i].button), "clicked", + GTK_SIGNAL_FUNC (SetSortColumn), (gpointer) sColumn); + } + + gtk_signal_connect (GTK_OBJECT (clist), "select_row", + GTK_SIGNAL_FUNC (ClickEntry), NULL); + + clistScrolledWindow = gtk_scrolled_window_new (NULL, NULL); + gtk_container_add (GTK_CONTAINER (clistScrolledWindow), clist); + gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (clistScrolledWindow), + GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_box_pack_start (GTK_BOX (main_vbox), clistScrolledWindow, + TRUE, TRUE, 0); + + gtk_widget_show (clist); + gtk_widget_show (clistScrolledWindow); + + questMark.pixmap = gdk_pixmap_create_from_xpm_d (GUI_SpeedDialWindow->window, + &questMark.mask, + &GUI_SpeedDialWindow->style->bg[GTK_STATE_NORMAL], + quest_xpm); + + CreateErrorDialog (&errorDialog, GUI_SpeedDialWindow); + CreateInfoDialog (&infoDialog, GUI_SpeedDialWindow); + speedDialInitialized = FALSE; +} diff --git a/xgnokii/xgnokii_speed.h b/xgnokii/xgnokii_speed.h new file mode 100644 index 0000000..a454bf5 --- /dev/null +++ b/xgnokii/xgnokii_speed.h @@ -0,0 +1,18 @@ +/* + + X G N O K I I + + A Linux/Unix GUI for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#ifndef XGNOKII_SPEED_H +#define XGNOKII_SPEED_H + +extern void GUI_CreateSpeedDialWindow (void); + +extern void GUI_ShowSpeedDial (void); + +#endif diff --git a/xgnokii/xgnokii_xkeyb.c b/xgnokii/xgnokii_xkeyb.c new file mode 100644 index 0000000..3ecf9f6 --- /dev/null +++ b/xgnokii/xgnokii_xkeyb.c @@ -0,0 +1,295 @@ +/* + + X G N O K I I + + A Linux/Unix GUI for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#include +#include +#include "misc.h" +#include "xgnokii_common.h" +#include "xgnokii.h" +#include "xgnokii_lowlevel.h" +#include "xgnokii_xkeyb.h" + +typedef struct { + int top_left_x, top_left_y; + int bottom_right_x, bottom_right_y; + int code; +} ButtonT; + + +static GtkWidget *GUI_XkeybWindow; +static GtkWidget *pixArea; +static GtkWidget *phonePixmap = NULL; +static ErrorDialog errorDialog = {NULL, NULL}; +static ButtonT *button = NULL; + +static ButtonT button_6110[30] = { + { 103, 91, 114, 107, PHONEKEY_POWER }, /* Power */ + { 28, 240, 54, 263, PHONEKEY_MENU }, /* Menu */ + { 84, 240, 110, 263, PHONEKEY_NAMES }, /* Names */ + { 58, 245, 82, 258, PHONEKEY_UP }, /* Up */ + { 55, 263, 85, 276, PHONEKEY_DOWN }, /* Down */ + { 22, 271, 50, 289, PHONEKEY_GREEN }, /* Green */ + { 91, 271, 115, 289, PHONEKEY_RED }, /* Red */ + { 18, 294, 44, 310, PHONEKEY_1 }, /* 1 */ + { 56, 294, 85, 310, PHONEKEY_2 }, /* 2 */ + { 98, 294, 121, 310, PHONEKEY_3 }, /* 3 */ + { 18, 317, 44, 333, PHONEKEY_4 }, /* 4 */ + { 56, 317, 85, 333, PHONEKEY_5 }, /* 5 */ + { 98, 317, 121, 333, PHONEKEY_6 }, /* 6 */ + { 18, 342, 44, 356, PHONEKEY_7 }, /* 7 */ + { 56, 342, 85, 356, PHONEKEY_8 }, /* 8 */ + { 98, 342, 121, 356, PHONEKEY_9 }, /* 9 */ + { 18, 365, 44, 380, PHONEKEY_ASTERISK }, /* * */ + { 56, 365, 85, 380, PHONEKEY_0 }, /* 0 */ + { 98, 365, 121, 380, PHONEKEY_HASH }, /* # */ + { 1, 138, 10, 150, PHONEKEY_INCREASEVOLUME }, /* Volume + */ + { 1, 165, 10, 176, PHONEKEY_DECREASEVOLUME }, /* Volume - */ + { 0, 0, 0, 0, 0x00 } +}; + +static ButtonT button_6150[30] = { + { 99, 78, 114, 93, PHONEKEY_POWER }, /* Power */ + { 20, 223, 49, 245, PHONEKEY_MENU }, /* Menu */ + { 90, 223, 120, 245, PHONEKEY_NAMES }, /* Names */ + { 59, 230, 83, 247, PHONEKEY_UP }, /* Up */ + { 56, 249, 84, 265, PHONEKEY_DOWN }, /* Down */ + { 14, 254, 51, 273, PHONEKEY_GREEN }, /* Green */ + { 90, 255, 126, 273, PHONEKEY_RED }, /* Red */ + { 18, 281, 53, 299, PHONEKEY_1 }, /* 1 */ + { 55, 280, 86, 299, PHONEKEY_2 }, /* 2 */ + { 90, 281, 122, 299, PHONEKEY_3 }, /* 3 */ + { 18, 303, 53, 323, PHONEKEY_4 }, /* 4 */ + { 55, 303, 87, 323, PHONEKEY_5 }, /* 5 */ + { 90, 303, 122, 323, PHONEKEY_6 }, /* 6 */ + { 18, 327, 53, 346, PHONEKEY_7 }, /* 7 */ + { 53, 327, 87, 346, PHONEKEY_8 }, /* 8 */ + { 90, 327, 122, 346, PHONEKEY_9 }, /* 9 */ + { 18, 349, 53, 370, PHONEKEY_ASTERISK }, /* * */ + { 56, 349, 87, 370, PHONEKEY_0 }, /* 0 */ + { 98, 349, 122, 370, PHONEKEY_HASH }, /* # */ + { 2, 131, 10, 147, PHONEKEY_INCREASEVOLUME }, /* Volume + */ + { 2, 155, 10, 173, PHONEKEY_DECREASEVOLUME }, /* Volume - */ + { 0, 0, 0, 0, 0x00 } +}; + +static ButtonT button_5110[30] = { + { 100, 85, 114, 99, PHONEKEY_POWER }, /* Power */ + { 50, 240, 85, 265, PHONEKEY_MENU }, /* Menu */ + { 20, 240, 45, 260, PHONEKEY_NAMES }, /* Names */ + { 100, 240, 117, 258, PHONEKEY_UP }, /* Up */ + { 93, 267, 112, 287, PHONEKEY_DOWN }, /* Down */ + { 14, 294, 44, 312, PHONEKEY_1 }, /* 1 */ + { 54, 294, 83, 312, PHONEKEY_2 }, /* 2 */ + { 94, 294, 122, 312, PHONEKEY_3 }, /* 3 */ + { 14, 320, 44, 338, PHONEKEY_4 }, /* 4 */ + { 54, 320, 83, 338, PHONEKEY_5 }, /* 5 */ + { 94, 320, 122, 338, PHONEKEY_6 }, /* 6 */ + { 14, 345, 44, 363, PHONEKEY_7 }, /* 7 */ + { 54, 345, 83, 363, PHONEKEY_8 }, /* 8 */ + { 94, 345, 122, 363, PHONEKEY_9 }, /* 9 */ + { 18, 374, 49, 389, PHONEKEY_ASTERISK }, /* * */ + { 53, 371, 82, 387, PHONEKEY_0 }, /* 0 */ + { 96, 374, 119, 389, PHONEKEY_HASH }, /* # */ + { 0, 0, 0, 0, 0x00 } +}; + +static inline void Help1 (GtkWidget *w, gpointer data) +{ + gchar *indx = g_strdup_printf ("/%s/gnokii/xgnokii/xkeyb/index.htm", xgnokiiConfig.locale); + Help (w, indx); + g_free (indx); +} + + +static GtkWidget *GetPixmap (void) +{ + GtkWidget *wpixmap; + GdkPixmap *pixmap; + GdkBitmap *mask; + gchar *file; + + if (!strcmp (phoneMonitor.phone.model, "6110") || + !strcmp (phoneMonitor.phone.model, "6120")) + { + button = button_6110; + file = g_strdup_printf ("%s%s", xgnokiiConfig.xgnokiidir, "/xpm/6110.xpm"); + } + else if (!strcmp (phoneMonitor.phone.model, "6130") || + !strcmp (phoneMonitor.phone.model, "6150") || + !strcmp (phoneMonitor.phone.model, "616x") || + !strcmp (phoneMonitor.phone.model, "6185") || + !strcmp (phoneMonitor.phone.model, "6190")) + { + button = button_6150; + file = g_strdup_printf ("%s%s", xgnokiiConfig.xgnokiidir, "/xpm/6150.xpm"); + } + else if (!strcmp (phoneMonitor.phone.model, "5110") || + !strcmp (phoneMonitor.phone.model, "5130") || + !strcmp (phoneMonitor.phone.model, "5160") || + !strcmp (phoneMonitor.phone.model, "5190")) + { + button = button_5110; + file = g_strdup_printf ("%s%s", xgnokiiConfig.xgnokiidir, "/xpm/5110.xpm"); + } + else + return NULL; + + pixmap = gdk_pixmap_create_from_xpm (pixArea->window, &mask, + &pixArea->style->bg[GTK_STATE_NORMAL], + file); + g_free (file); + + if (pixmap == NULL) + return NULL; + + wpixmap = gtk_pixmap_new (pixmap, mask); + + return wpixmap; +} + + +static inline void CloseXkeyb (GtkWidget *w, gpointer data) +{ + gtk_widget_hide (GUI_XkeybWindow); +} + + +void GUI_ShowXkeyb (void) +{ + if (phonePixmap == NULL) + { + phonePixmap = GetPixmap (); + if (phonePixmap != NULL) + { + gtk_fixed_put (GTK_FIXED (pixArea), phonePixmap, 0 , 0); + gtk_widget_show (phonePixmap); + } + else + { + gtk_label_set_text (GTK_LABEL (errorDialog.text), + _("Cannot load background pixmap!")); + gtk_widget_show (errorDialog.dialog); + } + } + gtk_widget_show (GUI_XkeybWindow); +} + + +static gint ButtonEvent (GtkWidget *widget, GdkEventButton *event) +{ + unsigned char req[] = {0x00,0x00}; + register gint i = 0; + + if (button == NULL) + return TRUE; + + if (event->button != 1) + return TRUE; + + if (event->type == GDK_BUTTON_PRESS) + req[0] = PRESSPHONEKEY; + else if (event->type == GDK_BUTTON_RELEASE) + req[0] = RELEASEPHONEKEY; + else + return TRUE; + +// g_print ("%f %f\n", event->x, event->y); + + while (button[i].top_left_x != 0) { + if (button[i].top_left_x <= event->x && + event->x <= button[i].bottom_right_x && + button[i].top_left_y <= event->y && + event->y <= button[i].bottom_right_y) + { + PhoneEvent *e = g_malloc (sizeof (PhoneEvent)); + + req[1]=button[i].code; + e->event = Event_SendKeyStroke; + e->data = g_memdup (req, sizeof (req)); + GUI_InsertEvent (e); + } + + i++; + } + + return TRUE; +} + + +static GtkItemFactoryEntry menu_items[] = { + {NULL, NULL, NULL, 0, ""}, + {NULL, "W", CloseXkeyb, 0, NULL}, + {NULL, NULL, NULL, 0, ""}, + {NULL, NULL, Help1, 0, NULL}, + {NULL, NULL, GUI_ShowAbout, 0, NULL}, +}; + +static void InitMainMenu (void) +{ + menu_items[0].path = g_strdup (_("/_File")); + menu_items[1].path = g_strdup (_("/File/_Close")); + menu_items[2].path = g_strdup (_("/_Help")); + menu_items[3].path = g_strdup (_("/Help/_Help")); + menu_items[4].path = g_strdup (_("/Help/_About")); +} + + +void GUI_CreateXkeybWindow (void) +{ + int nmenu_items = sizeof (menu_items) / sizeof (menu_items[0]); + GtkItemFactory *item_factory; + GtkAccelGroup *accel_group; + GtkWidget *menubar; + GtkWidget *main_vbox; + + InitMainMenu (); + GUI_XkeybWindow = gtk_window_new (GTK_WINDOW_TOPLEVEL); + gtk_window_set_title (GTK_WINDOW (GUI_XkeybWindow), _("XGnokii Keyboard")); + //gtk_widget_set_usize (GTK_WIDGET (GUI_XkeybWindow), 436, 220); + gtk_signal_connect (GTK_OBJECT (GUI_XkeybWindow), "delete_event", + GTK_SIGNAL_FUNC (DeleteEvent), NULL); + gtk_widget_realize (GUI_XkeybWindow); + + accel_group = gtk_accel_group_new (); + item_factory = gtk_item_factory_new (GTK_TYPE_MENU_BAR, "
", + accel_group); + + gtk_item_factory_create_items (item_factory, nmenu_items, menu_items, NULL); + + gtk_accel_group_attach (accel_group, GTK_OBJECT (GUI_XkeybWindow)); + + /* Finally, return the actual menu bar created by the item factory. */ + menubar = gtk_item_factory_get_widget (item_factory, "
"); + + main_vbox = gtk_vbox_new (FALSE, 1); + gtk_container_border_width (GTK_CONTAINER (main_vbox), 1); + gtk_container_add (GTK_CONTAINER (GUI_XkeybWindow), main_vbox); + gtk_widget_show (main_vbox); + + gtk_box_pack_start (GTK_BOX (main_vbox), menubar, FALSE, FALSE, 0); + gtk_widget_show (menubar); + + pixArea = gtk_fixed_new (); + gtk_signal_connect (GTK_OBJECT (pixArea), "button_press_event", + (GtkSignalFunc) ButtonEvent, NULL); + gtk_signal_connect (GTK_OBJECT (pixArea), "button_release_event", + (GtkSignalFunc) ButtonEvent, NULL); + gtk_widget_set_events (pixArea, GDK_EXPOSURE_MASK + | GDK_LEAVE_NOTIFY_MASK + | GDK_BUTTON_PRESS_MASK + | GDK_BUTTON_RELEASE_MASK + | GDK_POINTER_MOTION_MASK + | GDK_POINTER_MOTION_HINT_MASK); + + gtk_box_pack_start (GTK_BOX (main_vbox), pixArea, FALSE, FALSE, 3); + gtk_widget_show (pixArea); + + CreateErrorDialog (&errorDialog, GUI_XkeybWindow); +} diff --git a/xgnokii/xgnokii_xkeyb.h b/xgnokii/xgnokii_xkeyb.h new file mode 100644 index 0000000..6060e09 --- /dev/null +++ b/xgnokii/xgnokii_xkeyb.h @@ -0,0 +1,18 @@ +/* + + X G N O K I I + + A Linux/Unix GUI for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#ifndef XGNOKII_XKEYB_H +#define XGNOKII_XKEYB_H + +extern void GUI_CreateXkeybWindow (); + +extern void GUI_ShowXkeyb (); + +#endif diff --git a/xgnokii/xgnokii_xring.c b/xgnokii/xgnokii_xring.c new file mode 100644 index 0000000..e586b78 --- /dev/null +++ b/xgnokii/xgnokii_xring.c @@ -0,0 +1,554 @@ +#include +#include +#include +#include +#include +#include +#include +#include + +#include "misc.h" +#include "gsm-common.h" +#include "gsm-api.h" +#include "gsm-ringtones.h" + +#include "xgnokii_xring.h" +#include "xgnokii_common.h" +#include "xgnokii_lowlevel.h" +#include "xgnokii.h" + +#include "xpm/Send.xpm" + +static GtkWidget *GUI_RingtonesWindow; + +GtkWidget * blacks[WHITE_COUNT - 1]; +GtkWidget * whites[WHITE_COUNT]; + +int pressed; + +PixmapAndMask pam[KIE_COUNT]; + +GSM_Ringtone ringtone; + +char xwhi[] = { 6, 4, 2, 6, 4, 4, 2 }; + +/* Bitmaps for keyboard */ +static + char * blackparts[] = { + ".+@@@@@@@@@@@@+.", + "+.+@@@@@@@@@@+.+", + "@+.+@@@@@@@@+.+@", + "@@+.+@@@@@@+.+@@", + "@@@+........+@@@", + "@@@@........@@@@" + }; + +static + char * whitestarts[][3] = { + { " ++++++++++++++++", + " +..............+", + "+++++++++..............+" }, + { + " ++++++++ ", + " +......+ ", + "+++++++++......+++++++++" }, + { + "++++++++++++++++ ", + "+..............+ ", + "+..............+++++++++" }}; + + +static + char * whiteend[] = { + "+......................+", + "+@....................@+", + "+@@..................@@+", + "++@@@..............@@@++", + "++++++++++++++++++++++++" + }; + +static inline void CloseRingtonesWindow (void) { + gtk_widget_hide(GUI_RingtonesWindow); +} + +static GtkItemFactoryEntry ringtonesMenuItems[] = { + { NULL, NULL, NULL, 0, ""}, + { NULL, "O", NULL, 0, NULL}, + { NULL, "S", NULL, 0, NULL}, + { NULL, NULL, NULL, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "T", NULL, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "C", CloseRingtonesWindow, 0, NULL}, + { NULL, NULL, NULL, 0, ""}, + { NULL, "S", NULL, 0, NULL}, + { NULL, "H", NULL, 0, NULL}, +}; + +static void InitRingtonesMenu (void) { + ringtonesMenuItems[0].path = g_strdup(_("/_File")); + ringtonesMenuItems[1].path = g_strdup(_("/File/_Open")); + ringtonesMenuItems[2].path = g_strdup(_("/File/_Save")); + ringtonesMenuItems[3].path = g_strdup(_("/File/Save _as ...")); + ringtonesMenuItems[4].path = g_strdup(_("/File/Sep1")); + ringtonesMenuItems[5].path = g_strdup(_("/File/Se_t ringtone")); + ringtonesMenuItems[6].path = g_strdup(_("/File/Sep2")); + ringtonesMenuItems[7].path = g_strdup(_("/File/_Close")); + ringtonesMenuItems[8].path = g_strdup(_("/_Edit")); + ringtonesMenuItems[9].path = g_strdup(_("/Edit/_Set ringtone name")); + ringtonesMenuItems[10].path = g_strdup(_("/Edit/S_how in Composer")); +} + +/* Add created pixmap to widget */ +static int createpixmap(GtkWidget * widget, PixmapAndMask * pam, char ** a) +{ + GtkStyle * style = gtk_widget_get_default_style(); + pam->pixmap = gdk_pixmap_create_from_xpm_d(widget->window, + &pam->mask, + &style->bg[GTK_STATE_NORMAL], + a); + return (int)pam->pixmap; /* (to) NULL or not (to) NULL */ +} + +static void writecolors(char * buf0, char * col0, + char * buf1, char * col1, + char * buf2, char * col2) +{ + sprintf(buf0, ". c #%s", col0); + sprintf(buf1, "+ c #%s", col1); + sprintf(buf2, "@ c #%s", col2); +} + +/* Creates white pixmap in the keyboard */ +int KeyboardCreateWhitePixmap(GtkWidget * window, PixmapAndMask * pam, + char * start[], char * color0, char * color1, char * color2) +{ + int i = 0, j = 0; + char * a[160 + 5]; + char col0[20]; + char col1[20]; + char col2[20]; + + a[i++] = "24 160 4 1"; + a[i++] = " c None"; + writecolors(col0, color0, col1, color1, col2, color2); + a[i++] = col0; + a[i++] = col1; + a[i++] = col2; + + a[i++] = start[0]; + for (j = 0; j < 99; j++) + a[i++] = start[1]; + a[i++] = start[2]; + + for (j = 0; j < 54; j++) + a[i++] = whiteend[0]; + + a[i++] = whiteend[1]; + a[i++] = whiteend[1]; + a[i++] = whiteend[2]; + a[i++] = whiteend[3]; + a[i++] = whiteend[4]; + + assert(i == 165); + + return createpixmap(window, pam, a); + +} + +/* Creates black pixmap in the keyboard */ +int KeyboardCreateBlackPixmap(GtkWidget * window, PixmapAndMask * pam, + char * color0, char * color1, char * color2) +{ + int i = 0, j = 0; + char * a[160 + 4]; + char col0[20]; + char col1[20]; + char col2[20]; + + a[i++] = "16 100 3 1"; + writecolors(col0, color0, col1, color1, col2, color2); + a[i++] = col0; + a[i++] = col1; + a[i++] = col2; + + for (j = 0; j < 5; j++) a[i++] = blackparts[j]; + for (j = 0; j < 90; j++) a[i++] = blackparts[5]; + for (j = 4; j >= 0; j--) a[i++] = blackparts[j]; + + assert(i == 104); + + return createpixmap(window, pam, a); +} + +static void KeyboardSetPixmap(int flag) +{ + int i = pressed & ~(BLACK_PRESSED|WHITE_PRESSED); + int j; + + if (pressed & BLACK_PRESSED) + { + j = flag? KIE_BLACKSEL: KIE_BLACK; + gtk_pixmap_set(GTK_PIXMAP(blacks[i]),pam[j].pixmap, pam[j].mask); + } + else + { + j = xwhi[i % 7] + (flag? 1: 0); + gtk_pixmap_set(GTK_PIXMAP(whites[i]),pam[j].pixmap, pam[j].mask); + } +} + +static void KeyboardSendTune() +{ + /* frequencies generated with: + perl -e 'print int(4400 * (2 **($_/12)) + .5)/10, "\n" for(3..14)' + */ + struct { + float wf; + float bf; + } notefreq[7] = { + { 523.3, 554.4 }, //C + { 587.3, 622.3 }, //D + { 659.3, 0 }, //E + { 698.5, 740 }, //F + { 784 , 830.6 }, //G + { 880 , 932.3 }, //A + { 987.8, 0 } //H + }; + + int i=pressed; + + int j, r; + float freq; + + if (i) { + j = (i & BLACK_PRESSED)? 1: 0; + + i &= ~(BLACK_PRESSED|WHITE_PRESSED); + + freq = j? notefreq[i % 7].bf: notefreq[i % 7].wf; + + switch (i / 7) + { + case 0: r = (int)(freq / 2.0); break; + case 2: r = (int)(freq * 2.0); break; + default: r = (int)(freq); break; + } + + GSM->PlayTone(r,100); + + } else { + + GSM->PlayTone(0,0); + + } +} + +/* One drawn key was released */ +static gint KeyboardButtonRelease(GtkWidget *widget, GdkEvent *event, gpointer data) +{ + KeyboardSetPixmap(FALSE); + + pressed = 0; + + KeyboardSendTune(); + + return TRUE; +} + +/* One drawn key was pressed */ +static gint KeyboardButtonPress(GtkWidget *widget, GdkEvent *event, gpointer data) +{ + GdkEventButton * e = (GdkEventButton *)event; + int i; + + if (!pressed) + { + guint x = e->x; + guint y = e->y; + + if (y < 100) /* possible black pressed... */ + for ( i = 0; i < WHITE_COUNT - 1; i++) + if (blacks[i] && x - 16 - 24 * i < 16) + { + pressed = i | BLACK_PRESSED; + KeyboardSetPixmap(TRUE); + KeyboardSendTune(); + return TRUE; + } + for ( i = 0; i < WHITE_COUNT; i++) /* whites ? */ + if (x - 24 * i < 24) + { + pressed = i | WHITE_PRESSED; + KeyboardSetPixmap(TRUE); + KeyboardSendTune(); + return TRUE; + } + } + return TRUE; +} + +void GUI_CreateRingtonesWindow (void) +{ + int nMenuItems = sizeof (ringtonesMenuItems) / sizeof (ringtonesMenuItems[0]); + GtkAccelGroup *accelGroup; + GtkItemFactory *itemFactory; + GtkWidget *menuBar; + GtkWidget *vbox; + GtkWidget *hbox, *hbox2; + GtkWidget *melody; + GtkWidget *buttons, *buttons2; + GtkWidget *separator; + GtkWidget *toolBar; + GtkWidget *label, *note1, *note2, *note3, *note4, *note5; + GtkWidget *label2, *button, *button2, *button3, *button4, *button5, + *button6, *button7, *button8, *button9, *button10, *button11, *button12; + + GtkWidget *keyboard; + + int i; + + InitRingtonesMenu(); + + /* realize top level window for logos */ + GUI_RingtonesWindow = gtk_window_new(GTK_WINDOW_TOPLEVEL); + gtk_window_set_policy(GTK_WINDOW(GUI_RingtonesWindow),1,1,1); + gtk_window_set_title(GTK_WINDOW(GUI_RingtonesWindow),_("Ringtones")); + gtk_signal_connect(GTK_OBJECT(GUI_RingtonesWindow),"delete_event", + GTK_SIGNAL_FUNC(DeleteEvent),NULL); + gtk_widget_set_usize(GUI_RingtonesWindow,630,320); + gtk_widget_realize(GUI_RingtonesWindow); + + accelGroup = gtk_accel_group_new(); + gtk_accel_group_attach(accelGroup,GTK_OBJECT(GUI_RingtonesWindow)); + + /* create main vbox */ + vbox = gtk_vbox_new(FALSE,1); + gtk_container_add(GTK_CONTAINER(GUI_RingtonesWindow),vbox); + gtk_widget_show(vbox); + + itemFactory = gtk_item_factory_new(GTK_TYPE_MENU_BAR,"
",accelGroup); + gtk_item_factory_create_items(itemFactory,nMenuItems,ringtonesMenuItems,NULL); + menuBar = gtk_item_factory_get_widget(itemFactory,"
"); + + gtk_box_pack_start(GTK_BOX(vbox),menuBar,FALSE,FALSE,0); + gtk_widget_show(menuBar); + + /* toolbar */ + toolBar = gtk_toolbar_new(GTK_ORIENTATION_HORIZONTAL,GTK_TOOLBAR_ICONS); + gtk_toolbar_set_button_relief(GTK_TOOLBAR(toolBar),GTK_RELIEF_NORMAL); + gtk_toolbar_set_style(GTK_TOOLBAR(toolBar),GTK_TOOLBAR_ICONS); + + gtk_toolbar_append_item(GTK_TOOLBAR(toolBar),NULL,"Set ringtone",NULL, + NewPixmap(Send_xpm,GUI_RingtonesWindow->window, + &GUI_RingtonesWindow->style->bg[GTK_STATE_NORMAL]), + (GtkSignalFunc)NULL,toolBar); + + gtk_box_pack_start(GTK_BOX(vbox),toolBar,FALSE,FALSE,0); + gtk_widget_show(toolBar); + + /* vertical separator */ + separator = gtk_hseparator_new(); + gtk_box_pack_start(GTK_BOX(vbox),GTK_WIDGET(separator),FALSE,FALSE,0); + + /* Melody drawing area */ + melody = gtk_drawing_area_new(); + gtk_drawing_area_size(GTK_DRAWING_AREA(melody), 20,100); + + gtk_box_pack_start(GTK_BOX(vbox),melody,FALSE,FALSE,0); + gtk_widget_show(melody); + + /* create horizontal box for keyboard and buttons area */ + hbox = gtk_hbox_new(FALSE,5); + gtk_box_pack_start(GTK_BOX(vbox),hbox,FALSE,FALSE,0); + gtk_widget_show(hbox); + + /* Box for buttons */ + hbox2 = gtk_hbox_new(FALSE,5); + gtk_box_pack_start(GTK_BOX(hbox),hbox2,FALSE,FALSE,0); + gtk_widget_set_usize( hbox2, 120, 160 ); + gtk_widget_show(hbox2); + + /* Buttons with notes length */ + buttons = gtk_vbox_new(FALSE,3); + gtk_box_pack_start(GTK_BOX(hbox2),buttons,FALSE,FALSE,0); + + label = gtk_label_new (_("Length")); + gtk_box_pack_start (GTK_BOX(buttons), label, FALSE, FALSE, 3); + + note1 = gtk_radio_button_new_with_label (NULL, _("1")); + gtk_box_pack_end (GTK_BOX (buttons), note1, TRUE, FALSE, 2); + gtk_widget_show (note1); + + note2 = gtk_radio_button_new_with_label (NULL, _("1/2")); + gtk_box_pack_end (GTK_BOX (buttons), note2, TRUE, FALSE, 2); + gtk_widget_show (note2); + + note3 = gtk_radio_button_new_with_label (NULL, _("1/4")); + gtk_box_pack_end (GTK_BOX (buttons), note3, TRUE, FALSE, 2); + gtk_widget_show (note3); + gtk_widget_show(buttons); + + note4 = gtk_radio_button_new_with_label (NULL, _("1/16")); + gtk_box_pack_end (GTK_BOX (buttons), note4, TRUE, FALSE, 2); + gtk_widget_show (note4); + + note5 = gtk_radio_button_new_with_label (NULL, _("1/32")); + gtk_box_pack_end (GTK_BOX (buttons), note5, TRUE, FALSE, 2); + gtk_widget_show (note5); + + gtk_widget_show (buttons); + + /* Buttons with notes length */ + buttons2 = gtk_vbox_new(FALSE,3); + gtk_box_pack_start(GTK_BOX(hbox2),buttons2,FALSE,FALSE,0); + + label2 = gtk_label_new (_("Note")); + gtk_box_pack_start (GTK_BOX(buttons2), label2, FALSE, FALSE, 3); + + button = gtk_button_new_with_label (_("C")); + gtk_box_pack_start (GTK_BOX (buttons2), button, TRUE, FALSE, 0); +// gtk_signal_connect (GTK_OBJECT (button), "clicked", +// GTK_SIGNAL_FUNC (HideCallDialog), (gpointer) inCallDialog.dialog); +// GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); +// gtk_widget_grab_default (button); + gtk_widget_show (button); + + button3 = gtk_button_new_with_label (_("D")); + gtk_box_pack_start (GTK_BOX (buttons2), button3, TRUE, FALSE, 0); +// gtk_signal_connect (GTK_OBJECT (button), "clicked", +// GTK_SIGNAL_FUNC (HideCallDialog), (gpointer) inCallDialog.dialog); +// GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); +// gtk_widget_grab_default (button3); + gtk_widget_show (button); + + button5 = gtk_button_new_with_label (_("E")); + gtk_box_pack_start (GTK_BOX (buttons2), button5, TRUE, FALSE, 0); +// gtk_signal_connect (GTK_OBJECT (button), "clicked", +// GTK_SIGNAL_FUNC (HideCallDialog), (gpointer) inCallDialog.dialog); +// GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); +// gtk_widget_grab_default (button); + gtk_widget_show (button5); + + button6 = gtk_button_new_with_label (_("F")); + gtk_box_pack_start (GTK_BOX (buttons2), button6, TRUE, FALSE, 0); +// gtk_signal_connect (GTK_OBJECT (button), "clicked", +// GTK_SIGNAL_FUNC (HideCallDialog), (gpointer) inCallDialog.dialog); +// GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); +// gtk_widget_grab_default (button); + gtk_widget_show (button6); + + button8 = gtk_button_new_with_label (_("G")); + gtk_box_pack_start (GTK_BOX (buttons2), button8, TRUE, FALSE, 0); +// gtk_signal_connect (GTK_OBJECT (button), "clicked", +// GTK_SIGNAL_FUNC (HideCallDialog), (gpointer) inCallDialog.dialog); +// GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); +// gtk_widget_grab_default (button); + gtk_widget_show (button8); + + button10 = gtk_button_new_with_label (_("A")); + gtk_box_pack_start (GTK_BOX (buttons2), button10, TRUE, FALSE, 0); +// gtk_signal_connect (GTK_OBJECT (button), "clicked", +// GTK_SIGNAL_FUNC (HideCallDialog), (gpointer) inCallDialog.dialog); +// GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); +// gtk_widget_grab_default (button); + gtk_widget_show (button10); + + button12 = gtk_button_new_with_label (_("H")); + gtk_box_pack_start (GTK_BOX (buttons2), button12, TRUE, FALSE, 0); +// gtk_signal_connect (GTK_OBJECT (button), "clicked", +// GTK_SIGNAL_FUNC (HideCallDialog), (gpointer) inCallDialog.dialog); +// GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); +// gtk_widget_grab_default (button); + gtk_widget_show (button12); + + gtk_widget_show (label2); + + button2 = gtk_button_new_with_label (_("Cis")); + gtk_box_pack_start (GTK_BOX (buttons2), button2, TRUE, FALSE, 0); +// gtk_signal_connect (GTK_OBJECT (button), "clicked", +// GTK_SIGNAL_FUNC (HideCallDialog), (gpointer) inCallDialog.dialog); +// GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); +// gtk_widget_grab_default (button); + gtk_widget_show (button2); + + button4 = gtk_button_new_with_label (_("Dis")); + gtk_box_pack_start (GTK_BOX (buttons2), button4, TRUE, FALSE, 0); +// gtk_signal_connect (GTK_OBJECT (button), "clicked", +// GTK_SIGNAL_FUNC (HideCallDialog), (gpointer) inCallDialog.dialog); +// GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); +// gtk_widget_grab_default (button); + gtk_widget_show (button4); + + button7 = gtk_button_new_with_label (_("Fis")); + gtk_box_pack_start (GTK_BOX (buttons2), button7, TRUE, FALSE, 0); +// gtk_signal_connect (GTK_OBJECT (button), "clicked", +// GTK_SIGNAL_FUNC (HideCallDialog), (gpointer) inCallDialog.dialog); +// GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); +// gtk_widget_grab_default (button); + gtk_widget_show (button7); + + button9 = gtk_button_new_with_label (_("Gis")); + gtk_box_pack_start (GTK_BOX (buttons2), button9, TRUE, FALSE, 0); +// gtk_signal_connect (GTK_OBJECT (button), "clicked", +// GTK_SIGNAL_FUNC (HideCallDialog), (gpointer) inCallDialog.dialog); +// GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); +// gtk_widget_grab_default (button); + gtk_widget_show (button9); + + button11 = gtk_button_new_with_label (_("Ais")); + gtk_box_pack_start (GTK_BOX (buttons2), button11, TRUE, FALSE, 0); +// gtk_signal_connect (GTK_OBJECT (button), "clicked", +// GTK_SIGNAL_FUNC (HideCallDialog), (gpointer) inCallDialog.dialog); +// GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT); +// gtk_widget_grab_default (button); + gtk_widget_show (button11); + + gtk_widget_show (buttons2); + + /* Keyboard */ + keyboard = gtk_fixed_new(); + gtk_widget_set_usize( keyboard, 504, 160 ); + gtk_box_pack_start(GTK_BOX(hbox),keyboard,FALSE,FALSE,0); + + gtk_signal_connect(GTK_OBJECT (keyboard), "button_press_event", + GTK_SIGNAL_FUNC (KeyboardButtonPress), &hbox); + gtk_signal_connect(GTK_OBJECT (keyboard), "button_release_event", + GTK_SIGNAL_FUNC (KeyboardButtonRelease), &hbox); + + gtk_widget_add_events(keyboard, GDK_FOCUS_CHANGE_MASK| + GDK_BUTTON_PRESS_MASK|GDK_BUTTON_RELEASE_MASK); + + KeyboardCreateBlackPixmap(hbox, &pam[KIE_BLACK], "333333", "666666", "999999"); + KeyboardCreateBlackPixmap(hbox, &pam[KIE_BLACKSEL], "000000", "333333", "666666"); + + for (i = 0; i < 6; i += 2) + { + KeyboardCreateWhitePixmap(hbox, &pam[KIE_WHITEL + i], + whitestarts[i / 2], "FFFFFF", "999999", "CCCCCC"); + KeyboardCreateWhitePixmap(hbox, &pam[KIE_WHITELSEL + i], + whitestarts[i / 2], "CCCCCC", "666666", "999999"); + } + + for (i = 0; i < WHITE_COUNT - 1; i++) + { + PixmapAndMask * b = &pam[KIE_BLACK]; + if (xwhi[i % 7] == 2) continue; + blacks[i] = gtk_pixmap_new( b->pixmap, b->mask ); + gtk_fixed_put( GTK_FIXED(keyboard), blacks[i], 16 + 24 * i, 0 ); + } + + for (i = 0; i < WHITE_COUNT; i++) + { + int j = xwhi[i % 7]; + whites[i] = gtk_pixmap_new( pam[j].pixmap, pam[j].mask ); + gtk_fixed_put( GTK_FIXED(keyboard), whites[i], 24 * i, 0 ); + } + + gtk_widget_show(keyboard); +} + +void GUI_ShowRingtonesWindow (void) +{ + gtk_widget_show_all(GUI_RingtonesWindow); +} diff --git a/xgnokii/xgnokii_xring.h b/xgnokii/xgnokii_xring.h new file mode 100644 index 0000000..fd450c6 --- /dev/null +++ b/xgnokii/xgnokii_xring.h @@ -0,0 +1,38 @@ +/* + + X G N O K I I + + A Linux/Unix GUI for Nokia mobile phones. + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +#ifndef XGNOKII_XRING_H +#define XGNOKII_XRING_H + +#include + +enum { + KIE_BLACK, KIE_BLACKSEL, + KIE_WHITEL, KIE_WHITELSEL, + KIE_WHITEM, KIE_WHITEMSEL, + KIE_WHITER, KIE_WHITERSEL, + KIE_COUNT +}; + +#define WHITE_COUNT 21 /* how many keys on the keyboard */ + +#define BLACK_PRESSED 64 +#define WHITE_PRESSED 128 + +typedef struct +{ + GdkPixmap * pixmap; + GdkBitmap * mask; +} PixmapAndMask; + +extern void GUI_ShowRingtonesWindow (); +extern void GUI_CreateRingtonesWindow (); + +#endif diff --git a/xgnokii/xpm/6110mini.xpm b/xgnokii/xpm/6110mini.xpm new file mode 100644 index 0000000..4eee2e6 --- /dev/null +++ b/xgnokii/xpm/6110mini.xpm @@ -0,0 +1,68 @@ +/* XPM */ +static char *icon6110mini_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 18 45 16 1", +/* colors */ +". c #ffffff", +"# c #e0e6f3", +"a c #bfcce5", +"b c #bfc0bc", +"c c #90a6d3", +"d c #899c77", +"e c #8b8eba", +"f c #6571a2", +"g c #4066b3", +"h c #48607d", +"i c #5a5c44", +"j c #3f5266", +"k c #2c304e", +"l c #003399", +"m c #2a2a22", +"n c #081116", +/* pixels */ +"..................", +".............#b...", +".............mna..", +".............mna..", +".............nnb..", +".............mnb..", +"......bbbbb#.nnb..", +"....bnkfeeeb#bmb..", +"....nnhfffeea#bb..", +"...dnkhffffeiiab..", +"...mnkhhhkjffjcb..", +"..#nkjhchknheaca..", +"..bnkjhefjhhfbcb..", +"..bnkhfhffffeacb..", +"..enmmmnnnmmkheb..", +"..hnnnniiiinnnna..", +"..hnnnnmmmmmmnna..", +"..eni#bbbdbbbdnb..", +"..hndbdimidnmdnc..", +"..fni#dniiiiddnc..", +"..enibimiiiiidnc..", +"..enidddddidddnc..", +"..enmddddddddinc..", +"..eknmmmmmmmmnje..", +"..ekknkknnnkhhhe..", +"..emmmmjjihnkkhe..", +"..enknnmnnjknhhf..", +"..enkkknmmmhhhhf..", +"..enmiknnnmkiijf..", +"..eknnmkhjhmmmhe..", +"..ekmmkjjjjhjffe..", +"..enmikkmikjmije..", +"..eknnjjknjfjkfe..", +"..ckiikkiijjidhe..", +"..bkmmkkmnkhmmhe..", +"..bkmkjjjkhhhffe..", +"..aniikmiikjmijc..", +"..aknnjjknjfkkhb..", +"..akmkkkiijjjdhb..", +"..annnkkmnkhmmjb..", +"..akkkjjjjhhhhhb..", +"..#kkkkjjjjjhhhb..", +"..#nmkkkkkjjjhkb..", +"...jnnnnnnnnnnj...", +"....#........#...." +}; diff --git a/xgnokii/xpm/BCard.xpm b/xgnokii/xpm/BCard.xpm new file mode 100644 index 0000000..f761ea9 --- /dev/null +++ b/xgnokii/xpm/BCard.xpm @@ -0,0 +1,26 @@ +/* XPM */ +static char * BCard_xpm[] = { +"16 16 7 1", +" s None c None", +". c steelblue1", +"X c black", +"o c white", +"O c gray60", +"+ c gray45", +"@ c gray85", +" ", +" ............ ", +" .X.X.X..X.X. ", +" ............ ", +" .oooooooooo. ", +" .oO+OoOOooo. ", +" .ooo+Ooo++O. ", +" .o++Ooooooo. ", +" .oooOoO@@oo. ", +" .oO++@@OOOo. ", +" .oooooooooo. ", +" ............ ", +" ", +" ", +" ", +" "}; diff --git a/xgnokii/xpm/Black_point.xpm b/xgnokii/xpm/Black_point.xpm new file mode 100644 index 0000000..a573b79 --- /dev/null +++ b/xgnokii/xpm/Black_point.xpm @@ -0,0 +1,13 @@ +/* XPM */ +static char * Black_point_xpm[] = { +"7 7 3 1", +" c None", +". c #397939", +"+ c #000000", +".......", +".+++++.", +".+++++.", +".+++++.", +".+++++.", +".+++++.", +"......."}; diff --git a/xgnokii/xpm/Caller.xpm b/xgnokii/xpm/Caller.xpm new file mode 100644 index 0000000..8a5dd95 --- /dev/null +++ b/xgnokii/xpm/Caller.xpm @@ -0,0 +1,50 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This is the icon for CallerLogo. + + Last modification: Sat Jul 24 14:30:37 CEST 1999 + Modified by Pavel Janík ml. + +*/ + +static char *Caller_xpm[] = { + +"20 19 7 1", + +"* c #000000", +"# c #800000", +"b c #008000", +"c c #00ff00", +"i c #808080", +" c None", +"l c #ffffff", + +" ", +" ", +" ********* ", +" *********** ", +" ** ** ", +" ** ", +" ** ", +" ** ", +" ** ", +" ** ", +" ** ", +" ** ", +" ** ", +" ** ** ", +" *********** ", +" ********* ", +" ", +" ", +" " +}; diff --git a/xgnokii/xpm/Caller_logo.xpm b/xgnokii/xpm/Caller_logo.xpm new file mode 100644 index 0000000..2546503 --- /dev/null +++ b/xgnokii/xpm/Caller_logo.xpm @@ -0,0 +1,31 @@ +/* XPM */ +static char * Caller_logo_xpm[] = { +"20 19 9 1", +" c None", +". c #000000", +"+ c #808080", +"@ c #FFFFFF", +"# c #00FF00", +"$ c #008000", +"% c #0B256B", +"& c #D4D0C8", +"* c #86000A", +" ", +" ", +" . ", +" . ", +" .... .....+ ", +" .++++. ...... ", +" .............@+ ", +" .#$$.....+.++%+ ", +" . $$....+@+@@@+ ", +" .......+@%+@@@+ ", +" ......@@@@++@+ ", +" ......@@@@+&.+ ", +" ......+...+@++ ", +" ......@@+.***** ", +" ......%++%**++ ", +" ......%%%%+ ", +" .... ", +" ", +" "}; diff --git a/xgnokii/xpm/Check.xpm b/xgnokii/xpm/Check.xpm new file mode 100644 index 0000000..511bbee --- /dev/null +++ b/xgnokii/xpm/Check.xpm @@ -0,0 +1,25 @@ +/* XPM */ +static char * Check_xpm[] = { +"16 17 5 1", +" c None", +". c black", +"X c gray50", +"o c gray85", +"# c white", +" . . ", +" ... ", +" X.....X ", +" XX.....XX ", +" ..#...X.. ", +" X.#.XXX...X ", +" ...#..o...... ", +" .....o..... ", +" .....o..... ", +" .X....o....X. ", +" ....o.... ", +" .X...o...X. ", +" X..o..X ", +" XoX ", +" ", +" ", +" "}; diff --git a/xgnokii/xpm/Delete.xpm b/xgnokii/xpm/Delete.xpm new file mode 100644 index 0000000..b8824ac --- /dev/null +++ b/xgnokii/xpm/Delete.xpm @@ -0,0 +1,36 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Jan Derfinak + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +static char * Delete_xpm[] = { +"16 17 4 1", +" c None", +". c red", +"X c gray50", +"o c black", +" ", +" . ", +" ..X ... ", +" ..X ..... ", +" .......oo ", +" .....o ", +" ....o ", +" ...... ", +" ..o ... ", +" ..o ... ", +" .o ..X ", +" .o .o ", +" o o ", +" ", +" ", +" ", +" "}; diff --git a/xgnokii/xpm/Dial.xpm b/xgnokii/xpm/Dial.xpm new file mode 100644 index 0000000..c076d65 --- /dev/null +++ b/xgnokii/xpm/Dial.xpm @@ -0,0 +1,34 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Jan Derfinak + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +/* XPM */ +static char * Dial_xpm[] = { +"14 16 2 1", +" c None", +". c #0000FFFF0000", +" .... ", +" ....... ", +" ......... ", +"........... ", +"..... ...... ", +" ... ..... ", +" . .....", +" ....", +" .....", +" ......", +" .... ", +" .. ", +" ", +" ", +" ", +" "}; diff --git a/xgnokii/xpm/Display.xpm b/xgnokii/xpm/Display.xpm new file mode 100644 index 0000000..4a80808 --- /dev/null +++ b/xgnokii/xpm/Display.xpm @@ -0,0 +1,115 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Jan Derfinak + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +/* XPM */ +static char * Display_xpm[] = { +"109 96 3 1", +" c #000000000000", +". c #FFFFFFFFFFFF", +"X c #0000DF7D0000", +" ", +" ", +" ", +" ", +" ... . .. ... .... ... ... ... ... ", +" . .. .. . .. .. . . . . ", +" . . .. . . . . . . . ", +" . . . . . . . . . . ", +" . ... . . . . . ... . . ", +" . . . . . . . . .. . . ", +" . . . . . . . . .. . . ", +" . .. . .. .. .. . .. . . ", +" .... ... . .... ... ...... ... ", +" ", +" ", +" ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX ", +" ", +" ", +" "}; diff --git a/xgnokii/xpm/Duplicate.xpm b/xgnokii/xpm/Duplicate.xpm new file mode 100644 index 0000000..87b60d9 --- /dev/null +++ b/xgnokii/xpm/Duplicate.xpm @@ -0,0 +1,36 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Jan Derfinak + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ +static char * Duplicate_xpm[] = { +"16 18 4 1", +" c None", +". c black", +"X c gray50", +"o c white", +" ....... ", +" .XXXXXX. ", +" .......XXX. ", +" .ooooo..XXX. ", +" .ooooo.o.XX. ", +" .ooooo....X. ", +" .oooooooo.X. ", +" .oooooooo.X. ", +" .oooooooo.X. ", +" .oooooooo.X. ", +" .oooooooo.X. ", +" .oooooooo.X. ", +" .oooooooo.X. ", +" .oooooooo... ", +" .oooooooo. ", +" .......... ", +" ", +" "}; diff --git a/xgnokii/xpm/Edit.xpm b/xgnokii/xpm/Edit.xpm new file mode 100644 index 0000000..4b1ebc8 --- /dev/null +++ b/xgnokii/xpm/Edit.xpm @@ -0,0 +1,37 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Jan Derfinak + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +static char * Edit_xpm[] = { +"16 17 5 1", +" c #84207BDE7BDE", +". c None", +"X c #FFFFFFFFFFFF", +"o c #000000000000", +"O c #52945294FFFF", +" .......", +" XXXXXXX o......", +" X X Xo....O", +" XXXXXXX ooo..OO", +" X XXXXo.OOo", +" XXXXXXXXXXoOOo.", +" X XOOo..", +" XXXXXXXXXOOo...", +" X oOo....", +" XXXXXXXoooo....", +" X oooXo....", +" XXXXXoXXXXo....", +" XXXXXXXXXXo....", +"oooooooooooo....", +"................", +"................", +"................"}; diff --git a/xgnokii/xpm/Edit_flip_horizontal.xpm b/xgnokii/xpm/Edit_flip_horizontal.xpm new file mode 100644 index 0000000..11dcff2 --- /dev/null +++ b/xgnokii/xpm/Edit_flip_horizontal.xpm @@ -0,0 +1,26 @@ +/* XPM */ +static char * Edit_flip_horizontal_xpm[] = { +"20 19 4 1", +" c None", +". c #000000", +"+ c #35773A", +"@ c #5ACA62", +" ", +" ", +" ", +" . . ", +" .. .. ", +" .+. . . ", +" .+. . . ", +" .@+. . . ", +" .@+. . . ", +" .@@+. . . ", +" .@@+. . . ", +" .@@@+. . . ", +" .@@@+. . . ", +" .@@@@+. . . ", +" ....... ....... ", +" ", +" ", +" ", +" "}; diff --git a/xgnokii/xpm/Edit_flip_vertical.xpm b/xgnokii/xpm/Edit_flip_vertical.xpm new file mode 100644 index 0000000..ad0a951 --- /dev/null +++ b/xgnokii/xpm/Edit_flip_vertical.xpm @@ -0,0 +1,26 @@ +/* XPM */ +static char * Edit_flip_vertical_xpm[] = { +"20 19 4 1", +" c None", +". c #000000", +"+ c #5ACA62", +"@ c #35773A", +" ", +" ", +" .. ", +" .+.. ", +" .+++.. ", +" .+++++.. ", +" .+++++++.. ", +" .@@@@@@@@@. ", +" ............ ", +" ", +" ............ ", +" . . ", +" . .. ", +" . .. ", +" . .. ", +" . .. ", +" .. ", +" ", +" "}; diff --git a/xgnokii/xpm/Edit_invert.xpm b/xgnokii/xpm/Edit_invert.xpm new file mode 100644 index 0000000..ae63410 --- /dev/null +++ b/xgnokii/xpm/Edit_invert.xpm @@ -0,0 +1,26 @@ +/* XPM */ +static char * Edit_invert_xpm[] = { +"20 19 4 1", +" c None", +". c #000000", +"+ c #5ACA62", +"@ c #35773A", +" ", +" ", +" ........... .. ", +" .+++++++++. . ", +" .+++++++++. . ", +" .+++@@@+++. . . . ", +" .+++@@@+++. ... ", +" .+++++++++. . ", +" .+++++++++. ", +" ................ ", +" .@@@@@@@@@. ", +" . .@@@@@@@@@. ", +" ... .@@@+++@@@. ", +" . . . .@@@+++@@@. ", +" . .@@@@@@@@@. ", +" . .@@@@@@@@@. ", +" .. ........... ", +" ", +" "}; diff --git a/xgnokii/xpm/Flip.xpm b/xgnokii/xpm/Flip.xpm new file mode 100644 index 0000000..a37801f --- /dev/null +++ b/xgnokii/xpm/Flip.xpm @@ -0,0 +1,24 @@ +/* XPM */ +static char * Flip_xpm[] = { +"20 18 3 1", +" c None", +". c #000000", +"+ c #FFFFFF", +" ", +" ", +" ", +" ", +" ", +" ", +" . . ", +" .. .. ", +" .............. ", +" ...++++++++++... ", +" .............. ", +" .. .. ", +" . . ", +" ", +" ", +" ", +" ", +" "}; diff --git a/xgnokii/xpm/Forward.xpm b/xgnokii/xpm/Forward.xpm new file mode 100644 index 0000000..57786ec --- /dev/null +++ b/xgnokii/xpm/Forward.xpm @@ -0,0 +1,24 @@ +/* XPM */ +static char *Forward_xpm[]={ +"16 16 5 1", +"c c #ffa858", +"a c #c3c3c3", +"b c #000000", +". c None", +"# c #ff0000", +".####a..........", +".#.aaa..........", +".###..a......a..", +".#aa..a.b...aa..", +".#a....abb.aa...", +".#a....ab#ba....", +".a......b##b....", +"bbbbbbbbb###b...", +"#############b..", +"bbbbbbbbb###bc..", +".cccccccb##bc...", +"........b#bc....", +"........bbc.....", +"........bc......", +"........c.......", +"................"}; diff --git a/xgnokii/xpm/Green_pixel.xpm b/xgnokii/xpm/Green_pixel.xpm new file mode 100644 index 0000000..693ed9c --- /dev/null +++ b/xgnokii/xpm/Green_pixel.xpm @@ -0,0 +1,6 @@ +/* XPM */ +static char * Green_pixel_xpm[] = { +"1 1 2 1", +" c None", +". c #5ACA62", +"."}; diff --git a/xgnokii/xpm/Green_point.xpm b/xgnokii/xpm/Green_point.xpm new file mode 100644 index 0000000..0f479a7 --- /dev/null +++ b/xgnokii/xpm/Green_point.xpm @@ -0,0 +1,13 @@ +/* XPM */ +static char * Green_point_xpm[] = { +"7 7 3 1", +" c None", +". c #397939", +"+ c #5ACA62", +".......", +".+++++.", +".+++++.", +".+++++.", +".+++++.", +".+++++.", +"......."}; diff --git a/xgnokii/xpm/Invert.xpm b/xgnokii/xpm/Invert.xpm new file mode 100644 index 0000000..cd9fbb2 --- /dev/null +++ b/xgnokii/xpm/Invert.xpm @@ -0,0 +1,46 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This is the logo of the GUI utility. + + Last modification: Sat Jul 24 14:30:37 CEST 1999 + Modified by Pavel Janík ml. + +*/ + +static char *Invert_xpm[] = { + +"20 18 4 1", + +"* c #000000", +" c None", +"b c #dfdfdf", +". c #ffffff", + +" ", +" ******** ", +" *......** ", +" *......*.* ", +" *......**** ", +" *.........* ", +" *.........* ", +" *********** ", +" *********** ", +" *********** ", +" *********** ", +" *********** ", +" *********** ", +" *********** ", +" ", +" ", +" ", +" " +}; diff --git a/xgnokii/xpm/Names.xpm b/xgnokii/xpm/Names.xpm new file mode 100644 index 0000000..a3533a6 --- /dev/null +++ b/xgnokii/xpm/Names.xpm @@ -0,0 +1,21 @@ +/* XPM */ +static char * Names_xpm[] = { +"16 14 4 1", +" c None", +". c black", +"X c gray50", +"o c white", +" .. ", +" .Xo. ... ", +" .Xoo. ..oo. ", +" .Xooo.Xooo... ", +" .Xooo.oooo.X. ", +" .Xooo.Xooo.X. ", +" .Xooo.oooo.X. ", +" .Xooo.Xooo.X. ", +" .Xooo.oooo.X. ", +" .Xoo.Xoo..X. ", +" .Xo.o..ooX. ", +" .X..XXXXX. ", +" ..X....... ", +" .. "}; diff --git a/xgnokii/xpm/New.xpm b/xgnokii/xpm/New.xpm new file mode 100644 index 0000000..0aa41d1 --- /dev/null +++ b/xgnokii/xpm/New.xpm @@ -0,0 +1,45 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This is the icon for New. + + Last modification: Sat Jul 24 14:30:37 CEST 1999 + Modified by Pavel Janík ml. + +*/ + +static char *New_xpm[] = { + +"20 18 3 1", + +"* c #000000", +" c None", +". c #ffffff", + +" ", +" ******** ", +" *......** ", +" *......*.* ", +" *......**** ", +" *.........* ", +" *.........* ", +" *.........* ", +" *.........* ", +" *.........* ", +" *.........* ", +" *.........* ", +" *.........* ", +" *********** ", +" ", +" ", +" ", +" " +}; diff --git a/xgnokii/xpm/NewBD.xpm b/xgnokii/xpm/NewBD.xpm new file mode 100644 index 0000000..6b94a0a --- /dev/null +++ b/xgnokii/xpm/NewBD.xpm @@ -0,0 +1,47 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This is the icon for Open. + + Last modification: Wed Jun 14 18:04:00 CEST 2000 + Modified by Marcel Köppen + +*/ + +static char*NewBD_xpm[]={ +"20 18 9 1", +"d c #ffa858", +"e c #c05800", +"# c #000000", +"g c #ff8000", +"b c #ffff00", +"f c #ffdca8", +"c c #0000ff", +". c None", +"a c #ffffff", +"....................", +"...##########.......", +"...#aaaaaaaa##......", +"...#aaaaaaaa#a#.....", +"...#aaaaaaaa####....", +"...#aaaaabaaaaa#....", +"...#aaabacabaaa#....", +"...#aaacacacaaa#....", +"...#aaacccacaaa#....", +"...#aadcdcdceaa#....", +"...#adfcfcfcfea#....", +"...#aeeeeeeeeea#....", +"...#adggdddggea#....", +"...#adggdddggea#....", +"...#aaeeeeeeeaa#....", +"...#aaaaaaaaaaa#....", +"...#############....", +"...................."}; diff --git a/xgnokii/xpm/NewCall.xpm b/xgnokii/xpm/NewCall.xpm new file mode 100644 index 0000000..3f1fef0 --- /dev/null +++ b/xgnokii/xpm/NewCall.xpm @@ -0,0 +1,41 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This is the icon for Open. + + Last modification: Wed Jun 14 18:04:00 CEST 2000 + Modified by Marcel Köppen + +*/ + +static char*NewCall_xpm[]={ +"20 18 3 1", +"# c #000000", +". c None", +"a c #ffffff", +"....................", +"...##########.......", +"...#aaaaaaaa##......", +"...#aaaaaaaa#a#.....", +"...#aaaaaaaa####....", +"...#aa###aaaaaa#....", +"...#a######aaaa#....", +"...#a#######aaa#....", +"...#aa##a####aa#....", +"...#aaaaaa###aa#....", +"...#aaaaaaa###a#....", +"...#aaaaaa####a#....", +"...#aaaaaa####a#....", +"...#aaaaaaa##aa#....", +"...#aaaaaaaaaaa#....", +"...#aaaaaaaaaaa#....", +"...#############....", +"...................."}; diff --git a/xgnokii/xpm/NewMeet.xpm b/xgnokii/xpm/NewMeet.xpm new file mode 100644 index 0000000..826b18e --- /dev/null +++ b/xgnokii/xpm/NewMeet.xpm @@ -0,0 +1,41 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This is the icon for Open. + + Last modification: Wed Jun 14 18:04:00 CEST 2000 + Modified by Marcel Köppen + +*/ + +static char*NewMeet_xpm[]={ +"20 18 3 1", +"# c #000000", +". c None", +"a c #ffffff", +"....................", +"...##########.......", +"...#aaaaaaaa##......", +"...#aaaaaaaa#a#.....", +"...#aaaaaaaa####....", +"...#aaaaaaaaaaa#....", +"...#aaaaaaaaaaa#....", +"...#aaaaaaaaaaa#....", +"...#aa#aaaaa#aa#....", +"...#aaa#aaa#aaa#....", +"...#a####a####a#....", +"...#aaa#aaa#aaa#....", +"...#aa#aaaaa#aa#....", +"...#aaaaaaaaaaa#....", +"...#aaaaaaaaaaa#....", +"...#aaaaaaaaaaa#....", +"...#############....", +"...................."}; diff --git a/xgnokii/xpm/NewRem.xpm b/xgnokii/xpm/NewRem.xpm new file mode 100644 index 0000000..1363893 --- /dev/null +++ b/xgnokii/xpm/NewRem.xpm @@ -0,0 +1,43 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This is the icon for Open. + + Last modification: Wed Jun 14 18:04:00 CEST 2000 + Modified by Marcel Köppen + +*/ + +static char*NewRem_xpm[]={ +"20 18 5 1", +"c c #c3c3c3", +"# c #000000", +"b c #ffff00", +". c None", +"a c #ffffff", +"....................", +"...##########.......", +"...#aaaaaaaa##......", +"...#aaaaaaaa#a#.....", +"...#aaaaaaaa####....", +"...#aaaaaaaaaaa#....", +"...#aaaa###aaaa#....", +"...#aaa#bbb#aaa#....", +"...#aa#bbbbb#aa#....", +"...#aa#bbbbb#aa#....", +"...#aa#bbbbb#aa#....", +"...#aaa#bbb#aaa#....", +"...#aaa#ccc#aaa#....", +"...#aaaa#c#aaaa#....", +"...#aaaa###aaaa#....", +"...#aaaaaaaaaaa#....", +"...#############....", +"...................."}; diff --git a/xgnokii/xpm/Op.xpm b/xgnokii/xpm/Op.xpm new file mode 100644 index 0000000..31c9fd6 --- /dev/null +++ b/xgnokii/xpm/Op.xpm @@ -0,0 +1,50 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This is the icon for Operator Logo. + + Last modification: Sat Jul 24 14:30:37 CEST 1999 + Modified by Pavel Janík ml. + +*/ + +static char *Op_xpm[] = { + +"20 19 7 1", + +"* c #000000", +"# c #800000", +"b c #008000", +"c c #00ff00", +"i c #808080", +" c None", +"l c #ffffff", + +" ", +" ", +" ********** ", +" ************ ", +" ** ** ", +" ** ** ", +" ** ** ", +" ** ** ", +" ** ** ", +" ** ** ", +" ** ** ", +" ** ** ", +" ** ** ", +" ** ** ", +" ************ ", +" ********** ", +" ", +" ", +" " +}; diff --git a/xgnokii/xpm/Open.xpm b/xgnokii/xpm/Open.xpm new file mode 100644 index 0000000..e3d9cd2 --- /dev/null +++ b/xgnokii/xpm/Open.xpm @@ -0,0 +1,47 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This is the icon for Open. + + Last modification: Sat Jul 24 14:30:37 CEST 1999 + Modified by Pavel Janík ml. + +*/ + +static char *Open_xpm[] = { + +"20 18 5 1", + +"* c #000000", +". c #808000", +"a c #ffff00", +" c None", +"e c #ffffff", + +" ", +" *** ", +" * * * ", +" ** ", +" *** *** ", +" *eae******* ", +" *aeaeaeaea* ", +" *eaeaeaeae* ", +" *aeae********** ", +" *eae*.........* ", +" *ae*.........* ", +" *e*.........* ", +" **.........* ", +" *********** ", +" ", +" ", +" ", +" " +}; diff --git a/xgnokii/xpm/Operator_logo.xpm b/xgnokii/xpm/Operator_logo.xpm new file mode 100644 index 0000000..67ee2af --- /dev/null +++ b/xgnokii/xpm/Operator_logo.xpm @@ -0,0 +1,27 @@ +/* XPM */ +static char * Operator_logo_xpm[] = { +"20 19 5 1", +" c None", +". c #000000", +"+ c #808080", +"@ c #00FF00", +"# c #008000", +" ", +" ", +" . ", +" . ", +" .... ", +" .++++. ", +" ...... ....... ", +" .@##.. . . ", +" . ##.. ..... ", +" ...... . . ", +" ...... ", +" ...... ..... ", +" ...... . . . ", +" ...... ... ", +" ...... . ", +" ...... . ", +" .... . ", +" ", +" "}; diff --git a/xgnokii/xpm/Read.xpm b/xgnokii/xpm/Read.xpm new file mode 100644 index 0000000..2db3e37 --- /dev/null +++ b/xgnokii/xpm/Read.xpm @@ -0,0 +1,41 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Jan Derfinak + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +static char * Read_xpm[] = { +"13 19 7 1", +" c None", +". c #000000000000", +"X c #861782078617", +"o c #61859A694924", +"O c #000082070000", +"+ c #C71BC30BC71B", +"@ c #FFFFFBEEFFFF", +" ", +" . ", +" . ", +" .... ", +" .XXXX. ", +" ...... ", +" .oOO.. ", +" .+OO.. ", +" ...... ", +" .X.... ", +" . .@..... ", +" .. .@@+.... ", +" .@.@@+..... ", +" .@@@+.X.... ", +" .@@+..X.... ", +" .++++..... ", +" ....... ", +" ", +" "}; diff --git a/xgnokii/xpm/Reply.xpm b/xgnokii/xpm/Reply.xpm new file mode 100644 index 0000000..a6c1296 --- /dev/null +++ b/xgnokii/xpm/Reply.xpm @@ -0,0 +1,24 @@ +/* XPM */ +static char*Reply_xpm[]={ +"16 16 5 1", +"b c #ffa858", +"c c #c3c3c3", +"# c #000080", +"a c #000000", +". c None", +".####.....aaaa..", +".#..#.....a##ab.", +".#..#.....a##ab.", +".###c.....a##ab.", +".#c#c.....a##ab.", +".#.c#.....a##ab.", +".#..#c....a##ab.", +"....a.....a##ab.", +"...aa.....a##ab.", +"..a#aaaaaaa##ab.", +".a###########ab.", +"a############ab.", +".a###########ab.", +"..a#aaaaaaaaaab.", +"...aabbbbbbbbbb.", +"....a....ccc...."}; diff --git a/xgnokii/xpm/Save.xpm b/xgnokii/xpm/Save.xpm new file mode 100644 index 0000000..da91c44 --- /dev/null +++ b/xgnokii/xpm/Save.xpm @@ -0,0 +1,45 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This is the icon for Save. + + Last modification: Sat Jul 24 14:30:37 CEST 1999 + Modified by Pavel Janík ml. + +*/ + +static char *Save_xpm[] = { + +"20 18 3 1", + +"* c #000000", +"# c #808000", +" c None", + +" ", +" ************** ", +" *#* * * ", +" *#* *** ", +" *#* *#* ", +" *#* *#* ", +" *#* *#* ", +" *#* *#* ", +" *##********##* ", +" *############* ", +" *##*********#* ", +" *##****** *#* ", +" *##****** *#* ", +" *##****** *#* ", +" ************* ", +" ", +" ", +" " +}; diff --git a/xgnokii/xpm/Send.xpm b/xgnokii/xpm/Send.xpm new file mode 100644 index 0000000..cdcf4c8 --- /dev/null +++ b/xgnokii/xpm/Send.xpm @@ -0,0 +1,50 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This is the icon for Send. + + Last modification: Sat Jul 24 14:30:37 CEST 1999 + Modified by Pavel Janík ml. + +*/ + +static char *Send_xpm[] = { + +"20 19 7 1", + +"* c #000000", +"# c #800000", +"b c #008000", +"c c #00ff00", +"i c #808080", +" c None", +"l c #ffffff", + +" ", +" * ", +" * ", +" **** ", +" *iiii* ", +" ****** ", +" *cbb** ", +" * bb** ", +" ****** ", +" *********** ", +" *lll ***** ", +" *ll ***** ", +" *lll ***** ", +" *ll * ***** ", +" *ll * ****** ", +" * * **** ", +" * ", +" ", +" " +}; diff --git a/xgnokii/xpm/SendSMS.xpm b/xgnokii/xpm/SendSMS.xpm new file mode 100644 index 0000000..cc7d6f1 --- /dev/null +++ b/xgnokii/xpm/SendSMS.xpm @@ -0,0 +1,24 @@ +/* XPM */ +static char * SendSMS_xpm[] = { +"16 17 4 1", +" c None", +". c black", +"X c white", +"o c gray50", +" ", +" ", +" ............. ", +" .XXXXXXXXXXX.o ", +" ..XXXXXXXXX..o ", +" .X.XXXXXXX.X.o ", +" .XX.XXXXX.XX.o ", +" .XX..XXX..XX.o ", +" .X.XX...XX.X.o ", +" ..XXXXXXXXX..o ", +" .............o ", +" ooooooooooooo ", +" ", +" ", +" ", +" ", +" "}; diff --git a/xgnokii/xpm/Startup.xpm b/xgnokii/xpm/Startup.xpm new file mode 100644 index 0000000..af78ec9 --- /dev/null +++ b/xgnokii/xpm/Startup.xpm @@ -0,0 +1,50 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This is the icon for Startup Logo. + + Last modification: Sat Jul 24 14:30:37 CEST 1999 + Modified by Pavel Janík ml. + +*/ + +static char *Startup_xpm[] = { + +"20 19 7 1", + +"* c #000000", +"# c #800000", +"b c #008000", +"c c #00ff00", +"i c #808080", +" c None", +"l c #ffffff", + +" ", +" ", +" ********* ", +" *********** ", +" ** ** ", +" ** ", +" ** ", +" * ", +" ********** ", +" ********** ", +" ** ", +" ** ", +" ** ", +" ** ** ", +" *********** ", +" ********* ", +" ", +" ", +" " +}; diff --git a/xgnokii/xpm/Startup_logo.xpm b/xgnokii/xpm/Startup_logo.xpm new file mode 100644 index 0000000..ca707b1 --- /dev/null +++ b/xgnokii/xpm/Startup_logo.xpm @@ -0,0 +1,32 @@ +/* XPM */ +static char * Startup_logo_xpm[] = { +"20 19 10 1", +" c None", +". c #000000", +"+ c #808080", +"@ c #00FF00", +"# c #008000", +"$ c #009D00", +"% c #1C5CFF", +"& c #FFFF1E", +"* c #913615", +"= c #0B256B", +" ", +" ", +" . ", +" . ", +" .... ", +" .++++. ... ", +" ...... . ", +" .@##.. ... ", +" . ##.. . ", +" ...... ", +" ...... .......... ", +" ...... .$$$%%%&&. ", +" ...... .$*$%%%%&. ", +" ...... .%*%%%%%%. ", +" ...... .****====. ", +" ...... .***=====. ", +" .... .......... ", +" ", +" "}; diff --git a/xgnokii/xpm/Tool_brush.xpm b/xgnokii/xpm/Tool_brush.xpm new file mode 100644 index 0000000..eb5dea9 --- /dev/null +++ b/xgnokii/xpm/Tool_brush.xpm @@ -0,0 +1,26 @@ +/* XPM */ +static char * Tool_brush_xpm[] = { +"20 19 4 1", +" c None", +". c #000000", +"+ c #949194", +"@ c #FFFFFF", +" ", +" ", +" ", +" .... ", +" . . ", +" . . ", +" .. .+ ", +" .@@...+ ", +" .@ .++ ", +" .@@ .+ ", +" .@ .++ ", +" .@@ .+ ", +" .@ .++ ", +" .. .+ ", +" ....++ ", +" ...++ ", +" ..++ ", +" .++ ", +" "}; diff --git a/xgnokii/xpm/Tool_filled_rectangle.xpm b/xgnokii/xpm/Tool_filled_rectangle.xpm new file mode 100644 index 0000000..ad4a15f --- /dev/null +++ b/xgnokii/xpm/Tool_filled_rectangle.xpm @@ -0,0 +1,24 @@ +/* XPM */ +static char * Tool_filled_rectangle_xpm[] = { +"20 19 2 1", +" c None", +". c #000000", +" ", +" ", +" ", +" .............. ", +" .............. ", +" .............. ", +" .............. ", +" .............. ", +" .............. ", +" .............. ", +" .............. ", +" .............. ", +" .............. ", +" .............. ", +" .............. ", +" ", +" ", +" ", +" "}; diff --git a/xgnokii/xpm/Tool_line.xpm b/xgnokii/xpm/Tool_line.xpm new file mode 100644 index 0000000..936a666 --- /dev/null +++ b/xgnokii/xpm/Tool_line.xpm @@ -0,0 +1,24 @@ +/* XPM */ +static char * Tool_line_xpm[] = { +"20 19 2 1", +" c None", +". c #000000", +" ", +" ", +" ", +" ", +" . ", +" . ", +" . ", +" . ", +" . ", +" . ", +" . ", +" . ", +" . ", +" . ", +" . ", +" ", +" ", +" ", +" "}; diff --git a/xgnokii/xpm/Tool_rectangle.xpm b/xgnokii/xpm/Tool_rectangle.xpm new file mode 100644 index 0000000..d60065e --- /dev/null +++ b/xgnokii/xpm/Tool_rectangle.xpm @@ -0,0 +1,24 @@ +/* XPM */ +static char * Tool_rectangle_xpm[] = { +"20 19 2 1", +" c None", +". c #000000", +" ", +" ", +" ", +" .............. ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" . . ", +" .............. ", +" ", +" ", +" ", +" "}; diff --git a/xgnokii/xpm/alarm.xpm b/xgnokii/xpm/alarm.xpm new file mode 100644 index 0000000..efb08be --- /dev/null +++ b/xgnokii/xpm/alarm.xpm @@ -0,0 +1,36 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This icon is used for alarm notification. + + Last modification: Sat Jul 10 21:30:28 CEST 1999 + Modified by Pavel Janík ml. + +*/ + +static char *XPM_alarm[] = { + +"9 9 3 1", + +" c None", +"# c #000000", +"+ c #d0dae8", + +"#########", +"## # ##", +"# # #", +"# # #", +"# ### #", +"# #", +"# #", +"## ##", +"#########" +}; diff --git a/xgnokii/xpm/background.xpm b/xgnokii/xpm/background.xpm new file mode 100644 index 0000000..3f5922e --- /dev/null +++ b/xgnokii/xpm/background.xpm @@ -0,0 +1,247 @@ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This is the background of the GUI. + + Copyright (C) 1999 Petr Vostøel + + Last modification: Sat Jun 26 07:30:06 CEST 1999 + Modified by Pavel Janík ml. + +*/ + +/* XPM */ +static char *XPM_background[] = { +"261 96 129 2", +" c None", +". c #FFFFFF", +"+ c #FCFCFC", +"@ c #F9F9F9", +"# c #F9F2F2", +"$ c #F4EAEA", +"% c #F3F3F3", +"& c #EEF2F7", +"* c #EEF1F7", +"= c #EDF1F6", +"- c #EDEDED", +"; c #EBEFF5", +"> c #E8EDF4", +", c #E8CECD", +"' c #E6EBF3", +") c #E6E6E6", +"! c #DFE6EF", +"~ c #DEDEDE", +"{ c #DCE4EE", +"] c #D9E1ED", +"^ c #D7DFEB", +"/ c #D6DEEB", +"( c #D6D6D6", +"_ c #D3DCE9", +": c #D2ADAC", +"< c #D1DBE9", +"[ c #D0DAE8", +"} c #CFD9E8", +"| c #CF9A98", +"1 c #CECECE", +"2 c #CDD8E6", +"3 c #CAD5E5", +"4 c #C9C9C9", +"5 c #C7C5C5", +"6 c #C6D2E3", +"7 c #C5CEDB", +"8 c #C2CFE1", +"9 c #C1C1C1", +"0 c #C0C9D6", +"a c #BFCCDF", +"b c #BF7C7B", +"c c #BDC6D3", +"d c #BBC9DD", +"e c #BABABA", +"f c #B8C7DC", +"g c #B8C0CB", +"h c #B7C6DC", +"i c #B6C6DB", +"j c #B4C4DA", +"k c #B3C3DA", +"l c #B3BBC7", +"m c #B2C2D9", +"n c #B2B2B2", +"o c #B10707", +"p c #AF5F5D", +"q c #ACB4BF", +"r c #ABABAB", +"s c #A5ADB8", +"t c #A4A4A4", +"u c #A23C3A", +"v c #9BA3AD", +"w c #9B9B9B", +"x c #949494", +"y c #939AA4", +"z c #8C929C", +"A c #8B8B8B", +"B c #848383", +"C c #7D838B", +"D c #7B7B7B", +"E c #786463", +"F c #757B83", +"G c #757575", +"H c #725655", +"I c #6F7070", +"J c #6F0302", +"K c #6A6A6A", +"L c #686D74", +"M c #656565", +"N c #61666C", +"O c #606161", +"P c #5C5C5C", +"Q c #575B61", +"R c #575758", +"S c #545454", +"T c #505151", +"U c #4E4F4F", +"V c #4C4C4C", +"W c #4B2726", +"X c #484848", +"Y c #446BA4", +"Z c #444444", +"` c #4369A1", +" . c #41669C", +".. c #414449", +"+. c #404040", +"@. c #3D6194", +"#. c #3D3D3D", +"$. c #393939", +"%. c #385886", +"&. c #37393D", +"*. c #353535", +"=. c #34527E", +"-. c #344F69", +";. c #324E78", +">. c #303031", +",. c #2E4970", +"'. c #2D0201", +"). c #2C2C2D", +"!. c #2B4468", +"~. c #292929", +"{. c #273E5E", +"]. c #252525", +"^. c #233755", +"/. c #212121", +"(. c #1F314B", +"_. c #1B2B42", +":. c #1B1B1B", +"<. c #162336", +"[. c #151515", +"}. c #0F1A29", +"|. c #0E0E0E", +"1. c #08121E", +"2. c #080D14", +"3. c #08090B", +"4. c #040506", +"5. c #012343", +"6. c #000000", +"7. c #FFFFFF", +"8. c #000000", +" [.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.[.8.8.8.8. ", +" 8.8.|.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8. ", +" 8.8.8.8.8.3.Z w e r G [.w e r 8.*.e A 8.8.S r e G [.8.w e G [.r e M A e A A e A 8.8.8.8.8.G e r Z 8.8.8.8.8.8.8.G M G M 8.8.8.8.8.8.8.G M 8.8.8.8.8.8.8.8.8.8.8.8.8.r e e w *.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.[.G e r Z 8.8.8.8.8.8.8.G M 8.8.8.8.8.8.8.1._.,.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.@.%.;.!.^._.}.2.8.8.8.8. ", +" 8.8.8.}.(.(.2.8.G . . . . - [.. . . [.M . A 8.w . . . . e 8.. . G G . ~ [.. . G . . G 8.8.8.8.w 1 S S /.8.8.8.8.8.8.8.~ Z ~ Z 8.8.8.8.8.8.8.~ Z 8.8.8.8.8.8.8.8.8.8.8.8.8.. G Z r ~ 8.8.8.8.8.8.8.[.[.8.8.8.8.8.8.8.8.8.8.1 r Z M /.8.8.8.8.8.8.8.r S 8.[.[.8.8.8.8.8.8.1.!.Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y ` ` .@.=.!._.}.4.8.8.8. ", +" 8.8.2._.;. .=.1.8.Z . . G 8.[.+.[.. . . S G . G Z . . Z M . . ).. . G . . +.[.. . D . . G 8.8.8.Z - [.8.8.8.8.8.8.8.8.8.8.. *.. *.8.8.8.8.8.8.8.. *.8.8.8.8.8.8.8.8.8.8.8.8.*.. *.8.[.. Z 8.8.8.8.8.[.. [.8.8.8.8.8.8.8.8.8.*.. [.8.8.8.8.8.8.8.8.8.8.8.8.[.. [.8.8.8.8.8.8.8.1.=.Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y ` ` =.{.<.3.8.8.8. ", +" 8.8.2.^.=.Y Y Y (.8.8.w . ~ 8.8.8.8.+.. . . G r . Z r . 1 8.Z . . G . . - . A 8.+.. . G . . Z 8.8.8.w w 8.8.8.8.8.G - . A 8.*.. *.. 8.M 1 8.8.e M *.. 8.A - . e 8.Z . e M 8.8.8.+.. 8.8.8.. Z A - . e 8.1 - e *.A - . e 8.8.8.8.*.. I 8.8.8.M 1 8.8.e M *.. [.4 - e *.G - . A 8.8.8.(.Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y ` =.^.1.4.8.8. ", +" 8.3.(.=.Y Y Y Y Y 1.8.8.~ . w G . . . A . A . e e . *.- . w 8.S . . A . . . . /.8.M . . D . . /.8.8.8.~ G 8.8.8.8.G e [.*.. *.T ~ S ~ 8.G r 8.8.- Z S ~ 8./.8.S . 8.M 1 [.8.8.8.8.G 1 8.8.[.. *.:.8.S . 8.M e 8.8./.8.S . 8.8.8.8.8.M - ~ S 8.G r 8.8.- Z +.- 8.M e 8.G e [.*.. *.8.8.1.Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y @.%.=.;.,.!.!.!.!.!.!.,.;.=.%.@.` Y Y Y Y Y Y Y Y @.!.<.3.8.8. ", +" 8.8.}.,.` Y Y Y Y Y Y 8.8.8.. . G Z w . . G . G 1 . - . 8.. . G 8.A . . G . - . . G 8.G . . G . . 8.8.8.8.. Z 8.8.8.8.~ r I G . +.G e G e 8.r G 8.8.. [.G e *.~ . ~ 1 8.G w 8.8.8.8.8.A e 8.8.+.. *.~ . ~ 1 8.G w 8.*.~ . ~ 1 8.8.8.8.8.8.[.w . /.r G 8.8.. [.G e 8.G w 8.~ r I G . +.8.8.8.Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y @.;.{._.}.1.2.4.8.8.8.8.8.8.8.8.4.3.1.}.<.^.,.%.` Y Y Y Y Y Y .,.<.3.8.8. ", +" 8.8._.%.Y Y Y Y Y Y Y Y 1.8.8.- . w 8.S . - r . Z w . . ~ 8.- . A 8.~ . w r . e e . ~ 8.r . 1 r . 1 8.8.8.8.. Z 8.8.8.8.. w G G G [.w G w G 8.1 S 8.Z . 8.w G ~ w 8.G r 8.r G 8.8.8.8.8.e G 8.8.A r ~ w 8.G r 8.r G 8.~ w 8.G r 8.8.8.8.8.8.8.8.. Z 1 S 8.Z . 8.w A 8.r G 8.. w G G G [.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.}.;.` Y Y Y Y Y Y Y Y Y Y Y Y Y Y @.!._.1.3.8.|.+.I A t r n n n n r r t x A I T ].|.4.1.<.{.%.` Y Y Y Y Y @.!.}.8.8. ", +" 8.4.{. .Y Y Y Y Y Y Y %.{.2.8.8.w . . 1 ~ . e e . *.O . . e 8.w . - 1 . - /.e . r M . . Z e . e e . e 8.8.8.8.r r [.[.*.8.~ w [.[.:.8.e G e G 8.. S 8.G 1 8.e G . M [.r G 8.e S 8.8.8.8.8.1 G 8.S - *.. M [.r G 8.e M 8.. M [.r G 8.8.8.8.S [.[.A 1 8.. S 8.G 1 8.e G 8.e M 8.~ w [.[.:.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.}.;.` Y Y Y Y Y Y Y Y Y Y ` ;.(.1.4.4.Z B n 9 9 9 9 e e e n n n r r t t t w w x x D S ].4.2._.,. .Y Y Y Y Y @.^.2.8.8. ", +" 8.3.!.` Y Y Y Y Y Y %.^.2.8.8.8.8.[.w - . ~ w S . . 8.*.. . A 8.[.w . . r /.8.. . G [.. . w . . G . . G 8.8.8.8.*.e . ( S 8.*.( . - M 8.- Z - Z 8.A . ~ 1 e 8.- Z G . e 1 M 8.. Z 8.8.8.8.8.. . . 1 Z 8.G . e 1 M 8.r . G G . e 1 M 8.8.8.8.r . . r /.8.A . ~ 1 e 8.- Z 8.r . G *.( . - M 8.8./.v [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ v &.}.;.` Y Y Y Y Y Y Y Y .,.<.3.8.#.A e 4 5 5 9 9 9 9 e e e n n n r r t t t w w x x A A B D V :.4.}.!.@.Y Y Y Y ` ;.<.8.8. ", +" 8.4.!.Y Y Y Y Y Y Y !.}.8.8.].N N /.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8./.v > * = ' ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ y ).8.}.;.` Y Y Y Y Y Y ` ;.<.4.3.P r 4 4 4 4 5 5 5 9 9 9 e e e n n n r r t t t w w x x A A B B D D P ).4.}.!. .Y Y Y Y @.(.3.[. ", +" 8.8.{.Y Y Y Y Y Y @._.8.8./.I l [ [ v O ~.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.2.X g * & & & & & { [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ z /.8.}.;.` Y Y Y Y Y Y %.(.3.4.M e 1 1 1 4 4 4 5 5 9 9 e e e n r t w w w t t t w w w x x A A B B D D G I P ~.4.<.=.Y Y Y Y ` !.1.8. ", +" 8.8._.` Y Y Y Y Y %.<.8.8.R s [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ ] m m m m m m m d * & & & & & * [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ z /.8.<.%.` Y Y Y Y Y ` ,.}.8.V n 1 1 1 4 1 4 4 5 9 e n r r t t w w x x x A x w t w w w x x A A B B D D I K K M U :.2.{.@.Y Y Y Y =.}.8. ", +" |.}.@.Y Y Y Y Y %.<.8.:.F } [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < < } 3 3 3 / [ [ [ [ [ < < < < < < < < < < < < [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 6 m m m m m m m k ! & & & & & * [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ y /.8.<.%.Y Y Y Y Y Y @.(.3.:.x 1 1 1 1 1 1 4 5 5 9 n r r t t r w x r ( ) 4 x B w w w x x x A A A B B D D I I M M P P *.3._.%.Y Y Y Y %.}.8. ", +" 8.3.,.Y Y Y Y Y =.<.8.).z [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < < 6 m m m m m m m k 2 < [ [ ^ } [ [ [ [ [ [ [ [ [ < < [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 3 i m m m m m m m k / & & & & & * [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ v ).8.}.%.Y Y Y Y Y Y %.<.4.S e 1 1 1 1 1 1 5 e n n r r n 4 ~ @ . w x . . . . x G A x x x A A A A B B B D D G K K O P R S X [.1.,.Y Y Y Y @.<.8. ", +" 8._.` Y Y Y Y %.<.8.).y [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 3 d m m m m m m m m m m m h 2 _ k m m m m m m m m m m k _ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 8 m m m m m m m k ] & & & & & * [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ q &.8.}.%.` Y Y Y Y Y =.}.8.D 4 1 1 1 1 1 4 5 e n r r r n . . . @ 1 A e . - I A M M D B B B B B B B B B D D D G I M O P R T V V /.2.!.Y Y Y Y @.<.8. ", +" |.1.%.Y Y Y Y Y _.8.:.z [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < < d m m m m m m m m m m m m m m j 8 j m m m m m m m m m m 6 < [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < < m m m m m m m k ; & & & & & = [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 0 T 8.}.;.` Y Y Y Y Y ;.1.|.w 4 1 4 1 1 4 4 4 e n e ) . 9 x 4 ~ . @ O P x . . % t S X R I G G G G D D D D D D G I K K M P R T V Z +.~.3.{.Y Y Y Y @.}.8. ", +" 8.^.Y Y Y Y Y !.8.8.F [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 3 m m m m m m m m m m m m m m m m m m m m m m m m m m m m m 2 [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ ] 6 m m m m m k ] & & & & & & ' [ [ [ [ [ [ [ [ [ [ [ [ [ [ 3 L 8.3.!.` Y Y Y Y Y ;.1.:.t 4 4 4 4 4 5 5 9 9 r t % . ) w I O B . . O *.>.t . . . r ].~.R P P O M M K I I I I I I K K O P R T X Z #.$.).|.{.` Y Y Y =.1.|. ", +" [.2.%.Y Y Y Y %.}.8.R 2 [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 8 m m m m m m m m m m m m m m m m m m m m m m m m m m m m m k < [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ ] 3 d m k 8 < ^ ' * & & * ' _ [ [ [ [ [ [ [ [ [ [ [ [ [ 2 z |.8.^.` Y Y Y Y Y ;.1./.r 5 4 4 4 4 9 e n r t w r . . I R S #.*.. . D [.|.|.~.9 . - 4.|.Z Z X V U S R P O M M K K K M M P R T X Z #.$.$.).|.{.Y Y Y Y !.3.8. ", +" 8.(.Y Y Y Y Y ^.8./.s [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 8 m m m m m m m m m j h d f k m m m m m m m m m m m m m m m m k < [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 2 6 2 _ [ [ [ } ] ] } [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ q >.8.<. .Y Y Y Y Y =.1.:.r 5 5 5 4 4 9 n n e n x B x . . M *.)./.:.5 . n 4.4.~ w ~ . n 8.4.#.#.#.#.+.Z X V T S P P O O O O P R T X Z #.$.*.*.~.2.!.Y Y Y ` ^.8.8. ", +" 8.4.;.Y Y Y Y %.1.8.I [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 3 m m m m m m m m 8 3 [ < < < < 3 h m m m m m m m m m k h h d d 6 < [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ } [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 3 O 8.1.=.` Y Y Y Y %.}.[.t 9 5 5 5 5 9 n r 4 . @ t M S % . e /.[./.3.B . - 8./.. . . 1 >.8.[.$.$.$.#.#.#.#.Z Z X V T R R P P P R T V Z $.$.*.*.*.].2.,.Y Y Y .<.8. ", +" |.}. .Y Y Y Y {.8.].l [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < m m m m m m m k } _ [ [ [ [ [ [ [ [ 6 m m m m m m m m 6 _ < _ ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] _ [ [ [ [ [ [ [ < < ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] < [ [ [ [ < ] ] ] ] ] < [ [ [ [ [ [ [ [ [ [ [ [ [ [ < ] ] ] ] < < ] ] ] ] ] < } a d d d d 3 [ [ [ [ [ [ [ [ [ [ [ [ [ z |.4.{.` Y Y Y Y @.<.4.x 9 9 9 9 5 e n r r . . . . t $.t . . B B - [.+.- n |.8.8.>./.8.8.3.).$.$.$.$.$.$.#.#.#.+.Z X V U S S R S T V Z #.*.*.*.*.>./.1.=.Y Y Y =.1.[. ", +" 8.^.Y Y Y Y Y }.8.N [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ ^ k m m m m m m 8 } [ [ [ [ [ [ [ [ [ [ ] d m m m m m m m 2 [ ] ' ; * * * * * * * * * * * * * * * & * ' ] [ [ [ [ [ < ' ; = * * * * * * * * * * * * * * & = ; ! < [ [ ] * & * & * < [ [ [ [ [ [ [ [ [ [ [ [ [ < ' & * * & ! < ' & * * & ] 2 k m m m m 6 [ [ [ [ [ [ [ [ [ [ [ [ c #.8.<. .Y Y Y Y ` ^.8.G 9 9 9 9 9 n r t w A ~ . ) . . e *.( . . . - /.8.8.8.4.8.8.8.8.8.3.).$.$.$.$.$.$.$.$.$.#.#.#.+.Z X V U T T U V Z $.$.*.*.>.>.>.[.<.@.Y Y ` {.8.8. ", +"8.4.;.Y Y Y Y =.8.8.v [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 2 m m m m m m 8 < [ [ [ [ [ [ [ [ [ [ [ [ < m m m m m m k _ ] * & & & & & & & & & & & & & & & & & & & & = ] [ [ [ < ; & & & & & & & & & & & & & & & & & & & & & ' < [ ] * & & & * < [ [ [ [ [ [ [ [ [ [ [ [ [ < ' & & & & ! < ' & & & & ] < h m m m m 6 [ [ [ [ [ [ [ [ [ [ [ 2 F |.3.;.` Y Y Y Y ,.3.U e e 9 9 e n r r ( w G x . % 4 . . 1 Z I 9 I |.8.4.4.4.[.*.).).).>.$.$.$.$.$.$.$.$.$.$.$.$.$.#.#.#.Z Z X V V V *.~./.:./.*.>.>.>.>.|.^.Y Y Y .<.8. ", +"8.}.@.Y Y Y Y {.8.>.2 [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < k m m m m m d ] [ [ [ [ [ [ [ [ [ [ [ [ [ < k m m m m m d ] ; & & & & & & & & & & & & & & & & & & & & & & = < [ < ' & & & & & & & & & & & & & & & & & & & & & & & ! [ ] * & & & ; < [ [ [ [ [ [ [ [ [ [ [ [ [ < ' & & & & ! < ' & & & & ] < i m m m m 6 [ [ [ [ [ [ [ [ [ [ [ l >.8._. .Y Y Y Y %.}.:.r e e e e n t t - . e P X ) . . ( . . 9 8.8.8.8.4.>.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.#.#.#.+.Z Z #.:.[.|.4.8.8.3.>.>.).).~.2.,.Y Y Y ;.4.8. ", +"8._. .Y Y Y Y _.8.Q [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < m m m m m m 2 < [ [ [ [ [ [ [ [ [ [ [ [ [ < k m m m m m 8 ' & & & & & & & & * = = = = = = = & & & & & & & & ' [ ] = & & & & & & & & = = = = = = = & & & & & & & & ; < ] * & & & ; < [ [ [ [ [ [ [ [ [ [ [ [ [ < ' & & & & ! < ' & & & & ] < i m m m m 6 [ [ [ [ [ [ [ [ [ [ 2 F |.2.=.Y Y Y Y ` (.8.B e e e e r t w ~ . @ M X *.x . . :.Z x |.8.|.|./.*.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.#.#.#.*.|.|.|.K B P 8.8.3.>.).).).:.<.@.Y Y ` _.8. ", +"|.{.` Y Y Y Y }.8.C [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 6 m m m m m k < [ [ [ [ [ [ [ [ [ [ [ [ [ [ _ j m m m m m 2 ' & & & & & & & ' ] ] ] ] ] ] ] ] ' = & & & & & & > [ ! & & & & & & & ; ! ] ] ] ] ] ] ] ' * & & & & & & = ] ^ * & & & * < [ [ [ [ [ [ [ [ [ [ [ [ [ < ' & & & & ! < ' & & & & ] } i m m m m 6 [ [ [ [ [ [ [ [ [ [ g *.8.(. .Y Y Y Y ;.3.Z n n n e n t w ( . . . ) R /.].. . I 8.8.8.|.*.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.#.>.3.3.$.~ . . + 5 8.8.[.).).).).|.{.Y Y Y =.3.8. ", +"8.!.Y Y Y Y Y 2.8.v [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < j m m m m m 8 < [ [ [ [ [ [ [ [ [ [ [ [ [ [ < k m m m m m < ' & & & & & = ] < [ [ [ [ [ [ [ [ < ] = & & & & & > [ ' & & & & & & ' < [ [ [ [ [ [ [ [ < ] ; & & & & & = ] ^ * & & & ; < [ [ [ [ [ [ [ [ [ [ [ [ [ < ' & & & & ! < ' & & & & ] } i m m m m 6 [ [ [ [ [ [ [ [ [ [ C |.2.=.Y Y Y Y .<.4.w n n n n t w x ) ) n . . % Z |.t 1 >.8.:.:.*.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.[.4.*.- . . 1 ~ % G 8.[.).).~.~./.1.@.Y Y ` _.8. ", +"8.=.Y Y Y Y Y 4.8.g [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < m m m m m m d < [ [ [ [ [ [ [ [ [ [ [ [ [ [ < m m m m m k < ' & & & & & ! [ [ [ [ [ [ [ [ [ [ [ [ ! & & & & & > [ ' & & & & & ; _ [ [ [ [ [ [ [ [ [ [ [ ] * & & & & = ] ^ * & & & ; < [ [ [ [ [ [ [ [ [ [ [ [ [ < ' & & & & ! < ' & & & & ] < i m m m m 6 [ [ [ [ [ [ [ [ [ 7 ..8._. .Y Y Y Y ;.4.R r r n n t w w x B I V B . . % M [.[.8.3.).$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.8.4.n . . M 4.|.4 V 8.[.~.).~.~.~.|.^.` Y Y =.3.8. ", +"8.%.Y Y Y Y Y 8.8.7 [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < m m m m m m a < [ [ [ [ [ [ [ [ [ [ [ [ [ < 6 m m m m m k < ' & & & & ; < [ [ [ [ [ [ [ [ [ [ [ [ _ ' & & & & > [ ' & & & & = ] [ [ [ [ [ [ [ [ [ [ [ [ [ ! & & & & = ] ^ * & & & ; < [ [ [ [ [ [ [ [ [ [ [ [ [ [ ' & & & & ! < ' & & & & ] < i m m m m 6 [ [ [ [ [ [ [ [ [ v :.4.,.Y Y Y Y ` <.4.t r r r r w x ) @ n P $.~.S % . ~ 8.3.3.>.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.8.8.. . I 4.4.8.8.8.4.4.8.].~.~.]./.1.@.Y Y .<.8. ", +"8.@.Y Y Y Y Y 8.8.2 [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ ] m m m m m m a < [ [ [ [ [ [ [ [ [ [ [ [ [ < k m m m m m 6 < ' & & & & ! [ [ [ [ [ [ [ [ [ [ [ [ [ [ ! & & & & > [ ' & & & & ; < [ [ [ [ [ [ [ [ [ [ [ [ [ ] * & & & = ] ^ * & & & * < [ [ [ [ [ [ [ [ [ [ [ [ [ < ' & & & & ! < ' & & & & ] } i m m m m 6 [ [ [ [ [ [ [ [ 2 N 8.}.@.Y Y Y Y =.3.T t t r r t x A ( . . ) D :.|.$.~ >.8.4.*.$.$.$.$.$.$.$.$.$.*.*.*.*.>.*.>.*.>.*.*.*.*.*.$.$.$.$.$.$.$.$.$.$.$.$.8.8.1 . O 4.4.8.8.8.8.:.8.4.].~.].].|.{.Y Y Y !.8. ", +"8.%.Y Y Y Y Y 8.8.7 [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ _ m m m m m m j < [ [ [ [ [ [ [ [ [ [ [ [ ^ f m m m m m m < < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ ] & & & & > [ ' & & & & > [ [ [ [ [ [ [ [ [ [ [ [ [ [ ^ ; & & & = ] ^ * & & & ; < [ [ [ [ [ [ [ [ [ [ [ [ [ / ; & & & & ! < ' & & & & ] } i m m m m 6 [ [ [ [ [ [ [ [ g *.8.{.` Y Y Y Y (.8.x t t t w A A n w x 1 . . ( X 4.8.8.4.>.$.$.$.$.$.$.$.*.*.*.>.>.>.).).).).).).).).>.>.*.*.*.*.$.$.$.$.$.$.$.$.$.3.8.+.. - >.4.+.I t ( 4 |.8.[.].].].:.}. .Y Y %.}.8. ", +"8.=.Y Y Y Y Y 4.8.g [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < m m m m m m m 6 < [ [ [ [ [ [ [ [ [ [ < d m m m m m m m < < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ { = & & & > [ ' & & & & ' [ [ [ [ [ [ [ [ [ [ [ [ [ [ ^ ; & & & = ] ^ * & & & ; < [ [ [ [ [ [ [ [ [ [ [ [ [ ' & & & & & ! < ' & & & & ] < i m m m m 6 [ [ [ [ [ [ [ [ y :.2.=.Y Y Y Y @.1.>.w t t t A B n . . . % . . . . T 8.3.).$.$.$.$.$.$.*.*.*.>.>.).).~.~.].].].].].~.~.).).>.>.*.*.*.$.$.$.$.$.$.$.$.).8.8.T - 9 . . + % ) ( M 8.|.].]././.3.;.Y Y ` _.8. ", +"8.!.Y Y Y Y Y 2.8.v [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < a m m m m m m m 6 2 [ [ [ [ [ [ [ 2 3 i m m m m m m m k < < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ ] = & & & > [ ' & & & & ' [ [ [ [ [ [ [ [ [ [ [ [ [ [ ^ ; & & & = ] ^ * & & & ; / [ [ [ [ [ [ [ [ [ [ [ < ] = & & & & & ! < ' & & & & ] < i m m m m 6 [ [ [ [ [ [ [ [ K 8.<.@.Y Y Y Y !.4.I w w w w A B ) . . . ) . . . 1 8.8.~.$.$.$.$.$.$.*.*.*.>.).).~.].]./././././././.].].~.).).>.*.*.*.$.$.$.$.$.$.$.$.~.8.8.w . . . ~ e ) ~ I 8.|.].]././.[.(.Y Y Y ,.8. ", +"8.{.` Y Y Y Y }.8.C [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < < m m m m m m m m f 3 } 3 3 2 2 6 f m m m m m m m m m d _ < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ { = & & & > [ ' & & & & > [ [ [ [ [ [ [ [ [ [ [ [ [ [ ^ ; & & & = ] ^ * & & & ; < < < < < < < < < < < ] ' & & & & & & & ! < ' & & & & ] } i m m m m 6 [ [ [ [ [ [ [ 0 +.8.^.` Y Y Y Y _.4.x w w w w B D D n . . % A $.Z >.8.3.$.$.$.$.$.$.*.*.>.>.).~.]././.:.:.:.[.[.[.:.:././.].~.).).>.*.*.$.$.$.$.$.$.$.$.$.[.8./.w T - + @ - A 8.8.|./.]././.:.}. .Y Y @.8.8. ", +"8._. .Y Y Y Y _.8.Q [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < i m m m m m m m m m k f k f k m m m m m m m m m m m 3 < < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ { = & & & > [ ' & & & & ; < [ [ [ [ [ [ [ [ [ [ [ [ [ ] = & & & = ] ^ * & & & = > ' ' ' ' ' ' ' ' ' ; * & & & & & & & & ] < ' & & & & ] } i m m m m 6 [ [ [ [ [ [ [ s ].3.;.Y Y Y Y @.1.*.x x x w x D G K P P n . . - Z 8.3.>.$.$.$.$.$.$.*.*.>.).~.]./.:.:.[.[.[.:.[.:.[.[.:.:./.].~.).>.>.*.*.$.$.$.$.$.$.$.$.>.[.8.8.>.~ + @ K 8.8.8.8.[.:././.:.|.;.Y Y ` _.8. ", +"8.}.@.Y Y Y Y {.8.>.2 [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < } m m m m m m m m m m m m m m m m m m m m m m m m m [ [ < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ { = & & & > [ ' & & & & = ] [ [ [ [ [ [ [ [ [ [ [ [ [ ! & & & & = ] ^ * & & & & & & & & & & & & & & & & & & & & & & & ; < < ' & & & & ] < i m m m m 6 [ [ [ [ [ [ [ z |.}.%.Y Y Y Y ;.3.K A x x A G G D n r x #.V 9 . /.8.).$.$.$.$.$.$.*.*.>.).~.]./.:.[.[.[.:.[.[.:.[.[.[.[.:.:./.].~.).>.*.*.$.$.$.$.$.$.$.$.$.>.4.8.~ . . P 8.8.~.S [.8.|././.:.|.^.Y Y Y {.8. ", +" 4.;.Y Y Y Y =.8.8.v [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 3 m m m m m m m m m m m m m m m m m m m m m m m k < [ < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ { = & & & > [ ' & & & & & ; < [ [ [ [ [ [ [ [ [ [ [ ] * & & & & = ] ^ * & & & & & & & & & & & & & & & & & & & & & & & ] [ < ' & & & & ] < i m m m m 6 [ [ [ [ [ [ [ L 8.<.@.Y Y Y Y {.8.B A A x D I x . . . . . x [./.8.8.>.$.$.$.$.$.$.*.>.).~.]./.:.[.:.[.:.[.[.[.[.:.[.:.[.[.:./.].~.).>.*.*.$.$.$.#.$.$.$.$.$.$.4.8.B - T U w 5 1 9 R 8.|./.:.:.[.<.Y Y Y ;.4. ", +" 8.^.Y Y Y Y Y }.8.N [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 6 m m m m m m m m m m m m m m m d d m m m m m d < [ < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ { = & & & > [ ! & & & & & & ' < [ [ [ [ [ [ [ [ [ ] ; & & & & & = ] ^ * & & & & & & & & & & & & & & & & & & & & & ; ] [ [ < ' & & & & ] } i m m m m 6 [ [ [ [ [ [ [ U 8.^.` Y Y Y Y _.3.A A A A I K 1 . ~ ~ . . . x 8.8.>.$.$.$.$.$.$.*.*.>.).]./.:.[.[.[.:.[.[.:.[.:.[.[.[.:.[.:.:./.~.).>.*.*.$.$.#.#.#.$.$.$.$.$.:.4.|.~ . + % ) ( 9 M 8.|./.:.:.:.1.@.Y Y @.3.:. ", +" 8.}. .Y Y Y Y {.8.].l [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 6 k m m m m m m m m m m k j [ ] d m m m m m 6 _ [ < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ { = & & & > [ ! & & & & & & & ; ! ] ] ^ ^ ^ ] ] ' = & & & & & & = ] ^ * & & & = ' ' ' ' ' ' ' ' ' ' * & & & & ' ] < [ [ [ < ' & & & & ] } i m m m m 6 [ [ [ [ [ [ [ &.8.!.Y Y Y Y @.}.>.B B B A K M - . I *.#.B . 1 8.3.$.$.$.$.$.$.$.*.>.).~./.:.[.:.[.[.[.:.[.[.:.[.[.:.[.[.:.[.:./.].~.).>.*.$.$.#.#.#.$.$.$.$.$.*.4.8.1 . + ( B Z 8.8.8.|./.:.:.[.|.%.Y Y Y }.[. ", +" 8.4.;.Y Y Y Y %.1.8.I [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 6 a k m m m m k d 8 3 _ [ ^ k m m m m m 3 [ [ < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ { = & & & > [ ] = & & & & & & & & & = = = = * & & & & & & & & & ; _ ] * & & & ; < [ [ [ [ [ [ [ [ < > & & & & { [ [ [ [ [ < ' & & & & ] < i m m m m 6 [ [ [ [ [ [ [ ).8.;.Y Y Y Y %.1.T D B B B M O 1 . . ( A B . 9 8.3.$.$.$.$.$.$.$.*.>.).]./.:.[.[.:.[.:.[.~.I n ~ + ~ n I ~.[.:./.].~.>.*.*.$.#.+.+.#.#.$.$.$.$.$.3.8.A . I 8.8.8.8.8.|.[.:.:.:.[.|.,.Y Y Y _.|. ", +" 8.(.Y Y Y Y Y ^.8./.s [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 3 } _ < 2 2 < [ [ [ < } m m m m m k < [ [ < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ { = & & & > < < ' & & & & & & & & & & & & & & & & & & & & & & & ] [ ] * & & & ; < [ [ [ [ [ [ [ [ _ > & & & & ] [ [ [ [ [ < ' & & & & ] < i m m m m 6 [ [ [ [ [ [ [ :.8.%.Y Y Y Y =.2.M D D D B K P G ) . . . . . B 8.|.$.$.$.$.$.$.*.*.>.~.].:.[.:.[.[.:.[.S e $ , : | | | , n R /.].~.).>.*.$.$.+.Z Z #.#.$.$.$.$.$.:.8.+.. w 8.8.8.8.8.8.3.[.:.[.:.|.{.Y Y Y ^.8. ", +" 8.8.%.Y Y Y Y %.}.8.R 2 [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < ] 2 < [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < k m m m m m d ^ [ [ < ' & & & & ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ { = & & & > < [ < ' & & & & & & & & & & & & & & & & & & & & & ' < [ ] * & & & * < [ [ [ [ [ [ [ [ _ > & & & & ] [ [ [ [ [ < ' & & & & ] } i m m m m 6 [ [ [ [ [ [ [ 2.8.%.Y Y Y Y ;.4.I G D D G P P T S x 4 9 9 B 8.8.:.$.$.$.$.$.$.*.>.).~./.:.:.[.[.:.[.S 4 , : : | b b p u b 9 P ~.).>.>.*.$.#.Z X Z +.#.$.$.$.$.$.).8.8.~ D 8.).*.>.R $.8.4.:.:.[.|.^.Y Y Y !.8. ", +" 8.^.Y Y Y Y Y !.8.8.F [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ < 8 k k 8 3 [ < [ [ [ [ [ [ [ [ [ < 2 k m m m m m m 3 [ [ [ < ' = = = = ] [ [ [ [ [ [ [ [ [ [ [ [ [ [ ] = = = = ; < [ [ _ ' * = = = = = = = = = = = = = = = = = ; ] < [ [ ] ; = = = ; < [ [ [ [ [ [ [ [ < ; = = = = ] [ [ [ [ [ < ' = = = = ] } d k i i i 6 [ [ [ [ [ [ [ 8.8. .Y Y Y Y ,.8.I I G G R T D I Z *./.|.[.>.8.|.$.$.$.$.$.$.$.*.>.).~./.:.[.:.[.[.).e , | | | | b p u u o b e #.).:.).*.).Z [.[.X Z #.$.$.$.$.$.$.4.8.r . @ - ( 9 r I 8.8.:.[.[.[._.Y Y Y ;.8. ", +" 8.8.%.Y Y Y Y Y _.8.:.z [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ ] m m m m m m m 8 6 3 3 6 6 3 3 6 k m m m m m m m f ] [ [ [ < ] ] ] ] ] < [ [ [ [ [ [ [ [ [ [ [ [ [ [ < ] ] ] ] ] [ [ [ [ [ < ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] < [ [ [ [ < ] ] ] ] ] < [ [ [ [ [ [ [ [ < ] ] ] ] ] < [ [ [ [ [ < ] ] ] ] ] < [ [ [ [ [ [ [ [ [ [ [ [ [ [ 8.8.` Y Y Y Y !.8.I I I G V U ~ % +.>./.3.- 9 4.4.$.$.$.$.$.$.$.*.>.).]./.:.[.[.:.[.I , | | | b b p u u o J J : B *.4.:.>.4.Z [.3.V Z #.$.$.$.$.$.$.|.8.9 . + - ( 9 r A 8.8.[.[.[.[._.Y Y Y %.8. ", +" 8.(.` Y Y Y Y %.<.8.).y [ [ [ [ [ [ [ [ [ [ [ [ [ [ < d m m m m m m m m m m m m m m m m m m m m m m m m < [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 8.8.Y Y Y Y Y !.8.K K K I X X . % X ).:.[.- ~ 8.4.$.$.$.$.$.$.$.*.>.).]./.:.[.[.[.:.n : b b | # p u u , u J J p e $.4.[.].8./.|.8.U Z #.$.$.$.$.$.$.|.8.w . I x ( |.D x 8.8.[.:.[.[.<.Y Y Y %.8. ", +" 8.8.;.Y Y Y Y Y %.<.8.).z [ [ [ [ [ [ [ [ [ [ [ [ < < m m m m m m m m m m m m m m m m m m m m m m m m 3 < [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 8.8.Y Y Y Y Y !.8.M M K K Z Z ~ . . 4 5 ~ . 9 8.4.$.$.$.$.$.$.$.*.>.).~./.:.:.[.:.[.~ b p p p b $ p , | J J J W ) T |.8.8.8.8.8.8.T Z #.$.$.$.$.$.$.[.8.B . +.G ( ).K A 8.8.:.[.[.[.<.Y Y Y .8.8.", +" 8.}.@.Y Y Y Y Y =.<.8.:.F 2 [ [ [ [ [ [ [ [ [ [ ^ d m m m m m m m m m m m m m m m m m m m m m m m 3 _ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 8.8.Y Y Y Y Y !.8.P O O M Z #.O % . . . . . T 8.|.$.$.$.$.$.$.$.*.>.).~.]./.:.:.[.[.+ u u u u o b . : J J '.'.'.. M *.:./.>.).$.#.S X #.$.$.$.$.$.$.:.8.B ~ >./.|.8.~.].8.8.[.:.[.[.<.Y Y Y @.8.8.", +" 8.8.(.` Y Y Y Y Y %.<.8.8.R s [ [ [ [ [ [ [ [ [ 2 d m m m m m m m m m m m m m m m m m m m m m h 3 < [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 8.8.Y Y Y Y Y !.8.P P P O P $.$.U A e 5 B /.8.8.~.$.$.$.$.$.$.$.*.>.).~.]././.:.:.:.~ u u o J u , : - u J '.'.W - G I K I I I K O S X #.$.$.$.$.$.$.:.8.+.D +.#.8.8.8.8.8.4.[.[.:.[.<.Y Y Y @.8.8.", +" 8.8.{.Y Y Y Y Y Y %._.8.8./.I l [ [ [ [ [ [ [ < 3 3 3 8 h k m m m m m m m m m m m m m m i 2 2 [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 8.8.Y Y Y Y Y !.8.R R R P P R *.>.)./.[.4.8.8.~.$.$.$.$.$.$.$.$.*.*.>.).~.]./././.:.n p J J u , | J p ' W '.'.E ( A D B B D G K O S X #.$.$.$.$.$.$.:.8.D . @ ) 1 n G O 4.8.[.[.[.[._.Y Y Y %.8.8.", +" 8.3.!.Y Y Y Y Y Y Y !.}.8.8.].N v 2 [ [ [ [ [ [ [ [ } < [ 3 a d d d d d d d d d d d 3 < [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 8.8.` Y Y Y Y ,.8.R T S R P P R X $.)./.[.:.>.$.$.$.$.$.$.$.$.$.*.*.>.).~.~.].].]./.D : J J J B J '.'.H ].'.'.n 9 X [.B A B D I M S X #.$.$.$.$.$.$.:.8.>.D A r e r x D 8.8.[.:.[.[._.Y Y Y =.8.8.", +" 8.2.!.Y Y Y Y Y Y Y %.(.1.8.8.8.>.Q C v g 7 [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ [ 8.8.` Y Y Y Y ;.4.T V U T S R R P R T Z #.$.$.$.$.$.$.$.$.$.$.$.$.*.>.>.).).~.~.~.~.#.9 b '.J '.'.'.'.'.'.'.G ) B 3.$.B O S G I M S X #.$.$.$.$.$.$.4.8.+.D e ) 5 r A O 8.8.[.[.:.[.(.Y Y Y !.8.8.", +" 8.3.{.` Y Y Y Y Y Y Y %.{.}.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.` Y Y Y Y =.3.V Z X V U S S S S U Z #.$.$.$.$.$.$.$.$.$.$.$.$.*.*.>.>.>.~./.:.].>.M 9 b '.'.'.'.'.'.'.G ) 1 R 8.X ).8.8.~.K O S Z #.$.$.$.$.$.$.8.8.~ + % ~ A #.3.8.8.4.[.:.[.|.{.Y Y Y {.8.8.", +" 8.8.(.%.Y Y Y Y Y Y Y Y Y =.{._.}.2.4.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.` Y Y Y Y Y %.1.+.+.Z Z X V T T T U Z #.$.$.$.$.$.$.$.$.$.$.$.$.*.*.*.*.].3.8.8.4.].$.G 4 n E W '.W M n $ ( 5 I 8.8.8.[.:.8.R P U Z #.$.$.$.$.$.*.8.8.+ @ - ( e w B *.8.3.[.[.:.|.!.Y Y Y (.8.8.", +" 8.8.}.;.` Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y @.}.~.#.#.+.Z X V V U V Z #.$.$.$.$.$.$.$.$.$.$.$.$.$.*.*.~.4.8.4.[.8.|.+.R G n ( & + % - ~ 1 4 5 n O *.T D ].4.R P V Z #.$.$.$.$.$.:.8.|.U V G G B G D *.8.|.[.:.[.|.=.Y Y Y <.8.8.", +" 8.8.3.(.%.Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y ` <.|.$.$.$.#.+.Z X V X Z #.#.$.$.$.$.$.$.$.$.$.$.$.$.$.$.[.8.|.).$.).>.T X V I x t n e x $.].P e 9 e t t S 4.*.O R X +.#.$.$.$.$.$.4.8.A @ w X 8.8.8.8.8.8.3.[.[.:.1.@.Y Y .2.8.8.", +" 8.8.1.^.%.Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y %.^.}.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.}.^.%.Y Y Y Y Y Y Y Y %.^.}.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.}.^.%.Y Y Y Y Y Y Y Y Y Y ^.4.+.$.$.$.#.#.Z Z Z Z #.#.$.$.$.$.$.$.$.$.$.$.$.$.$.$.|.8.>.+.Z V S P /.4.X x t r w :.8.8.8.S e n t w M $.M P T X #.#.$.$.$.$.).8.8.- @ - ~ t R |.8.8.3.[.:.[.[.<.` Y Y =.4.8.8.", +" |.8.2.(.;. .Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y @._.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8._.%.Y Y Y Y Y Y @._.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8._.%.Y Y Y Y Y Y Y Y Y ,.4.~.*.*.$.$.$.#.+.Z Z #.#.$.$.$.$.$.$.$.$.$.$.$.$.$.$.:.8./.X U S P O |.8.M w t r I 4.#.B 8.|.A r w x B I M R V Z #.$.$.$.$.$.:.8.+.@ 5 4 ( n x G +.8.3.[.[.:.|.^.Y Y Y !.8.8.8.", +" [.8.4.}.^.;.@. .` Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y ^.8.8.8.8.8.'.J o J '.8.8.8.[.. . . G 8.e . 8.~ . . . /.~ . . . ).. . . w [.. . . r e M 8.w w 8.8.8.8.8.8.8.^.Y Y Y Y Y Y ^.8.8.8.8.8.8.8.8.8.8.8.8.*.1 e e 8.[.- [.w . - M [.. *./.- 8.e . 8.8.[.- 8.8.8.8.8.'.J o J '.8.8.8.8.8.^.Y Y Y Y Y Y Y Y Y %.1.:.*.*.*.*.$.$.#.#.+.#.#.$.$.$.$.$.$.$.$.$.$.$.$.$.#.$.[.|.X S P O U 4.3.B w t r I 4.:.t >.8.O w x B G K P T X +.#.$.$.$.$.$.:.8.D @ t |.>.K D K ).8.3.[.:.[.|.,.Y Y Y _.8.8.8.", +" 8.8.8.8.1.<.(.{.=.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.%.1.8.8.8.8.8.J o o o J 8.8.8.+.1 Z G w Z ~ e Z 8.G G 8.8.8.G G 8.Z 1 Z +.[.+.e 8.*.. S ~ A e 8.8.8.8.8.8.8.8.1.%.%.%.%.%.%.1.8.8.8.8.8.8.8.8.8.8.8.8.I r [.M /.+.e w x [.*.r +.. w S e Z ~ e Z 8.+.e 8.8.8.8.8.J o o o J 8.8.8.8.8.1.%.%.%.%.%.@.Y Y Y ` <.|.*.*.*.*.*.$.$.$.#.#.$.$.$.$.$.$.$.$.$.$.$.$.$.$.#.#.#.+.V S P M $.8.].A x w t A |.4.G K 8.X A B G K P S V Z #.#.$.$.$.$.:.8.8.>.% ) 4 K $.I M 4.8.|.[.[.:.1.@.Y Y @.1.8.8.8.", +" 8.8.|.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.o o o o o 8.8.8.G ~ e - Z e M w M 8.r S 8.8.8.r S 8.G ~ e e [.G . . ~ G 8.~ 1 [.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.[.r - G 8.G G . [.x e A G A ~ A G e M w M 8.G G 8.8.8.8.8.o o o o o 8.8.8.8.8.8.8.8.8.8.8.1.%.Y Y Y {.4.~.>.>.*.*.*.*.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.#.#.+.Z V S P O /.8.#.B A x w w #.8.:.].8.R D G K P S V Z +.#.$.$.$.$.).8.8.A P x ~ 4 r A K +.8.8.[.:.[.[._.Y Y Y ;.3.8.8.8.", +" 8.8.1.1.1.1.1.1.1.1.1.1.1.1.8.8.8.8.8.8.J o o o J 8.8.8.r S 8.w w . . . G 8.- /.8.8.8.- /.8.r S 8.8.8.r S /.~ /.8.e S 8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.G 8./.. 8.r S - *.Z r G r S w . B . . . G 8.r S 8.8.8.8.8.J o o o J 8.8.8.8.8.8.1.1.1.1.2.8.}.` Y Y %.2.:.>.>.>.>.*.*.*.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.#.#.+.Z X U R T |.8.|.).I A A A B >.8.8.*.I I M P S V Z +.#.#.$.$.$.$.~.8.+.@ % R *.G A I +.4.8.3.[.[.:.|.,.Y Y Y ^.8.8.8.8.", +" 8.8.}.5.5.5.5.5.5.5.5.5.5.5.1.8.8.8.8.8.'.J o J '.8.8.8.~ . . e ) Z 8.S r /.~ 8.8.8./.~ 8.8.~ . . ~ 8.~ /.8.G A 8.- /.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.A 1 e G 8.~ /.M - . r *.~ :.*.. ) Z 8.S r 8.~ . . w 8.8.8.'.J o J '.8.8.8.8.8.1.5.5.5.5.5.4.3.=.Y Y ` _.3.).>.>.>.>.*.*.*.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.#.#.+.Z V U S X >.[.3.R D D D D G K M K M P R U X Z +.#.#.$.$.$.$.~.8.8.|.5 - 1 ].8.8.8.8.8.3.[.:.[.[.1.@.Y Y @.}.8.8.8.8.", +" 8.1.5.5.5.5.5.5.5.5.5.5.5.5.2.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.2.5.5.5.5.5.5.2.8.^.Y Y Y ,.4./.).).).>.>.>.*.*.*.$.$.$.$.$.$.$.$.$.$.$.$.$.$.#.#.#.+.Z X V T R P O O M K K K M M P P S U V Z Z #.#.#.$.$.$.$.).8.8.U /.P ) ( r :.8.8.8.3.[.[.[.:.|.^.Y Y Y ;.4.8.8.8.8.", +" 8.4.5.5.5.5.5.5.5.5.5.5.5.5.5.1.3.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.3.1.5.5.5.5.5.5.5.}.8.}.@.Y Y .}.|.).).).).).>.>.*.*.*.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.#.#.#.+.Z Z X V U T T S S T T U V X Z Z +.#.#.#.$.$.$.$.$.).4.8.+.@ % ( 4 w t D |.8.4.[.[.[.:.[.|.%.Y Y ` _.8.8.8.8.8.", +" 8.1.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.3.8.!.Y Y Y !.8./.).).).).).>.>.*.*.*.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.#.#.#.#.#.#.#.+.+.+.+.+.+.#.#.#.#.#.#.#.$.$.$.$.$.$.).4.8.>.4 ) - ~ 4 w A I S 8.4.[.:.[.[.|.(.` Y Y %.2.8.8.8.8.8.", +" 8.4.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.}.8.<. .Y Y @.}.|.~.~.~.~.).).).>.>.*.*.*.$.*.|.8.8.8.8.:.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.).4.4.>.) % R S A e w G M X 8.4.[.[.:.[.|.%.Y Y Y ^.8.8.8.8.8.8.", +" 8.2.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.4.3.,.Y Y Y !.4.:.~.~.~.~.~.).).>.>.*.*.*.|.8.8.8.8.8.8.[.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.).4.8.8.>.) - ~ U 8.3.>.X O 4.8.4.[.[.[.|.(.` Y Y %.1.8.8.8.8.8.8.", +" 8.8.1.5.5.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.1.8.<. .Y Y .<.3.].].].~.~.~.~.).>.>.*./.8.|.e + + A 8.8.[.*.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.*.4.8.>.) t B ~ ( e #.8.8.8.8.8.8.[.:.[.[.}.%.Y Y Y (.8.8.8.8.8.8.8.", +" 8.4.}.5.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.5.4.4.!.Y Y Y =.2.[.].].].].].~.~.).).>.:.8.K % @ @ + w 8.8.8.~.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.*.4.|.( % - ~ ( e t D [.8.8.8.8.[.[.[.:.|.{.Y Y Y =.2.8.8.8.8.8.8.8.", +" 8.4.}.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.5.}.8.}.@.Y Y ` {.4.:.].].].].].].~.~.[.4.8.G - ( |.~ - I |.8.8.4.:.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.*.4.8.8.$.I n e I D K O |.8.[.:.[.[.:.|.<. .Y Y ` (.8.8.8.8.8.8.8.8.", +" 8.4.}.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.3.8.^.` Y Y .<.3./././././.].].|.4.8.|.$.) - #.).>.- + U 8.8.4.|.|.).$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.*.4.8.8.8.P t K U M S 4.8.[.[.:.[.[.[.%.Y Y Y ,.8.8.8.8.8.8.8.8.8.", +" 8.4.}.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.}.8.2.;.Y Y Y %.1.|././././././.|.8.M n |.r ~ A 8.V % @ +.- A 8.8.8.|.|.|.|.[.].$.$.$.$.$.$.$.$.$.$.$.$.$.$.$.*.*.>.].[.8.Z B M M +.4.8.4.[.:.[.[.|.!.Y Y Y %.}.8.8.8.8.8.8.8.8.8.", +" 8.8.2.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.-.-.-.-.-.-.-.-.-.-.-.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.1.8.}. .Y Y Y ,.2.[.:././././.|.8.U r r n 4 B 8.w - n e @ r I 9 +.8.8.8.8.8.4.].$.$.$.$.$.$.$.$.$.$.$.$.*.*.*.>.).~.[.8.8.$.V *.8.8.4.[.[.[.:.|.{.` Y Y ` (.8.8.8.8.8.8.8.8.8.8.", +" 8.8.8.1.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.3.8.(.` Y Y Y !.3.[.:.:.:.:.|.8.8.V w r r :.|.( ~ 4 - % D ) @ r U 9 9 r O 8.4.*.$.$.$.$.$.$.$.$.$.*.*.*.>.).).~.]./.3.8.8.8.8.8.3.[.[.:.[.|.(. .Y Y Y !.8.8.8.8.8.8.8.8.8.8.8.", +" 8.8.8.4.1.}.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.}.4.3.!.Y Y Y Y {.3.[.:.:.:.:.|.8.8.3.].3.8.Z 9 4 ( ~ ~ n - ) #.@ @ + + - |.4.*.$.$.$.$.$.$.$.*.*.*.>.).).~.]./.:.[.[.3.4.4.4.3.[.[.:.[.|._. .Y Y Y =.1.8.8.8.8.8.8.8.8.8.8.8.", +" 8.8.8.8.3.2.}.}.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.5.}.8.1.=.Y Y Y ` {.3.[.:.:.:.:.|.8.8.8.8.8.K t r r w 4 ( ~ I M - - /.#.P 8.4.*.$.$.$.*.*.*.*.>.>.).~.]././.:.[.[.[.:.[.[.[.[.[.[.:.[.|._. .Y Y Y @.}.8.8.8.8.8.8.8.8.8.8.8.8.", +" 8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.}.%.Y Y Y ` {.3.|.[.[.[.[.[.[.[.8.8.D B A ].A r n t 8.].1 ( 4 $.8.4./.>.>.>.>.>.).).).~.].]./.:.:.[.[.:.[.:.[.[.:.[.:.[.:.[.|._. .Y Y Y ._.8.8.8.8.8.8.8.8.8.8.8.8.8.", +" 8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.<.@.Y Y Y ` !.2.|.:.[.:.[.[.[.8.8.4.).*.|.B A x ].8.8.+.n n r [.8./.~.~.~.~.].].]././.:.:.[.:.[.[.[.[.:.[.[.:.[.[.[.:.[.|.(. .Y Y Y ` (.8.8.8.8.8.8.8.8.8.8.8.8.8.8.", +" 8.<.@.Y Y Y Y ,.1.|.:.[.:.[.:.[.8.8.8.8.|.P I T 8.8.:./.:.A x ].8.:./././.:.:.:.:.:.[.[.[.:.[.[.:.[.[.[.:.[.[.:.[.[.[.|.^. .Y Y Y ` (.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.", +" 8.<.@.Y Y Y Y =.<.3.:.[.:.[.[.[.|.|.4.8.8./.|.8.8.U K I I I [.8.[.:.:.[.[.:.[.[.[.[.[.:.[.[.:.[.[.:.[.[.:.[.[.:.|.[.!.` Y Y Y .(.8.8.8.8.Z G /.8.8.8.8.8.8.8.8.8.", +" 8.}.=.Y Y Y Y @.^.3.|.:.[.:.[.[.[.[.4.8.8.8.4.8.:.X R S ].8.8.[.[.[.:.[.[.:.[.:.[.:.[.[.:.[.[.:.[.[.[.[.:.[.|._.%.Y Y Y Y @._.8.8.8.*.G . - r /.8.M A 8.8.8.8.8.", +" 8.1.!.` Y Y Y Y ,.<.4.[.[.:.[.:.[.[.|.|.|.|.4.8.8.8.8.8.8.|.[.[.:.[.[.:.[.[.[.:.[.[.:.[.[.:.[.[.[.:.[.|.[.{. .Y Y Y Y =.}.8.8.8.:.r . - *.8.8./.~ [.8.[.8.8.8.", +" |.3.^. .Y Y Y Y @.{.1.3.[.[.[.:.[.:.[.:.[.[.4.4.4.4.4.|.[.:.[.[.:.[.[.:.[.[.[.:.[.[.:.[.[.:.[.:.|.|.(.%.Y Y Y Y Y !.1.8.8.8.[.G . ~ 1 *.8.8.S . M M G 8.8.8.", +" /.8.<.=.Y Y Y Y Y %.^.1.3.[.:.[.[.:.[.[.[.[.[.[.[.[.[.:.[.[.:.[.[.:.[.[.:.[.[.:.[.[.:.[.[.|.|.(.%.` Y Y Y Y %.(.4.8.8.8.8.w . 1 G . - *.*.- . . 1 [.8.8.8.", +" 8.8.1.{. .Y Y Y Y ` %.{.}.3.|.[.[.:.[.:.[.:.[.:.[.:.[.[.:.[.[.:.[.[.:.[.[.[.[.:.[.[.|.1.^.%. .Y Y Y Y ` ,.}.8.8.8.8.8.8.[.1 A 8.G . - 1 . w 8.8.8.8.8.8.", +" [.8.<.;.` Y Y Y Y Y .;.(.}.3.|.[.[.:.[.[.[.:.[.[.:.[.[.:.[.[.:.[.[.[.[.|.|.1._.,.@.Y Y Y Y Y ` =.(.8.8.8.8.8.8.8.8.8.|.8.8.8.w . . e 8.8.8.8.8.8.8.", +" 8.4._.=. .Y Y Y Y Y Y .;.^.<.1.2.|.|.|.[.[.[.[.[.[.[.[.[.|.|.|.1.<.^.,.@.Y Y Y Y Y Y @.=.^.2.8.8.8.8.8.8.8.8.8.8.8.8.8.[.1 . . . M 8.8.8.8.8.8.", +" 8.8.2._.=. .Y Y Y Y Y Y Y Y @.%.,.{.^._._.<.<.<.<._._.(.{.!.=.@.Y Y Y Y Y Y Y Y @.,.<.4.8.8.8.8.8.8.8.8.8.8.8.8.8.>.G 1 . 1 w . . M 8.8.8.8.8.", +" 8.8.3.<.!.%.Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y =.{.}.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8./.~ r . 1 [.8.w . . M 8.8.8.8.", +" 8.8.8.}._.,.@.Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y %.{._.2.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.>.*.8.1 G 8.8.8.r . . Z 8.8. ", +" 8.8.4.1._.{.;.@.Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y %.{.(.}.2.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.*.~ *.8.8.8.[.1 w 8.8.8. ", +" 8.8.8.4.2.}._.^.!.;.%.%. .@.@.=.{.(._.}.1.3.4.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.*.:.8.8.8.8.8.[.8.8.8. ", +" 8.8.|.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8. ", +" 8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8.8. "}; diff --git a/xgnokii/xpm/info.xpm b/xgnokii/xpm/info.xpm new file mode 100644 index 0000000..27d9358 --- /dev/null +++ b/xgnokii/xpm/info.xpm @@ -0,0 +1,73 @@ +/* XPM */ +static char *info_xpm[] = { +/* width height num_colors chars_per_pixel */ +" 30 64 2 1", +/* colors */ +". c #000000", +"# c None", +/* pixels */ +"##############################", +"###############....###########", +"###########...........########", +"########...............#######", +"######..................######", +"####.....................#####", +"###......................#####", +"##.......................#####", +"##.......................#####", +"##.......................#####", +"##......................######", +"##.....................#######", +"###..................#########", +"####...............###########", +"######.........###############", +"##############################", +"##############################", +"##############################", +"##############################", +"#####################...######", +"###############..........#####", +"###########..............#####", +"#######..................#####", +"#####....................#####", +"###......................#####", +"##.......................#####", +"#........................#####", +"#........................#####", +"#........................#####", +"##.......................#####", +"###......................#####", +"####.....................#####", +"#####....................#####", +"######...................#####", +"######...................#####", +"######...................#####", +"######...................#####", +"######...................#####", +"######...................#####", +"######...................#####", +"######...................#####", +"######...................#####", +"######...................#####", +"######...................#####", +"######...................#####", +"######...................#####", +"######...................#####", +"######...................#####", +"######...................#####", +"######....................####", +"#####.....................####", +"#####.....................####", +"####.......................###", +"###.........................##", +"##...........................#", +"#.............................", +"#.............................", +"#.............................", +"#............................#", +"##..........................##", +"####.......................###", +"########...............#######", +"##############################", +"##############################" +}; diff --git a/xgnokii/xpm/logo.xpm b/xgnokii/xpm/logo.xpm new file mode 100644 index 0000000..d42f05b --- /dev/null +++ b/xgnokii/xpm/logo.xpm @@ -0,0 +1,369 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This is the logo of the GUI utility. + + Copyright (C) 1999 FIXME: fill this in. + + Last modification: Sat Jun 26 07:38:27 CEST 1999 + Modified by Pavel Janík ml. + +*/ + +static char *XPM_logo[] = { + +"207 105 238 2", + +".. c #040204", +".# c #344244", +".a c #b4c2c4", +".b c #14221c", +".c c #94a2a4", +".d c #1c3224", +".e c #dce2dc", +".f c #3c524c", +".g c #84928c", +".h c #041204", +".i c #a4b2ac", +".j c #6c6e6c", +".k c #141214", +".l c #242224", +".m c #ccd2cc", +".n c #8c8a8c", +".o c #5c6e6c", +".p c #041a0c", +".q c #444244", +".r c #94928c", +".s c #b4b2ac", +".t c #a4a2a4", +".u c #6c7a7c", +".v c #243a34", +".w c #c4c2bc", +".x c #5c625c", +".y c #848284", +".z c #344a4c", +".A c #b4bab5", +".B c #142224", +".C c #041214", +".D c #a4aa9f", +".E c #040a08", +".F c #ccdadc", +".G c #545a58", +".H c #2c3232", +".I c #e4eae9", +".J c #8c9a9c", +".K c #141a19", +".L c #242a2a", +".M c #343a35", +".N c #041a1c", +".O c #949a98", +".P c #5c6a70", +".Q c #74828c", +".R c #4c524c", +".S c #7c7a7c", +".T c #c4cac9", +".U c #3c4240", +".V c #8c9291", +".W c #647674", +".X c #444a49", +".Y c #bcbaba", +".Z c #0c0a0c", +".0 c #5c5a5c", +".1 c #9caaab", +".2 c #acbabb", +".3 c #6c7677", +".4 c #fcf6f8", +".5 c #747a79", +".6 c #1c2224", +".7 c #a4aaac", +".8 c #1c1a1c", +".9 c #243233", +"#. c #848a87", +"## c #646264", +"#a c #0c1214", +"#b c #eceaeb", +"#c c #2c2a2c", +"#d c #3c3a3c", +"#e c #9c9a9d", +"#f c #cccacc", +"#g c #7c827c", +"#h c #bccacc", +"#i c #9ca29f", +"#j c #0c120b", +"#k c #acb2b0", +"#l c #d4d2cc", +"#m c #f4f2f4", +"#n c #0c1a08", +"#o c #142a2c", +"#p c #2c3a3a", +"#q c #fcfafc", +"#r c #dcdadc", +"#s c #545a64", +"#t c #8c929c", +"#u c #4c4a4c", +"#v c #747a84", +"#w c #acaaac", +"#x c #bcc2bf", +"#y c #1c221c", +"#z c #445251", +"#A c #747274", +"#B c #948e94", +"#C c #b4b6bc", +"#D c #5c666c", +"#E c #4c5a5b", +"#F c #3c4a4f", +"#G c #040e14", +"#H c #141e24", +"#I c #343a44", +"#J c #0c1a1c", +"#K c #4c525c", +"#L c #3c424c", +"#M c #bcbec4", +"#N c #848a94", +"#O c #344645", +"#P c #546262", +"#Q c #e4e2e4", +"#R c #6c727c", +"#S c #24262c", +"#T c #646e6c", +"#U c #94969c", +"#V c #b4b6b4", +"#W c #5c6662", +"#X c #84868c", +"#Y c #7c828c", +"#Z c #646e74", +"#0 c #1c2a2c", +"#1 c #2c363c", +"#2 c #242e34", +"#3 c #949aa4", +"#4 c #c4ced4", +"#5 c #444e54", +"#6 c #0c0e14", +"#7 c #eceef4", +"#8 c #d4d6dc", +"#9 c #44565c", +"a. c #4c5a64", +"a# c #f4fafa", +"aa c #d4dada", +"ab c #646a6f", +"ac c #747674", +"ad c #1c3234", +"ae c #84929c", +"af c #0c1a14", +"ag c #040604", +"ah c #748684", +"ai c #04160c", +"aj c #a4b6b4", +"ak c #6c7272", +"al c #141615", +"am c #242623", +"an c #ccd6d4", +"ao c #343634", +"ap c #545654", +"aq c #8c8e8d", +"ar c #ecf6f4", +"as c #949694", +"at c #a4a6a3", +"au c #c4c6c4", +"av c #848684", +"aw c #b4beba", +"ax c #142625", +"ay c #041616", +"az c #040e08", +"aA c #545e5b", +"aB c #2c3634", +"aC c #e4eeec", +"aD c #141e1a", +"aE c #242e2c", +"aF c #343e3c", +"aG c #4c5652", +"aH c #c4cecc", +"aI c #3c4644", +"aJ c #8c9693", +"aK c #444e4c", +"aL c #bcbebc", +"aM c #0c0e0c", +"aN c #5c5e5c", +"aO c #747e7a", +"aP c #1c2627", +"aQ c #a4aeae", +"aR c #1c1e1d", +"aS c #243632", +"aT c #848e8c", +"aU c #0c1615", +"aV c #eceeec", +"aW c #2c2e2e", +"aX c #9c9e9c", +"aY c #cccecc", +"aZ c #7c8683", +"a0 c #9ca6a0", +"a1 c #0c160c", +"a2 c #acb6b4", +"a3 c #d4d6d4", +"a4 c #f4f6f4", +"a5 c #2c3e3a", +"a6 c #fdfdfd", +"a7 c #dcdedd", +"a8 c #acaead", +"a9 c #bcc6c4", +"b. c #1c261c", +"b# c #4c5e54", +"ba c #3c4e51", +"bb c #0c1e1e", +"bc c #64726a", +"bd c #7c868e", +"be c #647278", +"bf c #1c2e2f", +"bg c #14261c", +"bh c #94a6a4", +"bi c #444644", +"bj c #6c7e7c", +"bk c #8c9e9c", +"bl c #7c7e7c", +"bm c #646664", +"bn c #3c3e3c", +"bo c #545e64", +"bp c #8c969c", +"bq c #4c4e4c", +"br c #747e84", +"bs c #a4a6ac", +"bt c #343e44", +"bu c #4c565c", +"bv c #3c464c", +"bw c #848e94", +"bx c #e4e6e4", +"by c #949ea4", +"bz c #748284", +"bA c #34424c", +"bB c #4c6264", +"bC c #dce2e4", +"bD c #849294", +"bE c #04120c", +"bF c #a4b2b4", +"bG c #ccd2d4", +"bH c #343234", +"bI c #545254", +"bJ c #ecf2f4", +"bK c #041a14", +"bL c #949294", +"bM c #b4b2b4", +"bN c #7c8a94", +"bO c #1c2a24", +"bP c #243a3c", +"bQ c #c4c2c4", +"bR c #5c6264", + +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a#ara6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a#ara6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6aLaGaF.Ya6a6a6a6a6a6a6a6a6a6a6a6a6a6aLaGaFaLa6a6a6a6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.taFaP.na6a6a6a6a6a6a6a6a6a6a6a6a6a6#ibnaP.na6a6a6a6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6asaF#yavbx#ra6a6a6a6a6a6a6a6a6a6a6a6asaFaDavbx#ra6a6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.O.Uaf#AauaL#qa6a6a6a6a6a6a6a6a6a6a6.O.#.KacauaL#qa6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.O.MaU#WbQ.Ya#a6a6a6a6a6a6a6a6a6a6a6.O.M#jbmbQaLa#a6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.VaB#jbRau.A#ma6a6a6a6a6a6a6a6a6a6a6.VaobEbRau.A#ma6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.V.May.Gau.A#ma6a6a6a6a6a6a6a6a6a6a6.V.M#aaAbQ.A#7a6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6#..M#6.R#x#V#7a6a6a6a6a6a6a6a6a6a6a6#.#p#j#z#x#V#ma6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a4.5.9ag.#aw.Y.Ia6a6a6a6a6a6a6a6a6a6a4.5.9ag.#aL.A#b#qa6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6aC.jaEagaG.A#C#Qa6a6a6a6a6a6a6a6a6a6aV.jaEag.R.A#C#Qa6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6aVakaI#y#p#TaZ#ibGaaa4a6a6a6a6a6a6a6aCak.U.6#pbcaZa0aYaaa4a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6bl..............................bQa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a4aO.x.X#paBbbaR.L.L.Ubla6a6a6a6a6a6arbl.x#F#paS.KaD.L.Lbn.ya6a6a6a6a6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.y..............................aLa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a#by.Pad.baPa1bEaMaz.E.Eaqa6a6a6a6a6a#by.P.9.baPaUaMazazaz.EaTa6a6a6a6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6bl....ag........................avbMbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.1#E#JaUbO.KaM#jazagaMaKa7.4a6a6a6a6.1a.#JaU#0.K#j.k.EagazbqbC.4a6a6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.y....ag.........................ybMbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.Ta.aU.CaB#a.Eagag.....b#V#V#qa6a6a6#h.G.N.CaBaU.Eagag.....b.i#V#qa6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6bl....ag........................avbMbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6an#9.B#H.#ay..ag.......KbMbMbxa6a6a6.F#9.BaDbtayag.........K.DbM.Ia6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.y....ag.........................y#kbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6#h#p.N#0aK#Jagagag....aD#VbMaYa6a6a6a9#I.N#0#5#J...E......#ybsbMaYa6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6bl....ag........................avbMbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.2#1#J#pbubbag#a.......KbMbM#fa6a6a6.2#1bb#pbubbag#a.......KbybM#fa6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.y....ag.........................y#kbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.7btaxbabu#J#Gal.E....aU.s#k.ma6a6a6.1bt.Bbabu#J.Eal.E....#j.O.s.ma6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6bl....ag........................avbMbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6bD#I.N#5#E.C#a.Kag....aUbMbM#fa6a6a6.V#pbbaK#9#a#a.Kag....aU.ObM#fa6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.y....ag........................avbMbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a8.ubt.N.PaG#aalaR.E....a1bMbM#xa6a6.7.ubt.N.P#E.CalaRag....#jaq#k.Ya6a6a6", +"a6a6a6a6a6a6a6a6a6a6bM#Abn.l.......k.qaq#Qa6a6a6a6a6bM.ybl.y.ybl.y.ybl.y.ybl.ybl#Qa6a6#Q.ybl.y.ybl.y.ybl.y.ybl.y.ybl.ybQa6a6#QbLbq.q...........q#AbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6#mbQblbI.q.l.............q.qblbM#ma6a6a6a6a6a6a6a6a6a6a6a6a6bl....ag........................av.sbMa6a6a6a6a6.ybl.y.ybl.y.ybl.y.ybl.y.y.ybl.y#la6a6a6a6a6a6#g#EaB.v.3#E#GalaR......#jbM#kbQa6#qbd#EaBbP.3#E.E.KaR......#jaT#V.Aa6a6a6", +"a6a6a6a6a6a6a6#mbl.k......................bn.ta6a6bQ............................aLa6a6bQ..............................blbQ.q........................aR.ta6a6a6a6a6a6a6a6a6a6a6a6a6a6#maqbH..................................aWbL#ma6a6a6a6a6a6a6a6a6a6.y....ag.........................y#kbMa6a6a6a6.t................................a7a6a6a6a6a6#7.3#OaP.faObu.E#HaRag....#jbM.s#xa6#Q.3aIax.faObu.EaR#Hag....#j.g.s.Ya6a6a6", +"a6a6a6a6a6a6#laR............ag.Zag......ag.Zag.l#BaM........agagagagagagag.Zag.E.Y.4a4aL......agag.Zagagagagagag.Eag.Zalagag...........Z.E...........Z.ZbH#la6a6a6a6a6a6a6a6a6a6#m.yaM..............ag.E.Zag.............Z.Z.E..aM###ma6a6a6a6a6a6a6a6bl....ag........................avbMbMa6a6a6a6bn......ag.ZagagagagagagagagagagbIa4.4#qa6a6a6#Qbr.U#JbBakba#a.6aR......a1bMbMaLa6#8br.#aDbB.3ba#a.6aR......a1.VbM.Aa6a6a6", +"a6a6a6a6a6#Q#6........ag.........................Zag............................avbMbMaL....................................ag...E.........................kaYa6a6a6a6a6a6a6a6#laR..........agag..................................agal.ya6a6a6a6a6a6a6.y....ag.........................ybMbMa6a6a6#Q................................avbMbMa2a6a6a6aYbraF.B.W.u.#.Kam.K.......KbM#kaLa6#M.5aF.Bbe.3.#.KamaD.......KaJ.sawa6a6a6", +"a6a6a6a6a6bn........ag..............................agag.........................y#VbMaL....................................ag...............................Z#fa6a6a6a6a6a6#l#6........ag..............................................bI#ma6a6a6a6a6bl....ag........................avbMbMa6a6a6.j.......E......................albM#kbM#ba6a6a6#CaO.9bObjbzaF.Kam.K.......bbMbMbQa6#w#v.9axbjbza5aDamal......#yasbMaLa6a6a6", +"a6a6a6a6.t........ag............................................................av#kbMaL.......................................................................G.Ya6a6a6a6#l.k........ag..................................................bHa4a6a6a6a6.y....ag........................av#kbMa6a6a6.k..............................##bMbM.sa6a6a6a6bs.3aP.9ahaZa5.6aEal......aD.sbM.Ta6#iacax.9aZahaF.6.Lal......aDaJ.sawa6a6a6", +"a6a6a6a6bq.......E...............................................................ybMbMaL.......................................................................ZbMaLa6a6a6bn........ag.......................................................0#ba6a6a6bl....ag........................avbMbMa6a6aX......ag........................atbM#k#fa6a6a6a6.O#ZaU.#bD.uaSam.Hal......aR#kbMaYbJ#U#Z#JbtbD.uaB#S.Hal......aDas#k.wa6a6a6", +"a6a6a6a6........................................................................av#kbMaL........................................................................#ebM.4a6bM....................................................................#ea7a6a6.y....ag.........................ybMbMa6a6.q......ag.......................UbM#kbM#qa6a6a6#q.ObR#J#KbN.3#p.L.Hal......#y.sbMaY#8.ObR#J#KbN.3aB.L.HaU......#y.V.s#Ma6a6a6", +"a6a6a6a7.......E.................................................................ybMbMaL........................................................................avbMaLa6bq.......E............................................................bqbM#qa6bl....ag........................av.sbMa6a7................................aq.sbMbMa6a6a6a6bJ#t#s#Jbubw.o#1aWaE#6....agam#kbM.T#4bp#s#Jbubw.o#paWaW#j.......L.ObM#xa6a6a6", +"a6a6a6bQ..................................#y.l..................................avbM.s#M.........................................................................ybMbMa6..................................#c#y.................................l.s#ka6.y....ag........................av#kbMa6#A.......E......................#ybMbMbMaVa6a6a6a6.Ibw#KaUbo#N.P#p.L.H#a......aEbM#V.mawbw#K#J#sbw#D#p.LaW#6......aE#i.sbQa6a6a6", +"a6a6a6aL................................aqbM#kaq................................av#kbMaL................................##atat##................................av#kbMaL.......E......................al#e#kbM.y................................bMbM#mbl....ag........................avbMbMa6aR...............................jbM#kbMa6a6a6a6a6a7bd#L#a#Zbw#P.9aW.LaM....agaEbM.s#8#kaZ#L.C#Zbw#P#2aW#2aM......aWa0#Va3a6a6a6", +"a6a6a6bQ...............................UbMbM.sbMbI.Z.............................ybMbMaL..............................aobM#kbM#k#d...............................ybMbMaq..............................##.sbMbM#kbq.Z.............................ybMa3bl....ag........................avbMbMa8......ag.......................E#w.sbMa3a6a6a6a6a6aYbz#1#J#Zbda.#0aW#c#G.......L.sa2#r.7br#1aU#Zbd#E#0bH.L#6....ag.L.1bM#ra6a6a6", +"a6a6a6aL...............................0#kbMbMa6bl..ag..........................av.sbMaL...............................GbMbM.s#qbl..ag..........................avbMbMbl..............................av#kbMaua6bl..ag..........................avbMbMbl....ag........................av#kbM.R......ag.......................qbM#kbMa6a6a6a6a6a6#M.u#2#J#R.QaG.6bH#S.E.....E.LbM#Vana0ac#2#J#R#YbuaPaW#S.E.....Eama8#Va7a6a6a6", +"a6a6a6bQ..............................apbMbM.ea6.y....#j.........................ybM#k.w..............................apbM#k#ba6bl.....E.........................y.s#k.y....ag.........................ybM.sbJa6.y....aM........................av#kbM#g....ag.........................ybM#e................................#e#kbM.Ya6a6a6a6a6a6#k#R.6#H.3#v#5.BaW#Sag....agaEbMbM.Tby.3aP#H.u.u#5.6aWaPag....agaE#k.saaa6a6a6", +"a6a6a6aL...............................0bMa8#ma6bl....#6........................avbMbMaL...............................0bMbMa4a6bl....ag........................avbMbMbl....ag........................av#kbMa6a6bl....#j........................avbMbMbl....ag........................av.s.0.......E......................aWbM.sbM#ma6a6a6a6a6a6#i#RaPaP#v.u#5.6aW.6......agaB.s#V#xbybeaPaP.u#v#5.6aW.6......agao#k.s#ra6a6a6", +"a6a6a6bQ...............................GbMbMaVa6.y....#j.........................y#kbMaL..............................apbMbMa4a6.y....ag........................av#kbM.y....ag.........................ybMbMa6a6.y.....k.........................ybM.s#g....ag.........................y#kal...............................jbM#kbMa6a6a6a6a6a6a6by.Wayadbr.3#5#SaWaR.......EaWbM#VbM.J#Ray#2br.3#5#SaW.6.......E.H.s#Va7a6a6a6", +"a6a6a6aL...............................0.sbMaVa6bl....aM........................avbMbMaL...............................0#kbM.4a6bl....ag........................avbMbMbl....ag........................avbMbM#qa6bl....aM........................avbMbMbl....ag........................av.S......ag.......................ZbM.sbMa7a6a6a6a6a6a6a6#t.P.Nbfbr#R.##SaWaR......az#d#k#Ca8#t.P.Nbfbr#R#OaPaWaR.......E.MbM#V#Qa6a6a6", +"a6a6a6bQ..............................apbMbMaVa6.y....aM.........................ybM#k.w..............................apbMbMa#a6.y....ag.........................y.s#k.y....ag.........................y.sbM#qa6.y....#j........................av#kbMbl....ag.........................y.M......ag.......................GbM#kbMa6a6a6a6a6a6a6.4bwbBaybfbr#Ra5#SaE.6......agbi#V#VbsbwbB.Cad.Q#Z.##S#2aR......ag#u.sa2#Qa6a6a6", +"a6a6a6aL...............................GbMbMaVa6bl....#j........................avbMbMaL...............................0.sbM.4a6bl....ag........................avbMbMbl....ag........................av#kbMa6a6bl....#6........................avbMbMbl....ag.........................j................................#ebMbMaLa6a6a6a6a6a6a6#bbw#9.C#Fbr#Z#p.LaWal.......E.0.s#C#ibw#9.C#Fbr#Za5am.Hal.......E.0#k#V#ba6a6a6", +"a6a6a6bQ..............................apbMbMaVa6.y....#6.........................y#kbMaL...............................GbM#ka4a6.y....ag.........................ybM#k.y....ag.........................ybMbMa6a6.y....#j.........................ybMbM#g....ag........................aW.....Mal......................ao#kbMbMa4a6a6a6a6a6a6a6bx#N.z.Cba#v#DaS#SaWal......azbm#V#V.tbN#F.C#F.uab.9#SaWal......azbm.s.2#ma6a6a6", +"a6a6a6aL...............................0bMbMaVa6bl....#j........................avbMbMaL...............................GbMbM#qa6bl....ag........................av.sbMbl....ag........................av#kbM#qa6bl....aM........................av#kbMbl....ag..............................aW.........................SbM.sbMa6a6a6a6a6a6a6a6#8#NbA#G#Fbe#P.9.LaW#a.......haca8#V#3#NbA#G#Fbe#P.9.LaW#a.......hac.s#V.4a6a6a6", +"a6a6a6bQ..............................apbM#kaVa6.y....aM.........................y.s#k.w..............................apbM.sa4a6.y....ag.........................ybM#k.y....ag.........................ybMbMa6a6.y....#j.........................ybMbM#g....ag...............................k......................albM#kbM.Ia6a6a6a6a6a6a6a6.TbdbP#Gbvabbu#2.L.L#a......azavbM.AbLbdbP#G.z#Z#K#2.L#c#a......azavbM.A#qa6a6a6", +"a6a6a6aL...............................GbM.s#ma6bl....#j........................avbMbMaL...............................0bM#k.4a6bl....ag........................avbMbMbl....ag........................av.sbM#qa6bl....#6........................av.sbMbl....ag.......................................................0#kbMbMa6a6a6a6a6a6a6a6a6#Cbd.9.E#O#D#5ax#S.L#j.Eagag#n#B.s#V#t#Y.9.EbA#D#5ax#S#SbE.Eagag#n.r#k.Aa6a6a6a6", +"a6a6a6bQ..............................apbMbM#ba6.y....#6.........................y#kbMaL..............................apbMbMa4a6.y....ag.........................ybM#k.y....ag.........................ybM#ka6a6.y....#j.........................ybMbM#g....ag......................................................atbM.s.Ta6a6a6a6a6a6a6a6a6a8.3.9.E.z#9#O#0.l.layag..agbgat#kaQ.V.3.9.Ebv#9#O#o.l.laUag...Ebg.tbM.Aa6a6a6a6", +"a6a6a6aL...............................0bMbMaVa6bl....#j........................avbMbMaL...............................0#kbM#qa6bl....ag........................av.sbMbl....ag........................avbMbM#qa6bl....aM........................av#kbMbl....ag.....................................................qbMbMbM.4a6a6a6a6a6a6a6a6a6.cak#2.E.##F.9ay.6b.ai.Eag.EaSa8#VaQbwbe#2ag.#.z.9aU.lb.aiazag.E.9#k#Vawa6a6a6a6", +"a6a6a6bQ..............................apbM#kaVa6.y....aM.........................ybM#k.w..............................apbMbMa4a6.y....ag.........................ybM#k.y....ag.........................ybMbMa6a6.y....#j.........................ybMbM#g....ag....................................................av#kbM#ka6a6a6a6a6a6a6a6a6a6#3#ZaE.E#pbPaDaz.6.d.p.h.E.E#p#k#VawaTbeaEag#pbPaDaz.6.d.p.h.E.Ea5.s#V.ma6a6a6a6", +"a6a6a6aL...............................GbM.s#ma6bl....#j........................avbMbMaL...............................GbMbM.4a6bl....ag........................avbMbMbl....ag........................av#kbM#qa6bl....#6........................avbMbMbl....ag..................................................albM#k.s#ma6a6a6a6a6a6a6a6a6a6aTab#0.EaSbfaz.Z.K.b.E.haz.Eb##Va2a9#.abaP#6aSbfaz.E.Kbg.E.hazaz.Ga2a2#ra6a6a6a6", +"a6a6a6bQ..............................apbM#k#ba6.y....#6.........................y#kbMaL..............................apbM#ka4a6.y....ag.........................ybM#k.y....ag.........................ybM.sa6a6.y....#j.........................y.sbM#g....ag...................................................jbMbMbMa6a6a6a6a6a6a6a6a6a6a6braA.B.E#2ax...E#a.h...hazazbc#Va2#xbraA.Bag#2axag.EaUbE...hazaz.o.s#V.ea6a6a6a6", +"a6a6a6aL...............................0bMbM#7a6bl....#j........................avbMbMaL...............................0bMbM#qa6bl....ag........................av.sbMbl....ag........................avbMbM#qa6bl....aM........................av#kbMbl....ag...................................................ybM.s#fa6a6a6a6a6a6a6a6a6a6a4#Z.X.K.LaPay...Eazag..ag.EaDaZ#V#Va9#Z#F#J#caPbK...Eazag..ag.E#naT#V#Va4a6a6a6a6", +"a6a6a6bQ..............................apbM.saVa6.y....aM.........................y.s#k.w..............................apbM.sa4a6.y....ag.........................ybM#k.y....ag.........................ybM#ka6a6.y....#j.........................ybMbM#g....ag...................................................UbMbMa6a6a6a6a6a6a6a6a6a6a6bJaNbA#J.L#ybE..ag.E....ag.haG.A#V.s#xbR.##J.LaR#G..ag.E....agaiaG.A.s#V#qa6a6a6a6", +"a6a6a6aL...............................GbMbMaVa6bl....#j........................avbMbMaL...............................0bM#k.4a6bl....ag........................avbMbMbl....ag........................avbMbM#qa6bl....#6........................avbMbMbl....ag....................................................atbMa6a6a6a6a6a6a6a6a6a6a6.Ibo.U.6#0.Kag....ag...Eag#yaO#V.sau.aaAaI#H#0al.E....ag...Eag#ybla2#Vaua6a6a6a6a6", +"a6a6a6bQ..............................apbMbMaVa6.y....#6.........................y#kbMaL..............................apbMbMa4a6.y....ag.........................ybM#k.y....ag.........................y.sbMa6a6.y....#j.........................ybMbM#g....ag....................................................##bMaVa6a6a6a6a6a6a6a6a6a6bCaG.9.9aP.k.E........agag#y#i.s.Aa4.Abu.9.9aPalag.........Eag#y.c.s.A#ma6a6a6a6a6", +"a6a6a6aL...............................0bMbMaVa6bl....#j........................avbMbMaL...............................0#kbM#qa6bl....ag........................av.sbMbl....ag........................av#kbM#qa6bl....aM........................av#kbMbl....ag....................................................albMbMa6a6a6a6a6a6a6a6a6a6#8aK#0#0.6aU.E.........Eagb.#i#V#xa6.2baaE#0.B.k.E.........Eag#ya0.s#xa6a6a6a6a6a6", +"a6a6a6bQ..............................apbM#kaVa6.y....aM.........................ybM#k.w..............................apbMbMa4a6.y....ag.........................ybM#k.y....ag.........................ybMbMa6a6.y....#j.........................ybMbM#g....ag.......................................................5bM#qa6a6a6a6a6a6a6a6a6bG.#aDaPaDaMaMag.......Eag#y#i.s#xa6.2.UaDaPaD#6aMag.......Eag#y#i.s#xa6a6a6a6a6a6", +"a6a6a6aL...............................GbM.s#ma6bl....#j........................avbMbMaL...............................G.sbM.4a6bl....ag........................avbMbMbl....ag........................av.sbM#qa6bl....#6........................av.sbMbl....ag......................................................aW.s#fa6a6a6a6a6a6a6a6a6#h#paUax.K#6.E........azag#ya0.s.wa6aj#paUax.KaMaz.........Eag#y#i#V.wa6a6a6a6a6a6", +"a6a6a6bQ..............................apbMbM#ba6.y....#6.........................y#kbMaL..............................apbM#ka4a6.y....ag.........................ybM#k.y....ag.........................ybM#ka6a6.y....#j.........................ybMbM#g....ag........................................................#ebMa6a6a6a6a6a6a6a6a6aHaS#Gax.K.E.E.........Eag#y#i#VaLa6bF.H#Gax.Kag.E........azag#ya0.s#xa6a6a6a6a6a6", +"a6a6a6aL...............................0bMbMaVa6bl....#j........................avbMbMaL...............................0bMbM#qa6bl....ag........................av.sbMbl....ag........................avbMbM#qa6bl....aM........................av#kbMbl....ag.........................................................q#k#Qa6a6a6a6a6a6a6a6a3#2#Gax#aag.E........azag#yat#V.ma6.1#2az.6aUag.E.........Eagb.at#VaYa6a6a6a6a6a6", +"a6a6a6bQ..............................apbM#kaVa6.y....aM.........................y.s#k.w..............................apbMbMa4a6.y....ag.........................ybM#k.y....ag.........................ybMbMa6a6.y....#j.........................ybMbM#g....ag.........................................................ZatbMa6a6a6a6a6a6a6a6bCbf.E.B#aag.E.........Eagb..D#VaYa6a0bfaz.B#a...E.........E.Eb..D#k#la6a6a6a6a6a6", +"a6a6a6aL...............................GbM.s#ma6bl....#j........................avbMbMaL...............................0bM#k.4a6bl....ag........................avbMbMbl....ag........................av#kbM#qa6bl....#6........................avbMbMbl....ag..........................................................bmbM#ma6a6a6a6a6a6a6aa#0azaD#G...E........azagb..D#k#la6bk#0az#H#Gag.E.........Eagb..D#V.ma6a6a6a6a6a6", +"a6a6a6bQ..............................apbM#k#ba6.y....#6.........................y#kbMaL..............................apbMbMa4a6.y....ag.........................ybM#k.y....ag.........................ybM.sa6a6.y....#j.........................y.sbM#g....ag..........................................................al.s.Ya6a6a6a6a6a6a6aa#0#a.B#6ag.E........agagaRat#V.ma6aeaPaU.Baz...E........agagaD.D#V#la6a6a6a6a6a6", +"a6a6a6aL...............................0bMbM#7a6bl....#j........................avbMbMaL...............................0#kbM#qa6bl....ag........................av.sbMbl....ag........................avbMbM#qa6bl....aM........................av#kbMbl....ag............................................................avbM#qa6a6a6a6a6a6#8aPaUbb#G..ag........ag..#y.D.A#la6#taPay#H#Gagag........ag..#yata2#la6a6a6a6a6a6", +"a6a6a6bQ..............................apbM.saVa6.y....aM.........................ybM#k.w..............................apbM.sa4a6.y....ag.........................ybM#k.y....ag.........................ybM#ka6a6.y....#j.........................ybMbM#g....ag............................................................aobM.Ta6a6a6a6a6a6#8aP.C#HaMag.E........ag..#ya0a2aYa6bwaP.C#Haz...E........ag..#yata2aYa6a6a6a6a6a6", +"a6a6a6aL...............................GbMbMaVa6bl....#j........................avbMbMaL...............................GbMbM.4a6bl....ag........................avbMbMbl....ag........................avbMbM#qa6bl....#6........................avbMbMbl....ag.........................U....................................aXbMa6a6a6a6a6a6#8.6ay#H#Gagag............#y.D.s.ma6bNaP.C.B.Eagag.............bat.s#la6a6a6a6a6a6", +"a6a6a6bQ..............................apbMbMaVa6.y....#6.........................y#kbMaL..............................apbM#ka4a6.y....ag.........................ybM#k.y....ag.........................y.sbMa6a6.y....#j.........................ybMbM#g....ag.........................S.Z..................................bqbM#ba6a6a6a6a6bG.Bay#Hazagag............aDat.saYa6bd.6.C#H#6agag............aDat#kaYa6a6a6a6a6a6", +"a6a6a6aL...............................0bMbMaVa6bl....#j........................avbMbMaL...............................0bMbM#qa6bl....ag........................av.sbMbl....ag........................av#kbM#qa6bl....aM........................av#kbMbl....ag........................av.U...8..............................aMatbMa6a6a6a6a6#8.BaU.B#6agag............aDaXbMaYa6#Y.BaU.B.Eagag.............KaX.s.ma6a6a6a6a6a6", +"a6a6a6bQ..............................apbM#kaVa6.y....aM.........................y.s#k.w..............................apbM.sa4a6.y....ag.........................ybM#k.y....ag.........................ybMbMa6a6.y....#j.........................ybMbM#g....ag.........................yaX..bHag...............................jbM#ma6a6a6a6#8#Hay.B.Eagag............a1.O#kaYa6bd.BaU.B#Gagag........ag..a1as.saYa6a6a6a6a6a6", +"a6a6a6aL...............................GbM.s#ma6bl....#j........................avbMbMaL...............................0bM#k.4a6bl....ag........................avbMbMbl....ag........................av.sbM#qa6bl....#6........................av.sbMbl....ag........................av.saW...E..............................albMaLa6a6a6a6bG.BaU#H.Eagag........ag..#j.V.s#fa6bN.BaU#H.Eagag........ag..#j.VbMaua6a6a6a6a6a6", +"a6a6a6bQ..............................apbMbM#ba6.y....#6.........................y#kbMaL..............................apbMbMa4a6.y....ag.........................ybM#k.y....ag.........................ybM#ka6a6.y....#j.........................ybMbM#g....ag.........................ybM.j.....................................ybMa6a6a6a6#8aP#JaD#6agag............azava8.Ya6aTaP#J#Hazag.E............az#g.s.Ya6a6a6a6a6a6", +"a6a6a6aL...............................0bMbMaVa6bl....#j........................avbMbMaL...............................0#kbM#qa6bl....ag........................av.sbMbl....ag........................avbMbM#qa6bl....aM........................av#kbMbl....ag........................av#kbMaR...E...............................qbM#fa6a6a6a3.BaU#J.Eagag............az#g.s.Ya6bD.BaUaf#Gagag............az.y#k.Ya6a6a6a6a6a6", +"a6a6a6bQ..............................apbM#kaVa6.y....aM.........................ybM#k.w..............................apbMbMa4a6.y....ag.........................ybM#k.y....ag.........................ybMbMa6a6.y....#j.........................ybMbM#g....ag.........................ybMbM#g....................................aXbMa6a6a6aa#Jaz#JaM.Eag.............Eak.s.Aa6.J#JazaUaMagag.............Eak.s.Aa6a6a6a6a6a6", +"a6a6a6aL...............................G.sbM#ma6bl....#j........................avbMbMaL...............................G.sbM.4a6bl....ag........................avbMbMbl....ag........................av.s#k#qa6bl....#6........................avbMbMbl....ag........................av.sbMa7....ag...............................0bMaVa6a6aaaU.Caf#Gagag.............Ebm.s.Aa6byaU.C#Jazagag.............Ebm.s.Aa6a6a6a6a6a6", +"a6a6a6aL..............................apbMbM#ba6.y....#6.........................y#kbMaL..............................apbM#ka4a6.y....ag.........................ybM#k.y.....E.........................ybMbMa6a6bl....aM.........................y.sbM#g....ag.........................y#kbMa6aN..ag...............................EbMbMa6a6bC#JafaD.E..ag............agaN.s#V#qbhafaUaD.Eagag............agaN.s#Va6a6a6a6a6a6", +"a6a6a6aL...............................0bM.s#7a6bl....#j........................avbMbMaL...............................0bMbM#qa6bl....ag........................avbMbMbl....ag........................av#kbMa6a6bl....#j........................avbMbMbl....ag........................avbMbMa6aL.....................................jbM#qa6#bbb#J.Bagag..............ag.R#k#Va6.2bb#J.b.E................ag.RbM#V#qa6a6a6a6a6", +"a6a6a6bQ...............................GbMbMaVa6.y....aM.........................y.s#k.w..............................apbMbMa4a6.y....ag........................av.sbMaq....ag........................##bMbM#qa6bI....aM........................av#kbMbl....ag.........................ybMbMa6a6.l...E...............................l#k.Ya6a6aPaUaf.Eagag............ag.X.s#Va4anaxaUaf.Eagag............agbi.s#Va#a6a6a6a6a6", +"a6a6a6aL..............................albMbMaVa6aW....#j........................avbMbMaL...............................0bM#k.4a6bl....ag........................av#kbMaL....ag.........................ZaqbMa6a8......#j........................atbMbMbl....ag........................av#kbMa6a6aX....................................avbMa6a6.U.Caz.E.Eag...............U.sbMa4.IaP.C#G.E.Eag...............UbM#Va4a6a6a6a6a6", +"a6a6a6bQ.................................M.S#VbI......#6.........................y#kbMaL..............................apbMbMa4a6.y....ag.........................ybMbMa6....ag............................#c#d........aM......................al.sbMbM#g....ag........................avbMbMa6a6#maM..ag...............................qbM#la6.5aU.E#Gagag...............H.s#VaVa6#1#aaz.Eagag...............H.s.saVa6a6a6a6a6", +"a6a6a6aL....................................ag.........Z........................avbMbMaL...............................0#kbM#qa6bl....ag.........................y#kbMa6bq....................................ag.....Z.........................qbM#kbMbl....ag........................av.sbMa6a6a6.x....................................bsbMa6a8.BaU.Eag............ag..aW#kbMaVa6.R.6aU#Gag............ag..aW#k#VaVa6a6a6a6a6", +"a6a6a6#l......................................aM.Z.EaM...........................ybM#k.w..............................apbM.sa4a6.y....ag........................avbM.sa6a8......................................aMaM..........................avbMbM#fbl....ag........................avbMbMa6a6a6#Q....ag...............................GbMaVa7.L.E#6ag............ag..b..tbM.ea6#X.L.Eazag............ag..b..tbMa7a6a6a6a6a6", +"a6a6a6a6aM......................................................................av.sbMaL...............................0bM#k.4a6bl....ag........................av#kbMa6a6bn...E............................................................#c#kbMbMaVbl....ag........................av#kbMa6a6a6a6bn...Z..............................albMbM.4.#..aM.Eag...........EagaR.ObMa7a6#M.#...Z.Eag...........EagaR.ObMa7a6a6a6a6a6", +"a6a6a6a6.y.......................................................................y#kbMaL...............................GbMbMa4a6.y....ag.........................ybMbMa6a6#l#6.............................................................E#ebM.s#ka6.y....ag.........................ybMbMa6a6a6a6.t.....................................jbMa4.3....azag........ag.E...K#..sa3a6#m#D..agaM..........agagag.K#..sa3a6a6a6a6a6", +"a6a6a6a6aVaR....................................................................avbMbMaL...............................G.sbM#qa6bl....ag........................avbMbMa6a6a6aY.k.E.......................................................ZaqbM#kbM#Qa6.S....ag........................avbMbMa6a6a6a6a6aR...E..............................#cbM#fbF.....Z..........ag.E.E.K.5#k#la6a6#......Z..........ag.Eag.K.5.s#la6a6a6a6a6", +"a6a6a6a6a6#l#6.Z................................................................av#kbMaL..............................apbM#ka4a6.y....ag.........................y.s#ka6a6a6a6#laRag..................................................alaqbM.sbMaLa6a6.y....ag.........................y.s#ka6a6a6a6a6bl....................................aqbMaV#a...Z.............Eaz#nbma8.Ya6a6awaU...E.............Eaz.K#Wa8aLa6a6a6a6a6", +"a6a6a6a6a6a6aYaWag...............................................................ybMbMaL...............................0bMbM.4a6bl....ag........................avbMbMa6a6a6a6#q#mblaM..............................................bqatbM#kbMaLa6a6a6bl....ag........................avbMbMa6a6a6a6a6a7....ag...............................qbMa7aZazag.............E#j.K.G#kaLa6a6bJaKazag............az#j#naG#k.Ya6a6a6a6a6", +"a6a6a6a6a6a6a6a6.yaM........................al.jap..............................avbM.s#M..............................apbM#ka4a6.y....ag.........................ybMbMa6a6a6a6a6a6a6#m#A#y....................................#y##atbMbMbMbM#fa6a6a6a6bl....ag.........................ybMbMa6a6a6a6a6a6##..ag................................a8bMa4.GaEaU......aU#yafalbn.5.A.Y#qa6a6#V#EaEaU......aU#yala1.Ubl.A.Y#qa6a6a6a6", +"a6a6a6a6a6a6a6a6a6a6as.U#c..........#cao.GaqbMbMao...............................y#kbMa6a6a6a6.s#k.s#kbM#k.s#kbM#k.s#kbMbMbM.4a6a6a6a6a4bM#k.s#kbM#k.s#kbM#k.s#kbM#kbMa6a6a6a6a6a6a6a6a6.4a8.y.Gao#cal.............kaWao.0.5#ebMbMbMbM#k.s#ma6a6a6a6a6a6a6a6a4.s#kbMa8bM#k.s#kbM#k.s#kbM#kbMa6a6a6a6a6a6a6a6a6#k.s#kbM#kbM#k.s#kbM#k.s#kbMa8.sbMbMaVanaT#W.HaB.UaG.x.x.jaJ.s.Y.Ya4a6a6a6.2aT.xaBaB.UaG#PbR.j.V#V.AaLa4a6a6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6.4aL#k.s#kbM#kbMbMbMbM.sbsaMag..ag........................aqbMbMa6a6a6a6bMbMbMbM.sbMbMbMbMbMbMbM.s#kbMa4a6a6a6a6.4bMbMbMbM.sbMbMbMa8bMbMbMbMbMbMa6a6a6a6a6a6a6a6a6a6a6#qa3bMbM#kbM#k.s#kbMa8bM.sbM#kbM.s#kbM#ka3#qa6a6a6a6a6a6a6a6a6a6#qbM#kbMbM.sbMbMbMbMbMbMbM.sbMbMa6a6a6a6a6a6a6a6a6#mbMbM.sbM.sbMbMbM.sbMbMbMbMbM#kbMbMbMa6a4a3a8aTaJas#ia8.Y#xawaL#ba6a6a6a6a6a4aaaQaq.V#e.ta8aL#x.AaL#b#qa6a6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6#7a7bM.sbM.sbMa7.I##.......Z........................bM.sbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6.4bx#QaubM.sbM#kbM#k#f#Q.I.4a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6#qaVau#faYa4a4#qa6a6a6a6a6a6a6a6a6a6#qaVau.TaYa4a4#q#qa6a6a6a6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6#Qbq.................................EbM#kbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6.t.qbn.q.q.q.q.qbn.q.q.q.q.qaR...........E........................aWbMbMbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6.y.....................................E..........................##.s#k.Ya6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6bl.......Z.Z.E.Z.Z.E.Z.Z.E.Z.Z.E.Zag..............................#ebMbM#Qa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6.y....ag........................................................aRbM#kbM#qa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6bl....ag........................................................akbM.sbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6.y....ag......................................................#c.s#kbMa3a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6bl.....E.....................................................latbMbMbMa6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6bl....ag.................................................Z.G.sbM#kbMa7a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6bl....ag..........................................aW#u.S#kbM#kbMbMa3a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6bQblbl.yap.0ap.G.0ap.G.0ap.G.0apap.0ap.0apav.y#e#k.s#kbM.sbMbM.Ya4a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6a6a6a6a4bMbMbMbM.sbMbM.sbMbM.sbMbM#kbMbMbMbM#kbMbMbMbMbMa7#ma6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6a6a6a6a6a4a4a4a4a4a4a4a4a4a4a4a4a4#qa#a4a#a4.4a#a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6", +"a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6a6" +}; diff --git a/xgnokii/xpm/phone.xpm b/xgnokii/xpm/phone.xpm new file mode 100644 index 0000000..9a3e44b --- /dev/null +++ b/xgnokii/xpm/phone.xpm @@ -0,0 +1,27 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Jan Derfinak + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +static char * phone_xpm[] = { +"18 10 2 1", +" c #FFFFFFFFFFFF", +". c #000000000000", +" ..............", +" ...............", +".... .. . . . ..", +" .. ...........", +" .. .. . . . ..", +" .. ...........", +" .. .. . . . ..", +" .. ...........", +" ...............", +" .............."}; diff --git a/xgnokii/xpm/quest.xpm b/xgnokii/xpm/quest.xpm new file mode 100644 index 0000000..14f14a7 --- /dev/null +++ b/xgnokii/xpm/quest.xpm @@ -0,0 +1,86 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Jan Derfinak + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +static char *quest_xpm[] = { +/* columns rows colors chars-per-pixel */ +"44 66 2 1", +" c Gray0", +". c None", +/* pixels */ +"................... ...............", +".............. ...........", +"........... ........", +"....... .......", +".... .....", +"... ....... ....", +".... ............. ...", +".... ................ ..", +".... .................. ..", +".... .................... .", +"..... ..................... .", +"..... ...................... ", +"..... ....................... ", +"..... ........................ ", +"..... ........................ ", +"..... ....................... ", +"...... ........................ ", +"...... ........................ ", +"...... ....................... .", +"...... ....................... .", +"...... ...................... ..", +"....... ..................... ..", +"....... .................... ...", +"........................... ....", +".......................... .....", +"......................... ......", +"........................ ........", +"...................... .........", +"..................... ...........", +".................... .............", +"................... ...............", +".................. ................", +"................. ..................", +"................ ...................", +"............... ....................", +".............. .....................", +".............. ......................", +"............. ......................", +"............. ......................", +"............. .....................", +"............. ....................", +"............. ..................", +".............. .................", +".............. .......................", +"............... ..........................", +"............... ............................", +"............................................", +"............................................", +".................. ......................", +"................. .....................", +"............... ....................", +"............... ...................", +".............. ...................", +".............. ..................", +".............. ..................", +".............. ..................", +".............. ..................", +".............. ...................", +"............... ...................", +"............... ....................", +"................ .....................", +".................. ......................", +"............................................", +"............................................", +"............................................", +"............................................", +}; diff --git a/xgnokii/xpm/sim.xpm b/xgnokii/xpm/sim.xpm new file mode 100644 index 0000000..016ae75 --- /dev/null +++ b/xgnokii/xpm/sim.xpm @@ -0,0 +1,27 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Jan Derfinak + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +static char * sim_xpm[] = { +"18 10 2 1", +" c #000000000000", +". c #FFFFFFFFFFFF", +" ", +" ................ ", +" ................ ", +" .. ....... ", +" .. ....... ", +" .. ....... ", +" .. ...... .", +" .............. ..", +" ............. ...", +" ...."}; diff --git a/xgnokii/xpm/sms.xpm b/xgnokii/xpm/sms.xpm new file mode 100644 index 0000000..90937fe --- /dev/null +++ b/xgnokii/xpm/sms.xpm @@ -0,0 +1,159 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Pavel Janík ml. & Hugh Blemings. + + Released under the terms of the GNU GPL, see file COPYING for more details. + + This is the logo of the GUI utility. + + Copyright (C) 1999 Petr Vostøel + + Last modification: Sat Jun 26 07:38:27 CEST 1999 + Modified by Pavel Janík ml. + +*/ + +static char *XPM_sms[] = { + +"26 7 126 2", + +".. c None", +".# c #161616", +".a c #cf9a98", +".b c #d9e1ed", +".c c #b10707", +".d c #ededed", +".e c #bababa", +".f c #ababab", +".g c #385886", +".h c #c2c2c2", +".i c #9b9b9b", +".j c #af5f5d", +".k c #353535", +".l c #dedede", +".m c #8b8b8b", +".n c #757575", +".o c #444444", +".p c #a4a4a4", +".q c #393939", +".r c #e6e6e6", +".s c #f3f3f3", +".t c #6f0302", +".u c #e6ebf3", +".v c #b2b2b2", +".w c #545454", +".x c #ffffff", +".y c #848383", +".z c #233755", +".A c #656565", +".B c #7b7b7b", +".C c #949494", +".D c #2c2c2d", +".E c #6b6b6b", +".F c #0f1a29", +".G c #4c4c4c", +".H c #cecece", +".I c #d6d6d6", +".J c #1f2020", +".K c #b2c2d9", +".L c #5c5c5c", +".M c #d6deeb", +".N c #2b4468", +".O c #162336", +".P c #0e0e0e", +".Q c #f9f9f9", +".R c #000000", +".S c #e8edf4", +".T c #3d6194", +".U c #edf1f6", +".V c #c9c9c9", +".W c #41669c", +".X c #e8cecd", +".Y c #cad5e5", +".Z c #bccade", +".0 c #4369a1", +".1 c #9ca4ae", +".2 c #b5c5db", +".3 c #c5d2e3", +".4 c #324e78", +".5 c #3d3d3d", +".6 c #9299a3", +".7 c #d3dce9", +".8 c #1b2b42", +".9 c #b4bcc8", +"#. c #34527e", +"## c #cdd8e7", +"#a c #2d0201", +"#b c #012343", +"#c c #f4eaea", +"#d c #08121e", +"#e c #8a919d", +"#f c #c2cfe1", +"#g c #bfbfbf", +"#h c #080d14", +"#i c #fcfcfc", +"#j c #c4cedb", +"#k c #bf7c7b", +"#l c #cfd9e8", +"#m c #757b83", +"#n c #b6c6db", +"#o c #f9f2f2", +"#p c #2e4970", +"#q c #d2adac", +"#r c #d7e0eb", +"#s c #7d838b", +"#t c #1f314b", +"#u c #61666c", +"#v c #686d74", +"#w c #08090b", +"#x c #484e56", +"#y c #6f7071", +"#z c #242525", +"#A c #bfcde0", +"#B c #c7c5c5", +"#C c #040506", +"#D c #303031", +"#E c #37393d", +"#F c #273e5e", +"#G c #446ba4", +"#H c #282929", +"#I c #eef2f7", +"#J c #344f69", +"#K c #eef1f7", +"#L c #d1dbe9", +"#M c #565758", +"#N c #a5adb8", +"#O c #606161", +"#P c #786463", +"#Q c #b4c4da", +"#R c #404040", +"#S c #575b61", +"#T c #858b94", +"#U c #dde4ee", +"#V c #ebeff5", +"#W c #4b2726", +"#X c #2b2e34", +"#Y c #414449", +"#Z c #484848", +"#0 c #505050", +"#1 c #725655", +"#2 c #a23c3a", +"#3 c #acb4bf", +"#4 c #bdc6d3", +"#5 c #c0c9d6", +"#6 c #b3c3da", +"#7 c #ffffff", + +"...1#S.#.R.R.R.R.R.R.R.R.R#z#x.R.R.R.R#z#x.#.##x#e..", +".1.D.R.e.x.x.x.x.w.x.x.n#z.J.d.x.n.e.x.x.x.x.w.R#z#e", +"#M.R.R.x.m.R.#.n.o.x.x.l#X.A.x.x.n.x.m.R.#.n.o.R.R#x", +".#.R.R.l.x.e.e.f.#.x.f.x.o.f.f.x.n.l.x.e.e.f.#.R.R.#", +".#.R.R#z.o.n.m.x.n.x.n.l.h.x.A.x.n#z.o.n.m.x.n.R.R.#", +".#.R.R.x.f.o.w.x.n.x.n.n.x.d.R.x.n.x.f.o.w.x.n.R.R#M", +".R.R.R.m.x.x.x.d.k.x.n#z.x.i.R.x.n.m.x.x.x.d.k.R.R.R" +}; diff --git a/xgnokii/xpm/stop.xpm b/xgnokii/xpm/stop.xpm new file mode 100644 index 0000000..a06c82c --- /dev/null +++ b/xgnokii/xpm/stop.xpm @@ -0,0 +1,85 @@ +/* XPM */ +/* + + G N O K I I + + A Linux/Unix toolset and driver for Nokia mobile phones. + + Copyright (C) 1999 Jan Derfinak + + Released under the terms of the GNU GPL, see file COPYING for more details. + +*/ + +static char *stop_xpm[] = { +/* columns rows colors chars-per-pixel */ +"65 65 2 1", +" c Gray0", +". c None", +/* pixels */ +"................... ...................", +".................. ..................", +"................. .................", +"................ ................", +"............... ......................... ...............", +".............. ........................... ..............", +"............. ............................. .............", +"............ ............................... ............", +"........... ................................. ...........", +".......... ................................... ..........", +"......... ..................................... .........", +"........ ....................................... ........", +"....... ......................................... .......", +"...... ........................................... ......", +"..... ............................................. .....", +".... ............................................... ....", +"... ................................................. ...", +".. ................................................... ..", +". ..................................................... .", +" ....................................................... ", +" ......................................................... ", +" ......................................................... ", +" ...... .. .. ... ....... ", +" ...... . . .. ...... ", +" ..... . . .. ...... ", +" ..... . . .. ...... ", +" ..... ..... ..... ..... ..... .. ... ...... ", +" ..... ..... ..... ..... ..... .. .... ...... ", +" ..... ............ ..... ..... .. .... ...... ", +" ..... ............ ..... ..... .. .... ...... ", +" ..... ...... ..... ..... .. .... ...... ", +" ..... ..... ..... ..... .. ...... ", +" ..... ..... ..... ..... .. ...... ", +" ...... ..... ..... ..... .. ...... ", +" ............ ..... ..... ..... .. ....... ", +" ............ ..... ..... ..... .. ............. ", +" ..... ..... ..... ..... ..... .. ............. ", +" ..... ..... ..... ..... ..... .. ............. ", +" ..... ..... ..... .. ............. ", +" ..... ..... ..... .. ............. ", +" ..... ..... ..... .. ............. ", +" ..... ...... ..... .. ............. ", +" ...... ........ ...... ... ............. ", +" ......................................................... ", +" ......................................................... ", +" ....................................................... ", +". ..................................................... .", +".. ................................................... ..", +"... ................................................. ...", +".... ............................................... ....", +"..... ............................................. .....", +"...... ........................................... ......", +"....... ......................................... .......", +"........ ....................................... ........", +"......... ..................................... .........", +".......... ................................... ..........", +"........... ................................. ...........", +"............ ............................... ............", +"............. ............................. .............", +".............. ........................... ..............", +"............... ...............", +"................ ................", +"................. .................", +".................. ..................", +"................................................................." +}; -- 1.8.3.1