Matlab, Serial port, BITalino
3 views (last 30 days)
Show older comments
BITalino is a device to measure physiological signals. It connects to a computer via Bluetooth and thereby adds two COM ports, one outgoing and one incoming.
I would like Matlab to communicate with the BITalino device via a serial port. That does not work though, since Matlab does not find the outgoing serial port COM4:
instrhwinfo('serial')
only finds COM3 and COM5. But the device manager clearly shows (see picture), that COM4 is there. And the program HTerm.exe easily connects and communicates. So clearly something is wrong with Matlab on Windows. I tried it with Matlab on a Mac and there Matlab worked perfectly fine.
I know that there is an Matlab API for BITalino, but it uses a Java library and I want to be able to use Simulink with RTWT to receive the data.
So, does anyone have an idea, what could be wrong here?
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/147999/image.png)
0 Comments
Answers (1)
Arvind
on 5 Apr 2015
Hi Alexander, please try the following steps to see if any of these fixes your issue:
1. Instead of executing instrhwinfo('serial'), please try to execute "instrfind" or instrfindall" at the MATLAB Command Window to find all the available serial objects.
instrfind: to find the available("visible") serial objects
instrfindall: to find all visible as well as the hidden serial objects
Please refer to the documentation links below for more information (provided by our tech-support):
http://www.mathworks.com/help/matlab/ref/instrfind.html http://www.mathworks.com/help/matlab/ref/instrfindall.html
2. Please check whether the port is being used in any other application like hyperterminal, another instance of MATLAB etc. If yes, then the port will not show up in MATLAB as an available serial port.
3. Also, please note that if a serial object was created but was not properly deleted/cleared, it will not show up when you subsequently try to use it.
Also, please note that RTWT - now renamed as Simulink Desktop Realtime (SLDRT) - isn't optimized to deal with (buffered) data such as from a bluetooth connection. It uses point-to-point communication designed for real-time control systems (think sample-based operations at low rates such as 1 KHz). For the data rates coming from the Bitalino (1 KHhz), direct processing in Simulink (and or MATLAB) should provide real-time performance.
0 Comments
See Also
Categories
Find more on Startup and Shutdown in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!