最終更新:2022-04-25 (月) 16:01:43 (730d)
rfcomm
Top / rfcomm
RFCOMM configuration utility
Bluetoothデバイス間のRFCOMM接続が可能になります
https://linux.die.net/man/1/rfcomm
概要
- rfcomm is used to set up, maintain, and inspect the RFCOMM configuration of the Bluetooth subsystem in the Linux kernel.
- If no command is given, or if the option -a is used, rfcomm prints information about the configured RFCOMM devices.
チャンネル
- rfcomm におけるチャネル番号は 1~30
ソースコード
例
sudo rfcomm listen /dev/rfcomm0 22 sudo sdptool add --channel=22 SP
コマンド
rfcomm listen <dev> [channel] [cmd] Listen on a specified RFCOMM channel for incoming connections. rfcomm watch <dev> [channel] [cmd] Watch is identical to listen except that when the child process terminates or the client disconnect, the command will restart listening with the same parameters. rfcomm connect rfcomm show? <dev> Display the information about the specified device.
rfcomm -a?
- Prints information about all configured RFCOMM devices.
rfcomm0: 00:00:00:00:00:00 -> 00:00:00:00:00:00 channel 1 connected [reuse-dlc release-on-hup tty-attached]
メモ
- rfcomm listen /dev/rfcomm0?
- rfcomm watch hci0
help
RFCOMM configuration utility ver 5.48 Usage: rfcomm [options] <command> <dev> Options: -i, --device [hciX|bdaddr] Local HCI device or BD Address -h, --help Display help -r, --raw Switch TTY into raw mode -A, --auth Enable authentication -E, --encrypt Enable encryption -S, --secure Secure connection -M, --master Become the master of a piconet -L, --linger [seconds] Set linger timeout -a Show all devices (default) Commands: bind <dev> <bdaddr> [channel] Bind device release <dev> Release device show <dev> Show device connect <dev> <bdaddr> [channel] Connect device listen <dev> [channel [cmd]] Listen watch <dev> [channel [cmd]] Watch