{"action":"created","issue":{"url":"https://api.github.com/repos/dronekit/dronekit-python/issues/421","labels_url":"https://api.github.com/repos/dronekit/dronekit-python/issues/421/labels{/name}","comments_url":"https://api.github.com/repos/dronekit/dronekit-python/issues/421/comments","events_url":"https://api.github.com/repos/dronekit/dronekit-python/issues/421/events","html_url":"https://github.com/dronekit/dronekit-python/issues/421","id":115374266,"number":421,"title":"Connection error with 3DR radio","user":{"login":"aknight0","id":10470485,"avatar_url":"https://avatars.githubusercontent.com/u/10470485?v=3","gravatar_id":"","url":"https://api.github.com/users/aknight0","html_url":"https://github.com/aknight0","followers_url":"https://api.github.com/users/aknight0/followers","following_url":"https://api.github.com/users/aknight0/following{/other_user}","gists_url":"https://api.github.com/users/aknight0/gists{/gist_id}","starred_url":"https://api.github.com/users/aknight0/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aknight0/subscriptions","organizations_url":"https://api.github.com/users/aknight0/orgs","repos_url":"https://api.github.com/users/aknight0/repos","events_url":"https://api.github.com/users/aknight0/events{/privacy}","received_events_url":"https://api.github.com/users/aknight0/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-05T21:05:27Z","updated_at":"2015-11-06T02:21:58Z","closed_at":null,"body":"I'm trying to connect Dronekit python to my Pixhawk over the 3DR radio set.  I tested first with Mission planner, and was able to connect just fine.  However, when I disconnect Mission Planner, and attempt to connect with Dronekit, I get the following error after a long wait:\r\n\r\n    Connecting to vehicle on: com3\r\n    Traceback (most recent call last):\r\n      File \"vehicle_state.py\", line 27, in <module>\r\n        vehicle = connect('com3', await_params=True)\r\n      File \"C:\\Users\\UAV-PRISM\\Anaconda\\lib\\site-packages\\dronekit\\__init__.py\", line 586, in connect\r\n        state.prepare(await_params=await_params, rate=rate)\r\n      File \"C:\\Users\\UAV-PRISM\\Anaconda\\lib\\site-packages\\dronekit\\__init__.py\", line 548, in prepare\r\n        self.master.wait_heartbeat()\r\n      File \"C:\\Users\\UAV-PRISM\\Anaconda\\lib\\site-packages\\pymavlink\\mavutil.py\", line 374, in wait_heartbeat\r\n        return self.recv_match(type='HEARTBEAT', blocking=blocking)\r\n      File \"C:\\Users\\UAV-PRISM\\Anaconda\\lib\\site-packages\\pymavlink\\mavutil.py\", line 339, in recv_match\r\n        m = self.recv_msg()\r\n      File \"C:\\Users\\UAV-PRISM\\Anaconda\\lib\\site-packages\\pymavlink\\mavutil.py\", line 313, in recv_msg\r\n        msg = self.mav.parse_char(s)\r\n      File \"C:\\Users\\UAV-PRISM\\Anaconda\\lib\\site-packages\\pymavlink\\dialects\\v10\\ardupilotmega.py\", line 7962, in parse_char\r\n        m = self.__parse_char_legacy()\r\n      File \"C:\\Users\\UAV-PRISM\\Anaconda\\lib\\site- packages\\pymavlink\\dialects\\v10\\ardupilotmega.py\", line 7988, in __parse_char_legacy\r\n        (magic, self.expected_length) = struct.unpack('BB', str(self.buf[0:2])) # bytearrays are not supported in py 2.7.3\r\n    struct.error: unpack requires a string argument of length 2\r\n\r\n\r\nAny ideas?  I also tried connecting to a SITL instance running on the same computer, and that worked just fine."},"comment":{"url":"https://api.github.com/repos/dronekit/dronekit-python/issues/comments/154264170","html_url":"https://github.com/dronekit/dronekit-python/issues/421#issuecomment-154264170","issue_url":"https://api.github.com/repos/dronekit/dronekit-python/issues/421","id":154264170,"user":{"login":"tcr3dr","id":12703357,"avatar_url":"https://avatars.githubusercontent.com/u/12703357?v=3","gravatar_id":"","url":"https://api.github.com/users/tcr3dr","html_url":"https://github.com/tcr3dr","followers_url":"https://api.github.com/users/tcr3dr/followers","following_url":"https://api.github.com/users/tcr3dr/following{/other_user}","gists_url":"https://api.github.com/users/tcr3dr/gists{/gist_id}","starred_url":"https://api.github.com/users/tcr3dr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tcr3dr/subscriptions","organizations_url":"https://api.github.com/users/tcr3dr/orgs","repos_url":"https://api.github.com/users/tcr3dr/repos","events_url":"https://api.github.com/users/tcr3dr/events{/privacy}","received_events_url":"https://api.github.com/users/tcr3dr/received_events","type":"User","site_admin":false},"created_at":"2015-11-06T02:21:58Z","updated_at":"2015-11-06T02:21:58Z","body":"@aknight0 This may be a hard issue to diagnose, but can you try running this on master by installing via pip:\r\n\r\n```\r\npip install -UI git+https://github.com/dronekit/dronekit-python\r\n```\r\n\r\nWe are no longer using the `wait_heartbeat` function, so this may work better."}}