Skip to content

Conversation

@asharov
Copy link
Contributor

@asharov asharov commented Oct 6, 2016

Per issue #86, implementation as discussed there.

Copy link
Owner

@sandeepmistry sandeepmistry left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@asharov so far the changes look great, thanks for submitting!

I think we can re-use the structure you created for scan response as well. Let me know your thoughts.

unsigned char type;
unsigned char data[BLE_ADVERTISEMENT_DATA_MAX_VALUE_LENGTH];
};

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this!

What do you think about renaming it to BLEEirData or something else, and also using it for the scan response arguments?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure, that sounds like a good idea. I can add it to the PR.

unsigned char scanDataLength = 0;

unsigned char advertisementData[BLE_ADVERTISEMENT_DATA_MAX_VALUE_LENGTH];
BLEAdvertisementData advertisementData[3];
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, this will using about 42 more bytes of RAM on nRF8001 boards, which I think is ok. Not sure if there's a way to reduce it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can only think of having the size of this array in DeviceLimits so it could be different for different boards, setting it to 1 on nRF8001, but I wouldn't know what it should be on nRF51822.

@sandeepmistry sandeepmistry merged commit 5dd2e6b into sandeepmistry:master Oct 16, 2016
sandeepmistry added a commit that referenced this pull request Oct 16, 2016
Allow advertisement to contain multiple types of data
@sandeepmistry
Copy link
Owner

@asharov thanks for the contribution, awesome work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants