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

Python bindings #108

Open
xiaoyaodiwang opened this issue Jun 4, 2021 · 9 comments
Open

Python bindings #108

xiaoyaodiwang opened this issue Jun 4, 2021 · 9 comments

Comments

@xiaoyaodiwang
Copy link

Hi

Is Python bindings built for lorawan module? I'd like to call lorawan module using Python. Looking forward to your answer, thanks!

@DvdMgr
Copy link
Member

DvdMgr commented Jun 7, 2021

Hi, Python bindings are not bundled as of now. If I remember correctly, the last time I tried the command to create the bindings threw up an error, but it was quite some time ago. Let me know if you are successful in obtaining them (this page should contain all needed instructions to generate them). I will try and look into this.

@xiaoyaodiwang
Copy link
Author

Hi, I've built bindings successfully using NS3 API Python scanning

@DvdMgr
Copy link
Member

DvdMgr commented Jun 7, 2021

Nice, good to know! I'll add them to the module once I get some time to work on this.

@xiaoyaodiwang
Copy link
Author

When I tried import lorawan module in Python, it reports that "ImportError: /ns-allinone-3.33/ns-3.33/build/bindings/python/ns/lorawan.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN3ns37lorawan39CorrelatedShadowingPropagationLossModel22GetCorrelationDistanceEv". How to solve this problem?

@DvdMgr
Copy link
Member

DvdMgr commented Jun 24, 2021

As a temporary workaround: can you try removing the correlated-shadowing-propagation-loss-model.cc|h files (also removing them from the wscript), provided you don't use them, regenerate the python bindings and try again?

@xiaoyaodiwang
Copy link
Author

I've removed them, and then another error is reported: "lorawan.cpython-36m-x86_64-linux-gnu.so: undefined symbol: _ZN3ns37lorawan15EndDeviceStatus17UpdateGatewayDataESt3mapINS_7AddressENS1_15PacketInfoPerGwESt4lessIS3_ESaISt4pairIKS3_S4_EEES3_d". Then I tried to remove "end-device-status.cc|h" files, but it fails to compile without "end-device-status.h".

@asmanuha
Copy link

asmanuha commented Oct 7, 2021

Hi @xiaoyaodiwang, Did you succeed in binding the code to python?

@xiaoyaodiwang
Copy link
Author

Hi @xiaoyaodiwang, Did you succeed in binding the code to python?

Yes

@DvdMgr
Copy link
Member

DvdMgr commented Nov 19, 2021

Hi @xiaoyaodiwang, can you share how you were able to make this work? I'd like to include this feature in the mainline, if you want to open a pull request feel free to do so!

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

No branches or pull requests

3 participants