communication with bluetooth in matlab

4 visualizaciones (últimos 30 días)
dafniz91
dafniz91 el 10 de Mayo de 2016
Respondida: Árpád Banda el 31 de En. de 2019
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 comentarios
dafniz91
dafniz91 el 12 de Mayo de 2016
Editada: Walter Roberson el 12 de Mayo de 2016
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 el 14 de Mayo de 2016
hi, me again....just to add, I´m doing all this in matlab2012...could that be the problem?

Iniciar sesión para comentar.

Respuesta aceptada

dafniz91
dafniz91 el 15 de Mayo de 2016
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 comentario
Kurt Stewart
Kurt Stewart el 10 de Mzo. de 2017
what software did you download, I am having this same error! Thanks

Iniciar sesión para comentar.

Más respuestas (1)

Árpád Banda
Árpád Banda el 31 de En. de 2019
Hi
I have the same problem. Could you help me please what software did you download? Thank you very much!

Categorías

Más información sobre Instrument Control Toolbox en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by