Hello,
I work with Marc Wilson (recent poster here) and we have been trying to get remsim functional. I got all of the client/server bits to finally talk to each other today along with the port/slot mapping.
In my setup, the ST2 board is connected to a RPi running the remsim-client, and the PC/SC card reader is mounted to an Ubuntu VM running the server/bankd components. I am running the pieces each in their own shell so I can easily get stderr output.
Server VM:
@ubuntu:~$ sudo osmo-remsim-server 35014 DLINP NOTICE input/ipa.c:283 0.0.0.0:9998 accept()ed new link from 127.0.0.1:36289 35087 DSLOTMAP INFO ../slotmap.c:135 Slot Map B(1:0) <-> C(1:0) added 35087 DMAIN INFO rest_api.c:333 Slot Map B(1:0) <-> C(1:0) state change: NEW -> NEW 35087 DMAIN INFO rest_api.c:339 Slot Map B(1:0) <-> C(1:0) state change: NEW -> NEW 35014 DMAIN INFO rspro_server.c:716 Event FD arrived, checking for any pending work 35014 DMAIN INFO rspro_server.c:391 Slot Map B(1:0) <-> C(1:0) state change: NEW -> UNACKNOWLEDGED 35014 DMAIN INFO rspro_server.c:363 Slot Map B(1:0) <-> C(1:0) state change: UNACKNOWLEDGED -> ACTIVE
@ubuntu:~$ sudo osmo-remsim-bankd -b 1 -n 1 […cut for clarity] 35019 DBANKDW INFO bankd_main.c:442 [000 CONN_WAIT_ID] Changing state to ACCEPTING 35018 DSLOTMAP INFO ../slotmap.c:135 Slot Map B(1:0) <-> C(1:0) added 35019 DBANKDW INFO bankd_main.c:955 [000 ACCEPTING] Accepted connection from 192.168.70.218:41431 35019 DBANKDW INFO bankd_main.c:442 [000 ACCEPTING] Changing state to CONN_WAIT_ID 35019 DBANKDW INFO bankd_main.c:655 [000 CONN_WAIT_ID] Rx RSPRO connectClientReq(T=0, N='raspberrypi', SW='remsim-client', VER='1.0.0') 35019 DBANKDW INFO bankd_main.c:442 [000 CONN_WAIT_ID] Changing state to CONN_CLIENT 35019 DBANKDW INFO bankd_main.c:625 [000 CONN_CLIENT] slotmap found: C(1:0) -> B(1:0) 35019 DBANKDW INFO bankd_main.c:450 [000 CONN_CLIENT] Changing state to CONN_CLIENT_MAPPED (timeout=10) 35019 DBANKDW INFO bankd_pcsc.c:261 [000 CONN_CLIENT_MAPPED] Attempting to open PC/SC context 35019 DBANKDW INFO bankd_pcsc.c:264 [000 CONN_CLIENT_MAPPED] SCardEstablishContext: OK 35019 DBANKDW INFO bankd_pcsc.c:215 [000 CONN_CLIENT_MAPPED] Attempting to find card/slot using regex 'OMNIKEY AG CardMan 3121 (OKCM0012007091219038212815383974) 00 00' 35019 DBANKDW INFO bankd_pcsc.c:234 [000 CONN_CLIENT_MAPPED] Attempting to open card/slot 'OMNIKEY AG CardMan 3121 (OKCM0012007091219038212815383974) 00 00' 35019 DBANKDW INFO bankd_pcsc.c:198 [000 CONN_CLIENT_MAPPED] SCardStatus: OK 35019 DBANKDW INFO bankd_pcsc.c:200 [000 CONN_CLIENT_MAPPED] Card ATR: 3b9f96c00a3fc7828031e073fe211f65d00209146c810f13 35019 DBANKDW INFO bankd_main.c:442 [000 CONN_CLIENT_MAPPED] Changing state to CONN_CLIENT_MAPPED_CARD
On the RPi running the client I get: pi@raspberrypi:~ $ sudo osmo-remsim-client-st2 --usb-vendor 1d50 --usb-product 60e3 --usb-path 1-1.3 --usb-interface 0 --usb-config 1 --usb-altsetting 0 --client-id 1 --client-slot 0 --server-ip 192.168.70.241 --server-port 9999 DRSPRO INFO ../rspro_client_fsm.c:307 RSPRO_CLIENT(server){REESTABLISH}: Creating TCP connection to server at 192.168.70.241:9999 DLINP NOTICE simtrace2_api.c:271 [0] <= osmo_st2_cardem_request_config(features=00000001) DLINP NOTICE input/ipa.c:128 192.168.70.241:9999 connection done DRSPRO NOTICE ../rspro_client_fsm.c:127 RSPRO_CLIENT(server){REESTABLISH}: RSPRO link to 192.168.70.241:9999 UP DRSPRO ERROR remsim_client.c:121 RSPRO_CLIENT(server){CONNECTED}: Unknown/Unsupported RSPRO PDU type: setAtrReq
When I look at https://git.osmocom.org/osmo-remsim/tree/asn1/RSPRO.asn I see the setAtrReq PDU, so not sure why we are getting this error.
For completeness here is the pcsc_scan on the VM talking to the Reader+Card that I am trying to remote: @ubuntu:~$ pcsc_scan Using reader plug'n play mechanism Scanning present readers... 0: OMNIKEY AG CardMan 3121 (OKCM0012007091219038212815383974) 00 00
Thu Apr 21 06:49:01 2022 Reader 0: OMNIKEY AG CardMan 3121 (OKCM0012007091219038212815383974) 00 00 Event number: 2 Card state: Card inserted, ATR: 3B 9F 96 C0 0A 3F C7 82 80 31 E0 73 FE 21 1F 65 D0 02 09 14 6C 81 0F 13
ATR: 3B 9F 96 C0 0A 3F C7 82 80 31 E0 73 FE 21 1F 65 D0 02 09 14 6C 81 0F 13 + TS = 3B --> Direct Convention + T0 = 9F, Y(1): 1001, K: 15 (historical bytes) TA(1) = 96 --> Fi=512, Di=32, 16 cycles/ETU 250000 bits/s at 4 MHz, fMax for Fi = 5 MHz => 312500 bits/s TD(1) = C0 --> Y(i+1) = 1100, Protocol T = 0 ----- TC(2) = 0A --> Work waiting time: 960 x 10 x (Fi/F) TD(2) = 3F --> Y(i+1) = 0011, Protocol T = 15 - Global interface bytes following ----- TA(3) = C7 --> Clock stop: no preference - Class accepted by the card: (3G) A 5V B 3V C 1.8V TB(3) = 82 --> + Historical bytes: 80 31 E0 73 FE 21 1F 65 D0 02 09 14 6C 81 0F Category indicator byte: 80 (compact TLV data object) Tag: 3, len: 1 (card service data byte) Card service data byte: E0 - Application selection: by full DF name - Application selection: by partial DF name - BER-TLV data objects available in EF.DIR - EF.DIR and EF.ATR access services: by GET RECORD(s) command - Card with MF Tag: 7, len: 3 (card capabilities) Selection methods: FE - DF selection by full DF name - DF selection by partial DF name - DF selection by path - DF selection by file identifier - Implicit DF selection - Short EF identifier supported - Record number supported Data coding byte: 21 - Behaviour of write functions: proprietary - Value 'FF' for the first byte of BER-TLV tag fields: invalid - Data unit in quartets: 2 Command chaining, length fields and logical channels: 1F - Logical channel number assignment: by the interface device and card - Maximum number of logical channels: 8 Tag: 6, len: 5 (pre-issuing data) Data: D0 02 09 14 6C Tag: 8, len: 1 (status indicator) LCS (life card cycle): 0F + TCK = 13 (correct checksum)
I checked the debug output on the ST2 board and this is all that I see: ============================================================================= SIMtrace2 firmware 0.8.1.33-9088, BOARD=simtrace, APP=cardem (C) 2010-2019 by Harald Welte, 2018-2019 by Kevin Redon ============================================================================= -I- Chip ID: 0x28900960 (Ext 0x00000000) -I- Serial Nr. 51203220-59393152-33303120-33323033 -I- Reset Cause: general reset (first power-up reset) -I- USB init... USBD_Init SetAddr(8) -W- Sta 0x888A8 [0] -W- _ -W- Sta 0x888A8 [0] -W- _ -W- Sta 0x888A8 [0] -W- _ SetCfg(1) cfgChanged1 -I- calling configure of all configurations... -I- calling init of config 1... -I- Modem 0: physical SIM -I- 0: Use local/physical SIM<CR><LF>-I- entering main loop... -I- USB is now configured -W- Sta 0x88828 [0] -W- _
I could really use some help. I am so close to getting this functional but stuck on this snag.
Thank you, Paul
Hi Paul,
On Thu, Apr 21, 2022 at 08:17:50PM -0000, pnederveen@eseye.com wrote:
@ubuntu:~$ sudo osmo-remsim-server 35014 DLINP NOTICE input/ipa.c:283 0.0.0.0:9998 accept()ed new link from 127.0.0.1:36289 35087 DSLOTMAP INFO ../slotmap.c:135 Slot Map B(1:0) <-> C(1:0) added 35087 DMAIN INFO rest_api.c:333 Slot Map B(1:0) <-> C(1:0) state change: NEW -> NEW 35087 DMAIN INFO rest_api.c:339 Slot Map B(1:0) <-> C(1:0) state change: NEW -> NEW 35014 DMAIN INFO rspro_server.c:716 Event FD arrived, checking for any pending work 35014 DMAIN INFO rspro_server.c:391 Slot Map B(1:0) <-> C(1:0) state change: NEW -> UNACKNOWLEDGED 35014 DMAIN INFO rspro_server.c:363 Slot Map B(1:0) <-> C(1:0) state change: UNACKNOWLEDGED -> ACTIVE
this looks good.
35019 DBANKDW INFO bankd_main.c:442 [000 CONN_WAIT_ID] Changing state to ACCEPTING 35018 DSLOTMAP INFO ../slotmap.c:135 Slot Map B(1:0) <-> C(1:0) added
this looks also good.
35019 DBANKDW INFO bankd_main.c:955 [000 ACCEPTING] Accepted connection from 192.168.70.218:41431 35019 DBANKDW INFO bankd_main.c:442 [000 ACCEPTING] Changing state to CONN_WAIT_ID 35019 DBANKDW INFO bankd_main.c:655 [000 CONN_WAIT_ID] Rx RSPRO connectClientReq(T=0, N='raspberrypi', SW='remsim-client', VER='1.0.0') 35019 DBANKDW INFO bankd_main.c:442 [000 CONN_WAIT_ID] Changing state to CONN_CLIENT 35019 DBANKDW INFO bankd_main.c:625 [000 CONN_CLIENT] slotmap found: C(1:0) -> B(1:0) 35019 DBANKDW INFO bankd_main.c:450 [000 CONN_CLIENT] Changing state to CONN_CLIENT_MAPPED (timeout=10)
also good.
35019 DBANKDW INFO bankd_pcsc.c:261 [000 CONN_CLIENT_MAPPED] Attempting to open PC/SC context 35019 DBANKDW INFO bankd_pcsc.c:264 [000 CONN_CLIENT_MAPPED] SCardEstablishContext: OK 35019 DBANKDW INFO bankd_pcsc.c:215 [000 CONN_CLIENT_MAPPED] Attempting to find card/slot using regex 'OMNIKEY AG CardMan 3121 (OKCM0012007091219038212815383974) 00 00' 35019 DBANKDW INFO bankd_pcsc.c:234 [000 CONN_CLIENT_MAPPED] Attempting to open card/slot 'OMNIKEY AG CardMan 3121 (OKCM0012007091219038212815383974) 00 00' 35019 DBANKDW INFO bankd_pcsc.c:198 [000 CONN_CLIENT_MAPPED] SCardStatus: OK 35019 DBANKDW INFO bankd_pcsc.c:200 [000 CONN_CLIENT_MAPPED] Card ATR: 3b9f96c00a3fc7828031e073fe211f65d00209146c810f13 35019 DBANKDW INFO bankd_main.c:442 [000 CONN_CLIENT_MAPPED] Changing state to CONN_CLIENT_MAPPED_CARD
fine.
On the RPi running the client I get: pi@raspberrypi:~ $ sudo osmo-remsim-client-st2 --usb-vendor 1d50 --usb-product 60e3 --usb-path 1-1.3 --usb-interface 0 --usb-config 1 --usb-altsetting 0 --client-id 1 --client-slot 0 --server-ip 192.168.70.241 --server-port 9999
your remsim-server is running on port 9998 above, but you're configuring remsim-client to connect to port 9999. I'm not sure about the IP addresses in your setup..
DRSPRO INFO ../rspro_client_fsm.c:307 RSPRO_CLIENT(server){REESTABLISH}: Creating TCP connection to server at 192.168.70.241:9999 DLINP NOTICE simtrace2_api.c:271 [0] <= osmo_st2_cardem_request_config(features=00000001) DLINP NOTICE input/ipa.c:128 192.168.70.241:9999 connection done DRSPRO NOTICE ../rspro_client_fsm.c:127 RSPRO_CLIENT(server){REESTABLISH}: RSPRO link to 192.168.70.241:9999 UP DRSPRO ERROR remsim_client.c:121 RSPRO_CLIENT(server){CONNECTED}: Unknown/Unsupported RSPRO PDU type: setAtrReq
This is because setAtrReq is permitted on the communication between bankd and client, and not on the connection between server and client. So you appear to have established the _control_ connection (between client and server) to the bankd instead of the server.
The control connection between client and server will then, depending on the current mappings configured, instruct the client to connect to the bankd.
Admittedly, the error hadnling could be improved in this scenario. It's just so "odd" to me that I had never thought of this ever occurring in the first place :/
Regards, Harald
Hi again,
On Mon, Apr 25, 2022 at 03:34:04PM +0200, Harald Welte wrote:
your remsim-server is running on port 9998 above, but you're configuring remsim-client to connect to port 9999. I'm not sure about the IP addresses in your setup..
btw, the default listen port for the server is 9998 an the default --server-port of the client is 9998, so if you don't specify the parameter, it will do the right thing.
DRSPRO INFO ../rspro_client_fsm.c:307 RSPRO_CLIENT(server){REESTABLISH}: Creating TCP connection to server at 192.168.70.241:9999 DLINP NOTICE simtrace2_api.c:271 [0] <= osmo_st2_cardem_request_config(features=00000001) DLINP NOTICE input/ipa.c:128 192.168.70.241:9999 connection done DRSPRO NOTICE ../rspro_client_fsm.c:127 RSPRO_CLIENT(server){REESTABLISH}: RSPRO link to 192.168.70.241:9999 UP DRSPRO ERROR remsim_client.c:121 RSPRO_CLIENT(server){CONNECTED}: Unknown/Unsupported RSPRO PDU type: setAtrReq
This is because setAtrReq is permitted on the communication between bankd and client, and not on the connection between server and client. So you appear to have established the _control_ connection (between client and server) to the bankd instead of the server.
The control connection between client and server will then, depending on the current mappings configured, instruct the client to connect to the bankd.
Admittedly, the error hadnling could be improved in this scenario. It's just so "odd" to me that I had never thought of this ever occurring in the first place :/
See https://osmocom.org/issues/5548 + https://gerrit.osmocom.org/c/osmo-remsim/+/27929
With that change it now logs the following in this situation:
DRSPRO ERROR remsim_client.c:105 RSPRO_CLIENT(server){ESTABLISHED}: Server connection to a ComponentType(2) != RemsimServer? Check your IP/Port configuration
Thank you for the response Harald. I do not have everything set up to locally recreate the build. I used apt to update but the change is not getting pulled in yet.
However, I get what you are saying about the ports, and I had intentionally set '--server-port 9999' to overcome a different problem but I just managed to move it around. Therefore based on your comments I went back to the defaults. Here I will exactly explain the setup and IP addresses and then show you the output I get when using default values.
Ubuntu 20.04 VM running remsim-server, remsim-bankd. Single cardreader mounted. VM IP address = 192.168.70.241
RPi w/ Rasbian lite image. ST2 board attached and cardem FW loaded. RPi IP address = 192.168.70.218
On the VM I manually start the server and bankd in terminals to monitor stderr
slotmapping command for reference @ubuntu:~$ python3 remsim-apitool.py -m 1 0 1 0
@ubuntu:~$ sudo osmo-remsim-server 40918 DLINP NOTICE input/ipa.c:283 0.0.0.0:9998 accept()ed new link from 127.0.0.1:41729 40918 DLINP NOTICE input/ipa.c:283 0.0.0.0:9998 accept()ed new link from 192.168.70.218:41267 40926 DSLOTMAP INFO ../slotmap.c:135 Slot Map B(1:0) <-> C(1:0) added 40926 DMAIN INFO rest_api.c:333 Slot Map B(1:0) <-> C(1:0) state change: NEW -> NEW 40926 DMAIN INFO rest_api.c:339 Slot Map B(1:0) <-> C(1:0) state change: NEW -> NEW 40918 DMAIN INFO rspro_server.c:716 Event FD arrived, checking for any pending work 40918 DMAIN INFO rspro_server.c:391 Slot Map B(1:0) <-> C(1:0) state change: NEW -> UNACKNOWLEDGED 40918 DMAIN INFO rspro_server.c:363 Slot Map B(1:0) <-> C(1:0) state change: UNACKNOWLEDGED -> ACTIVE
@ubuntu:~$ sudo osmo-remsim-bankd -b 1 -n 1 40921 DMAIN INFO bankd_pcsc.c:105 PC/SC slot name: 1/0 -> regex 'OMNIKEY AG CardMan 3121 (OKCM0012007091219038212815383974) 00 00' 40921 DRSPRO INFO ../rspro_client_fsm.c:307 RSPRO_CLIENT(server){REESTABLISH}: Creating TCP connection to server at localhost:9998 40921 DLINP NOTICE input/ipa.c:128 localhost:9998 connection done 40921 DRSPRO NOTICE ../rspro_client_fsm.c:127 RSPRO_CLIENT(server){REESTABLISH}: RSPRO link to localhost:9998 UP 40922 DBANKDW INFO bankd_main.c:442 [000 INIT] Changing state to INIT 40922 DBANKDW INFO bankd_main.c:442 [000 INIT] Changing state to ACCEPTING 40921 DSLOTMAP INFO ../slotmap.c:135 Slot Map B(1:0) <-> C(1:0) added
The command on the RPi (no manual server port included this time)
pi@raspberrypi:~ $ sudo osmo-remsim-client-st2 --usb-vendor 1d50 --usb-product 60e3 --usb-path 1-1.3 --usb-interface 0 --usb-config 1 --usb-altsetting 0 --client-id 1 --client-slot 0 --server-ip 192.168.70.241 DRSPRO INFO ../rspro_client_fsm.c:307 RSPRO_CLIENT(server){REESTABLISH}: Creating TCP connection to server at 192.168.70.241:9998 DLINP NOTICE simtrace2_api.c:271 [0] <= osmo_st2_cardem_request_config(features=00000001) DLINP NOTICE input/ipa.c:128 192.168.70.241:9998 connection done DRSPRO NOTICE ../rspro_client_fsm.c:127 RSPRO_CLIENT(server){REESTABLISH}: RSPRO link to 192.168.70.241:9998 UP DRSPRO INFO ../rspro_client_fsm.c:307 RSPRO_CLIENT(bankd){REESTABLISH}: Creating TCP connection to server at 127.0.0.1:9999 DRSPRO NOTICE ../rspro_client_fsm.c:127 RSPRO_CLIENT(bankd){REESTABLISH}: RSPRO link to 127.0.0.1:9999 DOWN DRSPRO ERROR ../rspro_client_fsm.c:297 RSPRO_CLIENT(bankd){REESTABLISH}: Event SRVC_E_KA_TERMINATED not permitted DRSPRO INFO ../rspro_client_fsm.c:302 RSPRO_CLIENT(bankd){REESTABLISH}: Destroying existing connection to server DRSPRO INFO ../rspro_client_fsm.c:307 RSPRO_CLIENT(bankd){REESTABLISH}: Creating TCP connection to server at 127.0.0.1:9999 DRSPRO NOTICE ../rspro_client_fsm.c:127 RSPRO_CLIENT(bankd){REESTABLISH}: RSPRO link to 127.0.0.1:9999 DOWN ^C pi@raspberrypi:~ $
When I saw the port 9999 in there and I kept getting this error, I tried to switch the client to manually use :9999. It seemed to get closer to working because bankd reported it was opening the card reader. You comments prove that was not the usage I needed.
Thank you for feedback, I know I must be close.
Best, Paul
Hi Paul,
On Mon, Apr 25, 2022 at 03:42:06PM -0000, pnederveen@eseye.com wrote:
Thank you for the response Harald. I do not have everything set up to locally recreate the build. I used apt to update but the change is not getting pulled in yet.
yes, it is not yet reviewed/merged I guess. In any case, it just improves error reporting and doesn't change any functionality.
@ubuntu:~$ sudo osmo-remsim-server
all good here
@ubuntu:~$ sudo osmo-remsim-bankd -b 1 -n 1
also looks good
The command on the RPi (no manual server port included this time)
pi@raspberrypi:~ $ sudo osmo-remsim-client-st2 --usb-vendor 1d50 --usb-product 60e3 --usb-path 1-1.3 --usb-interface 0 --usb-config 1 --usb-altsetting 0 --client-id 1 --client-slot 0 --server-ip 192.168.70.241 DRSPRO INFO ../rspro_client_fsm.c:307 RSPRO_CLIENT(server){REESTABLISH}: Creating TCP connection to server at 192.168.70.241:9998 DLINP NOTICE simtrace2_api.c:271 [0] <= osmo_st2_cardem_request_config(features=00000001) DLINP NOTICE input/ipa.c:128 192.168.70.241:9998 connection done DRSPRO NOTICE ../rspro_client_fsm.c:127 RSPRO_CLIENT(server){REESTABLISH}: RSPRO link to 192.168.70.241:9998 UP DRSPRO INFO ../rspro_client_fsm.c:307 RSPRO_CLIENT(bankd){REESTABLISH}: Creating TCP connection to server at 127.0.0.1:9999
So what happens here is that * bankd connects to server (via 127.0.0.1) * server stores that bankd is at 127.0.0.1 * client connects to server (192.168.70.241:9998) * server tells client to use bankd @ 127.0.0.1 * client tries to connect to bankd @ 127.0.0.1, which fails, as it is not on localhost
So the problem in your setup is mixing loopback addresses with routed network addresses.
In case of doubt, start with running bankd + server on separate machines, and see if that works. If it does, try to migrate the working configuration to something where multiple components run on the same machine, but without using non-routable IP addresses.
Hi Harald,
Thanks for the help! That is the last missing piece I needed. I was trying to solve this mapping issue before by trying to direct the client manually to bankd, which caused my original post. Once you explained that the server was essentially "handing off" the registered IP address of bankd it all made sense.
All I needed to was add '-i 192.168.70.241' (i.e. the LAN if IP address) to my bankd command and it worked perfect!
All is behaving well now and thank you again for the support!
Cheers, Paul
Paul Nederveen Director of Technical Consulting t: +1 484 935 3130 | m: +19196496363 | w: eseye.com LinkedIn | Twitter | YouTube | Blog This email is from Eseye . Address: 2880 Zanker Rd, Suite 203, San Jose, California, 95134, United States. Registered in England and Wales - number 06397669. VAT: GB921298326. ISO 27001: 2013 Certified. If you are not the intended recipient, please notify the sender and delete this email and any attachments. Eseye, AnyNet, AnyNet Secure and Eseye Logos are registered trademarks. 2020 Eseye Limited. All rights reserved. -----Original Message----- From: Harald Welte laforge@osmocom.org Sent: Tuesday, April 26, 2022 11:58 AM To: Paul Nederveen pnederveen@eseye.com Cc: simtrace@lists.osmocom.org Subject: Re: remsim unknwon RSPRO PDU type
Hi Paul,
On Mon, Apr 25, 2022 at 03:42:06PM -0000, pnederveen@eseye.com wrote:
Thank you for the response Harald. I do not have everything set up to locally recreate the build. I used apt to update but the change is not getting pulled in yet.
yes, it is not yet reviewed/merged I guess. In any case, it just improves error reporting and doesn't change any functionality.
@ubuntu:~$ sudo osmo-remsim-server
all good here
@ubuntu:~$ sudo osmo-remsim-bankd -b 1 -n 1
also looks good
The command on the RPi (no manual server port included this time)
pi@raspberrypi:~ $ sudo osmo-remsim-client-st2 --usb-vendor 1d50 --usb-product 60e3 --usb-path 1-1.3 --usb-interface 0 --usb-config 1 --usb-altsetting 0 --client-id 1 --client-slot 0 --server-ip 192.168.70.241 DRSPRO INFO ../rspro_client_fsm.c:307 RSPRO_CLIENT(server){REESTABLISH}: Creating TCP connection to server at 192.168.70.241:9998 DLINP NOTICE simtrace2_api.c:271 [0] <= osmo_st2_cardem_request_config(features=00000001) DLINP NOTICE input/ipa.c:128 192.168.70.241:9998 connection done DRSPRO NOTICE ../rspro_client_fsm.c:127 RSPRO_CLIENT(server){REESTABLISH}: RSPRO link to 192.168.70.241:9998 UP DRSPRO INFO ../rspro_client_fsm.c:307 RSPRO_CLIENT(bankd){REESTABLISH}: Creating TCP connection to server at 127.0.0.1:9999
So what happens here is that * bankd connects to server (via 127.0.0.1) * server stores that bankd is at 127.0.0.1 * client connects to server (192.168.70.241:9998) * server tells client to use bankd @ 127.0.0.1 * client tries to connect to bankd @ 127.0.0.1, which fails, as it is not on localhost
So the problem in your setup is mixing loopback addresses with routed network addresses.
In case of doubt, start with running bankd + server on separate machines, and see if that works. If it does, try to migrate the working configuration to something where multiple components run on the same machine, but without using non-routable IP addresses.