Dav*_*ill 28
对的,这是可能的。有关 Windows、Ubuntu 和 Linux 解决方案,请参见下文。
使用btobex。
蓝牙命令行工具是一套适用于 Microsoft Windows 的命令行实用程序,可用于配置蓝牙适配器、发现远程蓝牙设备和服务、将文件传输到支持 OBEX 的设备。
所有实用程序都可以作为批处理脚本或其他自动后台进程的一部分调用,或者从 Windows 命令提示符手动启动。
...
系统要求
- Windows XP、Windows Vista、Windows 7、Windows 8 或 Windows 10(x86、x64)
- Microsoft 蓝牙堆栈兼容蓝牙适配器
Btobex 将文件发送到支持 OBEX 的远程设备(计算机、手机等)。
用法:
Run Code Online (Sandbox Code Playgroud)btobex {-bBluetoothAddress | -nFriendlyName} [-cChannel] [-pPIN [-e]] [-rRetries] [-fFileName] [file1 [file2 [...]]] -b Bluetooth address of target device in (XX:XX:XX:XX:XX:XX) format. -n Friendly name of target device. -c RFCOMM channel (1-30). If specified, service lookup is not performed. -p PIN code for authenticating with remote device. -e Use encrypted connection (only if PIN authentication is used) -r Make specified number of attempts is case of error -f Use this file name for the data from STDIN (standard input) -h Prints help screen.
样品:
将当前文件夹中的文件“picture.jpg”发送到名为“Nokia 6300”的设备:
Run Code Online (Sandbox Code Playgroud)btobex -n"Nokia 6300" picture.jpg
将当前文件夹中的所有文本文件发送到具有已知地址的设备:
Run Code Online (Sandbox Code Playgroud)btobex -b(11:11:22:22:33:33) *.txt
将其他程序的输出作为名为“message.txt”的文件发送:
Run Code Online (Sandbox Code Playgroud)echo This is a test | btobex -b(11:11:22:22:33:33) -f"message.txt"
btobex 维护 ERRORLEVEL 环境变量。零表示成功执行,任何其他值 - 错误。详细的错误描述打印到标准错误输出。
来源btobex
使用蓝牙发送。
bluetooth-sendto --device=12:34:56:78:9A:BC filename
为我工作。“12:34:56:78:9A:BC”是设备的蓝牙设备地址(bdaddr)。您可以使用
hcitool scan
.
使用obexftp。
obexftp –nopath –noconn –uuid none –bluetooth <BTAddr> –channel <OPUSHChann elNo> –put <FileToPut>
- 允许在不指定远程设备端的引脚的情况下发送文件
- 设备的OPush通道号是从上面的sdptool得到的
obexftp -b <BTAddr> -v -p <FileToPut>
- 允许将文件放到指定的 BT 设备上
- obexftp 也可用于获取或列出 BT 设备上的文件
- 还允许通过仅提供 -b 选项来识别附近的 BT 设备
另请参阅用于蓝牙操作的 Linux 脚本
我与蓝牙命令行工具没有任何关联。
归档时间: |
|
查看次数: |
8479 次 |
最近记录: |