Outils pour utilisateurs

Outils du site


brouillon_bluetooth

Différences

Ci-dessous, les différences entre deux révisions de la page.

Lien vers cette vue comparative

Les deux révisions précédentesRévision précédente
Prochaine révision
Révision précédente
brouillon_bluetooth [2008/10/28 13:28] thierrybrouillon_bluetooth [2009/02/01 17:55] (Version actuelle) thierry
Ligne 3: Ligne 3:
   *http://www.meeus-d.be/linux/bluetooth.html   *http://www.meeus-d.be/linux/bluetooth.html
   *http://www.nerux.org/index.php/Bluetooth_irda   *http://www.nerux.org/index.php/Bluetooth_irda
-  *http://www.developershome.com/sms/smsLinux.asp+  *http://www.developershome.com/sms/ 
 +  *http://www.michaelwood.me.uk/wordpress/2007/03/ 
 + 
 ===== bases ===== ===== bases =====
  
Ligne 243: Ligne 246:
   connection = bluetooth   connection = bluetooth
 On ne change pas le reste... On ne change pas le reste...
 +
 +
 +
 +
  
 ==== tests ==== ==== tests ====
Ligne 280: Ligne 287:
   Message sent: 0x00 / 0x000a   Message sent: 0x00 / 0x000a
   41 54 2b 43 4d 45 45 3d 31 0d                   | AT+CMEE=1   41 54 2b 43 4d 45 45 3d 31 0d                   | AT+CMEE=1
