EVJEN, Peder, Martin (Viggo Hansteensvei 26, Fjellhamar§, N-1472, NO)
| Claims 1. A method for automatic message generation characterized in that a combination of standard messages and pre-generated messages and templates stored in a mailbox (40), in that slaves are registered in an address register (10) with a related flag register (20), where one with a flag (one bit) can select which standard messages to transmit, and optionally point to one of more mailboxes with pre-generated messages or templates; and optionally an encryption key register (30). 2. Automatic message generation according to claim 1 , characterized in that standard messages will depend on the received message from the slave. 3. Automatic message generation according to claim 1 -2, characterized in that there is a priority between and among standard messages and pre- generated messages in the mailbox. 4. Automatic message generation according to claim 1 -3, characterized in that the mailbox can contain either pre-encrypted or un-encrypted messages which can be encrypted before transmission using the pre- registered key in the encryption key register. 5. Automatic message generation according to claim 1 -3, characterized in that the mailbox can contain templates where the address and optionally messages number and signal strength (RSSI) information is open, and can be filled in at the time of transmission, and which can be encrypted prior to transmission using the pre-registered key in the encryption key register. 6. Automatic message generation according to claim 1 , characterized in that the mailbox is divided into memory blocks which can make a daisy chain by using the last byte in a block to point to the next block in the chain. 7. Automatic message generation according to claim 1 -3, characterized in that a flag indicating that a standard messages shall be transmitted, or the pointer to a mailbox message, can automatically be cleared after transmission and in this way be configured to transmit a sequence of messages fully autonomous. |
The Invention is related to implementation of automatic message generation in a wireless communication system.
Background of the invention
In a wireless network where it is many power limited nodes, for example battery operated, which shall communicate with a concentrator, master or gateway, it is often difficult to fulfill certain timing requirements. The power limited nodes should be in sleep mode most of the time, and wake up to transmit and receive messages in a time as short as possible to reduce the energy consumption. This has been solved by having the power limited node (the slave) waking up from sleep mode and transmit a message. This message is received by the concentrator (master) which is always listening. After transmitting the message, the slave enter receive mode for a very short time, typically 2-3 ms or 3-50 ms after transmission, before it again enter sleep mode. During this short time interval the master must transmit its message if it wants to communicate with the slave. If the slave does not receive any message, it will enter sleep mode, until at a later point in time (after few minutes or hours, depending on the system requirements) when it will wake up and transmit a new message, giving the master a new opportunity for communication. If the slave receive a message from the master during this short time interval, it will enter sleep mode for a short while (typically 1 -5 seconds), before it again wakes up and transmit a new message the master can respond to within a short time interval.
Such systems are often use for automatic meter reading (AMR) of battery operated meters such as gas-, water-, heat-meters. Wireless M-Bus (as described in EN 13757-4), DSMR (NTA 8130) and OMS (Open Metering System specification) are examples of such systems. It has appeared as a challenge in such systems that a master must be able to identify many slaves, and within a very short time interval transmit a message with the correct address and correct content, adapted to each slave, without knowing exactly when the slave transmit its message. Some systems also use encryption which requires that messages to the slave must be encrypted with a key that is unique for each slave.
Prior art
A known method which has been used is to store so-called "pre-cooked messages" in the master, which is automatically transmitted as a reply when a slave message arrives. This method has turned out to be insufficient and memory intensive when a large number of slaves shall be handled by one master.
A similar method has been used in the RC1180-MBUS2 module from Radiocrafts (see Radiocrafts MBUS User Manual rev. 1.11 ), where it is possible to configure the master to transmit ACK (acknowledge) if a flag has been set i the address register for a certain slave. This method has also turned out to be insufficient when many different messages should be sent to the slave during the short time interval.
Reference is also made to Manual AMB842S-M, V1.6, Released 28.01.2010 related to Wireless M-Bus radio module AMB842S-M designed as a subcomponent for wireless meter reading.
Another know usage of "Auto reply" and "pre-configured packet response" is described in Scatterweb's Software manual, wireless M-Bus stack for PAN7550, stack version v.1.0, dated 1.9.2009. It mention a "pre-configured response" for C- fields 0x53, 0x73, 0x40, 0x06 and 0x44, but does not describe in detail the method used to generate the response. It is shown a
CONFIG_SET_AUTORESPONSE function where a complete packet limited to 23 bytes, including the header, can be pre-cooked and stored in the unit. This method is not sufficient when it is many slaves which need to be handled at the same time with different responses. Also, it does not take into account that different messages from the slave require different response from the master, or that command messages such as SND_UD can be longer than 23 bytes. It is said that "continuous mode" shall be used together with the auto-response, apparently to transmit the longer messages. This method is often insufficient as long messages (SND-DU) should be transmitted during a very short time interval.
Detailed description of the invention
By combining the use of standard messages, pre-generated messages and templates in an intelligent message generator, and message priority, it is achieved by the invention that a master can handle many more slave nodes in a much more efficient way with respect to memory usage, timing and processing power. When this is implemented in a separate radio module (such as
Radiocrafts RC1 180-MBUS3) this will offload the main processor in the system substantially.
That a large number of slaves can be handled at the same time in a very flexible way, with minimum usage of memory, is achieved by the invention by registering all slaves in a master in an address register, and related to this register a flag register, where one flag (one bit) can choose which standard messages shall be transmitted, or point to one of more mailboxes. Related to this address register is also an encryption key register, where the unique key for each registered slave is stored, so that the message can be encrypted when transmitted if it is not already encrypted. The intelligent message generator consist of a mailbox where several pre- generated messages can be stored, and a message generator which can generate standard messages. These standard messages will depend on the message received from a slave, as described in the different protocols.
The mailbox can contain either unique messages for a specific slave (either encrypted or un-encrypted), or they can be templates (generic pattern for the message) where the address is open. In this way many slaves can be answered from one stored message, and the memory usage in the master is substantially reduced. Examples of messages that can be stored in the mailbox are SND-UD, which can have a length up to 255 bytes.
A further improvement and usage of the mailbox is achieved by making it as a daisy chain. A typical mailbox may have space for 1024 bytes, which is divided into 64 byte blocks, which again can be chained together so that messages up to 255 bytes can be stored. In this way it is achieved a flexible message length and the memory requirement in the master is substantially reduced.
Standard messages are generated based on a known pattern that is coded in the message generator. Examples of such standard messages are CNF-IR, ACK, REQ-UD1 , REQ-UD2 and SND-NKE. Several different standard messages can be made in this way, and the master choose which standard message to transmit based on the received message, and the priority of standard messages, and which flags that is set for each slave. For example, REQ-UD1 has higher priority than REQ-UD2, and will therefore be sent first, if the flag for both is set.
Standard messages and messages from the mailbox is given a priority, and the flag indicating that a standard messages shall be sent, or a pointer to a mailbox message which shall be sent, can be automatically cleared after a transmission. In this way the master can easily be configured to transmit a sequence of messages autonomic.
A typical implementation could have 16 mailboxes, and 8 standard messages, linked to an 8-bytes address register for 64 slaves, a 16 bit flag register for the 64 slaves, and a related 16-bytes encryption key register for the 64 slaves.
An example on the use of the invention in OMS, is that when a SND-NR message arrives from the slave, the master can according to the specification answer with either SND-UD, REQ-UD1 , REQ-UD2, or no answer at all if further communication is not required. According to the invention an address register is used to search and find the actual slave, and the flag register to see if a message shall be generated and transmitted to the actual slave. Further, according to the invention, the message generator is used to generate the standard messages REQ-UD1 or REQ-UD2, while a SND-UD message is generated from the mailbox. Because REQ-UD1 is used to read an alarm or warning, it is given the highest priority, and will be transmitted before any REQ-UD2 message, or a message from the mailbox. The message in the mailbox can be a template where the slave address is filled in and the message is encrypted with the correct key, which is found in the related encryption key register. In this way the master can transmit an answer to ay registered slave within 2-3 ms after reception as required in Wireless -Bus T2 mode.
On example of an implementation of the invention is the Radiocrafts RC1 180- MBUS3 where this method is implemented in firmware. As shown in figure 1 , is there an 8-bytes address register with 64 locations, a 16-bits flag register with 64 locations accordingly, a 16-bytes encryption key register with 64 locations accordingly, and a 1024-bytes mailbox divided into 64 byte blocks. The flag register consist of 8 flags for standard messages, 2 flags indicating weather the messages shall be encrypted/decrypted, and 4 bits pointing to a 64-bytes block in the mailbox, which again can point further in a daisy chain.
