This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Is there a way to configure nrfutil to show all the bytes transmitted and received?

When using "nrfutil dfu serial" can it be configured to log all the bytes transmitted and all bytes received in a log file or on the console?

A colleague of mine is starting development on the Master side of the DFU protocol and would like to be able to see this information.

Parents
  • Hi Douglas, 

    have you tried running nrfutil with its verbose option, i.e -vvvv? (The more v's, the higher verbosity).

    Best regards

    Bjørn

  • This is what I get when I try the -vvvv option:

    9:06:33 C:\nordic\nRF5_SDK_15.3.0_59ac345\nRF5SDK153059ac345\nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\ble_app_blinky\pca10056\s140\ses\Output\Release\Exe>nrfutil dfu serial -pkg ble_blinky_app_dfu_package.zip -p COM12 -b 115200 -fc 0 -vvvv
    Usage: nrfutil dfu serial [OPTIONS]
    Try "nrfutil dfu serial --help" for help.

    Error: no such option: -v

  • I apparently have version 5.2.0 but --verbose doesn't work either:

    Even though the help information shows both -v and --verbose as options:

    Usage: nrfutil [OPTIONS] COMMAND [ARGS]...

    Options:
    -v, --verbose Increase verbosity of output. Can be specified
    more than once (up to -v -v -v -v).
    -o, --output <filename> Log output to file
    --help Show this message and exit.

    Commands:
    dfu Perform a Device Firmware Update over serial, BLE, Thread, Zigbee
    or ANT transport given a DFU package (zip file).
    keys Generate and display private and public keys.
    pkg Display or generate a DFU package (zip file).
    settings Generate and display Bootloader DFU settings.
    version Display nrfutil version.
    zigbee Zigbee-related commands and utilities.

  • Try adding the -v -v -v -v right after nrfutil, i.e. 

    nrfutil -v -v -v -v dfu serial -pkg dfu_test.zip -p COMx -b 115200

  • That doesn't throw an error, but it also doesn't show the bytes being sent/received:

    10:00:47 C:\nordic\nRF5_SDK_15.3.0_59ac345\nRF5SDK153059ac345\nRF5_SDK_15.3.0_59ac345\examples\ble_peripheral\ble_app_blinky\pca10056\s140\ses\Output\Release\Exe>nrfutil -v -v -v -v dfu serial -pkg ble_blinky_app_dfu_package.zip -p COM12 -b 115200 -fc 0
    2019-08-09 10:00:48,194 Using board at serial port: COM12
    2019-08-09 10:00:48,194 Sending Application image.
    2019-08-09 10:00:51,709 Serial: Set Packet Receipt Notification 0
    2019-08-09 10:00:51,709 Sending init packet...
    2019-08-09 10:00:51,709 Serial: Selecting Object: type:1
    2019-08-09 10:00:51,709 Serial: Object selected: max_size:512 offset:0 crc:0
    2019-08-09 10:00:51,723 Serial: Streaming Data: len:141 offset:0 crc:0x00000000
    2019-08-09 10:00:51,927 Sending firmware file...
    2019-08-09 10:00:51,927 Serial: Selecting Object: type:2
    2019-08-09 10:00:51,927 Serial: Object selected: max_size:4096 offset:0 crc:0
    2019-08-09 10:00:52,020 Serial: Streaming Data: len:4096 offset:0 crc:0x00000000
    2019-08-09 10:00:52,516 Serial: Streaming Data: len:4096 offset:4096 crc:0xA0E6B9DD
    2019-08-09 10:00:53,013 Serial: Streaming Data: len:4096 offset:8192 crc:0xC10085B8
    2019-08-09 10:00:53,509 Serial: Streaming Data: len:4096 offset:12288 crc:0x64C25F08
    2019-08-09 10:00:54,003 Serial: Streaming Data: len:4096 offset:16384 crc:0xCB18C2BA
    2019-08-09 10:00:54,486 Serial: Streaming Data: len:1884 offset:20480 crc:0x3F1CF308
    2019-08-09 10:00:54,783 Image sent in 3.07499980927s
    Device programmed.

  • Hm, thats weird. I just tested this and this using the following command with nrfutil v5.2.0

    nrfutil -v -v -v -v dfu serial -pkg blinky_mbr.zip -p COM114 -fc 1 -b 115200 -t 10

    and this is the output I got

    2019-08-09 16:15:33,892 Using board at serial port: COM114
    2019-08-09 16:15:33,898 Sending Application image.
    2019-08-09 16:15:37,417 SLIP: --> [9, 1]
    2019-08-09 16:15:37,418 SLIP: <-- [96, 9, 1, 1]
    2019-08-09 16:15:37,418 Serial: Set Packet Receipt Notification 0
    2019-08-09 16:15:37,421 SLIP: --> [2, 0, 0]
    2019-08-09 16:15:37,426 SLIP: <-- [96, 2, 1]
    2019-08-09 16:15:37,427 SLIP: --> [7]
    2019-08-09 16:15:37,431 SLIP: <-- [96, 7, 1, 131, 0]
    2019-08-09 16:15:37,433 Sending init packet...
    2019-08-09 16:15:37,436 Serial: Selecting Object: type:1
    2019-08-09 16:15:37,437 SLIP: --> [6, 1]
    2019-08-09 16:15:37,444 SLIP: <-- [96, 6, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
    2019-08-09 16:15:37,444 Serial: Object selected:  max_size:256 offset:0 crc:0
    2019-08-09 16:15:37,447 SLIP: --> [1, 1, 133, 0, 0, 0]
    2019-08-09 16:15:37,453 SLIP: <-- [96, 1, 1]
    2019-08-09 16:15:37,453 Serial: Streaming Data: len:133 offset:0 crc:0x00000000
    2019-08-09 16:15:37,456 SLIP: --> [8, 18, 130, 1, 10, 60, 8, 1, 18, 56, 8, 1, 16, 52, 26, 1, 0, 32, 0, 40, 0, 48, 0, 56, 212, 13, 66, 36, 8, 3, 18, 32, 241, 73, 93, 46, 211, 51, 110, 251, 23, 19, 113, 229, 151, 255, 229, 31, 118, 239, 249, 206, 165, 200, 16, 194, 12, 188, 185, 139, 37, 120, 21, 53, 72]
    2019-08-09 16:15:37,459 SLIP: --> [8, 1, 16, 0, 26, 64, 220, 22, 22, 36, 176, 180, 97, 113, 30, 163, 75, 96, 108, 12, 163, 154, 79, 113, 33, 77, 145, 246, 212, 7, 222, 109, 99, 54, 45, 79, 82, 112, 69, 184, 106, 97, 27, 170, 114, 177, 89, 8, 21, 118, 55, 156, 57, 52, 55, 239, 106, 104, 249, 78, 41, 97, 57, 119, 49]
    2019-08-09 16:15:37,463 SLIP: --> [8, 165, 134, 31, 32, 231]
    2019-08-09 16:15:37,467 SLIP: --> [3]
    2019-08-09 16:15:37,473 SLIP: <-- [96, 3, 1, 133, 0, 0, 0, 212, 13, 179, 80]
    2019-08-09 16:15:37,474 SLIP: --> [4]
    2019-08-09 16:15:37,647 SLIP: <-- [96, 4, 1]
    2019-08-09 16:15:37,648 Sending firmware file...
    2019-08-09 16:15:37,648 Serial: Selecting Object: type:2
    2019-08-09 16:15:37,651 SLIP: --> [6, 2]
    2019-08-09 16:15:37,657 SLIP: <-- [96, 6, 1, 0, 16, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
    2019-08-09 16:15:37,658 Serial: Object selected:  max_size:4096 offset:0 crc:0
    2019-08-09 16:15:37,661 SLIP: --> [1, 2, 212, 6, 0, 0]
    2019-08-09 16:15:37,671 SLIP: <-- [96, 1, 1]
    2019-08-09 16:15:37,673 Serial: Streaming Data: len:1748 offset:0 crc:0x00000000
    2019-08-09 16:15:37,673 SLIP: --> [8, 16, 32, 0, 32, 21, 18, 0, 0, 29, 18, 0, 0, 31, 18, 0, 0, 33, 18, 0, 0, 35, 18, 0, 0, 37, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 39, 18, 0, 0, 41, 18, 0, 0, 0, 0, 0, 0, 43, 18, 0, 0, 45, 18, 0, 0]
    2019-08-09 16:15:37,677 SLIP: --> [8, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0]
    2019-08-09 16:15:37,680 SLIP: --> [8, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
    2019-08-09 16:15:37,684 SLIP: --> [8, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18, 0, 0, 47, 18,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12, 208, 0, 240, 24, 248, 0, 72, 0, 71, 53, 22, 0, 0, 16, 32, 0, 32, 6, 72, 128, 71, 6, 72, 0, 71, 254, 231, 254, 231, 254, 231, 254, 231, 254, 231, 254, 231, 254, 231, 254, 231, 254, 231, 254, 231, 93, 18, 0, 0, 1, 18, 0, 0, 6, 76, 7, 77, 6, 224, 224, 104]
    2019-08-09 16:15:37,716 SLIP: --> [8, 64, 240, 1, 3, 148, 232, 7, 0, 152, 71, 16, 52, 172, 66, 246, 211, 255, 247, 218, 255, 176, 22, 0, 0, 208, 22, 0, 0, 240, 181, 181, 72, 0, 35, 2, 29, 1, 120, 16, 29, 1, 37, 79, 240, 128, 84, 6, 41, 11, 209, 22, 120, 54, 7, 8, 209, 6, 120, 198, 243, 3, 22, 3, 46]
    2019-08-09 16:15:37,721 SLIP: --> [8, 6, 208, 4, 46, 4, 208, 5, 46, 2, 208, 6, 41, 7, 208, 14, 224, 180, 248, 36, 99, 168, 79, 198, 243, 4, 38, 62, 96, 2, 224, 22, 120, 54, 7, 4, 209, 6, 120, 198, 243, 3, 22, 3, 46, 2, 208, 6, 41, 4, 208, 15, 224, 162, 79, 161, 78, 126, 103, 14, 224, 22, 120, 54, 7]
    2019-08-09 16:15:37,729 SLIP: --> [8, 8, 209, 6, 120, 198, 243, 3, 22, 3, 46, 6, 208, 4, 46, 4, 208, 5, 46, 2, 208, 6, 41, 7, 208, 14, 224, 212, 248, 68, 98, 153, 79, 198, 243, 66, 54, 62, 96, 2, 224, 22, 120, 54, 7, 4, 209, 6, 120, 198, 243, 3, 22, 3, 46, 2, 208, 6, 41, 6, 208, 17, 224, 146, 78]
    2019-08-09 16:15:37,734 SLIP: --> [8, 55, 104, 39, 240, 128, 119, 55, 96, 14, 224, 22, 120, 54, 7, 8, 209, 6, 120, 198, 243, 3, 22, 3, 46, 6, 208, 4, 46, 4, 208, 5, 46, 2, 208, 6, 41, 10, 208, 17, 224, 79, 240, 128, 70, 198, 248, 12, 49, 198, 248, 16, 49, 131, 78, 54, 31, 51, 96, 2, 224, 22, 120, 54, 7]
    2019-08-09 16:15:37,740 SLIP: --> [8, 4, 209, 6, 120, 198, 243, 3, 22, 3, 46, 2, 208, 6, 41, 5, 208, 12, 224, 124, 79, 3, 38, 100, 55, 62, 96, 10, 224, 22, 120, 54, 7, 4, 209, 6, 120, 198, 243, 3, 22, 3, 46, 2, 208, 6, 41, 13, 208, 20, 224, 118, 79, 5, 38, 62, 96, 116, 78, 120, 54, 53, 96, 115, 78]
    2019-08-09 16:15:37,746 SLIP: --> [8, 8, 54, 51, 96, 63, 38, 63, 29, 62, 96, 2, 224, 22, 120, 54, 7, 4, 209, 6, 120, 198, 243, 3, 22, 5, 46, 2, 208, 6, 41, 87, 208, 98, 224, 107, 78, 54, 104, 107, 79, 62, 96, 105, 78, 54, 29, 54, 104, 63, 29, 62, 96, 102, 78, 8, 54, 54, 104, 63, 29, 62, 96, 100, 78]
    2019-08-09 16:15:37,753 SLIP: --> [8, 12, 54, 54, 104, 63, 29, 62, 96, 97, 78, 16, 54, 54, 104, 63, 29, 62, 96, 95, 78, 20, 54, 54, 104, 63, 29, 62, 96, 92, 78, 24, 54, 54, 104, 92, 79, 32, 55, 62, 96, 89, 78, 28, 54, 54, 104, 63, 29, 62, 96, 87, 78, 32, 54, 54, 104, 63, 29, 62, 96, 84, 78, 36, 54]
    2019-08-09 16:15:37,760 SLIP: --> [8, 54, 104, 63, 29, 62, 96, 82, 78, 40, 54, 54, 104, 63, 29, 62, 96, 79, 78, 44, 54, 54, 104, 63, 29, 62, 96, 77, 78, 48, 54, 54, 104, 76, 79, 64, 55, 62, 96, 74, 78, 52, 54, 54, 104, 63, 29, 62, 96, 71, 78, 56, 54, 54, 104, 63, 29, 62, 96, 69, 78, 60, 54, 54, 104]
    2019-08-09 16:15:37,766 SLIP: --> [8, 63, 29, 62, 96, 66, 78, 64, 54, 54, 104, 63, 29, 62, 96, 2, 224, 22, 120, 54, 7, 8, 209, 6, 120, 198, 243, 3, 22, 3, 46, 6, 208, 4, 46, 4, 208, 5, 46, 2, 208, 6, 41, 7, 208, 25, 224, 212, 248, 88, 18, 57, 74, 1, 240, 79, 1, 17, 96, 2, 224, 17, 120, 9, 7]
    2019-08-09 16:15:37,773 SLIP: --> [8, 15, 209, 0, 120, 192, 243, 3, 16, 3, 40, 3, 208, 4, 40, 1, 208, 5, 40, 6, 209, 49, 72, 1, 104, 201, 7, 2, 208, 111, 240, 1, 1, 1, 96, 212, 248, 48, 1, 6, 40, 8, 209, 212, 248, 52, 1, 6, 40, 4, 209, 43, 72, 1, 104, 65, 244, 128, 97, 1, 96, 34, 72, 116, 56]
    2019-08-09 16:15:37,779 SLIP: --> [8, 1, 104, 65, 244, 112, 1, 1, 96, 191, 243, 79, 143, 191, 243, 111, 143, 79, 240, 16, 33, 209, 248, 0, 2, 0, 40, 3, 219, 209, 248, 4, 2, 0, 40, 34, 218, 31, 74, 21, 96, 31, 72, 4, 104, 0, 44, 252, 208, 21, 36, 193, 248, 0, 66, 5, 104, 0, 45, 252, 208, 193, 248, 4, 66]
    2019-08-09 16:15:37,785 SLIP: --> [8, 1, 104, 0, 41, 252, 208, 19, 96, 1, 104, 0, 41, 252, 208, 191, 243, 79, 143, 13, 72, 240, 56, 1, 104, 20, 74, 1, 244, 224, 97, 17, 67, 1, 96, 191, 243, 79, 143, 0, 191, 253, 231, 18, 73, 16, 72, 8, 96, 240, 189, 0, 0, 224, 15, 0, 240, 64, 53, 1, 64, 13, 240, 173, 186]
    2019-08-09 16:15:37,792 SLIP: --> [8, 0, 192, 7, 64, 60, 5, 0, 64, 252, 237, 0, 224, 16, 86, 0, 64, 4, 4, 0, 16, 32, 197, 0, 64, 228, 14, 0, 64, 0, 4, 0, 64, 60, 23, 0, 64, 4, 229, 1, 64, 0, 228, 1, 64, 4, 0, 250, 5, 0, 144, 208, 3, 8, 0, 0, 32, 2, 224, 8, 200, 18, 31, 8, 193]
    2019-08-09 16:15:37,798 SLIP: --> [8, 0, 42, 250, 209, 112, 71, 112, 71, 0, 32, 1, 224, 1, 193, 18, 31, 0, 42, 251, 209, 112, 71, 0, 0, 45, 233, 252, 65, 6, 70, 192, 7, 79, 240, 0, 5, 14, 208, 16, 79, 0, 36, 1, 34, 56, 93, 0, 149, 0, 35, 17, 70, 1, 149, 0, 240, 85, 248, 100, 28, 4, 44, 244, 211]
    2019-08-09 16:15:37,803 SLIP: --> [8, 0, 240, 46, 248, 176, 7, 13, 213, 7, 78, 0, 36, 54, 29, 0, 34, 48, 93, 3, 35, 0, 149, 17, 70, 1, 149, 0, 240, 67, 248, 100, 28, 4, 44, 244, 211, 189, 232, 252, 129, 166, 22, 0, 0, 7, 73, 11, 92, 79, 240, 160, 65, 209, 248, 4, 37, 1, 32, 152, 64, 32, 234, 2, 3]
    2019-08-09 16:15:37,811 SLIP: --> [8, 193, 248, 8, 53, 16, 64, 193, 248, 12, 5, 112, 71, 166, 22, 0, 0, 2, 73, 8, 92, 1, 33, 0, 240, 55, 184, 0, 0, 166, 22, 0, 0, 16, 181, 0, 36, 32, 70, 255, 247, 243, 255, 100, 28, 4, 44, 249, 211, 16, 189, 0, 0, 1, 32, 255, 247, 175, 255, 9, 76, 79, 244, 250, 120]
    2019-08-09 16:15:37,816 SLIP: --> [8, 79, 244, 122, 71, 0, 38, 48, 70, 255, 247, 208, 255, 69, 70, 97, 28, 56, 70, 136, 71, 109, 30, 250, 209, 118, 28, 4, 46, 243, 219, 241, 231, 160, 22, 0, 0, 112, 181, 65, 234, 66, 1, 221, 233, 4, 86, 79, 240, 160, 68, 65, 234, 131, 1, 65, 234, 5, 33, 4, 235, 128, 0, 65, 234]
    2019-08-09 16:15:37,822 SLIP: --> [8, 6, 65, 192, 248, 0, 23, 112, 189, 1, 34, 79, 240, 160, 67, 130, 64, 17, 177, 195, 248, 8, 37, 112, 71, 195, 248, 12, 37, 112, 71, 0, 0, 3, 56, 253, 216, 112, 71, 17, 18, 19, 20, 13, 14, 15, 16, 0, 0, 208, 22, 0, 0, 8, 0, 0, 32, 4, 0, 0, 0, 120, 21, 0, 0]
    2019-08-09 16:15:37,829 SLIP: --> [8, 212, 22, 0, 0, 12, 0, 0, 32, 4, 32, 0, 0, 136, 21, 0, 0, 0, 144, 208, 3]
    2019-08-09 16:15:37,835 SLIP: --> [3]
    2019-08-09 16:15:37,851 SLIP: <-- [96, 3, 1, 212, 6, 0, 0, 252, 119, 15, 190]
    2019-08-09 16:15:37,851 SLIP: --> [4]
    2019-08-09 16:15:37,862 SLIP: <-- [96, 4, 1]
    2019-08-09 16:15:37,864 Image sent in 0.430999994278s
    

    I dont know why you're not getting the slip data. 

    Best regards

    Bjørn

  • On another support case I submitted I was recently asked to add "logger.setLevel(logging.DEBUG)" to C:\Python27\Lib\site-packages\nordicsemi\dfu\dfu_transport_serial.py

    I tried removing that (putting it back to the original state) and now I get SLIP information like you show.

    Thanks for your help

Reply Children
No Data
Related