This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-remsim/+/17339 )
Change subject: contrib: Add owhw-event-script.sh for osmo-remsim-client
......................................................................
contrib: Add owhw-event-script.sh for osmo-remsim-client
This is a sample event-script that can be used in conjunction
with osmo-resim-client to trigger certain board-specific functions
such as modem reset on the OWHW.
Change-Id: I69f7f9b0c09421b8c14b909627ffe7b9f1acec77
---
A contrib/owhw-event-script.sh
1 file changed, 64 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-remsim refs/changes/39/17339/1
diff --git a/contrib/owhw-event-script.sh b/contrib/owhw-event-script.sh
new file mode 100755
index 0000000..8d4a33f
--- /dev/null
+++ b/contrib/owhw-event-script.sh
@@ -0,0 +1,64 @@
+#!/bin/bash -e
+
+# Helper script for osmo-remsim-client-st2 on OWHW hardware. It performs the hardware-specific
+# functions required by remsim-client.
+
+# environment variables available:
+# REMSIM_CLIENT_VERSION
+# REMSIM_SERVER_ADDR
+# REMSIM_SERVER_STATE
+# REMSIM_BANKD_ADDR
+# REMSIM_BANKD_STATE
+# REMSIM_CLIENT_SLOT
+# REMSIM_BANKD_SLOT
+# REMSIM_SIM_VCC
+# REMSIM_SIM_RST
+# REMSIM_CAUSE
+# REMSIM_USB_PATH
+# REMSIM_USB_INTERFACE
+
+CAUSE="$1"
+
+# derive the modem (1/2) from the USB interface of the SIMTRACE2 firmware (0/1)
+case "${REMSIM_USB_INTERFACE}" in
+ 0)
+ MODEM=1
+ ;;
+ 1)
+ MODEM=2
+ ;;
+ *)
+ echo "Unknown REMSIM_USB_INTERFACE ${REMSIM_USB_INTERFACE}"
+ exit 1
+ ;;
+esac
+
+
+
+case "${CAUSE}" in
+ event-server-connect)
+ ;;
+ event-bankd-connect)
+ ;;
+ event-config-bankd)
+ ;;
+ event-modem-status)
+ ;;
+ request-card-insert)
+ echo "Enabling Remote SIM for ${MODEM}"
+ echo "1" > "/dev/gpio/connect_st_usim${MODEM}/value"
+ ;;
+ request-card-remove)
+ echo "Disabling Remote SIM for ${MODEM}"
+ echo "0" > "/dev/gpio/connect_st_usim${MODEM}/value"
+ ;;
+ request-modem-reset)
+ echo "Resetting Modem ${MODEM}"
+ echo "1" > "/dev/gpio/mdm${MODEM}_rst/value"
+ sleep 1
+ echo "0" > "/dev/gpio/mdm${MODEM}_rst/value"
+ ;;
+ *)
+ echo "Unknown CAUSE ${CAUSE}: ignoring"
+ ;;
+esac
--
To view, visit https://gerrit.osmocom.org/c/osmo-remsim/+/17339
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-remsim
Gerrit-Branch: master
Gerrit-Change-Id: I69f7f9b0c09421b8c14b909627ffe7b9f1acec77
Gerrit-Change-Number: 17339
Gerrit-PatchSet: 1
Gerrit-Owner: laforge <laforge at osmocom.org>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200304/884ed9e3/attachment.htm>