1.2.4. Configuring Gnokii / XGnokii on Linux
Now we have successfully installed Gnokii/XGnokii on Linux. Next, we need to specify the correct settings in Gnokii's configuration file.
There is a sample configuration file gnokiirc in the gnokii-version/Docs/sample directory of the extracted source tarball, where version is the version of Gnokii you are using. As we are using Gnokii 0.6.14, the sample configuration file is located at the gnokii-0.6.14/Docs/sample directory. Copy it to your home directory in Linux and add a dot character to the beginning of its file name using the following command line:
# cp gnokii-0.6.14/Docs/sample/gnokiirc ~/.gnokiirc
Next open the file .gnokiirc in your home directory with a text editor. All lines that begins with the "#" character in the configuration file are comments. The usage of some commonly used parameters and parameter values are described in the following sections. Details of the other parameters can be found in the sample configuration file. Also, the web page at http://wiki.gnokii.org/index.php/Config contains some configurations that are reported to work under Linux. You can check whether information about your mobile phone is available on that web page.
1.2.4.1. The port Parameter -- Specifying the Port on the PC that the Mobile Phone is Connected to
The port parameter specifies the port on the PC that the mobile phone is connected to. You must have read and write permissions on the port.
1.2.4.1.1. Serial Connection (RS-232 Connection)
If the mobile phone is connected to the serial port (RS-232 port) of the PC, the value of the port parameter should be set to /dev/ttySn, where n = 0, 1, 2... For example:
port = /dev/ttyS0
1.2.4.1.2. Bluetooth / RFCOMM Connection
If the mobile phone is connected to the PC via Bluetooth, the value of the port parameter should be set to the Bluetooth address of the mobile phone. If you are going to use a RFCOMM connection between the PC and the mobile phone, the value of the port parameter should be set to /dev/rfcommn, where n = 0, 1, 2... Below are some examples:
#
Example 1:
port = 00:11:AB:B3:10:EB
#
Example 2:
port = /dev/rfcomm0
If Gnokii's source code is not compiled with Bluetooth support, the only choice is to use a RFCOMM connection.
Note that only AT mode (i.e. the value of the model parameter is set to AT) can work with a RFCOMM connection.
1.2.4.1.3. Infrared (IrDA) Connection
If the mobile phone is connected to the PC via infrared (IrDA), the value of the port parameter should be set to /dev/ircommn, where n = 0, 1, 2... For example:
port = /dev/ircomm0
1.2.4.1.4. USB Connection
If the mobile phone is connected to the USB port of the PC, the value of the port parameter should be set to /dev/ttyUSBn, where n = 0, 1, 2... The value can also be set to /dev/ttyACMn if AT mode is used. Below are some examples:
#
Example 1:
port = /dev/ttyUSB0
#
Example 2:
port = /dev/ttyACM0
Previous Page | Page 4 of 12 | Next Page |
- 1. How to Use a Linux PC to Send and Receive SMS Messages (Non-Developer's Perspective)
- 1.1. Requirements for Sending and Receiving SMS Messages from a Linux PC via a Mobile Phone
- 1.2. Using Gnokii to Send and Receive SMS Messages from a Linux PC
- 1.2.1. Introduction
- 1.2.2. Mobile Phone Models Supported by Gnokii
- 1.2.3. Installing Gnokii / XGnokii
- 1.2.4. Configuring Gnokii / XGnokii on Linux
- 1.2.5. Examples
- 1.2.6. Testing Gnokii on Linux
- 1.2.7. Sending SMS Text Messages with XGnokii on Linux
- 1.2.8. Receiving SMS Text Messages with XGnokii on Linux
- 1.2.9. Importing and Exporting Phone Book Entries with XGnokii on Linux