# Device-to-Device communication with Device Connect

## In this learning path

- [Introduction](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/device-connect-d2d/)
- [Why device-to-device at the edge](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/device-connect-d2d/background/)
- [Device Connect developer model](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/device-connect-d2d/overview/)
- [Set up D2D communication between a sensor and a monitor](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/device-connect-d2d/d2d-setup/)
- [Next Steps](https://learn.arm.com/learning-paths/embedded-and-microcontrollers/device-connect-d2d/_next-steps/)

## About this Learning Path

|  |  |
| --- | --- |
| Skill level: | Introductory |
| Reading time: | 25 min |
| Last updated: | 08 Jul 2026 |

|  |
| --- |
| Authors: |
| Kavya Sri Chennoju , Arm<br>[GitHub](https://github.com/kavya-chennoju)<br>[LinkedIn](https://linkedin.com/in/kavya-sri-chennoju)<br>Annie Tallund , Arm<br>[GitHub](https://github.com/annietllnd)<br>[LinkedIn](https://linkedin.com/in/annietallund) |
| Arm IP: |
| [Cortex-A](https://support.arm.com/?tab=compute-ip&Product%20Type=Application%20Processors) |
| Tags: |
| [Libraries](https://learn.arm.com/tag/libraries/) [Linux](https://learn.arm.com/tag/linux) [macOS](https://learn.arm.com/tag/macos) [Windows](https://learn.arm.com/tag/windows) [Python](https://learn.arm.com/tag/python) |

|  |  |
| --- | --- |
| Authors: | Kavya Sri Chennoju , Arm<br>[GitHub](https://github.com/kavya-chennoju)<br>[LinkedIn](https://linkedin.com/in/kavya-sri-chennoju)<br>Annie Tallund , Arm<br>[GitHub](https://github.com/annietllnd)<br>[LinkedIn](https://linkedin.com/in/annietallund) |
| Arm IP: | [Cortex-A](https://support.arm.com/?tab=compute-ip&Product%20Type=Application%20Processors) |
| Tags: | [Libraries](https://learn.arm.com/tag/libraries/) [Linux](https://learn.arm.com/tag/linux) [macOS](https://learn.arm.com/tag/macos) [Windows](https://learn.arm.com/tag/windows) [Python](https://learn.arm.com/tag/python) |

## Who is this for?
This is an introductory topic for developers wiring up heterogeneous edge fleets, where devices need a shared way to find each other and a shared way to be controlled by agents. Device Connect provides this communication protocol between agents and devices, and standardizes how devices from different vendors advertise themselves and exchange structured messages, so both peer devices and AI agents can discover and invoke them through the same driver model. You'll use a Raspberry Pi 5 as the example primary edge device, but the same flow works with another device or with your development machine acting as a simulated device.

## What will you learn?
After completing this Learning Path, you'll be able to perform the following tasks:
- Understand Device Connect Edge SDK primitives
- Set up a Python environment for Device Connect on an example edge device and a development machine
- Build two device runtimes, with the primary sensor runtime shown on a Raspberry Pi 5
- Use the Device Connect agent tools to discover both devices on the mesh and invoke their RPCs

## Prerequisites
Before starting, you'll need the following prerequisites:
- Basic familiarity with Python and the command line
- A Raspberry Pi 5, another Linux device, or your development machine to use as the example primary device
- A development machine on the same local network if you run the example across two machines

## Summary
You’ll build two Python-based device runtimes with the Device Connect Edge SDK and wire them into a local device-to-device workflow without cloud infrastructure. First, you’ll define device behavior by subclassing `DeviceDriver`, annotating methods with SDK decorators, and bringing the driver online with `DeviceRuntime`. A Raspberry Pi 5 acts as the primary sensor device publishing temperature and humidity, while a threshold monitor on a development machine subscribes to those readings and raises an alert when a limit is crossed. Using Device Connect agent tools, you’ll discover both devices on the mesh, verify pub/sub traffic, and invoke exposed RPCs to confirm the runtimes are visible and controllable end to end.
