Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

host_connect.py should call connect() after 'Close Session'. #387

Open
AllenLius opened this issue Sep 20, 2024 · 0 comments
Open

host_connect.py should call connect() after 'Close Session'. #387

AllenLius opened this issue Sep 20, 2024 · 0 comments
Assignees

Comments

@AllenLius
Copy link

The step of S_ADAC_001 (test_a002.c):

  1. Discovery
  2. Authentication Start
  3. Authentication Response
  4. Close Session
  5. Lock Debug

after 'Close Session', the connection between the host and the client will be closed per spec:

Close Session
This command requests that the communications session between the Secure Debug Manager and the
Secure Debug Authenticator be terminated.
Depending on the execution environment of the Secure Debug Authenticator, closing the session can
cause system boot to continue. Any means of resuming execution is acceptable, including performing a
system reset. Note that if a system reset is used to resume execution, it should be performed after sending
the response. Implementations should take link layer specifics into account to ensure a good likelihood of
the response being delivered successfully.

the test step should call the connect() routine before calling "Lock Debug" case, or separating the test case, or break the inner loop after finishing 'Close Session'?

while True:
      with ConnectHelper.session_with_chosen_probe(**session_args) as session:
          adac_acs.target = session.board.target
          adac_acs.connect()
          while True:
              try:
                  data_received, address = adac_acs.server_socket.recvfrom(4096)
                  length = len(data_received)
                  print("Data received from adac acs : length : %d, data : %s"%(length, str(data_received.hex())))
                  adac_acs.send(data_received)
                  head, data = adac_acs.receive()
                  adac_acs.server_socket.sendto(head, address)
                  print("Header sent to adac acs : length : %d, data : %s"%(len(head), str(head.hex())))
                  adac_acs.server_socket.sendto(data, address)
                  print("Data sent to adac acs : length : %d, data : %s"%(len(data), str(data.hex())))
              except Exception as e:
                  continue

          adac_acs.close()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants