Bluetooth BLE / Starter Programming

General project help for Adafruit customers

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
hollywood
 
Posts: 7
Joined: Tue Jul 01, 2014 5:10 pm

Bluetooth BLE / Starter Programming

Post by hollywood »

Hi,

I found this site and i think this is probabaly the right moment and place to ask about a low cost starter kit that will allow me to understand the basics of Bluethooth technology. I dabble in some programming C/Matlab for the purpose of mathematical investigations ( prime numbers etc), I have also dabbled in PLC assembly language programming in the past.
can you suggest therefore a low cost bluetooth kit that I could work with directly with windows??

ciao,
Tony

User avatar
Franklin97355
 
Posts: 23903
Joined: Mon Apr 21, 2008 2:33 pm

Re: Bluetooth BLE / Starter Programming

Post by Franklin97355 »

It would help if you could explain what it is you are trying to accomplish and what hardware the PC has available to it

hollywood
 
Posts: 7
Joined: Tue Jul 01, 2014 5:10 pm

Re: Bluetooth BLE / Starter Programming

Post by hollywood »

Hi Franklin,

yes in effect there is lets say an ends to my request, I want to create a Bluetooth device couple that will be synchronized with each other and exchange messages only with each other. basically a "Love" bracelet type device that will comunicate a "STATE" to the remote bracelet/device. In fact this is why i called the devices Device_XY. I had originally thought of this idea for my friends who go rock climbing who are separated by the cords while they climb and this device could be used to comunicate for example a state of danger or a general anomaly/alarm. I wanted to create this and ask them to test..

BAck to us.....Therefore these are very simple messages that are exchanged to be programmed into this device ,therefore this seems to me to be both something interesting to learn to program and build as welll as very simple

I am attaching a simple drawing that gives the general overview.

My computer is a laptop HP envy DV7 windows 8 with core i5 processor. (of course no serial ports available!!)

please let me know if you need any further information regarding my computer or anything else.

ciao
Tony

P.S. somethign very important.. I am based in Italy and therefore please take this into account for the HW I would need for this "Project"
Attachments
File containing just basic overview
File containing just basic overview
BLE_device.jpg (97.03 KiB) Viewed 742 times

hollywood
 
Posts: 7
Joined: Tue Jul 01, 2014 5:10 pm

Re: Bluetooth BLE / Starter Programming

Post by hollywood »

Hi,

It seems that not many people are making these blutooth bracelets for the bracelets to comunicate freely to each other but through android or Ios devices.

i think that the arduino coupled with the nRF8001 starter kit... and I just noticed that the Arduino is actually an italian made device therefore probabaly will be easy to get.

in any case is this the kit you are suggesting to begin with??

what are the time frames for the shipping of the nRF8001 ??

happy 4th of july!!

ciao,
Tony

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: Bluetooth BLE / Starter Programming

Post by adafruit_support_mike »

The nRF8001 won't be able to do what you want.

Bluetooth divides devices into 'hub' and 'client' categories. The hubs are complicated and do most of the work, the clients are simple and just do what the hub tells them to do. The advantage is that you can make clients that are small, inexpensive, and don't use much power.

The disadvantage is that clients can't talk to each other. A client can only talk to a hub, and only a hub knows how to recognize a client.

The nRF8001 is strictly a client device, so it can't do peer-to-peer communication with another client device.

hollywood
 
Posts: 7
Joined: Tue Jul 01, 2014 5:10 pm

Re: Bluetooth BLE / Starter Programming

Post by hollywood »

BLE_Hub_Client.jpg
BLE_Hub_Client.jpg (205.89 KiB) Viewed 694 times
Hi Mike,

Thanks for this explanation it's crystal clear.. it's basically the "Client-Server" concept way of looking at things...

That was useful information because at this point i wouldn't want to spend time working with devices that in the end will not do what i need

Therefore would you have any ideas to suggest to get me on the right starting path to working with BLE device that could could be a work around to do the peer to peer interogation??

But I would imagine that it's a matter of creating some kind of funky "hub" "client" architecture.. what do you think??



In attachment I made this diagram with the two options, both options have the devices with a HUB and a Client but of course the HuB A talks with client B and HUB B talks with the Client A.. Now :

Option 1: contains two clients per device one cleint to comunicate the status to the remote Hub and one client which reads the status from the remote HUB.

Option 2: implies that there is no real need for a Client to read the remote status where as the HUB can indicate the satus directly to the device

I beleive that Option 1 is the way the system should work but of Course if Option 2 is doable it would be less costly??

what do you think??


ciao,
Tony

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: Bluetooth BLE / Starter Programming

Post by adafruit_support_mike »

The secondary clients in Option 1 aren't necessary. Once the hub establishes a connection with a client, information can pass both directions.

The client/server model works for a BT connection, but the names are a bit backwards. The hub acts more like a client, and the clients act more like servers.

A client doesn't do much on its own except emit "here I am" messages. The client doesn't know or care whether any other BT device is in the area, the chirps are just messages that announce its existence. The hub listens for such chirps, decides whether it wants to establish a connection with a client, and sets up the connection if it does. Once the connection exists, the hub emits commands (the 'client' role in client/server) and the client responds to them (the 'server' role).

