g4klx / MMDVMHost

The host program for the MMDVM
GNU General Public License v2.0
378 stars 275 forks source link

Not working on LEDE/MIPSLE platform #304

Open n0p opened 7 years ago

n0p commented 7 years ago

So I ported (well, compiled) the MMDVMHost to lede (OpenWRT) and got it running, but the network protocol fails to talk to the BM Master:

E: 2017-05-21 09:23:11.930 DMR, Login to the master has failed, retrying ...
E: 2017-05-21 09:23:22.074 DMR, Login to the master has failed, retrying ...
E: 2017-05-21 09:23:32.217 DMR, Login to the master has failed, retrying ...
E: 2017-05-21 09:23:42.364 DMR, Login to the master has failed, retrying ...
E: 2017-05-21 09:23:52.511 DMR, Login to the master has failed, retrying ...

A quick tcpdump check shows the packets are flowing correctly:


09:24:22.813892 IP 192.168.6.78.50830 > 84.232.5.113.62031: UDP, length 8
09:24:22.876526 IP 84.232.5.113.62031 > 192.168.6.78.50830: UDP, length 10
09:24:22.878260 IP 192.168.6.78.50830 > 84.232.5.113.62031: UDP, length 40
09:24:22.943564 IP 84.232.5.113.62031 > 192.168.6.78.50830: UDP, length 10

I suspect this is an endianness problem because this is a little endian platform, not like x86 or ARM.

Any clues on how to debug this?

phl0 commented 7 years ago

Could you please provide a complete dump incl. payloads to analyze?

n0p commented 7 years ago

Here it is

mmdvmcap.zip

g4klx commented 7 years ago

The code is not endian specific, the format of the id's and much else is in a manually generated form. The problem probably lies elsewhere.

n0p commented 7 years ago

So, checked the protocol and pcap dump. It seems that the password authentication fails:

The conversation goes like this:

The same MMDVM.ini file is working perfectly on my laptop and on my raspberry pi. I'll try to get some correct pcap and compare, but it seems that the SHA256 function is endian-dependent.

72hour commented 7 years ago

how can fix "gethostbyname is obsolescent, use getnameinfo() instead" error?