one of two HC-06 bluetooth modules only can be detected - arduino

i am working on a device for my project that needs two HC-06 bluetooth modules to be connected to the pc. both of the modules are ok to be connected separately and are working fine. but when both of them are powered at the same time, the pc detect only on of them. are they getting the same address?

No. PC should be able to detect both the devices, if two HC-06 modules are in discoverable state. Each Bluetooth device has a unique ID, so every bluetooth unit has a unique address.
Based on your question, I think the app is trying to connect to first device it finds.

Related

Create the Pairing limitation on HC-05 sensor

I have been trying to set the limit of pairing the Bluetooth device HC-05(interface by Arduino controller) with my smartphone.
I have tried making this solution work with AT command
AT+INQM=<Param>,<Param2>,<Param3>
Example: AT+INQM=1,9,48\r\n
But instead of converting AT commands using serial.h with embedded C, I am looking for any dedicated library which helps to work this kind solution in using Arduino.
Basically, with the help of Bluetooth device connect to Arduino Nano, I want to send the altimeter sensor data to my smartphone.
During the connection, HC-05 should be responding any one device at a time, if another smartphone tries to pair then the error will be shown.
Please share your advice on this.
Yes there are some libraries in arduino but these are only meant for connection and pairing and low energy connections. We don't have any dedicated library from where we can control the mode of operation of HC05 or any bluetooth module. like bypassing or accessing GAP and GATT services of bluetooth. However there is a way to flash HC-05. But we can only use it for updating the firmware of this device. This github repo is dedicated for this purpose . Hope it helps you

Communication b/w two WiFi modules using Arduino Ide

Firstly, I'll just give you a brief introduction about our project... its "Speech controlled Home Automation System" where we are controlling the Home appliances by the voice or speech commands. We're successfully done with the voice recognition module. But our problem is with achieving the communication between the transmitter {where the user gives the voice command} and receiver {where the home appliances are present} through WiFi i.e. we have got 2 ESP8266 12E modules interfaced with Arduino both at the transmitter and receiver side and these two WiFi modules need to be communicated(To interchange some data sent by Arduinos).So please let us know which Arduino code need to be used at transmitter side wifi module and at Receiver side wifi module and also about the header files or additional softwares(if any)to be used.
you can achieve this by starting one of wifi modules in Access Point Mode and the other one has to be set to Station Mode in order to connect to the first one.
In case you want to add a router, just set both ESP8266 modules to Station Mode and connect them to the router.
And then transfer any data you want through AT commands of ESP8266.
Here is the refrence to them.
https://room-15.github.io/blog/2015/03/26/esp8266-at-command-reference/
If you are newbie to Esp8266 and Arduino , this will help you.
http://www.teomaragakis.com/hardware/electronics/how-to-connect-an-esp8266-to-an-arduino-uno/
Good Luck !
I worked on a similar system a year ago. I was developing a remote controlled toy. My main difference was I used the ESP8266 without an Arduino attached.
One ESP worked as a a WiFi hotspot and the other connected to it, sending messages through UDP.
For some reason, I could not get the two ESP modules to connect (I think it was a problem with the board I had), but I sent messages from my computer, and it worked out fine. I will not burden you with all of the code, but here is the GitHub link.
All that needs to happen is they will be on the same WiFi network, and then you can use the ESP8266 WiFi library to send messages between the two. Like I said above, I used UDP, which is good for high speed, with no error checking. But there is also TCP (higher up, has error checking code), or you can use the server/client part of the library to set up a full web server and read/write data to it. Without knowing what type of data, I cannot comment on what would be the best method.
As for headers, you will need WiFi.h, and if you are using UDP you will need WiFiUdp.h
You should not need any external software besides the Arduino IDE.
I taught myself from scratch for this product, using two main resources: the Arduino library reference, and the docs on the ESP8266 Arduino GitHub page

Is it possible to set several advertisements for the same Bluetooth LE device?

