Programming
6.2 Programming via USB interface
SIMATIC RF1000
18
Operating Instructions, 02/2019, C79000-G8976-C432-04
6.2
Programming via USB interface
You can program the reader using access functions. On the Siemens support page "Industry
Online Support (
https://support.industry.siemens.com/cs/ww/en/view/109741590
)" you will
obtain the file "RF10x0R.zip". It includes the DLL files ("BrpDriver_x64" and
"BrpDriver_x86"), the DLL functions as well as a demo application which demonstrates the
use of the DLL functions.
With the demo application "AccessControlDemo" you can address the reader directly from
your application via the USB interface. A precompiled DLL file for Windows systems that
provides this function is included in the package.
The DLL files provide various DLL functions for communication with the reader for integration
in your application. The reader has return values and status codes to inform you of the
reader status and execution of the functions.
You can integrate the DLL files in your application under Microsoft Windows 7/8/10 and use
them to call the described functions directly.
6.2.1
Functions of the DLL
6.2.1.1
brp_open_usb_session
The function opens a connection to the reader via the USB interface and returns a session
key that is required for all functions and continued communication via this connection. If the
connection was successfully established, the value "BRP_OK" is returned.
Note that all the following functions can only be executed after you have established a
connection to the reader with the function "brp_open_usb_session". If this is not the case, an
error is signaled back.
Note
Parallel operation not possible
Note that with the application, a connection can only be established to one reader at any one
time. For this reason "brp_open_usb_session" may only be called once and before it can be
called again must first be closed by the function "brp_close_session".
After a "brp_open_usb_session" the parameter "Handle" must always be = "0". If the
parameter ≠ "0", there is either an error or the function "brp_open__usb_session" was called
several times in succession.
Function call
int
brp_open_usb_session(
int * Handle,
DWORD ProductID
);