EmbeddedRelated.com
Forums
Memfault Beyond the Launch

XBee Sleep Mode Integration with LPC2148

Started by Shashank Maheshwari December 4, 2012
Hi Guys

I have been running XBee 2 (from Digi Corp) in the AT transparent mode and
it communicates well with the LPC using UART.

1. I am facing issues with putting it into sleep mode. According to the
manual pin 9 is the "sleep control" pin and pin 13 is the "sleep status"
pin.

Even by changing the pin state at 9th pin the state of 13th pin remains
high (signifying the active state of the module) thus the module does not
enter the sleep state at all. What step am I doing wrong ?

2. Presently I am making a P2P communication. Is it possible to form a
network with one coordinator and multiple end devices in the transparent
mode ?

Rgds
Shashank
--
Shashank Maheshwari


An Engineer's Guide to the LPC2100 Series

hello,
yes we can connect one cordinator with multiple end devices using xctu software it assign mac address to xbees
paste the code then it will be clear ?
what type lpc2148 board u r using i mean the type of board?

Send me the code i will help you out. Where s the mistake is?
I think P2P connections configure ports properly. Please check the status in debugger.
contact me: m...@yahoo.co.in



hi

thanks for the reply guys... I have figured out something like this (in AT
mode)...

to make a multipoint network make one of the xbees as coordinator with
broadcast mode ie. (in X-CTU)
Destination Address Low (DL) = 0xffff
Destination Address High (DH) = 0x00

While for the router/end device
Destination Address Low (DL) = lower MAC address bits of coordinator
Destination Address High (DH) = higher MAC address bits of coordinator

Does that make sense ? Does that mean after those settings I can add
maximum permissible end devices/router with one coordinator ?

I do not understand about the code as the whole configuration is done in
X-CTU only. The code majorly takes care of the UART activity and the sleep
pin only(which is a simple GPIO).

Do we need to make additional settings or changes in the X-CTU to activate
pin 9 as the sleep pin as when I see data sheet I see its multiplexed as
DTR / SLEEP_RQ / DI8. How do I know that the pin default function is
SLEEP_RQ only and not DTR. What settings do I need to make in the XCTU so
that when I make this pin high the module sleeps and go into low power
state ?

Any pointers will be really helpful !

Rgds
Shashank

On Tue, Dec 4, 2012 at 6:27 PM, preethamreddy1989 <
p...@yahoo.com> wrote:

> **
> hello,
> yes we can connect one cordinator with multiple end devices using xctu
> software it assign mac address to xbees
> paste the code then it will be clear ?
> what type lpc2148 board u r using i mean the type of board?
>
>
>

--
Shashank Maheshwari


