{"action":"created","issue":{"url":"https://api.github.com/repos/tanelih/phonegap-bluetooth-plugin/issues/42","repository_url":"https://api.github.com/repos/tanelih/phonegap-bluetooth-plugin","labels_url":"https://api.github.com/repos/tanelih/phonegap-bluetooth-plugin/issues/42/labels{/name}","comments_url":"https://api.github.com/repos/tanelih/phonegap-bluetooth-plugin/issues/42/comments","events_url":"https://api.github.com/repos/tanelih/phonegap-bluetooth-plugin/issues/42/events","html_url":"https://github.com/tanelih/phonegap-bluetooth-plugin/issues/42","id":162512069,"number":42,"title":"compatibility with Motorola CS3070 ","user":{"login":"larkonesvk","id":20130702,"avatar_url":"https://avatars.githubusercontent.com/u/20130702?v=3","gravatar_id":"","url":"https://api.github.com/users/larkonesvk","html_url":"https://github.com/larkonesvk","followers_url":"https://api.github.com/users/larkonesvk/followers","following_url":"https://api.github.com/users/larkonesvk/following{/other_user}","gists_url":"https://api.github.com/users/larkonesvk/gists{/gist_id}","starred_url":"https://api.github.com/users/larkonesvk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/larkonesvk/subscriptions","organizations_url":"https://api.github.com/users/larkonesvk/orgs","repos_url":"https://api.github.com/users/larkonesvk/repos","events_url":"https://api.github.com/users/larkonesvk/events{/privacy}","received_events_url":"https://api.github.com/users/larkonesvk/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-06-27T18:04:07Z","updated_at":"2016-06-28T12:47:00Z","closed_at":null,"body":"Hello, \r\nevery time i want to connect to barcode scanner a got: READ FAILED, SOCKET MIGHT CLOSED OR TIMEOUT, ERROR CODE: 9\r\n\r\nmy code is:\r\n```\r\nonDeviceReady: function () {\r\n    var dev = {};\r\n    app.receivedEvent('deviceready');\r\n    window.bluetooth.enable(function () {\r\n        alert(\"SUCCESS\");\r\n    }, function () {\r\n        alert(\"FAILED\");\r\n    });\r\n    window.bluetooth.startDiscovery(onDeviceDiscovered, onDiscoveryFinished, onError);\r\n\r\n    function onDeviceDiscovered(device) {\r\n        alert(\"Found device \" + device.address);\r\n        if (device.address === \"40:83:DE:4B:D4:12\") { // address of scanner\r\n            window.bluetooth.getUuids(onUuidsRetrieved, onError, device.address);\r\n        }\r\n    }\r\n    function onDiscoveryFinished() {\r\n        alert(\"SUCC FINISHED\");\r\n        if (dev.address === \"40:83:DE:4B:D4:12\") {\r\n            alert(\"Trying to connect...\");\r\n            window.bluetooth.connect(onConnected, onErrorConn, {\r\n                address: dev.address,\r\n                uuid: dev.uuids[0]\r\n            });\r\n        }\r\n    }\r\n      function onConnected() {\r\n        alert(\"Connected\");\r\n    }\r\n\r\n    function onUuidsRetrieved(device) {\r\n        alert(device.address + \" UUID: \" + device.uuids);\r\n        if (device.address === \"40:83:DE:4B:D4:12\") {\r\n            dev = device;\r\n        }\r\n    }\r\n\r\n    function onError() {\r\n        alert(\"ERROR\");\r\n    }\r\n\r\n    function onErrorConn(error) {\r\n        alert(error.code + \" \" + error.message);\r\n    }\r\n\r\n\r\n}\r\n```\r\n\r\nis there something i missing? \r\n\r\nthanks"},"comment":{"url":"https://api.github.com/repos/tanelih/phonegap-bluetooth-plugin/issues/comments/229038448","html_url":"https://github.com/tanelih/phonegap-bluetooth-plugin/issues/42#issuecomment-229038448","issue_url":"https://api.github.com/repos/tanelih/phonegap-bluetooth-plugin/issues/42","id":229038448,"user":{"login":"tanelih","id":3582272,"avatar_url":"https://avatars.githubusercontent.com/u/3582272?v=3","gravatar_id":"","url":"https://api.github.com/users/tanelih","html_url":"https://github.com/tanelih","followers_url":"https://api.github.com/users/tanelih/followers","following_url":"https://api.github.com/users/tanelih/following{/other_user}","gists_url":"https://api.github.com/users/tanelih/gists{/gist_id}","starred_url":"https://api.github.com/users/tanelih/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tanelih/subscriptions","organizations_url":"https://api.github.com/users/tanelih/orgs","repos_url":"https://api.github.com/users/tanelih/repos","events_url":"https://api.github.com/users/tanelih/events{/privacy}","received_events_url":"https://api.github.com/users/tanelih/received_events","type":"User","site_admin":false},"created_at":"2016-06-28T12:47:00Z","updated_at":"2016-06-28T12:47:00Z","body":"I mean \"server\" as in the device which accepts connections and doesn't initiate them. If your app is initiating the connections then it's essentially acting as a \"client\" in this case. 🌚 "}}
{"actor":{"display_login":"tanelih"}}