Message Boards Message Boards

GROUPS:

Connect Mathematica to a Bluetooth 4.0 device?

Posted 11 days ago
206 Views
|
5 Replies
|
6 Total Likes
|

How does Mathematica connect to heart rate device via Bluetooth 4.0 and analyze the sampled data? The FindDevices command has tried but the device cannot found. Are there any things to be aware or other methods?

FindDevices[]

{DeviceObject[{"Camera", 1}], DeviceObject[{ "FunctionDemo", 1}], DeviceObject[{ "RandomSignalDemo", 1}], DeviceObject[{"WriteDemo", 1}]}

5 Replies

First, it's okay to cross-post, but please link the posts together:


While I don't know for sure, I really doubt that Mathematica would support such a device out of the box.

I also suspect that each such device would communicate differently over Bluetooth. Knowing that it uses Bluetooth is not sufficient to talk to it. Someone please correct me if I'm wrong.


Finally, I have a related question myself:

There's the http://devices.wolfram.com/ site that lists more than 4000 devices. Just the fact that this site exists would suggest that there must be some support in Mathematica for communicating with these devices. But my impression was that this is not the case—there isn't direct support for almost any of them. Is this correct? If yes, what is the purpose of devices.wolfram.com ?

You also pointed out my problem. Can Mathematica really connect to devices that use a common interface (such as USB or Bluetooth), or can they only connect to devices that have been verified by Wolfram? The explanations and examples I saw on another page (http://www.wolfram.com/mathematica/new-in-10/connected-device-framework/) are different from my actual experience and are very confusing.

Szabolcs,

According to the Connected Devices documentation.

The Wolfram Language provides a streamlined framework for connecting to external devices. Many classes of devices listed in the Wolfram Connected Devices Project are immediately supported within the Wolfram Language.

I have not tried the devices from that website but I have connected custom devices in various ways.

Tsai,

I think the connection method depends on OS. I am familiar with Mac/Linux but not Windows. If your device acts like a serial device then the method to connect is to find the name of the serial port in the OS and open it with DeviceOpen (with the correct parameters). On the Mac, disconnect the device, do an "ls /dev" in terminal and then connect the device and do the "ls /dev" again and see what device was added. What OS are you using?

I have connected to devices in several ways from the Mac:

  1. you can open a serial port if the device acts as a serial device (and then you must know its communication details)
  2. you can write some C code that talks to the device from the command prompt and then use "RunProcess" to run it from MMA and get the results back.
  3. You can convert the same C code to WSTP function and directly call it from MMA (although the benefit from this over #2 is small, it is cleaner looking code in MMA)
  4. you can make your own device driver following these instructions (While I know this is the cleanest way, I have not done this because our connections have been for "internal use" and I did not see the benefit of doing the extra work to fully integrate it.

Regards,

Neil

Thank you~~ I will look for relevant information in the device manager.

This might be of some use to you:

I have never tried it. Even if it does not work out of the box (it's quite old), looking at its implementation may be helpful to you.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract