informatica:linux:bluetooth
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| informatica:linux:bluetooth [2011/04/22 21:18] – 79.158.16.98 | informatica:linux:bluetooth [2023/01/27 22:05] (current) – javi | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | ====== parear cascos (actualizado) ====== | ||
| + | |||
| + | Instalar bluetooth | ||
| + | |||
| + | sudo apt update && sudo apt install bluetooth | ||
| + | | ||
| + | Ejecutar: | ||
| + | |||
| + | bluetoothctl | ||
| + | default-agent | ||
| + | pairable on | ||
| + | devices | ||
| + | | ||
| + | Si sale el mismo que hay que parear mejor olvidarlo: | ||
| + | |||
| + | remove F8: | ||
| + | |||
| + | Poner el dispositivo bluetooth a parear en modo " | ||
| + | |||
| + | scan on | ||
| + | | ||
| + | Encontrar el ID del dispositivo | ||
| + | |||
| + | pair F8: | ||
| + | |||
| + | En futuras ocasiones: | ||
| + | |||
| + | bluetoothctl | ||
| + | connect F8: | ||
| + | | ||
| + | | ||
| + | |||
| + | |||
| ====== bluetooth ====== | ====== bluetooth ====== | ||
| Line 61: | Line 94: | ||
| hci0 00: | hci0 00: | ||
| </ | </ | ||
| + | |||
| Line 66: | Line 100: | ||
| ===== Parear los dispositivos ===== | ===== Parear los dispositivos ===== | ||
| - | La + chachi piruli: | + | ==== Arch Linux ==== |
| http:// | http:// | ||
| + | |||
| + | 1. Lanzar como root el comando(parte del paquete ' | ||
| + | |||
| + | sudo bluez-simple-agent | ||
| + | |||
| + | Si todo va bien, se tiene que ver: | ||
| + | |||
| + | Agent registered | ||
| + | |||
| + | Si aparece algun error de python, reiniciar el demonio bluetooth: | ||
| + | |||
| + | sudo / | ||
| + | |||
| + | 2. Lanzar como usuario, y pasando la direccion MAC del dispositivo a parear: | ||
| + | |||
| + | bluez-simple-agent hci0 MAC_DISPOSITIVO_A_PAREAR | ||
| + | |||
| + | 3. (Movil) confirmar que se quiere parear | ||
| + | |||
| + | 4. (Pc) teclear el codigo que se quiere usar | ||
| + | |||
| + | 5. (Movil) Teclear el mismo codigo que el paso 4. | ||
| Otra: | Otra: | ||
| Line 212: | Line 268: | ||
| El archivo irá a parar al directorio desde el cual se ejecutó la instrucción ' | El archivo irá a parar al directorio desde el cual se ejecutó la instrucción ' | ||
| + | |||
| Line 228: | Line 285: | ||
| * Pc => móvil | * Pc => móvil | ||
| - | obexftp -b 00: | + | obexftp -b MAC_MOVIL -c DIRECTORIO_REMOTO -p ARCHIVO_LOCAL |
| + | |||
| + | o | ||
| + | |||
| + | obexftp -b MAC_MOVIL | ||
| < | < | ||
| Line 298: | Line 359: | ||
| obexftp -b $mac -g $directorio/ | obexftp -b $mac -g $directorio/ | ||
| </ | </ | ||
| + | |||
| + | ===== beacon ===== | ||
| + | Lanzamos el scan y mientras está el scan el btmon: | ||
| + | hcitool lescan | ||
| + | < | ||
| + | 4A: | ||
| + | 44: | ||
| + | E7: | ||
| + | 42: | ||
| + | 14: | ||
| + | F8: | ||
| + | </ | ||
| + | |||
| + | sudo btmon | ||
| + | < | ||
| + | > HCI Event: LE Meta Event (0x3e) plen 42 [hci0] 662.852030 | ||
| + | LE Advertising Report (0x02) | ||
| + | Num reports: 1 | ||
| + | Event type: Connectable undirected - ADV_IND (0x00) | ||
| + | Address type: Random (0x01) | ||
| + | Address: E7: | ||
| + | Data length: 30 | ||
| + | Flags: 0x06 | ||
| + | LE General Discoverable Mode | ||
| + | BR/EDR Not Supported | ||
| + | Company: Apple, Inc. (76) | ||
| + | Type: iBeacon (2) | ||
| + | UUID: 25786407-ebc6-cfaf-b14f-e2a49306a5fd | ||
| + | Version: 256.512 | ||
| + | TX power: -40 dB | ||
| + | RSSI: -61 dBm (0xc3) | ||
| + | </ | ||
| + | |||
| + | Para buscar dispositivos que también nos sirve para ver la señal: | ||
| + | sudo btmgmt find | ||
| + | < | ||
| + | Discovery started | ||
| + | hci0 type 7 discovering on | ||
| + | hci0 dev_found: 67: | ||
| + | AD flags 0x1a | ||
| + | eir_len 30 | ||
| + | hci0 dev_found: 73: | ||
| + | AD flags 0x1a | ||
| + | eir_len 30 | ||
| + | hci0 dev_found: 72: | ||
| + | AD flags 0x00 | ||
| + | eir_len 31 | ||
| + | hci0 dev_found: 0F: | ||
| + | AD flags 0x00 | ||
| + | eir_len 31 | ||
| + | hci0 dev_found: 28: | ||
| + | AD flags 0x19 | ||
| + | eir_len 25 | ||
| + | hci0 dev_found: 49: | ||
| + | </ | ||
| + | | ||
| + | |||
informatica/linux/bluetooth.1303507116.txt.gz · Last modified: (external edit)
