Skip to content

Commit 8751ba4

Browse files
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 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
1 parent 3c62985 commit 8751ba4

7 files changed

+290
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
## Functional Requirements
2+
3+
1.
4+
In case application re-registers during `<AppTransportChangeTimer> + <AppTransportChangeTimerAddition>*N`
5+
and sends valid `hashID` param via RegisterAppInterface_request to SDL
6+
7+
SDL must:
8+
- respond RegisterAppInterface (SUCCESS, success:true) to mobile app (in case of no other failures)
9+
- keep all data created/stored by this app BEFORE re-registration (transport switching)
10+
11+
2.
12+
In case application re-registers during `<AppTransportChangeTimer> + <AppTransportChangeTimerAddition>*N`
13+
and sends invalid `hashID` param via RegisterAppInterface_request to SDL
14+
OR omits `hashID` at all
15+
16+
SDL must:
17+
- respond RegisterAppInterface (RESUME_FAILED, success:true) to mobile app (in case of no other failures)
18+
- clear all data related to this app internally except "AppIconsFolder"
19+
- send requests to remove data in HMI
20+
21+
3.
22+
In case application re-register AFTER `<AppTransportChangeTimer> + <AppTransportChangeTimerAddition>*N` expiration
23+
and sends valid `hashID` param via RegisterAppInterface_request to SDL
24+
25+
SDL must:
26+
- notify HMI about app being unregistered
27+
- start data resumption process according to existing rules when app re-registers
28+
29+
4.
30+
In case application re-registers AFTER `<AppTransportChangeTimer> + <AppTransportChangeTimerAddition>*N` expiration
31+
and sends invalid `hashID` param via RegisterAppInterface_request to SDL
32+
or omits `hashID` at all
33+
34+
SDL must:
35+
behave according to existing Data Resumption rules
36+
37+
## Non-Functional Requirements
38+
New parameters "AppTransportChangeTimer" , "AppTransportChangeTimerAddition" must be added to .ini file -> [MAIN] section
39+
40+
```
41+
[MAIN]
42+
"AppTransportChangeTimer" = 500 ms
43+
defines the timeout for waiting the mobile app to reconnect between Bluetooth and USB transports change
44+
45+
```
46+
47+
```
48+
[MAIN]
49+
"AppTransportChangeTimerAddition" = 0ms
50+
Defines the timeout for waiting of every mobile app to reconnect between Bluetooth and USB transports change in case the number of connected apps is more than one
51+
```
52+
53+
## Diagram
54+
Data resumption
55+
![Data resumption](https://github.com/smartdevicelink/sdl_requirements/blob/feature/iap_over_bt/detailed_docs/accessories/iAP_over_BT_data_resumption.png)
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
## Functional Requirements
2+
3+
1.
4+
In case iAP session was closed due to transport type change
5+
6+
SDL must:
7+
- keep all applications registered for reconnecting device
8+
- during `<AppTransportChangeTimer> + <AppTransportChangeTimerAddition>*N` reconnection timer
9+
10+
2.
11+
In case due to transport change SDL started `<AppTransportChangeTimer> + <AppTransportChangeTimerAddition>*N` reconnection timer
12+
and HMI sends any notifications and requests to `appID` that needs to be reconnected
13+
14+
SDL must:
15+
- store all the notifications and requests from HMI internally
16+
- transfer all notifications and requests from HMI right after the `appID` will be reconnected
17+
18+
3.
19+
In case due to transport change SDL started `<AppTransportChangeTimer> + <AppTransportChangeTimerAddition>*N` reconnection timer
20+
and HMI sends any responses to `appID` on requests that were sent before reconnection
21+
22+
SDL must:
23+
discard all responses to such `appID` from HMI
24+
25+
## Non-Functional Requirements
26+
New parameters "AppTransportChangeTimer" , "AppTransportChangeTimerAddition" must be added to .ini file -> [MAIN] section
27+
28+
```
29+
[MAIN]
30+
"AppTransportChangeTimer" = 500 ms
31+
defines the timeout for waiting the mobile app to reconnect between Bluetooth and USB transports change
32+
33+
```
34+
35+
```
36+
[MAIN]
37+
"AppTransportChangeTimerAddition" = 0ms
38+
Defines the timeout for waiting of every mobile app to reconnect between Bluetooth and USB transports change in case the number of connected apps is more than one
39+
```
40+
41+
## Diagram
42+
Reconnection timer and notifications from HMI
43+
44+
![Reconnection timer and notifications from HMI](https://github.com/smartdevicelink/sdl_requirements/blob/feature/iap_over_bt/detailed_docs/accessories/iAP%20transport%20change%20reconnection.png)
Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
## Functional Requirements
2+
3+
1.
4+
In case device was connected over Bluetooth and SDL received signal about USB connection of the same device
5+
6+
SDL must:
7+
8+
- start `<AppTransportChangeTimer> + <AppTransportChangeTimerAddition>*N` after sending switch signal to external system
9+
_Note:_ **N** is the number of applications that need to be re-registered
10+
11+
2.
12+
In case mobile application sends RegisterAppInterface during `<AppTransportChangeTimer> + <AppTransportChangeTimerAddition>*N` timer
13+
and `<UUID>` and `<appID>` parameters match with closed session
14+
15+
SDL must:
16+
- consider such app as re-registered app
17+
- update data in PolicyTable (`<device_identifier>` section)
18+
- send UpdataDeviceList to HMI
19+
20+
_Note:_ For HMI during re-connection all applications remain registered and active, HMILevel resumption is not applicable
21+
22+
3.
23+
In case mobile application was not re-registered during `<AppTransportChangeTimer> + <AppTransportChangeTimerAddition>*N`
24+
due to transport type change
25+
26+
SDL must:
27+
28+
send BC.OnAppUnregistered (appID, unexpectedDisconnect:true) to HMI for such application
29+
30+
4.
31+
In case mobile application sends RegisterAppInterface during `<AppTransportChangeTimer> + <AppTransportChangeTimerAddition>*N` timer
32+
and `<UUID>` of reconnected device matches
33+
and `<appID>` parameter does not match with closed session
34+
35+
SDL must:
36+
- register such app as a new app
37+
- send BC.OnAppRegistered to HMI
38+
- send BC.UpdateAppList to HMI
39+
40+
5.
41+
In case mobile app sends RegisterAppInterface during `<AppTransportChangeTimer> + <AppTransportChangeTimerAddition>*N` timer
42+
and `<appID>` parameter matches with appID of closed session
43+
and `<UUID>` does not match
44+
45+
SDL must:
46+
respond RegisterAppInterface (DUPLICATE_NAME, success:false)
47+
48+
6.
49+
In case iOS device is connected over one of the available transports
50+
51+
SDL must:
52+
write hashed `<UUID>` to `<device identifier>` in Device Data section of Policy Table
53+
54+
7.
55+
In case iOS device was connected over USB
56+
and USB connection was lost
57+
58+
SDL must:
59+
NOT start `<AppTransportChangeTimer> + <AppTransportChangeTimerAddition>*N` timer for reconnection
60+
_Note:_ In case of USB connection loss SDL must proceed with unexpected disconnect flow
61+
62+
## Non-Functional Requirements
63+
New parameters "AppTransportChangeTimer" , "AppTransportChangeTimerAddition" must be added to .ini file -> [MAIN] section
64+
65+
```
66+
[MAIN]
67+
"AppTransportChangeTimer" = 500 ms
68+
defines the timeout for waiting the mobile app to reconnect between Bluetooth and USB transports change
69+
70+
```
71+
72+
```
73+
[MAIN]
74+
"AppTransportChangeTimerAddition" = 0ms
75+
Defines the timeout for waiting of every mobile app to reconnect between Bluetooth and USB transports change in case the number of connected apps is more than one
76+
```
77+
107 KB
Loading
178 KB
Loading
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
2+
## Use Case 1: Handling notifications from HMI during re-connection
3+
4+
**Main Flow:**
5+
6+
_Pre-conditions:_
7+
a. iOS device is connected over Bluetooth
8+
b. N applications from this device are registered in SDL
9+
10+
_Steps:_
11+
1. User connects the same device over USB
12+
13+
14+
_Expected:_
15+
2. SDL starts reconnection timer
16+
3. HMI sends no RPCs to SDL assigned to these N applications
17+
4. SDL unregisters the applications right after reconnection timer expires
18+
19+
**Alternative flow 1**
20+
3.1 HMI sends an RPC to any of these N applications that need to be reconnected
21+
3.1.a. SDL stores all the RPCs from HMI internally
22+
3.1.b. SDL transfers all RPCs from HMI right after corresponding application reconnects
23+
24+
**Alternative flow 2**
25+
3.2 HMI sends a response to any of these N applications requests that were sent before reconnection
26+
3.2.a. SDL discards all these responses from HMI
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
## Use Case 1: iAP over BT re-connection
2+
3+
**Main Flow:**
4+
5+
_Pre-conditions:_
6+
a. iOS device is connected over Bluetooth
7+
b. App from iOS device is registered and running on SDL
8+
9+
_Steps:_
10+
1. User connects the same iOS device over USB
11+
12+
_Expected:_
13+
14+
2. SDL receives signal with `<UUID>` about USB connection of the same device
15+
3. SDL compares `<UUID>` of BT device connection with `<UUID>` of USB connection
16+
4. `<UUID>` of BT device connection matches with `<UUID>` of USB connection
17+
5. SDL sends signal about transport switch to the System
18+
6. SDL starts reconnection timer
19+
7. SDL receives `<RegisterAppInterface>` request **before** reconnection timer expires
20+
8. App sends **valid** "hashID" with `RegisterAppInterface` request
21+
9. SDL sends succesful response to the app
22+
10. SDL updates data in Policytable
23+
11. SDL notifies HMI via `UpdatadeviceList` about changed `transportType`
24+
12. SDL does not notify HMI about new registration
25+
26+
27+
_Exception 1:_
28+
7.1. **After** timer expires app sends **valid** "hashID" with `<RegisterAppInterface>` request
29+
7.1.a. SDL notifies HMI about app being unregistred
30+
7.1.b. App registers with **valid** "hashID"
31+
7.1.c. SDL performs data resumption for this app
32+
7.1.d. SDL **notifies** HMI about fresh app registration
33+
34+
_Exception 2:_
35+
7.1.b.1. App registers with **invalid** or **missing** "hashID"
36+
7.1.b.1.a. SDL clears all resumption data related to this app
37+
7.1.b.1.b. SDL **notifies** HMI about fresh app registration (sends BC.OnAppRegistered to HMI send BC.UpdateAppList to HMI)
38+
39+
_Exception 3:_
40+
8.1. App sends **invalid** or omitted "hashID" with `RegisterAppInterface` request
41+
8.1.a. SDL responds with RESUME_FAILED to app's registration request
42+
8.1.b. SDL clears all resumption data related to this app **except** "AppIconsFolder"
43+
8.1.c. SDL does **not** notify HMI about new registration (HMI continues to display app screen)
44+
45+
**Use Case 2**  
46+
47+
_Pre-conditions:_
48+
a. iOS device is connected over USB
49+
b. App from iOS device is registred and running on SDL
50+
51+
_Steps:_
52+
1. USB transport was disconnected
53+
54+
_Expected:_
55+
56+
2. SDL does not start reconnection timer
57+
3. SDL notifies HMI about app being unregistred
58+
59+
**Use Case 3**
60+
_Pre-conditions:_
61+
a. iOS device is connected over Bluetooth
62+
b. App `<app_1>` from iOS device is registred and running on SDL
63+
64+
_Steps:_
65+
1. User connects the same device over USB
66+
2. SDL receives signal with `<UUID>` via IOSDeviceConnectInfo
67+
3. SDL connects USB device
68+
4. SDL disconnects Bluetooth
69+
5. SDL starts reconnection timer
70+
6. App `<app_2>` sends RegisterAppInterface (params)
71+
72+
_Expected result:_
73+
7. SDL compares `<UUID>` and `<appID>` parameters with previously closed session
74+
8. SDL registers `<app_2>` as a new app
75+
9. SDL sends BC.OnAppRegistered to HMI
76+
77+
_Exception 1:_
78+
1.1. User connects another device over Bluetooth
79+
1.1.a SDL receives signal with `<UUID_1>` about USB connection of the same device
80+
1.1.b SDL receives signal with `<UUID_2>` about Bluetooth connection of another device
81+
1.1.c SDL opens hub EAP protocol for `<UUID_1>` USB session
82+
1.1.d SDL closes active EAP session opened for `<UUID_1>` Bluetooth
83+
1.1.e SDL opens hub EAP protocol for `<UUID_2>` BT Bluetooth session
84+
1.1.f SDL starts reconnection timer for `<UUID_1>`
85+
1.1.g `<app_1>` from device `<UUID_2>` sends RegisterAppInterface (params)
86+
Expected result:
87+
1.1.h SDL compares `<UUID>` and `<appID>` parameters with previously closed session
88+
1.1.i SDL responds to the app with RegisterAppInterface (DUPLICATE_NAME, success:false)

0 commit comments

Comments
 (0)