PreviousNext
moduleInfo
Help > OS functions > Data blocks > moduleInfo

Function

 

Store the transceiver identification data to bufferINFO

Purpose

 

Get information about the transceiver module, OS, and IBK (Individual Bonding Key)

Syntax

 

void moduleInfo()

Parameters

 

 –

Input values

 

memoryOffsetFrom:

     0        TR and OS identification (8 B), see Output values. Usually, it is not necessary to pre-clear          memoryOffsetFrom as it is typically post-cleared automatically by OS from previous          operations utilizing memoryOffsetFrom.

     16      IBK (16 B)

Return value

 

 –

Output values

 

 

If memoryOffsetFrom = 0:

 

bufferINFO[0 to 7]:

 

Address in bufferInfo

0

1

2

3

4

5

6

7

Meaning

Serial number

OS version

TR type

OS build

MID (Module ID)

 

     Serial number (Module ID, MID): 4 B identification code unique for each TR module, LSB first.

 

      OS version:

         Upper nibble (4 b):  Major version

         Lower nibble (4 b):  Minor version.

                                       OS postfix ("D" or “G”) is not stated in Module identification but can be                                        recognized by MCU type ("D" for PIC16LF1938 or "G" for PIC16LF18877).

 

     TR type:

 

Bit

7

6

5

4

3

2

1

0

Meaning

TR series

FCC

MCU type

 

   TR series

        For MCU type=4:                         For MCU type=5:

              0: TR-52D                                     0: TR-82G

              1: TR-58D-RJ                                2: TR-72G

               2: TR-72D                                     9: TR-85G

              3: TR-53D                                    10: TR-86G

              4: TR-78D                                     11: TR-76G

              8: TR-54D                                     13: TR-75G

              9: TR-55D

            10: TR-56D

            11: TR-76D

            12: TR-77D

            13: TR-75D

 

   FCC

        0: FCC not certified

        1: FCC certified

 

   MCU type

        4: PIC16LF1938

        5: PIC16LF18877

 

     OS build: OS subversion.

 

 

 

 

 

 

 

 

 

 

     Examples (all in hexadecimal):

 

                     [0] [1] [2] [3] [4] [5] [6] [7]

 

  bufferINFO[0–7] =  1C  10  00  01  42  24  91  08

 

     MID = 0100101C, IQRF OS v4.02D, TR-72D, PIC16LF1938, FCC not certified, OS build 0x0891.

 

  bufferINFO[0–7] =  1C  10  00  81  42  BC  C8  08

 

     MID = 8100101C, IQRF OS v4.02D, TR-76D, PIC16LF1938, FCC certified, OS build 0x08C8.

 

  bufferINFO[0–7] =  1C  10  00  81  43  25  C8  08

 

     MID = 8100101C, IQRF OS v4.03G, TR-72G, PIC16LF18877, FCC not certified, OS build 0x08C8.

 

If memoryOffsetFrom = 16:

     IBK (16 B) is stored into bufferINFO[0 to 15], LSB first (at address 0).

 

  memoryOffsetFrom is automatically post-cleared when moduleInfo finished.

Preconditions

 

  –

Remarks

 

     Tip: The most significant bit in TR series can be used to differentiate between TR modules with shared and not shared MCU pins on the Cx SIM pads, e.g. TR-72G (shared) vs. TR-76G (not shared). Note that TR-75G differs somewhat in pinout from the other TR series.

     Module data can also be read by SPI master or via a USB CDC. See the IQRF SPI specification or the IQRF CDC Technical guide.

Side effects

 

bufferINFO is completely modified.

See also

 

appInfo

Example 1

 

uns8 OSv  @ bufferInfo[4];

uns16 OSb @ bufferInfo[6];

         // Usually it is not necessary to clear memoryOffsetFrom here

         // as it is typically post-cleared automatically from previous operations

         // utilizing memoryOffsetFrom.

moduleInfo();                    // Now OSv == OS version

                                  // and OSb == OS build

Example 2

 

moduleInfo();

if (bufferInfo[5].7 == 0)

    ...  // MCU pins are shared (e.g. RC5 and RC7 to TR pin C8 etc.)

  else

    ...  // MCU pins are not shared (e.g. RC5 and RC7 to TR pin C8 etc.)

         // See the simplified circuit diagram in TR datasheets

Example 3

 

memoryOffsetFrom = 16;

moduleInfo();              // Now bufferInfo[0 to 15] contains IBK[0 to 15]

                           // memoryOffsetFrom is automatically post-cleared here