FPGA, SoC, And CPLD Boards And Kits
FPGA Evaluation and Development Kits
5915 Discussions

system-console, close_service not working?

covfefe
New Contributor I
671 Views

Hello,

 

I am trying to close_service & claim_service (to handle disconnected devices). 

Unfortunately I am unable to make it work.

  1. How can I close_service pathA, then claim_service pathA ?
  2. Or, alternatively close all service paths, to keep the service console, but start fresh?

 

close_service master {%s}; claim_service master {%s} m

 

Response:

 

CLIENT (sock2532): close_service master {/devices/5AGT(FD3H3|MD3G3)|5AGXBB3D4|..@1#USB-1/(link)/JTAG/(110:132 v1 #0)/phy_0/master}; claim_service master {/devices/5AGT(FD3H3|MD3G3)|5AGXBB3D4|..@1#USB-1/(link)/JTAG/(110:132 v1 #0)/phy_0/master} m
SERVER (sock2532): Invalid command from the client
ErrorMsg : Could not claim service at /devices/5AGT(FD3H3|MD3G3)|5AGXBB3D4|..@1#USB-1/(link)/JTAG/(110:132 v1 #0)/phy_0/master: Channel is opened
    while executing
"claim_service {master} {/devices/5AGT(FD3H3|MD3G3)|5AGXBB3D4|..@1#USB-1/(link)/JTAG/(110:132 v1 #0)/phy_0/master} {m}"
ErrorCode: NONE
ErrorInfo:
Could not claim service at /devices/5AGT(FD3H3|MD3G3)|5AGXBB3D4|..@1#USB-1/(link)/JTAG/(110:132 v1 #0)/phy_0/master: Channel is opened
    while executing
"claim_service {master} {/devices/5AGT(FD3H3|MD3G3)|5AGXBB3D4|..@1#USB-1/(link)/JTAG/(110:132 v1 #0)/phy_0/master} {m}"
    while executing
"claim_service master {/devices/5AGT(FD3H3|MD3G3)|5AGXBB3D4|..@1#USB-1/(link)/JTAG/(110:132 v1 #0)/phy_0/master} m"
    ("eval" body line 1)

 

 

covfefe_1-1657742477065.png

 

0 Kudos
11 Replies
sstrell
Honored Contributor III
659 Views

close_service has to point to the claim path, not the service path (in your case, the master service path).

claim_service will point to the master service path.

0 Kudos
covfefe
New Contributor I
654 Views

Isn't this what I am doing?

0 Kudos
sstrell
Honored Contributor III
652 Views

No, it looks like you are using the master service path for both close_service and claim_service.  A claim path is usually created like this in a script after you've created the service path (mpath in this case):

set claim_path [claim_service master $mpath {} {}]

So then close_service can simply be:

close_service master $claim_path

0 Kudos
covfefe
New Contributor I
640 Views

Thank you. Right now, if I try to 

claim_service master {/devices/5AGT(FD3H3|MD3G3)|5AGXBB3D4|..@1#USB-1/(link)/JTAG/(110:132 v1 #0)/phy_0/master} m

and the channel is open, I get an error message. How can I bypass this issue, without knowing the claim path? I assume I first need to close the channel, then do claim_service.  

An attempt at 

is_service_open master {/devices/5AGT(FD3H3|MD3G3)|5AGXBB3D4|..@1#USB-1/(link)/JTAG/(110:132 v1 #0)/phy_0/master}

does not work, and returns 0 regardless. 

An attempt at  

get_claimed_services master;

returns no values.

set claim_path [claim_service master {/devices/5AGT(FD3H3|MD3G3)|5AGXBB3D4|..@1#USB-1/(link)/JTAG/(110:132 v1 #0)/phy_0/master} {} {}]

 crashes by saying could not claim service, channel is open

0 Kudos
sstrell
Honored Contributor III
637 Views

So you've done claim_service previously but you don't know what the claim path was?

What if you just write the whole thing out:

close_service master [claim_service master {/devices/5AGT(FD3H3|MD3G3)|5AGXBB3D4|..@1#USB-1/(link)/JTAG/(110:132 v1 #0)/phy_0/master} m]

0 Kudos
covfefe
New Contributor I
627 Views

This does not work. 

As the previous message says, this command crashes

close_service master [claim_service master {/devices/5AGT(FD3H3|MD3G3)|5AGXBB3D4|..@1#USB-1/(link)/JTAG/(110:132 v1 #0)/phy_0/master} m]

CLIENT (sock2472): claim_service master {/devices/5AGT(FD3H3|MD3G3)|5AGXBB3D4|..@1#USB-1/(link)/JTAG/(110:132 v1 #0)/phy_0/master} m
SERVER (sock2472): Invalid command from the client
ErrorMsg : Could not claim service at /devices/5AGT(FD3H3|MD3G3)|5AGXBB3D4|..@1#USB-1/(link)/JTAG/(110:132 v1 #0)/phy_0/master: Channel is opened

so the following command as well

CLIENT (sock2472): close_service master [claim_service master {/devices/5AGT(FD3H3|MD3G3)|5AGXBB3D4|..@1#USB-1/(link)/JTAG/(110:132 v1 #0)/phy_0/master} m]

SERVER (sock2472): Invalid command from the client
ErrorMsg : Could not claim service at /devices/5AGT(FD3H3|MD3G3)|5AGXBB3D4|..@1#USB-1/(link)/JTAG/(110:132 v1 #0)/phy_0/master: Channel is opened

 

Yes, claim_path is unknown (application reboot)

0 Kudos
ShengN_Intel
Employee
607 Views

Hi,


Or may be try to get service path first like below:

set m_path [lindex [get_service_paths master] 0 ]

set c_path [claim_service master $m_path ""]

close_service master $c_path


Best Regards,

Sheng

p/s: If any answer from community or Intel support are helpful, please feel free to mark as solution and give Kudos.


0 Kudos
ShengN_Intel
Employee
579 Views

Any further update or concern? Does your problem resolved?


0 Kudos
ShengN_Intel
Employee
551 Views

Since there are no further updates or concerns for this thread, I shall set this thread to close pending. If you still need further assistance, you are welcome reopen this thread within 20days or open a new thread, some one will be right with you.


0 Kudos
covfefe
New Contributor I
528 Views

Thank you, the following successfully closes the service path:

set m_path [lindex [get_service_paths master] 0 ];
set c_path [claim_service master $m_path ""];
close_service master $c_path;

Now, to be able to re-claim an existing path, I first need to be able to check if it is closed. However, this command returns 0 regardless of the status (open or closed). 

is_service_open master {/devices/5AGT(FD3H3|MD3G3)|5AGXBB3D4|..@1#USB-1/(link)/JTAG/(110:132 v1 #0)/phy_0/master}

 Which then errors on the next command to claim it

claim_service master {/devices/5AGT(FD3H3|MD3G3)|5AGXBB3D4|..@1#USB-1/(link)/JTAG/(110:132 v1 #0)/phy_0/master} m

CLIENT (sock2256): claim_service master {/devices/5AGT(FD3H3|MD3G3)|5AGXBB3D4|..@1#USB-1/(link)/JTAG/(110:132 v1 #0)/phy_0/master} m
SERVER (sock2256): Invalid command from the client
ErrorMsg : Could not claim service at /devices/5AGT(FD3H3|MD3G3)|5AGXBB3D4|..@1#USB-1/(link)/JTAG/(110:132 v1 #0)/phy_0/master: Channel is opened

 

Is it possible "close_service master" does not really close it?

 

0 Kudos
ShengN_Intel
Employee
473 Views

Hi,

 

After close_service, you have to get_service again in order to claim_service. claim_service can't be done straight away after closing service.


Best regards,
Sheng

p/s: If any answer from community or Intel support are helpful, please feel free to mark as solution and give Kudos.

0 Kudos
Reply