gnokii(1)
okay bestie, buckle up β this is gnokii, and yes it's from section 1 of the manual, the classic gnokii(1) page π
πΈ NAME πΈ
gnokii β tool suite for mobile phones π±β¨
π SYNOPSIS π
gnokii [CONFIG OPTIONS] [OPTIONS]
π¦ DESCRIPTION π¦
gnokii is a multiple systems tool suite and a driver for mobile phones. Like, both things. It's giving multitasking queen π
So what can it actually talk to? Bestie, it supports:
- the AT protocol defined by the GSM standard (with workarounds for some vendors' lil quirks, because of course π)
- some proprietary protocols of Nokia phones β the so called
FBUSandFBUS2 - SIM cards in PC/SC compatible Smart Card readers
- and limited support for the older and slow Nokia
MBUSprotocol is also available (it's giving retro, but slow π)
You can assume your phone will work with gnokii when using the AT protocol. However β some phones only implement a subset of the protocol, and in those cases you will get very limited functionality. Not a slay, just the truth π
The recommended model setting for your config file are:
model = series40, if you have a fairly recent Nokia phone except Symbian phones prior to Series60 3rd Editionmodel = gnapplet, if you have a Nokia Symbian Series60 prior to 3rd Edition phonemodel = AT, for all other phones of any brand- if you have some older Nokia phone that doesn't work with
model = series40you may try using its brand name, eg. for Nokia 6210 usemodel = 6210.
The recommended connection and port settings for your config file are:
connection = bluetoothandport = phone address, for Bluetooth connectionsconnection = dku2libusbandport = 1, for most Nokia USB cablesconnection = serialandport = /dev/..., for all other cables
See also the sample gnokiirc for a description of all configuration parameters, and our http://wiki.gnokii.org/index.php/Config for configurations known to work π
Symbian series60 3rd edition and later (most Nokia N and E series) are not supported by the gnapplet driver, due to changes in Symbian API. For now you can get some functionality using the AT driver (with all connection types supported by the phone) or using the series40 driver (only with connection = dku2libusb). F in the chat for gnapplet π
Please note that currently there are Nokia models with almost the same names as the old ones, like6110cvs6110or3110cvs3110. They are completly incompatible. DO NOT usemodel = 6110ormodel = 3110setting for them, usemodel = series40instead. No cap, this one bites people fr fr π
π CONFIG OPTIONS π
--config filenameβ reads configuration fromfilenameinstead of trying default locations. Normallygnokiilooks for config file in$XDG_CONFIG_HOME/gnokii/config(which is usually$HOME/.config/gnokii/config),$HOME/.gnokiirc(legacy),$XDG_CONFIG_DIRS/gnokii/config(which is usually/etc/xdg/gnokii/config) and/etc/gnokiirc(legacy).--phone nameβ uses parameters from the given phone section of your config file. A phone section named'foo'starts with[phone_foo]and is used as--phone fooβ¨
π OPTIONS π
The options that are recognized by gnokii can be divided into several different groups. Group chat energy, let's go π
π GENERAL π
--helpβ displays usage information.--versionβ displays version and copyright information.--monitor [delay|once]β continually updates phone status tostderr. Optionaldelayparameter sets the refresh interval todelayseconds. Default is1.oncemeans the output will be printed only once.--shellβ runs interactive session that will allow to run sequentgnokiicommands without a need to reconnect for the sequent commands. Lowkey the best glow-up for repetitive tasks π
π DIALING π
--getspeeddial locationβ reads speed dial from the specifiedlocation.--setspeeddial number memory_type locationβ specify speed dial.locationnumber1is usually reserved for voice mailbox number and it is unavailable as speed dial.--dialvoice numberβ initiate voice call. On success print thecallididentifier to be used with the--hangupcommand. The--monitorcommand can be used to show thecallid.
With model = AT direct dialing from phonebooks is supported with careful use of shell quoting, for example:
gnokii --dialvoice ">SM42" # dial the number in location 42 of SM memory
gnokii --dialvoice '>"Home"' # dial the number if string matches exactly a contact name (note the use of single and double quotes)
--senddtmf stringβ send DTMF sequence.--answercall callidβ answer an incoming call.callidis a small integer number used to identify one of the incoming calls. The--monitorcommand can be used to show thecallid.--hangup callidβ hangup an incoming call or an already established call.callidis a small integer number used to identify one of the incoming calls. If you initiated the call with--dialvoicethis is the number printed by that command. The--monitorcommand can be used to show thecallid.--divert {--op|-o} {register|enable|query|disable|erasure} {--type|-t} {all|busy|noans|outofreach|notavail} {--call|-c} {all|voice|fax|data} [{--timeout|-m} time_in_seconds] [{--number|-n} number]β Manage call diverting/forwarding. π--opspecifies one of the operations:registerenablequerydisableerasure--typespecifies one of the event types:busynoansoutofreachnotavailunconditionalall--callspecifies one of the call types:voicefaxdataall--timeoutis the number of seconds an incoming call will ring before being forwarded to the registered number (use with--type noans)--numberis the phone number to which calls are to be forwarded
π§ PHONE SETTINGS π§
--getdisplaystatusβ shows what icons are displayed.--displayoutputβ show texts displayed in phone's screen.--getprofile [number]β show settings for selected(all) profile(s).--setprofileβ sets settings for selected(all) profile(s).--getactiveprofileβ reads the active profile.--setactiveprofile profile_noβ sets active profile to the profile numberprofile_no.--netmonitor {reset|off|field|devel|next|nr}β setting/querying netmonitor mode.--reset [soft|hard]β resets the phone. By default a soft reset is performed. Depending on phone, thehardoption also deletes everything in the internal memory and restores the factory settings. β οΈ That's the "delete the whole vibe" button, be careful.
π TODO π
--gettodo start_number [end_number|end] [-v|--vCal]β get the notes with numbers fromstart_numbertoend_numberfrom ToDo list.endis a keyword that denotes 'everything till the end'.-v | --vCalβ output in vCalendar 1.0 format
--writetodo vcalfile start_number [end_number|end]β write the notes with numbers fromstart_numbertoend_numberfrom vCalendar filevcalfileto ToDo list. More than one note a time can be saved.endis a keyword that denotes 'everything till the end'.numberβ location of the note in the vCalendar file
--deletealltodosβ delete all notes from the ToDo list. π no undo bestie.
π CALENDAR π
--getcalendarnote start_number [end_number|end] [-v|--vCal]β get the notes with numbers fromstart_numbertoend_numberfrom calendar.endis a keyword that denotes 'everything till the end'.-v | --vCalβ output in vCalendar 1.0 format
--writecalendarnote vcalfile start_number [end_number|end]β write the notes with numbers fromstart_numbertoend_numberfrom vCalendar filevcalfileto a phone calendar. More than one note a time can be saved.endis a keyword that denotes 'everything till the end'.numberβ location of the note in the vCalendar file
--deletecalendarnote start_number [end_number|end]β delete the notes with numbers fromstart_numbertoend_numberfrom calendar.endis a keyword that denotes 'everything till the end'.
π± SMS π±
--getsms memory_type start [end] [-f|--file file] [-F|--force-file file] [-a|--append-file file] [-d|--delete]β gets SMS messages from specified memory type starting at entrystartand ending atendand print them tostdoutby default.endcan be a number or the string'end'. Ifendis not specified only one location βstartβ is read.
For the memory types you usually use IN (Inbox) and OU (Outbox) for Nokias and SM (SIM card) and ME (phone memory) for other brands, except for modern Motorolas that prefer MT (combined SIM and phone memory); in any case the --showsmsfolderstatus command shows the list of memory types available in your phone with their descriptions and message counts (each part of multipart messages is counted separately).
-f | --file fileβ save messages to file in mbox format. Iffilealready exists, user is prompted whether to overwrite it-F | --force-file fileβ save messages to file in mbox format. Iffilealready exists, it is overwritten without asking-a | --append-file fileβ save messages to file in mbox format. Iffilealready exists, messages are added to the end-d | --deleteβ delete message after reading.
--deletesms memory_type start [end]β deletes SMS messages from specified memory type starting at entrystartand ending atend. Ifendis not specified only one location βstartβ is deleted.--sendsms destination [--smsc message_center_number | --smscno message_center_index] [-r|--report] [-8|--8bit] [-C|--class n] [-v|--validity n] [-i|--imelody] [-a|--animation file;file;file;file] [-o|--concat this;total;serial] [-w|--wappush url]β sends an SMS message todestinationviamessage_center_numberor SMSC number taken from phone memory from addressmessage_center_index. If this argument is omitted SMSC number is taken from phone memory from location1. Message text is taken fromSTDIN. Meaning of other optional parameters:-r | --reportβ request for delivery report-8 | --8bitβ set 8bit coding-C | --class nβ Class Messagen, wherencan be0..3-v | --validity nβ validity in minutes-i | --imelodyβ send iMelody within SMS-a | --animation file;file;file;fileβ send animation message-o | --concat this;total;serialβ sendthispart of alltotalparts identified byserial-w | --wappush urlβ send wappush to the givenurl
Sample usage:
echo "This is a test message" | gnokii --sendsms +48501123456 -r
--savesms [--sender from] [--smsc message_center_number | --smscno message_center_index] [--folder folder_id] [--location number] [--sent | --read] [--deliver] [--datetime YYMMDDHHMMSS]β okay bestie, this one saves SMS messages to the phone! π² Messages are read from STDIN. You can specify these optional arguments:--senderβ set the sender number (only--deliver)--smsc message_center_numberβ set the SMSC number (only--deliver)--smscno message_center_indexβ SMSC number taken from phone memory from addressmessage_center_index(only--deliver)--folder folder_idβ folder ID where to save the SMS to (only valid for newer phones, i.e. 6210/6510 series). For legal values see--getsms.--location numberβ save the message to locationnumber--sent | --readβ mark the message saved/read depending on--deliver--deliverβ set the message type toSMS_Deliver--datetime YYMMDDHHMMSSβ sets datetime of delivery, i.e.031123185713would set message delivery time to 23rd November 2003, 6:57:13 PM
--getsmsc [start_number [end_number]] [-r|--raw]β show the SMSC parameters from specified location(s) or for all locations. β¨-r | --rawβ output in a format suitable for--setsmsc
--setsmscβ set SMSC parameters read from STDIN. See--rawoutput of--getsmscfor syntax. π₯--createsmsfolder nameβ create SMS folder with namename. π--deletesmsfolder numberβ delete folder #numberof 'My Folders'. ποΈ--showsmsfolderstatusβ list SMS folder names with memory types and total number of messages available. π--smsreaderβ keeps reading incoming SMS and saves them into the mailbox. π¨
MMS π
--getmms memory_type start [end] [{--pdu|--raw} file] [-o|--overwrite]β gets MMS messages from specified memory type starting at entrystartand ending atend. Default output format is human readable, alternative output formats are--pduwhich is the binary format of MMS as received by the phone from the network and--rawwhich saves the data as read from the phone. πΈ
β οΈ When the-oor--overwriteoption is used, existing files are overwritten without asking. No take-backs, bestie! π
--deletemms memory_type start [end]β deletes MMS messages from specified memory type starting at entrystartand ending atend. Ifendis not specified only one location -startis deleted. ποΈ
LOGOS π
--sendlogo {caller|op|picture} destination logofile [network_code]β send thelogofiletodestinationas operator or CLI logo. πΌοΈ--setlogo op [logofile [network_code]]--setlogo startup [logofile]--setlogo caller [logofile [caller_group_number [group_name]]]β set or clear operator, startup or caller logo. β¨--setlogo {dealer|text} [text]β set or clear welcome note. π--getlogo op [logofile [network_code]]--getlogo startup [logofile [network_code]]--getlogo caller [caller_group_number [logofile [network_code]]]β get operator, startup or caller logo. π₯--getlogo {dealer|text}β get welcome note. π--viewlogo logofileβ print thelogofileas ASCII art. Formats that are automatically detected are:NOL,NGG,NSM,NLM,BMP,I61,GGP,XPM. The OTA format can be used only if the filename ends with the.otbextension. π¨
Format of network_code parameter is 3 digits MCC, a space, 2 digits MNC surrounded by single or double quotes, eg. "123 45". π
RINGTONES π΅
--sendringtone destination rtttlfileβ send thertttlfiletodestinationas ringtone. πΆ--setringtone rtttlfileβ set thertttlfileas ringtone (on 6110). π
PHONEBOOK π
--getphonebook memory_type start_number [end_number|end] [[-r|--raw]|[-v|--vcard]|[-l|--ldif]]β reads specified memory location from phone. Ifend_numberis not specified only one location -startis read. If instead ofend_numberthe textendis specified then gnokii will read fromstart_numberuntil it encounters a non-existant location. Valid memory types areME,SM,FD,ON,EN,DC,RC,MC,LD:MEβ Internal memory of the mobile equipmentSMβ SIM card memoryFDβ Fixed dial numbersONβ Own numbersENβ Emergency numbersDCβ Dialled numbersRCβ Received callsMCβ Missed callsLDβ Last dialed numbers
Normally you get human readable output. Please note, that it is not compatible with expected input by --writephonebook. You can use -v or --vcard switch to get output in vCard format or -l or --ldif switch to get output in ldif format or -r or --raw switch to get the raw output which is explained below. You can use it then with --writephonebook. π
--writephonebook [-o|--overwrite] [-f|--find-free] [-m|--memory-type|--memory memory_type] [-n|--memory-location|--location number] [[-v|--vcard]|[-l|--ldif]]β reads data from stdin and writes to phonebook. Uses the format as provided by the output of thegetphonebookcommand using--rawor--vcardor--ldif. Default is raw format (see below for details) and alternate formats are vCard and ldif. Default--getphonebookoutput format is not compatible with--writephonebook. π
With --memory-type memory_type and --memory-location number you can set a memory type and a location if the input data doesn't specify them. β¨
β οΈ When the-oor--overwriteoption is used, existing entries at a given location are overwritten.
When the -f or --find-free option is given, gnokii tries to find a free location. In this case, you can omit the location field in the input data. π
The raw phonebook format is very simple. Each line represents one entry. Fields are separated by semicolons. Semicolons aren't allowed inside a field. The fields have to be in this order (the subentries are optional, ie. you can repeat all subentry field multiple times, but they have to be alltogether in the given order):
namenumbermemory_typeentry_locationcaller_group_numbersubentry_typesubentry_number_typesubentry_idsubentry_text
Possible values of caller_group_number and the corresponding caller groups are (these are defaults, you are able to change these manually in your phone):
0β Family1β VIP2β Friends3β Colleagues4β Other5β No group
Possible subentry types are described in the gnokii/common.h file:
7β subentry is the name8β subentry is the email address9β subentry is the postal address (snail mail)10β subentry is the note (text field)11β subentry is the number12β subentry is the ringtone19β subentry is the date (used for DC, RD, LD)26β subentry is the pointer (pointer to the other memory)27β subentry is the logo (bitmap)28β subentry is the logo switch30β subentry is the group (octect)44β subentry is the URL47β subentry is the location (octect)51β subentry is the image (file id)55β subentry is the ringtoneadv (file id or ringtone)56β subentry is the userid63β subentry is the pttaddress67β subentry is the extgroup69β subentry is the video (file id)70β subentry is the firstname71β subentry is the lastname74β subentry is the postaladdress75β subentry is the extendedaddress76β subentry is the street77β subentry is the city78β subentry is the stateprovince79β subentry is the zipcode50β subentry is the country82β subentry is the formalname84β subentry is the jobtitle85β subentry is the company86β subentry is the nickname87β subentry is the birthday
Possible subentry number types are described in the gnokii/common.h file:
2β number is the home phone number3β number is the mobile phone number4β number is the fax number6β number is the work phone number10β number is the general number
For the subentry types that don't care about number type (as text files) this should be set to 0. π¬
--deletephonebook memory_type start_number [end_number|end]β delete entries withstart_numbertoend_numberfrom the phone book inmemory_type.endis a keyword that denotes 'everything till the end'. ποΈ
WAP π
--getwapbookmark numberβ reads the specified WAP bookmark from phone. π--writewapbookmark name URLβ write WAP bookmark to phone. βοΈ--deletewapbookmark numberβ delete WAP bookmark from phone. ποΈ--getwapsetting number [-r|--raw]β read WAP setting from phone. βοΈ--writewapsettingβ reads data from stdin and writes it to phone. Hint: see syntax from--getwapsetting -roption. π--activatewapsetting numberβ activate WAP settingnumber. π
DATE, TIME AND ALARM β°
--setdatetime [YYYY [MM [DD [HH [MM]]]]]β set the date and the time of the phone. π--getdatetimeβ shows current date and time in the phone. π--setalarm HH MMβ set the alarm of the phone. β°--getalarmβ shows current alarm. π
SECURITY π
--identifyβ get IMEI, manufacturer, model, product name and revision. π--entersecuritycode {PIN|PIN2|PUK|PUK2|SEC}β asks for the code and sends it to the phone. Code is read from terminal or from stdin. π--getsecuritycodeβ shows the currently set security code. π’--getsecuritycodestatusβ show if a security code is needed. β--getlocksinfoβ show information about the (sim)locks of the phone: the lock data, whether a lock is open or closed, whether it is a user or factory lock and the number of unlock attempts. π
FILE π
Note that some phones (like Nokia 6610i) support only id based operations (gnokii options with"byid"suffix). Usegnokiifsfor the transparent support. π±
--getfilelist remote_pathβ lists files from the given directory. UseA:\*orB:\*to get the root directory from either phone memory or card memory. π--getfiledetailsbyid [id]β lists file details or directory contents from the entry identified byid. If no identifier is given, list the root directory contents. π--getfileid remote_filenameβ gets id of the file. π--getfile remote_filename [local_filename]β yoinks the file with that name and path off your phone and drops it onto the local computer. phone β laptop, no cap π--getfilebyid id [local_filename]β same energy, but instead of a name you hand it anidand it pulls that file off the phone and saves it locally.--getallfiles remote_pathβ literally grabs every single file from the remote path. all of them. the whole folder. slay.--putfile local_filename remote_filenameβ shoves a file from your computer into the phone memory or onto the memory card. upload szn β¨--deletefile remote_filenameβ removes that file from the phone. gone. deleted. not coming back π--deletefilebyid idβ same thing but byidinstead of by name. removes the file from the phone.
π MISC π
--keysequenceβ emulates pressing keys on the phone keyboard. input gets read fromstdin. it's giving "I am the finger now" π
These are the keys it supports (bestie, any other char is just ignored, fr fr):
Mβ menuNβ namesPβ powerGβ green phoneRβ red phoneUβ upDβ down+β increase volume-β decrease volume0123456789#*β as is
Example: to increase volume
echo "+" | gnokii --keysequence
Note: this command isn't supported by all phones/drivers. check before you commit, bestie π
--entercharβ emulates typing a character on the phone keyboard. by emulating multiple pressions of keys it can input all characters supported by the phone in use, but to input an SMS predictive text should be disabled. input is read fromstdin, with newline interpreted as the"Menu"key and escape interpreted as the"Names"key. typing with extra steps but make it β¨iconicβ¨
Note: this command isn't supported by all phones/drivers. same warning, same vibe π«Ά
--listnetworksβ prints a list of cellular network operators with their 3-digitsMCC(Mobile country code) and 2-digitsMNC(Mobile Network Code). network lore unlocked π
Note: this command doesn't need a valid config or a phone to work. no phone? no config? no problem, she just knows π
--getnetworkinfoβ prints information about the network currently in use. who's she connected to rn π‘
π©Ί DIAGNOSTICS π©Ί
Various error messages are printed to standard error. the tea gets spilled to stderr, always
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.
So like, 0 = we ate π, 2 = you typed something cursed on the command line π, 1 = everything else went sideways π
π BUGS π
We write quality software here ;) but see KNOWN_BUGS just in case. If you'd like to send us the bugreport please read the README and Bugs files.
ngl the ";)" is doing so much heavy lifting and I respect it π«Ά
π AUTHOR π
Hugh Blemings <hugh at blemings dot org>, Pavel Janik ml. <Pavel.Janik at suse dot cz> and Pawel Kot <gnokii at gmail dot com>.
Manual page written by Dag Wieers <dag at mind dot be>, Pawel Kot <gnokii at gmail dot com> and Daniele Forsi <daniele at forsi dot it>.
See also Docs/CREDITS from gnokii sources.
π COPYING π
This program is distributed under the GNU Public License Version 2, or (at your option) any later version. license but make it legal-cute π
π SEE ALSO π
gnokiidxgnokiimgnokiidevppm2nokiasendsmstodologo
and that's the whole page bestie, you made it to the end ππ this icon of a manual page is gnokii(1), brought to you by Dag Wieers and Pawel Kot, dated Jul 7, 2011. go forth and gnokii responsibly π
β¨
π¦ where this page comes from
- debian trixie: gnokii-cli 0.6.31+dfsg-6
- epel 9: gnokii 0.6.31-35.el9 Β· GPLv2+
- fedora 43: gnokii 0.6.31-46.fc43 Β· GPL-2.0-or-later
- fedora 43: gnokii 0.6.31-46.fc43 Β· GPL-2.0-or-later
- fedora 44: gnokii 0.6.31-47.fc44 Β· GPL-2.0-or-later
- fedora 44: gnokii 0.6.31-47.fc44 Β· GPL-2.0-or-later
- ubuntu jammy: gnokii-cli 0.6.31+dfsg-2ubuntu10
- ubuntu noble: gnokii-cli 0.6.31+dfsg-5.1ubuntu3
- ubuntu questing: gnokii-cli 0.6.31+dfsg-5.1ubuntu4
- ubuntu resolute: gnokii-cli 0.6.31+dfsg-5.1ubuntu5
- ubuntu stonking: gnokii-cli 0.6.31+dfsg-5.1ubuntu5
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms