jumpa
Posts: 1
Joined: Mon Feb 11, 2019 2:21 pm

Bluetooth Data from Rasp to Android

Mon Feb 11, 2019 2:27 pm

Hi, my requirements are:

"An Android app that communicates via BT to a Raspberry and show real time data from temperature sensor attached to it".

I'm a real beginner with Rasp, but I know Android programming. Could you please help me getting started?
Some questions/requests:

1. Should i use Rasp or Arduino? In case which Rasp model do I need?
2. Do I need a breadboard?
3. Is BT communication quiet hard? Should I use something else like Wifi?
4. Any tutorial link would be very useful.

Many thanks in advance!

User avatar
thagrol
Posts: 1472
Joined: Fri Jan 13, 2012 4:41 pm
Location: Darkest Somerset, UK
Contact: Website

Re: Bluetooth Data from Rasp to Android

Mon Feb 11, 2019 6:23 pm

jumpa wrote:
Mon Feb 11, 2019 2:27 pm
Hi, my requirements are:

"An Android app that communicates via BT to a Raspberry and show real time data from temperature sensor attached to it".

I'm a real beginner with Rasp, but I know Android programming. Could you please help me getting started?
Some questions/requests:

1. Should i use Rasp or Arduino? In case which Rasp model do I need?
Um, doesn't your requirement specify "a Raspberry"?
2. Do I need a breadboard?
Probably
3. Is BT communication quiet hard? Should I use something else like Wifi?
Maybe but bluetooth has both a serial port profile and a network profile. Use one of those (depending on which your 'droid device supports) and, once paired, it should be transparent to your code. Just write it as you would any other piece of serial or network code.

If you go the network profile route, you should be able to switch to a different transport (wifi, ethernet, ...) with minimal code changes.
4. Any tutorial link would be very useful.
Nope, sorry. And while I do know what feature are available to bluetooth, I don't have any example code.
Note to self: don't feed the trolls

If I've asked you a question, please answer it. I'm unlikely to be able to help without that information.

xl97
Posts: 126
Joined: Thu Jan 12, 2017 3:34 pm

Re: Bluetooth Data from Rasp to Android

Mon Feb 11, 2019 6:54 pm

I have not doen BT on RaspberryPi before...

but its pretty simple to do so with an Arduio!

Get your Arduino of choice.. and a HC-05 bt module (an additional $2.00 USD or something)..

And start sending out serial data..

How you receive or parse this incoming serial data is up to you and the app on the Android side of things..

I have used MIT App Inventor 2 to whip up a quick BT app for Android before..

User avatar
Douglas6
Posts: 4641
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Bluetooth Data from Rasp to Android

Mon Feb 11, 2019 8:53 pm

Since the requirements specify both a Raspberry Pi and Bluetooth, I'll limit my response to those technologies.

A serial Bluetooth connection using the Pi's onboard Bluetooth or a USB dongle is rather simple to implement. You'll need to configure the Serial Port Profile, and run rfcomm. Search this forum for instructions.

Or, even easier software-wise, attach an HC-05 to the Pi and treat it like any serial port.

Dinsdale
Posts: 12
Joined: Sat Feb 02, 2019 4:33 pm

Re: Bluetooth Data from Rasp to Android

Fri Feb 22, 2019 7:13 pm

Douglas6 wrote:
Mon Feb 11, 2019 8:53 pm
Since the requirements specify both a Raspberry Pi and Bluetooth, I'll limit my response to those technologies.

A serial Bluetooth connection using the Pi's onboard Bluetooth or a USB dongle is rather simple to implement. You'll need to configure the Serial Port Profile, and run rfcomm. Search this forum for instructions.

Or, even easier software-wise, attach an HC-05 to the Pi and treat it like any serial port.
I really, really, really, really need YOUR help with my thread: https://www.raspberrypi.org/forums/view ... 8&t=233892

Sorry for doing this, but I'm desperate and have been trying to get your attention for weeks.

User avatar
Douglas6
Posts: 4641
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Bluetooth Data from Rasp to Android

Fri Feb 22, 2019 9:36 pm

Yikes. I think that's the first time I've been summoned by user-name. Sorry I missed your posts. I'll respond now, but won't be of much help, I'm afraid.

Return to “Android”