Open DM5KA opened 5 years ago
@inkiiin I have a prototype working with https://github.com/xlfe/dmrconfig/commit/a5b07f2e7a13fc00edc99fddb5a0756ba172c4b9
While it read and writes the ids correctly, the radio seems still only to accept the first ID (the others dont show up). I might be missing an index somewhere which sets the number of active radio IDs.
Can you configure your radio with multiple radio IDs and then use dmrconfig to read the codeplug file ? Then remove all but the first radio ID and read the codeplug to another file and show us the binary diff?
I don't have a windows machine to run the official software or I would do that myself.
@xlfe : I created three codeplugs with multiple IDs. See attached package.
id1.img - Factory configuration with id1=1. id1-7.img - Same configuration with id1=1, id2=2, id3=3 ... id7=7. id1-7-250.img - Same configuration with id1=1, id2=2, id3=3 ... id7=7, id250=250.
Files id1.hd, id1-7.hd, id1-7-250.hd contain hex dump of the codeplugs.
Here is a diff of first two codeplugs:
$ diff -u id1.hd id1-7.hd
--- id1.hd 2019-10-17 23:49:02.000000000 -0700
+++ id1-7.hd 2019-10-17 23:48:53.000000000 -0700
@@ -134,7 +134,7 @@
*
070940 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
070950 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
-070960 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+070960 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
070970 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
070980 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
070990 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
@@ -207,7 +207,19 @@
*
073d00 00 00 00 01 00 52 61 64 69 6f 20 31 00 00 00 00 .....Radio 1....
073d10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
-073d20 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
+073d20 00 00 00 02 00 52 61 64 69 6f 20 32 00 00 00 00 .....Radio 2....
+073d30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+073d40 00 00 00 03 00 52 61 64 69 6f 20 33 00 00 00 00 .....Radio 3....
+073d50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+073d60 00 00 00 04 00 52 61 64 69 6f 20 34 00 00 00 00 .....Radio 4....
+073d70 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+073d80 00 00 00 05 00 52 61 64 69 6f 20 35 00 00 00 00 .....Radio 5....
+073d90 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+073da0 00 00 00 06 00 52 61 64 69 6f 20 36 00 00 00 00 .....Radio 6....
+073db0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+073dc0 00 00 00 07 00 52 61 64 69 6f 20 37 00 00 00 00 .....Radio 7....
+073dd0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+073de0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
*
075c40 00 ff 00 ff 00 ff 00 ff 00 00 00 00 00 00 00 00 ................
075c50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
Similarly, a diff of second and third codeplugs:
$ diff -u id1-7.hd id1-7-250.hd
--- id1-7.hd 2019-10-17 23:48:53.000000000 -0700
+++ id1-7-250.hd 2019-10-17 23:48:46.000000000 -0700
@@ -135,7 +135,7 @@
070940 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
070950 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
070960 7f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
-070970 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
+070970 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 ................
070980 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
070990 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0709a0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
@@ -221,6 +221,8 @@
073dd0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
073de0 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ................
*
+075c20 00 00 02 50 00 52 61 64 69 6f 20 32 35 30 00 00 ...P.Radio 250..
+075c30 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
075c40 00 ff 00 ff 00 ff 00 ff 00 00 00 00 00 00 00 00 ................
075c50 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
*
It can be seen, that the table of 250 IDs is located at addresses 073d00-075c3f. Each entry takes 32 bytes.
Additionally, addresses 070960-07097f contain a bitmap of active IDs, one bit per ID.
@sergev thanks - very helpful.
This commit https://github.com/xlfe/dmrconfig/commit/edb48315f2b91efcdefb3841fe52879163b0b6cf adds the bitmap for enabling radioids
Read/Write multiple Radio IDs into radio/textual config file.