Fix tcp-client

This commit is contained in:
Bjoern Kerler 2020-11-14 17:28:32 +01:00
parent 8a466dec40
commit 27efc84c35
4 changed files with 9 additions and 6 deletions

View file

View file

@ -23,7 +23,10 @@ class tcpclient():
if data[0] == "<ACK>":
print(data[1])
else:
print("Error: " + data[1])
if len(data)>1:
print("Error: " + data[1])
else:
print("Unknown error !")
finally:
print("closing socket")
self.sock.close()

View file

@ -6,7 +6,7 @@ class client():
self.commands=[]
def send(self):
self.tcp = tcpclient()
self.tcp = tcpclient(1340)
self.tcp.sendcommands(self.commands)
def read(self,src):
@ -21,10 +21,10 @@ class client():
def main():
exp=client()
exp.commands = [
"peek:0x00780350,0x8,qfp.bin"
"pokehex:0x1402C2CC,1f2003d5",
"send:True,nop",
"peek:0x14084840,0xC00,uart.bin"
#"peek:0x00100000,0x8,qfp.bin"
#"pokehex:0x1402C2CC,1f2003d5",
#"peek:0x14084840,0xC00,uart.bin"
]
exp.send()

View file

@ -40,7 +40,7 @@ or
### Generic
- "./edl.py -h" -> to see help with all options
- "./edl.py server --memory=ufs --tcpport=1340" -> Run TCP/IP server on port 1340, see tcpclient.py for an example client
- "./edl.py server --memory=ufs --tcpport=1340" -> Run TCP/IP server on port 1340, see Example/tcpclient.py for an example client
- "./edl.py xml run.xml" -> To send a xml file run.xml via firehose
- "./edl.py reset" -> To reboot the phone
- "./edl.py rawxml <xmlstring>' -> To send own xml string, example :