This is experimental implementation of DSR for simple wireless networks. Created with nRF24L01 and RFM12 radio modules and simple uC's in mind.
Dynamic source routing protocol is used as a network layer in mesh-type networks architecture. This particular implementation is loosely based on following document for IPv4 networks:
WIP
This implementation defines 7 types of DSR headers (options):
- Route error (RERR)
- Route request (RREQ)
- Route reply (RREP)
- Acknowledge request (AREQ)
- Acknowledge reply (AREP)
- Route (ROUT)
- Data (DATA)
In general each option has this form of header:
+------+--------+-----------------------------------------+
| TYPE | LENGTH | {option dependent variable length part} |
| 1 | 1 | 1 - N |
+------+--------+-----------------------------------------+
Several options can create single packet. They are concatenated.
Requirements for lower level layers:
- Source and target addresses
- Length of whole payload
+------+--------+----------+--------+--------+
| TYPE | LENGTH | ERR_TYPE | SOURCE | TARGET |
| 1 | 1 | 1 | 1 | 1 |
+------+--------+----------+--------+--------+
- TYPE = 0x01
- May appear more than once in single packet
+------+--------+--------------------------------+
| TYPE | LENGTH | ID | TARGET | ADDRESS_LIST |
| 1 | 1 | 1 | 1 | 0 - N |
+------+--------+--------------------------------+
- TYPE = 0x02
- May appear only once in single packet
- ADDRESS_LIST - on requester node this field is empty. It's getting filled by every node this option travels through.
+------+--------+--------------+
| TYPE | LENGTH | ADDRESS_LIST |
| 1 | 1 | 1 - N |
+------+--------+--------------+
- TYPE = 0x03
- May appear more than once in single packet
+------+--------+--------+
| TYPE | LENGTH | ID |
| 1 | 1 | 1 |
+------+--------+--------+
- TYPE = 0x04
- May appear only once in single packet
+------+--------+--------+------------+------------+
| TYPE | LENGTH | ID | ACK_SOURCE | ACK_TARGET |
| 1 | 1 | 1 | 1 | 1 |
+------+--------+--------+------------+------------+
- TYPE = 0x05
- May appear more than once in single packet
+------+--------+-----------+--------------+
| TYPE | LENGTH | SEGS_LEFT | ADDRESS_LIST |
| 1 | 1 | 1 | 1 - N |
+------+--------+-----------+--------------+
- TYPE = 0x06
- May appear only once in single packet
+------+--------+--------+
| TYPE | LENGTH | DATA |
| 1 | 1 | 1 - N |
+------+--------+--------+
- TYPE = 0x07
- May appear only once in single packet