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.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk1NzA5NTEsIm5iZiI6MTczOTU3MDY1MSwicGF0aCI6Ii81MDMzNDM5Ny8zNzA3ODEwMjQtN2ZjNDIxNDgtOTk5Zi00NDRiLTk4YzQtY2Y4ZmJjOTYyYmY2LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTQlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjE0VDIyMDQxMVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWQzNTUzZTA5MjBjNDhmYTczM2M5MjdiYmQ4ZWU1OWJkMGJmOWZiYTJmNGIzNjk1YzY5ZmZlYTM4ZDZjMzIzMzgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.yiRml3feygT79wzDXq6758PRYykeNOegXA2F8Jfm3xU)
`
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