Skip to content

ble: update ODIN drivers to v3.5.0 RC1 #8452

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

Merged
merged 3 commits into from
Oct 27, 2018

Conversation

aqib-ublox
Copy link
Contributor

@aqib-ublox aqib-ublox commented Oct 17, 2018

Description

This Pull Request contains following feature:

  • BLE Cordio Stack Ported for ODIN_W2
  • ODIN drivers are update for BLE cordio

Test Results

The following tests have been performed

arm_mbed_os_logs.txt
iar_mbed-os_log.txt
gcc_mbed-os_log.txt
iar_ble_logs.txt
arm_ble_logs.txt
gcc_ble_test_logs.txt

Pull request type

[ ] Fix
[ ] Refactor
[x] Target update
[ ] Functionality change
[ ] Docs update
[ ] Test update
[ ] Breaking change

@paul-szczepanek-arm
Copy link
Member

The failed ble example build error seen in the logs has now been fixed.

We are also currently running the commissioning demo with this new driver.

@cmonr cmonr requested review from a team October 17, 2018 13:53
@aqib-ublox
Copy link
Contributor Author

aqib-ublox commented Oct 17, 2018

@paul-szczepanek-arm you are talking about BLE_GAP example right?

@cmonr
Copy link
Contributor

cmonr commented Oct 17, 2018

@aqib-ublox There are errors in the greentea logs?

@cmonr cmonr requested a review from a team October 17, 2018 13:54
@cmonr
Copy link
Contributor

cmonr commented Oct 17, 2018

@ARMmbed/team-st-mcd Could y'all take a quick look at the target changes?

@aqib-ublox
Copy link
Contributor Author

@cmonr can u point out which logs particularly by name?

@paul-szczepanek-arm
Copy link
Member

@paul-szczepanek-arm you are talking about BLE_GAP example right?

yes

@aqib-ublox
Copy link
Contributor Author

aqib-ublox commented Oct 17, 2018

@paul-szczepanek-arm Yes after your recent commit few minutes ago ARMmbed/mbed-os-example-ble@68afa73 now I am getting BLE_GAP test also building. Thanks @paul-szczepanek-arm

@cmonr
Copy link
Contributor

cmonr commented Oct 17, 2018

Only took a quick look at the following:

  • arm_mbed_os_logs.txt
  • iar_mbed-os_log.txt
  • gcc_mbed-os_log.txt

Scrolled all the way down, each file had at least one error.

@aqib-ublox
Copy link
Contributor Author

@paul-szczepanek-arm GAP example working fine

arm_ble_GAP_log.txt
gcc_ble_GAP_test_log.txt
iar_ble_GAP_log.txt

this support your verdict. Thanks

The failed ble example build error seen in the logs has now been fixed.

We are also currently running the commissioning demo with this new driver.

@aqib-ublox
Copy link
Contributor Author

aqib-ublox commented Oct 17, 2018

@cmonr yeah but these errors is not specific to hardware like threads, mail or hci_transport etc. Am i right?

@aqib-ublox
Copy link
Contributor Author

aqib-ublox commented Oct 17, 2018

@cmonr gcc_mbed-os_log.txt updated now all files having single ERROR in hci_test recently commited by ARM against cordio.

@cmonr
Copy link
Contributor

cmonr commented Oct 17, 2018

@aqib-ublox Thanks for the update.

@cmonr
Copy link
Contributor

cmonr commented Oct 17, 2018

@aqib-ublox Thanks for the update.

From what I can tell, there are still the following issue with the logs:

  • All three compilers timeout when testing _mbed-os-features-feature_ble-targets-target_cordio-tests-cordio_hci-transport+
  • All of the GCC mbed-os-tests-ble_test_case-* tests failed to sync with the target device.
  • IAR and ARM compilers appear to be having troubles with mbed-os-tests-mbed_hal-sleep and mbed-os-tests-network-wifi tests.
  • ARM is additionally having issues with mbed-os-tests-mbedmicro-rtos-mbed-heap_and_stack.

