Integrated Motion
0
Items : 0
Subtotal : 0,00 
View CartCheck Out

Flashing Over EtherCAT

Home Forums SOMANET Software Communication layer software Flashing Over EtherCAT

This topic contains 7 replies, has 0 voices, and was last updated by  peterpoon 2 years, 12 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1582

    peterpoon

    As I want to use the Develop Branch, I need to flash my node with the Somanet_ECAT-v3r0.sii file. The problem is that as soon as I flash with this file, I am not able anymore to flash with EtherCAT afterwards (the process hangs, displaying a lot of stars).

    It was working just before and it is also working if I flash with the file CiA402-mk2-noEoE.sii. Do you know this issue ? Which file should I use if I need to use the Develop Branch while requiring EtherCAT flash ?

    Thank you,

    Pierre

    #1583

    Slava

    Hello Pierre,

    are you using develop branch of SOMANET-OS or you are using develop branches of our standard repositories? In the latter case we switched to using bootloader instead of flash update service, so that could be the reason the process hangs. Please update me on what exactly you are using and we will provide you the matching solution.

    Regards,

    Slava

    #1584

    peterpoon

    I am not sure to understand the difference between your two options, so here is the code I used to initially install the software:

    I am using the sii file from this repository.

    Do you have an updated installation procedure ?

    #1585

    Slava

    Could you try running this script? Just copy it into a file and execute according the usage comment.

    `#!/bin/bash
    if [ "$#" -ne 2 ]; then
        echo Usage $0 "<slave number> <image file>"
        exit -1
    fi
    
    ec="/opt/etherlab/bin/ethercat"
    
    if [ ! -e  ${ec} ]
    then
        if [ -e which ethercat ]
        then
            echo "Using ethercat tool directly"
            ec=which ethercat
        else
            echo "Error could not find ethercat commandline tool"
            exit 1
        fi
    fi
    
    image=$2
    # split file in a tmp dir
    dir=mktemp -d
    split --bytes=2048 $image $dir/s_
    
    subimage_file=$dir/part
    
    echo "Flashing image, DO NOT STOP THIS SCRIPT until it's done, otherwise the flash will be corrupted and no further fw updates are possible!!!"
    
    # write start token which is basically a "file" containing [0x34 0x01]
    echo -n -e 'x34x01' > $subimage_file
    ${ec} foe_write -p $1 $subimage_file
    rm $subimage_file
    sleep 1
    
    # now write all the parts as single small "files"
    num=0
    for f in $dir/s_*
    do
     echo Processing $(basename "$f")
     
     cp $f $subimage_file
     ${ec} foe_write -p $1 $subimage_file
     rm $subimage_file
     
     # after the very first payload part was written we need to wait a lot
     if [ $num -eq 0 ]; then
       sleep 5
     else
       sleep 0.15
     fi
     
     let num =1
    done
    
    # write start token which is a "file" containing [0x99 0x01]
    echo -n -e 'x99x01' > $subimage_file
    ${ec} foe_write -p $1 $subimage_file
    rm $subimage_file`
    #1586

    peterpoon

    I am not sure to use to good command, but here is what I receive:

    sudo sh somanet.sh 0 synapticon_binary
    somanet.sh: 23: somanet.sh: cannot open code: No such file
    somanet.sh: 23: somanet.sh: -d: not found
    Failed to write via FoE: FOE_WC_ERROR
    Failed to write via FoE: FOE_WC_ERROR
    somanet.sh: 53: somanet.sh: let: not found
    Failed to write via FoE: FOE_WC_ERROR
    somanet.sh: 53: somanet.sh: let: not found
    Failed to write via FoE: FOE_WC_ERROR

    And it continues like this.

    I have copy your code in a file, make it executable and provide the binary file.

    #1587

    romuald
    #1588

    peterpoon

    It seems that it is working better but still have error:

    sh somanet.sh 0 synapticon_binary
    Flashing image, DO NOT STOP THIS SCRIPT until it’s done, otherwise the flash will be corrupted and no further fw updates are possible!!!
    Failed to write via FoE: FOE_TIMEOUT_ERROR
    Processing s_aa
    Failed to write via FoE: FOE_TIMEOUT_ERR

    and it continues up to s_aq.

     

    #1589

    romuald

    I checked the state of Somanet OS develop branch and the support for flashing with this script was added later so that’s why it is not working.

    The only way to flash with the new Somanet_ECAT-v3r0.sii is to first flash the old CiA402-mk2-noEoE.sii, then flash the binary with EtherCAT like before and then reflash the Somanet_ECAT-v3r0.sii.

Viewing 8 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic.