Skip to content

RDKEMW-2905: USB Feature - UserManual Update #116

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

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from

Conversation

Dosakaya
Copy link
Contributor

Reason for change:
Updated Usb Plugins documentation as per code flow.

Risks: None

@Dosakaya Dosakaya requested a review from a team as a code owner March 27, 2025 11:23
"partitionName": "/dev/sda1",
"mountFlags": "READ_ONLY",
"mountPath": "/tmp/media/usb2",
"fileSystem": "VFAT"
Copy link
Contributor

Choose a reason for hiding this comment

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

I dont see fileSystem in the documentation. Are we returning this param in the code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes @ramasat. We are using USBStorageMountInfo iterator, which has 4 member variables (https://github.com/rdkcentral/entservices-apis/blob/develop/apis/USBMassStorage/IUSBMassStorage.h#L61) in the getMountPoints method.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I have added this as "optional" parameter in the API Spec. Please see my other comments in the corresponding "json" file.

| result[#]?.usedSpace | integer | <sup>*(optional)*</sup> Used space of the partition in MB |
| result[#]?.availableSpace | integer | <sup>*(optional)*</sup> Available space in the partition in MB |
| result | object | |
| result?.fileSystem | string | <sup>*(optional)*</sup> The file system of the partition |
Copy link
Contributor

Choose a reason for hiding this comment

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

As per document, it should be result.partitionInfo?fileSystem. Is the code differently implements this response?

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 response is coming as below...

{"jsonrpc":"2.0","id":42,"result":{"fileSystem":"VFAT","size":14687,"startSector":0,"numSectors":30080992,"sectorSize":512,"totalSpace":14671,"usedSpace":22,"availableSpace":14649}}

Copy link
Contributor

Choose a reason for hiding this comment

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

No, we can't deviate the API Spec, as the apps team has already started developing their app using the Spec. Please create a ticket similar to "https://ccp.sys.comcast.net/browse/RDKEMW-2907" or add additional scope in the same ticket to fix this (i.e., introduce the partitionInfo object here).

| params.mountPoints[#].partitionName | string | The name of the partition being mounted |
| params.mountPoints[#].mountFlags | string | Flags indicating how the partition is mounted |
| params.mountPoints[#].mountPath | string | The mount point path in the file system |
| params.mountPoints[#].fileSystem | string | File system |
Copy link
Contributor

Choose a reason for hiding this comment

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

fileSystem is not part of this response as per spec.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We are using USBStorageMountInfo iterator, which has 4 member variables (https://github.com/rdkcentral/entservices-apis/blob/develop/apis/USBMassStorage/IUSBMassStorage.h#L61) in the getMountPoints method.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok, as mentioned above, I made this an optional param. Please also refer my related comment in the "json file".

| result.deviceInfo[#]?.productInfo4?.serialNumber | string | <sup>*(optional)*</sup> Unicode string representing the serial number of the device |
| result.deviceInfo[#]?.productInfo4?.manufacturer | string | <sup>*(optional)*</sup> Unicode string representing the manufacturer of the device |
| result.deviceInfo[#]?.productInfo4?.product | string | <sup>*(optional)*</sup> Unicode string representing the product |
| result | array | An array of USBDeviceInfo |
Copy link
Contributor

Choose a reason for hiding this comment

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

This should not be an array as per spec

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. currently it is an array in the middleware code. we have created jira (https://ccp.sys.comcast.net/browse/RDKEMW-2907) to work on this.

Copy link
Contributor

Choose a reason for hiding this comment

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

ok. We need to prioritize the above ticket and get it fixed quickly as we cannot keep the API Spec broken for long time.

| result[#].protocol | integer | Protocol supported by the device |
| result[#].serialnumber | string | Serial number of the device |
| result[#].device | object | |
| result[#].device.deviceClass | integer | USB class of the device |
Copy link
Contributor

Choose a reason for hiding this comment

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

Too many fields when compared with the spec.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

As per current middleware code, we added all these properties..
Please find the response for getDeviceInfo interface...

{"jsonrpc":"2.0","id":42,"result":[{"parentId":6,"deviceStatus":1,"deviceLevel":2,"portNumber":4,"vendorId":1921,"productId":21889,"protocol":0,"serialNumber":"0401805e4532973503374df52c237c098397d34849b2bc891105dbf81be234f933de00000000000000000000ff7c2bd3ff1d6a1881558107882f56e3","device":{"deviceClass":8,"deviceSubclass":6,"deviceName":"001/006","devicePath":"/dev/sda"},"flags":"AVAILABLE","features":0,"busSpeed":"High","numLanguageIds":1,"productInfo1":{"languageId":1033,"serialNumber":"0401805e4532973503374df52c237c098397d34849b2bc891105dbf81be234f933de00000000000000000000ff7c2bd3ff1d6a1881558107882f56e3","manufacturer":" USB","product":" SanDisk 3.2Gen1"},"productInfo2":{"languageId":0,"serialNumber":"","manufacturer":"","product":""},"productInfo3":{"languageId":0,"serialNumber":"","manufacturer":"","product":""},"productInfo4":{"languageId":0,"serialNumber":"","manufacturer":"","product":""}}]}

Copy link
Contributor

@ramasat ramasat Mar 28, 2025

Choose a reason for hiding this comment

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

Ok, we can add the missing fields in the API Spec. However, we need to introduce the "deviceInfo" object in the response (For ex., result.deviceInfo.parentId) . Please create a new ticket or expand the scope for https://ccp.sys.comcast.net/browse/RDKEMW-2907 to add fix for this.

}
},
"required": ["partitionName", "mountFlags", "mountPath"]
}
"required": ["partitionName", "mountFlags", "mountPath", "fileSystem"]
Copy link
Contributor

Choose a reason for hiding this comment

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

Please make the fileSystem "optional" (as we have already published the spec and team has started using it, we cant add this as mandatory param).

"partitionName": "/dev/sda1",
"mountFlags": "READ_ONLY",
"mountPath": "/tmp/media/usb2",
"fileSystem": "VFAT"
Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I have added this as "optional" parameter in the API Spec. Please see my other comments in the corresponding "json" file.

| result[#]?.usedSpace | integer | <sup>*(optional)*</sup> Used space of the partition in MB |
| result[#]?.availableSpace | integer | <sup>*(optional)*</sup> Available space in the partition in MB |
| result | object | |
| result?.fileSystem | string | <sup>*(optional)*</sup> The file system of the partition |
Copy link
Contributor

Choose a reason for hiding this comment

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

No, we can't deviate the API Spec, as the apps team has already started developing their app using the Spec. Please create a ticket similar to "https://ccp.sys.comcast.net/browse/RDKEMW-2907" or add additional scope in the same ticket to fix this (i.e., introduce the partitionInfo object here).

| params.mountPoints[#].partitionName | string | The name of the partition being mounted |
| params.mountPoints[#].mountFlags | string | Flags indicating how the partition is mounted |
| params.mountPoints[#].mountPath | string | The mount point path in the file system |
| params.mountPoints[#].fileSystem | string | File system |
Copy link
Contributor

Choose a reason for hiding this comment

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

ok, as mentioned above, I made this an optional param. Please also refer my related comment in the "json file".

| result[#].protocol | integer | Protocol supported by the device |
| result[#].serialnumber | string | Serial number of the device |
| result[#].device | object | |
| result[#].device.deviceClass | integer | USB class of the device |
Copy link
Contributor

@ramasat ramasat Mar 28, 2025

Choose a reason for hiding this comment

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

Ok, we can add the missing fields in the API Spec. However, we need to introduce the "deviceInfo" object in the response (For ex., result.deviceInfo.parentId) . Please create a new ticket or expand the scope for https://ccp.sys.comcast.net/browse/RDKEMW-2907 to add fix for this.

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