Menu

Tree [a17257] default tip /
 History

Read Only access


File Date Author Commit
 README.txt 2009-03-27 marius@bounty marius@bounty [a17257] Added some more text and information to the rea...
 bapsilib.py 2009-03-27 marius@bounty marius@bounty [a17257] Added some more text and information to the rea...

Read Me

pybapsi

INTRODUCTION
------------
This is a Python implementation of the BAPSI (Bewator All Purpose
Socket Interface), which is a socket API developed by Bewator. BAPSI
is used for safe data transfer between external applications and
Bewator products like the Bewator Entro and Bewator 2010 access
control systems.

DETAIL
------
The BAPSI protocol specifies encryption for all its
traffic. Encryption is done by using a pre-shared 16 byte encryption
key agreed upon by the server and the client. The only message that
may be left unencrypted is Acknowledge (C: 0x61 T: 0x06) with response
code 310, meaning Server encryption error.

Each BAPSI packet contains a data and a header. The header contains 6
fields, a total of 10 bytes. The fields are start <SOH> (2 bytes),
Version (1 byte), Encryption (1 byte), Random Crypt (4 byte), Length
(2 byte).

REQUIREMENTS
------------
python-crypto (uses the ARC4 module)

USAGE
-----
>>> import bapsilib
>>> b = bapsilib.BAPSI('USER', 'secretstupidlongkey')
>>> b.connect('192.168.3.2', 4005)
>>> cards = b.getCard(lastname = "Flage")
>>> print cards
[<bapsilib.Card instance at 0xb77b34cc>, <bapsilib.Card instance at 0xb77b364c>]
>>> print cards[0]
0000012210031280 MARIUS FLAGE

CONTACT
-------
You can reach me at marius@flage.org if there's any questions about
the module or if you'd like to help developing this odd module
further. Somehow I don't think there'll be any need for this :)
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.