nicsure

Untitled

Jun 14th, 2025 (edited)
408
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.93 KB | None | 0 0
  1. The RT-900 uses a baud rate of 57600, No Parity, 8 data bits, 1 stop bit. Version 4.00.22 or later
  2. The TD-H3 uses a baud rate of 38400, No Parity, 8 data bits, 1 stop bit. Version 2.52.17 or later
  3.  
  4.  
  5. To request the status of the currently active VFO, send the following two bytes to the radio:
  6. 0xAA 0x60
  7.  
  8. The radio will respond with the following 37 byte packet, the format of this packet is slightly different for the RT-900 and the TD-H3, notably, the TD-H3 endianness is BIG while the RT-900 is LITTLE.
  9.  
  10.  
  11. RT-900 VFO Status Packet
  12. ------------------------
  13. u8 signature; // (always 0xAA)
  14. u8 packetType; // 0x60 (squelch closed) or 0x61 (squelch open)
  15. U32 rxFreq; // (32 bit little endian 10 Hz units)
  16. U32 txFreq; // (as above)
  17. U16 rxSubTone; // little endian (<0x8000=CTCSS <0xC000=DCS >=0xC000=InvertedDCS
  18. // essentially bit 15 is the flag for DCS, bit 14 is the flag for code inversion)
  19. // the actual code is bits 13 to 0
  20. U16 txSubTone; // (as above)
  21. u8 txPower; // (0-6) 0=no transmit allowed, 1=ZERO output (no PA engaged), 2=Very Low, 3=Low, 4=Mid, 5=High, 6=Very High
  22. u8 unused;
  23. union __attribute__((packed))
  24. {
  25. u16 value; // (group nibbles: 0=No Group, 1=Group A, 2=Group B, 3=Group C, etc..) will be all 0 in VFO mode
  26. struct __attribute__((packed))
  27. {
  28. u16 g0 : 4;
  29. u16 g1 : 4;
  30. u16 g2 : 4;
  31. u16 g3 : 4;
  32. } single;
  33. } groups;
  34. struct __attribute__((packed))
  35. {
  36. u8 bandwidth : 1; // 0=wide 1=narrow
  37. u8 modulation : 2; // 0=auto, 1=fm, 2=am, 3=usb
  38. u8 position : 1; // 0=VFO-A, 1=VFO-B
  39. u8 pttID : 2; // 0 = off, 1=BoT, 2=EoT, 3=Both
  40. u8 reversed : 1;
  41. u8 busyLock : 1; // 0=off, 1=on
  42. } bits;
  43. s8 clarifier; // 100 Hz Units (signed) Frequency adjustment
  44. char reserved[2];
  45. char channelName[12]; // empty if in VFO mode (ASCII)
  46. u16 rssi; // signal level (0x0000 to 0x01FF) (little endian)
  47. u8 exNoise; // noise level (0x00 to 0x7F)
  48.  
  49. TD-H3 VFO Status Packet (Differences from the RT-900 shown as comments)
  50. -----------------------------------------------------------------------
  51. u8 signature;
  52. u8 packetType;
  53. U32 rxFreq; // (32 bit big endian 10 Hz units)
  54. U32 txFreq; // as above
  55. U16 rxSubTone; // big endian (<0x8000=CTCSS <0xC000=DCS >=0xC000=InvertedDCS
  56. U16 txSubTone; // as above
  57. u8 txPower; // 0 - 255
  58. union
  59. {
  60. u16 value;
  61. struct
  62. {
  63. u16 g0 : 4;
  64. u16 g1 : 4;
  65. u16 g2 : 4;
  66. u16 g3 : 4;
  67. } single;
  68. } groups;
  69. struct
  70. {
  71. u8 bandwidth : 1;
  72. u8 modulation : 2;
  73. u8 position : 1;
  74. u8 pttID : 2;
  75. u8 reversed : 1;
  76. u8 busyLock : 1;
  77. } bits;
  78. char reserved[4];
  79. char name[12];
  80. u16 rssi; // signal level (0x0000 to 0x01FF) (big endian)
  81. u8 exNoise;
  82.  
Advertisement
Add Comment
Please, Sign In to add comment