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

Callsign DB for DM-1701 does not display correctly in the radio. #296

Open
AndresPlazaR2 opened this issue Feb 1, 2023 · 4 comments
Open

Comments

@AndresPlazaR2
Copy link

AndresPlazaR2 commented Feb 1, 2023

@hmatuschek , I'm still puzzled about the call-sign DB. It does not display correctly in the list of contacts, and snooping the USB data transferred (to upload the call-sign DB) from the original software and dmrconf look different:

  • original software: the DMR ID is stored in ASCII, on as many bytes as needed. The field separator is 0x09 (tab).
  • dmrconf: the DMR ID is stored in binary on 3 bytes (I mean the binary representation of those 3 bytes is the DMR ID), and little endian. It doesn't seem to be a clear field separator.

I wonder if this is the reason why the DB seems corrupted while looking at it in the radio.

Originally posted by @AndresPlazaR2 in #136 (comment)

@AndresPlazaR2
Copy link
Author

I'm not good at C++ (in fact, I don't believe in OOP), but I think the EntryElement::set method for the DM-1701 should be like this:

uint pos = 0;

// Set id
QString dmrid = QString::number(user.id);
encode_ascii(_data + 0x0000, dmrid, dmrid.length());
pos = dmrid.length();
_data[pos++] = 0x09;

// Set call
encode_ascii(_data + pos, user.call, user.call.length());
pos += user.call.length();
_data[pos++] = 0x09;

// Set name
QString name = user.name;
if (! user.surname.isEmpty())
name += " " + user.surname;
if (! user.country.isEmpty())
name += ", " + user.country;
encode_ascii(_data + pos, name, name.length());
pos += name.length();
_data[pos++] = 0x09;

// There is a mostly unused field here
_data[pos++] = 0x09;

// Set city
if (! user.city.isEmpty()) {
encode_ascii(_data + pos, user.city, user.city.length());
pos += user.city.length();
}
_data[pos++] = 0x09;

// Set state
if (! user.state.isEmpty()) {
encode_ascii(_data + pos, user.state, user.state.length());
pos += user.state.length();
}
_data[pos++] = 0x09;

// Set country
if (! user.country.isEmpty()) {
encode_ascii(_data + pos, user.country, user.country.length());
pos += user.country.length();
}
_data[pos++] = 0x09;

// Set DMR string
encode_ascii(_data + pos, "DMR", 3);
pos += 3;
_data[pos++] = 0x00;

// Fill the rest (up to 120) with 0xFF
for (; pos < 120; pos++)
_data[pos] = 0xff;
}

@allesand
Copy link

Is this the same radio as #376 and #377 ? Is the callsign DB working on the DM-1701 then? Or is this a different issue?

@hmatuschek
Copy link
Owner

Which firmware version are you running? Also stock Baofeng or OpenGD77?

@allesand
Copy link

allesand commented Oct 9, 2023

@AndresPlazaR2 mention to trigger notification: in #377 it seems to be working for another user, from #136 I guess you are using stock firmware, not OpenGD77? There is issue #300 for OpenGD77 on DM-1701 / RT84

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