Giter Site home page Giter Site logo

Cannot flash R6220 about nmrpflash HOT 16 CLOSED

jclehner avatar jclehner commented on September 12, 2024
Cannot flash R6220

from nmrpflash.

Comments (16)

emersion avatar emersion commented on September 12, 2024 3

Okay, that fixed it! Commands I used:

systemctl stop NetworkManager
ip addr add 192.168.1.2/24 dev enp0s25
ip route add 192.168.1.1 dev enp0s25
ip link set enp0s25 up
arp -s 192.168.1.1 40:5d:82:dd:61:60
./nmrpflash -vvv -i enp0s25 -a 192.168.1.1 -m 40:5d:82:dd:61:60 -F firmware -f ~/Downloads/R6220_FW_V1.1.0.34_1.0.1/R6220_V1.1.0.34_1.0.1.img

Thanks a lot, you saved my day! :D

from nmrpflash.

jclehner avatar jclehner commented on September 12, 2024

How did you connect the router to the device running nmrpflash?

from nmrpflash.

emersion avatar emersion commented on September 12, 2024

Via ethernet. Tried both:

  • Directly to one of the router's LAN port
  • Using another router between R6220 and my computer

Same result for these two configurations.

from nmrpflash.

jclehner avatar jclehner commented on September 12, 2024

Please try using the -a option to manually assign an ip address from the same subnet as enp0s25. Did you build nmrpflash youself, from the current master branch?

from nmrpflash.

emersion avatar emersion commented on September 12, 2024

Tried with -a:

sudo ./nmrpflash -vvv -i enp0s25 -a 192.168.1.201 -f ../R6220_FW_V1.1.0.34_1.0.1/R6220_V1.1.0.34_1.0.1.img 
Advertising NMRP server on enp0s25 ... /
Received configuration request from 40:5d:82:dd:61:60.
Sending configuration: 192.168.1.201, netmask 255.255.255.0.
Received upload request with empty filename.
Using remote filename '../R6220_FW_V1.1.0.34_1.0.1/R6220_V1.1.0.34_1.0.1.img'.
Uploading R6220_V1.1.0.34_1.0.1.img ... << WRQ(R6220_V1.1.0.34_1.0.1.img, octet)
<< WRQ(R6220_V1.1.0.34_1.0.1.img, octet)
<< WRQ(R6220_V1.1.0.34_1.0.1.img, octet)
<< WRQ(R6220_V1.1.0.34_1.0.1.img, octet)
<< WRQ(R6220_V1.1.0.34_1.0.1.img, octet)
<< WRQ(R6220_V1.1.0.34_1.0.1.img, octet)
<< WRQ(R6220_V1.1.0.34_1.0.1.img, octet)
<< WRQ(R6220_V1.1.0.34_1.0.1.img, octet)
<< WRQ(R6220_V1.1.0.34_1.0.1.img, octet)
Timeout while waiting for ACK(0)/OACK.

from nmrpflash.

emersion avatar emersion commented on September 12, 2024

Tried to build from source, same result.

from nmrpflash.

jclehner avatar jclehner commented on September 12, 2024

Strange... please try -F firmware.

from nmrpflash.

emersion avatar emersion commented on September 12, 2024

