Data transfer via Bluetooth Low Energy (BLE) from sensor to Max MSP
Hi everyone,
Has anyone experience getting the new Bluetooth Low Energy (BLE) protocol talking to Max? Trying to get sensor data from a 9DOF Bo055 coupled with the Adafruit Bluefruit feather 32u4 into Max. The x, y and z data shows up in the Arduino monitor but only with usb serial transfer. Trying to send the data via bluetooth but with the BLE transfer protocol this only seems to work from central devices (mobile phone, etc) to the micro-controller - not the other way around. There seems to be ways of setting up reverse communication from sensor (peripheral) to central device (Mac OS) but you would need fairy advanced programming skills to do this.
Does a Max external for this function exist, or is there another way around the issue?
Thanks in advance.
Ricard
Hey!
interested as well! Anyone?
Hi Ricard, I'm having the exact same problem - did you ever come up with a solution or is a solution possible?
I'm using a Bluno Beetle BLE with a LIS3DH accelerometer from Adafruit attached. I see the data in the serial monitor and also in Max using the serial object but only when it is connected via USB. Once I pair the Bluno Beetle and switch the serial object port to Bluetooth, I get nothing.
Thanks - chris
Hi! I'm trying to achieve the same thing with different modules. I'm using the HM-10 BLE module which I'm successfully reading with the LightBlue app but can't read in Max.
Maybe something like noble could help but shouldn't the Bluetooth-Incoming-Port used in the serial object be able to read data from a paired device?
Hey, I'm also keeping an eye on this, I'm trying to send commands from Max to a Bluetooth LE equipped Arduino clone.
It works using node.js as the middleman, receiving bluetooth messages and sending them through UDP which is then accessible in Max. I'll publish an example when I finish the project.
hi roman- how are you progressing? Is node.js available in max as standard? Not much of a java scripter!
cheers!
You can't access node.js from Max as far as I know. Here's the code I'm using:
https://github.com/romanrandom/ble-osc
You'll probably need to customize the code to your needs but it might be a good starting point. If there is enough interest I might create a little app with a GUI so that the console doesn't need to be used.
Following!
Any news about the code guys? i'm also struggling with getting data from bluefruit into max
Hi All,
Honestly, for my project (which I'm just now getting back to since my original question one year ago. ugh!!!!!) I switched over to using the Feather Huzzah with ESP8266 Wi-Fi chip. it is also programmed through the Arduino IDE and it was fairly simple to get it to send the XYZ accelerometer data from my sensor as OSC messages into Max-MSP. I personally think the BLE is a deadend but I honestly haven't tried it in a year either.
Hi again. Just wanted to mention my bad experience with the module, which seemed to get interference from the audience's phones during the show as it was working quite reliably for months during the rehearsals. I'd definitely use wifi next time but it's just a guess that the BLE is to blame.
I ended up abandoning the BLE for now as my partner-in-crime also went down the feather Huzzah route and got that working with max. Here is a link to what he developed so far: https://github.com/lwoodbury/Huzzah32OSC
Hi! Thanks CHEWIESMISSUS for your hint. i actually bought the huzzah, did whole electronics all around and it seems to work just perfect, BUT! it is not able to connect to any mac computer (i create an ad hoc network) whereas it connects fine with any router/windows pc. do you know if there might be something that blocks it from connecting to a mac directly?
I think wireless interference in concert situations is an epidemic for new media scene, we really need to get to the bottom of when and why this occurs, get some set of best practices together to distribute widely. It seems like every laptop orchestra out there has made the same mistake of wanting to work with wireless and getting burned by it in the actual performance when interference causes the systems to fail.
Apparently adhoc is not supported by the ESP32, but you should be able to set it up as an access point and connect your mac to it instead: https://github.com/espressif/arduino-esp32/issues/1248 This setup might actually make a lot more sense for functionality so I will be looking at implementing that in my OSC example.
I think the ESP8266 might connect to adhoc, but it only has one analog pin I seem to remember.
I have actually got the Particle Photon doing OSC on a local network (without all the cloud IoT stuff) and that has 6 analog pins I think, but didn't go to far with it as the Huzzah has all the Lipo management built in and works out cheaper. I think the Photon can connect to an adhoc network, but not certain.
@rafal
I am not that familiar with Max, but I have had trouble using other Bluetooth devices with Mac OS that work fine with Windows 7 or 10. It seems that Apple has some difference in how they handle Bluetooth.
hi guys! any news concerning bluetooth devices being directly connected into max ? I'm checking the node for max now and trying to implement the roman's script.
Hi Rafal
I bailed on Bluetooth and went with a wireless arduino board and a 9dof sensor stick:
https://www.sparkfun.com/products/13944
Can recommend wireless over BT...
*Edit*- just read the chain again and basically my experience was identical to that described by ISOMORGAN above.
Cheers!
~Fold
Hey Guys, Any update on this? ? I am using the HeartRateOSC https://github.com/trentbrooks/HeartRateOSC and managed to get my hands on a Mio Alpha 2 which was working.. and connecting to MAX, but now it has randomly stopped...
Has anyone else had this experience?
I had tested it got it triggering some things to take to an event to show off and it stopped working the night before... no apparent reason..
the watch was still displaying HR. And in the app it finds and then reads that the watch exists in the drop down. But then just gets stuck at scanning.... not sure what changed.. maybe interference with the BLE. I have debugged my mac's bluetooth, factory reset the watch and have managed to get the watch streaming to 'Map My Run app' on my iphone... BUT it still doesnt seem to want to connect to the HeartRateOSX app.. Very strange... trying to find a work around... Any help much appreciated..
