Temat: AVM FRITZ!Repeater 1200 eva_ramboot.py odrzuca polaczenie
Czesc,
Staram sie wgrac OpenWrt do AVM 1200.
Ustawilem IP:
router: 192.168.178.1
PC: 192.168.178.10
pod windows w cmd wydaje komende:
eva_ramboot.py 192.168.178.1 uboot-fritz1200.bin
plik eva_ramboot wyglada tak:
#!/usr/bin/python
from ftplib import FTP
from sys import argv
from os import stat
assert len(argv) == 3
ip = argv[1]
image = argv[2]
size = stat(image).st_size
# arbitrary size limit, to prevent the address calculations from overflows etc.
assert size < 0x2000000
# We need to align the address. A page boundary seems to be sufficient on 7362sl
# and 7412
addr = ((0x8000000 - size) & ~0xfff)
haddr = 0x80000000 + addr
img = open(image, "rb")
ftp = FTP(ip, 'adam2', 'adam2')
def adam(cmd):
print("> %s"%(cmd))
resp = ftp.sendcmd(cmd)
print("< %s"%(resp))
assert resp[0:3] == "200"
ftp.set_pasv(True)
# The following parameters allow booting the avm recovery system with this
# script.
adam('SETENV memsize 0x%08x'%(addr))
adam('SETENV kernel_args_tmp mtdram1=0x%08x,0x88000000'%(haddr))
adam('MEDIA SDRAM')
ftp.storbinary('STOR 0x%08x 0x88000000'%(haddr), img)
img.close()
ftp.close()Jednak dostaje taki komunikat:
C:\openwrt> eva_ramboot2.py 192.168.178.1 uboot-fritz1200.bin
Traceback (most recent call last):
File "C:\openwrt\eva_ramboot2.py", line 38, in <module>
ftp = FTP(ip, 'adam2', 'adam2')
File "C:\Python38\lib\ftplib.py", line 117, in __init__
self.connect(host)
File "C:\Python38\lib\ftplib.py", line 152, in connect
self.sock = socket.create_connection((self.host, self.port), self.timeout,
File "C:\Python38\lib\socket.py", line 808, in create_connection
raise err
File "C:\Python38\lib\socket.py", line 796, in create_connection
sock.connect(sa)
ConnectionRefusedError: [WinError 10061] Nie można nawiązać połączenia, ponieważ komputer docelowy aktywnie go odmawia
Czy mozecie podowiedziec co moze byc przyczyna?, bo ping z routerem jest.
Pozdrawiam