Nothing changed :(

sudo ./nmrpflash -vvv -i enp0s25 -a 192.168.1.201 -F firmware -f ~/Downloads/R6220_FW_V1.1.0.34_1.0.1/R6220_V1.1.0.34_1.0.1.img  
Advertising NMRP server on enp0s25 ... \
Received configuration request from 40:5d:82:dd:61:60.
Sending configuration: 192.168.1.201, netmask 255.255.255.0.
Using remote filename 'firmware'.
Uploading R6220_V1.1.0.34_1.0.1.img ... << WRQ(firmware, octet)
<< WRQ(firmware, octet)
<< WRQ(firmware, octet)
<< WRQ(firmware, octet)
<< WRQ(firmware, octet)
<< WRQ(firmware, octet)
<< WRQ(firmware, octet)
<< WRQ(firmware, octet)
<< WRQ(firmware, octet)
Timeout while waiting for ACK(0)/OACK.

from nmrpflash.

jclehner avatar jclehner commented on September 12, 2024

What's the output of ifconfig enp0s25?

from nmrpflash.

jclehner avatar jclehner commented on September 12, 2024

Judging from the logs that @hqqv posted, he used -a 192.168.1.1. Try that, in case this ip is hardcoded into the bootloader.

from nmrpflash.

emersion avatar emersion commented on September 12, 2024

Argh, still failing...

Output of ip {addr,link,route} is below too.

simon@kurisu ~/p/nmrpflash (master)> sudo ./nmrpflash -vvv -i enp0s25 -a 192.168.1.1 -F firmware -f ~/Downloads/R6220_FW_V1.1.0.34_1.0.1/R6220_V1.1.0.34_1.0.1.img  
Advertising NMRP server on enp0s25 ... |
Received configuration request from 40:5d:82:dd:61:60.
Sending configuration: 192.168.1.1, netmask 255.255.255.0.
Using remote filename 'firmware'.
Uploading R6220_V1.1.0.34_1.0.1.img ... << WRQ(firmware, octet)
<< WRQ(firmware, octet)
<< WRQ(firmware, octet)
<< WRQ(firmware, octet)
<< WRQ(firmware, octet)
<< WRQ(firmware, octet)
<< WRQ(firmware, octet)
<< WRQ(firmware, octet)
<< WRQ(firmware, octet)
Timeout while waiting for ACK(0)/OACK.
simon@kurisu ~/p/nmrpflash (master) [255]> ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 00:21:cc:c5:16:5a brd ff:ff:ff:ff:ff:ff
3: wlp3s0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
    link/ether 2e:92:f8:99:51:8c brd ff:ff:ff:ff:ff:ff
simon@kurisu ~/p/nmrpflash (master)> ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp0s25: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
    link/ether 00:21:cc:c5:16:5a brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.2/24 brd 192.168.1.255 scope global enp0s25
       valid_lft forever preferred_lft forever
    inet6 fe80::bb99:9a4:126a:5c72/64 scope link 
       valid_lft forever preferred_lft forever
3: wlp3s0: <BROADCAST,MULTICAST> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 2e:92:f8:99:51:8c brd ff:ff:ff:ff:ff:ff
simon@kurisu ~/p/nmrpflash (master)> ip route
default via 192.168.1.1 dev enp0s25 proto static metric 100 
192.168.1.0/24 dev enp0s25 proto kernel scope link src 192.168.1.2 metric 100

from nmrpflash.

jclehner avatar jclehner commented on September 12, 2024

Please generate a packet dump of the whole transaction using tcpdump -i enp0s25 -w nmrp.pcap, and send me the resulting nmrp.pcap file.

from nmrpflash.

emersion avatar emersion commented on September 12, 2024

Here it is:

https://fs.emersion.fr/protected/misc/nmrp.pcap

from nmrpflash.

emersion avatar emersion commented on September 12, 2024

Here is another one captured with -m:

https://fs.emersion.fr/protected/misc/nmrp-mac.pcap

sudo ./nmrpflash -vvv -i enp0s25 -a 192.168.1.1 -m 40:5d:82:dd:61:60 -F firmware -f ~/Downloads/R6220_FW_V1.1.0.34_1.0.1/R6220_V1.1.0.34_1.0.1.img  
Advertising NMRP server on enp0s25 ... /
Received configuration request from 40:5d:82:dd:61:60.
Sending configuration: 192.168.1.1, netmask 255.255.255.0.
Using remote filename 'firmware'.
Uploading R6220_V1.1.0.34_1.0.1.img ... << WRQ(firmware, octet)
<< WRQ(firmware, octet)
<< WRQ(firmware, octet)
<< WRQ(firmware, octet)
<< WRQ(firmware, octet)
<< WRQ(firmware, octet)
<< WRQ(firmware, octet)
<< WRQ(firmware, octet)
<< WRQ(firmware, octet)
Timeout while waiting for ACK(0)/OACK.

from nmrpflash.

jclehner avatar jclehner commented on September 12, 2024

Does anything change if you run arp -s 192.168.1.1 40:5d:82:dd:61:60 before running nmrpflash?

from nmrpflash.

jclehner avatar jclehner commented on September 12, 2024

Thanks for reporting this, will fix this issue in the next release.

from nmrpflash.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.