Hi Paul,
On Thu, Apr 21, 2022 at 08:17:50PM -0000, pnederveen(a)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
--
- Harald Welte <laforge(a)osmocom.org>
http://laforge.gnumonks.org/
============================================================================
"Privacy in residential applications is a desirable marketing option."
(ETSI EN 300 175-7 Ch. A6)