如何使用命令行连接蓝牙网络连接

Ed *_*ess 6 networking windows-7 bluetooth command-line netsh

我可以使用以下命令为我的机器启用局域网接口

netsh interface set interface "Local Area Connection" ENABLED
Run Code Online (Sandbox Code Playgroud)

是否有等效的命令来连接蓝牙网络连接?

我试过了

netsh interface set interface "Bluetooth" ENABLED
Run Code Online (Sandbox Code Playgroud)

但似乎没有效果,连接仍然断开。

我也试过

netsh interface set interface "Bluetooth" connect=CONNECTED
Run Code Online (Sandbox Code Playgroud)

但这会返回

一个或多个未指定的基本参数

我知道这个蓝牙连接没有问题,因为我可以使用控制面板 > 网络连接,右键单击蓝牙 > 连接进行连接。

h0t*_*1r3 2

如果命令

netsh interface show interface
Run Code Online (Sandbox Code Playgroud)

不显示你的界面,那么你就无法那样控制它。

只是猜测,但看起来您正在尝试通过蓝牙建立拨号网络连接。

这对我有用:

C:\Users\me>rasdial "USSC Bluetooth Dial-up Connection"
Connecting to USSC Bluetooth Dial-up Connection...
Verifying username and password...
Registering your computer on the network...
Successfully connected to USSC Bluetooth Dial-up Connection.
Command completed successfully.

C:\Users\me>rasdial "USSC Bluetooth Dial-up Connection" /DISCONNECT
Command completed successfully.
Run Code Online (Sandbox Code Playgroud)