GithubHelp home page GithubHelp logo

Comments (9)

taks avatar taks commented on August 23, 2024 2

I will answer as I understand it. Sorry if I am wrong.

The maximum size of an advertised packet is 31 bytes. (This is defined in BLE_HS_ADV_MAX_SZ).
UUID128 is 16 bytes, so if you put two values in the packet, it will exceed 31 bytes, resulting in an error.
If multiple UUIDs are used, UUID16 or UUID32 must be used.

from esp32-nimble.

taks avatar taks commented on August 23, 2024 2

I did some additional research.
It appears that Advertising Extensions can be used to increase the amount of data.
reference: apache/mynewt-core#1027
(The current implementation does not implement this feature.)

from esp32-nimble.

LarryMerino avatar LarryMerino commented on August 23, 2024

Thanks @taks. It make sense for me.
Do you know how can I override this variable at compile time or is mandatory to follow this restriction?
Thank you very much again and sorry for my ignorance.
regards

from esp32-nimble.

taks avatar taks commented on August 23, 2024

This restriction is determined by the BLE specification.
Therefore, even if you rewrite this variable, it seems that it will not work properly.

from esp32-nimble.

LarryMerino avatar LarryMerino commented on August 23, 2024

Got it, thank you very much.

from esp32-nimble.

ChocolateLoverRaj avatar ChocolateLoverRaj commented on August 23, 2024

It would be nice to have an example with advertising extensions

from esp32-nimble.

thedevleon avatar thedevleon commented on August 23, 2024

Is there any support for extended advertising yet?
Seems it's supported with CONFIG_BT_NIMBLE_EXT_ADV=y, but the sample no longer compiles and some function signatures seem to be changed, so a sample would indeed be nice.

error[E0061]: this method takes 1 argument but 0 arguments were supplied
   --> src/main.rs:59:38
    |
59  |         ble_device.get_advertising().start().unwrap();
    |                                      ^^^^^-- an argument of type `u8` is missing
    |
note: method defined here
   --> /home/leon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp32-nimble-0.5.1/src/server/ble_ext_advertising.rs:298:10
    |
298 |   pub fn start(&mut self, inst_id: u8) -> Result<(), BLEReturnCode> {
    |          ^^^^^
help: provide the argument
    |
59  |         ble_device.get_advertising().start(/* u8 */).unwrap();
    |                                           ~~~~~~~~~~

error[E0599]: no method named `name` found for mutable reference `&mut BLEExtAdvertising` in the current scope
  --> src/main.rs:89:10
   |
88 | /     ble_advertising
89 | |         .name(&device_name.as_str())
   | |         -^^^^ method not found in `&mut BLEExtAdvertising`
   | |_________|
   | 

error[E0061]: this method takes 1 argument but 0 arguments were supplied
   --> src/main.rs:94:21
    |
94  |     ble_advertising.start().unwrap();
    |                     ^^^^^-- an argument of type `u8` is missing
    |
note: method defined here
   --> /home/leon/.cargo/registry/src/index.crates.io-6f17d22bba15001f/esp32-nimble-0.5.1/src/server/ble_ext_advertising.rs:298:10
    |
298 |   pub fn start(&mut self, inst_id: u8) -> Result<(), BLEReturnCode> {
    |          ^^^^^
help: provide the argument
    |
94  |     ble_advertising.start(/* u8 */).unwrap();
    |                          ~~~~~~~~~~

Some errors have detailed explanations: E0061, E0599.
For more information about an error, try `rustc --explain E0061`.
error: could not compile `offline-unlock` (bin "offline-unlock") due to 3 previous errors

from esp32-nimble.

taks avatar taks commented on August 23, 2024

Please refer to examples/ble5_multi_advertiser.rs.

※ I'm sorry, but extended advertising has not been tested much.

from esp32-nimble.

thedevleon avatar thedevleon commented on August 23, 2024

Please refer to examples/ble5_multi_advertiser.rs.

※ I'm sorry, but extended advertising has not been tested much.

Thanks, must have missed this sample somehow. Will give it a try.

from esp32-nimble.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.