g4klx / MMDVMHost

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

POCSAG message in Nextion display #785

Closed m0vva closed 10 months ago

m0vva commented 11 months ago

I have found that only "func Numeric" messages are displayed in a Nextion display, all the "func Alphanumeric" do not appear. Is this by design or should they appear in the Nextion display when received?

I have extended the t1 field in the Nextion Editor to allow 80 characters, as I thought the 10 character definition was too short - but still no alphanumeric messages appear.

This is log output shows a message that is correctly displayed:

D: 2023-12-05 12:12:09.611 POCSAG Network Data Received
D: 2023-12-05 12:12:09.611 0000:  50 4F 43 53 41 47 00 09 C8 00 31 32 31 32 30 30    *POCSAG....121200*
D: 2023-12-05 12:12:09.611 0010:  20 20 20 30 35 31 32 32 33                         *   051223*
D: 2023-12-05 12:12:09.611 Message to 0002504, func Numeric: "121200   051223"
D: 2023-12-05 12:12:09.712 Data to MMDVM
D: 2023-12-05 12:12:09.712 0000:  7C D2 15 D8 00 27 25 37 C2 42 01 B1 81 99 86 A4    *|....'%7.B......*
D: 2023-12-05 12:12:09.712 0010:  D4 22 64 2C 7A 89 C1 97 7A 89 C1 97 7A 89 C1 97    *."d,z...z...z...*
D: 2023-12-05 12:12:09.712 0020:  7A 89 C1 97 7A 89 C1 97 7A 89 C1 97 7A 89 C1 97    *z...z...z...z...*
D: 2023-12-05 12:12:09.712 0030:  7A 89 C1 97 7A 89 C1 97 7A 89 C1 97 7A 89 C1 97    *z...z...z...z...*
D: 2023-12-05 12:12:09.713 0040:  7A 89 C1 97                                        *z...*
M: 2023-12-05 12:12:09.713 POCSAG, transmitted 1 frame(s) of data from 1 message(s)

This log output does not get displayed:

D: 2023-12-05 12:14:17.603 POCSAG Network Data Received
D: 2023-12-05 12:14:17.603 0000:  50 4F 43 53 41 47 05 38 F5 03 74 65 73 74 20 6D    *POCSAG.8..test m*
D: 2023-12-05 12:14:17.603 0010:  65 73 73 61 67 65                                  *essage*
D: 2023-12-05 12:14:17.608 Message to 0342261, func Alphanumeric: "test message"
D: 2023-12-05 12:14:17.709 Data to MMDVM
D: 2023-12-05 12:14:17.709 0000:  7C D2 15 D8 7A 89 C1 97 7A 89 C1 97 7A 89 C1 97    *|...z...z...z...*
D: 2023-12-05 12:14:17.709 0010:  7A 89 C1 97 7A 89 C1 97 7A 89 C1 97 7A 89 C1 97    *z...z...z...z...*
D: 2023-12-05 12:14:17.709 0020:  7A 89 C1 97 7A 89 C1 97 7A 89 C1 97 14 E3 DB 32    *z...z...z......2*
D: 2023-12-05 12:14:17.709 0030:  97 A7 9B 51 CB 82 B4 3B F4 F3 E2 E3 F8 7C E8 50    *...Q...;.....|.P*
D: 2023-12-05 12:14:17.709 0040:  98 00 03 2F  
m0vva commented 10 months ago

After some further investigation, I notice that the Alphanumeric message is wrapped in quotes but the received message from the network already has quotes. This double quoted string of text appears to break the NextionDisplay - which ignores the message. By modifying line 237 of POCSAGControl.cpp to remove the escaped quotation marks, the inbound POCSAG messages now appear as expected in the NextionDisplay. I have yet to see if this breaks anything else - further testing will continue.