<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Times New Roman \(Body CS\)";
panose-1:2 11 6 4 2 2 2 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style>
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">As a follow up to my initial email Issue 2 is resolved by calling with the static logging structure, per other apps.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:12.0pt">static struct log_info log_info = {};<o:p></o:p></span></b></p>
<p class="MsoNormal"><b><span style="font-size:12.0pt">osmo_init_logging2(NULL, &log_info);<o:p></o:p></span></b></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt">The main in simtrace2-tool.c should add this call<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:12.0pt"><o:p> </o:p></span></p>
<div style="border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:12.0pt;color:black">From:
</span></b><span style="font-size:12.0pt;color:black">Support tickets from customers with support contract via RT <support@sysmocom.de><br>
<b>Date: </b>Wednesday, October 6, 2021 at 11:17 AM<br>
<b>To: </b>Paul Cevoli <pcevoli@kvh.com><br>
<b>Subject: </b>[rt.sysmocom.de #53159] AutoReply: Simtrace2 tools question<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">** Caution - External Email **<br>
<br>
<br>
Dear Customer,<br>
<br>
we are sorry to hear that you are experiencing some difficulty regarding<br>
your sysmocom product and had to contact our support team. We will look<br>
at your request as soon as possible.<br>
<br>
This message has been automatically generated in response to your<br>
sales inquiry regarding "Simtrace2 tools question",<br>
a summary of which appears below.<br>
<br>
There is no need to reply to this message right now. Your ticket has been<br>
assigned an ID of [rt.sysmocom.de #53159].<br>
<br>
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.<br>
<br>
Thank you,<br>
support@sysmocom.de<br>
<br>
-------------------------------------------------------------------------<br>
Good morning,<br>
<br>
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<br>
<br>
* Cross compiling errors with the simtrace2 host tools<br>
* simtrace2-tool run time logging errors<br>
<br>
Issue #1 simtrace2-cardem-pcsc.c app<br>
<br>
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?<br>
<br>
CC simtrace2-cardem-pcsc.o<br>
simtrace2-cardem-pcsc.c: In function ‘update_flags’:<br>
simtrace2-cardem-pcsc.c:94:4: warning: implicit declaration of function ‘osim_card_reset’; did you mean ‘osim_card_open’? [-Wimplicit-function-declaration]<br>
94 | osim_card_reset(card, cold_reset);<br>
| ^~~~~~~~~~~~~~~<br>
| osim_card_open<br>
simtrace2-cardem-pcsc.c: In function ‘main’:<br>
simtrace2-cardem-pcsc.c:441:23: error: ‘OSIM_MAX_ATR_LEN’ undeclared (first use in this function); did you mean ‘USB_MAX_PATH_LEN’?<br>
441 | uint8_t override_atr[OSIM_MAX_ATR_LEN];<br>
| ^~~~~~~~~~~~~~~~<br>
| USB_MAX_PATH_LEN<br>
simtrace2-cardem-pcsc.c:441:23: note: each undeclared identifier is reported only once for each function it appears in<br>
simtrace2-cardem-pcsc.c:611:45: error: ‘struct osim_card_hdl’ has no member named ‘atr’<br>
611 | osmo_st2_cardem_request_set_atr(ci, card->atr, card->atr_len);<br>
| ^~<br>
simtrace2-cardem-pcsc.c:611:56: error: ‘struct osim_card_hdl’ has no member named ‘atr_len’<br>
611 | osmo_st2_cardem_request_set_atr(ci, card->atr, card->atr_len);<br>
| ^~<br>
simtrace2-cardem-pcsc.c:441:10: warning: unused variable ‘override_atr’ [-Wunused-variable]<br>
441 | uint8_t override_atr[OSIM_MAX_ATR_LEN];<br>
| ^~~~~~~~~~~~<br>
make: *** [Makefile:465: simtrace2-cardem-pcsc.o] Error 1<br>
<br>
Issue #2 simtrace2-tool<br>
<br>
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.<br>
<br>
When trying to use the built version of simtrace2-tool the following stack track occurs:<br>
<br>
$ simtrace2-tool -V 1d50 -P 60e3 -C 2 -I 0 -S 0 -A 10 modem sim-switch local<br>
(C) 2019 Harald Welte <laforge@gnumonks.org<mailto:laforge@gnumonks.org>><br>
Setting SIM=LOCAL; Modem reset recommended<br>
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()!><br>
Assert failed osmo_log_info ../../git/src/logging.c:299<br>
backtrace() returned 8 addresses<br>
/usr/lib/libosmocore.so.17(osmo_panic+0xd8) [0xffffbc03abb8]<br>
/usr/lib/libosmocore.so.17(log_parse_level+0) [0xffffbc037c00]<br>
/usr/lib/libosmocore.so.17(log_check_level+0x30) [0xffffbc039120]<br>
/usr/lib/libosmo-simtrace2.so.0(+0x1c50) [0xffffbc077c50]<br>
simtrace2-tool(+0x13fc) [0xaaaac79f13fc]<br>
/lib/libc.so.6(__libc_start_main+0xe8) [0xffffbbea7878]<br>
simtrace2-tool(+0x15b8) [0xaaaac79f15b8]<br>
Aborted<br>
<br>
Adding the osmo logging initialization (listed below) does not, at first glance, appear to help<br>
<br>
<br>
static struct log_info log_info = {};<br>
<br>
rc = osmo_libusb_init(NULL);<br>
if (rc < 0) {<br>
fprintf(stderr, "libusb initialization failed\n");<br>
return rc;<br>
}<br>
<br>
Thank you,<br>
<br>
<br>
<br>
<br>
<br>
-------------------------------------------------------------------------<br>
* sysmocom - systems for mobile communications GmbH<br>
* Alt-Moabit 93<br>
* 10559 Berlin, Germany<br>
* Sitz / Registered office: Berlin, HRB 134158 B<br>
* Geschaeftsfuehrer / Managing Directors: Harald Welte<o:p></o:p></p>
</div>
</div>
</body>
</html>