Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

URIBeacon2Service.h missing TX Power Mode #8

Closed
schilit opened this issue Nov 29, 2014 · 2 comments
Closed

URIBeacon2Service.h missing TX Power Mode #8

schilit opened this issue Nov 29, 2014 · 2 comments
Assignees

Comments

@schilit
Copy link
Contributor

schilit commented Nov 29, 2014

Hi @rgrover

BLE_API / services / URIBeacon2Service.h is missing Characteristic TX Power Mode

This characteristic provides an abstraction. Ideally TX_POWER_MODE_LOWEST should equate to the nRF51822 whisper mode if running on an nRF51822, and lowest mode otherwise.

@rgrover rgrover self-assigned this Nov 30, 2014
@rgrover
Copy link
Contributor

rgrover commented Dec 1, 2014

This has now been fixed. Please verify and close.

@schilit
Copy link
Contributor Author

schilit commented Dec 1, 2014

You need to validate the value is in range (0..3) before doing this copy:
txPowerMode = *reinterpret_cast<const TXPowerModes_t *>(params->data);
Otherwise you will allow unchecked array references.

jacobrosenthal pushed a commit to jacobrosenthal/ble that referenced this issue Dec 24, 2017
The kCBMsgArgData field returned might have different data types.
Not sure yet this is due to the conversion in the xpc package or cgo though.

   args: map[
           kCBMsgArgDescriptorHandle:4
           kCBMsgArgData:[0 0]
           kCBMsgArgDeviceUUID:d7de53f5a9824c3d80449c28a9543be8
           kCBMsgArgResult:0
   ]

   args: map[
           kCBMsgArgDeviceUUID:d7de53f5a9824c3d80449c28a9543be8
           kCBMsgArgData:Img Identify
           kCBMsgArgDescriptorHandle:5
           kCBMsgArgResult:0
   ]

fix issue ARMmbed#8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants