diff --git a/doc/connectivity/bluetooth/bluetooth-shell.rst b/doc/connectivity/bluetooth/bluetooth-shell.rst index 95fda5c2f61d9..13ea72982b6a6 100644 --- a/doc/connectivity/bluetooth/bluetooth-shell.rst +++ b/doc/connectivity/bluetooth/bluetooth-shell.rst @@ -23,6 +23,10 @@ For specific Bluetooth functionality see also the following shell documentation shell/audio/tmap.rst shell/audio/pbp.rst shell/classic/a2dp.rst + shell/classic/goep.rst + shell/classic/hfp.rst + shell/classic/l2cap.rst + shell/classic/rfcomm.rst shell/host/gap.rst shell/host/gatt.rst shell/host/iso.rst diff --git a/doc/connectivity/bluetooth/shell/classic/goep.rst b/doc/connectivity/bluetooth/shell/classic/goep.rst new file mode 100644 index 0000000000000..3747f905d8c97 --- /dev/null +++ b/doc/connectivity/bluetooth/shell/classic/goep.rst @@ -0,0 +1,280 @@ +Bluetooth: Classic: GOEP Shell +################################ + +This document describes how to run the Bluetooth Classic GOEP functionality. +The :code:`goep` command exposes the Bluetooth Classic GOEP Shell commands. + +Commands +******** + +The :code:`goep` commands: + +.. code-block:: console + + uart:~$ goep + goep - Bluetooth GOEP shell commands + Subcommands: + register-rfcomm : + connect-rfcomm : + disconnect-rfcomm : + register-l2cap : + connect-l2cap : + disconnect-l2cap : + alloc-buf : Alloc tx buffer + release-buf : Free allocated tx buffer + add-header : Adding header sets + client : Client sets + server : Server sets + +The :code:`goep client` commands: + +.. code-block:: console + + uart:~$ goep client + client - Client sets + Subcommands: + conn : + disconn : + put : + get : + abort : + setpath : [parent] [create] + action : + +The :code:`goep server` commands: + +.. code-block:: console + + uart:~$ goep server + server - Server sets + Subcommands: + reg : [UUID 128] + unreg : + conn : [rsp_code] + disconn : [rsp_code] + put : [rsp_code] + get : [rsp_code] + abort : [rsp_code] + setpath : [rsp_code] + action : [rsp_code] + + +Connect GOEP Transport +********************** + +The ACL connection should be established before creating the GOEP transport connection. + +The transport is based on L2CAP Channel: + +.. tabs:: + + .. group-tab:: L2CAP Server + + .. code-block:: console + + uart:~$ goep register-l2cap 0 + L2CAP server (psm 1001) is registered + Security changed: XX:XX:XX:XX:XX:XX level 2 + GOEP 0x20005600 transport connected on 0x20004dc8 + uart:~$ + + .. group-tab:: L2CAP Client + + .. code-block:: console + + uart:~$ goep connect-l2cap 1001 + GOEP L2CAP connection pending + Security changed: XX:XX:XX:XX:XX:XX level 2 + GOEP 0x20005600 transport connected on 0x20004dc8 + uart:~$ + + +The transport is based on RFCOMM Channel: + +.. tabs:: + + .. group-tab:: RFCOMM Server + + .. code-block:: console + + uart:~$ goep register-rfcomm 0 + RFCOMM server (channel 06) is registered + Security changed: XX:XX:XX:XX:XX:XX level 2 + GOEP 0x20005600 transport connected on 0x20004dc8 + uart:~$ + + .. group-tab:: RFCOMM Client + + .. code-block:: console + + uart:~$ goep connect-rfcomm 6 + GOEP RFCOMM connection pending + Security changed: XX:XX:XX:XX:XX:XX level 2 + GOEP 0x20005600 transport connected on 0x20004dc8 + uart:~$ + + +Disconnect GOEP transport +************************* + +The transport is based on L2CAP Channel: + +.. tabs:: + + .. group-tab:: One Side + + .. code-block:: console + + GOEP 0x20005600 transport disconnected + uart:~$ + + .. group-tab:: Another Side + + .. code-block:: console + + uart:~$ goep disconnect-l2cap + GOEP L2CAP disconnection pending + GOEP 0x20005600 transport disconnected + uart:~$ + + +The transport is based on RFCOMM Channel: + +.. tabs:: + + .. group-tab:: One Side + + .. code-block:: console + + GOEP 0x20005600 transport disconnected + uart:~$ + + .. group-tab:: Another Side + + .. code-block:: console + + uart:~$ goep disconnect-rfcomm + GOEP RFCOMM disconnection pending + GOEP 0x20005600 transport disconnected + uart:~$ + + +Connect to OBEX Server +********************** + +.. tabs:: + + .. group-tab:: OBEX Server + + .. code-block:: console + + uart:~$ goep server reg + uart:~$ + OBEX server 0x20005850 conn req, version 10, mopl 00ff + uart:~$ goep server conn success 255 + uart:~$ + + .. group-tab:: OBEX Client + + .. code-block:: console + + uart:~$ goep client conn 255 + OBEX client 0x20005818 conn rsp, rsp_code Success, version 10, mopl 00ff + uart:~$ + + +Disconnect from OBEX Server +*************************** + +.. tabs:: + + .. group-tab:: OBEX Server + + .. code-block:: console + + OBEX server 0x20005850 disconn req + uart:~$ goep server disconn success + uart:~$ + + .. group-tab:: OBEX Client + + .. code-block:: console + + uart:~$ goep client disconn + OBEX client 0x20005818 disconn rsp, rsp_code Success + uart:~$ + + +OBEX Put Operation +****************** + +.. tabs:: + + .. group-tab:: OBEX Server + + .. code-block:: console + + uart:~$ + OBEX server 0x20005850 put req, final false, data len 12 + HI c3 Len 4 + 00000000: 00 00 00 09 |.... | + HI 48 Len 4 + 00000000: 12 34 56 78 |.4Vx | + uart:~$ goep server put continue + OBEX server 0x20005850 put req, final true, data len 8 + HI 49 Len 5 + 00000000: 12 34 56 78 90 |.4Vx. | + uart:~$ goep server put success + uart:~$ + + .. group-tab:: OBEX Client + + .. code-block:: console + + uart:~$ goep alloc-buf + uart:~$ goep add-header len 9 + uart:~$ goep add-header body 12345678 + uart:~$ goep client put false + OBEX client 0x20005818 put rsp, rsp_code Continue, data len 0 + uart:~$ goep alloc-buf + uart:~$ goep add-header end_body 1234567890 + uart:~$ goep client put true + OBEX client 0x20005818 put rsp, rsp_code Success, data len 0 + uart:~$ + + +OBEX Get Operation +****************** + +.. tabs:: + + .. group-tab:: OBEX Server + + .. code-block:: console + + uart:~$ goep alloc-buf + uart:~$ goep add-header len 9 + uart:~$ goep add-header body 12345678 + uart:~$ goep server get continue + OBEX server 0x20005850 get req, final true, data len 0 + uart:~$ goep alloc-buf + uart:~$ goep add-header end_body 1234567890 + uart:~$ + uart:~$ goep server get success + uart:~$ + + .. group-tab:: OBEX Client + + .. code-block:: console + + uart:~$ goep client get true + OBEX client 0x20005818 get rsp, rsp_code Continue, data len 12 + HI c3 Len 4 + 00000000: 00 00 00 09 |.... | + HI 48 Len 4 + 00000000: 12 34 56 78 |.4Vx | + uart:~$ goep client get true + OBEX client 0x20005818 get rsp, rsp_code Success, data len 8 + HI 49 Len 5 + 00000000: 12 34 56 78 90 |.4Vx. | + uart:~$ diff --git a/doc/connectivity/bluetooth/shell/classic/hfp.rst b/doc/connectivity/bluetooth/shell/classic/hfp.rst new file mode 100644 index 0000000000000..5b3920804ee7b --- /dev/null +++ b/doc/connectivity/bluetooth/shell/classic/hfp.rst @@ -0,0 +1,438 @@ +Bluetooth: Classic: HFP Shell +############################### + +This document describes how to run the Bluetooth Classic HFP functionality. +The :code:`hfp` command exposes the Bluetooth Classic HFP Shell commands. + +There are two sub-commands, :code:`hfp hf` and :code:`hfp ag`. + +The :code:`hfp hf` is for Hands-Free Profile (HF) functionality, and the :code:`hfp ag` is +for Audio Gateway (AG) functionality. + +Commands +******** + +All commands can only be used after the ACL connection has been established except +:code:`hfp hf reg` and :code:`hfp ag reg`. + +The :code:`hfp` commands: + +.. code-block:: console + + uart:~$ hfp + hfp - Bluetooth HFP shell commands + Subcommands: + hf : HFP HF shell commands + ag : HFP AG shell commands + +The :code:`hfp hf` commands: + +.. code-block:: console + + uart:~$ hfp hf + hf - HFP HF shell commands + Subcommands: + reg : [none] + connect : + disconnect : [none] + sco_disconnect : [none] + cli : + vgm : + vgs : + operator : [none] + audio_connect : [none] + auto_select_codec : + select_codec : Codec ID + set_codecs : Codec ID Map + accept : + reject : + terminate : + hold_incoming : + query_respond_hold_status : [none] + number_call : + memory_dial : + redial : [none] + turn_off_ecnr : [none] + call_waiting_notify : + release_all_held : [none] + set_udub : [none] + release_active_accept_other : [none] + hold_active_accept_other : [none] + join_conversation : [none] + explicit_call_transfer : [none] + release_specified_call : + private_consultation_mode : + voice_recognition : + ready_to_accept_audio : [none] + request_phone_number : [none] + transmit_dtmf_code : + query_subscriber : [none] + indicator_status : + enhanced_safety : + battery : + +The :code:`hfp ag` commands: + +.. code-block:: console + + uart:~$ hfp ag + ag - HFP AG shell commands + Subcommands: + reg : [none] + connect : + disconnect : [none] + sco_disconnect : [none] + ongoing_calls : + set_ongoing_calls : [all] + remote_incoming : + hold_incoming : + remote_reject : + remote_accept : + remote_terminate : + remote_ringing : + outgoing : + reject : + accept : + hold : + retrieve : + terminate : + vgm : + vgs : + operator : + audio_connect : + inband_ringtone : + explicit_call_transfer : [none] + voice_recognition : + vre_state : <[R-ready][S-send][P-processing]> + vre_text : <[R-ready][S-send][P-processing]> + + subscriber : + signal_strength : + roaming_status : + battery_level : + service_availability : + hf_indicator : + +HFP AG SLC +********** + +The :code:`hfp ag` subcommand provides functionality for HFP AG in Bluetooth Classic. + +1. Register HFP AG: + +.. code-block:: console + + uart:~$ hfp ag reg + +2. Connect to HFP HF: + +.. code-block:: console + + uart:~$ hfp ag connect 1 + +3. Connection is established with the HF device: + +.. code-block:: console + + Security changed: XX:XX:XX:XX:XX:XX level 2 + AG received codec id bit map 2 + AG connected + AG received vgm 0 + AG received vgs 0 + +4. Disconnect from HFP HF: + +.. code-block:: console + + uart:~$ hfp ag disconnect + +5. Connection is broken: + +.. code-block:: console + + AG disconnected + + +HFP HF SLC +********** + +The :code:`hfp hf` subcommand provides functionality for HFP HF in Bluetooth Classic. + +1. Register HFP HF: + +.. code-block:: console + + uart:~$ hfp hf reg + +2. Connect to HFP AG: + +.. code-block:: console + + uart:~$ hfp hf connect 2 + +3. Connection is established with the AG device: + +.. code-block:: console + + Security changed: XX:XX:XX:XX:XX:XX level 2 + HF service 0 + HF signal 0 + HF roam 0 + HF battery 0 + HF ring: in-band + HF connected + +4. Disconnect from HFP HF: + +.. code-block:: console + + uart:~$ hfp hf disconnect + +5. Connection is broken: + +.. code-block:: console + + HF disconnected + +Call outgoing +************* + +Place a call with the Phone number supplied by the AG: + +.. tabs:: + + .. group-tab:: Outgoing Call Sequence on AG side + + .. code-block:: console + + uart:~$ hfp ag outgoing 123456 + AG outgoing call 0x20007690, number 123456 + AG SCO connected 0x20005248 + AG SCO info: + SCO handle 0x0008 + SCO air mode 2 + SCO link type 2 + uart:~$ hfp ag remote_ringing 0 + AG call 0x20007690 start ringing mode 1 + uart:~$ hfp ag remote_accept 0 + AG call 0x20007690 accept + + .. group-tab:: Outgoing Call Sequence on HF side + + .. code-block:: console + + uart:~$ hfp hf auto_select_codec enable + HF call 0x20007408 outgoing + codec negotiation: 1 + codec auto selected: id 1 + HF SCO connected 0x20005248 + HF SCO info: + SCO handle 0x0008 + SCO air mode 2 + SCO link type 2 + HF remote call 0x20007408 start ringing + HF call 0x20007408 accepted + +Place a call with the Phone number supplied by the HF: + +.. tabs:: + + .. group-tab:: Outgoing Call Sequence on AG side + + .. code-block:: console + + uart:~$ + AG number call + AG outgoing call 0x20007690, number 123456789 + AG SCO connected 0x20005248 + AG SCO info: + SCO handle 0x0008 + SCO air mode 2 + SCO link type 2 + uart:~$ hfp ag remote_ringing 0 + AG call 0x20007690 start ringing mode 1 + uart:~$ hfp ag remote_accept 0 + AG call 0x20007690 accept + + .. group-tab:: Outgoing Call Sequence on HF side + + .. code-block:: console + + uart:~$ hfp hf auto_select_codec enable + uart:~$ hfp hf number_call 123456789 + HF start dialing call: err 0 + HF call 0x20007408 outgoing + codec negotiation: 1 + codec auto selected: id 1 + HF SCO connected 0x20005248 + HF SCO info: + SCO handle 0x0008 + SCO air mode 2 + SCO link type 2 + HF remote call 0x20007408 start ringing + HF call 0x20007408 accepted + +Call incoming +************* + +Answer incoming call from the AG: + +.. tabs:: + + .. group-tab:: Incoming Call Sequence on AG side + + .. code-block:: console + + uart:~$ hfp ag remote_incoming 123456 + AG incoming call 0x20007690, number 123456 + AG call 0x20007690 start ringing mode 1 + AG SCO connected 0x20005248 + AG SCO info: + SCO handle 0x0008 + SCO air mode 2 + SCO link type 2 + uart:~$ hfp ag accept 0 + AG call 0x20007690 accept + + .. group-tab:: Incoming Call Sequence on HF side + + .. code-block:: console + + uart:~$ hfp hf auto_select_codec enable + HF call 0x20007408 incoming + codec negotiation: 1 + codec auto selected: id 1 + HF SCO connected 0x20005248 + HF SCO info: + SCO handle 0x0008 + SCO air mode 2 + SCO link type 2 + HF call 0x20007408 ring + HF call 0x20007408 CLIP 123456 0 + HF call 0x20007408 ring + HF call 0x20007408 CLIP 123456 0 + HF call 0x20007408 ring + HF call 0x20007408 CLIP 123456 0 + HF call 0x20007408 ring + HF call 0x20007408 CLIP 123456 0 + HF call 0x20007408 ring + HF call 0x20007408 CLIP 123456 0 + HF call 0x20007408 ring + HF call 0x20007408 CLIP 123456 0 + HF call 0x20007408 ring + HF call 0x20007408 CLIP 123456 0 + HF call 0x20007408 ring + HF call 0x20007408 CLIP 123456 0 + HF call 0x20007408 ring + HF call 0x20007408 CLIP 123456 0 + HF call 0x20007408 accepted + +Answer incoming call from the HF: + +.. tabs:: + + .. group-tab:: Incoming Call Sequence on AG side + + .. code-block:: console + + uart:~$ hfp ag remote_incoming 123456 + AG incoming call 0x20007690, number 123456 + AG codec negotiation result 0 + AG call 0x20007690 start ringing mode 1 + AG SCO connected 0x20005248 + AG SCO info: + SCO handle 0x0008 + SCO air mode 2 + SCO link type 2 + AG call 0x20007690 accept + + .. group-tab:: Incoming Call Sequence on HF side + + .. code-block:: console + + uart:~$ hfp hf auto_select_codec enable + HF call 0x20007408 incoming + codec negotiation: 1 + codec auto selected: id 1 + HF SCO connected 0x20005248 + HF SCO info: + SCO handle 0x0008 + SCO air mode 2 + SCO link type 2 + HF call 0x20007408 ring + HF call 0x20007408 CLIP 123456 0 + HF call 0x20007408 ring + HF call 0x20007408 CLIP 123456 0 + HF call 0x20007408 ring + HF call 0x20007408 CLIP 123456 0 + HF call 0x20007408 ring + HF call 0x20007408 CLIP 123456 0 + HF call 0x20007408 ring + HF call 0x20007408 CLIP 123456 0 + HF call 0x20007408 ring + HF call 0x20007408 CLIP 123456 0 + uart:~$ hfp hf accept 0 + HF call 0x20007408 accepted + +Call termination +**************** + +After the call (outgoing or incoming) is accepted, it can be terminated from either the AG +(Audio Gateway) or HF (Hands-Free) side. + +Terminate a call process from the AG: + +.. tabs:: + + .. group-tab:: Call termination on AG side + + .. code-block:: console + + uart:~$ hfp ag terminate 0 + AG call 0x20007690 terminate + AG SCO disconnected 0x20005248 (reason 22) + + .. group-tab:: Call termination on HF side + + .. code-block:: console + + HF call 0x20007408 terminated + HF SCO disconnected 0x20005248 (reason 22) + +Terminate a call process from the HF: + +.. tabs:: + + .. group-tab:: Call termination on AG side + + .. code-block:: console + + AG call 0x20007690 terminate + AG SCO disconnected 0x20005248 (reason 22) + + .. group-tab:: Call termination on HF side + + .. code-block:: console + + uart:~$ hfp hf terminate 0 + HF call 0x20007408 terminated + HF SCO disconnected 0x20005248 (reason 22) + +Terminate a call process from the remote: + +.. tabs:: + + .. group-tab:: Call termination on AG side + + .. code-block:: console + + uart:~$ hfp ag remote_terminate 0 + AG call 0x20007690 terminate + AG SCO disconnected 0x20005248 (reason 22) + + .. group-tab:: Call termination on HF side + + .. code-block:: console + + HF call 0x20007408 terminated + HF SCO disconnected 0x20005248 (reason 22) diff --git a/doc/connectivity/bluetooth/shell/classic/l2cap.rst b/doc/connectivity/bluetooth/shell/classic/l2cap.rst new file mode 100644 index 0000000000000..325635b2a12d8 --- /dev/null +++ b/doc/connectivity/bluetooth/shell/classic/l2cap.rst @@ -0,0 +1,199 @@ +Bluetooth: Classic: L2CAP Shell +############################### + +This document describes how to run the Bluetooth Classic L2CAP functionality. +The :code:`br l2cap` command exposes the Bluetooth Classic L2CAP Shell commands. + +Commands +******** + +The :code:`br l2cap` commands: + +.. code-block:: console + + uart:~$ br l2cap + l2cap - [none] + Subcommands: + register : [hold_credit] + [mode_optional] [extended_control] + connect : [hold_credit] + [mode_optional] [extended_control] + disconnect : [none] + send : [number of packets] [length of packet(s)] + credits : [none] + echo : L2CAP BR ECHO commands + connless : L2CAP connectionless commands + +The :code:`br l2cap echo` commands: + +.. code-block:: console + + uart:~$ br l2cap echo + echo - L2CAP BR ECHO commands + Subcommands: + register : [none] + unregister : [none] + req : + rsp : + +The :code:`br l2cap connless` commands: + +.. code-block:: console + + uart:~$ br l2cap connless + connless - L2CAP connectionless commands + Subcommands: + register : [sec level] + unregister : [none] + send : + +Connection-oriented L2CAP +************************* + +1. [Server] Register L2CAP Server: + +When the Bluetooth stack has been initialized (:code:`bt init`), the L2CAP server can be registered +by calling :code:`br l2cap register`. + +.. code-block:: console + + uart:~$ br l2cap register 1001 none + L2CAP psm 4097 registered + +2. [Client] Create L2CAP connection: + +The command can only be used after the ACL connection has been established. + +.. code-block:: console + + uart:~$ br l2cap connect 1001 none + L2CAP connection pending + +3. L2CAP connection is established: + +.. code-block:: console + + uart:~$ + Security changed: XX:XX:XX:XX:XX:XX level 2 + Incoming BR/EDR conn 0x20004848 + Channel 0x20000b18 connected + It is basic mode + +3. Send L2CAP data to remote: + +.. code-block:: console + + uart:~$ br l2cap send + Rem 0 + +4. L2CAP data is received: + +.. code-block:: console + + uart:~$ + Incoming data channel 0x20000b18 len 200 + 00000000: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |........ ........| + 00000010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |........ ........| + 00000020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |........ ........| + 00000030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |........ ........| + 00000040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |........ ........| + 00000050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |........ ........| + 00000060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |........ ........| + 00000070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |........ ........| + 00000080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |........ ........| + 00000090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |........ ........| + 000000A0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |........ ........| + 000000B0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |........ ........| + 000000C0: 00 00 00 00 00 00 00 00 |........ | + +5. Disconnect L2CAP connection: + +.. code-block:: console + + uart:~$ br l2cap disconnect + +6. L2CAP connection is broken: + +.. code-block:: console + + Channel 0x20000b18 disconnected + + +L2CAP echo +********** + +The echo subcommand provides functionality for L2CAP echo requests and responses in Bluetooth +Classic. + +The commands can only be used after the ACL connection has been established. + +1. Listen for L2CAP echo request an L2CAP echo response: + +.. code-block:: console + + uart:~$ br l2cap echo register + +2. Stop listening for L2CAP echo request an L2CAP echo response: + +.. code-block:: console + + uart:~$ br l2cap echo unregister + +3. Send L2CAP echo request: + +.. code-block:: console + + uart:~$ br l2cap echo req 1 + +4. Echo request is received: + +.. code-block:: console + + Incoming ECHO REQ data identifier 4 len 1 + 00000000: 00 |. | + +5. Send L2CAP echo response: + +.. code-block:: console + + uart:~$ br l2cap echo rsp 4 1 + +6. Echo response is received: + +.. code-block:: console + + uart:~$ + Incoming ECHO RSP data len 1 + 00000000: 00 |. | + + +Connectionless L2CAP +******************** + +The connless subcommand provides functionality for connectionless L2CAP communication in Bluetooth +Classic, allowing packet transmission without establishing a L2CAP connection. + +The subcommand is controlled by :kconfig:option:`CONFIG_BT_L2CAP_CONNLESS`. + +The commands can only be used after the ACL connection has been established. + +1. Listen for connectionless L2CAP packets: + +.. code-block:: console + + uart:~$ br l2cap connless register 1001 + Register connectionless callbacks with PSM 0x1001 + +2. Send data + +.. code-block:: console + + uart:~$ br l2cap connless send 1001 1 + Sending connectionless data with PSM 0x1001 + +3. Connectionless data is received: + +.. code-block:: console + + Incoming connectionless data psm 0x1001 len 1 + 00000000: 00 |. | diff --git a/doc/connectivity/bluetooth/shell/classic/rfcomm.rst b/doc/connectivity/bluetooth/shell/classic/rfcomm.rst new file mode 100644 index 0000000000000..efc4d68345737 --- /dev/null +++ b/doc/connectivity/bluetooth/shell/classic/rfcomm.rst @@ -0,0 +1,108 @@ +Bluetooth: Classic: RFCOMM Shell +################################ + +This document describes how to run the Bluetooth Classic RFCOMM functionality. +The :code:`rfcomm` command exposes the Bluetooth Classic RFCOMM Shell commands. + +Commands +******** + +The :code:`rfcomm` commands: + +.. code-block:: console + + uart:~$ rfcomm + rfcomm - Bluetooth RFCOMM shell commands + Subcommands: + register : [none] + connect : + disconnect : [none] + send : + rpn : Send RPN command with default settings + +Connect +******* + +The ACL connection should be established before creating the RFCOMM connection. + +.. tabs:: + + .. group-tab:: Non-initializing device + + .. code-block:: console + + uart:~$ rfcomm register + RFCOMM channel 5 registered + Security changed: XX:XX:XX:XX:XX:XX level 2 + Incoming RFCOMM conn 0x20004dc8 + Dlc 0x20000d20 connected + + .. group-tab:: Initializing device + + .. code-block:: console + + uart:~$ rfcomm connect 5 + RFCOMM connection pending + Security changed: XX:XX:XX:XX:XX:XX level 2 + Dlc 0x20000d20 connected + +Send Data +********* + +.. tabs:: + + .. group-tab:: Non-initializing device + + .. code-block:: console + + Incoming data dlc 0x20000d20 len 30 + uart:~$ rfcomm send 1 + uart:~$ + + .. group-tab:: Initializing device + + .. code-block:: console + + uart:~$ rfcomm send 1 + Incoming data dlc 0x20000d20 len 30 + +Disconnect +********** + +Create disconnect request from non-initializing device: + +.. tabs:: + + .. group-tab:: Non-initializing device + + .. code-block:: console + + uart:~$ rfcomm disconnect + Dlc 0x20000d20 disconnected + uart:~$ + + .. group-tab:: Initializing device + + .. code-block:: console + + Dlc 0x20000d20 disconnected + uart:~$ + +Create disconnect request from initializing device: + +.. tabs:: + + .. group-tab:: Non-initializing device + + .. code-block:: console + + Dlc 0x20000d20 disconnected + uart:~$ + + .. group-tab:: Initializing device + + .. code-block:: console + + uart:~$ rfcomm disconnect + Dlc 0x20000d20 disconnected + uart:~$