Comments (7)
Thanks! I’ll add this shortly.
from nimble-arduino.
Thanks to you! :P
from nimble-arduino.
Just a quick note on this, you can create a std::string beginning with \0, it just needs to be done by specifying the length.
std::string dataStr((char*)data, length);
pAdvData->addData(dataStr);
from nimble-arduino.
I have tried but it doesn't work.
Before calling addData the string size is correctly; inside the adData the size of the string is truncated at \0 position.
I think that happen because passing the string to the function call the copy of the object ad that cause the issue.
The correct way must be use the variable as std::basic_string<unsigned char/uint8_t>
from nimble-arduino.
That's odd, I can't reproduce that here. If I use the url beacon example with a http://www. address and change the eddyStoneData construction to std::string eddyStoneData(ret_data, ret_data[7]+8);
it works just fine.
I'll still add this anyway so a std::string doesn't need to be used.
from nimble-arduino.
Sorry for the delay, I pushed this patch just now in commit 3976074.
from nimble-arduino.
resolved
from nimble-arduino.
Related Issues (20)
- Rapid and Repeated: E NimBLEClient: Connection failed; status=574 Connection Failed to be Established HOT 2
- How to obtain client from existing server connection? HOT 3
- How to get current PHY mode HOT 4
- Name clash of `const char *TAG` with Arduino core macro `TAG`. HOT 5
- ESP32-S3 Extended Advertising: Capturing Packets HOT 4
- Error compile Arduino BLE 5 example for ESP32 HOT 5
- API change - feature test macro missing HOT 2
- Error in converting EddystoneTLM negative temperatures to float HOT 4
- ESP32-S3 crash with arduino-esp32 core 3.x.x HOT 28
- The future of this repo... new ESP MCU's cannot be supported. HOT 3
- NimBLE-Arduino crashes with esp32 version 3.0.1. and a LilyGo T-display S3 HOT 4
- NimBLE-Arduino debug exception when trying to initialize BLE functions HOT 3
- Crash with 'Arduino Nano ESP32' on core ESP32 3.0.1 with NimbleV1.4.2 HOT 2
- BLE SERVICE and WiFi.scanNetworks not wokring simulteneously HOT 3
- GAP server event to get client rssi HOT 2
- increasing heap consumption over time HOT 12
- NimBLE-Arduino 1.4.2: problem with device name? HOT 1
- How to pass correct hid device name HOT 8
- esp_bt.h: No such file or directory HOT 3
- Cannot set TX power to +8dbm for nRF52840 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nimble-arduino.