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

Feature request: add CSMA packet scheduling #12

Open
maqifrnswa opened this issue Apr 25, 2021 · 1 comment
Open

Feature request: add CSMA packet scheduling #12

maqifrnswa opened this issue Apr 25, 2021 · 1 comment

Comments

@maqifrnswa
Copy link

To prevent on air packet collisions, simple CSMA can be implemented like in AX.25 TNCs
http://www.ax25.net/kiss.aspx

The libAPRS turns a pin high when receiving data, which can be used to check if there's something on the air.

Before activating PTT:
While LED_RX pin is high, delay(SlotTime). Then check if a random number is less than or equal than P. If it is, turn on PTT, delay(TXDELAY), then send the packet. Else, delay(SlotTime) and go back to the start of this process.

It's possible that digipeaters receiving this packet may be really far away where there still may be collisions, but at least you'd avoid some locally.

This is easy enough to do, if I get a chance to do it I can make a pull request if someone else doesn't get to it first.

@m1geo
Copy link

m1geo commented May 2, 2021

Agreed!

But there is no connection from the radio back to the MCU so it is not able to receive. I have added this functionality on mine (bias ADC0 at half supply, capacitive couple in signal, volume on module up, squelch off)

I'll impliment this in my variant which I am using in my car (with significant changes).

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