Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Running on Pi 4 #5

Open
scroggyg opened this issue Jul 22, 2020 · 9 comments
Open

Running on Pi 4 #5

scroggyg opened this issue Jul 22, 2020 · 9 comments

Comments

@scroggyg
Copy link

@scroggyg scroggyg commented Jul 22, 2020

I have created a new Debian installation on a PI 4.
I have installed using pip install -U osdp
It installs successfully into the python2.7/site-packages/osdp
When I enter python and try to run

from osdp import *
Traceback (most recent call last):
File <"stdin>". line 1, in
File"home/pi/.local/lib/python2.7/site-packages/osdp/init.py", line 14 in from .-types_import(
File "/home/pi/.local/lib/python2.7/site-packages/osdp/_types.py", line 39
def init(self, sequence: init, use_crc: bool, has_security_control_block: bool):
^
SyntaxError: invalid syntax

@ryanhz
Copy link
Owner

@ryanhz ryanhz commented Jul 31, 2020

It only support python3.5+

@ryanhz
Copy link
Owner

@ryanhz ryanhz commented Jul 31, 2020

Hi George, where did you posted the changes to get the secure session working?

@scroggyg
Copy link
Author

@scroggyg scroggyg commented Jul 31, 2020

@ryanhz
Copy link
Owner

@ryanhz ryanhz commented Jul 31, 2020

Oh, nice. The python code was ported from @dbytedreamer's OSDP.Net. We haven't used the secure channel yet, so it is not properly tested (I don't have sample data to test). Feel free to fork and make change directly.

@scroggyg
Copy link
Author

@scroggyg scroggyg commented Jul 31, 2020

@Thomac02
Copy link

@Thomac02 Thomac02 commented Aug 4, 2020

Hi Ryan, I have tested the secure session with one of our devices, just had to make a few minor changes to get it working. I forked the lib, you can see my changes at https://github.com/Thomac02/osdp-python. Thanks btw, its a great library!

@ryanhz
Copy link
Owner

@ryanhz ryanhz commented Aug 5, 2020

Cool. I have merged your changes.
I think you can use logger instead of print for debugging.

Do you have test cases?

@Thomac02
Copy link

@Thomac02 Thomac02 commented Aug 6, 2020

I didn't think of using logger, that's much better. I was using a very basic script to test, currently working on proper unit tests like those you've already done. I'll push them once I've finished.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants
You can’t perform that action at this time.