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

Feature/iap over bt #43

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open

Feature/iap over bt #43

wants to merge 15 commits into from

Conversation

KhrystynaDubovyk
Copy link
Contributor

@KhrystynaDubovyk KhrystynaDubovyk commented Nov 20, 2017

Provides the information for #1587

Proposal: Connectivity via iAP-BT and Transport Switch

This PR is ready for review.

Summary

  1. TRS/iAP over BT/ folder was created
    iAP_over_BT_data_resumption index was created
    iAP_over_BT_handling_HMI_notifications_during_re-connection index was created
    iAP_over_BT_re-connection index was created
  2. detailed_docs/accessories/
    Diagrams added
    iAP transport change reconnection.png
    iAP_over_BT_data_resumption.png
  3. detailed_docs/iAP_over_BT/ folder was created
    iAP_over_BT_handling_HMI_notif_during_reconnection_use_case index was created
    iAP_over_BT_re-connection_use_case index was created

CLA

iAP_over_BT_data_resumption index was created
iAP_over_BT_handling_HMI_notifications_during_re-connection index was created
iAP_over_BT_re-connection index was created
detailed_docs/accessories/
Diagrams added
iAP transport change reconnection.png
iAP_over_BT_data_resumption.png
detailed_docs/iAP_over_BT/ folder was created
iAP_over_BT_handling_HMI_notif_during_reconnection_use_case index was created
iAP_over_BT_re-connection_use_case index was created
8.1.b. SDL clears all resumption data related to this app **except** "AppIconsFolder"
8.1.c. SDL does **not** notify HMI about new registration (HMI continues to display app screen)

**Use Case 2**  
Copy link
Contributor

Choose a reason for hiding this comment

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

@KhrystynaDubovyk, please provide a description for Use Case 2, as for Use Case 1.

Copy link
Contributor

Choose a reason for hiding this comment

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

@KhrystynaDubovyk, change Markdown style:

Use Case 2:

2. SDL does not start reconnection timer
3. SDL notifies HMI about app being unregistred

**Use Case 3**
Copy link
Contributor

Choose a reason for hiding this comment

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

@KhrystynaDubovyk, please provide a description for Use Case 3, as for Use Case 1.

Copy link
Contributor

Choose a reason for hiding this comment

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

@KhrystynaDubovyk, change Markdown style:

Use Case 3:


_Exception 1:_
7.1. **After** timer expires app sends **valid** "hashID" with `<RegisterAppInterface>` request
7.1.a. SDL notifies HMI about app being unregistred
Copy link
Contributor

Choose a reason for hiding this comment

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

@KhrystynaDubovyk, typo 'unregistred', should be unregistered

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Accepted. Done.

7. SDL receives `<RegisterAppInterface>` request **before** reconnection timer expires
8. App sends **valid** "hashID" with `RegisterAppInterface` request
9. SDL sends succesful response to the app
10. SDL updates data in Policytable
Copy link
Contributor

Choose a reason for hiding this comment

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

@KhrystynaDubovyk, Policytable - should be 2 separate words

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rejected.
I offer to write "PolicyTable" in favour of existing docs written in this way.


_Pre-conditions:_
a. iOS device is connected over USB
b. App from iOS device is registred and running on SDL
Copy link
Contributor

Choose a reason for hiding this comment

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

@KhrystynaDubovyk, typo 'registred', should be registered

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Accepted. Done.

send BC.OnAppUnregistered (appID, unexpectedDisconnect:true) to HMI for such application

4.
In case mobile application sends RegisterAppInterface during `<AppTransportChangeTimer> + <AppTransportChangeTimerAddition>*N` timer
Copy link
Contributor

Choose a reason for hiding this comment

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

@KhrystynaDubovyk , maybe better to use an 'app' instead of 'applications' as made in all rest of files?
It's for whole iAP_over_BT_re-connection.md

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Rejected.
changed 'app' into 'application' throughout the document in favour of existing TRS documents written with 'application' (embedded_navi, RC, iAP_over_BT_data_resumptionTRS, ).

SDL must:
- consider such app as re-registered app
- update data in PolicyTable (`<device_identifier>` section)
- send UpdataDeviceList to HMI
Copy link
Contributor

Choose a reason for hiding this comment

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

@KhrystynaDubovyk , type 'UpdataDeviceList', correct - 'UpdateDeviceList'.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Accept. Done.

_Note:_ In case of USB connection loss SDL must proceed with unexpected disconnect flow

## Non-Functional Requirements
New parameters "AppTransportChangeTimer" , "AppTransportChangeTimerAddition" must be added to .ini file -> [MAIN] section
Copy link
Contributor

Choose a reason for hiding this comment

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

@KhrystynaDubovyk, suggested to indicate directly: smartdevicelink.ini file

discard all responses to such `appID` from HMI

