skimpy documentation

Some missing info in the documentation.

  • maximum advertising interval
  • argument type for setLocalName (appears to be a C string)

Also I am noting that there are interactions between various settings, and these are not documented.
For instance, it seems like setting connectable while already advertising will have no effect. It seems that way. It can be hard to tell. I am testing with nRF Connect, and it doesn't always instantaneously update.

I think someone who really knows the behaviours needs to detail these in the docs. Otherwise its just a pain for everyone to have to figure it out, searching forums and so on.

Just to make things clear for other forum members, I believe @dustystew is referring to this documentation:

@dustystew the people who have the necessary access to act on your suggestions are not likely to see this post. The best way for you to make suggestions for improvements to the content of the Arduino library reference pages is via the contact form:
https://www.arduino.cc/en/contact-us

The more specific you can be in your suggestions, the better. URLs of the pages in question are helpful. I will often try to provide the exact text that I am suggesting replace the existing content so my proposal is very clear.

But this isn't to say that it's a bad idea to post proposals for ocumentation improvements to the forum as well. Even if the documentation authors don't see it, the Arduino community may give you valuable feedback on your proposal.

Perhaps if we were to collect up some ideas here, then they could be submitted together.

I am working out the details by reverse engineering. OK really its trial and error. I'm happy to share the results.

One other detail I would add to the list:

the comment for setting advertising interval is

// 200 * 0.625 ms

and it should be

// 200 / 0.625

dustystew:
I think someone who really knows the behaviours needs to detail these in the docs. Otherwise its just a pain for everyone to have to figure it out, searching forums and so on.

While I love documentation and datasheets. With open source software the ultimate reference is the source code. Maybe this is something where you/we need a better IDE.

Your example in reply #2 is prove that even source code comments should be avoided as much as possible.

I have pretty much given up on reading source code at github. I think this is because coding style is such a wild variable.

I just had nRF Connect on my iPhone BOMB. Say what? I've never seen an iPhone app bomb! Debugging with buggy software...such a joy.

Though I did just look at the header file which had function prototypes and that was helpful. :slight_smile:

BLE.setLocalName(const char *name)

  1. If advertising is enabled, setting the name will not take effect until advertising is turned off and back on again.
  2. The name argument must be a constant C string. This can be a string literal eg "my name" or a static char array.

(admittedly some work will be required on how these ideas are expressed, I am just stating the facts that should be present in the docs for the method)

The method could be improved by creating a static char array in the BLE class, then copying in the characters from the string argument. If this were done, the argument could be any char pointer.

Another version of the method that takes the String class as an argument would also help make things easier.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.