hello, it´s my first time working with Bluetooth to comunicate with matlab and I have a problem that it seems many people had. I hope to find a solution by providing specific problems I have. if you need any more tests or screenshots I will provide you.
I have a HC05 module, controllin with Arduino Nano OR Uno (I´m traying with both). and I have confirmed the SPP conexion in my PC(windows 7), in device manager:
as you can see, bluetooth is recognized as COM12 And COM13. and when I try to read with COM12 in matlab it sends me an error, but when I try to connect through COM13 it at least gives me a warning:
I´m reading 4 Force Sensors in Arduino that I want to read in a GUI of matlab. I thought that may be the delay I was giving in Arduino could be interfering so I changed it to 20mseconds. And nothing changed. down the image is the information of the port in Matlab.
I have searched a few and they: http://forums.adafruit.com/viewtopic.php?f=10&t=56275 say it´s a inactivated time that the hardware have and it´s an error that just can be solved if I wait 3 hours. I tried that and nothing...
can someone help me?

댓글 수: 2

dafniz91
dafniz91 2016년 5월 12일
편집: Walter Roberson 2016년 5월 12일
I want to add updated information about this problem:
I tried with another module (HC06) and then it did conexion through Putty! so basically I confirmed that the module is sending data to serial port, which it wasn´t like that with HC05. but the problem with MatLab is still there... bacause when I try to comunicate through the same COM (COM5) that was confirmed with Putty, it gives me this error:
Open failed: Port: COM5 is not available. Available ports: COM1, COM4. Use INSTRFIND to determine if other instrument objects are connected to the requested device.
although I have caution with closing the putty program before I open matlab.
also, I confirmed that the module has a continue light on when is connected with putty and this doesn't occur with matlab, which makes me assume that Matlab is not trying at all to comunicate with HC06.
one more thing. when I try by changing the baudrate, gives me this error. which as you can see it´s not coherent:
"Open failed: Port: COM5 is not available. Available ports: COM1, COM4, COM5, COM8. Use INSTRFIND to determine if other instrument objects are connected to the requested device."
someone have any idea? it's very important project to me, so any ideas would be appreciated!
dafniz91
dafniz91 2016년 5월 14일
hi, me again....just to add, I´m doing all this in matlab2012...could that be the problem?

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

 채택된 답변

dafniz91
dafniz91 2016년 5월 15일

2 개 추천

it feels weird answering your own question, but I think that it can be of use to someone else (and I want share this feeling of success...): I just did it!
I´m not sure which of the adjustments were the solution but what I did was to install bluetooth device software for windows, because I saw that in Mac were less problems like this. also I delayed for a while (2 seconds) after the opening of the port in matlab.
I´m still havin some problems of the size of the data to receive because I´m sending 4 sensor datas in 8 columns, but the conexion is perfect(the baudrate I´m using for now is 9600).

댓글 수: 1

Kurt Stewart
Kurt Stewart 2017년 3월 10일
what software did you download, I am having this same error! Thanks

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

추가 답변 (1개)

Árpád Banda
Árpád Banda 2019년 1월 31일

0 개 추천

Hi
I have the same problem. Could you help me please what software did you download? Thank you very much!

카테고리

도움말 센터File Exchange에서 Instrument Control Toolbox에 대해 자세히 알아보기

태그

질문:

2016년 5월 10일

답변:

2019년 1월 31일

Community Treasure Hunt

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

Start Hunting!

Translated by