## Non-Functional Requirements
New parameters "AppTransportChangeTimer" , "AppTransportChangeTimerAddition" must be added to .ini file -> [MAIN] section
Copy link
Contributor

Choose a reason for hiding this comment

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

@KhrystynaDubovyk, suggested to indicate directly: smartdevicelink.ini file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Accepted. Done.

behave according to existing Data Resumption rules

## Non-Functional Requirements
New parameters "AppTransportChangeTimer" , "AppTransportChangeTimerAddition" must be added to .ini file -> [MAIN] section
Copy link
Contributor

Choose a reason for hiding this comment

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

@KhrystynaDubovyk, suggested to indicate directly: smartdevicelink.ini file

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Accepted. Done.

changing ".ini file" into "smartdevicelink.ini file"
changed .ini file into smartdevicelink.ini file
fix typo
change .ini file into smartdevicelink.ini file
Minor text formatting;  smoothing  'app'/'application'  usage throughout  the document
Minor text formatting
app -> application
Policytable -> PolicyTable
fixing typos
edit headers fot UC2, 3
add titles for  UC2, 3
@KhrystynaDubovyk
Copy link
Contributor Author

@robinmk, please review

New parameters "AppTransportChangeTimer" , "AppTransportChangeTimerAddition" must be added to smartdevicelink.ini file -> [MAIN] section

```
[MAIN]
Copy link

@robinmk robinmk Dec 28, 2017

Choose a reason for hiding this comment

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

I think the comment for "AppTransportChangeTimer" can be rewritten as
Defines the timeout period SDL Core will wait for an application to re-register via alternate transport during 'transport switch'. If the application fails to re-register within this time, SDL Core shall inform HMI that the application has unregistered.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.
"AppTransportChangeTimer" description was rewritten.


## Diagram
Data resumption
![Data resumption](https://github.com/smartdevicelink/sdl_requirements/blob/feature/iap_over_bt/detailed_docs/accessories/iAP_over_BT_data_resumption.png)
Copy link

Choose a reason for hiding this comment

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

For the diagram, it would be very useful to indicate the event which causes SDL core to start the timer (AppTransportChangeTimer + AppTransportChangeTimerAddition*N)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The diagram is updated

_Expected:_

2. SDL receives signal with `<UUID>` about USB connection of the same device
3. SDL compares `<UUID>` of BT device connection with `<UUID>` of USB connection
Copy link

Choose a reason for hiding this comment

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

Isn't the HMI responsible for doing the UUID check and informing SDL to perform transport switch? Please make sure to correct this entire flow accordingly

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The flow was corrected accordingly

7.1.c. SDL performs data resumption for this application
7.1.d. SDL **notifies** HMI about fresh application registration

_Exception 2:_
Copy link

Choose a reason for hiding this comment

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

What is the difference in case between Exception 2 and Exception 3?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exception 2 describes the flow when invalid or omitted hashID is received after timer expires;
Exception 3 describes the flow when invalid or omitted hashID is received before timer expires

1. User connects the same device over USB
2. SDL receives signal with `<UUID>` via IOSDeviceConnectInfo
3. SDL connects USB device
4. SDL disconnects Bluetooth
Copy link

Choose a reason for hiding this comment

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

Step4- What is meant by "SDL disconnects BT" - From my understanding it is the HMI layer which disconnects the iAP channel over BT transport (Please note that the BT transport itself is not closed, only the iAP channel over the BT transport is closed)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Accepted, updated.

1.1. User connects another device over Bluetooth
1.1.a SDL receives signal with `<UUID_1>` about USB connection of the same device
1.1.b SDL receives signal with `<UUID_2>` about Bluetooth connection of another device
1.1.c SDL opens hub EAP protocol for `<UUID_1>` USB session
Copy link

Choose a reason for hiding this comment

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

1.1.c and 1.1.e- I think it is better to say that SDL opens appropriate EAP protocols and not be specific to HUB protocol because SDL should also be opening the dedicated EAP protocols as well (like com.smartdevicelink.multisession)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

1.1.d SDL closes active EAP session opened for `<UUID_1>` Bluetooth
1.1.e SDL opens hub EAP protocol for `<UUID_2>` Bluetooth session
1.1.f SDL starts reconnection timer for `<UUID_1>`
1.1.g `<app_1>` from device `<UUID_2>` sends RegisterAppInterface (params)
Copy link

Choose a reason for hiding this comment

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

1.1.g - I am not sure I understand the case being described here. It seems like an app is requesting registration from the device which is connected over BT. But it is not clear why its registration request is being rejected. Please re-write this case with more clarity.

@robinmk
Copy link

robinmk commented Dec 28, 2017

@KhrystynaDubovyk , I've provided the review comments.
Is this for requirements documentation?

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.

3 participants