BLEServer | A GUI tool to explore nearby BLE devices | Networking library
kandi X-RAY | BLEServer Summary
kandi X-RAY | BLEServer Summary
A GUI tool to explore nearby BLE devices
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of BLEServer
BLEServer Key Features
BLEServer Examples and Code Snippets
Community Discussions
Trending Discussions on BLEServer
QUESTION
I'm trying to send data from my android app to an esp32 over bluetooth (BLE) but i can't find the proper way to do it. All i can do for now is scan and find ble devices. My arduino code is working as i want (it receives the data properly) because i used another app which let me send data to ble devices so i know the arduino code is fine.
I've been searching for days here and google how to achieve it but i still stucked in it. This is my code for now:
Scanner:
...ANSWER
Answered 2021-May-31 at 09:00In order to get this working, I would do the following if I was you:-
Part A: Get this working with an existing Android app (e.g. nRF Connect - maybe you've already done this part)
- Download and install nRF Connect app from the play store.
- Launch nRF Connect app and scan for devices.
- Connect to your ESP32 if it was found.
- Browse the GATT table and find the UUID and handle of the characteristic that controls the ESP32. This is important as it will be used in Part B.
- Once found, try to write the values 0, 1, 2, 3, and 4 to this characteristic and ensure that everything is working.
If there are parts above that are new to you, please have a look at the links below. If you've already successfully done all of the above, then move to Part B:-
- nRF Connect For Mobile - Get Started
- Bluetooth Low Energy Characteristics - A Beginner's Guide
- Introduction to BLE - GATT
Part B: Get this working using your Android app:-
- Similar to the nRF Connect app, your app needs to scan and connect to the ESP32. You can find examples on how to do this here.
- Once you are connected, you need to browse the GATT Table and find the right characteristic. You can find examples for this here.
- Once you find the right characteristic and its handle (this is the one you noted in step 4 above), proceed to write values to this characteristic. You can find examples here, here and here.
If all of this is in place and it is still not working, here are things to check:-
- Are you waiting for the GATT write completion callback? Also check this.
- Are you using the right Android write operation?
- Are you maybe using reliable writes instead of normal write?
- Are you sending integer data instead of string data? The app expects integer data in order to work properly.
You can find examples and explanations about the steps above in the links below:-
QUESTION
I am trying to code a BLE device and send SSID & password from a phone to the device.
But I have been checking this code for a while but I cannot find where the error is. I used Arduino IDE and VCode to check brackets but still, I cannot find them. Can somebody help me?
It is showing me that a bracket is missing.
No matter what I do, it happens every time.
...ANSWER
Answered 2021-Jan-19 at 14:18You miss a closing parenthesis in this line of code:
QUESTION
I want that the measurement interval and MQTT server settings can be changed from cellphone by BLE. I use LightBlue as a mobile application.
Here is my BLE code that works well with my mobile application
...ANSWER
Answered 2021-Jan-12 at 11:30You need to declare your variable interval as global variable to access it from everywhere in your file. A global variable can be declared outside of functions.
The value you receive is of type std::string and you want to use it as long. You can use toInt() to convert the variable from String to Long.
Try something like this:
QUESTION
I am working on a project involving 2 ESP32 Wemos D1 Mini boards. I am using the BLE feature to transmit a sensor reading from the "server" to the "client". I use a Characteristic Notify to the client which receives the sensor reading. If I want to implement deep sleep functionality to the server, what would happen to the client? Does the client also have to reset at some point? Also, is it advisable to use Characteristic.Notify in a deep sleep scenario?
Thanks.
Server code:
...ANSWER
Answered 2020-May-15 at 06:24Please see answers to your questions below:-
If I want to implement deep sleep functionality to the server, what would happen to the client? Does the client also have to reset at some point?
No the client does not have to reset, but you may have to reconnect to the server because in deep sleep the BLE connection is lost. If you want the connection to be established automatically as soon as the server wakes up, then you have to update the client code so that it continuously attempts to reconnect to the server. This way, as soon as the server wakes up, the client would connect to it and continue receiving notifications.
Also, is it advisable to use Characteristic.Notify in a deep sleep scenario?
In deep sleep the CPU will be off, therefore you will not be able to send notifications in this state. In this mode you will only be able to wake up the CPU through a timer or an external peripheral (e.g. touch pins). Please see the link below for more information:-
- https://lastminuteengineers.com/esp32-deep-sleep-wakeup-sources/
- https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/system/sleep_modes.html
- https://randomnerdtutorials.com/esp32-deep-sleep-arduino-ide-wake-up-sources/
I hope this helps.
QUESTION
I am attempting to parse a JSON string coming into the Arduino from my phone. I am fairly new to C++ and these libraries so I am having some issues. Below is the code I have so far. Everything works except for the part where I am trying to set json[] to the value coming from the phone. It is a valid JSON and is returned to the console shown below.
Error: initializer fails to determine size of 'json'
JSON Received from phone:
...ANSWER
Answered 2020-Mar-01 at 04:19According to the documentation of desrializeJson(), the second input argument accepts char*
with zero-copy; and, const char*
or const std::string&
with duplication.
Prototypes in the documentation (only the relevant ones):
QUESTION
I'm trying to advertise a Qt Bluetooth class in peripheral mode using the code given in this example directly from the Qt Documentation Page.
I'm using Linux(Kubuntu 18.0.1) with C++ code. My Qt version is 5.7
with bluez version 5.48-0ubuntu3.1
My code looks like this the following:
bleHololenseServer.h:
...ANSWER
Answered 2018-Oct-26 at 09:51Try not to use QScopedPointer.
This code works like a charm for me:
class header:QUESTION
I'm coding Bluetooth on an ESP32 using Arduino IDE. Having a little trouble with const_cast const char *. Reading the paired device value has a '\n' line feed that I want to remove. So I cast it an editable char * then convert it back to a const char *, but somehow it isn't the same value.
...ANSWER
Answered 2018-Nov-05 at 13:29I guess the cast from const char *
to char*
is not related to your problem. But rather a workaround to make _name content modifiable at all.
Try to remove and trim off all non-printable characters and spaces:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install BLEServer
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page