{"action":"created","issue":{"url":"https://api.github.com/repos/dronekit/dronekit-python/issues/302","labels_url":"https://api.github.com/repos/dronekit/dronekit-python/issues/302/labels{/name}","comments_url":"https://api.github.com/repos/dronekit/dronekit-python/issues/302/comments","events_url":"https://api.github.com/repos/dronekit/dronekit-python/issues/302/events","html_url":"https://github.com/dronekit/dronekit-python/issues/302","id":101534701,"number":302,"title":"Bug?: SerialException: device reports readiness to read but returned no data (device disconnected?)","user":{"login":"samacumen","id":1699546,"avatar_url":"https://avatars.githubusercontent.com/u/1699546?v=3","gravatar_id":"","url":"https://api.github.com/users/samacumen","html_url":"https://github.com/samacumen","followers_url":"https://api.github.com/users/samacumen/followers","following_url":"https://api.github.com/users/samacumen/following{/other_user}","gists_url":"https://api.github.com/users/samacumen/gists{/gist_id}","starred_url":"https://api.github.com/users/samacumen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samacumen/subscriptions","organizations_url":"https://api.github.com/users/samacumen/orgs","repos_url":"https://api.github.com/users/samacumen/repos","events_url":"https://api.github.com/users/samacumen/events{/privacy}","received_events_url":"https://api.github.com/users/samacumen/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-17T23:58:15Z","updated_at":"2015-08-19T20:27:32Z","closed_at":null,"body":"Hello,\r\n\r\nI am trying to connect Pixhawk with Raspberry Pi and using DroneApi for it. Everything is setup, and able to arm and disarm. However, problem is when I use the drone Api examply vehicle_state.py:\r\n\r\nPlease read below:\r\n\r\n1) Execute the following command:\r\napi start /home/pi/dronekit-python/examples/vehicle_state/vehicle_state.py\r\n\r\n2) I receive an error everytime:\r\nSerialException: device reports readiness to read but returned no data (device disconnected?)\r\n\r\n3) Files attached (.png - 2 screenshots of output OR else, please have a look at the following output as is produced (for your reference):\r\n\r\n. . . \r\nOverriding RC channels for roll and yaw\r\n Current overrides are: {'1': 900, '4': 1000}\r\n Channel default values: {'1': 0, '3': 0, '2': 0, '5': 0, '4': 0, '7': 0, '6': 0, '8': 0}\r\n Cancelling override\r\n\r\nReset vehicle attributes/parameters and exit\r\nGot MAVLink msg: COMMAND_ACK {command : 11, result : 0}\r\nGot MAVLink msg: COMMAND_ACK {command : 400, result : 0}\r\nException in APIThread-2: device reports readiness to read but returned no data (device disconnected?)\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python2.7/dist-packages/droneapi/module/api.py\", line 333, in run\r\n    self.fn()\r\n  File \"/usr/local/lib/python2.7/dist-packages/droneapi/module/api.py\", line 625, in <lambda>\r\n    APIThread(self, lambda: execfile(args[1], g), args[1])\r\n  File \"/home/pi/dronekit-python/examples/vehicle_state/vehicle_state.py\", line 119, in <module>\r\n    vehicle.parameters['THR_MIN']=130\r\n  File \"/usr/local/lib/python2.7/dist-packages/droneapi/module/api.py\", line 35, in __setitem__\r\n    self.__module.mpstate.functions.param_set(name, value)\r\n  File \"/usr/local/bin/mavproxy.py\", line 215, in param_set\r\n    return mpstate.mav_param.mavset(mpstate.master(), name, value, retries=retries)\r\n  File \"/usr/local/lib/python2.7/dist-packages/pymavlink/mavparm.py\", line 25, in mavset\r\n    ack = mav.recv_match(type='PARAM_VALUE', blocking=False)\r\n  File \"/usr/local/lib/python2.7/dist-packages/pymavlink/mavutil.py\", line 339, in recv_match\r\n    m = self.recv_msg()\r\n  File \"/usr/local/lib/python2.7/dist-packages/pymavlink/mavutil.py\", line 302, in recv_msg\r\n    s = self.recv(n)\r\n  File \"/usr/local/lib/python2.7/dist-packages/pymavlink/mavutil.py\", line 758, in recv\r\n    ret = self.port.read(n)\r\n  File \"/usr/lib/python2.7/dist-packages/serial/serialposix.py\", line 456, in read\r\n    raise SerialException('device reports readiness to read but returned no data (device disconnected?)')\r\nSerialException: device reports readiness to read but returned no data (device disconnected?)\r\nDISARMED\r\n\r\nAny help is appreciated.\r\n\r\nThanks,\r\nShyam\r\n\r\n- - \r\nAttachments:\r\n\r\n\r\n![putty_screenshot_1](https://cloud.githubusercontent.com/assets/1699546/9319451/d7cf40f2-454e-11e5-804d-eaba558f3192.png)\r\n![putty_screenshot_2](https://cloud.githubusercontent.com/assets/1699546/9319454/deeb42dc-454e-11e5-9ece-74a02926168d.png)\r\n"},"comment":{"url":"https://api.github.com/repos/dronekit/dronekit-python/issues/comments/132771064","html_url":"https://github.com/dronekit/dronekit-python/issues/302#issuecomment-132771064","issue_url":"https://api.github.com/repos/dronekit/dronekit-python/issues/302","id":132771064,"user":{"login":"samacumen","id":1699546,"avatar_url":"https://avatars.githubusercontent.com/u/1699546?v=3","gravatar_id":"","url":"https://api.github.com/users/samacumen","html_url":"https://github.com/samacumen","followers_url":"https://api.github.com/users/samacumen/followers","following_url":"https://api.github.com/users/samacumen/following{/other_user}","gists_url":"https://api.github.com/users/samacumen/gists{/gist_id}","starred_url":"https://api.github.com/users/samacumen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samacumen/subscriptions","organizations_url":"https://api.github.com/users/samacumen/orgs","repos_url":"https://api.github.com/users/samacumen/repos","events_url":"https://api.github.com/users/samacumen/events{/privacy}","received_events_url":"https://api.github.com/users/samacumen/received_events","type":"User","site_admin":false},"created_at":"2015-08-19T20:27:32Z","updated_at":"2015-08-19T20:27:32Z","body":"Hi @hamishwillee and @akwatson : Thank you for getting this problem to your attention. I would try to be specific in what I am trying to achieve.\r\n\r\n1) I have connected Pixhawk to RaspberryPi: Connected Pixhawk's Telemetry 2 pins to RPi's GPIO pins - Tx, Tx, +Vcc, Gnd.\r\n\r\n2) Everything is setup as from the following link (incl. the connection diagram). It works as described in: http://dev.ardupilot.com/wiki/companion-computers/raspberry-pi-via-mavlink/\r\n\r\n3) I have \"disabled\" the \"serial port login on the Pi\" as given in the above link (the above link also refers to your dronekit-python community wiki instructions as it is):\r\n\r\n4) The port on RpI autodetects it as: ttyAMA0.\r\n\r\nI do not understand why this should occur, it is a simple out-of-the-box setup and I am stuck at this point to proceed further. Please let me know if you may need more information.\r\n\r\nThanks,\r\nShyam\r\n\r\n"}}