-
Notifications
You must be signed in to change notification settings - Fork 52
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
[ce-oem] Add rs485 specific args (New) #1578
Conversation
We removed serial.rs485 module before since we thougt serail module is enough for handle RS485 However, we've learn that RTS level is the key to init the RS485 serial port depend on the HW design.
Also modify the command in test job to run with RS485 config if type is RS485
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/serial/jobs.pxu
Outdated
Show resolved
Hide resolved
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/serial/jobs.pxu
Outdated
Show resolved
Hide resolved
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/serial_config_parser.py
Outdated
Show resolved
Hide resolved
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/serial_test.py
Outdated
Show resolved
Hide resolved
…jobs.pxu Co-authored-by: Pei Yao-Chang <baconYao@users.noreply.github.com>
…jobs.pxu Co-authored-by: Pei Yao-Chang <baconYao@users.noreply.github.com>
…nfig_parser.py Co-authored-by: Pei Yao-Chang <baconYao@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add comments here to explain how you define the initial values. Thanks
contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/serial_config_parser.py
Show resolved
Hide resolved
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1578 +/- ##
=======================================
Coverage 48.00% 48.00%
=======================================
Files 371 371
Lines 39833 39833
Branches 6730 6730
=======================================
Hits 19121 19121
Misses 19994 19994
Partials 718 718 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome! Thank you!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
* Add serial.rs485 module back with specific args We removed serial.rs485 module before since we thougt serail module is enough for handle RS485 However, we've learn that RTS level is the key to init the RS485 serial port depend on the HW design. * Modify parser of resource job to parse RS485 config * Modify reource job to parse according to extra RS485 config Also modify the command in test job to run with RS485 config if type is RS485 * Fix black format * Update contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/serial/jobs.pxu Co-authored-by: Pei Yao-Chang <baconYao@users.noreply.github.com> * Update contrib/checkbox-ce-oem/checkbox-provider-ce-oem/units/serial/jobs.pxu Co-authored-by: Pei Yao-Chang <baconYao@users.noreply.github.com> * Update contrib/checkbox-ce-oem/checkbox-provider-ce-oem/bin/serial_config_parser.py Co-authored-by: Pei Yao-Chang <baconYao@users.noreply.github.com> * Change the phrase of exception while init serial ports in group. * Ignore shell check SC2050 * Add reference of the rs485 init value --------- Co-authored-by: Pei Yao-Chang <baconYao@users.noreply.github.com>
We removed serial.rs485 module before since we thought serial module is enough for handle RS485
However, we've learn that RTS level is the key to init the RS485 serial port depend on the HW design.
Modify parser of resource job to parse RS485 config
Modify reource job to parse according to extra RS485 config
Also modify the command in test job to run with RS485 config if type is RS485
Description
We learned that RTS level is matter while init RS485 ports. In some HW we need init RTS level as "RTS_AFTER_SEND" to make RS485 port work.
ref: https://www.kernel.org/doc/html/latest/driver-api/serial/serial-rs485.html
Resolved issues
Documentation
Tests
Side load result fail:
https://pastebin.canonical.com/p/T9vRJV7xVk/
Side load result pass:
https://pastebin.canonical.com/p/8rr4yPJM4B/
Side load result for 4 ports connected together, ttyMAX1 fail is a known issue.