{"id":23891618,"url":"https://github.com/stephendade/rockblock2mav","last_synced_at":"2025-04-15T03:46:14.312Z","repository":{"id":148321115,"uuid":"508533606","full_name":"stephendade/rockblock2mav","owner":"stephendade","description":"RockBlock to MAVLink gateway","archived":false,"fork":false,"pushed_at":"2025-03-23T09:32:34.000Z","size":810,"stargazers_count":6,"open_issues_count":2,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-15T03:46:09.450Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stephendade.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-29T03:33:42.000Z","updated_at":"2025-03-23T09:32:38.000Z","dependencies_parsed_at":null,"dependency_job_id":"888985f4-4a9b-44b2-9093-1b894c3ae50c","html_url":"https://github.com/stephendade/rockblock2mav","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephendade%2Frockblock2mav","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephendade%2Frockblock2mav/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephendade%2Frockblock2mav/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stephendade%2Frockblock2mav/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stephendade","download_url":"https://codeload.github.com/stephendade/rockblock2mav/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249003938,"owners_count":21196794,"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":"2025-01-04T13:00:11.780Z","updated_at":"2025-04-15T03:46:14.294Z","avatar_url":"https://github.com/stephendade.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RockBlock to MAVLink gateway\n\nSimple Python script for sending and receiving MAVLink messages using the RockBlock SBD modems, allowing **worldwide** telemetry with an ArduPilot platform.\n\nThis gateway runs on the GCS, and will send/recieve MAVLink messages between the GCS and RockBlock servers.\n\nDue to bandwidth constraints (50 bytes per message) MAVLink 1 is used, as it uses slightly less bytes per message\ncompared to MAVLink2. An option is available (``-mav20``) to convert messages to/from MAVLink V2 on the GCS side. This allows the GCS to continue using MAVLink V2.\n\nThere are two methods to run the gateway for recieving packets:\n- Using Adafuit.io (https://io.adafruit.com/) to recieve the packets\n- Using a public-facing webserver to recieve the packets\n\nRequired hardware, software and services:\n- Rockblock Modem (such as https://www.sparkfun.com/products/14498 and cable https://www.sparkfun.com/products/14720)\n- ArduPilot 4.4+ with a flight controller capable of running Lua scripts\n- Active RockBlock account (https://rockblock.rock7.com/Operations)\n\n## Using adafruit.io\nAn Adafuit.io account (https://io.adafruit.com/) is required.\n\n\u003cimg src=\"https://raw.githubusercontent.com/stephendade/rockblock2mav/main/diagram.jpg\" width=\"400\"\u003e\n\n### Setup:\n1. Connect the Rockblock modem to a spare UART on the flight controller. Only the +5V, RX, TX and GND lines need to be connected\n2. Ensure the modem is activated in the RockBlock account\n3. Create a new feed on adafuit.io. Ensure the Feed History is OFF and a webhook is active. Connect this to your Rockblock account (https://learn.adafruit.com/using-the-rockblock-iridium-modem/forwarding-messages).\n4. Copy the Ardupilot Rockblock Lua script to the flight controller, configuring as required.\n5. On the GCS install the required Python libraries via ``pip3 install adafruit-io pymavlink --user``\n6. On the GCS run rockblock2mav-adafruit.py to process the packets. By default it will send/receive telemetry on 127.0.0.1:16000\n\n### Commandline options\n- ``-adafruitusername``       Adafruit.io username\n- ``-adafruitfeed``           Adafruit.io feed name\n- ``-adafruitkey``            Adafruit.io API key\n- ``-imei``                   Iridium Modem IMEI number\n- ``-out``                    MAVLink connection string (default: udpin:127.0.0.1:16000) to GCS\n- ``-rock7username``          Rock7 account username\n- ``-rock7password``          Rock7 account password\n- ``-debug``             MAVLink connection string to view messages sent to the vehicle\n- ``-mav20``             Use MAVLink V2 messages on ``-out``, instead of MAVLink V1\n\n## Using a public webserver\nA server (such as Amazon EC2) with a public URL is required.\n\n### Setup:\n1. Connect the Rockblock modem to a spare UART on the flight controller. Only the +5V, RX, TX and GND lines need to be connected\n2. Ensure the modem is activated in the RockBlock account\n3. Copy the Ardupilot Rockblock Lua script to the flight controller, configuring as required.\n4. On the server install the required Python libraries via ``pip3 install pymavlink flask --user``\n5. Ensure the server has an open http port (5000 by default), with the Rockblock IP addresses whitelisted (https://docs.groundcontrol.com/iot/rockblock/web-services/integration)\n6. In your rockblock account, add a HTTP_POST Delivery Address in the format ``http://\u003cyour url\u003e:5000/rock``\n7. On the Server run rockblock2mav-webhook.py to process the packets. By default it will send/receive telemetry on 127.0.0.1:16000\n\n### Commandline options\n- ``-imei``              Iridium Modem IMEI number\n- ``-out``               MAVLink connection string (default: udpin:127.0.0.1:16000) to GCS\n- ``-rock7username``     Rock7 account username\n- ``-rock7password``     Rock7 account password\n- ``-tcpinput``          Public ip and port to bind to, for the Rock7 webhook. In format \u003cIP\u003e:\u003cport\u003e\n- ``-debug``             MAVLink connection string to view messages sent to the vehicle\n- ``-mav20``             Use MAVLink V2 messages on ``-out``, instead of MAVLink V1\n\n## SystemD Service\n\nFor running unattended, a Systemd service is provided at ``rockblock2mav.service``. The file will need to be edited to have the correct user and folder specified (current default is user \"pi\"), along with the Rockblock account details\n\nTo install the service, run the following:\n```\nsudo cp rockblock2mav.service /etc/systemd/system\nsudo systemctl daemon-reload\nsudo systemctl enable rockblock2mav.service\nsudo systemctl start rockblock2mav.service\n```\n\n## GCS Connections\n\nNote for QGC users:\n- Use the \"udpin\" output option, as the default \"udpout\" isn't compatible. For example ``rockblock2mav-adafruit.py -out:udpout:127.0.0.1:16000``\n\nNote that Mission Planner has limited support at this time.\n\n## Limitations:\n- The flight controller will only send HIGH_LATENCY2 MAVlink messages. This will give basic position and status information. This message\nis sent once per 60 seconds by default\n- The Rockblock modem does require a full view of the sky to work reliably. It will not work indoors.\n- Only the MAVLink messages ``COMMAND_LONG``, ``COMMAND_INT``, ``MISSION_ITEM_INT``, ``MISSION_SET_CURRENT`` and ``SET_MODE`` are sent from the GCS to the Rockblock.\n- The only command messages sent from the GCS to the Rockblock modem are the following:\n  - ``MAV_CMD_NAV_RETURN_TO_LAUNCH``\n  - ``MAV_CMD_NAV_LAND``\n  - ``MAV_CMD_NAV_TAKEOFF``\n  - ``MAV_CMD_NAV_VTOL_TAKEOFF``\n  - ``MAV_CMD_NAV_VTOL_LAND``\n  - ``MAV_CMD_DO_SET_MODE``\n  - ``MAV_CMD_DO_CHANGE_SPEED``\n  - ``MAV_CMD_DO_SET_SERVO``\n  - ``MAV_CMD_DO_PARACHUTE``\n  - ``MAV_CMD_MISSION_START``\n  - ``MAV_CMD_COMPONENT_ARM_DISARM``\n  - ``MAV_CMD_DO_REPOSITION``\n  - ``MAV_CMD_CONTROL_HIGH_LATENCY``\n  \n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephendade%2Frockblock2mav","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstephendade%2Frockblock2mav","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstephendade%2Frockblock2mav/lists"}