MATLAB Answers

How to use usb bluetooth adapter?

7 ビュー (過去 30 日間)
Lei Ye
Lei Ye 2020 年 1 月 6 日
回答済み: Kaashyap Pappu 2020 年 1 月 21 日
Hi,
I am trying to use parrot minidrone in Simulink.
Everything seem ok, but the only trouble is that Matlab only detect the onborad bluetooth of my notebook.
such as:
>> b_s = instrhwinfo('Bluetooth')
b_s =
HardwareInfo with properties:
RemoteNames: {2×1 cell}
RemoteIDs: {2×1 cell}
BluecoveVersion: 'BlueCove-2.1.1-SNAPSHOT'
JarFileVersion: 'Version 4.1'
and if I disable the onboard bluetooth, it becomes this:
b_s = instrhwinfo('Bluetooth')
b_s =
HardwareInfo with properties:
RemoteNames: []
RemoteIDs: []
BluecoveVersion: 'BlueCove-2.1.1-SNAPSHOT'
JarFileVersion: 'Version 4.1'
I can connect with the drone with the usb bluetooth adapter, and if I set the ip address manually, the telnet is ok.
and I can pinging it:
But when I am trying to deploy the target codes, it becomes:
I think that it is because the Matlab and Simulink are using the onboard bluetooth, which should not be used actually,
but how to set it?
Is anybody can help me?

回答 (1 件)

Kaashyap Pappu
Kaashyap Pappu 2020 年 1 月 21 日
The block in Simulink is probably trying to access the minidrone using Bluetooth, as opposed to using the USB adapter. Initial troubleshooting steps are highlighted in a similar question here.
Another possible workaround may be to communicate serially with the USB adapter using Serial Receive Block if the adapter is connected to the PC. However this could be incompatible with the existing model.
Hope this helps!

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by