Answers:
对的,这是可能的。有关Windows,Ubuntu和Linux解决方案,请参见下文。
使用btobex。
蓝牙命令行工具是Microsoft Windows的一套命令行实用程序,可用于配置您的蓝牙适配器,发现远程蓝牙设备和服务,将文件传输到支持OBEX的设备。
可以将所有实用程序作为批处理脚本或其他自动后台进程的一部分来调用,也可以从Windows命令提示符下手动启动。
...
系统要求
- Windows XP,Windows Vista,Windows 7,Windows 8或Windows 10(x86,x64)
- Microsoft蓝牙堆栈兼容蓝牙适配器
Btobex将文件发送到支持远程OBEX的设备(计算机,移动电话等)。
用法:
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”的设备:
btobex -n"Nokia 6300" picture.jpg
将所有文本文件从当前文件夹发送到具有已知地址的设备:
btobex -b(11:11:22:22:33:33) *.txt
将其他程序的输出作为名为“ message.txt”的文件发送:
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)。您可以使用获取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脚本以了解蓝牙操作
我不以任何方式隶属于Bluetooth命令行工具。