User Tools

Site Tools


informatica:linux:bluetooth

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
informatica:linux:bluetooth [2011/04/22 21:18] 79.158.16.98informatica:linux:bluetooth [2019/07/01 10:44] jose
Line 61: Line 61:
  hci0 00:16:41:8A:27:B6  hci0 00:16:41:8A:27:B6
 </code> </code>
 +
  
  
Line 66: Line 67:
 ===== Parear los dispositivos =====  ===== Parear los dispositivos ===== 
  
-La + chachi piruli:+==== Arch Linux ====
  
 http://wiki.archlinux.org/index.php/Bluetooth#Pairing http://wiki.archlinux.org/index.php/Bluetooth#Pairing
 +
 +1. Lanzar como root el comando(parte del paquete 'bluez'):
 +
 +  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 /etc/rc.d/bluetooth restart
 +
 +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 235:
  
 El archivo irá a parar al directorio desde el cual se ejecutó la instrucción 'bluetooth-agent 1234' El archivo irá a parar al directorio desde el cual se ejecutó la instrucción 'bluetooth-agent 1234'
 +
  
  
Line 228: Line 252:
   * Pc => móvil   * Pc => móvil
  
-  obexftp -b 00:17:83:ED:AD:14 -p /tmp/log.txt +  obexftp -b MAC_MOVIL -c DIRECTORIO_REMOTO -p ARCHIVO_LOCAL 
 + 
 +
 + 
 +  obexftp -b MAC_MOVIL -p ARCHIVO_LOCAL
  
 <code> <code>
Line 298: Line 326:
 obexftp -b $mac -g $directorio/`cat /tmp/mobil2.txt` obexftp -b $mac -g $directorio/`cat /tmp/mobil2.txt`
 </code> </code>
 +
 +===== beacon =====
 +Lanzamos el scan y mientras está el scan el btmon:
 +  hcitool lescan
 +<code>
 +4A:F6:C7:2E:D3:DE (unknown)
 +44:9B:E0:3A:70:DA (unknown)
 +E7:9F:D3:88:87:66 (unknown)
 +42:AA:DA:C2:5D:5C (unknown)
 +14:51:9A:A1:9C:E3 (unknown)
 +F8:DF:15:C8:E0:E2 JBL Flip 4
 +</code>
 +
 +  sudo btmon
 +<code>
 +> 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:9F:D3:88:87:66 (Static)
 +        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)
 +</code>
 +
 +Para buscar dispositivos que también nos sirve para ver la señal:
 +  sudo btmgmt find
 +<code>
 +Discovery started
 +hci0 type 7 discovering on
 +hci0 dev_found: 67:27:CE:8B:B9:47 type LE Random rssi -89 flags 0x0000 
 +AD flags 0x1a 
 +eir_len 30
 +hci0 dev_found: 73:02:AE:3E:48:1D type LE Random rssi -72 flags 0x0000 
 +AD flags 0x1a 
 +eir_len 30
 +hci0 dev_found: 72:9B:24:DA:2E:6D type LE Random rssi -63 flags 0x0004 
 +AD flags 0x00 
 +eir_len 31
 +hci0 dev_found: 0F:CE:FC:59:11:D2 type LE Random rssi -92 flags 0x0004 
 +AD flags 0x00 
 +eir_len 31
 +hci0 dev_found: 28:11:A5:33:A0:B7 type LE Public rssi -87 flags 0x0000 
 +AD flags 0x19 
 +eir_len 25
 +hci0 dev_found: 49:ED:F5:D8:8E:FA type LE Random rssi -87 flags 0x0000 
 +</code>
 +  
 +
informatica/linux/bluetooth.txt · Last modified: 2023/01/27 22:05 by javi