Project

General

Profile

Feature #4332

call external script from remsim-client to execute specific actions

Added by laforge 11 months ago. Updated 8 months ago.

Status:
In Progress
Priority:
Low
Assignee:
Category:
remsim-client
Target version:
-
Start date:
12/16/2019
Due date:
% Done:

80%

Spec Reference:

Description

There are some situations where remsim-client would want to make its environemnt aware of, e.g. to take specific action.

This is particularly important on platforms where the simtrace2 firmware doesn't have direct control over modem reset/poweron or the like.


Checklist

  • generic mechanism to call related script (non-blocking, in separate process)
  • command: sim local vs. remote
  • command: modem reset active/inactive
  • event: server-conn FSM state change
  • event: bankd-conn FSM state change
  • event: modem asserts/releases SIM RST

History

#1 Updated by laforge 10 months ago

  • Checklist item generic mechanism to call related script (non-blocking, in separate process) set to Done
  • Status changed from New to In Progress
  • % Done changed from 0 to 30

first part of the task implemented in https://gerrit.osmocom.org/c/libosmocore/+/16619

#2 Updated by laforge 10 months ago

  • Checklist item command: sim local vs. remote set to Done
  • Checklist item command: modem reset active/inactive set to Done
  • Checklist item event: modem asserts/releases SIM RST set to Done

I'm working with a patch that calls an external binary with a single argument and the following environment:

REMSIM_SIM_RST=0
REMSIM_CLIENT_VERSION=0.2.2.30-283e
REMSIM_SERVER_STATE=CONNECTED
REMSIM_EVENT=event-modem-status
REMSIM_CLIENT_SLOT=1:0
REMSIM_USB_PATH=1-2.1
REMSIM_SIM_VCC=1
REMSIM_BANKD_ADDR=127.0.0.1:9999
REMSIM_BANKD_STATE=CONNECTED
REMSIM_SERVER_ADDR=127.0.0.1:9998
REMSIM_BANKD_SLOT=1:0

The following arguments can occur:
  • event-server-connect
    remsim-client informs the system a logical RSPRO connection from client to server has been established
  • event-bankd-connect
    remsim-client informs the system a logical RSPRO connection from client to bankd has been established
  • event-config-bankd
    remsim-server has configured a (new) bankd/slot to connect to
  • event-modem-status
    themsim-client informs the system that the modem has swiched on/off either VCC or RST of the SIM interface
  • request-card-insert / request-card-remove
    remsim-client requests the system to simulate card-insert / card-removal to the modem
  • request-sim-remote / request-sim-local
    remsim-client requests the system to witch between remote and local SIM
  • request-modem-reset
    remsim-client requests the system to perform a modem reset

In terms of the environment, the following variables have been specified so far

Variable Description
REMSIM_CLIENT_VERSION compile-time version of the remsim-client software
REMSIM_SERVER_ADDR remsim-server host:port
REMSIM_SERVER_STATE state of the rspro_client_fsm connecting to remsim-server
REMSIM_BANKD_ADDR remsim-bankd host:port
REMSIM_BANKD_STATE state of the rspro_client_fsm connecting to remsim-bankd
REMSIM_CLIENT_SLOT ClientId:SlotNr
REMSIM_BANKD_SLOT BankId:SlotNr
REMSIM_USB_PATH physical USB path of the SIMtrace2 USB device
REMSIM_USB_INTERFACE interface number within the SIMtrace2 USB device
REMSIM_SIM_VCC whether or not the SIM card VCC is turned on by modem (1=on, 0=off)
REMSIM_SIM_RST whether or not the SIM card RST is active (1) or inactive (0)
REMSIM_EVENT the name of the event/request (same as first argument passed to script)

#3 Updated by laforge 10 months ago

  • % Done changed from 30 to 80

#4 Updated by laforge 8 months ago

  • % Done changed from 80 to 90

the related patch has meanwhile been merged master. However, FSM state change events are still missing.

#5 Updated by laforge 8 months ago

  • Priority changed from High to Low
  • % Done changed from 90 to 80

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)