GithubHelp home page GithubHelp logo

Comments (11)

floe avatar floe commented on August 27, 2024

Hm, what Arduino are you using? I'm quite certain that this is a timing issue and depends on the speed of the ยตC. On my Arduino Micro, I didn't have any problems with the iPhone, but rather with Android...

from btle.

acalatrava avatar acalatrava commented on August 27, 2024

I'm using Arduino Nano with an Atmega 328P-AU. Also on the Mac won't show at all... Hints?

from btle.

floe avatar floe commented on August 27, 2024

I haven't yet been able to nail this issue down in any way, since it's so random. You might want to try different delays a) between the 3 consecutive advertisement packets and b) between each block of 3 packets. I think the default values I've put into the example are consistent with the BTLE spec, but apparently there's some other factor at work here...

from btle.

acalatrava avatar acalatrava commented on August 27, 2024

I've been trying A LOT of combinations. I also read the BTLE spec and it shouldn't be so random. According to the specs you should send an advertising packet and hop to the next channel in less than 10ms. I measured how long it takes to send 3 advertising packets (one on each channel) and it takes 5ms. Also you should send every advertising event every n*0.625 ms with a max of 10.24s and a min of 100ms. There is also a random delay between advertising events between 0ms and 10ms. So I don't understand why this is so random! It doesn't make sense...

from btle.

floe avatar floe commented on August 27, 2024

OK, at least this means that we both interpreted the spec in the same way :-) Do you have an Android phone at hand? You could briefly check if advertisements are visible there...

from btle.

acalatrava avatar acalatrava commented on August 27, 2024

Unfortunately the only Android device I have is a Samsung Galaxy SII which don't have btle...
Another thing I spotted is that every time it appears it will show a different UUID, why is that? Did you notice it?

from btle.

acalatrava avatar acalatrava commented on August 27, 2024

I just tried with an Arduino UNO and the result is the same... I even tried with a different nRF24L01+ just in case and added a capacitor on the 3v3 line to reduce noise: same result. I don't understand why this is working for you... Which Arduino are you using?

from btle.

floe avatar floe commented on August 27, 2024

I've been using an Arduino Micro, with which the broadcasts were visible on an iPhone, but not on Android unless I played around with delays.

from btle.

acalatrava avatar acalatrava commented on August 27, 2024

Still digging into it ;) I started to listen for incoming advertisements from my iPhone and check what is the difference. I don't understand why but this is 3 sample packets I received:

40 9 94 9E F9 AF BF 67 2 1 1A 68 52 4D 38 B6 9A B2 90 8B 17 21 12 F8 38 FB 79 3B 2A 6E 5A 8A
40 9 94 9E F9 AF BF 67 2 1 1A 68 52 4D 1E 9D BB 32 55 2B 71 BC CE 87 7 EB 3B 1F 63 6E 5A 30
40 9 94 9E F9 AF BF 67 2 1 1A 68 52 4D 9E DD 14 CD FD 6F E6 90 4F 28 53 2F E8 5A C2 18 9D 4B

HEADER:
0x40 = PDU Type
0x09 = Length
0x949EF9AFBF67 = MAC

PAYLOAD:
0x02 = Payload Chunk Size
0x01 = Device Flags
0x1A = LE General Discoverable Mode + Simultaneous LE and BR/ERD

CRC:
0x68524D

Total length to here: 9 bytes (6 MAC + 3 PAYLOAD)

So, what the heck is the rest of the packets?

from btle.

floe avatar floe commented on August 27, 2024

The leftover bytes are actually easy to explain - they are just noise, as the nRF24L01+ is operating in "raw" mode and after it has received a suitable preamble, it just continues receiving until the 32 byte FIFO is full.

from btle.

floe avatar floe commented on August 27, 2024

Seems to be answered in #3 - de-tuned modules may be the culprit.

from btle.

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.