Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

BLUETOOTH Module

Bluetooth PAIRING PHONE APPS

  • Please log in to reply
7 replies to this topic

#1 EagleSparrow

EagleSparrow

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts
  • LocationMiami, Florida

Posted 09 December 2014 - 02:07 PM

Does any one have info for interfacing the Netduino Plus 2 to Bluetooth?

 

  1. I need the shield or bluetooth board and code to make one of these talk blue tooth maybe to a tabet or something. It would have to paired up to my tablet.
  2. If anyone has done it can you post some cool stuff like pictures. I'm new on this platform.

 

-Peter

 



#2 ShVerni

ShVerni

    Advanced Member

  • Members
  • PipPipPip
  • 138 posts
  • LocationNew York, New York

Posted 10 December 2014 - 01:06 AM

Hello,

 

I've had success using these modules to connect to phones via Bluetooth:

 

http://www.dx.com/p/...t-module-104299

 

They're cheap, easy modules to get a serial Bluetooth connection going, but keep in mind they are slave only, so they won't allow two Netduino's to talk to each other; you need a phone, tablet, or computer to act as a master.

 

I used them in my urban garden project, and you can find the source code for the Netduino using the Bluetooth controller in that project's source code here:

 

https://drive.google...iew?usp=sharing

 

It's in the "Controllers" sub folder. That code also shows how the Bluetooth class is used.

 

I hope that helps!



#3 EagleSparrow

EagleSparrow

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts
  • LocationMiami, Florida

Posted 02 February 2015 - 05:37 PM

Hello,

 

I've had success using these modules to connect to phones via Bluetooth:

 

http://www.dx.com/p/...t-module-104299

 

They're cheap, easy modules to get a serial Bluetooth connection going, but keep in mind they are slave only, so they won't allow two Netduino's to talk to each other; you need a phone, tablet, or computer to act as a master.

 

I used them in my urban garden project, and you can find the source code for the Netduino using the Bluetooth controller in that project's source code here:

 

https://drive.google...iew?usp=sharing

 

It's in the "Controllers" sub folder. That code also shows how the Bluetooth class is used.

 

I hope that helps!

 

 

I'm Using the Netduino Duo Plus 2.

Do you know where I connect the data lines to interface to this board?

 

Also what app did you use to talk to the Netduino and you application? Do you have any good mobile code to use for a phone app?

-peter



#4 EagleSparrow

EagleSparrow

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts
  • LocationMiami, Florida

Posted 02 February 2015 - 06:34 PM

I need to do the following in code.

 

  public Bluetooth(string port)
        {
            _port = new SerialPort(port, 9600, Parity.None, 8, StopBits.One);
            _port.Open();
            _port.DataReceived += port_DataReceived;
        }

 

  1. where do I connect my Bluetooth module's RX, TX lines to the Netduino plus 2. to communicate?
  2. Do I have to configure some of the IO PINS? where is that all documented?
  3. Do I have to PAIR my Application with a Phone to talk with it?
  4. Is there any sample code for a phone app to send strings to my device?

 

 

Thanks!!!!!!!!!!!!!

 

-Peter



#5 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 02 February 2015 - 07:10 PM

  1. where do I connect my Bluetooth module's RX, TX lines to the Netduino plus 2. to communicate?
  2. Do I have to configure some of the IO PINS? where is that all documented?
  3. Do I have to PAIR my Application with a Phone to talk with it?
  4. Is there any sample code for a phone app to send strings to my device?

1 - Pin Connection

Have a look at the pin out diagram for the Netduino Plus 2.  Just remember to connect Tx to Rx in each case.

 

2 - IO Status

Opening a serial port should set the IO direction for you.

 

3 - Pairing

If memory serves I just paired the phone with the module, the phone did all of the work for me.

 

4 - Bluetooth Phone Examples

I did a little work with the Redbear BLE module and an iPhone if you're interested.

 

Hope this helps,

Mark


To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#6 EagleSparrow

EagleSparrow

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts
  • LocationMiami, Florida

Posted 04 February 2015 - 07:48 PM

1 - Pin Connection

Have a look at the pin out diagram for the Netduino Plus 2.  Just remember to connect Tx to Rx in each case.

 

2 - IO Status

Opening a serial port should set the IO direction for you.

 

3 - Pairing

If memory serves I just paired the phone with the module, the phone did all of the work for me.

 

4 - Bluetooth Phone Examples

I did a little work with the Redbear BLE module and an iPhone if you're interested.

 

Hope this helps,

Mark

 

 

I have a different Bluetooth module but I think they are all the same. Am I right on this? I have two from two different vendors. Do I still need the libraries for this device? I do not have the IDE shown in the example to do the android app. What is needed from this Library?

 

Thanks

 

-Peter



#7 Nevyn

Nevyn

    Advanced Member

  • Members
  • PipPipPip
  • 1072 posts
  • LocationNorth Yorkshire, UK

Posted 04 February 2015 - 08:12 PM

I also have the RN42 module and I just connected that up to the Netduino and no libraries were needed on the Netduino.  I wrote a PC application that talks to the module over serial.

 

The RedBear module has a convenient object library for iOS which is why that was used in that project.

 

Regards,

Mark


To be or not to be = 0xFF

 

Blogging about Netduino, .NET, STM8S and STM32 and generally waffling on about life

Follow @nevynuk on Twitter


#8 EagleSparrow

EagleSparrow

    Advanced Member

  • Members
  • PipPipPip
  • 34 posts
  • LocationMiami, Florida

Posted 04 February 2015 - 08:27 PM


I also have the RN42 module and I just connected that up to the Netduino and no libraries were needed on the Netduino.  I wrote a PC application that talks to the module over serial.

 

The RedBear module has a convenient object library for iOS which is why that was used in that project.

 

Regards,

Mark

 

 

Cool!!!

 

I'm going to use this one here. I added the PDF file.

 

I need a good android app example so I can pair-up and maybe use Java or JavaScript to talk to it and turn on an LED or turn it off.

 

Simple.

 

I want to connect this to the internet with the Ethernet or use XBee to talk to a base and then talk to the Internet via Ethernet.

 

Got any good simple Android Apps that I can just click a button and send to Bluetooth. I also want to talk to a web-service from the phone app if possible.

 

Thanks - Pete!!!

 







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.