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 [2010/06/15 07:49] – 192.168.1.50 | 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 ' | ||
+ | |||
+ | |||
===== Enviar archivos ===== | ===== Enviar archivos ===== | ||
Line 227: | 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 236: | Line 298: | ||
Disconnecting..-done | Disconnecting..-done | ||
</ | </ | ||
+ | |||
+ | |||
+ | |||
+ | ===== Gnome applet debian lenny ===== | ||
+ | |||
+ | Módulos instalados: | ||
+ | |||
+ | < | ||
+ | hci_usb | ||
+ | bluetooth | ||
+ | ehci_hcd | ||
+ | uhci_hcd | ||
+ | </ | ||
+ | |||
+ | Paquetes: | ||
+ | |||
+ | < | ||
+ | ii bluetooth | ||
+ | ii bluez-audio | ||
+ | ii bluez-gnome | ||
+ | ii bluez-utils | ||
+ | ii gnome-bluetooth | ||
+ | ii libbluetooth2 | ||
+ | ii gnome-vfs-obexftp | ||
+ | ii libopenobex1 | ||
+ | ii obex-data-server | ||
+ | ii obexftp | ||
+ | ii obexpushd | ||
+ | </ | ||
+ | |||
+ | Servicios corriendo: | ||
+ | |||
+ | < | ||
+ | 3885 ? Ss 1:12 / | ||
+ | 14599 ? Ss 0:00 / | ||
+ | 14612 pts/0 S 0:00 / | ||
+ | 14614 ? S 0:00 / | ||
+ | 14616 ? S 0:00 gnome-obex-server | ||
+ | 14704 pts/0 S 0:00 / | ||
+ | </ | ||
+ | |||
+ | Hay algunos problemillas de instalación: | ||
+ | |||
+ | http:// | ||
+ | |||
+ | ===== Guión para copiar archivos ===== | ||
+ | |||
+ | Pulir una miaja | ||
+ | |||
+ | < | ||
+ | #!/bin/bash | ||
+ | |||
+ | directorio=" | ||
+ | mac=" | ||
+ | |||
+ | rm / | ||
+ | do name=" | ||
+ | echo $name >> / | ||
+ | echo `cat / | ||
+ | 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.1276588150.txt.gz · Last modified: 2015/04/13 20:19 (external edit)