Im trying to develop a ble application, where a peripheral device (a Ti CC2650LP) reads sensor data via UART and writes them to a characteristic. The central device (a Win 10 PC) reads this characteristic via notification and outputs it in a special software.
My problem is: when I use my test pc everything works fine, but when ich use a different pc with my software i always get the same readings. It seems i cant access the characteristic. Everytime i reconnect the peripheral as a bluetooth device, the reading changes, but the software still only shows this one reading. I can see in my software, that the characteristic gets read but the value doesnt change. I'm pretty sure its a connection issue.
Has anyone had this kind of issue before?
Related
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
I am working on Android BLE as a peripheral connected to a custom device that runs Nordic NRF51 as a central. The project requires Android peripheral to connect to two NRF51 central devices.
Android is advertising two different Advertisement UUIDs one for left and other for right Nordic NRF51 devices. Ideally, I would like to have both Nordic Centrals to connect to the Android at the same time.
I have two main issues.
First issue. Android can get both connections fine. The problem occurs when Android sending notification or Android sending reply back as result of Write Request from the central. When both Centrals are connected, often notification nor the send reply works. I confirmed that the Nordic central does not receive the notification nor the reply. Does anyone have experiences in Android as a Peripheral supporting multiple connections at the same time? I have tried two BluetoothGattServer instances (one for each device) as well as one instance of BluetoothGattServer and based on the connected device, I can tell which Central the event if for and handle it correctly. It is sending notification or send reply to Write Request that at times it does not get sent from Android. I am using synchronized methods on the GattServerCallback event handlers.
Second Issue. Due to the first issue, I am now only advertising one UUID at a time. The idea is to switch between two advertising UUIDs, thus have only one connection at time. The problem now is switch advertising. About 1 out 3 times, when I start advertising with first UUID with its name (LFDroid), it appears that it is actually advertising second UUID with its name (RTDroid) briefly (1 or 2 seonds) and then advertises what was requested. Note that second UUID advertising was stopped on previous switching. It almost looks like when I ask to advertise, it starts to advertise with the last advertised UUID and name and then quickly advertises what is requested. This now causes problem because both Nordic Centrals sees the advertisement and connects.
Any suggestions would be appreciated.
I tried looking everywhere to understand how BLE pairing works but unable to find answers. Lets say I have a small device, like a raspberry pi with a BLE dongle. What I'd like to do is to allow BLE pairing and then subsequent communication with a BLE peripheral (such as a BLE temperature sensor) using software only.
My aim is to try and see if I can control the pairing and then getting the temperature, without touching the sensor at all, so that in future, I can just remotely log into the raspberry pi, turn on bluetooth, obtain the temperature reading and then afterwards turn it off again. And in future if I need to obtain the reading again, I'll repeat the process.
So:
Can this "simple" scenario be achieved using some software based control?
If not, then which parts require manual input and then which don't?
The BLE sensor should not be in advertisement mode or broadcasting the information. It should only send the data to paired devices.
Any and all answers appreciated! :-)
Most Bluetooth low energy devices do not require pairing at all so check first that your sensors do have this requirement. If they do then you need to determine which specific pairing procedure is required. Bluetooth defines various ways to authenticate during pairing and these generally relate to the I/O capabilities of the two devices and are called Association Models. In some cases, pairing "just works" (the name of the simplest association model) and no user interaction is required. In others, say if one device has a keyboard but the other has a display and no keyboard, the second device will display a random 6 digit number and the user must key that number into the first device. All of this is defined in the Bluetooth Core specification.
In your case the pairing procedure will be defined for your sesnors in the manufacturer documentation so check there first. Not that you should only have to do this once per device, not every time you want to read the sensor.
Accessing sensor data remotely needs a gateway which I guess is what your Pi will do. The Bluetooth SIG defined a set of RESTFul HTTP APIs for exactly this purpose. See https://www.bluetooth.com/develop-with-bluetooth/white-papers
The SIG also provides a gateway developer resource for Raspberry Pi which you can download including source code which is written in node.js. See https://www.bluetooth.com/develop-with-bluetooth/developer-resources-tools
Good luck
Can anyone help me with the AT command to write characteristic value, Or how to send data from arduino to another ble device using Hm10 module.
The HM10 after sending the AT+START, does advertise packets, and can detect the service and characteristic, But the characteristic value is the default 0x00, How can I change that?
Have checked the data sheet multiple times but can not find an AT command that is capable of doing the same.
UPDATE: Similar problem with setting the HM10 in Central Mode:
Central Mode Setup!
1) AT+ROLE1 - Set up to Central Mode
2) AT+IMME1 - Start from RESET
3) AT+SHOW1 - Show discovered devices
4) AT+DISC? - Discover Devices
Get Device MAC ID,
5) AT+CON[MAC ID]
RESULT: Always gives OK+CONNA and after 10seconds OK+CONNF
I am confused, Use of "AT+START" before "AT+DISC?" causes AT+START to not work and viceversa.
Using AT+START results into a loop of OK+CONN followed by OK+LOST continuously and no more AT commands are accepted. I believe it does result in a
Can you advice on the right order?
Using LightBlue iOS app as the peripheral. How am I to select a service and subscribe to a characteristic to receive data from the application?
Thank You.
There is no AT command to set a characteristic value.
The HM10 is a serial-port emulation device - whatever serial data you send to the HM10 module (aside from the AT commands) is made available on it's BLE characteristic. Unfortunately the data sheet doesn't document the service and characteristics, but this code suggests that the serial RX/TX characteristic is 0000ffe1-0000-1000-8000-00805f9b34fb
So, data written to the serial port should appear as the value of that characteristic. Data written to that characteristic should be delivered out of the TX serial port pin on the HM10 module.
This thread is a bit dated. But the HM-1X firmware now supports changing the characteristics of a module.
"AT+CHAR?" Will get the current characteristic setting for RX/TX
"AT+CHAR0xFFFF" will set the TX/RX characteristics to 0xFFFF
Send: AT+CHAR0xAAA0
Recv: OK+Set:0xAAA0
These features were added v518.
If you need to update your firmware,
Link to Huamao's download site.
I don't have enough reputation to comment on Ladvien's answer, but...
Just a word of warning regarding updating the firmware with a new version from Huamao's download site. http://www.jnhuamao.cn/download_rom_en.asp?id=83
In my experience there were issues with V539, which prevented the firmware operating as an iBeacon - and there may be other problems.
I was fortunately enough to find someone emailed me a copy of the V538 firmware and was able to downgrade again.
Huamao doesn't have old versions of the firmware available for download and AFIK there is no way to backup your current firmware version.
But it was possible to downgrade from V539 back to V538 if you have the bin file for V538 etc. i.e At least up as far as V539 the firmware does allow downgrades and was not checking version numbers to only allow upgrades.
No need to use any AT-commands to send data as it works like transparent serial. Currently it works good to upload sketches from iOS devices to Arduino. Check out http://www.apploader.info
I have a number of Windows 2000 systems that we are trying to use to program the new Arduino Uno and Mega devices. These boards now come with a USB connection, an upgrade from the prior FTDI. I'm not able to download the Arduino code into the board from a Windows 2000 system
The supplied drivers are *.inf files that modify the standard USB driver that comes with Windows (in this case Windows 2000).
I go through the process of setting the port, setting the device and doing the download. The download fails, and the apparent error is that the PC can not communicate with the board. I've checked the port, adjusted the baud rates, etc. I've even moved the port number from a high port number (ie COM12) to a lower port (COM2) without any success. I do see activity on the rec/xmt lights on the Arduino board, so some type of data is being sent and received.
I'm looking for:
Someone who has been able to download files from Windows 2000 to the Arduino
or
A way to shim inside the USB driver to be able to watch the traffic going up and down to the board so I can continue to debug this.
or
Some general tips for things to look at in the .inf file that need to be set/not set to make it work on Windows 2000.
I know the boards work I've used them on a different set of Windows XP systems. So I know to some extent the install is good and that most of what I have works.
Full dumps can be found on the Arduino forum, http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1291090110/.
This is the information produced by the AVRDude program while it's trying to download the code.
this could be a long shot, but I jsut recentlz had problems uploading too. Fist of all, how long is the USB cabele you are uploading from? Mine in one case was too long and th arduino woul lose sync. Secondly, and this might just be a silly oversight (like i did) do you have things wired in the digital pin 0 and 1? These are used for the communication, and if there is anything else plugged in to them the upload will also fail.
As I said, long shot but those were two errors I had.