For your application, the hub could emit commands like, "my status is X" and "report your status". The client would accept information about the hub's status, performing any relevant actions in its own hardware based on what it hears, and transmit its own status on command.

hollywood
 
Posts: 7
Joined: Tue Jul 01, 2014 5:10 pm

Re: Bluetooth BLE / Starter Programming

Post by hollywood »

Hi Mike,

Thank You its is well appreciated for the clear explanation once again!!

In the attached diagrams i created two scenarios that I want to discuss with You:

Scenario 1: this scenario is basially the option 2 that was on the previous diagram which contains the HUB / Client sets per each device. Now all that i did was modify the messaging as per the way you explained therefore here we see that HUB A is transmitting its status to the client B and HUB B is transmitting its status to the client A.

Scenario 2: This scenario foresees basically that Device A is a HUB and that Device B is a Client, I created this based on your explanation that the client can transmit its state to a HUB as well as reveive the state of a HUB.

Therefore before starting to put Hardare into the picture I wanted to make sure that I will start off with the correct architecture, do you feel that Scenario 2 is the more feasible or should it be scenario 1??

can you also specify what is the maximum distances that the BLE device can cover?

Thank You ,

ciao,
Tony
Attachments
BLE_hub_client_status.jpg
BLE_hub_client_status.jpg (122.98 KiB) Viewed 680 times

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: Bluetooth BLE / Starter Programming

Post by adafruit_support_mike »

Scenario 2 maps well to the existing hardware. One hub could make connections to any number of client devices.

WRT distance, Bluetooth's official range is 10 meters, but any radio system's performance will vary based on its surroundings. It's roughly analogous to asking how far away someone can be and still hear you speaking at normal volume. It depends on whether you're in a library or at a heavy metal concert.

The intent for Bluetooth is to work well for objects within arm's reach, creating what's called a 'personal area network'. The field extends beyond that, but distance isn't really a goal. Being able to create room-area networks becomes problematic when you have 50 people in the same room.

hollywood
 
Posts: 7
Joined: Tue Jul 01, 2014 5:10 pm

Re: Bluetooth BLE / Starter Programming

Post by hollywood »

Hi Mike,

You're a powerhouse of information.. Thank you for these suggestions and tidbits of information!!

Ok I think that at this stage we can start to discuss what these block HUB/CLIENT diagrams mean as far as Hardware or software.

In the attached Diagram I just created a very low detailed view of the HUB and Client Hardware Layer of the devices with some ideas for HW like LCD display to both view My status and the remote status as well as the HW that will actually change the satus of the HUB or Client( could be maybe buttons to send a red light or green light ??

They are just some ideas, but I do beleive that we should start slowly (learn to walk and then we can run) but don't worry once i'm in the fast lane theres no stopping :-)

I definitely realize that it may all not be as simple as it is depicted in the Diagram and therefore this is why I would like You to propose the HW for both the client and The HUB lets say a "beginners" kit that would be able to put into action the HUB & Client Devices.

Can you Please let me know Your suggestion and all the prices involved( for an adafruit kit of course) and do you ship overseas??


Regards,

Tony
Attachments
BLE_Hub_Client_HW.jpg
BLE_Hub_Client_HW.jpg (178.66 KiB) Viewed 648 times

User avatar
adafruit_support_mike
 
Posts: 67391
Joined: Thu Feb 11, 2010 2:51 pm

Re: Bluetooth BLE / Starter Programming

Post by adafruit_support_mike »

Start with an nRF8001 and an Arduino, and use any Bluetooth-capable phone or computer as the hub.

https://www.adafruit.com/product/1697 - nRF8001
https://www.adafruit.com/products/50 - Arduino Uno

If you want a portable hub, you'll probably want something like the IOIO:

https://www.adafruit.com/products/885

Start with just the client and Arduino though.. get used to working with those pieces, and get a feel for how things work. The information you learn doing that will guide the rest of your design.

You might also want a good reference on BLE systems:

https://www.adafruit.com/products/1978

Our own wireless/radio guru Kevin Townsend is one of the authors, so we know it's good.

hollywood
 
Posts: 7
Joined: Tue Jul 01, 2014 5:10 pm

Re: Bluetooth BLE / Starter Programming

Post by hollywood »

Hi Mike ,

Thanks I'll check those out.. I'll keep you posted.

ciao,
Tony

User avatar
DerekJ
 
Posts: 6
Joined: Mon Jul 28, 2014 5:26 pm

Re: Bluetooth BLE / Starter Programming

Post by DerekJ »

I am also interested in developing two Arduino compatible (Teensy 3.1) devices that communicate wirelessly and was considering using the Adafruit nRF8001 Breakout until I discovered the hub issue. Can anyone suggest an alternative wireless device that is easy to get started with? Even one that uses another radio technology (WiFi, Xbee, etc.)

I looked at the XBee Modules here on Adafruit, but there are no accompanying tutorials...suggestions there?

User avatar
Franklin97355
 
Posts: 23903
Joined: Mon Apr 21, 2008 2:33 pm

Re: Bluetooth BLE / Starter Programming

Post by Franklin97355 »


Locked
Please be positive and constructive with your questions and comments.

Return to “General Project help”