Lines Matching +full:channel +full:- +full:count
10 * SPDX-License-Identifier: Apache-2.0
104 shell_print(ctx_shell, "Incoming data dlc %p len %u", dlci, buf->len); in rfcomm_recv()
134 return -ENOMEM; in rfcomm_accept()
150 if (rfcomm_server.channel) { in cmd_register()
152 return -ENOEXEC; in cmd_register()
155 rfcomm_server.channel = BT_RFCOMM_CHAN_SPP; in cmd_register()
159 shell_error(sh, "Unable to register channel %x", ret); in cmd_register()
160 rfcomm_server.channel = 0U; in cmd_register()
161 return -ENOEXEC; in cmd_register()
163 shell_print(sh, "RFCOMM channel %u registered", in cmd_register()
164 rfcomm_server.channel); in cmd_register()
173 uint8_t channel; in cmd_connect() local
178 return -ENOEXEC; in cmd_connect()
181 channel = strtoul(argv[1], NULL, 16); in cmd_connect()
183 err = bt_rfcomm_dlc_connect(default_conn, &rfcomm_dlc, channel); in cmd_connect()
185 shell_error(sh, "Unable to connect to channel %d (err %u)", in cmd_connect()
186 channel, err); in cmd_connect()
196 uint8_t buf_data[DATA_MTU] = { [0 ... (DATA_MTU - 1)] = 0xff }; in cmd_send()
197 int ret, len, count = 1; in cmd_send() local
201 count = strtoul(argv[1], NULL, 10); in cmd_send()
204 while (count--) { in cmd_send()
207 len = MIN(rfcomm_dlc.mtu, net_buf_tailroom(buf) - 1); in cmd_send()
212 shell_error(sh, "Unable to send: %d", -ret); in cmd_send()
214 return -ENOEXEC; in cmd_send()
227 shell_error(sh, "Unable to disconnect: %u", -err); in cmd_disconnect()
238 SHELL_CMD_ARG(connect, NULL, "<channel>", cmd_connect, 2, 0),
254 return -ENOEXEC; in cmd_rfcomm()