# This is a sample ~/.gnokiirc file. Copy it into your # home directory and name it .gnokiirc. # See http://wiki.gnokii.org/index.php/Config for working examples. # [global] # Set port to the physical port used to connect to your phone. # Linux version is: port = /dev/ttyS0 # # For MacOSX you will need something like: # port = /dev/cu.USA28X1P1.1 # # For Win32 you want to use: # port = com1: # or similiar. # # FreeBSD (probably NetBSD and OpenBSD too) use: # port = /dev/cuaa0 # # With Linux-IrDA you will want to use # port = /dev/ircomm0 # or similiar. # # Use this setting also for the Bluetooth connection: # port = aa:bb:cc:dd:ee:ff # when using it with AT driver set it to: # port = /dev/rfcomm0 # or similiar. # # For the Linux USB cables you will need one of the following settings (or # similiar) # port = /dev/ttyUSB0 # port = /dev/tts/USB0 # port = /dev/ttyACM0 # the last one will work only with AT driver. The correct setting should be # given in the dmesg output. # # If you use connection type dku2libusb use it to denote which use endpoint # you'd wish to use. It is useful when you have more than one phone connected # to your computer using DKU2 cable. Numbering goes from 1 upwards. # Default is 1. # port = 1 # Set model to the model number of your phone. For the # Symbian phones use: # model = symbian # For other non-Nokia phones and when you want to use AT # mode use: # model = AT # If you can't figure out what to put here read the FAQ. # If it still doesn't help, consult gnokii-ml or #gnokii at freenode. model = AT # There are few main models that should make use of the certain drivers. # These are: 6110, 7110, 6510, 3110, 2110, 6160. # Set IrDA device name. # If you use irda connection you may want gnokii to autodetect the irda # device it connects to. This is fine for most of the cases. if you have # more than one device in range you may want to give manually the device # name so gnokii correctly recognizes it. Use the name that you can see # in the discovery log when the phone with infrared is in the range of # your irda port. # Note that you need to set this for each phone_ section separately. It # isn't nested from the global section. # irda_string = Nokia 6610i # 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. initlength = default # The type of the connection, for IR set this to infrared or irda. # For the nk6110 driver only infrared is valid for the IrDA connection. # See Docs/gnokii-ir-howto for more detailes on this. # If you have 6210/6250/7110 phone and dau9p cable (the one you can # use with 6100 series and cannot use hardware modem from the phone) # you may want to use 'dau9p' value to get faster initialization. # If you use dlr3 or dlr3p cable for nokia phones in FBUS mode (ie. # you don't use model = AT) you may want to use 'dlr3p' value here. # Note that it is recommended and currently the best way to use this # cable with nk6510 driver. connection = serial # With DKU-2 cable use the following setting if you want to libusb driver # (recommended): # connection = dku2libusb # or the following setting if you want to use Linux kernel driver # connection = dku2 # With DKU-5 cable use the following setting # connection = dku5 # For Bluetooth and AT driver use the following setting # connection = serial # For other Bluetooth settings use # connection = bluetooth # For infrared connection with phones other than Nokia 6110/6130/6150 use: # connection = irda # Don't forget to run: 'irattach irda0 -s' or similiar before running gnokii # Set this to 'yes' if you want gnokii to set and check the lock file in # /var/lock directory. It avoids potential conflicts with other serial # port software (eg. minicom). If you have wrong permissions for the # directory, a warning will be generated. If you don't want a lockfile, set # it to 'no'. use_locking = yes # Baudrate to use on serial port connections. # Currently used only by models AT and BIP/CIMD. Defaults to 19200. serial_baudrate = 9600 # Force waiting after each send character the specified usec time. # Value -1 forces the fastest 'block' writing, # value 0 writes each character separately without any explicite waiting, # other positive values specify the appropriate 1/1000000 sec delaying. # Siemens M20 requires at least "1"! FIXME: Model-driven autodetection #serial_write_usleep = 10000 # Force serial port handshaking mode, useful primarily for "AT" model. # Gnokii "AT" model uses software handshake by default. # Possible values: hardware (RTS/CTS - 7 wires) or software (XON/XOFF - 3 wires) handshake = software # If defined (not commented out by '#') it will quit Gnokii anytime # when DCD line will drop. #require_dcd = 1 # If you are using a bluetooth connection, you can specify the rfcomm # channel number here. Default value is 1. #rfcomm_channel = 1 # There may happen various timeouts during the communication with the phone. # This parameter enables the retransmission policy. Ie. if the phone doesn't # respond, we send the frame again. This happened mainly with the older # phones. You may want to enable it when you see mysterious timeouts. # Be very careful with this option. It is suspected to cause phone breakage # with new DCT4 phones (like Nokia 6100). By default it is switched off # (sm_retry = 0) sm_retry = 0 # Run the specified script(s) right after opening and initializing the device # and before any communication (right before closing for disconnect_script). # You may find handy to use it to connect your modem to SMS Center # when using BIP or CIMD protocols # Non-absolute path is relative to the specific directory where gnokii is run! #connect_script = /absolute/path/to/gnokii/Docs/sample/cimd-connect #disconnect_script = # When sending SMS you can experience timeouts. This is the feature of the # overloaded SMSCs. The phones waits for the response from the SMSC confirming # that it received the short message. When the SMSC is DoSed with many requests # it will take more time to get the response. Adjust it to your needs. The # value is given in seconds to wait. Defaults to 10 seconds. Set to 0 to wait # forever. smsc_timeout = 10 # Set this to 1 if you want to break your phone with xgnokii. Works only # with few Nokia models and FBUS communication [xgnokii] allow_breakage = 0 # Set bindir to point to the location of the various gnokiid binaries. # In particular ensure that mgnokiidev is in this location, with # permissions 4750, owned by root, group gnokii. Ensure you # are in the gnokii group and that the group exists... [gnokiid] bindir = /usr/local/sbin/ # Any entries in the following two sections will be set as environment # variables when running the scripts. # Handy for use for $VAR substitutions in your chat(8) script. [connect_script] TELEPHONE = +32498057892 [disconnect_script] # The following parameters control how libgnokii handles the debugging messages. # Currently there are three categories: "debug" controls the libgnokii # normal debug output, "rlpdebug" controls the debug output of the RLP # subsystem, and "xdebug" is used by the xgnokii or smsd. [logging] # where to log the debug output (on: stderr, off: /dev/null) debug = on # where to log the rlp debug output (on: stderr, off: /dev/null) rlpdebug = off # where to log X debug output (on: stderr, off: /dev/null) xdebug = off --------------------------------debug info ------------------------------ [root@localhost etc]# echo "test" | /usr/bin/gnokii --sendsms +xxxxxxxxxxx GNOKII Version 0.6.19 LOG: debug mask is 0x1 Config read from file /etc/gnokiirc. phone instance config: model: AT port_device: /dev/ttyS0 connection_type: 0 init_length: 0 serial_baudrate: 9600 serial_write_usleep: -1 hardware_handshake: 0 require_dcd: 0 smsc_timeout: 100 connect_script: disconnect_script: rfcomm_cn: 1 sm_retry: off Initializing AT capable mobile phone ... Serial device: opening device /dev/ttyS0 Serial device: setting RTS to high and DTR to high Message sent: 0x00 / 0x0004 41 54 5a 0d | ATZ write: [ATZ] read : [ATZOK] Message received: 0x00 / 0x000a 02 41 54 5a 0d 0d 0a 4f 4b 0d | ATZ OK Received message type 00 Message sent: 0x00 / 0x0005 41 54 45 31 0d | ATE1 write: [ATE1] read : [ATE1OK] Message received: 0x00 / 0x000b 02 41 54 45 31 0d 0d 0a 4f 4b 0d | ATE1 OK Received message type 00 Message sent: 0x00 / 0x000a 41 54 2b 43 4d 45 45 3d 31 0d | AT+CMEE=1 write: [AT+CMEE=1] read : [AT+CMEE=1OK] Message received: 0x00 / 0x0010 02 41 54 2b 43 4d 45 45 3d 31 0d 0d 0a 4f 4b 0d | AT+CMEE=1 OK Received message type 00 Message sent: 0x06 / 0x0008 41 54 2b 43 47 4d 4d 0d | AT+CGMM write: [AT+CGMM] read : [AT+CGMMMC39iOK] Message received: 0x06 / 0x0017 02 41 54 2b 43 47 4d 4d 0d 0d 0a 4d 43 33 39 69 | AT+CGMM MC39i 0d 0a 0d 0a 4f 4b 0d | OK Received message type 06 Message sent: 0x06 / 0x0008 41 54 2b 43 47 4d 49 0d | AT+CGMI write: [AT+CGMI] read : [AT+CGMISIEMENSOK] Message received: 0x06 / 0x0019 02 41 54 2b 43 47 4d 49 0d 0d 0a 53 49 45 4d 45 | AT+CGMI SIEME 4e 53 0d 0a 0d 0a 4f 4b 0d | NS OK Received message type 06 Message sent: 0x61 / 0x0009 41 54 2b 43 53 43 53 3f 0d | AT+CSCS? write: [AT+CSCS?] read : [AT+CSCS?+CSCS: "GSM"OK] Message received: 0x61 / 0x001f 02 41 54 2b 43 53 43 53 3f 0d 0d 0a 2b 43 53 43 | AT+CSCS? +CSC 53 3a 20 22 47 53 4d 22 0d 0a 0d 0a 4f 4b 0d | S: "GSM" OK Received message type 61 Initialisation completed Message sent: 0x23 / 0x0009 41 54 2b 43 53 43 41 3f 0d | AT+CSCA? write: [AT+CSCA?] read : [AT+CSCA?+CSCA: "+32495002530",145OK] Message received: 0x23 / 0x002c 02 41 54 2b 43 53 43 41 3f 0d 0d 0a 2b 43 53 43 | AT+CSCA? +CSC 41 3a 20 22 2b 33 32 34 39 35 30 30 32 35 33 30 | A: "+32495002530 22 2c 31 34 35 0d 0a 0d 0a 4f 4b 0d | ",145 OK Received message type 23 General Data Coding dcs: 0x0 Length: 0x4 user_data_length: 0x4 ValidityIndicator: 2 user_data: F4F29C0E Sending Message sent: 0x63 / 0x000a 41 54 2b 43 4d 47 46 3d 30 0d | AT+CMGF=0 write: [AT+CMGF=0] read : [AT+CMGF=0OK] Message received: 0x63 / 0x0010 02 41 54 2b 43 4d 47 46 3d 30 0d 0d 0a 4f 4b 0d | AT+CMGF=0 OK Received message type 63 PDU mode set Sending initial sequence Message sent: 0x64 / 0x000b 41 54 2b 43 4d 47 53 3d 31 38 0d | AT+CMGS=18 write: [AT+CMGS=18] read : [AT+CMGS=18> ] Message received: 0x64 / 0x000f 01 41 54 2b 43 4d 47 53 3d 31 38 0d 0d 0a 3e | AT+CMGS=18 > Received message type 64 Got response 0 Sending frame: 07912394052035F011000B912384554770F70000AA04F4F29C0E Message sent: 0x21 / 0x0035 30 37 39 31 32 33 39 34 30 35 32 30 33 35 46 30 | 07912394052035F0 31 31 30 30 30 42 39 31 32 33 38 34 35 35 34 37 | 11000B9123845547 37 30 46 37 30 30 30 30 41 41 30 34 46 34 46 32 | 70F70000AA04F4F2 39 43 30 45 1a | 9C0E write: [07912394052035F011000B912384554770F70000AA04F4F29C0E^Z] read : [^A^4912394052035F011000B912384554770F70000AA04F4F29C0E^Z+CMS ERROR: 500] Message received: 0x21 / 0x0048 04 01 f4 39 31 32 33 39 34 30 35 32 30 33 35 46 | 912394052035F 30 31 31 30 30 30 42 39 31 32 33 38 34 35 35 34 | 011000B912384554 37 37 30 46 37 30 30 30 30 41 41 30 34 46 34 46 | 770F70000AA04F4F 32 39 43 30 45 1a 0d 0a 2b 43 4d 53 20 45 52 52 | 29C0E +CMS ERR 4f 52 3a 20 35 30 30 0d | OR: 500 Received message type 21 SMS Send failed (Unknown error - well better than nothing!!) Serial device: closing device