Giter Club home page Giter Club logo

Comments (6)

boobika avatar boobika commented on August 15, 2024 1

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.

sidcha avatar sidcha commented on August 15, 2024

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.

sidcha avatar sidcha commented on August 15, 2024

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.

boobika avatar boobika commented on August 15, 2024

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.

sidcha avatar sidcha commented on August 15, 2024

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.

boobika avatar boobika commented on August 15, 2024

Ah, I apologize. In this case, it is correct.

from libosdp.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.