Hi Shashank,
I dont`n have now a Xbee 2 radio, only a Xbee wifi module, but the especifications are the same.
It`s right, pin 9 (DIO8) is the sleep control (enter in sleep mode on high level and wake up on low level) and pin 13 (DIO9) is the sleep indicator (this pin is high if the module is in sleep and low if the module is waked up).
This functions aren`t default on the Xbee configuration and you need to change it using X-CTU software or AT comands (I recomend use X-CTU software). You need to configure DIO8 to Sleep request and DIO9 to sleep indicator. You need to configure too the Sleep Mode parameter (SM) to Pin Sleep.
In AT transparent mode, the Xbee radio will not be noted by processor, it works why a serial-to-serial conection and do not need more configurations by user firmeware (If you send serial data out the processor 1, the processor 2 will receive it directly). Note that the Xbee modules can have a delay time up to 2 seconds and you need to consider this comunication delay in some aplicattions.
Conecting multiple end devices (or AT routers) on a AT cordinator in transparent mode is easy. You need to set the PAN ID the same for all devices and, on the end devices (or AT routers), complete the destination address (high and low) with coordinatior serial number (you don’t need to configure destination address on coordinator). In this case, you need addressing all the network devices because the coordinator will send the message to all the conected devices (I actualy use MODBUS RTU protocol, but you can use your own protocol). All the conected devices will be answer to, and only to, the coordinator.
Depends of the lengh of your network, I suggest to use the AT Router mode. It works like a end device, but in this configuration it can too resend your packets (same a access point) to the cordinator (if your end devices do not have direct connection to coordinator). End devices will not resend packets.
On networks I sugest too that you use ciclic sleep with very low wake up and sleep times, so the devices can be waked up by network coordinator by sending a data packet.
Sent me your xbee moden type (I thing it is XBP24-ZB) und the firmeware version than I can give you more details.

Regards,
Mauro Lenz

From: Shashank Maheshwari
Sent: Tuesday, December 04, 2012 3:50 AM
To: l...
Subject: [lpc2000] XBee Sleep Mode Integration with LPC2148


Hi Guys

I have been running XBee 2 (from Digi Corp) in the AT transparent mode and
it communicates well with the LPC using UART.

1. I am facing issues with putting it into sleep mode. According to the
manual pin 9 is the "sleep control" pin and pin 13 is the "sleep status"
pin.

Even by changing the pin state at 9th pin the state of 13th pin remains
high (signifying the active state of the module) thus the module does not
enter the sleep state at all. What step am I doing wrong ?

2. Presently I am making a P2P communication. Is it possible to form a
network with one coordinator and multiple end devices in the transparent
mode ?

Rgds
Shashank
--
Shashank Maheshwari





Hi Mauro

Thanks for the reply. I am using an XB24-B with firmware version 1220.
I saw the option of sleep modes.
Your reply was very informative. However there are a few more issues :
1. I am trying to use one coordinator with multiple end devices which also
act as routers ("ZIGBEE ROUTER/END DEVICE AT") so they essentially also act
as router or bridge for the far off sensors. But since I am trying to use
sleep pin on the end device (to make it maximum energy efficient) to make
them sleep they lose their ability of router thus making the network
essentially STAR topology type (Correct me if I am wrong here). I want the
power consumption to reach in uA for majority of the time at the end device
since I am using battery to operate it.

This led me to a solution to either
1. install individual routers
2. use cyclic sleep mode... but I guess I will still keep the average
energy consumption in mA when not in use
3. use longer range XBee modules

Is there any other solution available or am I missing any thing? Is there a
good guide on XBee modules selection ?
Any pointers in this regard will be really helpful.

Rgds
Shashank
On Wed, Dec 5, 2012 at 2:14 AM, Mauro Luiz Lenz wrote:

> **
> Hi Shashank,
> I dont`n have now a Xbee 2 radio, only a Xbee wifi module, but the
> especifications are the same.
> It`s right, pin 9 (DIO8) is the sleep control (enter in sleep mode on high
> level and wake up on low level) and pin 13 (DIO9) is the sleep indicator
> (this pin is high if the module is in sleep and low if the module is waked
> up).
> This functions aren`t default on the Xbee configuration and you need to
> change it using X-CTU software or AT comands (I recomend use X-CTU
> software). You need to configure DIO8 to Sleep request and DIO9 to sleep
> indicator. You need to configure too the Sleep Mode parameter (SM) to Pin
> Sleep.
> In AT transparent mode, the Xbee radio will not be noted by processor, it
> works why a serial-to-serial conection and do not need more configurations
> by user firmeware (If you send serial data out the processor 1, the
> processor 2 will receive it directly). Note that the Xbee modules can have
> a delay time up to 2 seconds and you need to consider this comunication
> delay in some aplicattions.
> Conecting multiple end devices (or AT routers) on a AT cordinator in
> transparent mode is easy. You need to set the PAN ID the same for all
> devices and, on the end devices (or AT routers), complete the destination
> address (high and low) with coordinatior serial number (you dont need to
> configure destination address on coordinator). In this case, you need
> addressing all the network devices because the coordinator will send the
> message to all the conected devices (I actualy use MODBUS RTU protocol, but
> you can use your own protocol). All the conected devices will be answer to,
> and only to, the coordinator.
> Depends of the lengh of your network, I suggest to use the AT Router mode.
> It works like a end device, but in this configuration it can too resend
> your packets (same a access point) to the cordinator (if your end devices
> do not have direct connection to coordinator). End devices will not resend
> packets.
> On networks I sugest too that you use ciclic sleep with very low wake up
> and sleep times, so the devices can be waked up by network coordinator by
> sending a data packet.
> Sent me your xbee moden type (I thing it is XBP24-ZB) und the firmeware
> version than I can give you more details.
>
> Regards,
> Mauro Lenz
>
> From: Shashank Maheshwari
> Sent: Tuesday, December 04, 2012 3:50 AM
> To: l...
> Subject: [lpc2000] XBee Sleep Mode Integration with LPC2148
> Hi Guys
>
> I have been running XBee 2 (from Digi Corp) in the AT transparent mode and
> it communicates well with the LPC using UART.
>
> 1. I am facing issues with putting it into sleep mode. According to the
> manual pin 9 is the "sleep control" pin and pin 13 is the "sleep status"
> pin.
>
> Even by changing the pin state at 9th pin the state of 13th pin remains
> high (signifying the active state of the module) thus the module does not
> enter the sleep state at all. What step am I doing wrong ?
>
> 2. Presently I am making a P2P communication. Is it possible to form a
> network with one coordinator and multiple end devices in the transparent
> mode ?
>
> Rgds
> Shashank
> --
> Shashank Maheshwari
>
>
>
>
>
>
>

