Wavenet Technology BM29001 Wireless OEM Modem Module User Manual Boomer II Integrators Guide
Wavenet Technology Pty Ltd. Wireless OEM Modem Module Boomer II Integrators Guide
Contents
- 1. ex9 manual
- 2. Revised User Manual
- 3. Revised pages Re CRN 24593
Revised User Manual




























































![Boomer II User Manual & Integrator’s Guide ___________________________________________________ Testing BM210012WT27 61 Wavenet Technology RSUSER The Radio Service Utility software (RSUSER ) enables a user to exercise and configure Wavenet Modems. This software runs in a DOS window under Windows 95, 98, NT, or 2000. RSUSER interfaces with the Boomer II OEM Modem via a PC’s communications port and the Test Jig’s PC port using an RS-232 cable with DB9 connectors. RSUSER is issued with the following files: RSUSER.EXE The executable RSTEST.DEF Definition file for scripts RSUSER.INI Initialisation file. Created by RSUSER.EXE RPM.LOG Log file. Created by RSUSER.EXE. Refer to Appendix E for the NCL command list. Operations The following screen is displayed on start up or whenever the Help Hot Key <?> is pressed. *********RSUSER.M V2.xx HELP********** NCL COMMANDS ( - enable receive _ - Get RPM status @ - disable receive ) - enable transmit & - Get Next Msg # - disable transmit SEND MESSAGES (blocks composed of ...) ^ - Text ' '-'z'var length , for short text / - random bytes var length % for short random . - Dotting ('U's) message > for canned message < - sequential text var length MISCELLANEOUS F5 - Change COM regs [4,3F8] Alt'b' - Change baud rate [9600] F11 -Toggle dumping of data bytes of incoming NCL F9 - Activate packet loopbacks F10 - Configure loopback timing CONFIG PROGRAMMING Alt3 - Program home area Alt6 - Program Group LLIs Alt5 - Program Channels Alt C -Read params from modem Left/Right arrow - send XOFF/XON. Alt X/Z - rts off/on Alt S/A - dtr off/on Alt w - Batt. status Alt d - Radio status F1 - Source LLI [90100001] F2 - Destination LLI [90100001] F3 - Sys Address[A1010A] F4 - Compile NCL Msg ESC - QUIT program F6 - Auto sync LLIs and home area Type '?' to get back to this help screen RSUSER allows operators to exercise the modem via Native NCL Commands (and Vendor Specific Commands), hot keys or an input line. Common user commands such as enabling the modems receiver and transmitter are included in the Hot Key list. Native NCL commands can be issued from the F4 Hot key. A log file RPM.log is automatically started for a new session of RSUSER. To save a session, exit RSUSER and rename the RPM.log file.](https://usermanual.wiki/Wavenet-Technology/BM29001.Revised-User-Manual/User-Guide-288375-Page-61.png)
























































![NCL INTERFACE ___________________________________________ Boomer II User Manual & Integrator’s Guide Wavenet Technology 118 BM210012WT27 Wavenet Specific NCL Extensions The following table describes Wavenet specific extensions to the NCL 1.2 specification. All SDUs include three VENDOR control byte and the vendor Id. (the ‘\’ character is used as an escape character for hexadecimal bytes below): Command Type Command Description Ncl String Get radio status Get modem battery status Get modem “on” time Get saved modem configuration settings ZF?r ZF?v ZF?t ZF?u 1. Get status commands Get modem serial number: ZFts 2. Generic “Set RPM configuration” command type 1. Set modem configuration parameters, eg: * Power save mode. * Select new active profile. * NCL receive message notify timer. ZF^[2 Byte ID][2 byte Length][Val] ZF^p\00\00\01[new mode (byte)] ZF^f\00\00\01[new profile (byte)] ZF^n\00\00\02[2 bytes time (msec)] 3. Generic “Set RPM configuration” command type 2. Set modem configuration parameters, eg: * LED disabling. ZF5F[1 Byte ID][Val] ZF5F\45\00[dis/enabled (byte)] 4. Generic “Get RPM configuration” command. Get modem configuration, eg: * Power save mode. * Get list of profiles, number of profiles and currently selected active profile. * NCL receive message notify timer. ZF$[2 Byte ID] ZF$p\00 ZF$f\00 ZF$n\00 GET STATUS COMMANDS: This command allows the DTE to request the current status and configuration settings of certain aspects of the modem. FORMAT: WN_GET_STATUS Command Syntax (NCL string “ZF?…”): WN_GET_STATUS Response Syntax: CMND Length SDU Tag VENDOR ‘Z’ ‘F’ ‘?’ Status Request WN_GET_STATUS VEND_WAVENET RESP Length SDU Tag VENDOR ‘F’ ‘1’ Response data ........... SUCCESS VEND_WAVENET](https://usermanual.wiki/Wavenet-Technology/BM29001.Revised-User-Manual/User-Guide-288375-Page-118.png)
![Boomer II User Manual & Integrator’s Guide ___________________________________________ NCL INTERFACE BM210012WT27 119 Wavenet Technology OPERAND DESCRIPTIONS AND RESPONSES: The various Vendor Status Requests that can be made, and the format of their response information in the SUCCESS response SDU, are described as follows. Please note that all multiple byte fields are stored MSB first. WN_GET_RADIO: Get radio status information (NCL string “ZF?r”). SUCCESS is followed by a block of status information as shown below: WN_GET_RADIO Response Format: 7 6 5 4 3 2 1 0 RSSI [2 bytes] Reserved (ignore) [1 byte] Reserved (ignore) [1 byte] Reserved (ignore) [1 byte] Reserved (ignore) [1 byte] Reserved (ignore) [1 byte] Reserved (ignore) [1 byte] Reserved (ignore) [1 byte] Reserved (ignore) [1 byte] Current Frequency [4 bytes] Current Channel [2 bytes] Current Base Station ID [1 unsigned byte] Where: RSSI: Two byte signed integer representing the strength of the received signal from the base station measured in dBm. A typical value could be -90. Current Frequency: Four byte unsigned integer representing the frequency of the inbound signal in Hz for the channel the modem is currently scanning or locked on to. Current channel: Unsigned word (2 bytes) representing current channel. Current Base Station ID: Unsigned byte representing current base station ID.](https://usermanual.wiki/Wavenet-Technology/BM29001.Revised-User-Manual/User-Guide-288375-Page-119.png)
![NCL INTERFACE ___________________________________________ Boomer II User Manual & Integrator’s Guide Wavenet Technology 120 BM210012WT27 WN_GET_BATT_VOLT: Get modem battery status information (NCL string “ZF?v”). SUCCESS is followed by a block of status information in the format shown below: WN_GET_BATT_VOLT Response Format: 7 6 5 4 3 2 1 0 Battery Voltage (2 bytes) Battery Percentage Where: Battery Voltage: Two byte unsigned integer representing the Voltage of the battery in mV. Battery Percentage: Estimate of the remaining capacity of the battery. This value ranges from 0 to 100 (unsigned byte). WN_GET_TIME: Get modem time information (NCL string “ZF?t”). SUCCESS is followed by a block of status information in the format shown below: WN_GET_TIME Response Format: 7 6 5 4 3 2 1 0 Elapsed Time [4 bytes] Elapsed Time is a four byte unsigned integer, which represents the number of milliseconds, which have passed since the modem was last, turned on or reset. It is accurate to within 50ms of when the last byte of the request message was received by the modem.](https://usermanual.wiki/Wavenet-Technology/BM29001.Revised-User-Manual/User-Guide-288375-Page-120.png)
![Boomer II User Manual & Integrator’s Guide ___________________________________________ NCL INTERFACE BM210012WT27 121 Wavenet Technology WN_GET_SETTINGS: Get configuration information (NCL string “ZF?u”). SUCCESS is followed by a block of status information in the format shown below: WN_GET_SETTINGS Response Format: 7 6 5 4 3 2 1 0 LLI [4 bytes] Serial Number [16 bytes] ....... Reserved (ignore) Home System Prefix Home System ID Home Area ID 5 Reserved bytes (ignore) NCL Confirmation Mode NCL Rx Control NCL Tx Control NCL Event Flags Number of Group LLIs (n) Group LLIs [4*n bytes] Number of static channels (m) Static channels [2*m bytes] Reserved (ignore) [17 bytes] ............. Where: LLI: Four byte unsigned integer (the standard NCL command 4E also gives the LLI number back). Serial Number: ASCII string containing the serial number of the modem. Unused bytes are zeros. The NCL command ZFts also gives the serial number back. NCL Confirmation Mode: Default start-up state for the confirmation mode of the NCL layer. It is a zero for unconfirmed mode, or a one for confirmed mode. NCL Rx Control and NCL Tx Control: Indicate the start-up state for the NCL settings for RX_STATUS and TX_STATUS respectively. A zero](https://usermanual.wiki/Wavenet-Technology/BM29001.Revised-User-Manual/User-Guide-288375-Page-121.png)
![NCL INTERFACE ___________________________________________ Boomer II User Manual & Integrator’s Guide Wavenet Technology 122 BM210012WT27 indicates disabled, a one indicates enabled. NCL Event Flags: Byte which indicates the start-up state of the NCL event reporting. A set bit indicates the relevant event is enabled. A cleared bit indicates the event is disabled. The bits are as follow: Bit 7 - Reserved (ignore) Bit 6 - Rx_Error Bit 5 - Control Bit 4 - Rcv_Msg_Data Bit 3 - Rcv_Msg_Notify Bit 2 - Tx Bit 1 - Rx Bit 0 - Hwr Number of Group LLIs: Number of Group LLI fields which follow. Group LLIs: Each is a four byte unsigned integer. The number of Group LLIs is given in the previous field. Number of Static Channels: Number of channel fields which follow. Static Channels: Each is a two byte unsigned integer. The number of Static Channels is given in the previous field. WN_GET_SERIAL: Get modem serial number (NCL string “ZFts”). SUCCESS is followed by a block of status information in the format shown below: WN_GET_SERIAL Response Format: 7 6 5 4 3 2 1 0 Modem serial number [10 bytes] The modem serial number is unique to each modem and consists of ASCII characters. The tenth character is typically a null termination character. Generic set RPM Configuration command type 1 (WN_SET_PARAM): This command allows the DTE to set the configuration settings of certain aspects of the modem.](https://usermanual.wiki/Wavenet-Technology/BM29001.Revised-User-Manual/User-Guide-288375-Page-122.png)
![Boomer II User Manual & Integrator’s Guide ___________________________________________ NCL INTERFACE BM210012WT27 123 Wavenet Technology FORMAT: WN_SET_PARAM Command Syntax (NCL string “ZF^…”): WN_SET_PARAM Response Syntax: OPERAND DESCRIPTIONS AND RESPONSES: The various Vendor Parameter settings that can be made are described as follows. Please note that all multiple byte fields are stored MSB first. Numbers prefixed with “0x” are expressed as hexadecimal. “Byte” (optionally followed by a sequence number) is used to indicate a single byte. Parameter Number A 16-bit field, which is unique to each parameter, used to differentiate them. Parameter Length A 16 bit field, which indicates the length of the following parameter, in bytes. Parameter Contents The actual bytes set for the parameter. The format is parameter specific. The Parameter Name is a label used to refer to particular parameters, and is used as a definition for the parameter number. WN_SET_PARAM: Set Modem Configuration (NCL string “ZF^[2 byte parameter number][2 Byte parameter length][parameter block..]”). Parameter name : WN_PWR_SAVE_MODE Parameter number : 0x7000 (“Byte1Byte2”) (ASCII 0x70 = ‘p’) RESP Length SDU Tag VENDOR SUCCESS VEND_WAVENET CMND Length SDU Tag VENDOR ‘Z’ ‘F’ ‘^’ WN_SET_PARAM VEND_WAVENET Parameter number Parameter length Parameter contents …](https://usermanual.wiki/Wavenet-Technology/BM29001.Revised-User-Manual/User-Guide-288375-Page-123.png)



![Boomer II User Manual & Integrator’s Guide ___________________________________________ NCL INTERFACE BM210012WT27 127 Wavenet Technology WN_GET_PROFILE_LIST Response Format: Number of profiles (n) [1 byte] Active profile number [1 byte] Profile Name 1 (up to 24 byte null terminated string) Profile Name 2 (up to 24 byte null terminated string) . . . Profile Name n (null terminated string) [24 bytes] Where: Number of profiles: Unsigned byte giving the current number of profiles in configuration sector. The number of profiles may change. Active profile number: Unsigned byte giving the number (or index) of the currently active profile. Profile name: Null terminated string of 24 bytes of length (the string may be shorter than the 24 bytes as long as it is followed immediately by the null termination character). The 24 bytes do not include the null termination character. NCL Label Values Please note the following additions/clarifications to the NCL Label Values Table: CMND ASCII 'A' RESP ASCII 'C' SUCCESS ASCII '1' VENDOR ASCII 'Z' VEND_MOTOROLA ASCII '0' VEND_WAVENET ASCII 'F' WN_GET_STATUS ASCII '?' WN_GET_RADIO ASCII 'r ' (eg NCL command ZF?r) WN_GET_BATT_VOLT ASCII 'v' (eg NCL command ZF?v) WN_GET_TIME ASCII 't' (eg NCL command ZF?t) WN_GET_SETTINGS ASCII 'u' (eg NCL command ZF?u) WN_GET_SERIAL ASCII ‘s’ (eg NCL command ZFts) WN_SET_PARAM ASCII ‘^’ (eg NCL cmd ZF^\04\00\00\01\09) WN_GET_PARAM ASCII ‘$’ (eg NCL commandS ZF$..) WN_PWR_SAVE_MODE 0x7000 (eg NCL cmd ZF$\70\00 = ZF$p\00) WN_PROFILE 0x6600 (eg NCL cmd ZF$\66\00 = ZF$f\00) WN_MSG_RX_NOTIF_TMR 0x6E00 (eg NCL cmd ZF$\6E\00 = ZF$n\00) WN_CMD ASCII '*' (eg NCL commands ZF*..) WN_LEDS_OFF 0x45 (eg NCL cmd ZF5F\45\00\00)](https://usermanual.wiki/Wavenet-Technology/BM29001.Revised-User-Manual/User-Guide-288375-Page-127.png)










![SDK SCR-API ______________________________________________ Boomer II User Manual & Integrator’s Guide Wavenet Technology 138 BM210012WT27 }; /* Use 1 byte alignment for the following structures */ #pragma pack(1) /* Product ID structure */ typedef struct NCLProdId { BYTE hw_platform; BYTE rf_protocol; BYTE ncl_compliance; BYTE release_level; }NCLProdId; /* NCL version structure */ typedef struct NCLVersion { char major[2]; char minor[2]; }NCLVersion; /* RPM ID structure */ typedef struct NCLRpmId { BYTE b_val[4]; }NCLRpmId; /* Config block structure */ typedef struct NCLConfigBlock { NCLProdId prod_id; NCLVersion sw_version; NCLRpmId rpm_id; WORD reserved; WORD max_data_size; }NCLConfigBlock; /* Status block structure */ typedef struct NCLStatusBlock { BYTE rx_status; BYTE tx_status; BYTE antenna; BYTE radio_in_range; BYTE flow_control; BYTE rcv_mode; BYTE event_states; WORD ob_msg_count; WORD ib_msg_count; WORD radio_channel; }NCLStatusBlock; /* Channel block structure */ typedef struct NCLChanBlock {](https://usermanual.wiki/Wavenet-Technology/BM29001.Revised-User-Manual/User-Guide-288375-Page-138.png)
![Boomer II User Manual & Integrator’s Guide ______________________________________________ SDK SCRAPI BM210012WT27 139 Wavenet Technology BYTE radio_in_range; WORD radio_channel; BYTE attribute; BYTE protocol; BYTE rssi; }NCLChanBlock; #define MAX_GROUP_LLIS 8 #define LLI_BYTE_WIDTH 8 #define NCL_NUM_CHANNELS 64 /* Group LLIs array */ typedef struct NCLGroupLlis { BYTE lli[MAX_GROUP_LLIS][LLI_BYTE_WIDTH]; BYTE num; }NCLGroupLlis; /* Channel Table */ typedef struct NCLChannelTable { WORD channel[NCL_NUM_CHANNELS]; BYTE num; }NCLChannelTable; /* Vendor Spesific: Wavenet Get Settings*/ typedef struct NCLWaveSettings { BYTE LLI[4]; BYTE SerNum[16]; } NCLWaveSettings; /* Vendor Spesific: Wavenet Get Radio Settings*/ typedef struct NCLWaveRadio { BYTE rssi[2]; BYTE reserved1; BYTE reserved2; BYTE reserved3; BYTE reserved4; BYTE reserved5; BYTE reserved6; BYTE reserved7; BYTE reserved8; BYTE frequency[4]; BYTE channel[2]; BYTE base_id; } NCLWaveRadio; /* Vendor Spesific: Wavenet Generic*/ typedef struct NCLWaveGen { BYTE byte[100]; } NCLWaveGen; /* NCL status information structure */ typedef union NCLStatus { NCLProdId prod_id; BYTE vendor_id; NCLVersion sw_version; NCLRpmId rpm_id;](https://usermanual.wiki/Wavenet-Technology/BM29001.Revised-User-Manual/User-Guide-288375-Page-139.png)
![SDK SCR-API ______________________________________________ Boomer II User Manual & Integrator’s Guide Wavenet Technology 140 BM210012WT27 BYTE rpm_vid[2]; NCLGroupLlis rpm_gid; WORD max_data_size; BYTE rx_status; BYTE tx_status; BYTE antenna; BYTE radio_in_range; WORD ob_msg_count; WORD ib_msg_count; BYTE flow_control; BYTE rcv_mode; BYTE event_states; WORD radio_channel; NCLChannelTable chan_table; NCLChannelTable dchan_table; NCLConfigBlock config_block; NCLStatusBlock status_block; NCLChanBlock chan_block; BYTE bat_level; NCLWaveSettings wave_set; NCLWaveRadio wave_radio; NCLWaveGen wave_generic; }NCLStatus; /* Event Type */ typedef struct NCLEventType { BYTE etype; /* NCL_RCV_MSG_DATA 'A' Received message data */ /* NCL_MSG_NOTIFICATION ‘B’ Received Message notification */ /* NCL_TX_EVENT 'C' Transmitter event */ /* NCL_RX_EVENT 'D' Receiver event */ /* NCL_HW_EVENT 'E' Hardware event */ /* NCL_RCV_ERR_EVENT 'F' Unreceivable Message Event */ /* NCL_CONTROL_EVENT 'G' Control Event */ BYTE EventCode; /* NCL_MSG_NOTIFICATION_LEN N- Number of buffered msgs to be read */ /* NCL_TX_EVENT_KEYED ‘1’ Transmitter keyed */ /* NCL_TX_EVENT_DEKEYED ‘2’ Transmitter dekeyed */ /* NCL_RX_EVENT_INRANGE ‘1’ RF in range */ /* NCL_RX_EVENT_OUTRANGE ‘2’ RF out of range */ /* NCL_RX_EVENT_PSENAB ‘3’ Power Save enabled */ /* NCL_RX_EVENT_PSDISAB ‘4’ Power Save disabled */ /* NCL_HW_EVENT_STEST ‘1’ Self Test Failed */ /* NCL_HW_EVENT_LBATT ‘2’ Low battery */ /* NCL_HW_EVENT_MFULL ‘3’ Memory Full */ /* NCL_HW_EVENT_BATOK ‘4’ Battery Level OK */ /* NCL_HW_EVENT_MEMOK ‘5’ Memory Ok */ /* NCL_HW_EVENT_MEMOK ‘6’ Device shutdown is imminent */ /* NCL_RCV_ERR_EVENT_RTD ‘1’ ACK required PDU received but TX disabled */ /* NCL_CONTROL_EVENT_C ‘1’ RPM / DTE connected */ }NCLEventType; /* RCV_MSG_Data */ #define NCL_MAX_DATA_SIZE 2048 #define NCL_MAX_UH_LEN 63 /* max length of user header */](https://usermanual.wiki/Wavenet-Technology/BM29001.Revised-User-Manual/User-Guide-288375-Page-140.png)
![Boomer II User Manual & Integrator’s Guide ______________________________________________ SDK SCRAPI BM210012WT27 141 Wavenet Technology typedef struct NCLMsg { BYTE is_message; /* If FALSE, only len and buf components are valid. */ BYTE sessionID[NCL_MAX_UH_LEN + 1]; /* NULL terminated */ BYTE msg_type; /* Used by NCL_DATATAC_5000 networks */ WORD len; BYTE buf[NCL_MAX_DATA_SIZE]; } NCLMsg; /* End of 1 byte alignment */ #pragma pack() Get RPM Status Information The application can call this function to obtain status information about the RPM. The following types of status information can be obtained: Status Request (non vendor specific) Response Structure Description NCL_R_CONFIG_BLOCK NCLConfigBlock Get RPM configuration block NCL_R_STATUS_BLOCK NCLStatusBlock Get RPM status block NCL_R_PROD_ID NCLProdId Get RPM product ID NCL_R_SW_VERSION NCLVersion Get software version number NCL_R_RPM_ID NCLRpmId Get RPM address NCL_R_RPM_VID NCLStatus.rpm_vid[2] Get RPM VID address (MDC) NCL_R_MAX_DATA_SIZE NCLStatus.max_data_size Get SDU data limit NCL_R_RCV_MODE NCLStatus.rcv_mode Get mode of notification to DTE for received SDUs. NCL_R_RX_STATUS NCLStatus.rx_status Get receiver enable status NCL_R_TX_STATUS NCLStatus.tx_status Get transmitter enable status NCL_R_ANTENNA NCLStatus.antenna Get antenna selection status NCL_R_RADIO_IN_RANGE NCLStatus.radio_in_range Get radio in range status NCL_R_OB_MSG_COUNT NCLStatus.ob_msg_count Get count of outbound messages queued NCL_R_IB_MSG_COUNT NCLStatus.ib_msg_count Get count of inbound NCL_R_FLOW_CONTROL NCLStatus.flow_control Get flow control status NCL_R_EVENT_STATES NCLStatus.event_states Get current event reporting (enable/disable) state NCL_R_RADIO_CHANNEL NCLStatus.radio_channel Get current radio channel NCL_R_CHAN_TABLE NCLChannelTable Read radio channel table NCL_R_CHAN_BLOCK NCLChanBlock Read the channel block NCL_R_BAT_LEVEL NCLStatus.bat_level Read the battery level NCL_R_RPM_GID NCLGroupLlis Get RPM group IDs NCL_R_VENDOR_ID NCLStatus.vendor_id Get vendor identification NCL_R_DCHAN_TABLE NCLChannelTable Read the D-channel table NCL_R_RF_STATISTICS Specific to RF protocol used: RD-LAP [F] or MDC [G] Read the RF statistics](https://usermanual.wiki/Wavenet-Technology/BM29001.Revised-User-Manual/User-Guide-288375-Page-141.png)













![Boomer II User Manual & Integrator’s Guide ______________________________________________ SDK SCRAPI BM210012WT27 155 Wavenet Technology int lrc; lrc = scr_Init(SCR_DATATAC_4000); if (lrc == SCR_ERROR) { exit(0); } /* perform other SCR operations */ . . . } scr_Encode() Prototype: int scr_Encode(byte *l_buf, SCRMsg *l_msg) Description This routine encodes a SCRMsg structure into an SCR encoded data buffer. This routine transparently converts and encodes IB, OB, AB, HC, HR, and MI messages for the correct network type. For example, if scr_Init() has been used to set the network type to DataTAC 4000, and an MI message is passed to scr_Encode(), it will be encoded as an OB message. Input: *l_buf The buffer for the encoded message to be returned in. When calling this function, this parameter must point to an allocated buffer of at least SCR_MAX_LEN bytes. The encoded message is returned as a binary array. It is not a NULL terminated string. *l_msg An SCRMsg structure representing the message to be encoded. For a description of the SCRMsg structure, refer to "SCR Structures. Output: Return value = 0 Operation was successful and the encoded message is returned in l_buf. Return value ≠ 0 Operation failed. Value SCR_ERROR is returned to indicate an error Example #include <scrapi.h> { SCRMsg lmsg; /* SCR message struct */ byte ldata[200]; /* data to send to host */ byte lbuffer[SCR_MAX_LEN]; /* buffer for encoded SCR msg */ int llen; /* length of encoded SCR msg */ . . . strcpy((char *)ldata, "Hello world")](https://usermanual.wiki/Wavenet-Technology/BM29001.Revised-User-Manual/User-Guide-288375-Page-155.png)

![Boomer II User Manual & Integrator’s Guide ______________________________________________ SDK SCRAPI BM210012WT27 157 Wavenet Technology error Return value > 0 Operation was successful .and the decoded message is returned in l_msg. Example #include <scrapi.h> { SCRMsg lmsg; /* SCR message struct */ byte lbuffer[SCR_MAX_LEN];/*buffer for received SCR msg */ int llen; /* length of received SCR msg */ int lused; /* return code from scr_Decode */ . . . /* receive data into lbuffer */ llen = x25recv( . . . lbuffer, . . .); . . . lused = scr_Decode(llen, lbuffer, &lmsg); if (lused > 0) { /* process message */ . . . scr_FreeDecoding(lmsg); /* free decoded message */ } else if (lused == 0) { /* incomplete message received */ } else { /* report an.error */ . . . } } scr_FreeDecoding() Prototype: void scr_FreeDecoding(SCRMsg *l_msg) Description This routine is used to free any memory allocated inside an SCRMsg structure by a successful call to scr_Decode(). All calls to scr_Decode() that return a successfully decoded SCR message (the return value is a positive value) must be followed by a call to scr_FreeDecoding(), after the caller has fully processed the decoded message. If scr_FreeDecoding() is not called, memory leaks will occur. Note: The SCRMsg structure itself is not freed. Only allocated memory within this structure is freed. After scr_FreeDecoding() has been called, all pointers within the SCRMsg structure will be invalid. Input:](https://usermanual.wiki/Wavenet-Technology/BM29001.Revised-User-Manual/User-Guide-288375-Page-157.png)
![SDK SCR-API ______________________________________________ Boomer II User Manual & Integrator’s Guide Wavenet Technology 158 BM210012WT27 *l_msg The SCRMsg structure to have its internal memory allocations freed. Note that the SCRMsg structure itself is not freed. Output: None Example Refer to the example for the function scr_Decode() on the previous page. scr_EncodeLogin() Prototype: int scr_EncodeLogin(byte *l_buf, char *l_hostid, char *l_passwd) Description For DataTAC® 5000 Networks Only. This function is used to encode the RNG login packet that is sent to the RNG when the connection is first established. Input: *l_buf The buffer for the encoded login packet to be returned in. When calling this function, this parameter must point to an allocated buffer of at least SCR_MAX_LEN bytes. *l_hostid The DataTAC host login or host id *l_passwd The DataTAC host password Output: Return value = 0 Operation failed. The Network Type is not set to DataTAC 5000. Return value < 0 Operation failed. Value SCR_ERROR is returned to indicate an error Return value > 0 Operation was successful and the number of bytes is returned in l_buf. Example #include <scrapi.h> { byte lbuffer[SCR_MAX_LEN]; /*buffer for SCR login packet*/ int llen; /*length of SCR login packet*/ . . . x25call( . . . ); /*make the connection to the RNG*/ llen = scr_EncodeLogin(buffer, 'LOGIN', 'PASSWORD'); if (llen == SCR_ERROR) { /*report an error*/ . . . } else if (llen > 0) { /*for non-DataTAC 5000 networks,'/](https://usermanual.wiki/Wavenet-Technology/BM29001.Revised-User-Manual/User-Guide-288375-Page-158.png)
















![Boomer II User Manual & Integrator’s Guide ________________________APPENDIX E - Numeric Conversion Chart BM210012WT27 175 Wavenet Technology Appendix E - Numeric Conversion Chart Binary/Octal/Decimal/Hex/C/ASCII Conversion Table Binary Oct Dec Hex C ASCII Definition Binary Oct Dec Hex C ASCII 00000000 000 0 00 C NUL Null, or all zeros 01000000 100 64 40 P @ 00000001 001 1 01 C SOH Start of Heading 01000001 101 65 41 UX A 00000010 002 2 02 C STX Start of Text 01000010 102 66 42 UX B 00000011 003 3 03 C ETX End of Text 01000011 103 67 43 UX C 00000100 004 4 04 C EOT End of Transmission 01000100 104 68 44 UX D 00000101 005 5 05 C ENQ Enquiry 01000101 105 69 45 UX E 00000110 006 6 06 C ACK Acknowledge 01000110 106 70 46 UX F 00000111 007 7 07 C BEL Bell 01000111 107 71 47 U G 00001000 010 8 08 C BS Backspace 01001000 110 72 48 U H 00001001 011 9 09 CS HT Horizontal Tab 01001001 111 73 49 U I 00001010 012 10 0A CS LF Line Feed 01001010 112 74 4A U J 00001011 013 11 0B CS VT Vertical Tab 01001011 113 75 4B U K 00001100 014 12 0C CS FF Form Feed 01001100 114 76 4C U L 00001101 015 13 0D CS CR Carriage Return 01001101 115 77 4D U M 00001110 016 14 0E C SO Shift Out 01001110 116 78 4E U N 00001111 017 15 0F C SI Shift In 01001111 117 79 4F U O 00010000 020 16 10 C DLE Data Link Escape 01010000 120 80 50 U P 00010001 021 17 11 C DC1 Device Control 1 (XON) 01010001 121 81 51 U Q 00010010 022 18 12 C DC2 Device Control 2 01010010 122 82 52 U R 00010011 023 19 13 C DC3 Device Control 3 (XOFF) 01010011 123 83 53 U S 00010100 024 20 14 C DC4 Device Control 4 01010100 124 84 54 U T 00010101 025 21 15 C NAK Negative Acknowledge 01010101 125 85 55 U U 00010110 026 22 16 C SYN Synchronous Idle 01010110 126 86 56 U V 00010111 027 23 17 C ETB End Transmission Block 01010111 127 87 57 U W 00011000 030 24 18 C CAN Cancel 01011000 130 88 58 U X 00011001 031 25 19 C EM End of Medium 01011001 131 89 59 U Y 00011010 032 26 1A C SUB Substitute 01011010 132 90 5A U Z 00011011 033 27 1B C ESC Escape 01011011 133 91 5B P [ 00011100 034 28 1C C FS File Separator 01011100 134 92 5C P \ 00011101 035 29 1D C GS Group Separator 01011101 135 93 5D P ] 00011110 036 30 1E C RS Record Separator 01011110 136 94 5E P ^ 00011111 037 31 1F C US Unit Separator 01011111 137 95 5F P _ 00100000 040 32 20 S SP Space 01100000 140 96 60 P ` 00100001 041 33 21 P ! 01100001 141 97 61 LX a 00100010 042 34 22 P " 01100010 142 98 62 LX b 00100011 043 35 23 P # 01100011 143 99 63 LX c 00100100 044 36 24 P $ 01100100 144 100 64 LX d 00100101 045 37 25 P % 01100101 145 101 65 LX e 00100110 046 38 26 P & 01100110 146 102 66 LX f 00100111 047 39 27 P ' 01100111 147 103 67 L g 00101000 050 40 28 P ( 01101000 150 104 68 L h 00101001 051 41 29 P ) 01101001 151 105 69 L i 00101010 052 42 2A P * 01101010 152 106 6A L j 00101011 053 43 2B P + 01101011 153 107 6B L k 00101100 054 44 2C P , 01101100 154 108 6C L l 00101101 055 45 2D P - 01101101 155 109 6D L m 00101110 056 46 2E P . 01101110 156 110 6E L n 00101111 057 47 2F P / 01101111 157 111 6F L o 00110000 060 48 30 NX 0 01110000 160 112 70 L p 00110001 061 49 31 NX 1 01110001 161 113 71 L q 00110010 062 50 32 NX 2 01110010 162 114 72 L r 00110011 063 51 33 NX 3 01110011 163 115 73 L s 00110100 064 52 34 NX 4 01110100 164 116 74 L t 00110101 065 53 35 NX 5 01110101 165 117 75 L u 00110110 066 54 36 NX 6 01110110 166 118 76 L v 00110111 067 55 37 NX 7 01110111 167 119 77 L w 00111000 070 56 38 NX 8 01111000 170 120 78 L x 00111001 071 57 39 NX 9 01111001 171 121 79 L y 00111010 072 58 3A P : 01111010 172 122 7A L z 00111011 073 59 3B P ; 01111011 173 123 7B P { 00111100 074 60 3C P < 01111100 174 124 7C P | 00111101 075 61 3D P = 01111101 175 125 7D P } 00111110 076 62 3E P > 01111110 176 126 7E P ~ 00111111 077 63 3F P ? 01111111 177 127 7F C DEL](https://usermanual.wiki/Wavenet-Technology/BM29001.Revised-User-Manual/User-Guide-288375-Page-175.png)