To test bluetooth scalability, I want the same device (a Raspberry Pi or a laptop) to emit several BLE advertisements. So far, I have tried using bleno (NodeJS), hcitool and CoreBluetooth for OSX, but I can not setup more than one.
Is this a hardware/system/bluetooth limitation? Has somebody managed to do this?
Different bluetooth devices have different maximum advertising rates. These typically range from 10Hz to 40Hz. Some bluetooth devices have the ability to spoof their MAC address so different advertisements appear to come from different physical devices. This is often important for scalability testing, because some receivers keep track of unique devices by MAC address.
As #Emil says in his answer, it is possible to "interleave" advertisements such that you change the advertisement (and ideally the MAC address) every few hundred milliseconds so it appears by receiving devices that there are multiple advertisers around. I have done this with both Raspberry Pi and iOS transmitters, but in neither case could I alter the MAC address.
It is important to understand, though, that the actual number of packets received when you do this does not change. So while you may be testing scalability of unique advertisements detected, you will not be doing the same thing as testing with multiple physical advertisers.
That's not possible by the Bluetooth specification. However you can start off with one data then set a timer in your app that stops advertising. Then you start off again with the next data. And so on.

Communicate between 2 WinCE devices using USB - how?

We've got two WinCE devices that need to talk to each other, they don't have WiFi or Bluetooth so I think a wired USB connection is our best chance. I've been reading up on using ActiveSync and serial over USB, but all the articles are geared towards talking between a WinCE device to a full Windows box, never between two WinCE devices.
If we can get ActiveSync working, that's fine, the other option is just to open COM ports on both sides and write our own communications protocol.
Given the project timelines, writing any sort of device driver isn't an option, this needs to be something that is built in to WinCE.
We are building WinCE for both devices, so I can make any modifications necessary at that level.
Is there a way to get these two guys talking to each other?
If you can't write your own driver then your fastest route is probably to get a USB to serial converter for both devices and then connect them via serial.
Obviously, you'll need to choose one that has support for Windows Mobile. I think FTDI based adapters should work.
Once that's working you just use the built-in serial API to read and write data.

How can multiple smartphones connect to a mcu at the same time?

I'm having the hardest time to get the solution of the following problem.
Main issue:
Several smartphones(up to 30) must communicate with a MCU at the same time.
System overview:
There are many rooms(each room is a cabinet that 30 people can go into), and every cabinet will have one MCU for the smartphone users.
MCU will control some device of the cabinet.
The scenario of this system is as follows:
1. The users go into the cabinet.
2. Smartphone app will recognize the MCU(or MCU will recognize the smartphone) and the MCU will send some data to the smartphone and this data will be noticed to the user.
3. User inputs some data at the smartphone app and this data will be sent to the MCU to control the cabinet device.
4. Up to 30 people can go into the cabinet at the same time and the system should handle all the users simultaneously.
I'm going to develop smartphone application and MCU firmware for this system.
My thought:
I'm thinking to use Arduino/RFduino/Raspberry Pi as MCU and I'm thinking to use Bluetooth LE/Wifi/3G as communication material.
I've tried the following solutions
1. Using bluetooth low energy on Arduino/RFduino/Raspberry Pi.
MCU will be BLE peripheral and my smartphone app will be BLE central.
But I found that a BLE peripheral can only be connected to a BLE central at the same time so I can't use this method.
2. Using wifi on Raspberry Pi
I think that Raspberry Pi can run web service and my smartphone app can communicate with the server through http.
But every time the smartphone user go into the Raspberry Pi based wifi-zone, the user should select the wifi-hotspot at the network setting if he registered this wifi already, and the user should register the wifi-hotspot if this is the first time at the wifi-zone(cabinet).
This is very inconvenient for the users so can't be used for me.
3. Using 3G network on Raspberry Pi
Unfortunately, there's no 3G signal in the cabinet so I can't use this method.
I'm looking forward your kind answer.
Any hints or comments will be welcome.
Thanks for your attention.
Thanks for your answer in advance.
Toltori Kim
Well... I'd go with wifi. And QR codes.
I'd make either a single wifi network for all the cabinets (so only one set of credentials, or even an open one - without security) and then the app can connect to the raspberries using a sort of authentication (where the credentials are written in a QR code inside the cabinet) or a wifi network for each cabinet and its credentials are written in a QR code.
I'd use the first one, maybe without security. So the user has just to go in the cabinet, connect to the common wifi, make a photo at the qr code and then can use the RPi

Resources