{"id":20885289,"url":"https://github.com/lab11/im880-serial-comm","last_synced_at":"2026-04-11T22:09:58.887Z","repository":{"id":57270535,"uuid":"70621833","full_name":"lab11/iM880-serial-comm","owner":"lab11","description":"npm package for serial communication with iM880","archived":false,"fork":false,"pushed_at":"2017-04-03T22:53:23.000Z","size":28,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":15,"default_branch":"master","last_synced_at":"2025-02-19T08:47:56.454Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lab11.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-10-11T18:10:23.000Z","updated_at":"2023-11-12T13:21:49.000Z","dependencies_parsed_at":"2022-09-14T06:32:13.279Z","dependency_job_id":null,"html_url":"https://github.com/lab11/iM880-serial-comm","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lab11%2FiM880-serial-comm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lab11%2FiM880-serial-comm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lab11%2FiM880-serial-comm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lab11%2FiM880-serial-comm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lab11","download_url":"https://codeload.github.com/lab11/iM880-serial-comm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243267280,"owners_count":20263799,"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-11-18T08:13:02.107Z","updated_at":"2025-12-28T02:17:08.706Z","avatar_url":"https://github.com/lab11.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"iM880 Serial Communications\n===========================\n**Note**: This is for use with the WiMOD LR Base firmware (has been tested using v1.12) \n\nThis script allows the iM880 to be configured, receive confirmed messages, and \n    send confirmed messages all over a serial port.\n- The file `configuration.info` are the selected configuration parameters based\n    on our use case.\n- Based on the [iM880](http://www.wireless-solutions.de/products/radiomodules/im880b-l.html).\n\nUsage\n--------\n\n```javascript\nvar iM880 = require('iM880');\n\n// call the constructor with a deviceID and deviceGroup\nSERIAL_PORT  = '/dev/ttyUSB1'; // serial port to connect to\nDEVICE_ID    = 0x04; // in range [0x0000, 0xFFFF)\nDEVICE_GROUP = 0x10; // in range [0x00, 0xFF)\nSF = 10;  // spreading factor, optional argument, defaults to 10\nBANDWIDTH = 125000; // bandwidth, optional argument, defaults to 125000\nERROR_CODING = 4/5; // error coding, optional argument, defaults to 4/5\nTX_PWR = 20; // transmit power in dBm, optional argument, defaults to 20\ndevice = new iM880(SERIAL_PORT, DEVICE_ID, DEVICE_GROUP, SF, BANDWIDTH, ERROR_CODING, TX_PWR);\n\n// callback for when constructor done and device configured\ndevice.on('config-done', function(statusmsg) {\n    // print the meaning of status byte\n    console.log('Config status: ' + statusmsg);\n    \n    if( statusmsg == 'successful!' ){\n        // make a packet and send it\n        var msg = new Uint8Array([ 4, 67, 23, 12, 90, 100]);\n        DEST_DEVICE_ID    = 0x09; // in range [0x0000, 0xFFFF)\n        DEST_DEVICE_GROUP = 0x10; // in range [0x00, 0xFF)\n        device.sendConfirmed(DEST_DEVICE_ID, DEST_DEVICE_GROUP, msg);\n        var broadcast_msg = new Uint8Array([ 5, 8, 9]);\n        device.sendBroadcast(broadcast_msg);\n   }\n});\n\n// callback for reception of a confirmed message\ndevice.on('rx-msg', function(rxmsg) {\n    console.log(rxmsg);\n});\n\n// callback for when a transmit message completed and status\ndevice.on('tx-msg-done', function(statusmsg) {\n    console.log('Tx-status: ' + statusmsg);\n}\n```\n\nExample `rx-msg` Packet\n----------------------\n**Note**: This message would be received by the other iM880 in the example \n        (`DEVICE_ID=0x09`, `DEVICE_GROUP=0x10`)\n\n```\n{\n    destGroupAddr   : 16,\n    destDeviceAddr  : 9,\n    srcGroupAddr    : 16,\n    srcDeviceAddr   : 4,\n    payload         : [4, 67, 23, 12, 90, 100],\n    receivedTime    : 2016-10-10T17:38:49.198Z\n}\n```\n\n- `destGroupAddr`: Group address of destination device (iM880 receiving message).\n- `destDeviceAddr`: Device address of destination device (iM880 receiving message).\n- `srcGroupAddr`: Group address of source device (iM880 transmitting message).\n- `srcDeviceAddr`: Device address of source device (iM880 transmitting message).\n- `payload`: Message being sent.\n- `receivedTime`: Timestamp message was received at.\n\n\nRunning examples\n-------------------\n- Notice the files `example/tx-example.js` and `example/rx-example.js`, they can\n   be used to quickly test your LoRa system:\n\n1. Run `node rx-example.js` to open an iM880 waiting to receive messages.\n2. Run `node tx-example.js` in another terminal to open an iM880 that will \n        transmit messages.\n3. After running both your output should be:\n    * for `rx-example.js`: \n   \n   ```\n    Configuration status: successful!\n    Received message!!\n    {\n        //your received message\n    }\n    ```\n   \n   * for `tx-example.js`:\n   \n   ```\n    Configuration status: successful!\n    Tx-status: successful!\n    ```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flab11%2Fim880-serial-comm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flab11%2Fim880-serial-comm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flab11%2Fim880-serial-comm/lists"}