Commit Graph

7 Commits

Author SHA1 Message Date
Vadim Yanitskiy 2136891b7b trxcon: clarify L1CTL message length field
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
2018-03-11 10:05:48 +00:00
Vadim Yanitskiy 10fd43e586 host/trxcon/l1ctl.c: reset FBSB expire timer on shutdown
Change-Id: If3c8a34f0c1105c6acbfe4f9233482a31f6558de
2017-11-19 17:35:07 +07:00
Vadim Yanitskiy ae62021dc9 host/trxcon/l1ctl.c: implement FBSB expire timer
Change-Id: I27f96cbe951de164fcecaf19f8305db5e5b20229
2017-11-19 17:35:07 +07:00
Vadim Yanitskiy cc4282f5be host/trxcon/l1ctl.c: implement L1CTL_FBSB_CONF
Change-Id: I33e4702d590a8d67285410fc8f1241bb9d4c50fc
2017-11-19 17:35:07 +07:00
Vadim Yanitskiy 705fedceeb host/trxcon: bind L1CTL link with TRX and vice versa
Change-Id: I575f8699bf06fd5e86f7935c6ab3216db5a26ec5
2017-11-19 17:35:07 +07:00
Vadim Yanitskiy 423aeefc40 host/trxcon: integrate osmo-fsm framework
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
2017-11-19 17:35:07 +07:00
Vadim Yanitskiy 9f5fefe792 host/trxcon: initial release of L1CTL interface
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
2017-11-19 17:35:07 +07:00