{"id":14971650,"url":"https://github.com/don/cordova-plugin-rfduino","last_synced_at":"2025-07-19T00:35:58.876Z","repository":{"id":11913163,"uuid":"14478215","full_name":"don/cordova-plugin-rfduino","owner":"don","description":"Cordova (PhoneGap) plugin for RFduino","archived":false,"fork":false,"pushed_at":"2015-10-24T01:57:29.000Z","size":988,"stargazers_count":46,"open_issues_count":4,"forks_count":16,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-01-31T21:34:22.802Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Objective-C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/don.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.txt","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-11-18T00:10:55.000Z","updated_at":"2020-06-25T17:55:35.000Z","dependencies_parsed_at":"2022-09-18T04:40:57.492Z","dependency_job_id":null,"html_url":"https://github.com/don/cordova-plugin-rfduino","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/don%2Fcordova-plugin-rfduino","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/don%2Fcordova-plugin-rfduino/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/don%2Fcordova-plugin-rfduino/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/don%2Fcordova-plugin-rfduino/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/don","download_url":"https://codeload.github.com/don/cordova-plugin-rfduino/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238366796,"owners_count":19460186,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-09-24T13:45:36.677Z","updated_at":"2025-02-11T20:31:48.755Z","avatar_url":"https://github.com/don.png","language":"Objective-C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RFduino Plugin for PhoneGap\n\nThis plugin enabled Bluetooth communication between a phone and an [RFduino](http://www.rfduino.com/).\n\n## Supported Platforms\n\n* iOS\n* Android 4.3 or greater\n\n## Limitations\n\nThe can only connect to one RFduino at a time. Use the [BLE plugin](https://github.com/don/cordova-plugin-ble-central) to connect to multiple devices at the same time.\n\nrfduino.write() does not check if data exceeds the max size.\n\n# Installing\n\nInstall with Cordova cli\n\n    $ cordova plugin add cordova-plugin-rfduino\n\n# API\n\n## Methods\n\n- [rfduino.discover](#discover)\n- [rfduino.list](#list)\n\n- [rfduino.connect](#connect)\n- [rfduino.disconnect](#disconnect)\n\n- [rfduino.onData](#ondata)\n- [rfduino.write](#write)\n\n- [rfduino.isEnabled](#isenabled)\n- [rfduino.isConnected](#isconnected)\n\n\n## discover\n\nDiscover RFduino devices\n\n    rfduino.discover(seconds, success, failure);\n\n### Description\n\nFunction `discover` discovers the local RFduino devices.  The success callback is called each time a peripheral is discovered.\n\n    {\n        \"name\": \"RFduino\",\n        \"uuid\": \"BD922605-1B07-4D55-8D09-B66653E51BBA\",\n        \"advertising\": \"echo\",\n        \"rssi\": -79\n    }\n\n### Parameters\n\n- __seconds__: Number of seconds to run discovery\n- __success__: Success callback function that is invoked with a list of bonded devices.\n- __failure__: Error callback function, invoked when error occurs. [optional]\n\n### Quick Example\n\n    rfduino.discover(3, function(device) {\n        console.log(JSON.stringify(device));\n    }, failure);\n\n## list\n\nLists known devices\n\n    rfduino.list(success, failure);\n\n### Description\n\nFunction `list` lists the known RFduino devices.  The success callback is called with a list of objects.\n\nThis will return an empty list unless `discover` have previously run. You should prefer `discover` to `list`.\n\n    [{\n        \"name\": \"RFduino\",\n        \"uuid\": \"AEC00232-2F92-4033-8E80-FD4C2533769C\",\n        \"advertising\": \"echo\",\n        \"rssi\": -79\n    }, {\n        \"name\": \"RFduino\",\n        \"uuid\": \"AEC00232-2F92-4033-8E80-FD4C2533769C\",\n        \"advertising\": \"temp\",\n        \"rssi\": -55\n    }]\n\n### Parameters\n\n- __success__: Success callback function that is invoked with a list of bonded devices.\n- __failure__: Error callback function, invoked when error occurs. [optional]\n\n### Quick Example\n\n    rfduino.list(function(devices) {\n        devices.forEach(function(device) {\n            console.log(device.uuid);\n        })\n    }, failure);\n\n\n## connect\n\nConnect to a RFduino device.\n\n    rfduino.connect(uuid, connectSuccess, connectFailure);\n\n### Description\n\nFunction `connect` connects to a RFduino device.  The callback is long running.  Success will be called when the connection is successful.  Failure is called if the connection fails, or later if the connection disconnects. An error message is passed to the failure callback.\n\n### Parameters\n\n- __uuid__: UUID of the remote device\n- __connectSuccess__: Success callback function that is invoked when the connection is successful.\n- __connectFailure__: Error callback function, invoked when error occurs or the connection disconnects.\n\n## disconnect\n\nDisconnect.\n\n    rfduino.disconnect([success], [failure]);\n\n### Description\n\nFunction `disconnect` disconnects the current connection.\n\n### Parameters\n\n- __success__: Success callback function that is invoked when the connection is successful. [optional]\n- __failure__: Error callback function, invoked when error occurs. [optional]\n\n## onData\n\nAdds a callback for processing data from the RFduino.\n\n    rfduino.onData(success, failure);\n\n### Description\n\nFunction `onData` registers a function that is called whenever phone receives data from the RFduino.\n\nRaw data is passed from ObjectiveC the callback as an [ArrayBuffer](http://www.html5rocks.com/en/tutorials/webgl/typed_arrays/) and must be processed.\n\n### Parameters\n\n- __success__: Success callback function that is invoked when the connection is successful. [optional]\n- __failure__: Error callback function, invoked when error occurs. [optional]\n\n## write\n\nWrites data to the currently connected device\n\n    rfduino.write(data, success, failure);\n\n### Description\n\nFunction `write` writes data to the connected device.  Data must be an ArrayBuffer for this version.\n\n### Parameters\n\n- __data__: ArrayBuffer to write to the RFduino\n- __success__: Success callback function that is invoked when the connection is successful. [optional]\n- __failure__: Error callback function, invoked when error occurs. [optional]\n\n### Quick Example\n\n    var data = new ArrayBuffer(3);\n    data[0] = 0xFF;\n    data[1] = 0x00;\n    data[2] = 0x17;\n    rfduino.write(data.buffer, success, failure);\n\n## isConnected\n\nReports the connection status.\n\n    rfduino.isConnected(success, failure);\n\n### Description\n\nFunction `isConnected` calls the success callback when connected to a peer and the failure callback when *not* connected.\n\n### Parameters\n\n- __success__: Success callback function that is invoked with a boolean for connected status.\n- __failure__: Error callback function, invoked when error occurs. [optional]\n\n### Quick Example\n\n    rfduino.isConnected(\n        function() {\n            console.log(\"RFduino is connected\");\n        },\n        function() {\n            console.log(\"RFduino is *not* connected\");\n        }\n    );\n\n## isEnabled\n\nReports if bluetooth is enabled.\n\n    rfduino.isEnabled(success, failure);\n\n### Description\n\nFunction `isEnabled` calls the success callback when Bluetooth is enabled and the failure callback when Bluetooth is *not* enabled.\n\n### Parameters\n\n- __success__: Success callback function that is invoked with a boolean for connected status.\n- __failure__: Error callback function, invoked when error occurs. [optional]\n\n### Quick Example\n\n    rfduino.isEnabled(\n        function() {\n            console.log(\"Bluetooth is enabled\");\n        },\n        function() {\n            console.log(\"Bluetooth is *not* enabled\");\n        }\n    );\n\n# License\n\nApache 2.0\n\n# Feedback\n\nTry the code. If you find an problem or missing feature, file an issue or create a pull request.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdon%2Fcordova-plugin-rfduino","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdon%2Fcordova-plugin-rfduino","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdon%2Fcordova-plugin-rfduino/lists"}