Comments (6)
Thank you for adding the functionality I requested so quickly, especially on the same day. Iām going to test it out now.
from libosdp.
LibOSDP fetches this information during handshake and application can get this info using the C API osdp_cp_get_pd_id()
. It is currently not exposed to the python layer.
Will enable this later today. Thanks for reporting the issue.
from libosdp.
Now you can use,
cp.get_pd_id(pd.address)
and
cp.check_capability(pd.address, Capability.CommunicationSecurity)
to access the PD_ID information and Capabilities as reported by the PD to LibOSDP.
from libosdp.
Hello,
I am trying cp.get_pd_id(pd.address) and it returns the values as seen in the log below. The value for firmware_version looks like the maximum value of some type in the C language?
The reader is Secustos SQ80 LEGIC from the manufacturer sesamsec.
pyosdp: [2024-05-29T12:45:51Z] [INFO ] vendor/src/osdp_cp.c:1372: Setup complete; LibOSDP-3.0.6 master (c95b95f) NumPDs: 1 Channels: 1.
OSDP: CP: PD-1: [2024-05-29T12:45:51Z] [DEBUG] vendor/src/osdp_cp.c:684: CMD: ID(61) REPLY: PDID(45)
OSDP: CP: PD-1: [2024-05-29T12:45:51Z] [DEBUG] vendor/src/osdp_cp.c:1185: StateChange: [ID-Request] -> [Cap-Detect] (SC-Inactive)
OSDP: CP: PD-1: [2024-05-29T12:45:51Z] [DEBUG] vendor/src/osdp_cp.c:460: Reports capability 'ContactStatusMonitoring' (1/0)
OSDP: CP: PD-1: [2024-05-29T12:45:51Z] [DEBUG] vendor/src/osdp_cp.c:460: Reports capability 'OutputControl' (1/0)
OSDP: CP: PD-1: [2024-05-29T12:45:51Z] [DEBUG] vendor/src/osdp_cp.c:460: Reports capability 'CardDataFormat' (3/0)
OSDP: CP: PD-1: [2024-05-29T12:45:51Z] [DEBUG] vendor/src/osdp_cp.c:460: Reports capability 'LEDControl' (4/1)
OSDP: CP: PD-1: [2024-05-29T12:45:51Z] [DEBUG] vendor/src/osdp_cp.c:460: Reports capability 'AudibleControl' (2/1)
OSDP: CP: PD-1: [2024-05-29T12:45:51Z] [DEBUG] vendor/src/osdp_cp.c:460: Reports capability 'TextOutput' (0/0)
OSDP: CP: PD-1: [2024-05-29T12:45:51Z] [DEBUG] vendor/src/osdp_cp.c:460: Reports capability 'TimeKeeping' (0/0)
OSDP: CP: PD-1: [2024-05-29T12:45:51Z] [DEBUG] vendor/src/osdp_cp.c:460: Reports capability 'CheckCharacter' (1/0)
OSDP: CP: PD-1: [2024-05-29T12:45:51Z] [DEBUG] vendor/src/osdp_cp.c:460: Reports capability 'CommunicationSecurity' (1/1)
OSDP: CP: PD-1: [2024-05-29T12:45:51Z] [DEBUG] vendor/src/osdp_cp.c:460: Reports capability 'ReceiveBufferSize' (149/0)
OSDP: CP: PD-1: [2024-05-29T12:45:51Z] [DEBUG] vendor/src/osdp_cp.c:460: Reports capability 'CombinedMessageSize' (149/0)
OSDP: CP: PD-1: [2024-05-29T12:45:51Z] [DEBUG] vendor/src/osdp_cp.c:460: Reports capability 'SmartCard' (0/0)
OSDP: CP: PD-1: [2024-05-29T12:45:51Z] [DEBUG] vendor/src/osdp_cp.c:460: Reports capability 'Reader' (0/1)
OSDP: CP: PD-1: [2024-05-29T12:45:51Z] [DEBUG] vendor/src/osdp_cp.c:460: Reports capability 'Biometric' (0/0)
OSDP: CP: PD-1: [2024-05-29T12:45:51Z] [DEBUG] vendor/src/osdp_cp.c:684: CMD: CAP(62) REPLY: PDCAP(46)
OSDP: CP: PD-1: [2024-05-29T12:45:51Z] [DEBUG] vendor/src/osdp_cp.c:1185: StateChange: [Cap-Detect] -> [SC-Chlng] (SC-Inactive)
OSDP: CP: PD-1: [2024-05-29T12:45:51Z] [DEBUG] vendor/src/osdp_cp.c:684: CMD: CHLNG(76) REPLY: CCRYPT(76)
OSDP: CP: PD-1: [2024-05-29T12:45:51Z] [DEBUG] vendor/src/osdp_cp.c:1185: StateChange: [SC-Chlng] -> [SC-Scrypt] (SC-Inactive)
OSDP: CP: PD-1: [2024-05-29T12:45:51Z] [DEBUG] vendor/src/osdp_cp.c:684: CMD: SCRYPT(77) REPLY: RMAC_I(78)
OSDP: CP: PD-1: [2024-05-29T12:45:51Z] [INFO ] vendor/src/osdp_cp.c:1162: Online; With SC
OSDP: CP: PD-1: [2024-05-29T12:45:51Z] [DEBUG] vendor/src/osdp_cp.c:1185: StateChange: [SC-Scrypt] -> [Online] (SC-Active)
App: [2024-05-29 14:45:52] [INFO] version: 0
App: [2024-05-29 14:45:52] [INFO] model: 3
App: [2024-05-29 14:45:52] [INFO] vendor_code: 204064
App: [2024-05-29 14:45:52] [INFO] serial_number: 182882549
App: [2024-05-29 14:45:52] [INFO] firmware_version: 65536
from libosdp.
Firmware version is 3 bytes (major, minor, and build) which is then packed into a int by LibOSDP. In this case the reader is reporting 1.0.0 as firmware_version (65536 is 0x10000 so [0x01, 0x00, 0x00]).
I could split this python wrapper.
from libosdp.
Ah, I apologize. In this case, it is correct.
from libosdp.
Related Issues (20)
- Unable to compile Rust libosdp HOT 6
- Connection could not be established in Rust project HOT 3
- Issue with Keyset Command HOT 2
- How does a PD answer to CMD_ISTAT? HOT 1
- cp_refresh not handling shared PDs correctly HOT 1
- CP SETKEY failing for PD in install mode HOT 2
- Fixup Python bindings for 2.2 colors HOT 1
- Unable to install via Pypi HOT 3
- CP send a broadcast HOT 8
- Channel API needs a new optional method called close
- Undefined reference if linking against static library HOT 2
- Question Regarding Multi-part Message.
- pd_app.py example does not result in a functioning PD by OSDP Spec HOT 1
- Add tests to check PD command callbacks
- Packet Size Limits HOT 1
- Add support for command status reporting
- Support for disabling/enabling PD after setup
- File transfer with SC HOT 16
- Turn off the SCB for all messages
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from libosdp.