{"action":"created","issue":{"url":"https://api.github.com/repos/eelcocramer/node-bluetooth-serial-port/issues/71","labels_url":"https://api.github.com/repos/eelcocramer/node-bluetooth-serial-port/issues/71/labels{/name}","comments_url":"https://api.github.com/repos/eelcocramer/node-bluetooth-serial-port/issues/71/comments","events_url":"https://api.github.com/repos/eelcocramer/node-bluetooth-serial-port/issues/71/events","html_url":"https://github.com/eelcocramer/node-bluetooth-serial-port/issues/71","id":83848534,"number":71,"title":"Large writes fail","user":{"login":"djMax","id":240684,"avatar_url":"https://avatars.githubusercontent.com/u/240684?v=3","gravatar_id":"","url":"https://api.github.com/users/djMax","html_url":"https://github.com/djMax","followers_url":"https://api.github.com/users/djMax/followers","following_url":"https://api.github.com/users/djMax/following{/other_user}","gists_url":"https://api.github.com/users/djMax/gists{/gist_id}","starred_url":"https://api.github.com/users/djMax/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djMax/subscriptions","organizations_url":"https://api.github.com/users/djMax/orgs","repos_url":"https://api.github.com/users/djMax/repos","events_url":"https://api.github.com/users/djMax/events{/privacy}","received_events_url":"https://api.github.com/users/djMax/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-06-02T05:24:39Z","updated_at":"2015-06-04T12:19:43Z","closed_at":null,"body":"It seems that large writes fail. First, the length looks like it's a UInt16. But also the send callback gets called many times - often with -1 for the second arg. What's happening here? What does -1 mean and why does it recover \"gracefully\"?"},"comment":{"url":"https://api.github.com/repos/eelcocramer/node-bluetooth-serial-port/issues/comments/108868137","html_url":"https://github.com/eelcocramer/node-bluetooth-serial-port/issues/71#issuecomment-108868137","issue_url":"https://api.github.com/repos/eelcocramer/node-bluetooth-serial-port/issues/71","id":108868137,"user":{"login":"eelcocramer","id":795579,"avatar_url":"https://avatars.githubusercontent.com/u/795579?v=3","gravatar_id":"","url":"https://api.github.com/users/eelcocramer","html_url":"https://github.com/eelcocramer","followers_url":"https://api.github.com/users/eelcocramer/followers","following_url":"https://api.github.com/users/eelcocramer/following{/other_user}","gists_url":"https://api.github.com/users/eelcocramer/gists{/gist_id}","starred_url":"https://api.github.com/users/eelcocramer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eelcocramer/subscriptions","organizations_url":"https://api.github.com/users/eelcocramer/orgs","repos_url":"https://api.github.com/users/eelcocramer/repos","events_url":"https://api.github.com/users/eelcocramer/events{/privacy}","received_events_url":"https://api.github.com/users/eelcocramer/received_events","type":"User","site_admin":false},"created_at":"2015-06-04T12:19:43Z","updated_at":"2015-06-04T12:19:43Z","body":"Actually, look at the code I would have expected that in the case the `kIOReturnNoSpace` occurs the callback function gets called with an error as the first argument. The error should have a `Write was unsuccessful` message in it."}}