lists.osmocom.org
Sign In Sign Up
Manage this list Sign In Sign Up

Keyboard Shortcuts

Thread View

  • j: Next unread message
  • k: Previous unread message
  • j a: Jump to all threads
  • j l: Jump to MailingList overview

gerrit-log

Thread Start a new thread
Download
Threads by month
  • ----- 2026 -----
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2025 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2024 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2023 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
  • ----- 2022 -----
  • December
  • November
  • October
  • September
  • August
  • July
  • June
  • May
  • April
  • March
  • February
  • January
gerrit-log@lists.osmocom.org

November 2022

  • 2 participants
  • 2503 discussions
Change in osmo-e1-recorder[master]: Fix use of logging_vty_add_cmds(void) API function.
by laforge 06 Nov '22

06 Nov '22
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/30031 ) Change subject: Fix use of logging_vty_add_cmds(void) API function. ...................................................................... Patch Set 1: Code-Review+2 -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/30031 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: Icdbe2f253c9e17ff82bd3b1dc3d4fbea4ad6f333 Gerrit-Change-Number: 30031 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: laforge <laforge(a)osmocom.org> Gerrit-Comment-Date: Sun, 06 Nov 2022 09:37:35 +0000 Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment
1 0
0 0
Change in osmo-e1-recorder[master]: README: Migrate to README.md
by laforge 06 Nov '22

06 Nov '22
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/30034 ) Change subject: README: Migrate to README.md ...................................................................... README: Migrate to README.md Change-Id: Ic6553d7f672d737cc2813b3b0aeb7fc1d4715ce5 --- R README.md 1 file changed, 0 insertions(+), 0 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1-recorder refs/changes/34/30034/1 diff --git a/README b/README.md similarity index 100% rename from README rename to README.md -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/30034 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: Ic6553d7f672d737cc2813b3b0aeb7fc1d4715ce5 Gerrit-Change-Number: 30034 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-e1-recorder[master]: README.md: Fix lots of typos + formatting in markdown
by laforge 06 Nov '22

06 Nov '22
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/30035 ) Change subject: README.md: Fix lots of typos + formatting in markdown ...................................................................... README.md: Fix lots of typos + formatting in markdown Change-Id: I14cad6ae7e20479aea0c872fc57100f6a890a209 --- M README.md 1 file changed, 5 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1-recorder refs/changes/35/30035/1 diff --git a/README.md b/README.md index 1f7bc72..ad91df4 100644 --- a/README.md +++ b/README.md @@ -22,11 +22,12 @@ interface cards, one for each direction. Recording can be performed either -* passively, using a E1 Tap aapter -* asa proxy / man-in-the-middle + +* passively, using a E1 Tap adapter +* as a proxy / man-in-the-middle All timeslots will be opened in "raw" mode, making sure the recording -will work wheter or not there is HLDC-based signalling (MTP or LAPD), +will work whether or not there is HDLC-based signalling (MTP or LAPD), PCM voice, TRAU frames or anything else on the line. Recording will be done on a per-timeslot basis, dumping the raw bytes @@ -37,4 +38,4 @@ Later possible extensions could include automatic detection of the payload and a more intelligent storage format (e.g. in case of HDLC -bsaed signalling). +based signalling). -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/30035 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: I14cad6ae7e20479aea0c872fc57100f6a890a209 Gerrit-Change-Number: 30035 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-e1-recorder[master]: README: update explaining the difference to other approaches
by laforge 06 Nov '22

06 Nov '22
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/30033 ) Change subject: README: update explaining the difference to other approaches ...................................................................... README: update explaining the difference to other approaches Change-Id: Ie6afe8016c0168c2f0beee96d6c151c5b4cc5e81 --- M README 1 file changed, 17 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1-recorder refs/changes/33/30033/1 diff --git a/README b/README index 149b547..1f7bc72 100644 --- a/README +++ b/README @@ -2,11 +2,24 @@ =================== (C) 2016 by Harald Welte <laforge(a)gnumonks.org> -The idea of this program is to be able to passively record E1/T1 based -communications for purposes of data analysis. +The idea of this program is to be able to build a "poor mans E1/T1 +recorder" purposes of data analysis, *without* any special +equipment. -Recording of a single E1 link always requires two E1 interface cards, -one for each direction. +This approach is more risky than a purely passive, hardware based +approach as that of the Osmocom e1-tracer released at +https://osmocom.org/projects/e1-t1-adapter/wiki/E1_tracer + +If you can, it is strongly recommended to use the purely passive, +high-impedance tap approach of e1-tracer and not the poor-man's +software proxy approach presented in osmo-e1-recorder. + +Setup +----- + +To do so, two E1 cards are used as some kind of proxy for the E1 +communication. Recording of a single E1 link always requires two E1 +interface cards, one for each direction. Recording can be performed either * passively, using a E1 Tap aapter -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/30033 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: Ie6afe8016c0168c2f0beee96d6c151c5b4cc5e81 Gerrit-Change-Number: 30033 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-e1-recorder[master]: jenkins.sh: Fix printed URL of osmo-ci git repository
by laforge 06 Nov '22

