Failing to open serial port
이전 댓글 표시
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
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
2017년 4월 18일
how can u explain
Walter Roberson
2017년 4월 18일
delete(instrfind('type','serial'))
and then try the serial() again.
카테고리
도움말 센터 및 File Exchange에서 Device Connection에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!