Update help text and readme
authorJoseph C. Lehner <joseph.c.lehner@gmail.com>
Mon, 2 Mar 2020 08:41:56 +0000 (09:41 +0100)
committerJoseph C. Lehner <joseph.c.lehner@gmail.com>
Mon, 2 Mar 2020 08:41:56 +0000 (09:41 +0100)
README.md
main.c

index ee9e5166aa6d9de511cee77cdcc261e69352831f..639bde1f6972d1fe954bf1d25b57ff788837914f 100644 (file)
--- a/README.md
+++ b/README.md
@@ -13,16 +13,17 @@ Prebuilt binaries for Linux, ~OS X~ macOS and Windows are available
 ```
 Usage: nmrpflash [OPTIONS...]
 
-Options (-i and -f and/or -c are mandatory):
+Options (-i, and -f or -c are mandatory):
  -a <ipaddr>     IP address to assign to target device
- -A <ipaddr>     IP address to assign to interface
+ -A <ipaddr>     IP address to assign to selected interface
+ -B              Blind mode (don't wait for response packets)
  -c <command>    Command to run before (or instead of) TFTP upload
  -f <firmware>   Firmware file
  -F <filename>   Remote filename to use during TFTP upload
  -i <interface>  Network interface directly connected to device
  -m <mac>        MAC address of target device (xx:xx:xx:xx:xx:xx)
  -M <netmask>    Subnet mask to assign to target device
- -t <timeout>    Timeout (in milliseconds) for regular messages
+ -t <timeout>    Timeout (in milliseconds) for NMRP packets
  -T <timeout>    Time (seconds) to wait after successfull TFTP upload
  -p <port>       Port to use for TFTP upload
  -R <region>     Set device region (NA, WW, GR, PR, RU, BZ, IN, KO, JP)
@@ -93,9 +94,18 @@ C:\> net start npf
 
 ###### "No response after 60 seconds. Bailing out."
 
-The router did not respond. Try rebooting the device and run `nmrpflash` again.
-You could also try running `nmrpflash` with `-m` and specify your router's
-MAC address. It's also possible that your device does not support the NMRP protocol.
+The router did not respond. Always run `nmrpflash` in the following
+manner:
+
+* Turn off the router.
+* Run `nmrpflash`.
+* Turn on the router.
+
+If that still doesn't work, you can try "blind mode", which can be
+invoked using `-B`. Note that you also have to specify your router's
+mac address using `-m xx:xx:xx:xx:xx:xx`.
+
+It's also possible that your device does not support the NMRP protocol.
 
 ###### "Timeout while waiting for ACK(0)/OACK."
 
diff --git a/main.c b/main.c
index 58afc56a167cc28670a74aa804219fce3eb75592..cd1a81bbb766a786fe98ac60547daa8949897b98 100644 (file)
--- a/main.c
+++ b/main.c
@@ -30,9 +30,9 @@ void usage(FILE *fp)
        fprintf(fp,
                        "Usage: nmrpflash [OPTIONS...]\n"
                        "\n"
-                       "Options (-i, -f and/or -c are mandatory):\n"
+                       "Options (-i, and -f or -c are mandatory):\n"
                        " -a <ipaddr>     IP address to assign to target device\n"
-                       " -A <ipaddr>     IP address to assign to seleted interface\n"
+                       " -A <ipaddr>     IP address to assign to selected interface\n"
                        " -B              Blind mode (don't wait for response packets)\n"
                        " -c <command>    Command to run before (or instead of) TFTP upload\n"
                        " -f <firmware>   Firmware file\n"