This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CCS/UNIFLASH: UNIFLASH got an error "ERR_CONNECTION_REFUSED" when loading the image.

Part Number: UNIFLASH
Other Parts Discussed in Thread: IWR6843ISK, MMWAVEICBOOST, IWR6843

Tool/software: Code Composer Studio

Hi,

I got an error when loading an image using UNIFLASH.

Here is OS environment.

OS: Ubuntu 16.04 x64

UNIFLASH version: 5.0.0 / 5.1.0 (Both version has the same problem)

GPU: Nvidia MX130 (Laptop GPU)

Nvidia driver: nvidia-410 / nvidia-418 via apt (Both version has the same problem)

Run command: sudo /ti/uniflash-5.1.0/node-webkit/nw

Repro steps: Set terminal as /dev/ttyACM0 and image, then click "load" button, then popped-up loading image got stuck for a while and dismissed with the error "ERR_CONNECTION_REFUSED"

I have another machine (almost identical Ubuntu 16.04 x64 with Nvidia GPU) working well with UNIFLASH. So, it seems something corrupts my laptop.

The machine which works well with UNIFLASH doesn't shows the error "Failed to establish GPU channel". So, I suspect that the root cause is related with GPU/OpenGL part.

The source code, "gpu_process_transport_factory.cc" seems the part of chromium browser source. Anyone can give some suggestion to troubleshoot?

The complete log is as follows.

