Commit Graph

339 Commits

Author SHA1 Message Date
Oliver Smith 90b48a1fae gitignore: add osmo-remsim-client-reader_conf
Change-Id: I1064aaf523ae368122a5fcc56ea1aa303ff0842e
2021-06-22 17:40:08 +02:00
Oliver Smith 905bc4d2b1 doc/examples: install bankd_pcsc_slots.csv
Related: SYS#5187
Change-Id: Iba0b98729ae2a830e05d1b337b33259dcae25d15
2021-06-22 17:27:55 +02:00
Oliver Smith debcd86e40 etc_default: change bankd, client ip to
Related: OS#5187
Change-Id: I8dffe950b0f041a231708521d11b027bfbd304e3
2021-06-22 17:06:27 +02:00
Harald Welte a06d77f073 manual: fix formating of a bullet point list in bankd csv file part
Change-Id: Ib56dbfae4ebf14321bfed855291341a50f862148
2021-02-19 19:04:12 +01:00
Harald Welte 753c8aa87a bankd: regex matching of reader names
So far, bankd did a 1:1 string match of the CSV file line against
the reader name.  As pcsc-lite reader names unfortunately tend to
change at times, we introduce matching by regular expressions in
this patch.

Change-Id: I58b71f9562e152e7ed21b55d7b876bba481b01f8
2021-02-03 08:46:21 +00:00
Oliver Smith 4f5c79d627 set -std=gnu11
Change-Id: I1c3682bfd50cfb43df041b6ca9a1cc7472a862dd
2021-01-28 10:48:42 +00:00
Oliver Smith fadaeec795 contrib/jenkins: don't build osmo-gsm-manuals
Related: OS#4912
Change-Id: Ic4f26705854a0987aa72a9064a5278b01b4d078d
# ---
2021-01-13 13:17:08 +01:00
Harald Welte dc34764648 remsim-client: Avoid zombies when scripts terminate
This avoids the OS from keeping terminated children (scripts) around
as zombies.

Change-Id: If7d45bda160987a26c7b101db6152142dc432fe7
2020-10-20 19:16:09 +02:00
Harald Welte a5daec426e Use OSMO_FD_* instead of deprecated BSC_FD_*
Change-Id: Ice73ab253ae038848c791871693ba2e5c3352ffc
2020-10-18 22:40:42 +02:00
Harald Welte 3f65972ed6 remsim-client-shell: Terminate if STDIN has been closed
Change-Id: I39937224b06b6bb6f23c002023141882797ee6a6
2020-07-19 09:54:37 +02:00
Harald Welte b80fcf0bd7 * Use %config(noreplace) to retain current config file
Change-Id: I4bf84faef873ef18797d08bbf789ae260922a1e2
2020-06-22 15:21:58 +02:00
Harald Welte 57b21d479b user_simtrace2: Fix typo in frontend_handle_card2modem()
this typo was breaking operating with simtrace2 for all responses
that contained more than just a status word.

Change-Id: Id8195d6650c3306e1a39f59d78d1348671ad062d
2020-05-28 16:29:39 +02:00
Harald Welte aa66d91eda user_shell: Dispatch all events via main_fsm.c
... avoid calling server_conn_send_rspro() directly from user code.

Change-Id: I7f589ea1b1610e6d716ed0d9f4078b185bc6401d
2020-05-25 23:07:04 +02:00
Harald Welte dd33725c8f Enable async use of libosmo-simtrace2
libosmo-simtrace2 traditionally had only supported blocking, synchronous
I/O, while remsim-client used asynchronous USB I/O.  Using async USB I/O
for IRQ + IN transfers while using blocking I/O for OUT transfers
doesn't seem to work reliably, so we have to switch OUT also to async.

Depends: simtrace2.git Ib8939bdb7f533cd20a34a30a97f12b782b9816c2
Change-Id: I18bf166a95bd4318d700b3e93401b2db5188acfc
2020-05-25 22:56:41 +02:00
Harald Welte 1eec53dbfb simtrace2: use correct event when dispatching modem data to main_fsm
Change-Id: I35e20a577544bde7ad7440a617dc3ed4d2572abf
2020-05-25 22:56:41 +02:00
Harald Welte eea6135f61 contrib/ Update to working version for OWHWv5
Change-Id: I347dc9d3a7a7e762323fff5bf252c27e169ba271
2020-05-25 19:17:51 +02:00
Harald Welte e04382610b simtrace2: Set transp->udp_fd to -1 to indicate USB transport
Change-Id: Ie97f1d449509777661f7fcc2bd0c799711861184
2020-05-25 18:16:01 +02:00
Harald Welte 06fff2aec1 simtrace2: Fix missing LF at end of log output in process_do_rx_da()
Change-Id: I9ecda9f47711e24bf5d3d57e3d9e117add29f4cc
2020-05-25 18:16:01 +02:00
Harald Welte 80a0110f77 add '-d' command line argument to configure stderr logging verbosity
The '-d' option is pretty much tradition in most osmocom programs,
particularly for those without a VTY / config file it is the only
option to configure per-subsystem logging verbosity.

