Each L1CTL message gets its own length pushed in front before
sending. This isn't specified in the 'l1ctl_proto.h', but
assumed in the code. Let's clarify this.
Change-Id: I118d00613aeaf5ff0bad1188fa5f7450d4ca8122
This change introduces the following state machines:
- trxcon_app_fsm - main application state machine.
This state machine handles different events, raised
from program modules (such as trx_if.c or l1ctl.c).
- l1ctl_link_fsm - L1CTL server state machine.
- trx_interface_fsm - TRX interface state machine.
The program modules (such as trx_if.c or l1ctl.c) should be as
much independent from each other as possible. In other words,
one module should not call methods from another, e.g. L1CTL
handlers are not able to send any command to transceiver directly.
Instead of that, they should use shared event set to notify the
main state machine about something. Depending on current state
and received event, main state machine 'decides' what to do. This
approach would allow to easily reuse the source code almost 'as is'
anywhere outside the project.
Change-Id: I7ee6fc891abe5f775f5b7ebbf093181a97950dea
There are two sides of the 'OsmocomBB <-> SDR' bridge. One of
them is the L1CTL interface, which is used by existing layer23
applications to drive GSM L1. Exactly this interface is provided
by the osmocon application, but instead of forwarding messages
between both host software and firmware we need to handle incoming
messages from layer23 applications, perform some GSM L1 specific
conversations (coding, mapping, interleaving, etc.), then finally
forward them to transceiver through the scheduler. And vice versa.
This code is just a basic implementation of UNIX socket handlers,
so currently we can only accept and drop connections from layer23
applications.
Change-Id: I58d069bcc7742b42c0bf95e52063933bf2c352ff