{"action":"created","issue":{"url":"https://api.github.com/repos/christiansandberg/canopen/issues/114","repository_url":"https://api.github.com/repos/christiansandberg/canopen","labels_url":"https://api.github.com/repos/christiansandberg/canopen/issues/114/labels{/name}","comments_url":"https://api.github.com/repos/christiansandberg/canopen/issues/114/comments","events_url":"https://api.github.com/repos/christiansandberg/canopen/issues/114/events","html_url":"https://github.com/christiansandberg/canopen/issues/114","id":366286601,"node_id":"MDU6SXNzdWUzNjYyODY2MDE=","number":114,"title":"Losing packets while listening to network","user":{"login":"nikodem-czechowski","id":16241974,"node_id":"MDQ6VXNlcjE2MjQxOTc0","avatar_url":"https://avatars0.githubusercontent.com/u/16241974?v=4","gravatar_id":"","url":"https://api.github.com/users/nikodem-czechowski","html_url":"https://github.com/nikodem-czechowski","followers_url":"https://api.github.com/users/nikodem-czechowski/followers","following_url":"https://api.github.com/users/nikodem-czechowski/following{/other_user}","gists_url":"https://api.github.com/users/nikodem-czechowski/gists{/gist_id}","starred_url":"https://api.github.com/users/nikodem-czechowski/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nikodem-czechowski/subscriptions","organizations_url":"https://api.github.com/users/nikodem-czechowski/orgs","repos_url":"https://api.github.com/users/nikodem-czechowski/repos","events_url":"https://api.github.com/users/nikodem-czechowski/events{/privacy}","received_events_url":"https://api.github.com/users/nikodem-czechowski/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-10-03T11:10:35Z","updated_at":"2018-10-03T18:35:07Z","closed_at":null,"author_association":"NONE","body":"Hi,\r\n\r\nI am using canopen (0.7.1) to listen (mainly) to my devices. I have approx 10 of them in the network. They sent a hearbeat signal (1 byte) every second and a status (8 bytes) every 5 second. Moreover, they can send more signals, but this is not the case.\r\n\r\nWhen monitoring my network using simple script:\r\n\r\n` frame = canopen.read_can_frame()`\r\n`if frame.can_id == (0x180 + id):`\r\n`    print parse_pdo(frame.data)`\r\n\r\nI am not getting al the packets, that are send my way. However, if I use candump or write a simple script using can library:\r\n\r\n`frame = can.bus.recv()`\r\n`if frame.can_id == (0x180 + id):`\r\n`    print parse_pdo(frame.data)`\r\n\r\nThen everything is okay.  I would stick with this (can library), but apart from listening to these kinds of messages I need to send them some messages from time to time, and then canopen is crucial. "},"comment":{"url":"https://api.github.com/repos/christiansandberg/canopen/issues/comments/426748431","html_url":"https://github.com/christiansandberg/canopen/issues/114#issuecomment-426748431","issue_url":"https://api.github.com/repos/christiansandberg/canopen/issues/114","id":426748431,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNjc0ODQzMQ==","user":{"login":"christiansandberg","id":3647996,"node_id":"MDQ6VXNlcjM2NDc5OTY=","avatar_url":"https://avatars3.githubusercontent.com/u/3647996?v=4","gravatar_id":"","url":"https://api.github.com/users/christiansandberg","html_url":"https://github.com/christiansandberg","followers_url":"https://api.github.com/users/christiansandberg/followers","following_url":"https://api.github.com/users/christiansandberg/following{/other_user}","gists_url":"https://api.github.com/users/christiansandberg/gists{/gist_id}","starred_url":"https://api.github.com/users/christiansandberg/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christiansandberg/subscriptions","organizations_url":"https://api.github.com/users/christiansandberg/orgs","repos_url":"https://api.github.com/users/christiansandberg/repos","events_url":"https://api.github.com/users/christiansandberg/events{/privacy}","received_events_url":"https://api.github.com/users/christiansandberg/received_events","type":"User","site_admin":false},"created_at":"2018-10-03T18:35:07Z","updated_at":"2018-10-03T18:35:07Z","author_association":"OWNER","body":"That would explain things. The library also reads messages from the CAN bus so if you do it as well there will be conflicts. You can use the can.Listener interface to get notifier on messages.\r\n\r\n```python\r\ndef on_message(msg):\r\n    if msg.arbitration_id == (0x180 + id):\r\n        print parse_pdo(msg.data)\r\n\r\nnetwork.listeners.append(on_message)\r\n```"}}
{"actor":{"display_login":"christiansandberg"}}