lancaster-university / microbit-dal

http://lancaster-university.github.io/microbit-docs
Other
256 stars 130 forks source link

Update CHANGELOG for v2.1.1 #410

Closed microbit-sam closed 5 years ago

microbit-sam commented 5 years ago

Version 2.1.1 (23/11/19 sam@microbit.org)

pelikhan commented 5 years ago

So is the presence of the partial service an indicator that we are in pairing mode?

Get Outlook for iOShttps://aka.ms/o0ukef


From: Sam Kent notifications@github.com Sent: Wednesday, December 5, 2018 7:26 AM To: lancaster-university/microbit-dal Cc: Subscribed Subject: [lancaster-university/microbit-dal] Update CHANGELOG for v2.1.1 (#410)

Version 2.1.1 (23/11/19 sam@microbit.orgmailto:sam@microbit.org)


You can view, comment on, or merge this pull request online at:

https://github.com/lancaster-university/microbit-dal/pull/410https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flancaster-university%2Fmicrobit-dal%2Fpull%2F410&data=02%7C01%7Cjhalleux%40microsoft.com%7C977c0204b862413cfb5c08d65ac5f6e9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796203631638530&sdata=0mHaIZYItzDSQ44TOLFmhHlQy6DmSSs1IX87Y90aSSw%3D&reserved=0

Commit Summary

File Changes

Patch Links:

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flancaster-university%2Fmicrobit-dal%2Fpull%2F410&data=02%7C01%7Cjhalleux%40microsoft.com%7C977c0204b862413cfb5c08d65ac5f6e9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796203631668555&sdata=VBTHF868f6WhvngTdAyq55YhP%2Fa0zoH320U1Q%2BrSsRU%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAD-4KXsZ-JjyDLYSr7ARrBo49ItoBddxks5u1-WIgaJpZM4ZC9Sp&data=02%7C01%7Cjhalleux%40microsoft.com%7C977c0204b862413cfb5c08d65ac5f6e9%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796203631668555&sdata=NUJeHnFeURKWQkvkcMVm6JDmTDw4rFH3cFrDqmPmg9A%3D&reserved=0.

microbit-sam commented 5 years ago

For MakeCode yes, but C++ builds don't include it in application or pairing mode

For a standard (I think) C++ config.json the micro:bit has DFU, Event, and Device Information Service in both application and pairing so I'm not sure it will be possible to determine mode by looking at services

martinwork commented 5 years ago

Isn't the PF service present for both modes in a makecode hex with the BLE extension?

pelikhan commented 5 years ago

my plan is to disable DFU/PF in application mode.

martinwork commented 5 years ago

But it's currently present in both modes, isn't it? Do you mean to replace the application mode DFU/PF services with a slimmer capability to reboot to pairing mode or always require a manual A+B+Reset for flashing?

pelikhan commented 5 years ago

Yes. We have to go in pairing mode for PF always so we might as well make it the same for DFU.

Get Outlook for iOShttps://aka.ms/o0ukef


From: Martin Williams notifications@github.com Sent: Wednesday, December 5, 2018 9:42 AM To: lancaster-university/microbit-dal Cc: Peli de Halleux; Comment Subject: Re: [lancaster-university/microbit-dal] Update CHANGELOG for v2.1.1 (#410)

But it's currently present in both modes, isn't it? Do you mean to replace the application mode DFU/PF services with a slimmer capability to reboot to pairing mode or always require a manual A+B+Reset for flashing?

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Flancaster-university%2Fmicrobit-dal%2Fpull%2F410%23issuecomment-444576001&data=02%7C01%7Cjhalleux%40microsoft.com%7C9562556a0cc74cb7960708d65ad90217%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796285419654667&sdata=8sn3pzRDwPrxbbzHSHtzNo36JOjaN2PxIims4XOC2Dg%3D&reserved=0, or mute the threadhttps://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAD-4KSyet9d9FrNs2PeQuXIoPVBKivLQks5u2AV8gaJpZM4ZC9Sp&data=02%7C01%7Cjhalleux%40microsoft.com%7C9562556a0cc74cb7960708d65ad90217%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636796285419654667&sdata=8urxjbCuqq2UxIDZAQhzZ3YlaKCMjEjuKTVcFo0CZ7M%3D&reserved=0.

martinwork commented 5 years ago

I'm not sure which of the 2 alternatives you are saying "yes" to. PF service has the facility to reboot to pairing mode, so the user doesn't always have to A+B+Reset to flash.

pelikhan commented 5 years ago

Aaargh. That's right, the PF needs to be in there. This is a total mess.

microbit-sam commented 5 years ago

Currently yes, but the ble-dal-integration branch implements restarting to pairing mode as a MicroBitEvent. #409 As the Event Service is available in application/pairing MakeCode builds this will hopefully replace the command found in the Partial Flashing Service. Does this sound right to you?

I'm heading up to Lancaster on Friday 14th to discuss Bluetooth with Joe, so hopefully we can merge into master before Christmas

martinwork commented 5 years ago

Using a reboot command in the event service is one possibility. The event service is not the leanest in terms of RAM and GATT table usage, so whether it's a good idea to rely on it for the reboot command depends on how commonly the event service is actually used for other purposes, given that you need to write a client application to use it. I thought there was a plan which involved making the event service optional. It has been compulsory for what might now be historical reasons.

With the existing implementation of DFU, most of it's RAM usage would not be saved by avoiding starting the DFU service in application mode - at least according to my tests, which could be rubbish of course! That's why adding the reboot command to the DFU service could be the best option. See https://github.com/lancaster-university/microbit-dal/issues/390#issuecomment-427933845 and the next few comments.

If rethinking this and making breaking changes, combining some services might be another possibility.

If the DAL was changed to avoid starting the PF service in application mode, with the reboot functionality in the event service or elsewhere, the presence of the PF service would mean either you're in pairing mode or it's a hex built with the previous version of the DAL, so you would still need to ask the PF service what the mode is.

To be most generally useful, a pairing mode indication needs to be in the advertising info, so you don't have to connect to find out and so it doesn't depend on what services have been started.

microbit-sam commented 5 years ago

I'm going to merge the updated CHANGELOG and will transfer the BLE discussion to the BLE eats too much RAM thread