Cerbuino Bee how to set pin PC13/XBEE SLEEP?

Hello
I use Cerbuino with beta-06-22-2012 drivers and I make test with XBee on COM1 (on XBee slot).

With XBee serie 1 and GBee library it is OK.
With XBee serie 2 and GBee I have some problem with the XBee slee mode: the XBee goes to sleep and not responding.
To solve the problem I want to disable the sleeping mode by setting a 0v voltage on the pin: PC13 / Xbee sleep.

I use this code without success to fix 0v on the pin PC13; I have always 3.3v on the PC13 pin.

using Microsoft.SPOT.Hardware;

        public const Cpu.Pin PC13 = (Cpu.Pin)0x2D;     // PC13/XBEE SLEEP
        public const Cpu.Pin PC14 = (Cpu.Pin)0x2E;     // PC14/XO32

            // Fix Xbee pin9 - Sleep to 0v
            OutputPort outp1 = new OutputPort(PC13, false);  // false : pin is 3.3v, true : pin is 3.3v  =>  It is NOK
            OutputPort outp2 = new OutputPort(PC14, false);  // false : pin is 0v,    true pin is 3.3v    => it OK

My question how to set the state of the pin PC13 ?

Thanks
Christian

@ ChristianJack

Do you have a volt meter to determine if the pin is indeed staying high (3.3v). We ran a simple line of code using the same firmware release and the volt meter is showing the pin is indeed going low (0.0v) and when the code set the pin back to high, it is indeed showing 3.3v. Here is the sample code that was tested:


using System;
using Microsoft.SPOT;
using Microsoft.SPOT.Hardware;
using GHI.OSHW.Hardware;

namespace CerbuinoXBeeSleepPinPC13
{
    public class Program
    {
        public static void Main()
        {
            OutputPort sleepy = new OutputPort(FEZCerberus.Pin.PC13, false);

            sleepy.Write(true);
            sleepy.Write(false);
            Debug.Print(
                Resources.GetString(Resources.StringResources.String1));
        }

    }
}

A break point was set and we stepped through the code changing the status of the pin while using a volt meter.

@ Aron - Thanks; It is OK to set the PC13 pin voltage with your code when the XBee Serie2 is not on the slot.
But when the XBee Serie2 is on the slot I have 0v before Open() COM1port then I have 3.3v. I do not understand why. I search !!!

It is OK with a Sparfun Xbee breakout connected on COM3 and with XBee Serie2 pin9 directly connected to 0v.

It is OK.
My error: I have not declared my variable to control the PC13 pin as global but local at ProgramStarted().
Now I can drive very well XBee serie2 on XBee slot COM1 with this configuration:

Cerbuino + GBee library
XBee serie 2 configured as: XBP24-ZB, ZigBee End Device API, software version 29A0, default parameters
AP=2, SM=1
PC13=0v to set 0v on XBee pin 9 and disable sleeping mode.

If sleeping mode in not disable, when I open the COM1 port, the GBee library send “XBee must be in API mode (AP=2)”.
The reason is that the module sleeps periodically

This problem do not exists with a XBee serie 1 configured as “End Device API”.

Thanks Aron for your help
Best regards
Christian