这是本文档旧的修订版!
目录
使用泉盛UV-K6定制固件
这是我特意送给大家五五节的节日礼物,DTrac APP 新增了对泉盛UV-K5/K6的支持,现在可以通过APP操控UV-K5/K6实时同步卫星转发器参数,方便业余卫星通联操作。
实现功能
仅需使用APP连接对讲机,抛弃繁琐全搞定,业余卫星通联操作更智能,实现以下功能:
- 自动获取位置;
- 自动更新星历;
- 成熟算法预测;
- 实时同步卫星多普勒频率;
- 实时同步通联模式参数;
- 实时同步发射亚音参数;
- 卫星入境时自动关闭静噪,离境后自动开启静噪;
注:由于泉盛UV-K5/K6硬件限制,除FM外的模式仅对接收信道有效。
硬件改造
泉盛UV-K5/K6系列电台虽然自带串口,可以基于外接网络转串口的方式来实现对接,但总是不太方便,最好的方法是在电台内部加上蓝牙串口组件,一劳永逸。
- 修改蓝牙模块名称如:UV-K6;
- 修改波特率为38400;
- 拆机(自行搜索网上教程);
- 然后根据蓝牙模块的引脚定义参考下图位置接线
- TXD 接 RXD
- RXD 接 TXD
- 3.3V 接 3V3
- GND 接 GND
- 用热缩管将模块包裹,放在合适位置即可。
定制固件
定制的固件在egzumer最新固件上轻微修改,完整保留了原功能。注: egzumer固件使用Apache-2.0协议
刷机方法
刷机方法简介:线刷和蓝牙无线刷机的方法都是一样的,长按PTT键开机,使用泉盛官方自带的固件更新软件,选择正确的端口,连接电台,选择固件,点击更新即可。固件升级详细操作步骤请见官方升级固件程序和说明文档。
下载地址
对讲机设置
APP设置
演示视频
隐藏校准菜单
进入固件隐藏校准菜单的方法如下:先按住“PTT”键和“按钮1”,然后打开对讲机,接着松开所有按键,即可进入隐藏菜单。进入后,找到与电池校准相关的选项,如“BatCal”,即可进行电压校准等操作。
相关协议
Protocol for UV-K6
The programming protocol used by this software has been reverse engineered by observing communications between the radio and the original programming software. It is not a variation of the typical Baofeng-like protocol.
The format of the datagram sent to the radio is:
0xAB 0xCD len 0x00 <data bytes> <2 bytes CRC> 0xDC 0xBA
The length is the length of the data bytes.
The data is protected by a typical CRC-16 xmodem algorithm. The data bytes and the CRC are obfuscated by xor-in it with an 8-byte sequence.
Fortunately the EEPROM data contains a lot of 0xFF and 0x00 bytes, so the XOR sequence is easy to find by observing the traffic.
The datagram sent from the radio is the same, but the CRC field is set to 0xFFFF. This shows that the CRC is not for data integrity, but for further obfuscation (same as the XOR).
I intend to publish a further description of the protocol, and the EEPROM contents, meanwhile the sources can be used as documentation.
Data for DTrac APP
for DTrac app CTCSS_CODE typedef struct { Header_t Header; uint8_t CTCSS_CODE; } CMD_9999_t; for DTrac app downFreq typedef struct {
Header_t Header; uint32_t DownFrequency;
} CMD_8888_t;
for DTrac app upFreq typedef struct { Header_t Header; uint32_t UpFrequency; } CMD_7777_t; for DTrac app mode typedef struct {
Header_t Header; char Mode;
} CMD_6666_t;
for DTrac app MonitorStatus typedef struct { Header_t Header; char MonitorStatus; } CMD_5555_t;