Would it be possible to rerun the tests with -vv to get more debug information?

#define ODIN_CORDIO_INTF_H

#include <stdio.h>
#include "mbed.h"
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you include here files that are needed rather than mbed.h ?


/* if event is a command complete event */
if (*pMsg == HCI_CMD_CMPL_EVT)
{
Copy link
Contributor

Choose a reason for hiding this comment

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

should this file follow our coding style?

Copy link
Contributor Author

@aqib-ublox aqib-ublox Oct 18, 2018

Choose a reason for hiding this comment

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

@0xc0170 u r talking about putting baces on same line like:
if( xx ) {

}

I have tried following standard for var and functions naming etc. let me give second look to it .

@aqib-ublox
Copy link
Contributor Author

@cmonr

IAR and ARM compilers appear to be having troubles with mbed-os-tests-mbed_hal-sleep and mbed-os-tests-network-wifi tests.

ARM logs dont havé any issue with wifi test they are passing on ARM toolchain.

  • arm_mbed-os-wifi_log.txt (Passing)
  • yes with IAR it's failing even last time(but let me see what we can done with this right now)

Please see log of mbed-os-tests-mbed_hal-sleep test for ARM and IAR toolchain.(they are passing)

All of the GCC mbed-os-tests-ble_test_case-* tests failed to sync with the target device.

mbed-os-tests-ble_test_case* are nothing but ARM BLE examples which are not made on green tea (ht-runner) framework, I added them for myself to generate binary in single compile command, this has nothing to do with mbed provided test sorry for incovenience. (Actually it needs to be ignore Right?)

ARM is additionally having issues with mbed-os-tests-mbedmicro-rtos-mbed-heap_and_stack

they are also passing for ARM toolchain please see log.
arm_mbedmicro-rtos-mbed-heap_and_stack_log.txt

All three compilers timeout when testing _mbed-os-features-feature_ble-targets-target_cordio-tests-cordio_hci-transport+

I have increased this test time but still timeout let me re-evaluate it. (let me run it again with verbose on)

I have run all above test with this branch after recompiling and clearing previous build folder

@adustm
Copy link
Member

adustm commented Oct 18, 2018

Dear @cmonr

@ARMmbed/team-st-mcd Could y'all take a quick look at the target changes?

I don't see any ST impacted file, this are only ublox and ble files.
Could you remove st team from the review, please ?

Kind regards

@aqib-ublox
Copy link
Contributor Author

@0xc0170 commit compliant with ARM coding standard is committed, I have delpoy changes bare-minimum according to standard adopted in ARM own cordio Class.

@aqib-ublox
Copy link
Contributor Author

aqib-ublox commented Oct 18, 2018

@cmonr

All three compilers timeout when testing _mbed-os-features-feature_ble-targets-target_cordio-tests-cordio_hci-transport+

I have increased this test time but still timeout let me re-evaluate it. (let me run it again with verbose on)

Now it start passing just increase a time form 15 to 30 and it is running fine. please see logs
iar_hci_tansport_log.txt
arm_hci_transport_log.txt
gcc_mbed_hci_transport_test_log.txt

@cmonr
Copy link
Contributor

cmonr commented Oct 18, 2018

@adustm Sure thing.
Was thinking that these modifications qualified as ST changes, but is this not the case because they're module-specific changes?
https://github.com/ARMmbed/mbed-os/pull/8452/files#diff-cad0349ce5f1e4e72982c02516e9b19f
https://github.com/ARMmbed/mbed-os/pull/8452/files#diff-a51b67b98ca84f5e451e6f0ef5a7ba48

@cmonr cmonr removed the request for review from a team October 18, 2018 15:31
@cmonr cmonr dismissed 0xc0170’s stale review October 18, 2018 15:32

Comments addressed.

@aqib-ublox
Copy link
Contributor Author

@0xc0170 ok let me add commit right now and when changes finalized would reset commit history ,rebase and combine all changes with single commit and push, is it fine too?

@cmonr
Copy link
Contributor

cmonr commented Oct 23, 2018

@paul-szczepanek-arm @0xc0170 Any more thoughts? Would anyone else from @ARMmbed/team-ublox like to review?


void ble::vendor::odin_w2::HCIDriver::do_terminate()
{
// TODO: ASRI

Choose a reason for hiding this comment

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

left over todo, implement or remove and track in jira

Copy link
Contributor Author

Choose a reason for hiding this comment

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

that's oudated it is removed in latest commit

Copy link
Contributor Author

Choose a reason for hiding this comment

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

actually we have not found any method in Cordio Transport driver which should update HCI baudrate at run time if needed, it assumes baudrate being set at initialization never changes so it was just done in that perspective e.g if we really need to change baudrate first we would terminate current session of HCI and then update baudrate and re-open it but it is not required so I removed TODO in last commit, hope it have clear idea?

shutdown = 0; // BT Power is OFF
wait_ms(20);
shutdown = 1; // BT Power is ON
wait_ms(500);

Choose a reason for hiding this comment

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

why such a long wait?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is according to requirement of device power cycle

Copy link
Contributor Author

Choose a reason for hiding this comment

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

But i thing BLE power up time is quite satisfactory now, isn't it?

@0xc0170 0xc0170 changed the title Update ODIN drivers to v3.5.0 RC1 ble: update ODIN drivers to v3.5.0 RC1 Oct 24, 2018
@0xc0170
Copy link
Contributor

0xc0170 commented Oct 24, 2018

Waiting for @ARMmbed/mbed-os-pan approval

@paul-szczepanek-arm
Copy link
Member

do you need this to go in today or is tomorrow morning OK?

@paul-szczepanek-arm
Copy link
Member

paul-szczepanek-arm commented Oct 25, 2018

please ignore, that was a problem with my setup

@paul-szczepanek-arm
Copy link
Member

paul-szczepanek-arm commented Oct 25, 2018

Gap::read_phy times out
edit: this is actually fine as it's not supported

@asifrizwanubx
Copy link
Contributor

@paul-szczepanek-arm take your time but make sure that we will be able to pass this updated driver in the up-coming release.

@paul-szczepanek-arm
Copy link
Member

paul-szczepanek-arm commented Oct 25, 2018

I'm almost done, investigating possible occasional missing scan timeout event. Is this something you've seen @aqib-ublox?

possibly triggered by cancelling scan before timeout by calling stopscan (debugging atm), this is reproducible but right now I cannot tell if it's the driver's fault

@aqib-ublox
Copy link
Contributor Author

@paul-szczepanek-arm no till now i have not investigated this use case please share your finding and case study so that i can check if it is reproducible at my end as well?

@paul-szczepanek-arm
Copy link
Member

Until I narrow down the problem you can just try to repro it yourself. Start passive scan with some device advertising so that you get some reports but don't let it timeout and cancel it after 200 ms. Repeat a few times and it should fail.

@paul-szczepanek-arm
Copy link
Member

This is most likely not caused by the driver. I will follow up this issue but I don't think it should stop this merge.

@0xc0170
Copy link
Contributor

0xc0170 commented Oct 26, 2018

/morph build

@mbed-ci
Copy link

mbed-ci commented Oct 26, 2018

Build : SUCCESS

Build number : 3477
Build artifacts/logs : http://mbed-os.s3-website-eu-west-1.amazonaws.com/?prefix=builds/8452/

Triggering tests

/morph test
/morph export-build
/morph mbed2-build

@mbed-ci
Copy link

mbed-ci commented Oct 26, 2018

@mbed-ci
Copy link

mbed-ci commented Oct 26, 2018

@cmonr
Copy link
Contributor

cmonr commented Oct 27, 2018

/morph mbed2-build

@cmonr cmonr merged commit 63946d5 into ARMmbed:master Oct 27, 2018
@cmonr cmonr removed the needs: CI label Oct 27, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants