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

DroidStar not receiving Parrot #1239

Open
rbarreiros opened this issue Dec 11, 2024 · 3 comments
Open

DroidStar not receiving Parrot #1239

rbarreiros opened this issue Dec 11, 2024 · 3 comments

Comments

@rbarreiros
Copy link

rbarreiros commented Dec 11, 2024

Hey Jacob,

As per email, I'm opening the issue in github. I made a few more tests, and using an MMDVM hat connected to DMRHub and a radio, Parrot is working, I do get some messages stating that parrot took a long time, but still, I hear everything from start to finish, but using DroidStar It acknowledges the reception and Parrot replies back (as per LastHeard in the web) but nothing is shown in DroidStar (or heard).

Anyway, I'd like to further investigate to figure out what's the problem, and it seems I only get debug messages from the web interface, I'm using these options

export LISTEN_ADDR=0.0.0.0
export DMR_PORT=62031
export REDIS_HOST=localhost:6379
export PG_HOST=localhost
export CORS_HOSTS=http://192.168.1.253:3005
export DEBUG=1

After the regular startup messages (and gin debug) this is the log I get

2024/12/11 23:23:04 [internal/http.MakeServer@server.go:77]: HTTP Server listening at 0.0.0.0 on port 3005
2024/12/11 23:23:04 [internal/dmr/servers/hbrp.(*SubscriptionManager).subscribeRepeater@subscriptions_manager.go:299]: Listening for calls on repeater 268053402
2024/12/11 23:23:04 [internal/dmr/servers/hbrp.(*SubscriptionManager).subscribeRepeater@subscriptions_manager.go:299]: Listening for calls on repeater 268053401
2024/12/11 23:23:06 [internal/repeaterdb.Update@repeaterdb.go:270]: Update complete. Loaded 10081 DMR repeaters
2024/12/11 23:23:11 [internal/userdb.Update@userdb.go:269]: Update complete. Loaded 272321 DMR users
2024/12/11 23:23:35 [internal/dmr/servers/hbrp.(*Server).handlePacket@server.go:330]: Invalid packet length: 0
2024/12/11 23:23:48 [internal/dmr/servers/hbrp.(*Server).doParrot.func1@packet_handlers.go:221]: Parrot call took too long to send, elapsed: 65.543595ms
2024/12/11 23:24:04 [internal/dmr/servers/hbrp.(*Server).handleRPTCLPacket@packet_handlers.go:671]: Invalid RPTCL packet length: 9

The first invalid packet length: 0 happens when droidstar connects (but not always), then I sent a 3 second message to Parrot TG (Group call), web interface shows up Parrot replying and the message on log stating Parrot took too long show up, nothing happends in DroidStar, neither a notification that a call is being received nor audio, then, invalid RPTCL happened when DroidStar disconnected.

Now, I'm very inclined this is a DroidStar issue, but I need to have more debug detail, anyway of increasing debug detail ? Or Where can I add it (point me to the right file please!!! :P).

P.S. I'll clean this up and submit a PR later when I have some time about the RadioID ID check bypass.

P.P.S Running latest tagged version, 1.0.65

@rbarreiros
Copy link
Author

I made further advancements that make me believe that in fact the problem is in DroidStar, but, I'm a bit lost with the DMR protocol (or Homebrew for all that matters).

BrandMeister servers send a DMRD packet with 55 bytes in size, and this is what DroidStar is expecting, if checks packet size, anything different is disregarded, DMRHub sends a 53 DMRD packet size, hence it isn't picked up by DroidStar and it's discarded. I search for the protocol specification and found this PDF, https://wiki.brandmeister.network/images/5/54/DMRplus_IPSC_Protocol_for_HB_repeater.pdf in that PDF, it's stated that DMRD protocol is in fact of 53byte size like DMRHub is sending, was this updated (the pdf is from 2015) and Brandmeister is using a different one ? (with more data in the end) Or is this Brandmeister breaking protocol, most implementations I saw like MMDVM Host don't care about packet size but only about the header info (20 bytes) + DMR Data (33 bytes) disregarding the rest, or is it different for Hotspots/Repeaters ?

@rbarreiros
Copy link
Author

More to it, Using an MMDVM hotspot connected to DMRHub, if I talk with a radio, the DMRD packet arriving DroidStar from DMRHub has a packet size of 55 bytes! Only Parrot DMRD sends 53 bytes.

@rbarreiros
Copy link
Author

I found the issue. Parrot when replying the recorded conversation removes BER and RSSI, here is a patch fixing that.
Also, It seems a few software around expect BER and RSSI, and for those software that are not doing the packet decoding the right way, this patch also enforces the inclusion of BER and RSSI with values 0 when they don't exist.

PR #1242 fixes this issue along with the RadioID user registration check enforce option.

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

1 participant