bb-osmocom: sim.c

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/baseband-devel@lists.osmocom.org/.

Ton Slewe ton.slewe at gmail.com
Sun Nov 28 22:09:59 UTC 2010


I have trying the osmocom apps today (firmware). One of the apps,
simtest, did not seem to work well.

I have tracked down the error to sim.c. I tried to push it to the GIT
repository which does not seem to work (credentials?). Maybe somebody
can patch it in their version and then push it. Or otherwise please
point me in the direction to get it fixed in the repository.

Some of the variables on top of the file are not declared as volatile
(they should be because they are modified in an Interrupt Service
Routine). I changed all the variables on top of the file into volatile:

static volatile int sim_rx_character_count = 0; /* How many bytes have
been received by calypso_sim_receive() */
static volatile int sim_tx_character_count = 0; /* How many bytes have
been transmitted by calypso_sim_transmit() */
static volatile int sim_tx_character_length = 0; /* How many bytes have
to be transmitted by calypso_sim_transmit() */
static volatile uint8_t *rx_buffer = 0; /* RX-Buffer that is issued by
calypso_sim_receive() */
static volatile uint8_t *tx_buffer = 0; /* TX-Buffer that is issued by
calypso_sim_transmit() */

Now simtest is working as expected.

Kind regards,
Ton





More information about the baseband-devel mailing list