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

Single shot transmission or how to stop endless loop #16

Closed
Mictronics opened this issue Aug 5, 2020 · 8 comments
Closed

Single shot transmission or how to stop endless loop #16

Mictronics opened this issue Aug 5, 2020 · 8 comments

Comments

@Mictronics
Copy link

I'm using your project as base for an AIS simulator. Implemented some code from another fork, so I can change sentence on the fly.
However, the top_block is running in endless loop, repeating transmission of a sentence. The build_frame block seems to have a "Repeat" option but obviously without effect. Repetition speed seems to be limited only be a delay at the end of "work" function in build_frame implementation.

So, how can I stop endless repetition of a sentence and create a single shot transmission?
Or, how to tell GNU radio that this flow/top_block shall run only one time then return?

Any help appreciated, thanks.

@A1337CBS
Copy link
Contributor

@Mictronics I had the same issue, so I changed the block to tagged_stream to make it work. I have added a pull request to this project so hopefully you can use it when the pull request is approved or you can get it from my repo. Good luck!

@Mictronics
Copy link
Author

Thanks, will try.

@A1337CBS
Copy link
Contributor

Thanks, will try.

Great, let us know how it goes

@Mictronics
Copy link
Author

@A1337CBS Reading into tagged_stream_block make me wonder whether your code is missing an calculate_output_stream_length overwrite?

I tried your PR and also modified my project from sync to tagged_stream block. However, I no longer receive any RF output (via hackrf) on a radio scanner nearby. Debugging shows that 32 byte noutput_items are generated in work (from 168 bit input) when a PDU message is received.

@Mictronics
Copy link
Author

Half working. With enable_input=false the cyclic RF output is back, with both, yours and my code. RF on sentence message still not working.

@A1337CBS
Copy link
Contributor

@Mictronics Its been a while since I looked at the code but will look at up when I have time. I am confused though, can you let me know what are you trying to do and post a screenshot of your flowgraph?

@Mictronics
Copy link
Author

@A1337CBS Porting stuff to GR3.8 and Python3 to avoid any hassle in future. Started with a new module from scratch. I'm on the way, stay tuned, I will report back. Steep learning curve btw, I like that.

@Mictronics
Copy link
Author

First working code, more to come. https://github.com/Mictronics/ais-simulator
Issue solved.

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

2 participants