Good morning,
Working with the simtrace2 code cross compiled for an a53 processor and am running into a
few issues. This email summarizes the issues and am wondering if anybody has either
resolved these or has any suggestions. The issues are
* Cross compiling errors with the simtrace2 host tools
* simtrace2-tool run time logging errors
Issue #1 simtrace2-cardem-pcsc.c app
Simtrace2 requires libosmocore. When trying to build the simtrace2 host tools neither
tagged versions of libosmcore 1.5.1 or 1.5.2 will compile correctly. The only way to get
the simtrace2 host tools to compile is to use commit cfea39ba. Otherwise the following
syntax errors occur in the simtrace2-cardem-pcsc.c app. Is there some magic required to
have the simtrace2 host tools compile with a tagged version of libosmocore?
CC simtrace2-cardem-pcsc.o
simtrace2-cardem-pcsc.c: In function ‘update_flags’:
simtrace2-cardem-pcsc.c:94:4: warning: implicit declaration of function ‘osim_card_reset’;
did you mean ‘osim_card_open’? [-Wimplicit-function-declaration]
94 | osim_card_reset(card, cold_reset);
| ^~~~~~~~~~~~~~~
| osim_card_open
simtrace2-cardem-pcsc.c: In function ‘main’:
simtrace2-cardem-pcsc.c:441:23: error: ‘OSIM_MAX_ATR_LEN’ undeclared (first use in this
function); did you mean ‘USB_MAX_PATH_LEN’?
441 | uint8_t override_atr[OSIM_MAX_ATR_LEN];
| ^~~~~~~~~~~~~~~~
| USB_MAX_PATH_LEN
simtrace2-cardem-pcsc.c:441:23: note: each undeclared identifier is reported only once for
each function it appears in
simtrace2-cardem-pcsc.c:611:45: error: ‘struct osim_card_hdl’ has no member named ‘atr’
611 | osmo_st2_cardem_request_set_atr(ci, card->atr, card->atr_len);
| ^~
simtrace2-cardem-pcsc.c:611:56: error: ‘struct osim_card_hdl’ has no member named
‘atr_len’
611 | osmo_st2_cardem_request_set_atr(ci, card->atr, card->atr_len);
| ^~
simtrace2-cardem-pcsc.c:441:10: warning: unused variable ‘override_atr’
[-Wunused-variable]
441 | uint8_t override_atr[OSIM_MAX_ATR_LEN];
| ^~~~~~~~~~~~
make: *** [Makefile:465: simtrace2-cardem-pcsc.o] Error 1
Issue #2 simtrace2-tool
Simtrace2-tool has an assertion error in the osmo logging system, perhaps this is related
to the question above about using tagged versions of libosmocore.
When trying to use the built version of simtrace2-tool the following stack track occurs:
$ simtrace2-tool -V 1d50 -P 60e3 -C 2 -I 0 -S 0 -A 10 modem sim-switch local
(C) 2019 Harald Welte <laforge@gnumonks.org<mailto:laforge@gnumonks.org>>
Setting SIM=LOCAL; Modem reset recommended
ERROR: osmo_log_info == NULL! You must call log_init() before using logging in
log_check_level()!<webextlink://You%20must%20call%20log_init()%20before%20using%20logging%20in%20log_check_level()!>
Assert failed osmo_log_info ../../git/src/logging.c:299
backtrace() returned 8 addresses
/usr/lib/libosmocore.so.17(osmo_panic+0xd8) [0xffffbc03abb8]
/usr/lib/libosmocore.so.17(log_parse_level+0) [0xffffbc037c00]
/usr/lib/libosmocore.so.17(log_check_level+0x30) [0xffffbc039120]
/usr/lib/libosmo-simtrace2.so.0(+0x1c50) [0xffffbc077c50]
simtrace2-tool(+0x13fc) [0xaaaac79f13fc]
/lib/libc.so.6(__libc_start_main+0xe8) [0xffffbbea7878]
simtrace2-tool(+0x15b8) [0xaaaac79f15b8]
Aborted
Adding the osmo logging initialization (listed below) does not, at first glance, appear to
help
static struct log_info log_info = {};
rc = osmo_libusb_init(NULL);
if (rc < 0) {
fprintf(stderr, "libusb initialization failed\n");
return rc;
}
Thank you,
Show replies by date
As a follow up to my initial email Issue 2 is resolved by calling with the static logging
structure, per other apps.
static struct log_info log_info = {};
osmo_init_logging2(NULL, &log_info);
The main in simtrace2-tool.c should add this call
From: Support tickets from customers with support contract via RT
<support(a)sysmocom.de>
Date: Wednesday, October 6, 2021 at 11:17 AM
To: Paul Cevoli <pcevoli(a)kvh.com>
Subject: [rt.sysmocom.de #53159] AutoReply: Simtrace2 tools question
** Caution - External Email **
Dear Customer,
we are sorry to hear that you are experiencing some difficulty regarding
your sysmocom product and had to contact our support team. We will look
at your request as soon as possible.
This message has been automatically generated in response to your
sales inquiry regarding "Simtrace2 tools question",
a summary of which appears below.
There is no need to reply to this message right now. Your ticket has been
assigned an ID of [rt.sysmocom.de #53159].
Please include the string: [rt.sysmocom.de #53159] in the subject line of all future
correspondence about this issue. To do so, you may reply to this message.
Thank you,
support(a)sysmocom.de
-------------------------------------------------------------------------
Good morning,
Working with the simtrace2 code cross compiled for an a53 processor and am running into a
few issues. This email summarizes the issues and am wondering if anybody has either
resolved these or has any suggestions. The issues are
* Cross compiling errors with the simtrace2 host tools
* simtrace2-tool run time logging errors
Issue #1 simtrace2-cardem-pcsc.c app
Simtrace2 requires libosmocore. When trying to build the simtrace2 host tools neither
tagged versions of libosmcore 1.5.1 or 1.5.2 will compile correctly. The only way to get
the simtrace2 host tools to compile is to use commit cfea39ba. Otherwise the following
syntax errors occur in the simtrace2-cardem-pcsc.c app. Is there some magic required to
have the simtrace2 host tools compile with a tagged version of libosmocore?
CC simtrace2-cardem-pcsc.o
simtrace2-cardem-pcsc.c: In function ‘update_flags’:
simtrace2-cardem-pcsc.c:94:4: warning: implicit declaration of function ‘osim_card_reset’;
did you mean ‘osim_card_open’? [-Wimplicit-function-declaration]
94 | osim_card_reset(card, cold_reset);
| ^~~~~~~~~~~~~~~
| osim_card_open
simtrace2-cardem-pcsc.c: In function ‘main’:
simtrace2-cardem-pcsc.c:441:23: error: ‘OSIM_MAX_ATR_LEN’ undeclared (first use in this
function); did you mean ‘USB_MAX_PATH_LEN’?
441 | uint8_t override_atr[OSIM_MAX_ATR_LEN];
| ^~~~~~~~~~~~~~~~
| USB_MAX_PATH_LEN
simtrace2-cardem-pcsc.c:441:23: note: each undeclared identifier is reported only once for
each function it appears in
simtrace2-cardem-pcsc.c:611:45: error: ‘struct osim_card_hdl’ has no member named ‘atr’
611 | osmo_st2_cardem_request_set_atr(ci, card->atr, card->atr_len);
| ^~
simtrace2-cardem-pcsc.c:611:56: error: ‘struct osim_card_hdl’ has no member named
‘atr_len’
611 | osmo_st2_cardem_request_set_atr(ci, card->atr, card->atr_len);
| ^~
simtrace2-cardem-pcsc.c:441:10: warning: unused variable ‘override_atr’
[-Wunused-variable]
441 | uint8_t override_atr[OSIM_MAX_ATR_LEN];
| ^~~~~~~~~~~~
make: *** [Makefile:465: simtrace2-cardem-pcsc.o] Error 1
Issue #2 simtrace2-tool
Simtrace2-tool has an assertion error in the osmo logging system, perhaps this is related
to the question above about using tagged versions of libosmocore.
When trying to use the built version of simtrace2-tool the following stack track occurs:
$ simtrace2-tool -V 1d50 -P 60e3 -C 2 -I 0 -S 0 -A 10 modem sim-switch local
(C) 2019 Harald Welte <laforge@gnumonks.org<mailto:laforge@gnumonks.org>>
Setting SIM=LOCAL; Modem reset recommended
ERROR: osmo_log_info == NULL! You must call log_init() before using logging in
log_check_level()!<webextlink://You%20must%20call%20log_init()%20before%20using%20logging%20in%20log_check_level()!>
Assert failed osmo_log_info ../../git/src/logging.c:299
backtrace() returned 8 addresses
/usr/lib/libosmocore.so.17(osmo_panic+0xd8) [0xffffbc03abb8]
/usr/lib/libosmocore.so.17(log_parse_level+0) [0xffffbc037c00]
/usr/lib/libosmocore.so.17(log_check_level+0x30) [0xffffbc039120]
/usr/lib/libosmo-simtrace2.so.0(+0x1c50) [0xffffbc077c50]
simtrace2-tool(+0x13fc) [0xaaaac79f13fc]
/lib/libc.so.6(__libc_start_main+0xe8) [0xffffbbea7878]
simtrace2-tool(+0x15b8) [0xaaaac79f15b8]
Aborted
Adding the osmo logging initialization (listed below) does not, at first glance, appear to
help
static struct log_info log_info = {};
rc = osmo_libusb_init(NULL);
if (rc < 0) {
fprintf(stderr, "libusb initialization failed\n");
return rc;
}
Thank you,
-------------------------------------------------------------------------
* sysmocom - systems for mobile communications GmbH
* Alt-Moabit 93
* 10559 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B
* Geschaeftsfuehrer / Managing Directors: Harald Welte