Abstract:
A remotely programmable device includes a message store for receiving messages over a radiolink from a controller and forwarding the messages to a local application resident in the device, writable registers for controlling operation of the device, a command interpreter for interpreting commands embedded in thessages to write data to the register, and a lock for inhibiting writing of data to the registers. The local application is responsive to an authorization code embedded in the messages to release the lock and thereby allow writing of data to the registers.

Description:
FIELD OF THE INVENTION 
   This invention relates to the field of programmable devices, such as pacemakers, that may be remotely programmed over a local radio communications link. 
   BACKGROUND OF THE INVENTION 
   In remotely programmable devices, such as pacemakers, a controller or master device is used to send messages over a radiolink to an application program resident in the programmable device. In addition, the local receiver contains registers that control the radiolink or perhaps perform some type of calibration in the local slave device. These can be written to by sending messages over the radiolink. If an erroneous value is written into any of these registers, the radiolink may fail, or worse. It is therefore very important that any commands that are remotely sent to the receiver cannot harm any settings in the receiver. 
   The controller device might either directly write to a register in the slave device, or it might send a message to the slave device, which instructs the slave device to perform this action. The problem with the first solution is that it is not secure. A malevolent user (hacker) or an ignorant user might, for example, write to a register in a way that has the effect of causing the device to cease responding to commands over the radiolink, or worse. In the case of medical devices this could be critical because a broken link might result in the correct treatment being delayed, or worse. 
   The problem with the second solution, where the device itself performs the action, is that it prevents the controller from performing harmless functions directly, such as writing to the local registers in the transceiver. 
   SUMMARY OF THE INVENTION 
   The present invention solves the problem by preventing the external controller from performing certain operations unless the command interpreting is unlocked by previously sending an authorization code, which may be in the form of a prime number. 
   Accordingly, the present invention provides a remotely programmable device, comprising a message store for receiving messages over a radiolink from a controller and forwarding the messages to a local application resident in the device; writable registers for controlling operation of the device; a command interpreter for interpreting commands embedded in said messages to write data to said registers; a lock for inhibiting writing of said data to said registers; and said local application being responsive to an authorization code embedded in said messages to release said lock and thereby allow writing of said data to said registers. 
   The invention offers security for maintenance functions, such as writing to the receiver registers, without the need of having a very complex controller. 
   In one embodiment, the lock is released by sending a large prime number over the radiolink to the local application, which then checks if its valid before releasing the lock, allowing the protected registers to be written to. It should be noted that some or all of the registers can be protected. In some embodiments, it may be useful to allow some registers to be written to without requiring release. Such registers would be registers that could not do any significant harm if the wrong data was written to them. 
   In another aspect the invention provides a method of controlling a remotely programmable device including writable registers for controlling operation of the device, and a local application resident in the device responsive to messages from a controller over a radiolink, and wherein commands to write data to said registers are sent over a radiolink, said method comprising said local application normally inhibiting execution of said commands; sending an authorization code to said local application to instruct said local application to permit execution of said commands; in response to said local application receiving a valid authorization code, permitting execution of said commands; and after sending a valid authorization code over said radiolink sending at least one command to write data to said registers. 

   
     BRIEF DESCRIPTION OF THE DRAWINGS 
       FIG. 1  is a schematic illustration showing a programmable device with and without a lock in accordance with the invention; 
       FIG. 2  is a high level block diagram of a programmable device incorporating the invention; 
       FIG. 3  shows the device in more detail; and 
       FIG. 4  is a flow chart illustrating operation of the device. 
   

   DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
   In  FIG. 1 , the programmable device on the left hand side comprises a receiver  1  and a local application  2  resident in the device that is responsive to commands over a radio link  3  from a sender  4  to perform certain operations. The sender is a controller for the device, and in the case of a pacemaker is a control unit that can be operated from outside the body to control the operation of the pacemaker. 
   It is generally considered safe to send commands to the local application  2  because the application can always decode and process the data and then perform the requested actions or not depending on its internal program. It is possible for some software in the application to have big security holes with automatic execution of any code or buffer overflow, but the application can be designed to run only safe software. 
   The receiver  1  is also responsive to commands, for example, to change its operating frequency, but unlike the local application  1  it has no means to determine whether an instruction is harmful or not. 
   In accordance with the invention, a lock, typically in the form of an AND gate, is provided that prevents the controller from writing to all (or some) registers or initiate commands in the receiver. The controller is only allowed to write to a few open registers while the lock is active. The programmable device can deactivate the lock and allow the controller to write to any register on upon receipt of an authorization code by the local application. 
   The lock itself can be in the form of a register bit, or a special pin on the receiver that needs to be activated to allow writing to take place, or a combination of both. The important point is that the local device can change the lock from a locked to an unlocked state. Once the transceiver is unlocked, the master may write to the previously disallowed registers. When the writing is performed, or after a time-out, the transceiver can be locked again. 
     FIG. 2  shows a high level block diagram of programmable device in accordance with the invention. 
   Data, in the form of messages, are sent over the radiolink  3  and temporarily stored in message store  11  of the transceiver  10 . The messages are forwarded to the local application  13 , which acts on them in accordance with its internally programmed instructions. 
   The messages are also forwarded to command interpreter  12 , which can normally write to registers  14  in the receiver in accordance with the commands received. These registers typically control the operation of the transceiver  10  in the programmable device. 
   The application  13  normally issues a lock signal  15 , which prevents the execution of the commands from the command interpreter  12 . This prevents writing of data to some or all of the registers  14  controlling the operation of the transceiver. The lock can be released by an authorization code in the form of a secret protocol, such as a large prime number in association with local time. 
   The lock  15  works with functions already existing in the transceiver  10 . The message from the master is sent on the link  4 , and temporarily stored in the message store  11 . In the message store, any commands for the transceiver are extracted and sent to the command interpreter  12 . If the command interpreter  12  is locked then the command is not executed. The command interpreter can then send back an error message to the controller, which will tell it that the command failed. If it is unlocked the command is executed. The command interpreter itself can detect that a command has been received, and warn the local device. Using a more complex command interpreter, such a warning can be used for the unlocking protocol. 
   The lock  15  is used as a security feature so that it will be impossible to remotely write to any registers in the receiver without first getting permission to do so. This permission is given by the local application. The remote application may send a request that is interpreted in the local application. The local application may then grant or deny writing to registers in the local receiver. When the remote command has been performed, the lock in the receiver may be automatically set again so that no further writing to the registers is permitted until a new authorization is received. 
     FIG. 3  shows the command interpreter in more detail. This consists of a decoder  10  for decoding the commands contained in messages stored in the temporary message store  11 . The output of the decoder is passed to an AND gate  18  whose other input is set by the output of AND gate  19  receiving its inputs from the local application  13 . 
   The output of the decoder  16  is also passed to AND gate  17  whose other input receives the output of AND gate  18 . When all three inputs of AND gate  19  coming from the local application  13  are high, gate  18  is unlocked and allows the output of the decoder to be written to registers  14 . When the output of gate  19  goes low, gate  18  is locked, and the output of NAND gate  17  goes high, causing an error signal to be issued, which can be passed back to the controller over the radiolink  3 . 
     FIG. 4  is a flow chart showing the operation of the programmable device. Step  20  represents normal communication wherein messages are passed over the radiolink  3 . If the master (controller) wants to improve communication (step  21 ), it sends a coded request or authorization code at step  22  to the programmable device (slave). This is passed to the local application, which at step  23  decodes this request. If the request is not approved, an error message is sent back to the controller at step  25 . If the request is approved, the local application releases the lock at step  26 . The controller then sends commands at step  27 . Upon receipt of an indication from the controller that it has completed its commands, it sends a message at step  28  to advise the programmable device accordingly, which at step  29  again activates the lock. 
   The invention can be implemented in built in hardware. The command interpreter disallows (some or all) command to be executed if locked. Also, the local device can be warned that a command has been blocked, and in one embodiment an error message is sent back to the controller if he command fails. Certain special commands can be performed even in the lock is active.