aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Bultel <thierry.bultel@iot.bzh>2019-05-28 21:18:33 +0200
committerThierry Bultel <thierry.bultel@iot.bzh>2019-05-28 21:24:53 +0200
commit38a8e562f86c56e89570b37d35adc1eba27556c0 (patch)
tree5ace80d48a5cfc522e6c2228a232a18083f0f501
parent224f667013ae930b3698eb896889edbf1c0cf2c5 (diff)
4a-client requests 4A for a role, thus this commit parses the json output to get the device name to use. Bug-AGL: SPEC-2467 Change-Id: I51ce699aa91d025e5f90132f42b8ebb4c576991d Signed-off-by: Thierry Bultel <thierry.bultel@iot.bzh>
-rwxr-xr-xbin/4a-play2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/4a-play b/bin/4a-play
index 7650d4d..f54fba7 100755
--- a/bin/4a-play
+++ b/bin/4a-play
@@ -43,7 +43,7 @@ fi
if [ "$IS_4A_DEVICE" == "1" ]; then
log "The selected card (hw:$CARDID) is handle by 4a, call open on '$ROLE'"
- 4a-client ahl-4a "$ROLE" '{ "action": "open" }'
+ DEVICE=$(4a-client ahl-4a "$ROLE" '{ "action": "open" }' | tail -n +2 | jq '.response.device_uri')
# BUG: afb-client-demo does not exit an exit code different from zero when api return an error
#if [ "$?" -ne "0" ]; then