Trasteando con un nokia 6820 y
Mandrake 10 Official por Bluetooth:
Para dar soporte bluetooth a mi Mandrake tuve que instalar:
El paquete de utilidades de bluez y hcidump, como extra para
tener en las X otras utilidades basadas en las anteriores
instalé
también lo perteneciente a bluetooth para gnome y kde.
ebluetooth-0.0.cvs20040302-3mdk.i586.rpm
gnome-bluetooth-0.4.1-4mdk.i586.rpm
kdebluetooth-devel-0.0.cvs20040302-3mdk.i586.rpm
libopenobex1-1.0.1-1mdk.i586.rpm
libopenobex1-devel-1.0.1-1mdk.i586.rpm
openobex-apps:filename:openobex-apps-1.0.0-2mdk.i586.rpm
Utilidades para teléfonos Nokia:
libgnokii1-0.5.10-2mdk.i586.rpm
libgnokii1-devel-0.5.10-2mdk.i586.rpm
libgnokii1-static-devel-0.5.10-2mdk.i586.rpm
gnokii-0.5.10-2mdk.i586.rpm
gnokii-xgnokii-0.5.10-2mdk.i586.rpm
Recordad que hay que incluir al menos como módulos en el kernel
las opciones de bluetooth.
Hay que arrancar el servicio bluetooth si Mandrake no lo ha iniciado
automáticamente:
Como root:
/etc/init.d/bluetooth start
Intenté instalar el programa gammu para Mandrake 10 pero me
encontré con que no existe como tal en los repositorios de esta
versión
de la distribución, asi que
como viejo usuario de Slackware me lo compilé, pero tuve
diversos
problemas ya que la última versión exige librerias que
Mandrake 10
Official no satisface. Es increible lo “viejecitas” que se
nos quedan
las distribuciones últimamente a los Linuxeros, en pocos meses
ya salen
librerias nuevas, de todos modos nada que no se solucione con un poco
de paciencia y voluntad.
Decidí instalar alguna versión anterior estable de gammu,
en concreto he instalado la siguiente:
gammu-0.95.0.tar.gz.
Instalación:
gunzip gammu-0.95.0.tar.gz
tar -xvf gammu-0.95.0.tar
cd /gammu-0.95.0.tar
./configure
make
make install
Compiló limpiamente y me dejó los ejecutables en
/usr/local/bin.
El uso de los paquetes es muy sencillo, en principio con meter
el dispositivo USB, Mandrake automágicamente nos carga los
módulos
adecuados para su uso (.- me encanta esta distribución
Mmwahahaha!!) y
podemos usar el gnome-bluetooth-admin o el comando hcitool entre otros
para el escaneo del dispositivo y asi poder ver algunos datos que luego
nos serán de utilidad.
Para el soporte bluetooth hay que tocar un par de ficheros en
/etc/bluetooth:
Uno es el rfcomm.conf y el otro el pin.
En el primero configuramos la dirección del dispositivo
bluetooth y en el segundo metemos la clave que le pongamos de acceso
bluetooth al teléfono para que coincidan ambos.
RFCOMM configuration file.
$Id: rfcomm.conf,v 1.1 2002/10/07 05:58:18 maxk Exp $
rfcomm0 {
# Automatically bind the device at startup
bind yes; (este se puede poner en no para que no intente conectar automáticamente o en si para que lo intente).
# Bluetooth address of the device
device XX:XX:XX:XX:XX:XX (la dirección del dispositivo bluetooth)
# RFCOMM channel for the connection
channel 10; (El canal que usa el teléfono para intercambio de archivos.)
# Description of the connection
comment "Example Bluetooth device"; (description de la conexión)
}
En el fichero pin se debe poner solo el número de clave de
acceso al dispositivo (el mismo que el del teléfono nos facilita
las
cosas), solo debe contener números.
La configuración de gammu esta en el fichero /etc/gammurc, el
propio paquete lleva ficheros de configuración de ejemplo.
El mio es asi:
This is a sample ~/.gammurc file.
In Unix/Linux copy it into your home directory and name it .gammurc
or into /etc and name it gammurc
In Win32 copy it into directory with Gammu.exe and name gammurc
More about parameters later
-----------------------------------------------------------------------------
[gammu]
port = xx:xx:xx:xx:xx:xx (el puerto o dirección que os salga con
la utilidad gnome-bluetooth-admin o hcitool)
model = 7210
connection = bluephonet
synchronizetime = yes
logfile = gammulog
logformat = textall
use_locking = yes
gammuloc = locfile
startinfo = yes
gammucoding = utf8
Now info about "Connection" parameter and connected with it port type
(more about port types later)
El fichero tiene cantidad de explicaciones, por lo que no creo
que tengais problema en configurarlo, el channel por el que suele
intercambiar los datos es el 10. En todo caso con gnome-bluetooth admin
os da de manera bastante explícita que canales dispone el
teléfono y
para que los usa.
El modelo como podeis observar es el 7210, he tenido que poner
este porque gammu-0.95.0 no soporta el modelo de nokia 6820, supongo
que la versión actual si (cuando haga el upgrade de la Mandrake
os lo
cuento).
Gammu funciona por línea de comandos pero teneís
también un entorno gráfico que se llama wammu.
La configuración de gnokii:
La configuración de gnokii esta en /etc/gnokiirc, como en el
caso anterior tenemos ejemplos para la configuración. El
programa tiene
un interfaz gráfico que se llama xgnokii y va bastante bien,
adjuntaré
pantallazos para que le echeis un vistazo.
La instalación desde consola en Mandrake:
- urpmi gnokii
Desde el drakconf también se puede hacer en el entorno
X, una vez instalado gnokii, nos crea un fichero de
configuraciñón como
ejemplo en /etc que se llama gnokiirc, este fichero tenemos que
copiarlo al home de nuestro usuarios renombrándolo a ".gnokiirc"
(sin
las comillas, claro.).
Editamos el archivo de configuración y nos encontramos con lo
siguiente:
This is a sample ~/.gnokiirc file. Copy it into your
home directory and name it .gnokiirc.
[global]
Set port to the physical serial port used to connect to your phone.
Linux version is:
#port = /dev/ttyS0
#port = xx:xx:xx:xx:xx:xx (puerto bluetooth que hayamos visto con
gnome-bluetooth-admin por ejemplo)
# For MacOSX you will need something like:
# port = /dev/cu.USA28X1P1.1
# Use this setting also for the Bluetooth connection:
# port = aa:bb:cc:dd:ee:ff
# Set model to the model number of your phone
model = 8310 (ponemos un modelo soportado para que nos funcione, o el
nuestro si esta soportado ya)
# 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
connection = bluetooth
# Set bindir to point to the location of the various gnokii binaries.
# In particular ensure that mgnokiidev is in this location, with
# Set bindir to point to the location of the various gnokii 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...
bindir = /usr/sbin/
#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 = no=]
# Baudrate to use on serial port connections.
# Currently used only by models AT and BIP/CIMD. Defaults to 19200.
serial_baudrate = 19200
# 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 (normalmente el channel es este pero puede variar
según los dispositivos).
# Run the specified script(s) right after opening and initializing the
device
# and before any communucation (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
# 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 = 12345678
Hay un montón de opciones para usar el telefono como
módem, sms,
etc . Por ahora no he probado a conectarme por GPRS con él por
lo que
no puedo contaros nada sobre este asunto.
Bueno!, ¿quien dijo que linux era dificil?, espero que el
pequeño artículo os lo haga más fácil para
configurar la conexión por
bluetooth con un teléfono nokia.
En cuanto diosponga de un poco de tiempo pondré unos screenshots.