[GitHub] ccollins476ad commented on issue #480: Allow GATT services to be registered after startup
ccollins476ad commented on issue #480: Allow GATT services to be registered after startup URL: https://github.com/apache/mynewt-core/pull/480#issuecomment-321562680 You're right - that would be better. I will take a look. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] sjanc commented on issue #480: Allow GATT services to be registered after startup
sjanc commented on issue #480: Allow GATT services to be registered after startup URL: https://github.com/apache/mynewt-core/pull/480#issuecomment-321465992 Hi Chris, so I was wondering if we could have ble_gatts_add/remove_service() instead and keep tthose internally on list, not array. Rationale is that now each application has to provide GATT db from 'central' point which make it hard to have library like components registering own services. One example could be BT mesh but this would be useful in general as we could provide sample services as libraries. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] ccollins476ad opened a new pull request #483: BLE Host - Automatic own-addr-type resolution
ccollins476ad opened a new pull request #483: BLE Host - Automatic own-addr-type resolution URL: https://github.com/apache/mynewt-core/pull/483 This commit adds a new function to the NimBLE host API: ``` /** * Determines the best address type to use for automatic address type * resolution. Calculation of the best address type is done as follows: * * if privacy requested: * if we have a random static address: * --> RPA with static random ID * else * --> RPA with public ID * end * else * if we have a random static address: * --> random static address * else * --> public address * end * end * * @param privacy (0/1) Whether to use a private address. * @param out_addr_type On success, the "own addr type" code gets * written here. * * @return 0 if an address type was successfully inferred. * BLE_HS_ENOADDR if the device does not have a * suitable address. * Other BLE host core code on error. */ int ble_hs_id_infer_auto(int privacy, uint8_t *out_addr_type) ``` The motivation for this change is to allow BLE packages to be more self-contained. If a package doesn't care what type of address it uses, it can just use whatever is available. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] ccollins476ad closed pull request #482: BLE Host - Auto own-addr-type values
ccollins476ad closed pull request #482: BLE Host - Auto own-addr-type values URL: https://github.com/apache/mynewt-core/pull/482 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] ccollins476ad commented on issue #480: Allow GATT services to be registered after startup
ccollins476ad commented on issue #480: Allow GATT services to be registered after startup URL: https://github.com/apache/mynewt-core/pull/480#issuecomment-321623437 I may have misunderstood your comment initially. Just to clarify: different packages can register their own services individually. For example, the `net/nimble/host/services/` packages do this. When `ble_gatts_start()` is called, all registered services become available. The sequence might look something like this: * Package 1 registers services A, B, and C. * Package 2 registers service D. * App registers services E and F. * App calls `ble_gatts_start()` At the end of this sequence, all the services (A, B, C, D, E, and F) are supported and available to peers. This is how service registration has always worked in the nimble host. This PR allows the app to perform the above sequence a second time, with a different set of services. The second sequence would look like this: * Call `ble_gatts_reset()` * Register services G and H. * Register services I and J. * Call `ble_gatts_start()` Now, services G, H, I, and J are available to peers. The point I'm trying to make is: not all services need to be registered at the same time in a single array. I am not sure if you thought that was the case. Anyway, when I first read your comment, I thought you were referring to the need to call `ble_gatts_start()` to make all the registered services available. This is somewhat of a burden, because it prevents a package from registering additional services on the fly without cooperation from the application. I did look at eliminating the need for the final call to `ble_gatts_start()`, and I think this would be quite difficult to achieve. The main issue is that the host allocates one CCCD entry per connection per subscribable characteristic. For example, with 4 max connections and 5 subscribable characteristics, the host would allocate 20 entries (4*5). To help keep memory usage to a minimum, the host does not allocate these entries until registration is complete. The call to `ble_gatts_start()` is what tells the host that registration is complete. I probably should have explained the motivation for this PR. The motivation is: blehostd needs to allow the user to register GATT services. The user interfaces with blehostd via JSON messages sent over a unix domain socket. By time the user is able to communicate with blehostd, blehostd has already initialized and started the nimble host. To allow the user to register services, blehostd has to provide the ability to reset its GATT state and accept new service registration calls. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[GitHub] ccollins476ad opened a new pull request #86: newt - Fix handling of private github repos.
ccollins476ad opened a new pull request #86: newt - Fix handling of private github repos. URL: https://github.com/apache/mynewt-newt/pull/86 The current handling of private github repos is broken in a few ways: 1. Only used for retrieval of repository.yml; manual login+password entry required for cloning. 2. Authentication tokens were handled incorrectly. These should be handled just like passwords. This commit provides the following fixes: 1. Use configured login and password for cloning as well as repository.yml retrieval. 2. Remove 'token' configuration item ('password' works for tokens as well). 3. Add 'password_env' configuration item. This specifies the name of an environment variable containing the password for the private repo. This setting is only used if 'password' is empty. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services