# Question about “source routing”

**URL:** <https://forums.digi.com/t/question-about-source-routing/17642>\
**Category:** XBee & XBee Gateway\
**Tags:** xbee\
**Created:** [November 29, 2016, 4:09pm UTC](https://forums.digi.com/t/question-about-source-routing/17642 "2016-11-29T16:09:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![b1302213](https://avatars.discourse-cdn.com/v4/letter/b/ce73a5/32.png) [@b1302213](https://forums.digi.com/u/b1302213)\
**Post date:** [November 29, 2016, 4:09pm UTC](https://forums.digi.com/t/question-about-source-routing/17642/1 "2016-11-29T16:09:25Z")

</div>

I am a user on the XBee PRO S2B. I have some questions about behaviors of “source routing” provided by this product.

For example, it is supposed that a network consists of 1 coordinator and 5 routers (R1, R2, R3, R4, and R5). To send a source routed packet to R4, the application send a “Create Source Route” API frame (0x21).

In this case, the “Create Source Route” API frame is configured as follows.

Create Source Route (API 1)  
Start delimiter: 7E  
Length: 0x0014  
Frame type: 0x21 (Create Source Route)  
Frame ID: 0x00  
64-bit dest. address: 0x0013A200 404A1234  
16-bit dest. address: 0xEEEE  
Route options: 0x00  
Number of addresses: 0x03  
Address 1: 0xCCCC  
Address 2: 0xBBBB  
Address 3: 0xAAAA  
Checksum: 0x18

Device 16-bit address 64-bit address  
R1 0xAAAA  
R2 0xBBBB  
R3 0xCCCC  
R4 0xDDDD 0x0013A200 404A1234  
R5 0xEEEE

Question 1:  
When R5 is located between R2 and R3, is R5 aligned on the route (Coordinator-\>R1-\>R2-\>R3-\>R4) if a source routed packet is issued?

Question 2:  
Is a source routed packet always transferred according according to the provisioning sequence of all intermediate devices?

---

<div class="post-metadata">

**Author:** ![mvut](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/mvut/32/31_2.png) [@mvut](https://forums.digi.com/u/mvut)\
**Post date:** [November 30, 2016, 9:26am UTC](https://forums.digi.com/t/question-about-source-routing/17642/2 "2016-11-30T09:26:01Z")

</div>

Only if there is no other way for data to flow. That is if R2 and R3 are in range, then R5 will not be used.

a source rout packet will always take the least amount of hops as possible and will transfer in the rout specified.