--
Shashank Maheshwari


Hi Shashank,

you are using ZNET network. I'm use ever ZIGBEE networks (is easiest to work
and designed for mesh networks) and my considerations are about ZIGBEE mesh
networks (but I think they are the same for both). If you want, you can use
your xbee hardware and update the firmeware to a ZIGBEE type too.
About your questions: you're right, if you use the sleep mode for the
devices, they stop to router your packets.

And yes, using ciclic sleep mode the averange energy consumtion will in mA
(I use this mode for one application, it is solar powered, and the
consumption is 15-20 mA average ).

You can try some alternatives:
1. Use one router (without sleep) for a group of end devices (with sleep).
So you will have less modules with a high power consumption.

2. I don't know your sensor and requests and what you are monitoring, but
you can try using only the xbee module for sensing (using your analog and
digital inputs for this). I have test this one time and was able to reduce
the average consumption significantly. So you can use ciclic sleep with a
very large sleep time and a very short wake time.

3. Use the XBEE PRO S2 modules. The PRO modules have up to 50mW power (not
PRO modules have around 2mW). I reached 1200 meters with PRO modules on
outdoor aplicattions, but his power consumption on this distance
transmissions is a little higher.

I hope my answers can help you.

Regards,
Mauro Lenz
-----Mensagem Original-----
From: Shashank Maheshwari
Sent: Wednesday, December 05, 2012 3:21 AM
To: l...
Subject: Re: [lpc2000] XBee Sleep Mode Integration with LPC2148

Hi Mauro

Thanks for the reply. I am using an XB24-B with firmware version 1220.
I saw the option of sleep modes.
Your reply was very informative. However there are a few more issues :
1. I am trying to use one coordinator with multiple end devices which also
act as routers ("ZIGBEE ROUTER/END DEVICE AT") so they essentially also act
as router or bridge for the far off sensors. But since I am trying to use
sleep pin on the end device (to make it maximum energy efficient) to make
them sleep they lose their ability of router thus making the network
essentially STAR topology type (Correct me if I am wrong here). I want the
power consumption to reach in uA for majority of the time at the end device
since I am using battery to operate it.

This led me to a solution to either
1. install individual routers
2. use cyclic sleep mode... but I guess I will still keep the average
energy consumption in mA when not in use
3. use longer range XBee modules

Is there any other solution available or am I missing any thing? Is there a
good guide on XBee modules selection ?
Any pointers in this regard will be really helpful.

Rgds
Shashank
On Wed, Dec 5, 2012 at 2:14 AM, Mauro Luiz Lenz
wrote:

