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

Implementation of BTECH DR-1801A6 #392

Merged
merged 67 commits into from
Nov 17, 2023
Merged
Changes from 1 commit
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
81823e0
Started rev.eng. of Baofeng DR-1801UV (Auctus A6).
hmatuschek Oct 28, 2022
03a0f36
Started interface implementation for Actus A6 devices.
hmatuschek Dec 4, 2022
aed0e5c
Merge branch 'master' into dr1801
hmatuschek Jan 21, 2023
df9b7e7
Implemented codeplug download.
hmatuschek Jan 21, 2023
858fafc
Fixed codeplug download for DR-1801UV
hmatuschek Jan 21, 2023
2ab8ae7
Implemented contact decoding for BTECH DR-1801UV.
hmatuschek Jan 21, 2023
3f773b0
Implemented decofing of group lists for BTECH DR-1801UV.
hmatuschek Jan 21, 2023
da3bf24
Cleanup.
hmatuschek Jan 21, 2023
59461e5
Implemented zones and general settings for BTECH DR1801.
hmatuschek Jan 22, 2023
640828b
Fixed docs.
hmatuschek Jan 22, 2023
931dfbd
Implemented scan list decoding for BTECH DR-1801UV. Addresses #285.
hmatuschek Jan 23, 2023
5620722
Oops.
hmatuschek Jan 23, 2023
c7b3188
Backup.
hmatuschek Jan 23, 2023
2d5dcd4
Implemented banks.
hmatuschek Jan 23, 2023
708bfd8
Fixed crash decoding contacts for DR-1801UV.
hmatuschek Jan 24, 2023
97b2ab3
Fixed zone decoding.
hmatuschek Jan 24, 2023
7a4fc24
Implemented key settings for DR1801UV.
hmatuschek Jan 25, 2023
3d7f93f
Codeplug cleanup.
hmatuschek Jan 26, 2023
af712db
Implemented VFO settings. Addresses #285.
hmatuschek Jan 26, 2023
0c72dff
Implemented encryption keys for DR-1801UV. Addresses #285.
hmatuschek Jan 26, 2023
09cdd2d
Reverse engineered DTMF settings for DR-1801UV. Addresses #285.
hmatuschek Jan 26, 2023
ef9a865
Reverse engineered alarm settings for DR-1801UV. Addresses #285.
hmatuschek Jan 27, 2023
4c3207b
Implemented DTMF settings. Addresses #285.
hmatuschek Jan 27, 2023
61e4a78
Implemented alarm settings. Addresses #285.
hmatuschek Jan 27, 2023
14be77c
Implemented DMR settings for the DR-1801UV. Addresses #285.
hmatuschek Jan 27, 2023
8be991a
Implemented one-touch settings for DR-1801UV, addresses #285.
hmatuschek Jan 28, 2023
7ffa53c
Implemted import from manufacturer CPS file for DR1801UV, addresses #…
hmatuschek Jan 28, 2023
b6fbcf3
Implemented encoding of settings, zones and contacts for DR1801UV, ad…
hmatuschek Jan 28, 2023
1b52db0
Implemented encoding of scan lists, addresses #285.
hmatuschek Jan 28, 2023
f4f7366
Implemented encoding of channels for DR-1801UV, addresses #285.
hmatuschek Jan 28, 2023
e8e74ab
Implemented encoding of group lists for DR-1801UV, addresses #285.
hmatuschek Jan 28, 2023
78a3922
Added common reveng code.
hmatuschek Jan 29, 2023
c27e889
Fixed codeplug upload for DR-1801UV, addresses #285.
hmatuschek Jan 29, 2023
34e492f
Fixed codeplug encoding and transfer for DR-1801UV, addresses #285.
hmatuschek Jan 29, 2023
0489581
Fixed codeplug transfer for DR-1801UV, addresses #285.
hmatuschek Jan 29, 2023
143723b
Cleanup of DR-1801UV interface. Addresses #285.
hmatuschek Jan 30, 2023
52016fb
Fixed compiler warning.
hmatuschek Jan 30, 2023
e2cd1bd
Merge branch 'devel' into dr1801
hmatuschek Jan 30, 2023
f01c68c
Merge branch 'devel' into dr1801
hmatuschek Jan 30, 2023
0ec4420
Merge branch 'devel' into dr1801
hmatuschek Jan 30, 2023
31f1b8e
Merge branch 'devel' into dr1801
hmatuschek Feb 2, 2023
3c43499
Merge branch 'devel' into dr1801
hmatuschek Feb 4, 2023
3f9bfe7
Merge branch 'devel' into dr1801
hmatuschek Feb 10, 2023
e939e3c
Merge branch 'devel' into dr1801
hmatuschek Feb 22, 2023
206b568
Merge branch 'dr1801' of https://github.com/hmatuschek/qdmr into dr1801
hmatuschek Feb 22, 2023
e9da3c0
Merge branch 'master' into dr1801
hmatuschek Mar 8, 2023
852ea47
Merge branch 'devel' into dr1801
hmatuschek Mar 15, 2023
7eed00d
Merge branch 'devel' into dr1801
hmatuschek Apr 21, 2023
2e0cce6
Merge branch 'devel' into dr1801
hmatuschek Jun 1, 2023
f63753b
Merge branch 'devel' into dr1801
hmatuschek Jun 19, 2023
89ee229
Merge branch 'devel' into dr1801
hmatuschek Jul 10, 2023
0e988a7
Merge branch 'devel' into dr1801
hmatuschek Jul 19, 2023
b2e8f7b
Merged.
hmatuschek Jul 19, 2023
59bde91
Merge branch 'devel' into dr1801
hmatuschek Jul 20, 2023
22ef138
Merge branch 'devel' into dr1801
hmatuschek Sep 20, 2023
513cd78
Merge branch 'devel' into dr1801
hmatuschek Sep 24, 2023
6923329
Merge branch 'devel' into dr1801
hmatuschek Oct 10, 2023
6f539bb
Merge branch 'devel' into dr1801
hmatuschek Oct 14, 2023
de53519
Fixed DR1801UVA6 codeplug generation.
hmatuschek Oct 14, 2023
6723b45
Merge branch 'devel' into dr1801
hmatuschek Oct 23, 2023
2d5ac14
Merge branch 'devel' into dr1801
hmatuschek Nov 2, 2023
c7cc3d6
Merge branch 'devel' into dr1801
hmatuschek Nov 6, 2023
e28cb0a
Fixed communication issue with DR1801UV (A6) devices.
hmatuschek Nov 13, 2023
9ce237f
Fixed DR1801UV group list encoding.
hmatuschek Nov 13, 2023
f83693d
Added basic unit tests for DR1801UV (A6).
hmatuschek Nov 13, 2023
3340feb
Added reencoding test.
hmatuschek Nov 13, 2023
2eea9fe
Cleanup of Auctus A6 interface.
hmatuschek Nov 17, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed crash decoding contacts for DR-1801UV.
  • Loading branch information
