I have an Audrino connected via Bluetooth to my PC. I use a BT dongle and the Aurduino device is found to be in COM6. When I try to open this port as follows:
s = serial('COM6') fopen(s)
This is what I get:
Error using serial/fopen (line 72) Open failed: Port: COM6 is not available. Available ports: COM1, COM6. Use INSTRFIND to determine if other instrument objects are connected to the requested device.
How can COM6 be available and not available at the same time...?
Thanks

답변 (1개)

Walter Roberson
Walter Roberson 2014년 3월 6일

0 개 추천

Try using instrfind to get the serial ports and pass the appropriate result from instrfind to fopen -- just in case there is some small invisible oddity in the string.

댓글 수: 2

AATMAJ JANARDANAN
AATMAJ JANARDANAN 2017년 4월 18일
how can u explain
delete(instrfind('type','serial'))
and then try the serial() again.

댓글을 달려면 로그인하십시오.

질문:

2014년 3월 6일

댓글:

2017년 4월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by