Hello everyone!
I'm new to simtrace and I'm trying to set up a test with a Simtrace2
board connected to a RPI (which I'll call the client from now on) and
a different RPI with an attached card reader (which I'll call the
server).
The server runs osmo-remsim-bankd and osmo-remsim-server (installed
from your debian repo). The bankd server has its configuration csv
file filled with the correct reader information. The
osmo-remsim-server runs on the same machine and has a mapping
configured via the python api tool to map client 1 to bank 1, like so:
root@rpi-cardem-1:~# python3 /etc/osmocom/osmo-remsim-apitool -a
/clients: {'clients': []}
/banks: {'banks': [{'peer': 'B1', 'state':
'CONNECTED_BANKD',
'component_id': {'type_': 'remsimBankd', 'name':
'fixme-name',
'software': 'remsim-bankd', 'swVersion': '1.0.0'},
'bankId': 1,
'numberOfSlots': 5}]}
/slotmaps: {'slotmaps': [{'bank': {'bankId': 1, 'slotNr':
1},
'client': {'clientId': 1, 'slotNr': 1}, 'state':
'ACTIVE'}]}
The client runs osmo-remsim-client-st2 like this:
root@rpi-cardem-2:~# osmo-remsim-client-st2 --server-ip remsim-server
--server-port 9998 --client-id 1 --client-slot 1 --usb-vendor 1d50
--usb-product 60e3 --usb-config 1 --usb-interface 0 --usb-path "1-1.4"
However, based on the logs, it tries to contact the bankd server at
127.0.0.1:9999 instead of remsim-server:9999:
DRSPRO INFO ../rspro_client_fsm.c:307
RSPRO_CLIENT(server){REESTABLISH}: Creating TCP connection to server
at remsim-server:9998
DLINP NOTICE simtrace2_api.c:271 [0] <=
osmo_st2_cardem_request_config(features=00000001)
DLINP NOTICE input/ipa.c:141 remsim-server:9998 connection done
DRSPRO NOTICE ../rspro_client_fsm.c:127
RSPRO_CLIENT(server){REESTABLISH}: RSPRO link to remsim-server: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
The bankd server listens on 0.0.0.0 on the server side:
root@rpi-cardem-1:~# netstat -tpan | grep osmo | grep LISTEN
tcp 0 0 0.0.0.0:9997 0.0.0.0:*
LISTEN 409/osmo-remsim-ser
tcp 0 0 0.0.0.0:9998 0.0.0.0:*
LISTEN 409/osmo-remsim-ser
tcp 0 0 0.0.0.0:9999 0.0.0.0:*
LISTEN 405/osmo-remsim-ban
My question is - how is osmo-remsim-client-st2 getting the IP address
of the bankd server? What did I do wrong?
I've tried a few tricks to redirect traffic from 127.0.0.1:9999 to
remsim-server:9999, but so far have failed. This is what I've tried as
a proxy, but the connection seems to get garbled because netcat
expects LF terminated strings:
nc -l 127.0.0.1 9999 | nc remsim-server 9999
Thanks for the help
Cheers,
Adrian