Bluetooth: Classic: GOEP Shell

This document describes how to run the Bluetooth Classic GOEP functionality. The goep command exposes the Bluetooth Classic GOEP Shell commands.

Commands

The goep commands:

uart:~$ goep
goep - Bluetooth GOEP shell commands
Subcommands:
  register-rfcomm    : <channel>
  connect-rfcomm     : <channel>
  disconnect-rfcomm  :
  register-l2cap     : <psm>
  connect-l2cap      : <psm>
  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 goep client commands:

uart:~$ goep client
client - Client sets
Subcommands:
  conn     : <mopl>
  disconn  :
  put      : <final: true, false>
  get      : <final: true, false>
  abort    :
  setpath  : [parent] [create]
  action   : <final: true, false>

The goep server commands:

uart:~$ goep server
server - Server sets
Subcommands:
  reg      : [UUID 128]
  unreg    :
  conn     : <rsp: continue, success, error> <mopl> [rsp_code]
  disconn  : <rsp: continue, success, error> [rsp_code]
  put      : <rsp: continue, success, error> [rsp_code]
  get      : <rsp: continue, success, error> [rsp_code]
  abort    : <rsp: continue, success, error> [rsp_code]
  setpath  : <rsp: continue, success, error> [rsp_code]
  action   : <rsp: continue, success, error> [rsp_code]

Connect GOEP Transport

The ACL connection should be established before creating the GOEP transport connection.

The transport is based on L2CAP Channel:

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:~$

The transport is based on RFCOMM Channel:

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:~$

Disconnect GOEP transport

The transport is based on L2CAP Channel:

GOEP 0x20005600 transport disconnected
uart:~$

The transport is based on RFCOMM Channel:

GOEP 0x20005600 transport disconnected
uart:~$

Connect to OBEX Server

uart:~$ goep server reg
uart:~$
OBEX server 0x20005850 conn req, version 10, mopl 00ff
uart:~$ goep server conn success 255
uart:~$

Disconnect from OBEX Server

OBEX server 0x20005850 disconn req
uart:~$ goep server disconn success
uart:~$

OBEX Put Operation

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:~$

OBEX Get Operation

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:~$