add scan channel functions to digimesh Xbee module

Dear dev;
I need to add

  • xbeeDM.setScanningChannels(0xFF,0xFF); // Sets all channels to scan
    -xbeeDM.getScanningChannels(); // Gets scanned channel list
    -xbeeDM.setDurationEnergyChannels(3);
    -xbeeDM.energyChannel[0-15]
    -xbeeDM.setDelaySlots(1); // Sets the exponent to start
    xbeeDM. getDelaySlots (); // Gets the exponent to start
    -xbeeDM.setEnergyThreshold(0x2C); // Sets the threshold

  • xbeeDM.getEnergyThreshold (); // Gets the threshold
    -xbeeDM.getCCAcounter(); // Gets the CCA counter
    -xbeeDM.resetCCAcounter (); // Resets the CCA counter
    -xbeeDM.counterCCA[0-1]
    -xbeeDM.getACKcounter(); // Get the ACK counter
    -xbeeDM.resetACKcounter (); // Reset the ACK counter
    -xbeeDM.setRetries(2); // Set the additional retries
    -xbeeDM.getRetries(); // Get the additional retries
    -xbeeDM.retries[0-1]
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    These functiosn were defined in waspmote API for 802.15.4.
    I did copy the related functions in WaspXBeeDM.cpp and WaspXBeeDM.h
    for example:
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    uint8_t WaspXBeeDM::setDelaySlots(uint8_t exponent)
    {
    int8_t error=2;

    error_AT=2;
    gen_data(set_delay_slots_DM,exponent);
    gen_checksum(set_delay_slots_DM);
    error=gen_send(set_delay_slots_DM);

    if(!error)
    {
    delaySlots=exponent;
    }

    return error;
    }
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    well, I’m not sure if this will work.
    But while compiling with waspmote’s IDE I got no errors. But it doesn’t give me any results. All scanned channel =0 with CCA=2C. should I change any parameter in Xbee module ?
    My only doubt in what I have done in WaspXBeeConstants.h. because all that I have done is to define new variables similar to those related to 802.15.4
    set_retries_802=> I added : set_retries_DM
    But I keep the values “7E0005085252520000” the same as for 802.15.4. Is that correct ???
    I hope I’m clear enough. All that I need is to know If I’m doing things correctly or not.
    Hope to hear from u soon.
    Thanks in advance.

Simple reason why it doesn’t work. The SC command does not exists in the Digi Mesh 2.4 Code. (Not listed in the AT command list for the current product manual or firmware). It has an Energy Detect command instead which provides you with the Energy level of a given channel.