-  write: [AT+CMEE=1<cr>] +   
-  read : [AT+CMEE=1<cr><cr><lf>OK<cr><lf>] +  .. <snip... 
-  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<cr>+
-  read : [AT+CGMM<cr><cr><lf>AAB-1021011-BV<cr><lf><cr><lf>OK<cr><lf>+
-  Message received: 0x06 / 0x0020 +
-  02 41 54 2b 43 47 4d 4d 0d 0d 0a 41 41 42 2d 31 |  AT+CGMM   AAB-1 +
-  30 32 31 30 31 31 2d 42 56 0d 0a 0d 0a 4f 4b 0d | 021011-BV    OK +
-  Received message type 06 +
-  Message sent: 0x06 / 0x0008 +
-  41 54 2b 43 47 4d 49 0d                         | AT+CGMI +
-  write: [AT+CGMI<cr>+
-  read : [AT+CGMI<cr><cr><lf>SONY ERICSSON<cr><lf><cr><lf>OK<cr><lf>+
-  Message received: 0x06 / 0x001f +
-  02 41 54 2b 43 47 4d 49 0d 0d 0a 53 4f 4e 59 20 |  AT+CGMI   SONY +
-  45 52 49 43 53 53 4f 4e 0d 0a 0d 0a 4f 4b 0d    | ERICSSON    OK +
-  Received message type 06 +
-  Message sent: 0x61 / 0x0009 +
-  41 54 2b 43 53 43 53 3f 0d                      | AT+CSCS? +
-  write: [AT+CSCS?<cr>+
-  read : [AT+CSCS?<cr><cr><lf>+CSCS: "GSM"<cr><lf><cr><lf>OK<cr><lf>+
-  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: 0x06 / 0x0008 +
-  41 54 2b 43 47 4d 4d 0d                         | AT+CGMM +
-  write: [AT+CGMM<cr>+
-  read : [AT+CGMM<cr><cr><lf>AAB-1021011-BV<cr><lf><cr><lf>OK<cr><lf>+
-  Message received: 0x06 / 0x0020 +
-  02 41 54 2b 43 47 4d 4d 0d 0d 0a 41 41 42 2d 31 |  AT+CGMM   AAB-1 +
-  30 32 31 30 31 31 2d 42 56 0d 0a 0d 0a 4f 4b 0d | 021011-BV    OK +
-  Received message type 06 +
-  Message sent: 0x06 / 0x0008 +
-  41 54 2b 43 47 4d 49 0d                         | AT+CGMI +
-  write: [AT+CGMI<cr>+
-  read : [AT+CGMI<cr><cr><lf>SONY ERICSSON<cr><lf><cr><lf>OK<cr><lf>+
-  Message received: 0x06 / 0x001f +
-  02 41 54 2b 43 47 4d 49 0d 0d 0a 53 4f 4e 59 20 |  AT+CGMI   SONY +
-  45 52 49 43 53 53 4f 4e 0d 0a 0d 0a 4f 4b 0d    | ERICSSON    OK +
-  Received message type 06 +
-  Message sent: 0x06 / 0x0008 +
-  41 54 2b 43 47 4d 52 0d                         | AT+CGMR +
-  write: [AT+CGMR<cr>+
-  read : [AT+CGMR<cr><cr><lf>R4C003      CXC125566^QEU^Q2<cr><lf><cr><lf>OK<cr><lf>+
-  Message received: 0x06 / 0x002c +
-  02 41 54 2b 43 47 4d 52 0d 0d 0a 52 34 43 30 30 |  AT+CGMR   R4C00 +
-  33 20 20 20 20 20 20 43 58 43 31 32 35 35 36 36 | 3      CXC125566 +
-  11 45 55 11 32 0d 0a 0d 0a 4f 4b 0d              EU 2    OK+
   Received message type 06   Received message type 06
   Message sent: 0x06 / 0x0008   Message sent: 0x06 / 0x0008
Ligne 351: Ligne 307:
   Serial device: closing device   Serial device: closing device
 Yes !  Yes ! 
 +
 +Mais encore:
 +  # gnokii --monitor once
 +  gnokiid Version 0.6.14
 +  LOG: debug mask is 0x1
 +  phone instance config:
 +  model: AT
 +  port_device: 00:0F:DE:16:E3:5C
 +  connection_type: 5
 +  init_length: 0
 +  serial_baudrate: 19200
 +  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 00:0F:DE:16:E3:5C
 +  Message sent: 0x00 / 0x0004
 +  41 54 5a 0d                                     | ATZ
 +  write: [ATZ<cr>]
 +  read : [ATZ<cr><cr><lf>OK<cr><lf>]
 +  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<cr>]
 +  read : [ATE1<cr><cr><lf>OK<cr><lf>]
 +  Message received: 0x00 / 0x000b
 +  02 41 54 45 31 0d 0d 0a 4f 4b 0d                |  ATE1   OK
      
 +  ... <snip> ...
 +  
 +  Received message type 14
 +  Message sent: 0x14 / 0x0009
 +  41 54 2b 43 52 45 47 3f 0d                      | AT+CREG?
 +  write: [AT+CREG?<cr>]
 +  read : [AT+CREG?<cr><cr><lf>+CREG: 0,1<cr><lf><cr><lf>OK<cr><lf>]
 +  Message received: 0x14 / 0x001d
 +  02 41 54 2b 43 52 45 47 3f 0d 0d 0a 2b 43 52 45 |  AT+CREG?   +CRE
 +  47 3a 20 30 2c 31 0d 0a 0d 0a 4f 4b 0d          | G: 0,1    OK
 +  Received message type 14
 +  strings[0] = +CREG: 0
 +  strings[1] = 1
 +  strings[2] = (null)
 +  strings[3] = (null)
 +  Appel0: inactif
 +  Appel1: inactif
 +  Sortie du mode surveillance...
 +  Serial device: closing device
 +
 +==== Envoi SMS ====
 +  # echo "Hello Ducon" | gnokii --sendsms +3360721abcd
 +Yes !
 +
 +
 +
 +===== N80/N81 =====
 +
 +==== Problème ====
 +Problème... gnokii ne fonctionne pas avec... grrr
 +
 +  # sdptool browse 00:12:D2:CC:B8:8B | grep "Service Name"
 +  Service Name: AVRCP Target
 +  Service Name: Hands-Free Audio Gateway
 +  Service Name: Headset Audio Gateway
 +  Service Name: SyncMLClient
 +  Service Name: OBEX File Transfer
 +  Service Name: Nokia OBEX PC Suite Services
 +  Service Name: Nokia SyncML Server
 +  Service Name: OBEX Object Push
 +  Service Name: Dial-Up Networking
 +  Service Name: Imaging
 +
 +Et pourtant:
 +  $ obexftp -b 00:12:D2:CC:B8:8B -l
 +  Browsing 00:12:D2:CC:B8:8B ...
 +  Channel: 11
 +  Connecting...done
 +  Receiving "(null)"... <?xml version="1.0"?>
 +  <!DOCTYPE folder-listing SYSTEM "obex-folder-listing.dtd"
 +    [ <!ATTLIST folder mem-type CDATA #IMPLIED>
 +    <!ATTLIST folder label CDATA #IMPLIED> ]>
 +  <folder-listing version="1.0">
 +     <folder name="C:" user-perm="RW" mem-type="DEV" label="Mémoire du téléphone"/>
 +     <folder name="E:" user-perm="RW" mem-type="MMC" label="Carte mém"/>
 +  </folder-listing>done
 +  Disconnecting...done
 +
 +
 +
 +
 +
 +
 +==== Soluce ? ====
 +
 +Editer le fichier **''/etc/bluetooth/rfcomm.conf''** afin d'avoir:
 +  #
 +  # RFCOMM configuration file.
 +  #
 +  
 +  rfcomm0 {
 +        # Automatically bind the device at startup
 +        bind yes;
 +  
 +        # Bluetooth address of the device
 +        device 00:12:D2:CC:B8:8B;
 +  
 +        # RFCOMM channel for the connection
 +        channel 2;
 +  
 +        # Description of the connection
 +        comment "Example Bluetooth device";
 +  }
 +
 +| :!: "channel 2" et pas autre chose! pourquoi ? mystère! et pas de rapport évident avec ".gnokiirc" ... |
 +
 +Et puis:
 +  # /etc/init.d/bluetooth restart
 +  Restarting bluetooth: hcid sdpd rfcomm.
 +Et là, un device apparait:
 +  /dev/rfcomm0
 +Parce qu'il a vu le N80 branché ?
 +
 +Editer **''.gnokiirc''** (toujours a la racine de la home de votre user), afin d'avoir:
 +  [global]
 +  port = /dev/rfcomm0
 +  model = AT
 +  connection = serial
 +  
 +  rfcomm_channel = 2
 +(Ne pas toucher le reste)
 +
 +Et puis ca marche.
 +
brouillon_bluetooth.1225200512.txt.gz · Dernière modification : 2008/10/28 13:28 de thierry