hmatuschek committed Jan 24, 2023
commit 708bfd89b1c9325c3645328153515b62a40447d6
50 changes: 32 additions & 18 deletions doc/code/dr1801uv_channelbankelement.txt
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0000 | Group list count | Unused, filled with 0x00 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0004 | Group list 0 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0044 ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0048 | Group list 1 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0088 ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
... ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
10c0 | Group list 63 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
1100 ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
000000 | Number of channels | Unused filled with 0x00 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
000004 | Channel 0 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
000034 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
000038 | Channel 1 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
000068 ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
... ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
00cfd0 | Channel 1023 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
00d000 ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
00d004 | Channel 0 name, 20 x ASCII, 0-padded ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
00d014 ... ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
00d018 | Channel 1 name, 20 x ASCII, 0-padded ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
00d028 ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
... ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
11ff00 | Channel 1023 name, 20 x ASCII, 0-padded ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
120000 ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
18 changes: 18 additions & 0 deletions doc/code/dr1801uv_grouplistbankelement.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0 7 6 5 4 3 2 1 0
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0000 | Group list count | Unused, filled with 0x00 |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0004 | Group list 0 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0044 ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0048 | Group list 1 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
0088 ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
... ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
10c0 | Group list 63 ...
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
1100 ... |
+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+---+
13 changes: 7 additions & 6 deletions lib/dr1801uv_codeplug.cc
Original file line number Diff line number Diff line change
@@ -597,12 +597,11 @@ DR1801UVCodeplug::ContactBankElement::contact(unsigned int index) const {

bool
DR1801UVCodeplug::ContactBankElement::decode(Context &ctx, const ErrorStack &err) const {
if (0 == contactCount())
return true;

// Get first element in list
unsigned int currentIndex = firstIndex();
while (true) {
ContactElement currentContact = contact(currentIndex);
ContactElement currentContact = contact(currentIndex);

for (int i=0; i<contactCount(); i++) {
DMRContact *obj = currentContact.toContactObj(ctx, err);
if (nullptr == obj) {
errMsg(err) << "Cannot decode contact element at index " << currentIndex;
@@ -612,8 +611,10 @@ DR1801UVCodeplug::ContactBankElement::decode(Context &ctx, const ErrorStack &err
ctx.add(obj, currentIndex);
ctx.config()->contacts()->add(obj);
// continue with successor
if (currentContact.hasSuccessor())
if (currentContact.hasSuccessor()) {
currentIndex = currentContact.successorIndex();
currentContact = contact(currentIndex);
}
}

return true;