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.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.getACKcounter(); // Get the ACK counter
    -xbeeDM.resetACKcounter (); // Reset the ACK counter
    -xbeeDM.setRetries(2); // Set the additional retries
    -xbeeDM.getRetries(); // Get the additional retries
    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;



    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.