Change-Id: I0abecc26a5d8b6a5607e1eb8982af4c05909afed
2020-05-25 15:49:33 +02:00
Harald Welte e580c93169 avoid talloc abort in simtrace2 frontend_append_script_env()
talloc requires a valid context for the allocation, we cannot use
env[i] as context.

Change-Id: I82b5e6b91b39d6f5c2a7492adb8c6193083e0d70
2020-05-24 16:06:32 +02:00
Oliver Smith 5c860acbb5 EXTRA_DIST: debian, contrib/*
Change-Id: Ifbd7b8d726c558f40b12bf864bec8b8c819b6094
2020-05-22 14:13:21 +02:00
Oliver Smith 54797c44ec contrib: integrate RPM spec
Remove OpenSUSE bug report link, set version to @VERSION@, make it build
with CentOS 8 etc.

Related: OS#4550
Change-Id: Ib2da03980d99f12ab36ca5d5fdde92ddbefb040b
2020-05-22 14:13:18 +02:00
Harald Welte b91e88d800 only depend on libcsv if remsim-bankd is to be built
Change-Id: I87d758972b6d2b509c7ef1216d4b61a01b9cdae0
2020-05-20 13:51:28 +02:00
Oliver Smith 81022c859d contrib: import RPM spec
Copy the RPM spec file from:

Related: OS#4550
Change-Id: I51eaae80a9bf198247d2812d65ab5ea64a8fca14
2020-05-14 11:51:40 +02:00
Harald Welte b97e2fb573 user_simtrace2: Stop using printf, use libosmocore logging
This way we have consistent logging from all parts of the code via
the common libosmocore logging infrastructure.

Change-Id: I9ace31d781dd3e50f9a5d9239bafa87a01abb0d6
2020-03-14 18:26:26 +01:00
Harald Welte a3ab5f20d7 introduce --disable-remsim-client-{st2,ifdhanndler}
Change-Id: I4aaeeedc9df873f2e7edfbfab587fec2dfad85c4
2020-03-14 18:26:26 +01:00
Harald Welte afc6c6881d rspro_util.c: Use %zu for size_t
Fix the following warning in 32bit builds on ARM:

rspro_util.c:92:53: warning: format '%lu' expects argument of type 'long unsigned int', but argument 4 has type 'size_t {aka unsigned int}' [-Wformat=]

Change-Id: I7ea17f8b9fdd68cdac442bf4d4e518f92292f6fc
2020-03-14 18:26:26 +01:00
Harald Welte 8fc441a5d6 debian: Ensure osmo-remsim-client-st2 package only contains st2 binary
Before this fix, osmo-remsim-client-st2 contains both the -st2 and the
-shell binary, creating conflicts when both osmo-remsim-client-st2
and osmo-remsim-client-shell are installed, as both ship the -shell

Change-Id: I1ad433113bcf0b34ab196dd5a31a523cf9ab7efd
2020-03-12 09:32:55 +01:00
Harald Welte e358c1dba6 debian: osmo-remsim-client-s2 'Replaces' osmo-remsim-client
The package used to be called differently, let's make sure the new
is treated as a successor to the old one.

Change-Id: I4102409b7ae0d18dae83be50c28c0236083d3d1f
2020-03-11 09:51:58 +01:00
Joachim Steiger 6c573ee6d5 fix config defaults for systemd startscripts
Change-Id: I7f38c951cc515db61a857221346bc4309f2b4740
2020-03-05 22:10:57 +01:00
Harald Welte b7978a5544 debian/control: Fix typo (package->Package)
Change-Id: Ia35c5dc603830b83670b20c3f45b6857cb9d19b4
dpkg-gencontrol: warning: package osmo-remsim-doc: unknown substitution variable ${misc:Package}
2020-03-04 19:20:11 +01:00
Harald Welte f50a7520e6 client: Avoid useless depedency to libosmosim
Change-Id: Ic863dc2f7fe7b435c9ea19c9cb97b691411dc0f5
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/osmo-remsim-client-st2/usr/bin/osmo-remsim-client-st2 was not linked against (it uses none of the library's symbols)
2020-03-04 19:20:11 +01:00
Harald Welte 7cd8b76577 bankd: Avoid useless dependency to libosmosim
Change-Id: I015b1a49dbdd19d030acd929b5a935021b77cefa
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/osmo-remsim-bankd/usr/bin/osmo-remsim-bankd was not linked against (it uses none of the library's symbols)
2020-03-04 19:15:32 +01:00
Harald Welte f14f337d06 libosmo-rspro: Avoid useless dependency to libosmo-abis
Change-Id: I124003dafb7b90664e6614965990243771be62a9
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/libosmo-rspro1/usr/lib/x86_64-linux-gnu/ was not linked against (it uses none of the library's symbols)
2020-03-04 19:15:32 +01:00
Harald Welte 73b6d703ad Avoid useless dependency on libcsv
We don't want to link everything against libvsv.  Only bankd needs it.

Change-Id: I288c27611b042fef76101e247b41c7a2f6c7483b
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/libosmo-rspro1/usr/lib/x86_64-linux-gnu/ was not linked against (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/osmo-remsim-server/usr/bin/osmo-remsim-server was not linked against (it uses none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/osmo-remsim-client/usr/bin/osmo-remsim-client-shell debian/osmo-remsim-client/usr/bin/osmo-remsim-client-st2 were not linked against (they use none of the library's symbols)
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/libifd-osmo-remsim-client0/usr/lib/pcsc/drivers/libifd-osmo-remsim-client.bundle/Contents/Linux/ was not linked against (it uses none of the library's symbols)
2020-03-04 19:15:32 +01:00
Harald Welte 2a5f44750d libosmo-rspro: Avoid useless dependency to libosmogsm
dpkg-shlibdeps: warning: package could avoid a useless dependency if debian/libosmo-rspro1/usr/lib/x86_64-linux-gnu/ was not linked against (it uses none of the library's symbols)

Change-Id: I6ed59e4b1a23625653be2647f271a5d993535800
2020-03-04 19:15:32 +01:00
Harald Welte d9dfb72662 debian: split osmo-remsim-client into osmo-remsim-client-{shell,st2}
The -shell client has no dependency to libosmo-simtrace2, so it makes
sense to package it separately.

Change-Id: I6c634572af5036fd7f9ce1fee6d1474e06bdaa5a
2020-03-04 19:15:32 +01:00
Harald Welte 753d2b585a contrib/ Harmonize with what we do in other projects
most importantly:
* conditional build of manuals
* enforce build of manuals if enabled
* publish manuals, if requested

Change-Id: I4ed51fd5aa9d861ea4795e33b6201c15b2281b53
2020-03-04 19:15:32 +01:00
Harald Welte e10022df38 Install config files to /etc/default/
Related: OS#4326
Change-Id: Ibff534c2f247557bb4eb0f72b8babe85ad0b315b
2020-03-04 18:18:14 +01:00
Harald Welte 75b8eb3bcc + debian: Add systemd service file support
Closes: OS#4326
Change-Id: I0d7b6562c1127f005ddbd47298c03942ac3d241d
2020-03-04 18:18:14 +01:00
Harald Welte de80eb3988 configure/Makefile: Include contrib in "make dist"
Change-Id: I2d6a2e06f075391e8e51d1342a1afe955cc127b0
2020-03-04 18:18:14 +01:00
Harald Welte 9629ba3fb9 client: Fix TODO: add CLK status information to event-script environment
Change-Id: Iecc6002a8effaae7d8c3cab2aa4c6109f83f35b2
2020-03-04 18:02:21 +01:00
Harald Welte 0e968cce38 client: major restructuring around new main_fsm
The remsim_client code already used FSMs for the connections
to both remsim-server and remsim-bankd.  However the 'main' part of the
program was not yet implemented as a FSM, making it somewhat difficult
to perform the right actions in every possible situation.

This commit re-structures the code around a central main_fsm, which
gets notified from the per-connection FSMs and which handles the common
processing.  It also handles the execution of external script commands,
and hence further unifies the code base between the different backends
(simtrace2, ifd_handler, shell)

Closes: #4414

Change-Id: I44a430bc5674dea00ed72a0b28729ac8bcb4e022
2020-03-04 18:02:21 +01:00
Harald Welte 5b5d6cee9b configure/automake: Remove work-arounds
Change-Id: I97a085248e6cbcd15daf96c0c23f31cdcd02e06b
2020-03-04 18:02:21 +01:00
Harald Welte 1b0a68a3d8 fix debian build after introducing hack around usbdropdir
In Change-Id I87c68e8d14f8ddb6054178118ff1f96216483f5c we introduced
a hack to fix 'make distcheck' which in turn broke debian packaging.

Let's make sure the latter works while the formar also still does.

Change-Id: I16f7d0e8b7f63ed58dd4939c88e5276185bc3178
2020-03-04 16:38:03 +01:00
Harald Welte b266d508be rspro_client_fsm: Add optional notifiation of parent on connect/disconnect
This will be useful once we introduce a 'main' client FSM that is a
parent to the rspro_client_fsms.

Change-Id: Ifddb8e0b5c991e5348392c9e44612669ce207bc4
2020-03-04 16:21:34 +01:00
Harald Welte 8da220911d rspro_client_fsm: Migrate to ipa_client_conn_create2()
libosmo-abis 0.8.0 has deprecated ipa_client_conn_create() and this
follow-up patch avoids the related deprecation compiler warnings.

Change-Id: I0057c5b6a79e7226e87983c14eb2b0ed2af2a131
2020-03-04 16:21:34 +01:00
Harald Welte 830026a9c0 doc: Add documentation for
Change-Id: I0e280cd4276e1aff7d6f694ac4affbca0336eba5
2020-03-04 16:21:34 +01:00
Harald Welte 5103ea0a43 doc: More cross-references; Expand overview slightly
Change-Id: Ic290627ec2512a2b59cb9d81704b9cec4d14ccf4
2020-03-04 16:21:34 +01:00
Harald Welte ddbe43a366 doc: Add WARNINGs about lack of security in protocols
Change-Id: I72c0b797fda220b9efcc86bd08717585063db591
2020-03-04 16:21:34 +01:00