jlink.sh: wait for rtt server to start#10849
Conversation
This will allow re-using it later.
On my machine I needed some delay between the server start and connecting to prevent the port not being ready. I based my code on [1]. I changed using a for loop to limit the number of iterations. 1: https://stackoverflow.com/questions/27599839/how-to-wait-for-an-open-port-with-netcat I also added a `timeout` around `nc` as when not doing `return` and calling `nc -z` when it was already launched, it could get stuck. I tried preventing that.
|
By looking at this in more details with @jcarrano using Pyterm inside this script is forcing to have a non clean terminal. |
|
@cladmi do you want to merge this, or go straight for the "right thing", that is socat? I ask because:
|
|
Go for a proper fix instead of this hack. |
|
@cladmi, any update regarding this issue? |
|
@Hyungsin I am thinking that I can put this optional, so I would be sure it does not change any existing boards for the moment and still allow you to do |
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want me to ignore this issue, please mark it with the "State: don't stale" label. Thank you for your contributions. |
Contribution description
On my machine I needed some delay between the server start and
connecting to prevent the port not being ready.
I based my code on [1]. I changed using a for loop to limit the number
of iterations.
1: https://stackoverflow.com/questions/27599839/how-to-wait-for-an-open-port-with-netcat
I also added a
timeoutaroundncas when not doingreturnand callingnc -zwhen it was already launched, it could get stuck.I tried preventing that.
Issues found
When testing without the
returnafterncand connecting when the server was started, I could not talk to it. So cases that were working before should also be re-tested.Testing procedure
Using #9013, if you had the issue before, you should now be able to do
and interact with the board.
I did not tested
ruuvitagorthingy52as I do not have any.I checked there are no newly introduced
shellcheckerrors.Issues/PRs references
I found the issue while testing #9013
I needed to add a delay before starting the terminal #9013 (comment)