[3675:1007/150812:ERROR:browser_main_loop.cc(162)] Running without the SUID sandbox! See code.google.com/.../LinuxSUIDSandboxDevelopment for more information on developing with the sandbox on.
[3675:1007/150812:ERROR:gpu_process_transport_factory.cc(418)] Failed to establish GPU channel.
[3675:1007/150813:INFO:CONSOLE(616)] ""2019-10-07T22:08:13.655Z" "INFO" "DAEMON" "dinfra" "/home/jkim/ti/uniflash_5.1.0/dinfra-library/desktop/dinfra.js:494:24:discoverAddress()" "[\n \"multiple candidate address ignored\",\n \"enx00b56d01154c\",\n {\n \"address\": \"10.121.173.228\",\n \"netmask\": \"255.255.255.0\",\n \"family\": \"IPv4\",\n \"mac\": \"00:f4:8d:a8:5a:0b\",\n \"internal\": false\n }\n]"", source: /home/jkim/ti/uniflash_5.1.0/dinfra-library/desktop/dlog.js (616)
[3675:1007/150814:INFO:CONSOLE(697)] ""log flushes failing;" "will message again on success"", source: /home/jkim/ti/uniflash_5.1.0/dinfra-library/desktop/dlog.js (697)
[3675:1007/150815:INFO:CONSOLE(707)] ""log flushes now succeeeding after" 1 "failures (no messages lost)"", source: /home/jkim/ti/uniflash_5.1.0/dinfra-library/desktop/dlog.js (707)
[3675:1007/151333:INFO:CONSOLE(923)] "WebSocket connection to 'ws://127.0.0.1:58424/' failed: Error in connection establishment: net::ERR_CONNECTION_REFUSED", source: file:///home/jkim/ti/uniflash_5.1.0/ticloudagent/server/public/agent.js (923)

  • Hello,

    What is the exact device that you are using with UniFlash? And with what connection type?

    Thanks

    ki

  • I am flashing IWR6843ISK via MMWAVEICBOOST USB connection (/dev/ttyACM0 in Ubuntu), but actually the problem occurred before accessing the device, since I got the same repro with and without the device connected. (Even w/o the device, UNIFLASH should display some error message in console subwindow, but nothing was displayed until the problem occurred) 

    I guess that UNIFLASH internally launches some nodejs server and connects via WebSocket, but for some GPU-related reason, it seems to fail to create nodejs server instance and got the ERR_CONNECTION_REFUSED. Not sure what caused this problem.

    Could you point how to collected related logs for debugging/info?

    Thanks

  • Jaeseok Kim said:
    I guess that UNIFLASH internally launches some nodejs server and connects via WebSocket, but for some GPU-related reason, it seems to fail to create nodejs server instance and got the ERR_CONNECTION_REFUSED. Not sure what caused this problem.

    It is odd that it is just that one machine while the other near identical environment is fine. Did you try uninstalling and the re-installing UniFlash? 

    Also try the command line option:

    http://software-dl.ti.com/ccs/esd/uniflash/docs/v5_0/quick_start_guide/uniflash_quick_start_guide.html#standalone-command-line-tool

    And also the cloud based version:

    https://dev.ti.com/uniflash

    See if either of them work on the machine with the issue.

    Thanks

    ki

  • None of them are working.

    1. Cloud - DSLITE seems launched, but nothing occurred and exited

    Updated ~/TICloudAgent/ticloudagent.sh to enable logging

    export TI_DS_ENABLE_LOGGING=1
    export TI_DS_LOGGING_OUTPUT=/tmp/ticld.log
    echo "---$0 ARGS--- $1 $2 $3" > /tmp/ticld_args.log

    Then, the collected log is

    /tmp/ticld_args.log

    ---/home/jkim/TICloudAgent/ticloudagent.sh ARGS--- chrome-extension://pfillhniocmjcapelhjcianojmoidjdk/

    /tmp/ticld_ticld.log

    ...Lots of "first time only" module loading, then

    2019-10-09T21:58:14.037Z: Module( TargetSupport )->[triggerEvent]{"event":"progress","data":{"name":"Installing target support (first time only)...","subActivity":"Installation completed.\n","id":1,"isComplete":true,"isFirstUpdate":false,"percent":null}}
    2019-10-09T21:58:14.038Z: Module( TargetSupport )->[ResponseHandler]{"data":"dslite","response":2}
    2019-10-09T21:58:14.061Z: Module( Agent )->[ws.onMessage]{"command":"createSubModule","id":5,"data":["DS"]}
    2019-10-09T21:58:14.062Z: Module( Agent )->Creating new module
    2019-10-09T21:58:14.063Z: Starting DS!!!!!
    2019-10-09T21:58:14.063Z: spawnDS : execFile = ./DSLite cwd = /home/jkim/.ti/TICloudAgent/loaders/ccs_base/DebugServer/bin
    2019-10-09T21:58:14.127Z: DS Lite : { "port" : 62134 }

    2019-10-09T21:58:14.127Z: Started DS Lite : { "port" : 62134 }

    2019-10-09T21:58:14.128Z: Module( Agent )->[ResponseHandler]{"data":{"port":62134},"response":5}
    2019-10-09T21:58:44.131Z: DSLite process : exit event
    2019-10-09T21:58:44.131Z: DSLite process : close event

    2. Command line - FlashPython.py is trying to open COM1, then failed. On linux system, it should have tried to open /dev/ttyACM0

    Here is the command line and the error log

    sudo ./dslite.sh -c ~/ti/IWR6843.ccxml ~/ti/pplcount_lab_xwr68xx.bin

    Loading python script at: /opt/ti/uniflash_5.1.0/deskdb/content/TICloudAgent/linux/ccs_base/mmWave/FlashPython.py
    info: Cortex_R4_0: Initialization complete.
    info: Cortex_R4_0: Flashing process starting...
    info: Cortex_R4_0: Connecting to COM Port COM1...
    info: Cortex_R4_0: Reset connection to device
    error: Cortex_R4_0: Serial port COM1 specified does not exist, is already open, or permission is denied!!
    error: Cortex_R4_0: !! Aborting operation!!
    error: Cortex_R4_0: Not able to connect to serial port. Recheck COM port selected and/or permissions.
    info: Cortex_R4_0: Flashing instance clean-up initiated...
    info: Cortex_R4_0: Instance deinitialized!
    Failed: Image loading failed: Not able to connect to serial port. Recheck COM port selected and/or permissions.

  • Jaeseok Kim said:

    2. Command line - FlashPython.py is trying to open COM1, then failed. On linux system, it should have tried to open /dev/ttyACM0

    Here is the command line and the error log

    sudo ./dslite.sh -c ~/ti/IWR6843.ccxml ~/ti/pplcount_lab_xwr68xx.bin

    You will need to pass in the COM port to be used. Otherwise it will always default to COM1.

    try:

    > sudo ./dslite.sh -c ~/ti/IWR6843.ccxml -s "COMPort=/dev/ttyACM0" ~/ti/pplcount_lab_xwr68xx.bin

    Did you also try a complete reinstall of UniFlash?

  • I have uninstalled and reinstalled UNIFLASH for both GUI and Cloud versions, but both failed the same way.

    The command line option with -s can connect to the IWR6843ISK board, but still failed due to invalid file order number (?) error.

    Here is the executed command and the resulting log.

    sudo /opt/ti/uniflash_5.0.0/uniflash/public/file_package_creator/templates/linux/dslite.sh --mode flash -c ~/ti/IWR6843.ccxml -s "COMPort=/dev/ttyACM0" -e -v -f ~/ti/mmwave_industrial_toolbox_4_0_1/labs/people_counting/68xx_people_counting/prebuilt_binaries/pplcount_lab_xwr68xx.bin
    For more details and examples, please visit processors.wiki.ti.com/.../UniFlash_v4_Quick_Guide


    DSLite version 9.1.0.1655
    Configuring Debugger (may take a few minutes on first launch)...
    Initializing Register Database...
    Initializing: DEBUGSSM_0
    Executing Startup Scripts: DEBUGSSM_0
    Initializing: CS_DAP_0
    Executing Startup Scripts: CS_DAP_0
    Initializing: Cortex_R4_0
    Executing Startup Scripts: Cortex_R4_0
    Initializing: ETM_0
    Executing Startup Scripts: ETM_0
    Initializing: CSETB_0
    Executing Startup Scripts: CSETB_0
    Initializing: IcePick_M_0
    Executing Startup Scripts: IcePick_M_0
    Initializing: C674X_0
    Executing Startup Scripts: C674X_0
    Connecting...
    Loading Images
    Loading python script at: /opt/ti/uniflash_5.0.0/deskdb/content/TICloudAgent/linux/ccs_base/mmWave/FlashPython.py
    Initialization of uniflash object completed
    Initialization complete.: 1%
    info: Cortex_R4_0: Initialization complete.
    info: Cortex_R4_0: Flashing process starting...
    info: Cortex_R4_0: Connecting to COM Port /dev/ttyACM0...
    Opening COM port /dev/ttyACM0...: 1%
    info: Cortex_R4_0: Reset connection to device
    info: Cortex_R4_0: Set break signal
    Connected to COM port.: 2%
    info: Cortex_R4_0: Connection to COM port succeeded. Flashing can proceed.
    info: Cortex_R4_0: Reading device version info...
    info: Cortex_R4_0: ** 1 files specified for flashing.
    info: Cortex_R4_0: Checking file /home/jkim/ti/mmwave_industrial_toolbox_4_0_1/labs/people_counting/68xx_people_counting/prebuilt_binaries/pplcount_lab_xwr68xx.bin for correct header for IWR6843.
    Checking fileType appropriateness for this device...: 4%
    error: Cortex_R4_0: Internal Error: File Order number value 0 is not in valid range (1-4)
    !!! Aborting flashing of specified files!!!: 90%
    error: Cortex_R4_0: !!! Aborting flashing of specified files!!!
    Disconnecting from device on COM port /dev/ttyACM0 ...: 5%
    info: Cortex_R4_0: Disconnecting from device on COM port /dev/ttyACM0...
    Instance shutdown procedure activated...: 99%
    info: Cortex_R4_0: Flashing instance clean-up initiated...
    Done.: 100%
    info: Cortex_R4_0: Instance deinitialized!
    Failed: Image loading failed: !!! Aborting flashing of specified files!!!

  • Jaeseok Kim said:
    error: Cortex_R4_0: Internal Error: File Order number value 0 is not in valid range (1-4)

    oops, I forgot to tell you to append ",1" to the end of the file. Also, remove the verification (-v) option.

    >sudo /opt/ti/uniflash_5.0.0/uniflash/public/file_package_creator/templates/linux/dslite.sh --mode flash -c ~/ti/IWR6843.ccxml -s "COMPort=/dev/ttyACM0" -s "VerifyAfterProgramLoad=2" -e -f ~/ti/mmwave_industrial_toolbox_4_0_1/labs/people_counting/68xx_people_counting/prebuilt_binaries/pplcount_lab_xwr68xx.bin,1

  • Thanks so much.

    After adding ",1" and removing "-v", it worked very well. Although GUI/Cloud versions don't work, but I prefer the command line to flash. BTW, I got another error, "Unsupported GTI Function", after the successful flashing. Should I ignore the error?

    Here is the command I executed for FYI.

    sudo /opt/ti/uniflash_5.0.0/uniflash/public/file_package_creator/templates/linux/dslite.sh --mode flash -c ~/ti/IWR6843.ccxml -s "COMPort=/dev/ttyACM0" -e -f ~/ti/pplcount_lab_xwr68xx.bin,1

    info: Cortex_R4_0: SUCCESS!! File type META_IMAGE1 downloaded successfully to SFLASH.
    Disconnecting from device on COM port /dev/ttyACM0 ...: 90%
    info: Cortex_R4_0: Disconnecting from device on COM port /dev/ttyACM0...
    Instance shutdown procedure activated...: 99%
    info: Cortex_R4_0: Flashing instance clean-up initiated...
    Done.: 100%
    info: Cortex_R4_0: Instance deinitialized!
    Running...
    error: Cortex_R4_0: Can't Run Target CPU: Unsupported GTI Function.
    Success

  • Jaeseok Kim said:
    BTW, I got another error, "Unsupported GTI Function", after the successful flashing. Should I ignore the error?

    You should be able to ignore it. That message is likely appearing because you have verbose mode (-e) enabled. 

    Well, I'm glad the command-line is working for you. The underlying flashing functionality seems to work fine, just the GUI front end is not working. We still haven't gotten to the bottom of that yet. But if the workaround is adequate, you can continue using that.

    Since you have a working environment on another machine, you can also generate a standalone package from it that you can then copy and extract on to the machine with the issue and run the package from there. That is another option.

    ki 

  • Thanks for another suggestion.

    I am very happy with command-line option to flash the device. Thanks for all your help and have a great day!