User Manual Orange Pi Zero 3

  Features   |  Use   |    Linux     |  Linux SDK   |  Android   |  Android SRC   |

RU          EN  

Chapt 3. Instructions for use of Debian/Ubuntu Server and Xfce desktop system
Страница:   25    26    27    28    29    30    31    32    33    34    35    36    37    38    39    40    41    42    43    44    45    46    47    48    49    50    51    52    53    54    55    56    57    58    59    60    61    62    63    64    65    66    67    68    69    70    71    72    73    74    75    76    77    78    79    80    81    82    83    84    85    86    87    88    89    90    91    92    93    94    95    96    97    98    99    100    101    102    103    104    105    106    107    108    109    110    111    112    113    114    115    116    117    118    119    120    121    122  


3.10.2. How to use the server image

  • 1) After entering the system, you can first check whether there is a Bluetooth device node through the hciconfig command. If it exists, it means that the Bluetooth initialization is normal.

    orangepi@orangepi:~$ sudo apt update && sudo apt install -y bluez
    orangepi@orangepi:~$ hciconfig -a
    hci0: Type: Primary Bus: UART
    BD Address: 3E:61:3D:19:0E:52 ACL MTU: 1021:8 SCO MTU: 240:3
    UP RUNNING
    RX bytes:925 acl:0 sco:0 events:72 errors:0
    TX bytes:5498 acl:0 sco:0 commands:72 errors:0
    Features: 0xbf 0xff 0x8d 0xfe 0xdb 0x3d 0x7b 0xc7
    Packet type: DM1 DM3 DM5 DH1 DH3 DH5 HV1 HV2 HV3
    Link policy: RSWITCH SNIFF
    Link mode: SLAVE ACCEPT
    Name: 'orangepi'
    Class: 0x3c0000
    Service Classes: Rendering, Capturing, Object Transfer, Audio
    Device Class: Miscellaneous,
    HCI Version: 5.0 (0x9) Revision: 0x400
    LMP Version: 5.0 (0x9) Subversion: 0x400
    Manufacturer: Spreadtrum Communications Shanghai Ltd (492)

  • 2) Use bluetoothctl to scan bluetooth devices
    
    orangepi@orangepi:~$ sudo bluetoothctl

    [NEW] Controller 10:11:12:13:14:15 orangepizero3 [default] Agent registered [bluetooth]# power on #enable controller Changing power on succeeded [bluetooth]# discoverable on #Make the controller discoverable Changing discoverable on succeeded [CHG] Controller 10:11:12:13:14:15 Discoverable: yes [bluetooth]# pairable on #Set the controller as pairable Changing pairable on succeeded [bluetooth]# scan on #Start scanning for nearby Bluetooth devices Discovery started [CHG] Controller 10:11:12:13:14:15 Discovering: yes [NEW] Device 76:60:79:29:B9:31 76-60-79-29-B9-31 [NEW] Device 9C:2E:A1:42:71:11 MiPhone [NEW] Device DC:72:9B:4C:F4:CF orangepi [bluetooth] # scan off

    #After scanning to the Bluetooth device you want to connect, you can close the scan, and then write down the MAC address of the Bluetooth device. The Bluetooth device tested here is an Android phone, the name of the Bluetooth is orangepi, and the corresponding MAC address is DC:72:9B:4C :F4:CF

    Discovery stopped [CHG] Controller 10:11:12:13:14:15 Discovering: no [CHG] Device DC:72:9B:4C:F4:CF RSSI is nil

  • 3) After scanning to the device you want to pair, you can pair it. You need to use the MAC address of the device for pairing

    [bluetooth]# pair DC:72:9B:4C:F4:CF Bluetooth device for pairing
    #Use the MAC address of the scanned
    Attempting to pair with DC:72:9B:4C:F4:CF
    [CHG] Device DC:72:9B:4C:F4:CF Connected: yes
    Request confirmation
    [leeb 1m[agent] Confirm passkey 764475 (yes/no): yes #Enter yes here, and you need
    to confirm on the mobile phone
    [CHG] Device DC:72:9B:4C:F4:CF Modalias: bluetooth:v010Fp107Ed 1436
    [CHG] Device DC:72:9B:4C:F4:CF UUIDs: 0000046a-0000- 1000-8000-00805f9b34fb
    [CHG] Device DC:72:9B:4C:F4:CF ServicesResolved: yes
    [CHG] Device DC:72:9B:4C:F4:CF Paired: yes
    Pairing successful #Prompt that the pairing is successful
    [CHG] Device DC:72:9B:4C:F4:CF ServicesResolved: no
    [CHG] Device DC:72:9B:4C:F4:CF Connected: no

  • 4) After the pairing is successful, the Bluetooth interface of the mobile phone will be displayed as follows



    Img 3.93

  • 5) To connect a Bluetooth device, you need to install the pulseaudio-module-bluetooth package, and then start the pulseaudio service

    orangepi@orangepi:~$ sudo apt update
    orangepi@orangepi:~$ sudo apt -y install pulseaudio-module-bluetooth
    orangepi@orangepi:~$ pulseaudio --start

  • 6) How to connect to a Bluetooth device

    orangepi@orangepi:~$ sudo bluetoothctl
    Agent registered
    [bluetooth]# paired-devices #View the MAC address of the paired Bluetooth device
    Device DC:72:9B:4C:F4:CF orangepi
    [bluetooth]# connect DC:72:9B:4C:F4:CF #Connect to bluetooth device using
    MAC address
    Attempting to connect to DC:72:9B:4C:F4:CF
    [CHG] Device DC:72:9B:4C:F4:CF Connected: yes
    Connection successful
    [CHG] Device DC:72:9B:4C:F4:CF ServicesResolved: yes
    [CHG] Controller 10:11:12:13:14:15 Discoverable: no
    [orangepi]# #This prompt appears to indicate that the connection is successful

  • 7) After connecting the bluetooth device, the bluetooth configuration interface of the Android mobile phone can see the prompt that the audio has been connected for calls and media


    Img 3.93

     <         > 


  • Страница:   25    26    27    28    29    30    31    32    33    34    35    36    37    38    39    40    41    42    43    44    45    46    47    48    49    50    51    52    53    54    55    56    57    58    59    60    61    62    63    64    65    66    67    68    69    70    71    72    73    74    75    76    77    78    79    80    81    82    83    84    85    86    87    88    89    90    91    92    93    94    95    96    97    98    99    100    101    102    103    104    105    106    107    108    109    110    111    112    113    114    115    116    117    118    119    120    121    122