Bluetooth communication between devices

How does Bluetooth communicate between devices?

Bluetooth uses radio waves instead of wires or cables to transmit information between electronic devices over short-distances. Then, the communication between the two Bluetooth devices happens over a short-range network called a piconet (pico means really really small in the metric system).

What technology is used in Bluetooth?

Bluetooth is a short-range wireless communication technology standard. Bluetooth uses short-wavelength UHF radio waves of a frequency range between 2.4 and 2.485 GHz.

How data is transferred through Bluetooth?

In Bluetooth & other devices settings, select Send or receive files via Bluetooth. In Bluetooth File Transfer, select Send files > choose the device you want to share to > Next. Select Browse > the file or files to share > Open > Next (which sends it) > Finish.

What is the difference between Wi-Fi and Bluetooth do they interfere with each other’s signal?

Like WiFi, Bluetooth also uses radio signals to send data between devices. In fact, Bluetooth uses some of the same frequencies as WiFi, which can cause interference with WiFi devices. Bluetooth is also slower than WiFi, and it has a shorter range (usually up to 30 feet).

Can you transmit data over Bluetooth?

Most any type of file can be transferred over Bluetooth: documents, photos, videos, music, apps, and more. If a file is stored in a folder on a computer or smartphone, you can send it.

What do you need to know about Bluetooth technology?

Bluetooth is a wireless technology that allows the exchange of data between different devices. While Bluetooth uses wavelength to transmit information, it generally only works within a short distance for the devices to stay connected.

What is the distance between two Bluetooth devices?

The distance between the two devices is very short from the fixed, mobile device and building personal area network. The Bluetooth technology is developed by the Bluetooth special interest group and its physical range is from 10m to 100m.

How does a Bluetooth device find other Bluetooth devices?

Bluetooth device looks for other Bluetooth devices in range: To be found by other Bluetooth devices, the first device, Device 1 must be set to discoverable mode – this will allow other Bluetooth devices in the vicinity to detect its presence and attempt to establish a connection.

What can you do with multiple Bluetooth devices?

Each Bluetooth device has a specific set of capabilities called profiles. When you connect two or more devices with the same functional profile, the primary device allows the user to select one as active. Multiple Headphones and Speakers The most common use of Bluetooth is pairing headsets or speakers to a smart device.

Читайте также:  Review on bluetooth headset

Источник

Bluetooth data transfer between two Android devices

I have been following this Android guide for Bluetooth communication To explain exactly what I want to do, when the two devices are paired, two different activities open up on each device (server and client) where on the server activity I have different buttons, and on the client activity there is just a textview. I want to be able to press a button on the server device and display it on the client. I have managed to establish a connection between the two devices, but now I want to send data which I have not been able to do. They give this code for data transfer:

private class ConnectedThread extends Thread < private final BluetoothSocket mmSocket; private final InputStream mmInStream; private final OutputStream mmOutStream; public ConnectedThread(BluetoothSocket socket) < mmSocket = socket; InputStream tmpIn = null; OutputStream tmpOut = null; // Get the input and output streams, using temp objects because // member streams are final try < tmpIn = socket.getInputStream(); tmpOut = socket.getOutputStream(); >catch (IOException e) < >mmInStream = tmpIn; mmOutStream = tmpOut; > public void run() < byte[] buffer = new byte[1024]; // buffer store for the stream int bytes; // bytes returned from read() // Keep listening to the InputStream until an exception occurs while (true) < try < // Read from the InputStream bytes = mmInStream.read(buffer); // Send the obtained bytes to the UI activity mHandler.obtainMessage(MESSAGE_READ, bytes, -1, buffer) .sendToTarget(); >catch (IOException e) < break; >> > /* Call this from the main activity to send data to the remote device */ public void write(byte[] bytes) < try < mmOutStream.write(bytes); >catch (IOException e) < >> /* Call this from the main activity to shutdown the connection */ public void cancel() < try < mmSocket.close(); >catch (IOException e) < >> > 
// Send the obtained bytes to the UI activity mHandler.obtainMessage(MESSAGE_READ, bytes, -1, buffer).sendToTarget(); 

And is not explained in the guide. I don’t know what the mHandler is or does. Apart from the error, I don’t even really understand where to put this code. Should it be in the second activities (server and client) that I open or in the main? If in the Server activity, should it be in the onClick method for all the buttons with a different byte code to send for each button? And in this code, how do we distinguish who is sending and who is receiving?

Источник

What is Bluetooth & How It Work

Bluetooth is the technology that allows electronic devices to communicate with each other directly. It uses radio waves that are both transmitted and received by the devices in connection with each other.

Bluetooth is something that has changed a lot over my years as a network engineer, and what it is today is very different from what it was 10 years ago.

I will now explain what Bluetooth is and how it works, so keep reading.

What is Bluetooth

