Home

Protocol Manual - Connect Tech Inc.

image

Contents

1. CENA RD DAE FREU E 24 25 GET a a 26 GET PROTO SUPPOR 27 GET PROTO VER wise die odi 28 LIIS 29 GET RIC ALARM 30 GET RIC CLOCK 31 GET RTG GATE EE 32 GET ISP 32 OPEN PORT ec 33 HEEL 34 PURGE 35 RESET BAN E 36 RESUME E aaa 36 SEND BREAK cetacean cena 37 SEND IMMEDIATE UNE NER tive ti XX cans 38 38 SET DATA MODE A Se Ern 39 SET DTR 40 SET EVENT yssen dniae EMT 41
2. pessed g 5 415 108 passed g 5 412 4309 pessed g 5 812 u1og gt ex ex VS sjeubis sjeuBls 1228956 2 5 uid p 2501 943 V 994 9214105 se pasn 45 ue 31 3nd3no SI DXL 10 2X3 u3uM saqqwsuely 994 OSAI _ Y vi 3 1 Revision 1 04 January 5 2009 54 Protocol Reference Bit Rate Computational Algorithm This algorithm examines the entire clocking tree setup and the related bit rate parameters ref_freq bps bps_frac and bps_error to attempt to find a solution that achieves the desired bit rate within the specified error bps_error If no solution can be found the settings are rejected and an error code is returned The algorithm gives priority to the setup of the various sections of the IUSC device in the following order first the Receiver then Transmitter then RxC output clock signal then TxC output clock signal The algorithm takes into account previous uses of clocking resource settings during the algorithm this is how it detects combinations that cannot be achieved or which are incompatible CTIM 00049 A A selects the primary clock source for either the Receiver or Transmitter and can be one of the following values Value Name Description 0 0x00 CLK_NONE No clock applied turns off the respective Serial section
3. 2 a a aaa 42 SET EAE x RR RS EATER APEE EE A 45 IS Ie n 47 SIMA IM E 49 SET RTC ALARM 61 SET 255 EE TEE EEO EEE 63 SET RIC GA TEn E E E E 64 in 65 SET E E E EE 66 SET RITS DIR 67 START STOP BREAK puuosan cee a aier Ena e E Ena 67 SOLON SIS 68 3 3 Director 69 3 4 Director Detail 70 11 Revision 1 04 January 5 2009 Contents DATA 70 70 END FRAME pr tb rx OSEE Eb LO Va UC ED E CERE E 71 START OF FRAME se ie van ee rr en orar Pa CD DC DR 71 RERUM 73 00049 iii Blue Heat Net CTs 1 Introduction 1 1 Supported Products and Platforms 2 1 2 Contact _________ 2 COnvelilbriS B S 3 Data 3 1 4 Obtaining the
4. Data Sie GUC uint8 lines lines This member can be one or more of the following values Bit Name Description 0 LSTATE CTS CTS is active 1 15 DSR DSR is active 2 5 RI RI has gone from inactive to active 3 LSTATE_DCD DCD is active 4 15 5 RTS is active 5 LSTATE_DTR DTR is active Requirements Protocol version 9 or greater General message No Port message Yes Async Yes Sync Yes Port state must be Open GET_MSR The GET_MSR message is used to retrieve the current state of the Modem Status Register Message Message Number 36 0x24 Port Number Number of the port in which to retrieve the Modem Status Register Data Length 0 bytes Response Status Status Value Status Name Description 0 0x00 CMD_OK The GET_MSR message succeeded 3 0x03 BHN_ERROR_UNSPECIFIED non categorized error occurred Data Length 1 byte Data struct bhn msr uint8 msr msr Current state of the Modem Status Register CTIM 00049 25 Blue Heat Net CTs Bit Description 0 Delta CTS 1 Delta DSR 2 Delta RI 3 Delta CD 4 CTS state 5 DSR state 6 RI state 7 CD state Requirements Protocol version 9 or greater General message No Port message Yes Async Yes Sync No Port state must be Open GET_PORTCAP The GET_PORTCAP message is used to retrieve the capabilities of the serial port hardware Message Message Number 39 0x27 Port Number Number of the port in
5. MODE OPEN PORT CLOSE PORT 10 or greater No Yes Yes Yes Open The CLOSE PORT message is used to close a port on a Blue Heat Net device Message Message Number 3 0x03 Port Number Number of port in which to close Data Length 0 bytes Response Status Status Value Status Name 0 0x00 CMD OK Description The CLOSE PORT message succeeded 3 0x03 BHN ERROR UNSPECIFIED non categorized error occurred Data Length 0 bytes Requirements Protocol version General message Port message Async Sync Port state must be See Also OPEN PORT EVENT OCCURRED 9 or greater No Yes Yes Yes Open The EVENT OCCURRED message is used to report events to the host Message Message Number 34 0x22 14 Revision 1 04 January 5 2009 ap Protocol Reference Port Number Number of the port in which the reported events apply to Data Length 19 bytes Data struct bhn event occurred uintl6 events uint8 msr int32 Cownt INES ome Out WME 2 185 int32 brk count events The events member indicates which event types are being reported Each event type has occurred if its corresponding bit is set If a bit is cleared the event type has not occurred These bits are the same as the ones listed in the SET_EVENT message data msr The current value of the Modem Status Register oe_count The current overrun error count pe_count The current parity error count
6. sciri deri ad ata uc pd aJ CUR ara ic Ee daa d 3 1 1 Supported Products and Platforms This documentation applies to the following Connect Tech products Connect Tech Products e The Blue Heat Net family of products o Blue Heat Net 2 o Blue Heat Net 4 or 8 o Blue Heat Net 16 o Blue Heat Net Sync 1 2 Contact Information We offer three ways for you to contact us by telephone or facsimile FAX by email or internet or by mail or courier Telephone Facsimile Technical Support representatives are ready to answer your call Monday through Friday from 8 30 a m to 5 00 p m Eastern Standard Time Our numbers for calls are Telephone 800 426 8979 North America only 519 836 1291 Live assistance available 8 30 a m to 5 00 p m EST Monday to Friday Facsimile 519 836 4878 on line 24 hours Email Internet You may contact us through the Internet Our email and URL addresses are Email sales connecttech com support connecttech com Web http www connecttech com 2 Revision 1 04 January 5 2009 CTs Introduction Mail Courier You may contact us by letter Our mailing address for correspondence is Mail Connect Tech Inc Technical Support 42 Arrow Road Guelph Ontario Canada N1K 1S6 1 3 Conventions Notation This document uses the following notational conventions file names filesystem paths special names CONSTANT NAME references such as messages directors or constants code blo
7. 1 0x01 CLK RXC From RxC External Line Interface signal 2 0x02 CLK TXC From TxC External Line Interface signal 3 0x03 CLK DPLL From DPLL 4 0x04 CLK BRGO From Baud rate generator 0 5 0x05 BRG1 From Baud rate generator 1 6 0x06 CLK CTRO From CTRO by passes BRG 7 0x07 CLK CTR1 From CTR1 by passes BRG 134 0x86 INT REF From Internal reference 18 432 MHz 135 0x87 EXT REF From External reference External Reference Signal input To use the DPLL setting to clock the Transmitter the Receiver must also be set to DPLL otherwise an error is returned The NONE selection effectively disables the section to which it is applied and could be used if you want a port to be a Transmit or Receive only port Some special consideration should be taken when selecting CLK INT REF or CLK EXT REF While these clocking sources are physically possible they come at a high cost to the clocking structure This occurs because the IUSC device uses only one bit to control the bypassing of CTR 0 and CTR 1 See section 4 3 of the IUSC manual and Figure 3 1 B This selects the clock source for the Receiver DPLL and is only required when the c k tree A selection is DPLL When this selection is made the div value must be set to an appropriate value If not needed B can be zero but must be one of the following values Value Name Description 0 0x00 DPLL From
8. 5 port is currently closed but 2 requires it to be open 14 OxOE BHN_ERROR_HW_TYPE The underlying port hardware does not support the GET_EVENT2 message Data Length 6 bytes Data struct ban event2 uintl16 events uint32 events2 events The events member indicates which event types are enabled or disabled Each event type is enabled if its corresponding bit is set If a bit is cleared the event type is disabled These bits are the same as the ones listed in the SET_EVENT2 message data events2 The events2 member indicates which event types are enabled or disabled Each event type is enabled if its corresponding bit is set If a bit is cleared the event type is disabled These bits are the same as the ones listed in the SET_EVENT2 message data Requirements Protocol version 10 or greater General message No Port message Yes Async Yes Sync Yes Port state must be Open See Also SET 2 EVENT2 OCCURRED GET_FIFO_CONTROL The GET FIFO CONTROL message is used to retrieve a port s FIFO control settings Message Message Number 41 0x29 Port Number Number of port in which to retrieve FIFO control settings CTIM 00049 21 Blue Heat Net CTs Data Length 8 bytes Data The GET_FIFO_CONTROL message uses the same data structure as the SET_FIFO_CONTROL message where the mask member is used to determine the requested data Response Status Status Value Status Name Desc
9. Convert a 32 bit number from host byte order to network byte order Convert a 16 bit number from network byte order to host byte order Convert a 32 bit number from network byte order to host byte order Table 2 3 struct bhn prot cmd msg msg pc cmd cmd SET EVENT2 msg pc cmd sequence 0 pe endi pores es msg pc cmd length htons BHN EVENT2 52 msg pc event2 events htons EVENT OE EVENT PE EVENT FE msg pc event2 events2 htonl EVENT2 ALL send msg socket char amp msg SET EVENT2 CMD SZ 0 Listing 2 1 10 Revision 1 04 January 5 2009 Protocol Reference 3 Protocol Reference 3 1 Message 12 3 2 Message Detall Vide Da 13 3 3 Director SUMMA T TI T ents 69 3 4 Director e 70 00049 11 Blue Heat Net CTs 3 1 Message Summar Message Message Name MESE Data RESPONSE Data Protocol Number Size Size Version 2 PING __ 2 0x02 OPEN PORT 1 Jo 9 3 0 03 PORT 5 0 Jo 9 7 0x07 1 AS 8 0 08 SETLINE 6 5 0 9 9 009 __ PAS 12 0 0 LINE STATE 5 0 1 9 13 0 00 SEND_BREAK 1 PAL 14 START_STOP_BREAK 1 0 95 15 0 0 SET RIS 1 O
10. MASK RX THRESHOLD rx threshold is valid 8 0x08 MASK TX LOAD SIZE ty load size is valid 16 0x10 FIFO MASK FLAGS flags is valid 31 Ox1F FIFO MASK ALL members are valid fifo size The size of the UART FIFOs This member is ignored during the SET FIFO CONTROL message tx threshold Flag that indicates the transmit FIFO threshold setting This value is expressed as a mode instead of an actual value This member can be one of the following values CTIM 00049 45 Blue Heat Net ap Value Name Description 0x00 FIFO MODE1 least CPU usage transmit threshold set low 1 0x01 FIFO TT MODE2 balanced transmit threshold set in the middle 2 0x02 FIFO best throughput transmit threshold set high rx threshold Flag that indicates the receive FIFO threshold setting This value is expressed as a mode instead of an actual value This member can be one of the following values Value Name Description 0 0x00 RT MODEI1 least latency receive threshold set low 1 0x01 FIFO MODE2 balanced receive threshold set in the middle 2 0x02 MODES3 best throughput receive threshold set high tx load size The amount of transmit data placed into the transmit FIFO once the previous transmit data has been sent This value can be between one 1 and fifo size inclusive flags Flags that indicate other control options This member can be one or more of the following v
11. Also a single message response or director could be split among multiple TCP packets Ethernet IP TCP Ethernet Header Header Header Application Data Trailer Blue Heat Net Data stream mode Serial Data Blue Heat Net Director Length Director Data Data packet mode 1 byte 2 bytes n bytes Figure 2 1 2 2 Message Format Each protocol message contains a header and optional data A message header consists of a 1 byte message number a 1 byte reserved area a 1 byte port number and a 2 byte length Following the message header is optional message data whose size depends on the length specified in the message header Blue Heat Net Message Reserved Port Length Message Data Message 1 byte 1 byte 1 byte 2 bytes n bytes Message Number The first byte of a message header is the message number The message number indicates the message s intended operation and determines the format of the message data See section 3 Protocol Reference for a list and description of the available message numbers Port Number The third byte of a message header is the zero based port number The port number indicates which port on the Blue Heat Net device that the message applies to In section 3 Protocol Reference the usage requirements for the port number is specified for each individual message Length The fourth and fifth bytes of a message header are the size of the optional message data Message Da
12. fe_count The current framing error count brk_count The current break count Response The EVENT_OCCURRED message does not have a response Remarks Events are reported via messages initiated from the Blue Heat Net These messages have no response so the host need not reply to them Requirements Protocol version 9 or greater General message No Port message Yes Async Yes Sync Yes Port state must be Open See Also SET EVENT GET EVENT CTIM 00049 15 Blue Heat Net ap EVENT2 OCCURRED The EVENT2 OCCURRED message is used to report events to the host Message Message Number 67 0x43 Port Number Number of the port in which the reported events apply to Data Length 23 bytes Data struct bhn event 0 uintl6 events uint32 events2 uint8 msr int32 oe count TESA pe count TIME 97 ES CONE LIME 92 count events The events member indicates which event types are being reported Each event type has occurred if its corresponding bit is set If a bit is cleared the event type has not occurred These bits are the same as the ones listed in the SET_EVENT2 message data events2 The events2 member indicates which event types are being reported Each event type has occurred if its corresponding bit is set If a bit is cleared the event type has not occurred These bits are the same as the ones listed in the SET_EVENT2 message data msr The current value of the Modem Status Register oe_cou
13. Data struct bhn proto supp uint8 min uint8 max min Minimum protocol version supported max Maximum protocol version supported CTIM 00049 27 Blue Heat Net CTs Requirements Protocol version 10 or greater General message No Port message Yes Async N A Sync N A Port state must be N A See Also GET PROTO VER GET_PROTO_VER The GET_PROTO_VER message is used to retrieve a string representation of the protocol version Message Message Number 46 Ox2E Port Number N A Data Length 0 bytes Response Status Status Value Status Name Description 0 0x00 CMD_OK The GET_PROTO_VER message succeeded 3 0x03 BHN_ERROR_UNSPECIFIED non categorized error occurred Data Length 16 bytes Data Sie UGE Dine ro oV int8 version 16 version NUL terminated string containing the maximum protocol version supported This string is formatted as V ver num where ver num is the maximum protocol version supported Remarks This message is deprecated and GET PROTO SUPPORT should be used instead 28 Revision 1 04 January 5 2009 GP Requirements Protocol Reference Protocol version 9 or greater General message Yes Port message Yes Async N A Sync N A Port state must be N A See Also GET PROTO SUPPORT GET_PSON The GET_PSON message is used to retrieve the personality setting of a port Message Message Number 42 2 Port Number Number of the port in which to retrieve the personality
14. OxOE BHN ERROR HW TYPE The underlying port hardware does not support the SET LINE message Data Length 0 bytes Requirements Protocol version 9 or greater General message No Port message Yes Async Yes Sync Yes Port state must be Open See Also GET LINE 48 Revision 1 04 January 5 2009 GP Protocol Reference SET_LIN E2 The SET_LINE2 message is used to change the line settings of the specified port Message Message Number 62 Ox3E Port Number Number of port in which to change the line settings Data Length 256 bytes Data struct lolum uint8 reserved SLEUCE Wines tease smode SLEUCE uint8 interrupt threshold uint8 reserved 31 SEGUE uint8 interrupt threshold uint8 reserved 31 misc transmitter umso Bos uint32 bps uint8 frac uint8 async div uint8 dpll div uint8 chiy uint8 ene Ceg SELUCE uinte A uint8 wie D elk eree TaLk CTIM 00049 uint8 clk pin 49 Blue Heat Net Revision 1 04 January 5 2009 Protocol Reference smode Establishes the operational serial mode for the specified port There are 2 sub settings in this item a setting for the Transmitter and a setting for the Receiver Although the Blue Heat Net allows the settings for the Receiver and Transmitter of a given port to be different in many cases differ
15. Yes Yes Yes Open Revision 1 04 January 5 2009 Protocol Reference SET_RTS_DTR The SET_RTS_DTR message is used to set the state of the RTS and DTR signals Message Message Number 38 0x26 Port Number Number of port in which to set the state of RTS and DTR Data Length 2 bytes Data Onn 9 uint8 rts onoff mince cier Guo rts_onoff If rts_onoff is non zero SET_RTS_DTR sets the RTS signal to a logical 1 on If rts_onoff is zero SET_RTS_DTR sets the RTS signal to a logical O off dtr_onoff If dtr_onoff is non zero SET_RTS_DTR sets the DTR signal to a logical 1 on If dtr_onoff is zero SET_RTS_DTR sets DTR signal to a logical 0 off Response Status Status Value Status Name Description 0 0x00 CMD_OK The SET_RTS_DTR message succeeded 3 0x03 BHN_ERROR_UNSPECIFIED non categorized error occurred Data Length 0 bytes Requirements Protocol version 9 or greater General message No Port message Yes Async Yes Sync Yes Port state must be Open See Also SET DTR SET RTS START_STOP_BREAK The START_STOP_BREAK message is used to start and stop transmition of a break condition Message Message Number 14 0x0E CTIM 00049 67 Blue Heat Net CTs Port Number Number of port in which to start or stop transmitting a break condition Data Length 1 byte Data uint8 onoff onoff If onoff is non zero
16. clocking combination which will not operate An error code will result Somewhat obscure case If the Receiver was setup with a very low bps error with a non standard bit rate and or a high bit rate gt 1 8M bps using Baud Rate Generator 0 and the Transmitter was setup with a low bit rate lt 280 bps using Baud Rate Generator 1 This combination would cause an error because the internal Counter resources of the IUSC device can not support this diverse range of settings There are four sub members of the clk tree member each relates to a different level as shown in Figure 3 1 This figure shows the selections available at the different levels using different colours for better understanding CTIM 00049 53 Blue Heat Net ssed Aq au 5 0 1 02 1841 25 942 euo A uo 5 esne2aq passed Aq sJejunoo 941 JO BSN y YDIYM JOSIAIP e 5 e 10 42 e 3e 1 2 ue Aq passed Ag 3 2 pue 0 412 ja47 24 3 ZHW pesseg g 5415 u1og PuJ93X3 8 gt w io lt lt v 729 o n o vo o
17. mirror the Transmitter clock TxC pin only 1 0x01 RXC_RXCLK Output mirror the Receiver clock RxC pin only 2 0x02 XC CHAR CLK Output RxCHAR for RxC TxCHAR for TxC 3 0x03 TXC TXCOMP Output TX Complete TxC pin only 3 0x03 RXC RXSYNC Output RxSYNC RxC pin only 4 0x04 XC BRGO Output from BRG O 5 0x05 XC_BRG1 Output from BRG 1 6 0x06 TXC CTR1 Output from CTR 1 TxC pin only 6 0x06 RXC CTRO Output from 0 RxC pin only 134 0x86 PORT1 Output from Port 1 TxC pin only 134 0x86 RXC PORTO Output from 0 RxC pin only 7 0x07 XC DPLL Output from DPLL RX for RxC DPLL TX for TxC One interesting point here is that when either the RxC or TxC signal is used as a clocking source at the appropriate levels of the clock tree the RxC or TxC signals do NOT have to be setup as inputs as would seem intuitive The RxC or TxC signals can be outputs as well as being clock sources for various items the IUSC device takes care of the signal routing internally When either the RxC or TxC signal is setup to be sourced from a Baud Rate generator or Counter then the settings defined in ref freq bps bps frac bps error or ctr div must be appropriately setup For the RxC signal the settings are placed in the rxclk member and for the TxC signal in the txclk member tx pre idle pre pat Sets the Preamble pattern A pattern that is transmitted for N number of bits at the beginning of e
18. Data struct bhn rtc mode uint8 mode mode mode can be one or more of the following values Value Name Description 1 0x01 BHN RTCM MINUTE RISING Minutes pulse is on rising edge otherwise falling edge 2 0x02 RTCM EXT TIMEBASE External timebase is selected otherwise internal timebase 4 0x04 BHN RTCM SEC RISING Seconds pulse is on rising edge otherwise falling edge 32 0x20 RTCM MINUTE PENDING Indicates that the minute pulse once circuit is armed 64 0x40 RTCM MINUTE STATE Indicates that the state of the minute pulse signal is high on Requirements Protocol version 10 or greater General message No Port message Yes Async Yes Sync Yes Port state must be Open See Also SET RTC MODE SET RTC CLOCK SET RTC ALARM OPEN PORT The OPEN PORT message is used to open a port on a Blue Heat Net device Most port oriented messages require that the port be open before the message can be completed Message Message Number 2 0x02 CTIM 00049 33 Blue Heat Net CTs Port Number Number of port in which to open Data Length 1 byte Data struct bhn open uint8 flags flags This member can be one or more of the following values Bit Name Description 0 OPEN READ Read enabled 1 OPEN WRITE Write enabled Response Status Status Value Status Name Description 0 0x00 CMD OK The OPEN PORT message succeeded 3 0x03 BHN ERROR UNSPECIFIED non categorized error occurred D
19. Data Length 0 bytes Response Status Status Value Status Name Description 0 0x00 CMD_OK The GET_PSON message succeeded 3 0x03 BHN ERROR UNSPECIFIED non categorized error occurred Data Length 32 byte Data struct bhn pson int8 personality 32 personality An array of 32 characters which indicates the personality of the specified port The personality setting is a represented as a NUL terminated string and can be one of the following values CTIM 00049 29 Blue Heat Net Value Description ctid portd Blue Heat Net this protocol ppp call PPP Call ppp answer PPP Answer enserial Reserved rawsock Raw TCP server rawsockc Raw TCP client Requirements Protocol version General message Port message Async Sync Port state must be GET_RTC_ALARM 9 or greater Yes No N A N A Any The GET_RTC_ALARM message is used to retrieve the current alarm settings for the specified port Message Message Number 56 0x38 Port Number Number of port in which to retrieve the alarm settings Data Length 0 bytes Response Status Status Value Status Name 0 0x00 CMD_OK 11 OxOB BHN_ERROR_PROTO_LEN 13 0 00 BHN_ERROR_CLOSED 14 OxOE BHN_ERROR_HW_TYPE Data Length 6 bytes Data Description The GET_RTC_ALARM message succeeded The data length specified in the message header is invalid The port is currently closed but GET RTC ALARM requires it to be op
20. GET_FIFO_CONTROL 22 GET_LINE 23 GET_LINE_STATE 24 GET_LINE2 24 GET_MSR 25 GET_PORTCAP 26 GET_PROTO_SUPPORT 27 GET_PROTO_VER 28 GET_PSON 29 GET_RTC_ALARM 30 GET_RTC_CLOCK 31 GET_RTC_GATE 32 GET_RTC_MODE 33 length 6 OPEN_PORT 34 PING 35 port number 6 PURGE 35 RESET_BHN 36 response number 6 RESUME_TX 37 SEND_BREAK 37 SEND_IMMEDIATE 38 SEND_XCHAR 39 SET_DATA_MODE 40 SET_DTR 41 SET_EVENT 42 SET_EVENT2 44 SET_FIFO_CONTROL 46 SET_LINE 48 SET_LINE2 61 SET_RTC_ALARM 62 SET_RTC_CLOCK 63 SET_RTC_GATE 64 SET_RTC_MODE 65 SET_RTS 66 SET_RTS_DTR 67 START_STOP_BREAK 68 status 6 SYNC_HUNT 69 response format 6 74 RESUME_TX 36 SEND_BREAK 37 SEND_IMMEDIATE 38 SEND_XCHAR 38 SET_DATA_MODE 39 SET_DTR 40 SET_EVENT 41 SET_EVENT2 42 SET_FIFO_CONTROL 45 SET_LINE 47 SET_LINE2 49 SET_RTC_ALARM 61 SET_RTC_CLOCK 63 SET_RTC_GATE 64 SET_RTC_MODE 65 SET_RTS 66 SET_RTS_DTR 67 START_OF_FRAME 8 71 START_STOP_BREAK 67 stream mode 4 structures bhn_break 37 bhn_data_mode 19 39 bhn_dir_event2 70 bhn_dir_sof 71 bhn_event 20 41 bhn_event_occurred 15 bhn_event2 21 43 bhn_event2_occurred 16 bhn_fifo 22 45 bhn_info 17 bhn_info_cmd 17 bhn_Iset 47 bhn_lIset2 49 bhn Iset2 stat 61 bhn Istate 25 bhn msr 25 26 bhn open 34 bhn proto supp 27 bhn proto ver 28 bhn pson 29 purge 35 bhn rtc clock 62 63 bhn rtc gate 64
21. Heat Net GP Data Length 0 bytes Response Status Status Value Status Name 0 0x00 CMD_OK 3 0x03 BHN_ERROR_UNSPECIFIED 14 OxOE BHN_ERROR_HW_TYPE Data Length 2 bytes Data uintl6 events events Description The GET_EVENT message succeeded A non categorized error occurred The underlying port hardware does not support the GET_EVENT message The events member indicates which event types are enabled or disabled Each event type is enabled if its corresponding bit is set If a bit is cleared the event type is disabled These bits are the same as the ones listed in the SET_EVENT message data Requirements Protocol version General message Port message Async Sync Port state must be See Also SET EVENT EVENT OCCURRED GET_EVENT2 9 or greater No Yes Yes Yes Open The GET_EVENT2 message is used to retrieve the current event settings events last set by SET_EVENT2 Message Message Number 66 0x42 Port Number Number of the port in which to retrieve the current event settings Data Length 0 bytes 20 Revision 1 04 January 5 2009 Protocol Reference Response Status Status Value Status Name Description 0 0x00 CMD_OK The GET_EVENT2 message succeeded 3 0x03 BHN_ERROR_UNSPECIFIED A non categorized error occurred 11 0 BHN_ERROR_PROTO_LEN The data length specified in the message header is invalid 13 0 00
22. TCP port and sends messages by writing the appropriate message headers and data Responses will be sent back through the TCP connection and are read by the host application A connection to the general message channel can be torn down at any point by destroying the TCP connection from the host application CTIM 00049 J Blue Heat Net ap Port Messages The port message channel can be used to access port specific settings and information Unlike the general message channel a port message channel will only accept one connection at a time However like the general message channel a host application first creates a TCP connection to the general message channel s TCP port and sends messages by writing the appropriate message headers and data Responses will be sent back through the TCP connection and are read by the host application If the data channel corresponding to a port message channel has not yet been opened then the host application can tear down the port message channel at any point by destroying the TCP connection If the data channel has been opened it is recommended that the data channel be torn down before the port message channel Data The port message OPEN PORT causes the Blue Heat Net to listen for incoming TCP connections on the port s corresponding data channel After sending the OPEN PORT message the host application should wait to receive the OPEN PORT response checking the status for success or failure Upon receiv
23. clk_tree settings below for details about clocking Valid values for ref_freq are from 0 to 20 000 000 inclusive If the internal reference clock is used INT_REF_FREQ can be used for the value of ref_freq bps_error The maximum allowable bit rate error in PPM parts per million 10000 would equal 1 With the IUSC device there are multiple ways to achieve a given bit rate To make the best use of the internal clocking resources of the IUSC device the bit rate computational algorithm uses this bps_error value to decide when a given computation is good enough Set this value to something realistic for the application If this value is always set to zero the algorithm will likely to return CTIM 00049 51 Blue Heat Net CTs 52 an error code unless the desired bit rate be achieved exactly with zero error bps Bit rate integer portion A value from 0 to when can be any value up to the ref freq value bps_frac Bit rate fractional portion in units of 10th s Only effective at low bit rates As the bit rate goes down the setting resolution increases To get an approximation of the bps resolution over a range of bit rates perform the following calculation bps2 1 ref _ ref 2 bpsl lower data rate in bits per second bps _ resolution bps2 upper data rate in bits per second ref clock source frequency Example 1 9000 bps2 10000 ref 18 432
24. used to retrieve the line settings of the specified port Message Message Number 63 Ox3F Port Number Number of port in which to retrieve the line settings Data Length 0 bytes CTIM 00049 23 Blue Heat Net CTs Response Status Status Value Status Name Description 0 0x00 CMD_OK The GET_LINE2 message succeeded 3 0x03 BHN ERROR UNSPECIFIED non categorized error occurred 11 0 BHN_ERROR_PROTO_LEN The data length specified in the message header is invalid 13 0 00 5 port is currently closed but GET_LINE2 requires it to be open 14 0 0 BHN ERROR HW The underlying port hardware does not support the GET LINE2 message Data Length 256 bytes Data The LINE2 response uses the same data structure as the SET LINE2 message Requirements Protocol version 10 or greater General message No Port message Yes Async Yes Sync Yes Port state must be Open See Also SET LINE2 GET LINE STATE The GET LINE STATE message is used to retrieve the current state of various modem signals Message Message Number 12 0 0 Port Number Number of port in which to retrieve line states Data Length 0 bytes Response Status Status Value Status Name Description 0 0x00 CMD OK The GET LINE STATE message succeeded 3 0x03 BHN ERROR UNSPECIFIED non categorized error occurred Data Length 1 byte 24 Revision 1 04 January 5 2009 ap Protocol Reference
25. 0x3A Port Number Number of port in which to retrieve the gate state Data Length 0 bytes Response Status Status Value Status Name Description 0 0x00 CMD_OK The GET_RTC_GATE message succeeded 11 0 BHN ERROR PROTO LEN The data length specified the message header is invalid 13 0 00 BHN ERROR CLOSED The port is currently closed but GET RTC GATE requires it to be open 14 OxOE BHN ERROR HW TYPE The underlying port hardware does not support the RTC GATE message Data Length 1 byte Data Same as SET RTC GATE message data Requirements Protocol version 10 or greater General message No Port message Yes Async Yes Sync Yes Port state must be Open See Also SET RTC GATE SET RTC CLOCK GET RTC MODE The GET RTC MODE message is used to retrieve the current RTC mode settings Message Message Number 59 0x3B Port Number Number of port in which to retrieve the RTC mode 32 Revision 1 04 January 5 2009 ap Protocol Reference Data Length 0 bytes Response Status Status Value Status Name Description 0 0x00 CMD OK The GET RTC MODE message succeeded 11 0 BHN ERROR PROTO LEN The data length specified the message header is invalid 13 0 00 BHN ERROR CLOSED The port is currently closed but MODE requires it to be open 14 OxOE BHN ERROR HW TYPE The underlying port hardware does not support the GET RTC MODE message Data Length 1 byte
26. ARK 5 0x05 SPACE Biphase Space 6 0x06 BIPH_LEVEL Biphase Level 7 0x07 BIPH DIFF Differential Biphase Level Only the NRZ and NRZ INV settings are valid when the smode setting is set to SMODE_ASYNC All NRZI_Xxx settings expect that the Receiver is setup to be clocked from the DPLL see clk_tree settings clk_tree Refer to Figure 3 1 which shows the internal clocking structure of the IUSC device and how it relates to the settings described below Having a good understanding of the clock tree settings is important to achieve a successful setup The clock tree settings along with bit rate parameter settings allow many possible combinations to be selected but many of those combinations are inconsistent or incompatible In fact there are many more combinations that will not work as opposed to combinations that will work Here are some examples of incompatible combinations Simple case If the Receiver and Transmitter were both setup to be clocked from Baud Rate Generator 0 clk tree A CLK_BRGO and the bit rate parameters for the Receiver are different than the similar settings for the Transmitter then an error would result More complicated case If the Receiver was setup to be clocked by the RxC signal input rxclk clk tree A RXC and the RxC signal was setup to be an output sourced from the Receiver rxclk clk RXC RXCLK this creates a circular
27. BRGO 1 0x01 DPLL_BRG1 From BRG1 2 0x02 DPLL RXC From RxC External Line Interface signal 3 0x03 DPLL_TXC From TxC External Line Interface signal This selects the clock source for the Baud Rate Generator and is only 55 Blue Heat Net ap 56 required when either the clk_tree A setting is BRGO or BRG1 or the tree B setting is DPLL BRGO BRG1 The selection made at either clk_tree A clk_tree B determines which Baud Rate Generator is setup B can be zero if not required but must be one of the following values Value Name Description 0 0x00 BRG CTRO From IUSC CTR O or Port 0 if INT REF is set 1 0x01 BRG CTR1 From IUSC CTR 1 or Port 1 if EXT REF is set 2 0x02 BRG RXC From RxC external line interface signal 3 0x03 BRG TXC From TxC external line interface signal 128 0x80 INT REF From Internal reference 18 432 MHz 129 0x81 EXT REF From External reference External Reference Signal input Some special consideration should be taken when selecting INT REF or BRG EXT REF While these clocking sources are physically possible they come at a high cost to the clocking structure This occurs because the IUSC device uses only one bit to control the bypassing of CTR 0 and CTR 1 See section 4 3 of the IUSC manual and Figure 3 1 D This establishes the clocking source for either 0 or CTR 1 The selection of which counter to setup is ma
28. Connect Tech Inc Industrial Strength Communications Blue Heat Net Protocol Manual Connect Tech Inc Y Connect Tech Inc gt Blue Connect Tech Inc 42 Arrow Road Guelph Ontario Canada 156 Tel 519 836 1291 800 426 8979 North America only Fax 519 836 4878 Email sales connecttech com support connecttech com URL http www connecttech com CTIM 00049 Revision 1 04 January 5 2009 Copyright Notice The information contained in this document is subject to change without notice Connect Tech Inc shall not be liable for errors contained herein or for incidental consequential damages in connection with the furnishing performance or use of this material This document contains proprietary information that is protected by copyright All rights are reserved No part of this document may be photocopied reproduced or translated to another language without prior written consent of Connect Tech Inc Copyright 2008 by Connect Tech Inc Revision 1 04 January 5 2009 Date Published January 5 2009 Trademark Acknowledgement Connect Tech Inc acknowledges all trademarks registered trademarks and or copyrights referred to in this document as the property of their respective owners Not listing all possible trademarks or copyright acknowledgements does not constitute a lack of acknowledgement to the rightful owners of the trademarks and copyrights mentioned in this docum
29. D OK The SET DATA MODE message succeeded 1 0x01 BHN ERROR OPENED The port is currently open but SET DATA MODE requires it to be closed 9 0x09 BHN ERROR INVALID PARM The specified data mode is not valid 10 0x0A ERROR UNSUPPORTED specified data mode is not supported on the specified port 11 0 ERROR PROTO LEN The data length specified in the message header is invalid 14 OxOE BHN ERROR HW TYPE The underlying port hardware does not support the SET DATA MODE message Data Length 0 bytes Requirements Protocol version 10 or greater General message No Port message Yes Async Yes Sync Yes Port state must be Closed See Also GET DATA MODE SET DTR The SET DTR message is used to set the state of the DTR signal Message Message Number 16 0x10 Port Number Number of port in which to set the state of DTR Data Length 1 byte Data onn uint8 onoff onoff If onoff is non zero SET_DTR sets the DTR signal to a logical 1 on If onoff is zero SET_DTR sets the DTR signal to a logical 0 off 40 Revision 1 04 January 5 2009 Protocol Reference Response Status Status Value Status Name Description 0 0x00 CMD_OK The SET_DTR message succeeded 3 0x03 BHN_ERROR_UNSPECIFIED non categorized error occurred Data Length 0 bytes Requirements Protocol version 9 or greater General message No Port message Yes Async Yes Sync Yes Port state must
30. E2 requires it to be open 14 OxOE BHN ERROR HW TYPE The underlying port hardware does not support the SET LINE2 message Data Length 4 bytes Data struct bam leet stat 1 22 Code err_code Error code describing a port settings error or conflict Requirements Protocol version 10 or greater General message No Port message Yes Async Yes Sync Yes Port state must be Open See Also GET LINE2 SET RTC ALARM The SET RTC ALARM message is used to configure alarms based on the RTC These alarms start and stop the transmitter and or the receiver Message Message Number 55 0x37 CTIM 00049 61 Blue Heat Net Port Number Number of port in which to set RTC alarms Data Length 6 bytes Data OnE coc SISSE stop _ t lolum zee CIMS t8 hours t8 minutes t8 seconds time bhn rtc time 8 hours t8 minutes t8 seconds time start time stop time When the RTC reaches start time the transmitter and or receiver is started When the RTC reaches stop time the transmitter and or receiver is stopped In order for the alarms to operate on the transmitter the SET LINE message must first be sent with the tx trig gate member set to TX GATED Similar to the transmitter the alarms will operate on the receiver once the SET LINE message is sent with the rx gate member set to GATED hours hou
31. EVENT DCD DCD change of state events 8 EVENT RX XON Start character received events 9 EVENT RX XOFF Stop character received events 10 15 Reserved N A EVENT NONE Disables all events N A EVENT ALL Enables all events events2 The events2 member indicates which event types are to be enabled or disabled Each event type is enabled by setting its corresponding bit as shown below Clearing a bit disables the event type CTIM 00049 43 Blue Heat Net Bit Name Description 0 EVENT2_IDLE_RECVD 1 EVENT2_ABORT1 HDLC SDLC Abort or Go Ahead sequence 2 EVENT2_RCC_UNDER 3 EVENT2_PRE_SENT 4 EVENT2_IDLE_SENT 5 EVENT2_ABORT_SENT 6 EVENT2_EOFM_SENT 7 EVENT2_CRC_SENT 8 EVENT2_TX_UNDER 9 EVENT2_RI_FALL 10 EVENT2_RI_RISE 11 EVENT2_DCD_FALL 12 EVENT2_DCD_RISE 13 EVENT2_CTS_FALL 14 EVENT2_CTS_RISE 15 EVENT2_DSR_FALL 16 EVENT2_DSR_RISE 17 EVENT2_DPLL_DSYNC 18 EVENT2_ABORT2 HDLC SDLC with QAbort set occurs for character followed by an Abort sequence 19 EVENT2_CRC 20 EVENT2_SHORT_FR_CV 21 EVENT2_RX_BUF_LOW 22 EVENT2_TX_BUF_LOW 23 EVENT2_RX_BUF_HIGH 24 EVENT2_TX_BUF_HIGH 25 31 Reserved N A EVENT2_NONE Disable all events N A EVENT2_ALL Enable all events Response Status Status Value Status Name Description 0 0x00 CMD_OK The SET_EVENT2 message succeeded 9 0x09 BHN_ERROR_INVALID_PARM error occurred setting the specified event masks 11 0 BHN_ERROR_PROTO_LEN The data length specified in the
32. GET_FIFO_CONTROL 21 GET_LINE 22 GET_LINE_STATE 24 GET_LINE2 23 GET_MSR 25 GET_PORTCAP 26 GET_PROTO_SUPPORT 9 27 GET_PROTO_VER 28 GET_PSON 29 GET_RTC_ALARM 30 GET_RTC_CLOCK 31 GET_RTC_GATE 32 GET_RTC_MODE 32 M message 4 CANCEL_RTC_MPO 13 CTIM 00049 CLOSE_PORT 14 data 5 EVENT_OCCURRED 14 EVENT2_OCCURRED 16 GET_BHN_INFO 17 GET_DATA_MODE 18 GET_EVENT 19 GET EVENT2 20 GET CONTROL 21 LINE 22 5 24 LINE2 23 GET MSR 25 GET PORTCAP 26 GET PROTO SUPPORT 27 PROTO VER 28 GET PSON 29 ALARM 30 RTC CLOCK 31 32 32 length 5 message number 5 OPEN_PORT 33 PING 34 port number 5 PURGE 35 RESET_BHN 36 RESUME_TX 36 SEND_BREAK 37 SEND_IMMEDIATE 38 SEND_XCHAR 38 SET_DATA_MODE 39 SET_DTR 40 SET_EVENT 41 SET_EVENT2 42 SET_FIFO_CONTROL 45 SET_LINE 47 SET_LINE2 49 SET_RTC_ALARM 61 SET_RTC_CLOCK 63 SET_RTC_GATE 64 SET_RTC_MODE 65 SET_RTS 66 SET_RTS_DTR 67 START_STOP_BREAK 67 SYNC_HUNT 68 message format 5 O OPEN_PORT 7 8 33 packet mode 4 73 Blue Heat Net GP PING 34 protocol usage 7 PURGE 35 R RESET_BHN 36 response 4 CANCEL_RTC_MPO 13 CLOSE_PORT 14 completed message number 6 data 6 EVENT_OCCURRED 15 EVENT2_OCCURRED 16 GET_BHN_INFO 17 GET_DATA_MODE 19 GET_EVENT 20 GET_EVENT2 21
33. January 5 2009 Protocol Reference Message Message Name Message Data Response Data Protocol Usage Number Size Size Version 60 0x3C SET RTC MODE 1 0 104 PIAIS 61 Ox3D CANCEL RTC MPO 0 0 10 5 62 SET_LINE2 256 4 10 5 63 Ox3F LINE2 0 256 10 5 65 0x41 EVENT2 6 0 10 5 66 0x42 EVENT2 0 6 10 5 67 0x43 EVENT2 OCCURRED 23 10 5 Table 3 1 3 2 Message Detail CANCEL_RTC_MPO The CANCEL_RTC_MPO message is used to cancel the minute pulse once mode Message Message Number 61 0 30 Port Number Number of port in which to cancel the minute pulse once mode Data Length 0 bytes Response Status Status Value Status Name Description 0 0x00 CMD_OK The CANCEL_RTC_MPO message succeeded 11 0 BHN ERROR PROTO LEN The data length specified in the message header is invalid 13 0 00 5 port is currently closed but CANCEL RTC MPO requires it to be open 14 OxOE BHN ERROR HW TYPE The underlying port hardware does not support the CANCEL RTC MPO message Data Length 0 bytes Remarks The minute pulse once mode is enabled by sending a SET RTC MODE message with RTC MINUTE ONCE set CANCEL RTC MPO can be used to disabled RTC MINUTE ONCE CTIM 00049 13 Blue Heat Net Requirements Protocol version General message Port message Async Sync Port state must be See Also SET
34. MHz 10000 9000 18432000 18432000 9000 10000 22221000 2048 1843 _ 1000 205 4 88 Note Do not do the calculation over too small or too large a range or the results will be misleading bps and bps_frac are combined to form a bit rate number that is used in the Bit Rate Computational Algorithm bps _ resolution async_div Sets the fundamental clock division setting for the Receiver or Transmitter Only settings 16 32 or 64 are allowed and are only relevant to Async mode of operation dpll div Sets the fundamental clock division setting for the DPLL Receiver clock recovery circuit within the IUSC device Only settings 8 16 or 32 are allowed and are only relevant to modes which enable the use of the DPLL as the clocking source for the Receiver see clk tree settings Revision 1 04 January 5 2009 Protocol Reference ctr_div Sets the divisor used for the Counter selected to clock the Receiver or Transmitter Only settings 4 8 16 or 32 are allowed and are only required when a Counter is setup to directly clock the Receiver Transmitter RxC or TxC signals see clk_tree settings enc_dec This selects the Receiver data decoding or Transmitter data encoding method to be employed enc_dec can be one of the following values Value Name Description 0 0x00 NRZ NRZ 1 0x01 2 INV NRZB 2 0x02 21 MARK gt NRZI Mark 3 0x03 NRZI SPACE 5 4 0x04 BIPH M
35. START STOP BREAK starts transmiting a break condition If onoff is zero START STOP BREAK stops transmiting a break condition Response Status Status Value Status Name Description 0 0x00 CMD_OK The START_STOP_BREAK message succeeded 3 0x03 BHN ERROR UNSPECIFIED non categorized error occurred Data Length 0 bytes Requirements Protocol version 9 or greater General message No Port message Yes Async Yes Sync No Port state must be Open See Also SEND BREAK SYNC_HUNT The SYNC_HUNT message is used to force the receiver into Hunt Mode immediately regardless of its previous state Message Message Number 52 0x34 Port Number Number of port in which to put the receiver into Hunt Mode Data Length 0 bytes 68 Revision 1 04 January 5 2009 GP Protocol Reference Response Status Status Value Status Name 0 0x00 CMD_OK 3 0x03 BHN_ERROR_UNSPECIFIED 11 OxOB BHN_ERROR_PROTO_LEN 13 0 00 BHN_ERROR_CLOSED 14 OxOE BHN_ERROR_HW_TYPE Data Length 0 bytes Remarks Description The SYNC_HUNT message succeeded A non categorized error occurred The data length specified in the message header is invalid The port is currently closed but SYNC_HUNT requires it to be open The underlying port hardware does not support the SYNC_HUNT message In Synchronous modes Hunt Mode means that the receiver starts searching for a Sync or Flag sequence In Asynchronous modes it starts searching for a star
36. Space parity 0 s Mark parity 1 s This is a collection of settings related to the generation or checking of CRC values that are commonly used with Synchronous protocols to validate data frames or packets tx_type rx_type Sets the type of CRC to be employed tx_type rx_type can be one of the following values Value Name 0 0x00 CRC_NONE 1 0x01 CCITT 2 0x02 CRC16 3 0x03 CRC32 tx_start rx_start Description Disable CRC CRC CCITT CRC 16 CRC 32 Sets the starting value for CRC computations tx_start rx_start can be one of the following values Value Name Description 0 0x00 5 0 Start with all zeros CRC 1 0x01 START 1 Start with all ones CRC tx_mode Sets the conditions which cause the Transmitter to send a CRC tx_mode can be one or more of the following values Value Name Description 1 0x01 TX UNDERRUN sent when Transmitter underruns 2 0x02 TX EOFM CRC sent when EOF EOM end of frame end of tx trig gate message occurs Sets the triggered or gated transmit mode tx trig gate can be one of the following values Value Name 0 0 00 TX TRIG DISABLE 1 0x01 TX TRIG FALL 2 0x02 TRIG RISE 3 0x03 TX GATED Description Triggered and gated transmit mode is disabled Hardware initiated by the falling edge of the tx trig signal Hardware initiated by the rising edge of the tx trig signal Software initiated Settings
37. TX TRIG FALL falling edge and TX TRIG RISE rising edge enable a mode where the Transmitter will only transmit 1 byte character each time the selected edge of a triggering signal occurs This signal originates on the 25D I O connector Setting GATED establishes a mode that allows software to quickly enable disable the Transmitter via a signal that originates within the Main PLD logic See SET RTC GATE and SET RTC ALARM messages for more information Revision 1 04 January 5 2009 Protocol Reference rx_gate Sets the gated receive mode rx_gate can be one of the following values Value Name Description 0 0x00 RX GATED DISABLE gt Gated receive mode is disabled 1 0x01 GATED Software initiated Setting RX GATED establishes a mode that allows software to quickly enable disable the Receiver via a signal that originates within the Main PLD logic See SET RTC GATE and SET RTC ALARM messages for more information Response Status Status Value Status Name Description 0 0x00 CMD OK The SET LINE2 message succeeded 3 0x03 BHN ERROR UNSPECIFIED A non categorized error occurred 9 0x09 BHN ERROR INVALID PARM There is an error or conflict in the specified port settings See the err code member of the response data for detailed information 11 0 BHN_ERROR_PROTO_LEN The data length specified in the message header is invalid 13 0 00 ERROR CLOSED The port is currently closed but SET LIN
38. _BHN 9 or greater No Yes Yes Yes Open The RESET_BHN message is used to reboot a Blue Heat Net device Message Message Number 28 0 1 Port Number N A Data Length 0 bytes Response Status Status Value Status Name Description 3 0x03 BHN ERROR UNSPECIFIED non categorized error occurred Data Length 0 bytes Remarks The RESET_BHN response cannot be depended on It is possible that no response will be sent Requirements Protocol version General message Port message Async Sync Port state must be RESUME_TX 9 or greater Yes No N A N A N A The RESUME_TX message is used to perform a software restart of a port that has been flow controlled by an XOFF RESUME_TX causes a fake XON to occur Message Message Number 19 0x13 Port Number Number of port in which to resume transmition 36 Revision 1 04 January 5 2009 GP Protocol Reference Data Length 0 bytes Response The RESUME_TX message has no response Requirements Protocol version General message Port message Async Sync Port state must be See Also SEND XCHAR SEND BREAK 9 or greater No Yes Yes No Open The SEND BREAK message is used to transmit a break condition of a given length Message Message Number 13 0x0D Port Number Number of port in which to transmit a break condition Data Length 1 byte Data struct bhn break uint8 duration duration If durat
39. ach Frame or Packet usually used with Character oriented Synchronous protocols MonoSync BiSync or Transparent BiSync when the data includes encoded clock information NRZI or BP Phase clock encoding A Preamble pattern is generally used to prepare the Receiver DPLL for subsequent data ie gets the Receiver sync d to the bit transition point of the Transmitter pre pat can be one of the following values Value Name Description 0 0x00 PREAM DISABLE Disabled 1 0x01 PREAM_ZEROS All zero s 2 0x02 ONES All one s 3 0x03 FLAGS Flags only in HDLC mode 4 0x04 ZERO ONE 0101 pattern 5 0x05 ONE ZERO 1010 pattern pre len Establishes the length of the Preamble pattern as 8 16 32 or 64 bits long tx idle This sets the pattern that is transmitted when the Transmitter goes Idle Idle occurs after any CRC and or closing SYNC or Flag that may be setup for the protocol setup by the smode member CTIM 00049 57 Blue Heat Net ap Value Name Description 0 0x00 IDLE DEF Default idle activity for a given serial mode 1 0x01 IDLE ALTO1 Alternating zero s and one s encoded 2 0x02 IDLE ZEROS Continuous zero s encoded 3 0x03 IDLE ONES Continuous one s encoded 5 0x05 IDLE SPC Alternating Mark one and Space zero 6 0x06 IDLE SPACE Continuous zero s NOT encoded 7 0x07 IDLE MARK Continuous ones s NOT encoded line mode Th
40. alues Value Name Description 1 FIFO FLAG FIFOS ENABLED FIFO buffers are enabled If this flag is not specified 0x01 FIFOs are disabled and the x threshold rx threshold and tx load size members have effect note their values can still be set but only take effect when FIFOs are enabled Response Status Status Value Status Name Description 0 0x00 CMD OK SET CONTROL message succeeded 3 0x03 ERROR UNSPECIFIED non categorized error occurred 8 0x08 BHN ERROR INVALID FIFO One or more FIFO settings are invalid The 46 mask member of the response data specifies which members were invalid Settings are applied in an all or none manner Therefore this response status means that no settings were applied 14 OxOE BHN ERROR HW TYPE The underlying port hardware does not support the SET FIFO CONTROL message Data Length 8 bytes Data The response data is in the form of a bhn fifo structure If the response status is ERROR INVALID FIFO the response data s mask member indicates which values were invalid The invalid values are also provided in the other structure members See the message data section for a list of valid flags and values If the response status is not BHN ERROR INVALID FIFO the response Data should be treated as undefined and not used in any way Revision 1 04 January 5 2009 GP Protocol Reference Requirements Protocol version General messa
41. aracter to send The xchar member can be one of the following values 38 Revision 1 04 January 5 2009 Protocol Reference Value Name Description 1 0x01 Send a START character 2 0x02 XCHAR_XOFF Send a STOP character The actual characters sent when using SEND_XCHAR are configured using the SET_LINE message Response Status Status Value Status Name Description 0 0x00 CMD_OK The SEND_XCHAR message succeeded 3 0x03 BHN ERROR UNSPECIFIED non categorized error occurred 14 OxOE BHN ERROR HW TYPE The underlying port hardware does not support the SEND XCHAR message Data Length 0 bytes Requirements Protocol version 9 or greater General message No Port message Yes Async Yes Sync No Port state must be Open See Also SET LINE RESUME TX SET DATA MODE The SET DATA MODE message is used to change a port s data protocol mode between stream and packet modes Message Message Number 50 0x32 Port Number Number of the port in which to change the data mode Data Length 1 byte Data struct bhn data mode uint8 mode mode The mode member specifies which data mode to set mode can be one of the following values CTIM 00049 39 Blue Heat Net CTs Value Name Description 0 0x00 BHN_DM_STREAM Stream 1 0x01 BHN DM PACKET Packet See section 2 4 Data Format for details about stream and packets modes Response Status Status Value Status Name Description 0 0x00 CM
42. ata Length 0 bytes Requirements Protocol version 9 or greater General message No Port message Yes Async Yes Sync Yes Port state must be Closed See Also CLOSE PORT PING The PING message is a simple diagnostic message that can be used to test protocol communications Message Message Number 1 0x01 Port Number N A Data Length 0 bytes 34 Revision 1 04 January 5 2009 Protocol Reference Response Status Status Value Status Description 0 0x00 CMD_OK The PING message succeeded Data Length 0 bytes Requirements Protocol version 9 or greater General message Yes Port message No Async N A Sync N A Port state must be N A PURGE The PURGE message is used to remove any pending data in the receive or transmit streams Message Message Number 7 0x07 Port Number Number of port in which to purge Data Length 1 byte Data struct bhn purge uint8 flags flags This member can be one or more of the following values Bit Name Description 0 PURGE_READ Purge data coming into the Blue Heat Net port 1 PURGE_WRITE data going out of the Blue Heat Net port Response Status Status Value Status Name Description 0 0x00 CMD_OK The PURGE message succeeded 3 0x03 BHN_ERROR_UNSPECIFIED A non categorized error occurred Data Length 0 bytes CTIM 00049 35 Blue Heat Net Requirements Protocol version General message Port message Async Sync Port state must be RESET
43. be Open See Also RTS DTR SET RTS SET EVENT The SET EVENT message is used to request event reporting When the data mode SET DATA MODE is set to DM STREAM events enabled by SET EVENT are reported via EVENT OCCURRED messages If however the data mode is set to BHN DM PACKET the events are reported via EVENT2 directors Message Message Number 32 0x20 Port Number Number of the port in which to request event reporting Data Length 2 bytes Data uintl6 events events The events member indicates which event types are to be enabled or disabled Each event type is enabled by setting its corresponding bit as shown below Clearing a bit disables the event type CTIM 00049 41 Blue Heat Net CTs Bit Name Description 0 Overrun error events 1 EVENT_PE Parity error events 2 EVENT_FE Framing error events 3 EVENT_BREAK Break events 4 EVENT_CTS CTS change of state events 5 EVENT_DSR DSR change of state events 6 EVENT_RING RING events 7 EVENT_DCD DCD change of state events 8 EVENT_RX_XON Start character received events 9 EVENT RX XOFF Stop character received events 10 15 Reserved N A EVENT NONE Disables all events N A EVENT ALL Enables all events Response Status Status Value Status Name Description 0 0x00 CMD OK The SET EVENT message succeeded 3 0x03 BHN ERROR UNSPECIFIED non categorized error occurred 14 OxOE BHN ERROR HW TYPE The underly
44. bhn rtc mode 33 65 bhn rtsanddtr 67 bhn 40 66 bhn_sendi 38 bhn_ssbreak 68 bhn_xchar 38 SYNC_HUNT 68 TCP connections 4 Revision 1 04 January 5 2009 CTs Index ports 9 CTIM 00049 75
45. cks structure name references structure member references hyperlinks Data Types The data types used in this document are generic operating system independent names Table 1 1 lists the generic data types and their storage characteristics Type Description int8 Signed 8 bit integer int16 Signed 16 bit integer int32 Signed 32 bit integer uint8 Unsigned 8 bit integer uinti6 Unsigned 16 bit integer uint32 Unsigned 32 bit integer Table 1 1 1 4 Obtaining the Protocol The protocol definition is available as a C header file and is part of the Blue Heat Net SDK This header file BEN protocol h be found in the directory sdk root vendors ConnectTech include where sdk root is an extracted Blue Heat Net SDK CTIM 00049 3 Blue Heat Net CTs 2 The Protocol 2L OVEFVIEW MMC 4 2 2 Message 5 RESDONSB TOIT EPIRI EE 6 2 4 Data I a 6 Data Modes 6 Directors 7 Zio PrOLOEOI Usage MALA BEER Sud d adipe dpa d 7 General Message Sriparna REAA ERER 7 Port MeSSEUBS cup RR EE a A AAAA 8 8 9 2 6 TCP Port Bay cU SOUS Md AA 9 2 7 Ne
46. de at either c k tree A or clk tree C D can be one of the following values Value Name Description 0 0x00 CTR DISABLE Disable counter 1 0x01 CTR REF From their respective references CTR 0 from Internal reference 18 432 MHz CTR 1 is clocked from External reference 2 0x02 CTR RXC From RxC external line interface signal 3 0x03 TXC From TxC external line interface signal clk pin This setting establishes two operational aspects of the RxC and TxC line interface signals Whether the signal is an Input an Output When an Output what source is connected to the signal These signals are part of the interface signals available on the 25D I O connector These signals are commonly used as data clocks when operating in various Synchronous modes Although they are named RxC Receiver Clock and TxC Transmitter Clock that naming is for identification purposes only either signal can be an output or an input and either can clock the Receiver or Transmitter Circuitry of the Blue Heat Net automatically detects when these signals are selected to be inputs or outputs and switches the direction of the Line Interface circuits accordingly The setting for the RxC signal is found in rxclk clk pin and for the TxC signal in txclk clk pin clk pin can be one of the following values Revision 1 04 January 5 2009 Protocol Reference Value Name Description 0 0x00 XC_INP Input 1 0x01 TXC_TXCLK Output
47. e occurs See also CANCEL RTC MPO Response Status Status Value Status Name Description 0 0x00 CMD OK The SET RTC MODE message succeeded 11 0 BHN ERROR PROTO LEN The data length specified in the message header is invalid 13 0 00 BHN ERROR CLOSED The port is currently closed but SET RTC MODE requires it to be open 14 OxOE BHN ERROR HW TYPE The underlying port hardware does not support the SET RTC MODE message Data Length 0 bytes CTIM 00049 65 Blue Heat Net Requirements Protocol version General message Port message Async Sync Port state must be See Also 10 or greater No Yes Yes Yes Open RTC MODE CANCEL MPO SET RTC CLOCK SET RTC ALARM SET_RTS The SET_RTS message is used to set the state of the RTS signal Message Message Number 15 OxOF Port Number Number of port in which to set the state of RTS Data Length 1 byte Data onn uint8 onoff onoff If onoff is non zero SET_RTS sets the RTS signal to a logical 1 on If onoff is zero SET_RTS sets the RTS signal to a logical 0 off Response Status Status Value Status Name 0 0x00 CMD_OK Description The SET_RTS message succeeded 3 0x03 BHN ERROR UNSPECIFIED non categorized error occurred Data Length 0 bytes Requirements Protocol version General message Port message Async Sync Port state must be See Also SET RTS DTR SET DTR 66 9 or greater No
48. ed the message header is invalid 13 0 00 BHN ERROR CLOSED The port is currently closed but SET RTC GATE requires it to be open 14 OxOE ERROR HW The underlying port hardware does not support the SET RTC message Data Length 0 bytes Remarks To automatically start and stop the transmitter and or receiver based on the RTC time use the SET ALARM SET RTC CLOCK and SET RTC MODE messages 64 Revision 1 04 January 5 2009 Protocol Reference Requirements Protocol version 10 or greater General message No Port message Yes Async Yes Sync Yes Port state must be Open See Also GET RTC SET ALARM SET CLOCK SET MODE LINE2 SET_RTC_MODE The SET_RTC_MODE message is used to change the operational mode of the RTC Message Message Number 60 Port Number Number of port in which to change the RTC mode Data Length 1 byte Data Onn mode uint8 mode mode mode can be one or more of the following values Value Name Description 1 0x01 RTC MINUTE RISING Minutes pulse on rising edge otherwise falling edge 2 0x02 RTC EXT TIMEBASE Select external timebase otherwise internal timebase 4 0x04 RTC SEC RISING Seconds pulse on rising edge otherwise falling edge 16 0x10 MINUTE ONCE Arm the mode where The minute pulse is recognized only once and the clock incrementing is masked until the minute puls
49. en The underlying port hardware does not support the GET RTC ALARM message Same as SET RTC ALARM message data 30 Revision 1 04 January 5 2009 GP Protocol Reference Requirements Protocol version General message Port message Async Sync Port state must be See Also 10 or greater No Yes Yes Yes Open SET RTC ALARM SET RTC CLOCK SET RTC MODE GET_RTC_CLOCK The GET_RTC_CLOCK message is used to retrieve the current RTC time Message Message Number 54 0x36 Port Number Number of port in which to retrieve the RTC time Data Length 0 bytes Response Status Status Value Status Name 0 0x00 CMD_OK 11 0 BHN_ERROR_PROTO_LEN 13 0 00 BHN_ERROR_CLOSED 14 OxOE BHN_ERROR_HW_TYPE Data Length 3 bytes Data Description The GET_RTC_CLOCK message succeeded The data length specified in the message header is invalid The port is currently closed but GET_RTC_CLOCK requires it to be open The underlying port hardware does not support the GET_RTC_CLOCK message Same as SET_RTC_CLOCK message data Requirements Protocol version General message Port message Async Sync Port state must be See Also 10 or greater No Yes Yes Yes Open SET RTC CLOCK SET RTC ALARM SET RTC MODE CTIM 00049 31 Blue Heat Net CTs GET_RTC_GATE The GET_RTC_GATE message is used to retrieve the state of the transmitter receiver gating control Message Message Number 58
50. ent Revision History Revision 1 04 January 5 2009 gt Added Conventions section Revision 1 03 October 28 2008 gt Added Network Byte Ordering section gt Updated protocol status value tables Revision 1 02 October 6 2008 gt Removed Protocol Versioning information and added new supporting messages gt Added Real Time Clock tutorial Revision 1 01 September 24 2008 gt Release Revision 1 00 April 23 2008 gt Preliminary Release CTs Contents Contents 1 2 1 1 Supported Products and Platforms eara 2 1 2 Contact Information cu voa eur ERE SEX EM EE EIE EFI ERIFEMIM EE EM MEME E 2 13 CONVENTIONS Ld ia UI D 3 o PP 3 Date TYPES 3 1 4 Obtaining the Protocol lt ccsecscccccasasescsensetineecsecesesectseaaseancecacasccesass 3 2 om 4 EXE ad mE 4 2 2 Message Format d 5 2 9 Response 6 2 4 6 BIN Ie 6 Dire COS PERIERE 7 2 5 Protocol Usa
51. ent settings are incompatible Depending on the clocking resources selected via the txclk and rxclk members there are certain serial mode combinations that can be used together on a given port smode tx and smode rx can be one of the following values Value Name Description 0 0x00 SMODE_ASYNC Asynchronous 1 0x01 SMODE EXT SYNC External Sync Receiver only 2 0x02 SMODE ISO Isochronous 4 0x04 SMODE MonoSync 5 0x05 SMODE_BISYNC BiSync 6 0x06 SMODE_HDLC HDLC SDLC 7 0x07 5 TRANS BI Transparent BiSync 8 0x08 SMODE_9BIT 9 Bit Asynchronous misc_receiver Contains a collection of miscellaneous receiver settings interrupt_threshold Sets the receiver interrupt threshold Valid values are 1 to 32 inclusive misc_transmitter Contains a collection of miscellaneous transmitter settings interrupt_threshold Sets the transmitter interrupt threshold Valid values are 1 to 32 inclusive rxclk txclk ref_freq This number is the frequency in Hz of the reference that is used to generate the bit rate when that signal source is routed through either of the Baud Rate Generators There are 4 possible reference frequency sources e The Internal reference clock 18 432 MHz e An External reference clock A signal applied through an Input pin e The RxC Line Interface signal which can be either an Input or an Output e The TxC Line Interface signal which can be either an Input or an Output See
52. eral message Yes Port message Yes Async N A Sync N A Port state must be N A GET_DATA_MODE The GET_DATA_MODE message is used to retrieve a port s current data protocol mode Message Message Number 51 0x33 18 Revision 1 04 January 5 2009 Protocol Reference Port Number Number of the port in which to retrieve the data mode Data Length 0 bytes Response Status Status Status Name Description Value 0 0x00 CMD_OK The GET_DATA_MODE message succeeded 11 0x0B ERROR PROTO LEN data length specified in the message header is invalid 14 OxOE BHN ERROR HW TYPE The underlying port hardware does not support the GET DATA MODE message Data Length 1 byte Data struct bhn data mode uint8 mode mode The mode member specifies which data mode is currently set mode can be one of the following values Value Description 0 0x00 DM STREAM Stream mode 1 0x01 DM PACKET Packet mode See section 2 4 Data Format for details about stream and packet modes Requirements Protocol version 10 or greater General message No Port message Yes Async Yes Sync Yes Port state must be Any See Also SET DATA MODE GET EVENT The GET EVENT message is used to retrieve the current event settings events last set by SET EVENT Message Message Number 33 0x21 Port Number Number of the port in which to retrieve the current event settings CTIM 00049 19 Blue
53. erred using directors The Blue Heat Net will attempt to buffer a transmit frame as long as possible until receiving an END_OF_FRAME director If the Blue Heat Net runs out of buffer space before receiving an END_OF_FRAME director the current frame will begin transmitting in order to make room for the remaining directors 8 Revision 1 04 January 5 2009 ap Protocol START OF FRAME DATA END OF FRAME 75 bytes 0 bytes 25 bytes 50 bytes 0 bytes 75 bytes 25 bytes 25 bytes 25 bytes 0 bytes 75 bytes 0 bytes Table 2 1 Protocol Versions The Blue Heat Net protocol has multiple versions identified by a version number Each version of the protocol contains a set of supported messages responses and directors In order to determine the protocol version support of a Blue Heat Net use the GET PROTO SUPPORT message However the GET PROTO SUPPORT message is only supported on Blue Heat Net devices that are running firmware version 1 33 or greater For devices running firmware older than version 1 33 use the GET PROTO VER message If you are having trouble with the protocol version messages or have any questions please contact Connect Tech support 2 6 TCP Port Layout The Blue Heat Net protocol uses a number of different TCP ports for communications The port numbers used are based on the Blue Heat Net device s configurable base TCP port The default base TCP port is 49152 0 000 Table 2 2 shows the layout of the TCP
54. esponse header is the status The response status indicates the results of the corresponding message Refer to the specific message in section 3 Protocol Reference for details about the status values and meanings Length The fifth and sixth bytes of a response header are the size of the optional response data Response Data If the ength specified in the response header is greater than zero the response header is followed by the response data area of that size The format of the response data is dependent on the completed message number specified in the response header See section 3 Protocol Reference for a list and description of the available messages and their corresponding response data 2 4 Data Format While message and response channels are used to configure and control the Blue Heat Net data channels are used to transmit and receive the actual serial data Data Modes A data channel can operate in one of two data modes The first data mode stream mode is a simple continuous stream of serial data only The second data mode packet mode encapsulates the serial data in a protocol similar to that of the message and response channels Stream Mode Stream mode is the default data mode for a data channel In stream mode the serial data bits are transmitted and received on a data channel in the form of a continuous stream of data This stream of data does not include control bits such as the start parity and stop bits Host so
55. f the length of the EVENT2 director is greater than the length of the header greater than 25 bytes serial data follows the header max serial data length is 65535 25265510 bytes Otherwise there is no serial data associated with this director The structure bhn dir event2 represents the header portion of the EVENT2 director struct lolum Chir events Malic aie lolum event occurred uint16 events uint32 events2 uint8 msr 1532 08 52 pe count slimes ig oum 1532 count evso 70 Revision 1 04 January 5 2009 Protocol Reference id If the events are associated with a transmitting frame id is the application specific value specified in the id member of the frame s START_OF_FRAME director evso Same as data structure of EVENT2_OCCURRED message Requirements Protocol version 10 or greater See Also EVENT2 OCCURRED START OF FRAME END_OF_FRAME The END_OF_FRAME director is used to mark the ending of a frame of data Director Director Number 3 0x03 Data Length 0 bytes max 65535 bytes Data The data area of the END_OF_FRAME director consists of optional serial data If the length of the END_OF_FRAME director is greater than zero serial data follows Otherwise there is no serial data associated with this director Requirements Protocol version 10 or greater See Also START FRAME DATA START_OF_FRAME The START_OF_FRAME director is
56. ftware can transmit data by just writing to the data channel and similarly data received by the Blue Heat Net can be retrieved by reading from the data channel 6 Revision 1 04 January 5 2009 CTs The Protocol Packet Mode In packet mode the serial data bits are encapsulated in a protocol consisting of directors Similar to stream mode the data contained in each director does not include control bits such as the start parity and stop bits However using packet mode allows other types of information besides data to be transported in the data channel while remaining synchronized with the data Directors A director is a block of data used in the packet mode protocol The term director is used to help differentiate from other terms such as packets TCP messages and frames Not only does a director contain serial data it can also contain notification of events and data status information Each director consists of a 1 byte director number 2 byte length and an optional data area Director Number The first byte of a director is the director number The director number indicates the director s type and determines the format of the director data See section 3 Protocol Reference for a list and description of the available director numbers Length The second 2 bytes of a director is the size of the director data Director Data If the ength specified in the director is greater than zero the director header is followed by
57. ge rer oe 7 General Messages x usse tias vec eu ete 7 Port MESSAGES dun Cis c d UGG On VE a OPE I E o De d eats 8 Pc 8 Protocol pea OL IL T 9 2 0 PCP 9 2 7 Network Byte Ordering sssrrrssssssssssnnnnnnnrrroossnssnsnnnnennnrreosnnnennn 9 3 pU Rd ca 11 Sd Messsge SUIMMANLY ics gt EEEE Aa 12 3 2 Deal EEE 13 CANCEL MPO ced EE EE 13 ET 14 EVENT OCCURRED dessa Ee Ep SEN E coer siesta Hexe x 14 EVENT2 OCCURRED exert Eri ER pira Sau Ure LI 16 INEO Pas nce cx xen 17 CIMA WP 18 GET EW pe E 19 CTIM 00049 i Blue Heat Net CTs GET 22 rex 20 FIFO 21 GET 22 GET LINE 2 zed deans 23 LINE STATE ederet eR
58. ge Port message Async Sync Port state must be See Also GET FIFO CONTROL SET LINE 9 or greater No Yes Yes No Open The SET LINE message is used to change the line settings of the specified port Message Message Number 8 0x08 Port Number Number of port in which to change the line settings Data Length 26 bytes Data Struc t bhm Leer baud databits parity stopbits sflow xoff xon hflow lloop Special char mode break char event char Qoare use Jos xoff lim xon lim baud To be completed databits To be completed parity To be completed stopbits To be completed sflow To be completed CTIM 00049 47 Blue Heat Net ap xoff To be completed xon To be completed hflow To be completed Hoop To be completed special_char_mode To be completed error_char To be completed break_char To be completed escape_char To be completed use_x_lim To be completed xoff lim To be completed xon lim To be completed Response Status Status Value Status Name Description 0 0x00 CMD OK The SET LINE message succeeded 3 0x03 BHN ERROR UNSPECIFIED A non categorized error occurred 4 0x04 ERROR INVALID BAUD An unsupported baud rate was specified 6 0x06 BHN ERROR INVALID PARITY An invalid parity mode was specified 7 0x07 ERROR INVALID DATA BITS An invalid number of data bits was specified 14
59. ing a successful OPEN PORT response the host application may then proceed to make a new TCP connection to the data channel s TCP port Once the host application has finished opening the port any messages that require the port to be open will then function When the host application is done using the serial port it should tear down the data channel by destroying the TCP connection and then sending a CLOSE PORT message to the port message channel Stream Mode To be completed Packet Mode Once a TCP connection has been made to the data channel that is operating in packet mode the Blue Heat Net is ready to send and receive directors For the purposes of transferring serial data 4 directors are used START FRAME DATA END OF FRAME and EVENT2 All transferred serial data is encapsulated in a frame which is delimited by START_OF_FRAME and END_OF_FRAME directors One or more DATA directors can come after a START_OF_FRAME director but before the END_OF_FRAME director The EVENT2 directors may be sent from the Blue Heat Net at any time however if the EVENT2 director contains any data it will come after START_OF_FRAME director and before END_OF_FRAME director The START_OF_FRAME END_OF_FRAME and EVENT2 directors have optional serial data This allows the serial data to be transferred in many different arrangements For example Error Reference source not found shows some different ways that 75 bytes of serial data could be transf
60. ing port hardware does not support the SET EVENT message Data Length 0 bytes Remarks Events that are reported via EVENT OCCURRED messages initiated from the Blue Heat Net have no response Therefore the host need not reply to them Requirements Protocol version 9 or greater General message No Port message Yes Async Yes Sync Yes Port state must be Open See Also GET EVENT SET DATA MODE EVENT OCCURRED EVENT2 SET EVENT2 The SET EVENT2 message is used to request event reporting When the data mode SET DATA MODE is set to BHN DM STREAM events enabled by SET EVENT2 are reported via EVENT OCCURRED messages If however the data mode is set to DM PACKET the events are reported via EVENT2 directors Message Message Number 65 0x41 42 Revision 1 04 January 5 2009 Protocol Reference Port Number Number of the port in which to request event reporting Data Length 6 bytes Data struct bhn event2 uintl6 events uint32 events2 events The events member indicates which event types are to be enabled or disabled Each event type is enabled by setting its corresponding bit as shown below Clearing a bit disables the event type Bit Name Description 0 EVENT OE Overrun error events 1 EVENT PE Parity error events 2 EVENT FE Framing error events 3 EVENT BREAK Break events 4 EVENT CTS CTS change of state events 5 EVENT DSR DSR change of state events 6 EVENT RING RING events 7
61. ion is zero SEND BREAK transmits a break for at least 0 25 seconds If duration is not zero SEND BREAK transmits a break for at least duration 0 10 seconds in other words duration is the number of 10ths of a second Response The SEND BREAK message no response Requirements Protocol version General message Port message Async Sync Port state must be See Also START STOP BREAK CTIM 00049 9 or greater No Yes Yes No Open 37 Blue Heat Net CTs SEND_IMMEDIATE The SEND_IMMEDIATE message is used to transmit a character outside of the normal data stream Message Message Number 30 0 1 Port Number Number of port in which to transmit a character Data Length 1 byte Data struct lolum semei Character to transmit Response The SEND_IMMEDIATE message has no response Remarks Depending on the architecture of the port device a character transmitted using SEND_IMMEDIATE may have to wait until the characters in the FIFO have been sent Requirements Protocol version 9 or greater General message No Port message Yes Async Yes Sync No Port state must be Open SEND_XCHAR The SEND_XCHAR message is used to send a software flow control character Message Message Number 37 0x25 Port Number Number of the port in which to send a software flow control character Data Length 1 byte Data struct uint8 xchar xchar Flow control ch
62. is setting establishes the electrical interface for the signals that connect to the 25D I O connector The Interface is implemented with an SP508 device which allows the selection of electrical interfaces common to Synchronous communications protocols line mode can be one of the following values Value Name Description 1 0x01 530A RS422 with V 10 DTR 2 0x02 530 RS422 all signals V 11 3 0x03 X21 Identical to LM 530 except RI not available 4 0x04 V35 V 35 on data clocks V 28 on all other signals 5 0x05 449 RS449 Identical to 530 setting 6 0x06 V28 RS232 V 28 7 0x07 SHUTDOWN Inputs Outputs on SP508 Tri stated Some of the above values can be combined with the following to enable Line Receiver and or Line Driver terminations circuits inside the SP508 device See the SP508 data sheet for details Value Name Description 8 0x08 TERM Termination enabled e Line Receiver termination on V 35 and V 11 circuits e Line Driver termination on V 35 circuits duplex_mode This parameter sets up either Full 2 wire half or 4 wire half duplex operation of the electrical interface for the signals that connect to the 25D I O connector Only the Receiver Data and Transmitter Data signals are affected by this setting Value Name Description 0 0x00 DUPLEX_FULL Both the receiver and the transmitter are always enabled 1 0x01 WIRE 5 These modes perfor
63. m the following action to the 17 0x11 TWO WIRE TXCOMP transceivers e During transmission the transmitter is enabled and the receiver is disabled such that no characters are received during transmission e When not transmitting data the transmitter is disabled tri stated and the receiver is enabled 2 0x02 FOUR_WIRE_RTS These modes perform the following action to the 18 0x12 FOUR WIRE TXCOMP transceivers e The receiver is always enabled e The transmitter is enabled during transmission and is otherwise disabled tri stated The 2 wire and 4 wire settings differ only in the choice of signal which is used to control the duplexing operation either RTS or TX Complete RTS would be used if 58 Revision 1 04 January 5 2009 Protocol Reference software wanted to control the duplex operation The TX complete is an IUSC device signal that can perform the duplex control in a more autonomous fashion sync_addr This is a collection of settings related to the operation of various Character oriented Synchronous modes of operation txO Sets the Transmitter 0 character for MonoSync BiSync modes tx1 Sets the Transmitter Sync 1 character BiSync mode tx len Number of bits in Transmitter sync characters tx len can be one of the following values Value Description 0 0x00 Same number of bits as the TX data character length 8 0x08 8 bits Sets the Receiver 0 character fo
64. message header is invalid 13 0 00 BHN ERROR CLOSED The port is currently closed but SET EVENT2 requires it to be open 14 OxOE ERROR HW TYPE The underlying port hardware does not Data Length 0 bytes Remarks support the SET EVENT2 message Events that are reported via EVENT OCCURRED messages initiated from the Blue Heat Net have no response Therefore the host need not reply to them 44 Revision 1 04 January 5 2009 CTs Protocol Reference Requirements Protocol version 10 or greater General message No Port message Yes Async Yes Sync Yes Port state must be Open See Also 2 SET DATA MODE EVENT2 OCCURRED EVENT2 SET_FIFO_CONTROL The SET_FIFO_CONTROL message is used to configure a port s FIFO control settings Message Message Number 31 Ox1F Port Number Number of port in which to set the FIFO control settings Data Length 8 bytes Data struct bhn fifo uint8 mask 1012160 diio Size uint8 tx threshold uint8 ios Wimele tz load size uint8 flags mask The mask member specifies which of the other members contain valid data When this structure is used with the GET FIFO CONTROL message the mask member indicates which other members to retrieve This member can be one or more of the following values Value Name Description 1 0x01 MASK FIFO SIZE fifo size is valid 2 0x02 MASK TX THRESHOLD x threshold is valid 4 0x04
65. nt The current overrun error count pe_count The current parity error count fe_count The current framing error count brk_count The current break count Response The EVENT2_OCCURRED message does not have a response Remarks Events are reported via messages initiated from the Blue Heat Net These messages have no response so the host need not reply to them 16 Revision 1 04 January 5 2009 GP Protocol Reference Requirements Protocol version General message Port message Async Sync Port state must be See Also SET EVENT2 GET EVENT2 GET_BHN_INFO 10 or greater No Yes Yes Yes Open The GET_BHN_INFO message is used to retrieve basic information about the Blue Heat Net device Message Message Number 22 0x16 Port Number N A Data Length 134 bytes Data Sie GUC Oma LEO wince bhn meele uint8 bhn_hostname 128 bhn_mac Optional MAC address to look for See Remarks below for more details bhn_hostname Optional host name to look for bhn_hostname is a NULL terminated string See Remarks below for more details 0 0x00 CMD_OK The GET_BHN_INFO message succeeded Response Status Status Value Status Name Description Data Length 319 bytes Data struct bhn info 32 loan ser uint8 bhn ip 4 uint reserved 16 uint bhn mac 6 uint8 bhn hostname 128 uint bhn domainname 128 uint8 wee 221 uint8 num ports CTIM 00049 17 Blue Heat Net CTs bhn_ser_
66. num The serial number of the Blue Heat Net unit bhn_ip The current runtime IPv4 address bhn_ip may differ from the IPv4 address stored in the flash configuration if the Blue Heat Net is configured to use DHCP bhn_mac The MAC address of the Blue Heat Net unit bhn_hostname The current runtime host name bhn_hostname may differ from the host name stored in the flash configuration if the Blue Heat Net is configured to use DHCP bhn_hostname is a NULL terminated string bhn_domainname The current runtime domain name bhn_domainname may differ from the domain name stored in the flash configuration if the Blue Heat Net is configured to use DHCP bhn_domainname is a NULL terminated string cds_ver The version of the flash Configuration Data Space CDS currently stored in the Blue Heat Net unit num_ports The number of ports available on the Blue Heat Net unit Remarks A GET_BHN_INFO response is not always returned to the host depending on the contents of the GET_BHN_INFO message The response is only sent when at least one of following conditions is true A struct bhn_info_cmd bhn_mac 0 5 equals zero and struct bhn info cmd bhn hostname 0 equals zero zero length NULL terminated string B struct bhn_info_cmd bhn_mac equals the MAC address of the Blue Heat Net unit C struct bhn_info_cmd bhn_hostname equals the current runtime host name of the Blue Heat Net unit Requirements Protocol version 9 or greater Gen
67. o 9 16 0x10 SET DIR 1 o o 9 19 0x13 RESUME_TX 0 9 22 0x16 INFO 39 GPL 28 0 1 RESET_BHN 0 GS 30 1 SEND IMMEDIATE PAL 31 0 1 FIFO CONTROL 8 8 59 PA 32 0x20 SETEVENT 2 5 PAS 33 0x21 GETLEVENT 2 9 34 0x22 EVENT OCCURRED 1 19 59 5 36 0x24 1 1 9 37 0x25 SEND_XCHAR Jo PAL 38 0 26 SET RIS DIR 2 050 59 39 0 27 GET_PORTCAP 0 16 9 5 41 0x29 GET_FIFO_CONTROL 8 8 9 42 0 2 GET_PSON 5 2 9 6 46 2 GET PROTO VER 0 16 9 47 0x2F PROTO SUPPORT 0 2 0 50 0x32 SET DATA 1 18 5 51 0x33 DATA MODE 50 1 18 52 0 34 SYNC_LHUNT 0 0 18 53 0x35 SET RTC CLOCK 3 PAIS 54 0x36 RTC CLOCK Bo 18 55 0x37 SET RTC ALARM 6 0 1098 5 56 0x38 RTC __ 6 19 5 57 0x39 SET RTC GATE 0 1 58 GET_RTC_GATE 0 1 19 5 59 0 3 GET RTC MODE 590 1 18 5 Message and response data sizes in bytes 2 Protocol version refers to the earliest version that the message is supported Versions earlier than 9 are no longer used and this document does not cover them 3 Usage has the following coding G General message P Port message A Async S Sync 12 Revision 1 04
68. ports Base TCP Port Offset Default TCP Port Use 49152 0 000 General message response channel 49154 0xC002 Port 1 message response channel 49155 0 003 Port 1 data channel 49156 0 004 Port 2 message response channel 49157 0 005 Port 2 data channel 49158 0 006 Port 3 message response channel 49159 0xC007 Port 3 data channel Table 2 2 2 7 Network Byte When working with network applications it is important that byte ordering be taken into account The standard byte ordering in network applications is big endian and host systems must ensure that they perform the appropriate byte swapping on any message response or director structure member that is more than one byte For example on a little endian host system i e Intel x86 a 32 bit integer s byte ordering must be reversed before sending it to a Blue Heat Net or after receiving it from a Blue Heat Net Most operating systems provide functions to transform multi byte values from host byte order to network byte order The common names of these functions are listed in Table 2 3 An example of preparing and sending SET EVENT2 message is shown in Listing 2 1 Sending a DATA director of zero length is not legal More than one DATA director could be used to break up the serial data further CTIM 00049 9 Blue Heat Net ap Function Description Convert a 16 bit number from host byte order to network byte order
69. r MonoSync BiSync modes or the first byte of an HDLC address in HDLC mode Sets the Receiver Sync 1 character BiSync mode or the second byte of an HDLC address in HDLC mode rx_len Number of bits in Receiver sync characters rx_len can be one of the following values Value Description 0 0x00 Same number of bits as the RX data character length 8 0x08 8 bits strip_sync Any non zero value will enable the stripping of SYNC characters from the receiver data stream In MonoSync mode a character that matches the value of is not placed in the receiver FIFO or included in any CRC calculations In BiSync mode a pair of consecutive characters that match 0 and rx1 not placed in the receiver FIFO or included in any CRC calculations dbits tx rx Sets the number of bits in each Data character tx_frac_stop Sets the number of Stop bits in Async mode only in units of 1 16 of a bit tx_frac_stop can be from 9 to 32 inclusive parity tx rx Sets the use of parity bits on the Data characters Parity bits can be enabled on Synchronous communications modes but are usually used in Asynchronous communications parity tx rx can be one of the following values CTIM 00049 59 Blue Heat Net GP 60 Value Name 0 0x00 BHN PAR NONE 1 0x01 PAR EVEN 2 0x02 PAR ODD 3 0x03 PAR SPACE 4 0x04 PAR MARK crc Description No parity Even parity Odd parity
70. ription 0 0x00 CMD_OK The GET_FIFO_CONTROL message succeeded 3 0x03 BHN_ERROR_UNSPECIFIED non categorized error occurred 14 0 0 BHN ERROR HW The underlying port hardware does not support the GET FIFO CONTROL message Data Length 8 bytes Data The GET FIFO CONTROL response uses the same data as the SET FIFO CONTROL response where the members contain the data requested by the GET FIFO CONTROL message s mask member Requirements Protocol version 9 or greater General message No Port message Yes Async Yes Sync No Port state must be Open See Also SET FIFO CONTROL GET LINE The GET LINE message is used to retrieve the line settings of the specified port Message Message Number 9 0x09 Port Number Number of port in which to retrieve the line settings Data Length 0 bytes 22 Revision 1 04 January 5 2009 Protocol Reference Response Version 9 Status Status Value Status Name Description 0 0x00 CMD_OK The GET_LINE message succeeded 3 0x03 BHN_ERROR_UNSPECIFIED A non categorized error occurred 14 OxOE BHN ERROR HW TYPE The underlying port hardware does not support the GET LINE message Data Length 26 bytes Data The GET LINE response uses the same data structure as the SET LINE message Requirements Protocol version 9 or greater General message No Port message Yes Async Yes Sync Yes Port state must be Open See Also SET LINE GET LINE2 The GET LINE2 message is
71. rs can be from 0 to 23 inclusive minutes minutes be from to 59 inclusive seconds seconds can be from 0 to 59 inclusive Response Status Status Value Status Name 0 0x00 11 0x0 13 0x0 14 0x0 CMD OK B BHN ERROR PROTO LEN D BHN ERROR CLOSED E ERROR HW TYPE Data Length 0 bytes Remarks Description The SET RTC ALARM message succeeded The data length specified in the message header is invalid The port is currently closed but SET RTC ALARM requires it to be open The underlying port hardware does not support the SET RTC ALARM message To manually start and stop the transmitter and or receiver use the SET RTC GATE message 62 Revision 1 04 January 5 2009 CTs Protocol Reference Requirements Protocol version 10 or greater General message No Port message Yes Async Yes Sync Yes Port state must be Open See Also GET RTC ALARM SET RTC GATE SET LINE SET_RTC_CLOCK The SET_RTC_CLOCK message is used to change the time of the RTC Message Message Number 53 0x35 Port Number Number of port in which to change the RTC time Data Length 3 bytes Data SewUce bmn rce Clock Strut wie Cime uint8 hours uint8 minutes uint8 seconds time time hours hours can be from 0 to 2 3 inclusive minutes minutes can be from 0 to 59 inclusive seconds seconds can be from 0 to 59 inclusive Response Status Status Value Status Name Descrip
72. t bit In any mode the receiver discards any partial character that was in progress when the SYNC_HUNT message is issued Requirements Protocol version General message Port message Async Sync Port state must be 3 3 Director Summary Director Number 1 0x01 2 0x02 3 0x03 5 0x05 Director length is in bytes Director Name 10 or greater No Yes Yes Yes Open Director Length Protocol Version START OF FRAME 2 10 DATA 1 10 END_OF_FRAME 0 10 EVENT2 25 10 Table 3 2 2 Protocol version refers to the earliest version that the director is supported Versions earlier than 9 no longer used and this document does not cover them CTIM 00049 69 Blue Heat Net CTs 3 4 Director Detail DATA The DATA director is used to transport intermediate frame data Intermediate frame data occurs between START_OF_FRAME and END_OF_FRAME directors Director Director Number 2 0x02 Data Length 1 bytes max 65535 bytes Data The data area of the DATA director consists of purely serial data Remarks A DATA director with a length of zero is not legal Requirements Protocol version 10 or greater See Also START OF FRAME END FRAME EVENT2 The EVENT2 director is used to report the occurrence of events Director Director Number 5 0x05 Data Length 254 bytes max 65535 bytes Data The data area of the EVENT2 director consists of a header and optional serial data I
73. ta Following a message header is the message s optional data The size and format of this data is dependent on the message number contained in the message header See section 3 Protocol Reference for a list and description of the available messages and their corresponding data CTIM 00049 2 Blue Heat Net CTs 2 3 Response Format Each protocol response contains a header and optional data The response header is 6 bytes long and consists of a 1 byte response number a 1 byte completed message number a 1 byte port number 1 byte status and 2 byte ength Following the response header is optional response data whose size depends on the completed message number Response Number The first byte of a response header is the response number The response number indicates the response s type There is currently only one valid response number CMD_DONE which has a value of 128 0x80 Completed Message Number The second byte of a response header is the completed message number response is the result of a message and the completed message number specifies which message this response is related to Port Number The third byte of a response header is the zero based port number The port number indicates which port on the Blue Heat Net device that the response applies to Not all responses actually need a correct value for the port number this is because the TCP port implies the port number Status The fourth byte of a r
74. the director data of that size The format of the director data is dependent on the director number See section 3 Protocol Reference for a list and description of the available directors and their corresponding director data 2 5 Blue Heat Net protocol is used by establishing or more TCP connections channels depending on the desired task while certain channels may only be established after other requirements have been met This section deals with the details of setting up and tearing down channels using the protocol and protocol versioning Refer to the host application s operating system documentation for information on how to create work with and destroy TCP connections The Blue Heat Net waits for incoming TCP connections on at least two TCP ports the general message channel and one message channel for each serial port The Blue Heat Net does not wait for incoming TCP connections for a data channel until after the corresponding serial port has been opened using the OPEN_PORT message Refer to Table 2 2 for the default TCP ports used for each channel General Messages The general message channel can be used to access device wide settings and information A Blue Heat Net will accept more than one connection to the general message channel allowing more than one host application to access the device at the same time A host application first creates a TCP connection to the general message channel s
75. tion 0 0x00 CMD_OK The SET_RTC_CLOCK message succeeded 11 0 BHN ERROR PROTO LEN The data length specified the message header is invalid 13 0 00 BHN ERROR CLOSED The port is currently closed but SET RTC CLOCK requires it to be open 14 OxOE BHN ERROR HW TYPE The underlying port hardware does not support the SET CLOCK message Data Length 0 bytes CTIM 00049 63 Blue Heat Net CTs Requirements Protocol version 10 or greater General message No Port message Yes Async Yes Sync Yes Port state must be Open See Also RTC CLOCK SET RTC ALARM SET RTC MODE SET_RTC_GATE The SET_RTC_GATE message is used to manually start or stop the transmitter and or the receiver Message Message Number 57 0x39 Port Number Number of port in which to start or stop Data Length 1 byte Data lojabat ice Ceres uint8 state state If state is 0 then the transmitter and or receiver is stopped Otherwise the transmitter and or receiver is started In order for SET_RTC_GATE to operate on the transmitter the SET_LINE2 message must first be sent with the tx_trig_gate member set to TX_GATED Similar to the transmitter the receiver gating will only operate once the SET_LINE2 message is sent with the rx gate member set to RX_GATED Response Status Status Value Status Name Description 0 0x00 CMD_OK The SET_RTC_GATE message succeeded 11 0 BHN ERROR PROTO LEN The data length specifi
76. twork Byte Ordering 9 The Blue Heat Net protocol uses a series of TCP connections channels to communicate between the host and Blue Heat Net A Blue Heat Net is controlled by sending packets of data called messages from the host to the Blue Heat Net via TCP The Blue Heat Net can also send notifications back to the host using messages Most messages result in feedback being sent in the form of responses and are really just a specific type of message While messages and responses are used for controlling a Blue Heat Net serial data is communicated in one of two different modes The first mode is stream mode where the serial data is not encapsulated in any type of protocol and is just carried by TCP directly The second mode is packet mode where unlike stream mode the data is encapsulated in a protocol Serial data transferred in packet mode is split into frames of data and each frame is split into 1 or more directors The remainder of this chapter details the messages responses and directors used to communicate with a Blue Heat Net Figure 2 1 gives a visual representation of these concepts 4 Revision 1 04 January 5 2009 The Protocol Note more than one Heat Net Response Complete Port Status Length Message Data message Response 1 byte 1 byte 1 byte 1 byte 2 bytes n bytes response or director could be in a given TCP packet
77. used to mark the beginning of a frame of data Director Director Number 1 0x01 Data Length 2 bytes max 65535 bytes Data The data area of the START_OF_FRAME director consists of a header and optional serial data If the length of the START_OF_FRAME director is greater than the length of the header greater than 2 bytes serial data follows the header max serial data length is 65535 2 65533 bytes Otherwise there is no serial data associated with this director The structure bhn_dir_sof represents the header portion of the START_OF_FRAME director loath Clic soit uintl6 id CTIM 00049 71 Blue Heat Net CTs id When the START_OF_FRAME director is used in the receive side of a data channel the id member has no meaning However when used in the transmit side of a data channel the id member can contain any host application specific 16 bit value Requirements Protocol version 10 or greater See Also DATA END OF FRAME 72 Revision 1 04 January 5 2009 GP Index 4 Index C CANCEL_RTC_MPO 13 channel 4 CLOSE_PORT 8 14 D DATA 8 70 data format 6 data mode 6 packet 7 8 stream 6 stream 8 director 4 7 DATA 70 director data 7 director number 7 END_OF_FRAME 71 EVENT2 70 length 7 START_OF_FRAME 71 E END_OF_FRAME 8 71 EVENT 8 EVENT_OCCURRED 14 EVENT2 70 EVENT2_OCCURRED 16 G GET_BHN_INFO 17 GET_DATA_MODE 18 GET_EVENT 19 GET_EVENT2 20
78. which to retrieve the capabilities No matter which port number is specified or if the message is sent to the general message port GET_PORTCAP always returns the capabilities of all ports Data Length 0 bytes Response Status Status Value Status Name Description 0 0x00 CMD_OK The GET_PORTCAP message succeeded 3 0x03 BHN_ERROR_UNSPECIFIED non categorized error occurred Data Length 16 byte Data struct bhn msr int8 capability 16 capability An array of 16 characters which indicates the capability of each port The first character is for port 1 the second character is for port 2 and so on Each character can be one of the following values 26 Revision 1 04 January 5 2009 Protocol Reference Value Description 1 0x31 RS232 Only 2 0x32 RS485 422 Only 3 0x33 Switchable RS232 RS485 422 4 0x34 Multi protocol i e Blue Heat Net Sync Requirements Protocol version 9 or greater General message Yes Port message Yes Async Yes Sync Yes Port state must be Any GET_PROTO_SUPPORT The GET_PROTO_SUPPORT message is used to retrieve the protocol version s supported Message Message Number 47 Ox2F Port Number N A Data Length 0 bytes Response Status Status Value Status Name Description 0 0x00 CMD OK The GET PROTO SUPPORT message succeeded 11 OxOB ERROR PROTO LEN The data length specified in the message header is invalid Data Length 2 bytes

Download Pdf Manuals

image

Related Search

Related Contents

Notice  Magnese MA-101007  PDF Pautas para última Jornada Nacional de Vacunación  DELL OptiPlex 9010  One Cable - Antennas Direct  ダウンロード(PDF 0.38 MB)  Motores CA DR.71-225, 315 / Instruções de Operação / 2009-12  ¡ATENCIÓN!  

Copyright © All rights reserved.
Failed to retrieve file