Project

General

Profile

Bug #4591 » FT7100-debug_magic_bytes.txt

magic bytes and diff - Jesse Jarrell, 04/19/2023 09:02 PM

 
1
[2023-04-19 21:39:04,036] chirp.drivers.ft7100 - DEBUG: Magic 16-byte chunk:
2
000: ee ff 03 00 0e 0f 0e 0f   ........
3
008: 00 00 00 00 00 02 00 00   ........
4

    
5
=====================================================================
6

    
7

    
8
[2023-04-19 22:21:15,389] chirp.wxui.clone - DEBUG: Showing pre_upload prompt
9
[2023-04-19 22:21:22,889] chirp.wxui.clone - DEBUG: Setting flag for prompt pre_upload
10
[2023-04-19 22:21:22,889] chirp.wxui.clone - DEBUG: Opening serial 'COM7' after upload prompt
11
[2023-04-19 22:21:22,902] chirp.wxui.clone - DEBUG: Serial opened: Serial<id=0x1467d99a650, open=True>(port='COM7', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=0.25, xonxoff=False, rtscts=False, dsrdtr=False) (rts=True dtr=True)
12
[2023-04-19 22:21:25,769] chirp.wxui.clone - ERROR: Failed to clone: Failed to communicate with radio: Failed to read ACK. No response from radio.
13
Traceback (most recent call last):
14
  File "c:\Users\jjarrell\Documents\chirp\chirp\drivers\ft7100.py", line 584, in sync_out
15
    _upload(self)
16
  File "c:\Users\jjarrell\Documents\chirp\chirp\drivers\ft7100.py", line 140, in _upload
17
    _wait_for_ack(radio.pipe)
18
  File "c:\Users\jjarrell\Documents\chirp\chirp\drivers\ft7100.py", line 66, in _wait_for_ack
19
    raise Exception("Failed to read ACK. No response from radio.")
20
Exception: Failed to read ACK. No response from radio.
21

    
22
During handling of the above exception, another exception occurred:
23

    
24
Traceback (most recent call last):
25
  File "c:\Users\jjarrell\Documents\chirp\chirp\wxui\clone.py", line 66, in run
26
    self._fn()
27
  File "c:\Users\jjarrell\Documents\chirp\chirp\drivers\ft7100.py", line 588, in sync_out
28
    raise errors.RadioError("Failed to communicate with radio: %s" % e)
29
chirp.errors.RadioError: Failed to communicate with radio: Failed to read ACK. No response from radio.
30

    
31
=====================================================================
32

    
33
diff --git a/chirp/drivers/ft7100.py b/chirp/drivers/ft7100.py
34
index b5f61695..5061e927 100644
35
--- a/chirp/drivers/ft7100.py
36
+++ b/chirp/drivers/ft7100.py
37
@@ -42,7 +42,7 @@ def _send(pipe, data):
38
         pipe.write(bytes([ch]))
39
         time.sleep(0.0012)  # 0.0011 is to short. No ACK after a few packets
40
     echo = pipe.read(len(data))
41
-    if data == b"":
42
+    if echo == b"":
43
         raise Exception("Failed to read echo."
44
                         " Maybe serial hardware not connected."
45
                         " Maybe radio not powered or not in receiving mode.")
46
@@ -135,7 +135,7 @@ def _upload(radio):
47

    
48
     # write 16 Byte block
49
     # If there should be a problem, see remarks in _download(radio)
50
-    _send(radio.pipe, b"\xEE\x77\x01\x00\x0E\x07\x0E\x07"
51
+    _send(radio.pipe, b"\xEE\xFF\x03\x00\x0E\x0F\x0E\x0F"
52
                       b"\x00\x00\x00\x00\x00\x02\x00\x00")
53
     _wait_for_ack(radio.pipe)
54

    
(19-19/20)