> **
> Hi Shashank,
> I dont`n have now a Xbee 2 radio, only a Xbee wifi module, but the
> especifications are the same.
> It`s right, pin 9 (DIO8) is the sleep control (enter in sleep mode on high
> level and wake up on low level) and pin 13 (DIO9) is the sleep indicator
> (this pin is high if the module is in sleep and low if the module is waked
> up).
> This functions aren`t default on the Xbee configuration and you need to
> change it using X-CTU software or AT comands (I recomend use X-CTU
> software). You need to configure DIO8 to Sleep request and DIO9 to sleep
> indicator. You need to configure too the Sleep Mode parameter (SM) to Pin
> Sleep.
> In AT transparent mode, the Xbee radio will not be noted by processor, it
> works why a serial-to-serial conection and do not need more configurations
> by user firmeware (If you send serial data out the processor 1, the
> processor 2 will receive it directly). Note that the Xbee modules can have
> a delay time up to 2 seconds and you need to consider this comunication
> delay in some aplicattions.
> Conecting multiple end devices (or AT routers) on a AT cordinator in
> transparent mode is easy. You need to set the PAN ID the same for all
> devices and, on the end devices (or AT routers), complete the destination
> address (high and low) with coordinatior serial number (you don’t need to
> configure destination address on coordinator). In this case, you need
> addressing all the network devices because the coordinator will send the
> message to all the conected devices (I actualy use MODBUS RTU protocol,
> but
> you can use your own protocol). All the conected devices will be answer
> to,
> and only to, the coordinator.
> Depends of the lengh of your network, I suggest to use the AT Router mode.
> It works like a end device, but in this configuration it can too resend
> your packets (same a access point) to the cordinator (if your end devices
> do not have direct connection to coordinator). End devices will not resend
> packets.
> On networks I sugest too that you use ciclic sleep with very low wake up
> and sleep times, so the devices can be waked up by network coordinator by
> sending a data packet.
> Sent me your xbee moden type (I thing it is XBP24-ZB) und the firmeware
> version than I can give you more details.
>
> Regards,
> Mauro Lenz
>
> From: Shashank Maheshwari
> Sent: Tuesday, December 04, 2012 3:50 AM
> To: l...
> Subject: [lpc2000] XBee Sleep Mode Integration with LPC2148
> Hi Guys
>
> I have been running XBee 2 (from Digi Corp) in the AT transparent mode and
> it communicates well with the LPC using UART.
>
> 1. I am facing issues with putting it into sleep mode. According to the
> manual pin 9 is the "sleep control" pin and pin 13 is the "sleep status"
> pin.
>
> Even by changing the pin state at 9th pin the state of 13th pin remains
> high (signifying the active state of the module) thus the module does not
> enter the sleep state at all. What step am I doing wrong ?
>
> 2. Presently I am making a P2P communication. Is it possible to form a
> network with one coordinator and multiple end devices in the transparent
> mode ?
>
> Rgds
> Shashank
> --
> Shashank Maheshwari
>
>
>
>
>

--
Shashank Maheshwari


Hi Mauro

Thanks for the reply. That was really informative. I have got that working.
I think I will rather go for the higher range modules !

Regards
Shashank
On Wed, Dec 5, 2012 at 8:29 PM, Mauro Luiz Lenz wrote:

> **
> Hi Shashank,
>
> you are using ZNET network. I'm use ever ZIGBEE networks (is easiest to
> work
> and designed for mesh networks) and my considerations are about ZIGBEE
> mesh
> networks (but I think they are the same for both). If you want, you can
> use
> your xbee hardware and update the firmeware to a ZIGBEE type too.
> About your questions: you're right, if you use the sleep mode for the
> devices, they stop to router your packets.
>
> And yes, using ciclic sleep mode the averange energy consumtion will in mA
> (I use this mode for one application, it is solar powered, and the
> consumption is 15-20 mA average ).
>
> You can try some alternatives:
> 1. Use one router (without sleep) for a group of end devices (with sleep).
> So you will have less modules with a high power consumption.
>
> 2. I don't know your sensor and requests and what you are monitoring, but
> you can try using only the xbee module for sensing (using your analog and
> digital inputs for this). I have test this one time and was able to reduce
> the average consumption significantly. So you can use ciclic sleep with a
> very large sleep time and a very short wake time.
>
> 3. Use the XBEE PRO S2 modules. The PRO modules have up to 50mW power (not
> PRO modules have around 2mW). I reached 1200 meters with PRO modules on
> outdoor aplicattions, but his power consumption on this distance
> transmissions is a little higher.
>
> I hope my answers can help you.
>
> Regards,
> Mauro Lenz
>
> -----Mensagem Original-----
> From: Shashank Maheshwari
> Sent: Wednesday, December 05, 2012 3:21 AM
> To: l...
> Subject: Re: [lpc2000] XBee Sleep Mode Integration with LPC2148
> Hi Mauro
>
> Thanks for the reply. I am using an XB24-B with firmware version 1220.
> I saw the option of sleep modes.
> Your reply was very informative. However there are a few more issues :
>
> 1. I am trying to use one coordinator with multiple end devices which also
> act as routers ("ZIGBEE ROUTER/END DEVICE AT") so they essentially also act
> as router or bridge for the far off sensors. But since I am trying to use
> sleep pin on the end device (to make it maximum energy efficient) to make
> them sleep they lose their ability of router thus making the network
> essentially STAR topology type (Correct me if I am wrong here). I want the
> power consumption to reach in uA for majority of the time at the end device
> since I am using battery to operate it.
>
> This led me to a solution to either
> 1. install individual routers
> 2. use cyclic sleep mode... but I guess I will still keep the average
> energy consumption in mA when not in use
> 3. use longer range XBee modules
>
> Is there any other solution available or am I missing any thing? Is there a
> good guide on XBee modules selection ?
> Any pointers in this regard will be really helpful.
>
> Rgds
> Shashank
>
> On Wed, Dec 5, 2012 at 2:14 AM, Mauro Luiz Lenz
> wrote:
>
> > **
>
> >
> >
> > Hi Shashank,
> > I dont`n have now a Xbee 2 radio, only a Xbee wifi module, but the
> > especifications are the same.
> > It`s right, pin 9 (DIO8) is the sleep control (enter in sleep mode on
> high
> > level and wake up on low level) and pin 13 (DIO9) is the sleep indicator
> > (this pin is high if the module is in sleep and low if the module is
> waked
> > up).
> > This functions aren`t default on the Xbee configuration and you need to
> > change it using X-CTU software or AT comands (I recomend use X-CTU
> > software). You need to configure DIO8 to Sleep request and DIO9 to sleep
> > indicator. You need to configure too the Sleep Mode parameter (SM) to Pin
> > Sleep.
> > In AT transparent mode, the Xbee radio will not be noted by processor, it
> > works why a serial-to-serial conection and do not need more
> configurations
> > by user firmeware (If you send serial data out the processor 1, the
> > processor 2 will receive it directly). Note that the Xbee modules can
> have
> > a delay time up to 2 seconds and you need to consider this comunication
> > delay in some aplicattions.
> > Conecting multiple end devices (or AT routers) on a AT cordinator in
> > transparent mode is easy. You need to set the PAN ID the same for all
> > devices and, on the end devices (or AT routers), complete the destination
> > address (high and low) with coordinatior serial number (you dont need to
> > configure destination address on coordinator). In this case, you need
> > addressing all the network devices because the coordinator will send the
> > message to all the conected devices (I actualy use MODBUS RTU protocol,
> > but
> > you can use your own protocol). All the conected devices will be answer
> > to,
> > and only to, the coordinator.
> > Depends of the lengh of your network, I suggest to use the AT Router
> mode.
> > It works like a end device, but in this configuration it can too resend
> > your packets (same a access point) to the cordinator (if your end devices
> > do not have direct connection to coordinator). End devices will not
> resend
> > packets.
> > On networks I sugest too that you use ciclic sleep with very low wake up
> > and sleep times, so the devices can be waked up by network coordinator by
> > sending a data packet.
> > Sent me your xbee moden type (I thing it is XBP24-ZB) und the firmeware
> > version than I can give you more details.
> >
> > Regards,
> > Mauro Lenz
> >
> > From: Shashank Maheshwari
> > Sent: Tuesday, December 04, 2012 3:50 AM
> > To: l...
> > Subject: [lpc2000] XBee Sleep Mode Integration with LPC2148
> >
> >
> > Hi Guys
> >
> > I have been running XBee 2 (from Digi Corp) in the AT transparent mode
> and
> > it communicates well with the LPC using UART.
> >
> > 1. I am facing issues with putting it into sleep mode. According to the
> > manual pin 9 is the "sleep control" pin and pin 13 is the "sleep status"
> > pin.
> >
> > Even by changing the pin state at 9th pin the state of 13th pin remains
> > high (signifying the active state of the module) thus the module does not
> > enter the sleep state at all. What step am I doing wrong ?
> >
> > 2. Presently I am making a P2P communication. Is it possible to form a
> > network with one coordinator and multiple end devices in the transparent
> > mode ?
> >
> > Rgds
> > Shashank
> > --
> > Shashank Maheshwari
> >
> >
> >
> >
> >
> >
> > --
> Shashank Maheshwari
>
>
>
>

Memfault Beyond the Launch