Bluetooth is a wireless communications technology that allows high-speed, low power, wireless transmissions between electronic devices in short distances using a standardized protocol.

Читайте также:  Управление звуком наушников блютуз

Or in more simple words. Bluetooth is the technology that allows for communication between electronic devices.

Bluetooth is mostly used for connecting things like wireless headphones to your phone or a wireless mouse to a computer. It should also not be confused with a Wi-Fi signal. [1]

The difference between Wi-Fi and Bluetooth is that Wi-Fi is much stronger and comes from your router. And even if devices can connect with each other through Wi-Fi it’s not the same as Bluetooth.

This is because Bluetooth is a direct connection between the devices while Wi-Fi uses the router as an interlink.

How Bluetooth Works

Bluetooth works very similarly to how Wi-Fi signals and radio signals work. Through radio waves.

Bluetooth uses a band of 79 different frequencies (channels) which range from 2,4-2,485 GHz. This frequency interval is shared with industrial, scientific, and medical gadgets. [2]

But this won’t be a problem for you when you use Bluetooth. This is because the class 2 type Bluetooth that exists in consumer devices such as phones and computers only have a range of around 10 m.

Other types of Bluetooth are class 1 and 3. Class 1 is used in industry and has a range of around 100m and class 3 is rarely used because of its short range of 1 m. [3]

Furthermore, the Bluetooth signal is not just one frequency. It can change its frequency, as much as 1600 times every second. This is to keep the signal strength and minimize interference in radio crowded areas.

Bluetooth Networks

A Bluetooth network is called a piconet and uses a master/slave system to control the data flow.

In this system, one “master” device (often a phone or a computer) can connect to up to seven other devices. These will get the role of slaves (slave devices are often wireless earphones, mice, or keyboards). Slave devices can only connect to one master at a time. [4]

How Bluetooth Networks Works

The master’s role is to coordinate data transfer in the piconet (Bluetooth network). It can send or request data from any of its slaves. In addition, slaves are not allowed to communicate with each other in the piconet.

Every electronic device with Bluetooth has a different address. This is important because in a house there are often a lot of devices that use Bluetooth to communicate with each other.

An address makes it possible for the device to know if a Bluetooth signal is meant for it or not.

There are three steps in the connection process between two devices that establish a Bluetooth connection. These steps are:

  1. Inquiry – If two devices have no information about each other one of them must send an inquiry request. The other device then responds with its address and name and what kind of hardware it is.
  1. Connecting – Here the two devices form a Bluetooth connection.
  1. Connection – After the devices have connected they enter a connection state with each other. The device can either be actively connected with each other or passively connected.
Читайте также:  Ардуино блютуз передача данных

An active connection is when the connected devices constantly talk to each other. While passive is when they talk to each other periodically, like once every 1 second.

Device Bonding

Device bonding is when two devices remember each other. Bonded devices automatically establish a connection with each other if they are in range. An example is a car, which often connects with your mobile when you start it.

To create these bonds the devices go through a process called pairing. During pairing the two devices usually follow the normal connection process.

But instead of forgetting the device when they disconnect from each other. The devices’ data gets stored in memory. Furthermore, they also save a shared secret code that allows them to reconnect with each other in the future.

Why It’s Called Bluetooth

The name Bluetooth comes from the Danish king Harald Blåtand. He was king in the 900s and is most known for uniting Denmark and part of Norway into a kingdom. His name Blåtand is directly translated to Bluetooth. The belief is that he got this name from a rotten tooth that appeared blue.

The reason Bluetooth is named after him was that he united Denmark and Norwegian. Just like Bluetooth unites devices with each other. [5]

It is also here it has got its symbol from. The symbol consists of Harald Blåtands initials, H and B. But instead of using normal letters, it uses Nordic runes.

Bluetooth Security

Wireless connections will always be less secure than wired connections. This is because wireless connections are much easier to find and expose. But this makes Bluetooth far from unsecured.

The biggest security feature Bluetooth has is its short range. It makes it much harder for hackers to access it, compared to your internet connection for example. This is why the only real place Bluetooth hacking takes place is in public places with a lot of devices. [6]

In general, Bluetooth security is not something to worry about. And if you want to be extra safe you can set your device on hidden mode. Then will no other Bluetooth device be able to find it.

Pros & Cons With Bluetooth

There are of course some cons with Bluetooth, but they are for the most part overshadowed by the pros. Here they are;

Pros:

  • New versions consume little battery.
  • Very practical (doesn’t need cables).
  • Secure.
  • Allows for wireless hardware.

Cons:

Bottom Line

I hope this article has shed some light on how Bluetooth works and what it is. As well as make you realize how often most of us use Bluetooth in our everyday activities.

If you want to learn more about network technology check out my Router vs Modem – What’s the difference.

Источник

Оцените статью
Adblock
detector