This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

perl scripting withe SmartRf Studio 7



Hello,

I just installed the new version of SmartRF Studio (7), and I discovered some Perl scripts performing a simple communication between two ZigBee kits.
I'd like to enjoy and develop an application arround this but  I can't access to librairies like dal_ext ...
If anyone has an idea where I can find this?? or any  help can be useful
     
Thank you

  • Hi,

    The scripts and libraries are located in the folder SmartRF Studio 7\scripts. The scripts here must be run through their corresponding *.bat files. The only thing these *.bat files do is to set the path variable correctly and then run the perl scripts

    I would check first whether or not the receive.bat and send.bat scripts can be started correctly.

    Bjørn

  • Hi Bjørn

    Thank you for your reply, I already started working on two scripts "dal_receive.pl 'and' dal_send.pl. Files. "bat" are working well and there is no problem during the execution.
    What I need is the source code of library (Programs and Features), such as:
    - Dal_ext
    - GetStatus ()
    - SendPacket ()
    - DESTROY ()
    - GetEbDeviceList ()
    - ConnectEbDevice ()
    -...........etc

    I want also to know the frame format that the sender uses to send data.

    I give you an example of transmission

    thx

  • Hi,

    The perl script interface for SmartRF Studio 7 is not yet completely finished, and still lacks some of the essential API documentation.

    Below you can see the prototype of each of the C++ function that is called by the perl module dal_ext.pm. You will find a perl function for each in that file.

    Class DALExt

    // Get status of last operation
     int getStatus(void);
     // Get error message by error number
     char *getErrorMessage(int errNum);
     // Get latest error message
     char *getErrorMessage(void);
     // Confiuration path of DAL
     char *getConfigPath(void);

     // Get list of connected EB devices
     char *getEbDeviceList(void);
     // Get list of defined RF devices
     char *getRfDeviceList(void);

     // From RF devicelist
     char* getDeviceType(const char* szDeviceName);
     char* getDeviceBrief(const char* szDeviceName);

     Class DALExtDevice

    // DAL config
     char* getDeviceBrief(void);
     char* getDeviceDescription(void);
     char* getDeviceRegisters(void);
     char* getDeviceUrl(void);
     char* getDevicePhoto(void);
     char* getUiClass(void);
     char* getStrobes(void);
     char* getEasyModeSettings(void);
     char* getTypicalSettings(void);
     char* getRegInfo(char *regName);

     // DAL access
     int connectEbDevice(char *usbDid);
     int readRegister(char *regName);
     void writeRegister(char *regName, unsigned short value);
     void setRegPacketTx(void);
     int initTx(void);
     int sendPacket(char *buffer,int fIeee);
        void setRegPacketRx(void);
     int initRx(void);
     int isPacketReceived(void);
     char* readPacket(void);

    In the packet sniffer you can see the format of packet when using the sendPacket function. An IEEE 802.15.4 compliant header is prepended before the payload bytes.

    We are aware that this module lacks documentation, but I hope this gives some useful information about the API to use.

    Bjørn

  • Hello

    Still working on my project, I need to know which function in Perl/ C++ which can control the power of the transmitter.
    can you tell me where I can find the
    C++ functions
    Thank you

  • Hello,
    How can I do to directly use C + + classes instead of going through the perl programs.

    Thx