USB Serial Driver - Suggestions #1498
Unanswered
RakshanPremsagar
asked this question in
Q&A
Replies: 1 comment 2 replies
-
Are you sure that your device connected via serial is returning bytes in all cases? The call to |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I have connected the embedded device via the USB port. In my YAML file, I have defined the configuration as
resources: USBSerialPort: match: ID_SERIAL_SHORT: 'XXXX' ID_USB_INTERFACE_NUM: 'XX' speed: 115200
I have written a pytest case, where data is read from the serial driver.
I have a conftest.py which does the following :
`
![image](https://private-user-images.githubusercontent.com/50334397/370781024-7fc42148-999f-444b-98c4-cf8fbc962bf6.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NjU3NDYsIm5iZiI6MTczOTQ2NTQ0NiwicGF0aCI6Ii81MDMzNDM5Ny8zNzA3ODEwMjQtN2ZjNDIxNDgtOTk5Zi00NDRiLTk4YzQtY2Y4ZmJjOTYyYmY2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDE2NTA0NlomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI0ZWMxNmRkMzcwN2ZjODU4YzAwZDMyNjhiNzE1M2VhOTIxMmFiYWM3ZWNiN2IyOGIyMmE5MGQwNzQ0MTk1NTUmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.ZxQ6ACXHeShnbrYd1Nku-C_elzB7T16Pq-cmvrXMYw8)
`
and I have a method which captures serial responses :
But I observe an inconsistent error ( not always the case) which says :
pexpect.exceptions.TIMEOUT: Timeout of 1.00 seconds exceeded or connection closed by peer
I used a retry mechanism, to execute the function 5 more times when an exception occurs, but still the same response. How to counter this? Any suggestions could be really helpful
Beta Was this translation helpful? Give feedback.
All reactions