r/Unity3D•
eggfruit

Receiving data through Bluetooth

Question

Hi, I'm currently working on a project where we want to use realtime data from a deskbike. It sends out data through bluetooth device plugged into what appears to be an audio jack, which is it's only output.

I would really appreciate any help that can be offered, even if it's just a stab in the dark.

Posted Sep 27, 2017, 9:13 AM UTC

26
kyl3r123Hobbyist•

can you detect the bluetooth device with your phone? Do you know the desk-bike brand? You need some kind of protocol, so information about what data is sent, in what order and formatting.

2
eggfruitOP•

Yes, I can detect it with my phone and laptop. But I can't interact with it in any way other then through an existing smartphone app (literally called 'deskbike') that can detect the bike and show how fast you're cycling with a ~2 second delay.

The company website doesn't offer any other software or dev tools related to the bike. I will get to speak to someone from the company next week though, so I will ask if they can give me the protocol. So thank you for the tip.

1
kyl3r123Hobbyist•

ask for an API first, if they have an API it would be designed for things like that. The protocol would be useful in the second case. Source code of the app could help you, too. I don't know what they are allowed to give out.

2
eggfruitOP•

Good point, thanks again. And getting the source for the app would indeed be great, though unlikely since this is a student project.

1
Osteelio•

We're currently using an Arduino with a built in bluetooth module that's plugged into a USB port of a computer and talks to an iPad for an installation we're working on.

Within the iPad app, we basically send key press commands from the UI (for example, pressing the start button on the iPad sends 'a') which then is interpreted as a key press on the PC app. It's a bit hacky, but it works for what we need it to do.

Unfortunately I didn't put the Arduino together or set up the scripts that do the communication, so that's as far as my knowledge goes. :D

1
eggfruitOP•

Using an Arduino is also our second guess :) Though it would be nice if anyone could connect their own laptop to any one of these bikes. (We're only working with 2 bikes, but still, it would be nice if it was expandable.)

1