06 Nov '22
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/30032 ) Change subject: jenkins.sh: Fix printed URL of osmo-ci git repository ...................................................................... jenkins.sh: Fix printed URL of osmo-ci git repository Change-Id: I043c2c613a3b204403f3b0fb41cab9f41bfc77fe --- M contrib/jenkins.sh 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1-recorder refs/changes/32/30032/1 diff --git a/contrib/jenkins.sh b/contrib/jenkins.sh index d9895ec..4565a80 100755 --- a/contrib/jenkins.sh +++ b/contrib/jenkins.sh @@ -7,7 +7,7 @@ # if ! [ -x "$(command -v osmo-build-dep.sh)" ]; then - echo "Error: We need to have scripts/osmo-deps.sh from http://git.osmocom.org/osmo-ci/ in PATH !" + echo "Error: We need to have scripts/osmo-deps.sh from https://gitea.osmocom.org/osmocom/osmo-ci in PATH !" exit 2 fi -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/30032 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: I043c2c613a3b204403f3b0fb41cab9f41bfc77fe Gerrit-Change-Number: 30032 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
Change in osmo-e1-recorder[master]: Fix use of logging_vty_add_cmds(void) API function.
by laforge 06 Nov '22

06 Nov '22
laforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-e1-recorder/+/30031 ) Change subject: Fix use of logging_vty_add_cmds(void) API function. ...................................................................... Fix use of logging_vty_add_cmds(void) API function. This function never accepted any arguments. However, a sloppy declaration in the header file as logging_vty_add_cmds() allowed to pass any number of any type arguments until recently. Change-Id: Icdbe2f253c9e17ff82bd3b1dc3d4fbea4ad6f333 --- M src/e1_recorder.c 1 file changed, 1 insertion(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmo-e1-recorder refs/changes/31/30031/1 diff --git a/src/e1_recorder.c b/src/e1_recorder.c index 333375d..7a93470 100644 --- a/src/e1_recorder.c +++ b/src/e1_recorder.c @@ -187,7 +187,7 @@ osmo_init_logging2(rec_tall_ctx, &info); vty_init(&vty_info); - logging_vty_add_cmds(&info); + logging_vty_add_cmds(); osmo_signal_register_handler(SS_L_INPUT, inp_sig_cb, NULL); libosmo_abis_init(rec_tall_ctx); e1inp_vty_init(); -- To view, visit https://gerrit.osmocom.org/c/osmo-e1-recorder/+/30031 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmo-e1-recorder Gerrit-Branch: master Gerrit-Change-Id: Icdbe2f253c9e17ff82bd3b1dc3d4fbea4ad6f333 Gerrit-Change-Number: 30031 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge(a)osmocom.org> Gerrit-MessageType: newchange
1 0
0 0
Change in osmocom-bb[master]: trxcon: deliver measurement results via the PHYIF primitives
by fixeria 05 Nov '22

05 Nov '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30028 ) Change subject: trxcon: deliver measurement results via the PHYIF primitives ...................................................................... trxcon: deliver measurement results via the PHYIF primitives The PHYIF implementation shall not send events to the trxcon_fsm directly. The measurement command is sent in form of an abstract PHYIF primitive (PHYIF_CMDT_MEASURE), so it's more logical that the response is sent in form of a PHYIF primitive too. Change-Id: Ie20616c288c16559d0a566979b24d57b50369fab Related: OS#5599 --- M src/host/trxcon/include/osmocom/bb/trxcon/phyif.h M src/host/trxcon/src/trx_if.c M src/host/trxcon/src/trxcon.c 3 files changed, 48 insertions(+), 7 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/28/30028/1 diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h b/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h index 037a905..ae272dd 100644 --- a/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h +++ b/src/host/trxcon/include/osmocom/bb/trxcon/phyif.h @@ -40,12 +40,19 @@ int8_t ta; /* intentionally signed */ }; -/* param of PHYIF_CMDT_MEASURE */ +/* param of PHYIF_CMDT_MEASURE (command) */ struct phyif_cmdp_measure { uint16_t band_arfcn_start; uint16_t band_arfcn_stop; }; +/* param of PHYIF_CMDT_MEASURE (response) */ +struct phyif_rspp_measure { + bool last; + uint16_t band_arfcn; + int dbm; +}; + struct phyif_cmd { enum phyif_cmd_type type; union { @@ -57,6 +64,13 @@ } param; }; +struct phyif_rsp { + enum phyif_cmd_type type; + union { + struct phyif_rspp_measure measure; + } param; +}; + /* BURST.req - a burst to be transmitted */ struct phyif_burst_req { uint32_t fn; @@ -80,4 +94,5 @@ int phyif_handle_burst_ind(void *phyif, const struct phyif_burst_ind *bi); int phyif_handle_burst_req(void *phyif, const struct phyif_burst_req *br); int phyif_handle_cmd(void *phyif, const struct phyif_cmd *cmd); +int phyif_handle_rsp(void *phyif, const struct phyif_rsp *rsp); void phyif_close(void *phyif); diff --git a/src/host/trxcon/src/trx_if.c b/src/host/trxcon/src/trx_if.c index 7f3ce08..4074ba8 100644 --- a/src/host/trxcon/src/trx_if.c +++ b/src/host/trxcon/src/trx_if.c @@ -372,7 +372,6 @@ static void trx_if_measure_rsp_cb(struct trx_instance *trx, char *resp) { - struct trxcon_inst *trxcon = trx->trxcon; unsigned int freq10; uint16_t band_arfcn; int dbm; @@ -391,13 +390,16 @@ return; } - struct trxcon_param_full_power_scan_res res = { - .last_result = band_arfcn == trx->pm_band_arfcn_stop, - .band_arfcn = band_arfcn, - .dbm = dbm, + const struct phyif_rsp rsp = { + .type = PHYIF_CMDT_MEASURE, + .param.measure = { + .last = band_arfcn == trx->pm_band_arfcn_stop, + .band_arfcn = band_arfcn, + .dbm = dbm, + }, }; - osmo_fsm_inst_dispatch(trxcon->fi, TRXCON_EV_FULL_POWER_SCAN_RES, &res); + phyif_handle_rsp(trx, &rsp); /* Schedule a next measurement */ if (band_arfcn != trx->pm_band_arfcn_stop) { diff --git a/src/host/trxcon/src/trxcon.c b/src/host/trxcon/src/trxcon.c index 9522a49..2ea2c40 100644 --- a/src/host/trxcon/src/trxcon.c +++ b/src/host/trxcon/src/trxcon.c @@ -177,6 +177,30 @@ return trx_if_handle_phyif_cmd(phyif, cmd); } +int phyif_handle_rsp(void *phyif, const struct phyif_rsp *rsp) +{ + struct trx_instance *trx = phyif; + struct trxcon_inst *trxcon = trx->trxcon; + + switch (rsp->type) { + case PHYIF_CMDT_MEASURE: + { + const struct phyif_rspp_measure *meas = &rsp->param.measure; + struct trxcon_param_full_power_scan_res res = { + .last_result = meas->last, + .band_arfcn = meas->band_arfcn, + .dbm = meas->dbm, + }; + + return osmo_fsm_inst_dispatch(trxcon->fi, TRXCON_EV_FULL_POWER_SCAN_RES, &res); + } + default: + LOGPFSML(trxcon->fi, LOGL_ERROR, + "Unhandled PHYIF response (type 0x%02x)\n", rsp->type); + return -ENODEV; + } +} + void phyif_close(void *phyif) { trx_if_close(phyif); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30028 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ie20616c288c16559d0a566979b24d57b50369fab Gerrit-Change-Number: 30028 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmocom-bb[master]: trxcon: abstract out trx_if.c from struct trxcon_inst
by fixeria 05 Nov '22

05 Nov '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30029 ) Change subject: trxcon: abstract out trx_if.c from struct trxcon_inst ...................................................................... trxcon: abstract out trx_if.c from struct trxcon_inst The PHYIF implementation shall not have direct access to the struct trxcon_inst it belongs to. All communication shall be done via the abstract PHYIF interface (see <include/osmocom/bb/trxcon/phyif.h>). * Introduce struct trx_if_params containing all necessary params. * Make trx_if_open() accept a struct trx_if_params pointer. Change-Id: I1a97c4c783ab671636ca33700eca97dede2a4a09 Related: OS#5599 --- M src/host/trxcon/include/osmocom/bb/trxcon/trx_if.h M src/host/trxcon/src/trx_if.c M src/host/trxcon/src/trxcon.c 3 files changed, 47 insertions(+), 31 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/29/30029/1 diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/trx_if.h b/src/host/trxcon/include/osmocom/bb/trxcon/trx_if.h index 9628f72..bfab0ad 100644 --- a/src/host/trxcon/include/osmocom/bb/trxcon/trx_if.h +++ b/src/host/trxcon/include/osmocom/bb/trxcon/trx_if.h @@ -10,9 +10,6 @@ #define TRXC_BUF_SIZE 1024 #define TRXD_BUF_SIZE 512 -/* Forward declaration to avoid mutual include */ -struct trxcon_inst; - enum trx_fsm_states { TRX_STATE_OFFLINE = 0, TRX_STATE_IDLE, @@ -21,9 +18,6 @@ }; struct trx_instance { - /* trxcon instance we belong to */ - struct trxcon_inst *trxcon; - struct osmo_fd trx_ofd_ctrl; struct osmo_fd trx_ofd_data; @@ -38,6 +32,9 @@ /* GSM L1 specific */ uint16_t pm_band_arfcn_start; uint16_t pm_band_arfcn_stop; + + /* Some private data */ + void *priv; }; struct trx_ctrl_msg { @@ -48,8 +45,18 @@ int cmd_len; }; -struct trx_instance *trx_if_open(struct trxcon_inst *trxcon, - const char *local_host, const char *remote_host, uint16_t port); +struct trx_if_params { + const char *local_host; + const char *remote_host; + uint16_t base_port; + uint8_t instance; + + struct osmo_fsm_inst *parent_fi; + uint32_t parent_term_event; + void *priv; +}; + +struct trx_instance *trx_if_open(const struct trx_if_params *params); void trx_if_close(struct trx_instance *trx); int trx_if_handle_phyif_burst_req(struct trx_instance *trx, const struct phyif_burst_req *br); diff --git a/src/host/trxcon/src/trx_if.c b/src/host/trxcon/src/trx_if.c index 4074ba8..928ad5d 100644 --- a/src/host/trxcon/src/trx_if.c +++ b/src/host/trxcon/src/trx_if.c @@ -40,7 +40,6 @@ #include <osmocom/gsm/gsm_utils.h> -#include <osmocom/bb/trxcon/trxcon.h> #include <osmocom/bb/trxcon/trx_if.h> #include <osmocom/bb/trxcon/logging.h> @@ -740,29 +739,31 @@ } /* Init TRX interface (TRXC, TRXD sockets and FSM) */ -struct trx_instance *trx_if_open(struct trxcon_inst *trxcon, - const char *local_host, const char *remote_host, - uint16_t base_port) +struct trx_instance *trx_if_open(const struct trx_if_params *params) { - const unsigned int offset = trxcon->id * 2; + const unsigned int offset = params->instance * 2; struct trx_instance *trx; struct osmo_fsm_inst *fi; int rc; - LOGPFSML(trxcon->fi, LOGL_NOTICE, "Init transceiver interface " - "(%s:%u/%u)\n", remote_host, base_port, trxcon->id); + LOGPFSML(params->parent_fi, LOGL_NOTICE, + "Init transceiver interface (%s:%u/%u)\n", + params->remote_host, params->base_port, + params->instance); /* Allocate a new dedicated state machine */ - fi = osmo_fsm_inst_alloc_child(&trx_fsm, trxcon->fi, TRXCON_EV_PHYIF_FAILURE); + fi = osmo_fsm_inst_alloc_child(&trx_fsm, params->parent_fi, + params->parent_term_event); if (fi == NULL) { - LOGPFSML(trxcon->fi, LOGL_ERROR, "Failed to allocate an instance " - "of FSM '%s'\n", trx_fsm.name); + LOGPFSML(params->parent_fi, LOGL_ERROR, + "Failed to allocate an instance of FSM '%s'\n", + trx_fsm.name); return NULL; } trx = talloc_zero(fi, struct trx_instance); if (!trx) { - LOGPFSML(trxcon->fi, LOGL_ERROR, "Failed to allocate memory\n"); + LOGPFSML(params->parent_fi, LOGL_ERROR, "Failed to allocate memory\n"); osmo_fsm_inst_free(fi); return NULL; } @@ -772,27 +773,27 @@ /* Open sockets */ rc = trx_udp_open(trx, &trx->trx_ofd_ctrl, /* TRXC */ - local_host, base_port + 101 + offset, - remote_host, base_port + 1 + offset, + params->local_host, params->base_port + 101 + offset, + params->remote_host, params->base_port + 1 + offset, trx_ctrl_read_cb); if (rc < 0) goto udp_error; rc = trx_udp_open(trx, &trx->trx_ofd_data, /* TRXD */ - local_host, base_port + 102 + offset, - remote_host, base_port + 2 + offset, + params->local_host, params->base_port + 102 + offset, + params->remote_host, params->base_port + 2 + offset, trx_data_rx_cb); if (rc < 0) goto udp_error; - trx->trxcon = trxcon; + trx->priv = params->priv; fi->priv = trx; trx->fi = fi; return trx; udp_error: - LOGPFSML(trx->fi, LOGL_ERROR, "Couldn't establish UDP connection\n"); + LOGPFSML(params->parent_fi, LOGL_ERROR, "Couldn't establish UDP connection\n"); osmo_fsm_inst_free(trx->fi); return NULL; } diff --git a/src/host/trxcon/src/trxcon.c b/src/host/trxcon/src/trxcon.c index 2ea2c40..306a8fe 100644 --- a/src/host/trxcon/src/trxcon.c +++ b/src/host/trxcon/src/trxcon.c @@ -149,7 +149,7 @@ int phyif_handle_burst_ind(void *phyif, const struct phyif_burst_ind *bi) { struct trx_instance *trx = phyif; - struct trxcon_inst *trxcon = trx->trxcon; + struct trxcon_inst *trxcon = trx->priv; const struct l1sched_meas_set meas = { .fn = bi->fn, .toa256 = bi->toa256, @@ -180,7 +180,7 @@ int phyif_handle_rsp(void *phyif, const struct phyif_rsp *rsp) { struct trx_instance *trx = phyif; - struct trxcon_inst *trxcon = trx->trxcon; + struct trxcon_inst *trxcon = trx->priv; switch (rsp->type) { case PHYIF_CMDT_MEASURE: @@ -356,11 +356,19 @@ /* Logging context to be used by both l1ctl and l1sched modules */ trxcon->log_prefix = talloc_asprintf(trxcon, "%s: ", osmo_fsm_inst_name(fi)); + const struct trx_if_params phyif_params = { + .local_host = app_data.trx_bind_ip, + .remote_host = app_data.trx_remote_ip, + .base_port = app_data.trx_base_port, + .instance = trxcon->id, + + .parent_fi = trxcon->fi, + .parent_term_event = TRXCON_EV_PHYIF_FAILURE, + .priv = trxcon, + }; + /* Init transceiver interface */ - trxcon->phyif = trx_if_open(trxcon, - app_data.trx_bind_ip, - app_data.trx_remote_ip, - app_data.trx_base_port); + trxcon->phyif = trx_if_open(&phyif_params); if (trxcon->phyif == NULL) { trxcon_inst_free(trxcon); return NULL; -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30029 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I1a97c4c783ab671636ca33700eca97dede2a4a09 Gerrit-Change-Number: 30029 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmocom-bb[master]: trxcon: move the trxcon_fsm related stuff into its own header
by fixeria 05 Nov '22

05 Nov '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30030 ) Change subject: trxcon: move the trxcon_fsm related stuff into its own header ...................................................................... trxcon: move the trxcon_fsm related stuff into its own header Change-Id: I32097b27f8de8d2b765a4399ad5fd3a1bdba85f4 Related: OS#5599 --- M src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h A src/host/trxcon/include/osmocom/bb/trxcon/trxcon_fsm.h M src/host/trxcon/src/l1ctl.c M src/host/trxcon/src/trxcon.c M src/host/trxcon/src/trxcon_fsm.c 5 files changed, 163 insertions(+), 159 deletions(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/30/30030/1 diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h b/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h index 117f3fd..3851b7f 100644 --- a/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h +++ b/src/host/trxcon/include/osmocom/bb/trxcon/trxcon.h @@ -2,165 +2,6 @@ struct l1sched_state; -extern struct osmo_fsm trxcon_fsm_def; - -enum trxcon_fsm_states { - TRXCON_ST_RESET, - TRXCON_ST_FULL_POWER_SCAN, - TRXCON_ST_FBSB_SEARCH, - TRXCON_ST_BCCH_CCCH, - TRXCON_ST_DEDICATED, - TRXCON_ST_PACKET_DATA, -}; - -enum trxcon_fsm_events { - TRXCON_EV_PHYIF_FAILURE, - TRXCON_EV_L2IF_FAILURE, - TRXCON_EV_RESET_FULL_REQ, - TRXCON_EV_RESET_SCHED_REQ, - TRXCON_EV_FULL_POWER_SCAN_REQ, - TRXCON_EV_FULL_POWER_SCAN_RES, - TRXCON_EV_FBSB_SEARCH_REQ, - TRXCON_EV_FBSB_SEARCH_RES, - TRXCON_EV_SET_CCCH_MODE_REQ, - TRXCON_EV_SET_TCH_MODE_REQ, - TRXCON_EV_SET_PHY_CONFIG_REQ, - TRXCON_EV_TX_ACCESS_BURST_REQ, - TRXCON_EV_TX_ACCESS_BURST_CNF, - TRXCON_EV_UPDATE_SACCH_CACHE_REQ, - TRXCON_EV_DEDICATED_ESTABLISH_REQ, - TRXCON_EV_DEDICATED_RELEASE_REQ, - TRXCON_EV_TX_DATA_REQ, - TRXCON_EV_TX_DATA_CNF, - TRXCON_EV_RX_DATA_IND, - TRXCON_EV_CRYPTO_REQ, -}; - -/* param of TRXCON_EV_FULL_POWER_SCAN_REQ */ -struct trxcon_param_full_power_scan_req { - uint16_t band_arfcn_start; - uint16_t band_arfcn_stop; -}; - -/* param of TRXCON_EV_FULL_POWER_SCAN_RES */ -struct trxcon_param_full_power_scan_res { - bool last_result; - uint16_t band_arfcn; - int dbm; -}; - -/* param of TRXCON_EV_FBSB_SEARCH_REQ */ -struct trxcon_param_fbsb_search_req { - uint16_t band_arfcn; - uint16_t timeout_ms; - uint8_t pchan_config; -}; - -/* param of TRXCON_EV_SET_{CCCH,TCH}_MODE_REQ */ -struct trxcon_param_set_ccch_tch_mode_req { - uint8_t mode; - struct { - uint8_t start_codec; - uint8_t codecs_bitmask; - } amr; - bool applied; -}; - -/* param of TRXCON_EV_SET_PHY_CONFIG_REQ */ -struct trxcon_param_set_phy_config_req { - enum { - TRXCON_PHY_CFGT_PCHAN_COMB, - TRXCON_PHY_CFGT_TX_PARAMS, - } type; - union { - struct { - uint8_t tn; - uint8_t pchan; - } pchan_comb; - struct { - uint8_t timing_advance; - uint8_t tx_power; - } tx_params; - }; -}; - -/* param of TRXCON_EV_TX_DATA_REQ */ -struct trxcon_param_tx_data_req { - bool traffic; - uint8_t chan_nr; - uint8_t link_id; - size_t data_len; - const uint8_t *data; -}; - -/* param of TRXCON_EV_TX_DATA_CNF */ -struct trxcon_param_tx_data_cnf { - bool traffic; - uint8_t chan_nr; - uint8_t link_id; - uint16_t band_arfcn; - uint32_t frame_nr; -}; - -/* param of TRXCON_EV_RX_DATA_IND */ -struct trxcon_param_rx_data_ind { - bool traffic; - uint8_t chan_nr; - uint8_t link_id; - uint16_t band_arfcn; - uint32_t frame_nr; - int16_t toa256; - int8_t rssi; - int n_errors; - int n_bits_total; - size_t data_len; - const uint8_t *data; -}; - -/* param of TRXCON_EV_TX_ACCESS_BURST_REQ */ -struct trxcon_param_tx_access_burst_req { - uint8_t chan_nr; - uint8_t link_id; - uint8_t offset; - uint8_t synch_seq; - uint16_t ra; - bool is_11bit; -}; - -/* param of TRXCON_EV_TX_ACCESS_BURST_CNF */ -struct trxcon_param_tx_access_burst_cnf { - uint16_t band_arfcn; - uint32_t frame_nr; -}; - -/* param of TRXCON_EV_DEDICATED_ESTABLISH_REQ */ -struct trxcon_param_dedicated_establish_req { - uint8_t chan_nr; - uint8_t tch_mode; - uint8_t tsc; - - bool hopping; - union { - struct { /* hopping=false */ - uint16_t band_arfcn; - } h0; - struct { /* hopping=true */ - uint8_t hsn; - uint8_t maio; - uint8_t n; - uint16_t ma[64]; - } h1; - }; -}; - -/* param of TRXCON_EV_CRYPTO_REQ */ -struct trxcon_param_crypto_req { - uint8_t chan_nr; - uint8_t a5_algo; /* 0 is A5/0 */ - uint8_t key_len; - const uint8_t *key; -}; - struct trxcon_inst { struct osmo_fsm_inst *fi; unsigned int id; diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/trxcon_fsm.h b/src/host/trxcon/include/osmocom/bb/trxcon/trxcon_fsm.h new file mode 100644 index 0000000..0e847e3 --- /dev/null +++ b/src/host/trxcon/include/osmocom/bb/trxcon/trxcon_fsm.h @@ -0,0 +1,160 @@ +#pragma once + +extern struct osmo_fsm trxcon_fsm_def; + +enum trxcon_fsm_states { + TRXCON_ST_RESET, + TRXCON_ST_FULL_POWER_SCAN, + TRXCON_ST_FBSB_SEARCH, + TRXCON_ST_BCCH_CCCH, + TRXCON_ST_DEDICATED, + TRXCON_ST_PACKET_DATA, +}; + +enum trxcon_fsm_events { + TRXCON_EV_PHYIF_FAILURE, + TRXCON_EV_L2IF_FAILURE, + TRXCON_EV_RESET_FULL_REQ, + TRXCON_EV_RESET_SCHED_REQ, + TRXCON_EV_FULL_POWER_SCAN_REQ, + TRXCON_EV_FULL_POWER_SCAN_RES, + TRXCON_EV_FBSB_SEARCH_REQ, + TRXCON_EV_FBSB_SEARCH_RES, + TRXCON_EV_SET_CCCH_MODE_REQ, + TRXCON_EV_SET_TCH_MODE_REQ, + TRXCON_EV_SET_PHY_CONFIG_REQ, + TRXCON_EV_TX_ACCESS_BURST_REQ, + TRXCON_EV_TX_ACCESS_BURST_CNF, + TRXCON_EV_UPDATE_SACCH_CACHE_REQ, + TRXCON_EV_DEDICATED_ESTABLISH_REQ, + TRXCON_EV_DEDICATED_RELEASE_REQ, + TRXCON_EV_TX_DATA_REQ, + TRXCON_EV_TX_DATA_CNF, + TRXCON_EV_RX_DATA_IND, + TRXCON_EV_CRYPTO_REQ, +}; + +/* param of TRXCON_EV_FULL_POWER_SCAN_REQ */ +struct trxcon_param_full_power_scan_req { + uint16_t band_arfcn_start; + uint16_t band_arfcn_stop; +}; + +/* param of TRXCON_EV_FULL_POWER_SCAN_RES */ +struct trxcon_param_full_power_scan_res { + bool last_result; + uint16_t band_arfcn; + int dbm; +}; + +/* param of TRXCON_EV_FBSB_SEARCH_REQ */ +struct trxcon_param_fbsb_search_req { + uint16_t band_arfcn; + uint16_t timeout_ms; + uint8_t pchan_config; +}; + +/* param of TRXCON_EV_SET_{CCCH,TCH}_MODE_REQ */ +struct trxcon_param_set_ccch_tch_mode_req { + uint8_t mode; + struct { + uint8_t start_codec; + uint8_t codecs_bitmask; + } amr; + bool applied; +}; + +/* param of TRXCON_EV_SET_PHY_CONFIG_REQ */ +struct trxcon_param_set_phy_config_req { + enum { + TRXCON_PHY_CFGT_PCHAN_COMB, + TRXCON_PHY_CFGT_TX_PARAMS, + } type; + union { + struct { + uint8_t tn; + uint8_t pchan; + } pchan_comb; + struct { + uint8_t timing_advance; + uint8_t tx_power; + } tx_params; + }; +}; + +/* param of TRXCON_EV_TX_DATA_REQ */ +struct trxcon_param_tx_data_req { + bool traffic; + uint8_t chan_nr; + uint8_t link_id; + size_t data_len; + const uint8_t *data; +}; + +/* param of TRXCON_EV_TX_DATA_CNF */ +struct trxcon_param_tx_data_cnf { + bool traffic; + uint8_t chan_nr; + uint8_t link_id; + uint16_t band_arfcn; + uint32_t frame_nr; +}; + +/* param of TRXCON_EV_RX_DATA_IND */ +struct trxcon_param_rx_data_ind { + bool traffic; + uint8_t chan_nr; + uint8_t link_id; + uint16_t band_arfcn; + uint32_t frame_nr; + int16_t toa256; + int8_t rssi; + int n_errors; + int n_bits_total; + size_t data_len; + const uint8_t *data; +}; + +/* param of TRXCON_EV_TX_ACCESS_BURST_REQ */ +struct trxcon_param_tx_access_burst_req { + uint8_t chan_nr; + uint8_t link_id; + uint8_t offset; + uint8_t synch_seq; + uint16_t ra; + bool is_11bit; +}; + +/* param of TRXCON_EV_TX_ACCESS_BURST_CNF */ +struct trxcon_param_tx_access_burst_cnf { + uint16_t band_arfcn; + uint32_t frame_nr; +}; + +/* param of TRXCON_EV_DEDICATED_ESTABLISH_REQ */ +struct trxcon_param_dedicated_establish_req { + uint8_t chan_nr; + uint8_t tch_mode; + uint8_t tsc; + + bool hopping; + union { + struct { /* hopping=false */ + uint16_t band_arfcn; + } h0; + struct { /* hopping=true */ + uint8_t hsn; + uint8_t maio; + uint8_t n; + uint16_t ma[64]; + } h1; + }; +}; + +/* param of TRXCON_EV_CRYPTO_REQ */ +struct trxcon_param_crypto_req { + uint8_t chan_nr; + uint8_t a5_algo; /* 0 is A5/0 */ + uint8_t key_len; + const uint8_t *key; +}; diff --git a/src/host/trxcon/src/l1ctl.c b/src/host/trxcon/src/l1ctl.c index 890e4d2..a483bbb 100644 --- a/src/host/trxcon/src/l1ctl.c +++ b/src/host/trxcon/src/l1ctl.c @@ -41,6 +41,7 @@ #include <osmocom/bb/trxcon/l1ctl_server.h> #include <osmocom/bb/trxcon/l1ctl_proto.h> #include <osmocom/bb/trxcon/trxcon.h> +#include <osmocom/bb/trxcon/trxcon_fsm.h> static const char *arfcn2band_name(uint16_t arfcn) { diff --git a/src/host/trxcon/src/trxcon.c b/src/host/trxcon/src/trxcon.c index 306a8fe..4eea55a 100644 --- a/src/host/trxcon/src/trxcon.c +++ b/src/host/trxcon/src/trxcon.c @@ -42,6 +42,7 @@ #include <osmocom/gsm/gsm_utils.h> #include <osmocom/bb/trxcon/trxcon.h> +#include <osmocom/bb/trxcon/trxcon_fsm.h> #include <osmocom/bb/trxcon/phyif.h> #include <osmocom/bb/trxcon/trx_if.h> #include <osmocom/bb/trxcon/logging.h> diff --git a/src/host/trxcon/src/trxcon_fsm.c b/src/host/trxcon/src/trxcon_fsm.c index f936449..5268bc6 100644 --- a/src/host/trxcon/src/trxcon_fsm.c +++ b/src/host/trxcon/src/trxcon_fsm.c @@ -28,6 +28,7 @@ #include <osmocom/core/talloc.h> #include <osmocom/bb/trxcon/trxcon.h> +#include <osmocom/bb/trxcon/trxcon_fsm.h> #include <osmocom/bb/trxcon/phyif.h> #include <osmocom/bb/trxcon/logging.h> #include <osmocom/bb/trxcon/l1ctl.h> -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30030 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: I32097b27f8de8d2b765a4399ad5fd3a1bdba85f4 Gerrit-Change-Number: 30030 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
Change in osmocom-bb[master]: trxcon: l1ctl.h: remove unneeded import of l1ctl_proto.h
by fixeria 05 Nov '22

05 Nov '22
fixeria has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmocom-bb/+/30026 ) Change subject: trxcon: l1ctl.h: remove unneeded import of l1ctl_proto.h ...................................................................... trxcon: l1ctl.h: remove unneeded import of l1ctl_proto.h Change-Id: Ie66bb553cffd72a59d949979d8f97bacfc0bdad0 --- M src/host/trxcon/include/osmocom/bb/trxcon/l1ctl.h 1 file changed, 0 insertions(+), 1 deletion(-) git pull ssh://gerrit.osmocom.org:29418/osmocom-bb refs/changes/26/30026/1 diff --git a/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl.h b/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl.h index deeb318..1a8d775 100644 --- a/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl.h +++ b/src/host/trxcon/include/osmocom/bb/trxcon/l1ctl.h @@ -4,7 +4,6 @@ #include <osmocom/core/msgb.h> #include <osmocom/bb/trxcon/l1ctl_server.h> -#include <osmocom/bb/trxcon/l1ctl_proto.h> /* Event handlers */ int l1ctl_rx_cb(struct l1ctl_client *l1c, struct msgb *msg); -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/30026 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Ie66bb553cffd72a59d949979d8f97bacfc0bdad0 Gerrit-Change-Number: 30026 Gerrit-PatchSet: 1 Gerrit-Owner: fixeria <vyanitskiy(a)sysmocom.de> Gerrit-MessageType: newchange
1 0
0 0
  • ← Newer
  • 1
  • ...
  • 199
  • 200
  • 201
  • 202
  • 203
  • 204
  • 205
  • ...
  • 251
  • Older →

HyperKitty Powered by HyperKitty version 1.3.12.