brouillon_bluetooth
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
brouillon_bluetooth [2008/10/28 13:10] – thierry | brouillon_bluetooth [2009/02/01 17:55] (Version actuelle) – thierry | ||
---|---|---|---|
Ligne 3: | Ligne 3: | ||
*http:// | *http:// | ||
*http:// | *http:// | ||
- | *http:// | + | *http:// |
+ | *http://www.michaelwood.me.uk/ | ||
+ | |||
===== bases ===== | ===== bases ===== | ||
Ligne 151: | Ligne 154: | ||
Service Name: OBEX File Transfer | Service Name: OBEX File Transfer | ||
Parfait ! | Parfait ! | ||
+ | |||
Ligne 222: | Ligne 226: | ||
Normalement le telephone doit se joindre avec le serveur " | Normalement le telephone doit se joindre avec le serveur " | ||
+ | |||
+ | ===== gnokii ===== | ||
+ | ==== Installation ==== | ||
+ | # apt-get update | ||
+ | # apt-get install gnokii | ||
+ | ==== configuration ==== | ||
+ | En tant que ' | ||
+ | | :!: gnokii ne pourra utiliser le telephone qu'au travers d'un pseudo modem AT\\ C'est pas plus mal puisque ca fonctionne avec plein de telephone ! hu! | | ||
+ | |||
+ | Créé un fichier **'' | ||
+ | Ici, c'est root, donc c'est dans **''/ | ||
+ | |||
+ | En pratique, on va s' | ||
+ | # zcat / | ||
+ | Et puis on change quelques lignes: ( **''# | ||
+ | [global] | ||
+ | port = 00: | ||
+ | model = AT | ||
+ | connection = bluetooth | ||
+ | On ne change pas le reste... | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==== tests ==== | ||
+ | # gnokii --identify | ||
+ | gnokiid Version 0.6.14 | ||
+ | LOG: debug mask is 0x1 | ||
+ | phone instance config: | ||
+ | model: AT | ||
+ | port_device: | ||
+ | connection_type: | ||
+ | init_length: | ||
+ | serial_baudrate: | ||
+ | serial_write_usleep: | ||
+ | hardware_handshake: | ||
+ | require_dcd: | ||
+ | smsc_timeout: | ||
+ | connect_script: | ||
+ | disconnect_script: | ||
+ | rfcomm_cn: 1 | ||
+ | sm_retry: off | ||
+ | Initializing AT capable mobile phone ... | ||
+ | Serial device: opening device 00: | ||
+ | Message sent: 0x00 / 0x0004 | ||
+ | 41 54 5a 0d | ATZ | ||
+ | write: [ATZ< | ||
+ | read : [ATZ< | ||
+ | Message received: 0x00 / 0x000a | ||
+ | 02 41 54 5a 0d 0d 0a 4f 4b 0d | ||
+ | Received message type 00 | ||
+ | Message sent: 0x00 / 0x0005 | ||
+ | 41 54 45 31 0d | ATE1 | ||
+ | write: [ATE1< | ||
+ | read : [ATE1< | ||
+ | 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 | ||
+ | | ||
+ | .. < | ||
+ | | ||
+ | Received message type 06 | ||
+ | Message sent: 0x06 / 0x0008 | ||
+ | 41 54 2b 43 47 53 4e 0d | AT+CGSN | ||
+ | write: [AT+CGSN< | ||
+ | read : [AT+CGSN< | ||
+ | Message received: 0x06 / 0x0021 | ||
+ | 02 41 54 2b 43 47 53 4e 0d 0d 0a 33 35 33 39 38 | AT+CGSN | ||
+ | 39 30 30 32 36 30 36 35 32 30 0d 0a 0d 0a 4f 4b | 9002606520 | ||
+ | 0d | | ||
+ | Received message type 06 | ||
+ | IMEI : XXXXXXXXXXXXXXXXX | ||
+ | Fabricant: SONY ERICSSON | ||
+ | Modele | ||
+ | Product name : AAB-1021011-BV | ||
+ | Revision | ||
+ | Serial device: closing device | ||
+ | Yes ! | ||
+ | |||
+ | Mais encore: | ||
+ | # gnokii --monitor once | ||
+ | gnokiid Version 0.6.14 | ||
+ | LOG: debug mask is 0x1 | ||
+ | phone instance config: | ||
+ | model: AT | ||
+ | port_device: | ||
+ | connection_type: | ||
+ | init_length: | ||
+ | serial_baudrate: | ||
+ | serial_write_usleep: | ||
+ | hardware_handshake: | ||
+ | require_dcd: | ||
+ | smsc_timeout: | ||
+ | connect_script: | ||
+ | disconnect_script: | ||
+ | rfcomm_cn: 1 | ||
+ | sm_retry: off | ||
+ | Initializing AT capable mobile phone ... | ||
+ | Serial device: opening device 00: | ||
+ | Message sent: 0x00 / 0x0004 | ||
+ | 41 54 5a 0d | ATZ | ||
+ | write: [ATZ< | ||
+ | read : [ATZ< | ||
+ | Message received: 0x00 / 0x000a | ||
+ | 02 41 54 5a 0d 0d 0a 4f 4b 0d | ||
+ | Received message type 00 | ||
+ | Message sent: 0x00 / 0x0005 | ||
+ | 41 54 45 31 0d | ATE1 | ||
+ | write: [ATE1< | ||
+ | read : [ATE1< | ||
+ | Message received: 0x00 / 0x000b | ||
+ | 02 41 54 45 31 0d 0d 0a 4f 4b 0d | ATE1 OK | ||
+ | | ||
+ | ... < | ||
+ | | ||
+ | Received message type 14 | ||
+ | Message sent: 0x14 / 0x0009 | ||
+ | 41 54 2b 43 52 45 47 3f 0d | AT+CREG? | ||
+ | write: [AT+CREG?< | ||
+ | read : [AT+CREG?< | ||
+ | Message received: 0x14 / 0x001d | ||
+ | 02 41 54 2b 43 52 45 47 3f 0d 0d 0a 2b 43 52 45 | AT+CREG? | ||
+ | 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: | ||
+ | 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: | ||
+ | Browsing 00: | ||
+ | Channel: 11 | ||
+ | Connecting...done | ||
+ | Receiving " | ||
+ | < | ||
+ | [ < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | < | ||
+ | </ | ||
+ | Disconnecting...done | ||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | |||
+ | ==== Soluce ? ==== | ||
+ | |||
+ | Editer le fichier **''/ | ||
+ | # | ||
+ | # RFCOMM configuration file. | ||
+ | # | ||
+ | | ||
+ | rfcomm0 { | ||
+ | # Automatically bind the device at startup | ||
+ | bind yes; | ||
+ | | ||
+ | # Bluetooth address of the device | ||
+ | device 00: | ||
+ | | ||
+ | # RFCOMM channel for the connection | ||
+ | channel 2; | ||
+ | | ||
+ | # Description of the connection | ||
+ | comment " | ||
+ | } | ||
+ | |||
+ | | :!: " | ||
+ | |||
+ | Et puis: | ||
+ | # / | ||
+ | Restarting bluetooth: hcid sdpd rfcomm. | ||
+ | Et là, un device apparait: | ||
+ | / | ||
+ | Parce qu'il a vu le N80 branché ? | ||
+ | |||
+ | Editer **'' | ||
+ | [global] | ||
+ | port = / | ||
+ | model = AT | ||
+ | connection = serial | ||
+ | | ||
+ | rfcomm_channel = 2 | ||
+ | (Ne pas toucher le reste) | ||
+ | |||
+ | Et puis ca marche. | ||
brouillon_bluetooth.1225199423.txt.gz · Dernière modification : 2008/10/28 13:10 de thierry