Title: SLCAN only receives a few messages and then it hangs? · Issue #1541 · hardbyte/python-can · GitHub
Open Graph Title: SLCAN only receives a few messages and then it hangs? · Issue #1541 · hardbyte/python-can
X Title: SLCAN only receives a few messages and then it hangs? · Issue #1541 · hardbyte/python-can
Description: Describe the bug Currently I am using a SLCAN adapter to receive and transmit some CAN messages. The problem I encounter is that there are only a handful(mostly only 3) of messages printed to the console. While the SLCAN adapter works fi...
Open Graph Description: Describe the bug Currently I am using a SLCAN adapter to receive and transmit some CAN messages. The problem I encounter is that there are only a handful(mostly only 3) of messages printed to the c...
X Description: Describe the bug Currently I am using a SLCAN adapter to receive and transmit some CAN messages. The problem I encounter is that there are only a handful(mostly only 3) of messages printed to the c...
Opengraph URL: https://github.com/hardbyte/python-can/issues/1541
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SLCAN only receives a few messages and then it hangs?","articleBody":"### Describe the bug\r\n\u003c!-- A clear and concise description of what the bug is. --\u003e\r\nCurrently I am using a SLCAN adapter to receive and transmit some CAN messages. \r\nThe problem I encounter is that there are only a handful(mostly only 3) of messages printed to the console. While the SLCAN adapter works fine when using it in a serial terminal. \r\n\r\n\r\n\r\nConsole output of receive_all.py example in console:\r\n```Python\r\nTimestamp: 1678957835.071922 ID: 0bb00c02 X Rx DL: 4 2f 0a 00 00\r\nTimestamp: 1678957835.072918 ID: 0bb01c02 X Rx DL: 4 32 0a 00 00\r\nTimestamp: 1678957835.073915 ID: 0bb01c02 X Rx DL: 4 c2 0c 00 00\r\n```\r\nAnd that's it. It will hang..\r\n\r\n### To Reproduce\r\n\u003c!-- Steps to reproduce the behavior. Please add longer code examples below. --\u003e\r\nI used the receive_all.py example with the interface initialized like this:\r\n```Python\r\nwith can.Bus(interface=\"slcan\", channel=\"COM15@115200\", bitrate=500000, \r\n ) as bus:\r\n```\r\n\r\n### Expected behavior\r\n\u003c!-- A clear and concise description of what you expected to happen. --\u003e\r\nI expected a result similar to manual use in a serial terminal\r\n\r\n\r\nManual serial terminal output snippet\r\n```\r\nV\r\nV0101\r\nS6\r\n\r\nO\r\n\r\nT1D20F2F2102\r\nT090781008FFFF0F00FFFF0F00\r\nT0BB01C02403040000\r\nT0140800088C72F70B07118010\r\nT00A00C008AC008C72F7070200\r\nT00A01C008AC008C72F7070200\r\nT00200E2280080000000009F44\r\nT00201E22800C3000000003032\r\nT020382221AC\r\nT020782221AC\r\nT0C201F00680119F48CC4F\r\nT00201F0387BCC5B4387F159DA\r\nT0C201F006810804883B4E\r\nT0C201F006820B8A74E34E\r\nT04201F0068DA4C113604F\r\nT04201F0068BA44C03604F\r\nT04201F00697A46DBB614E\r\nT04201F0069DA42A43B04F\r\nT04201F0069EA4637AC04F\r\nT00201F0287BCD5B43780F56DA\r\nT00201F0587BCC5B43780F56DA\r\nT0CF40000403020000\r\nT08E10000403020000\r\nT00200000403020000\r\nT007E0000403020000\r\nT0C200F006800EE0DFDA4F\r\nT0C200F006810843643A4E\r\nT0C200F006820B8837DB4E\r\nT04200F0068877E3C1B04E\r\nT04200F0068977322CB04E\r\nT04200F0068A77E3C1B04E\r\nT04200F0069474AD1DD64D\r\nT04200F006955F94F91DB0\r\nT04200F006965C50A1084D\r\nT04200F0069777E3C1B04E\r\nT00200F01884BC4443780F56DA\r\nT0000000080503FFFE0FFFFE0F\r\nT0000000080502FFFF0F000000\r\nT1D20F2F2102\r\nT090781008FFFF0F00FFFF0F00\r\nT0907810187BCD5B4387F059DA\r\nT08A01D001AC\r\nT08A01D01128\r\nT1A3C82F220200\r\n\r\n+ Thousands of messages after this\r\n\r\n```\r\n\r\n### Additional context\r\n\r\nOS and version: Windows 10 22H2\r\nPython version: 3.11.2\r\npython-can version: 4.1.0\r\npython-can interface/s (if applicable): slcan (pyserial 3.5)\r\n\r\n\u003c!-- Add any other context about the problem here. --\u003e\r\n\r\n\u003cdetails\u003e\u003csummary\u003eTraceback and logs\u003c/summary\u003e\r\n\u003c!-- Has to be followed by an empty line! --\u003e\r\nNo Traceback available.\r\n\u003c!-- More details such as a minimal script to demonstrate the bug, relevant logs and any tracebacks go here. --\u003e\r\n\r\n\r\n\u003c!-- Code examples can be included: --\u003e\r\nComplete receive_all.py example code:\r\n\r\n```Python\r\n\"\"\"\r\nShows how to receive messages via polling.\r\n\"\"\"\r\n\r\nimport can\r\nfrom can.bus import BusState\r\n\r\n\r\ndef receive_all():\r\n \"\"\"Receives all messages and prints them to the console until Ctrl+C is pressed.\"\"\"\r\n\r\n # this uses the default configuration (for example from environment variables, or a\r\n # config file) see https://python-can.readthedocs.io/en/stable/configuration.html\r\n with can.Bus(interface=\"slcan\", channel=\"COM15@115200\", bitrate=500000, \r\n ) as bus:\r\n # set to read-only, only supported on some interfaces\r\n try:\r\n bus.state = BusState.PASSIVE\r\n except NotImplementedError:\r\n pass\r\n\r\n try:\r\n while True:\r\n msg = bus.recv(1)\r\n if msg is not None:\r\n print(msg)\r\n\r\n except KeyboardInterrupt:\r\n pass # exit normally\r\n\r\n\r\nif __name__ == \"__main__\":\r\n receive_all()\r\n\r\n```\r\n\u003c/details\u003e\r\n","author":{"url":"https://github.com/d3jong","@type":"Person","name":"d3jong"},"datePublished":"2023-03-16T09:32:09.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/1541/python-can/issues/1541"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:00bab828-e619-6363-4d84-b8ebeddfdc7e |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 95A6:33615A:29B2C1A:37D9EF7:6A5D9C68 |
| html-safe-nonce | 1536b8193482cdc45f3f9c8b9bf2e3908ed5f0d0d0ef49b87914dc6cfc1e33e1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NUE2OjMzNjE1QToyOUIyQzFBOjM3RDlFRjc6NkE1RDlDNjgiLCJ2aXNpdG9yX2lkIjoiMzI3OTc5Nzk5NTc5NDQzOTI3MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c8c607e46c5e8ff089528d3db711394ae94f5d840297926267e20c87d8f3d1ca |
| hovercard-subject-tag | issue:1627053221 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/hardbyte/python-can/1541/issue_layout |
| twitter:image | https://opengraph.githubassets.com/624d5d80fc89056e025f7f5a6518f79b05b57ce5d14563d5d9f6a55ef385d9e2/hardbyte/python-can/issues/1541 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/624d5d80fc89056e025f7f5a6518f79b05b57ce5d14563d5d9f6a55ef385d9e2/hardbyte/python-can/issues/1541 |
| og:image:alt | Describe the bug Currently I am using a SLCAN adapter to receive and transmit some CAN messages. The problem I encounter is that there are only a handful(mostly only 3) of messages printed to the c... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | d3jong |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| turbo-cache-control | no-preview |
| go-import | github.com/hardbyte/python-can git https://github.com/hardbyte/python-can.git |
| octolytics-dimension-user_id | 855189 |
| octolytics-dimension-user_login | hardbyte |
| octolytics-dimension-repository_id | 69090889 |
| octolytics-dimension-repository_nwo | hardbyte/python-can |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 69090889 |
| octolytics-dimension-repository_network_root_nwo | hardbyte/python-can |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width