aboutsummaryrefslogtreecommitdiffstats
path: root/src/osmo-bts-virtual
AgeCommit message (Collapse)AuthorFilesLines
2018-03-17virtual: Correctly set+report BTS variant in OML attributesHarald Welte1-0/+1
Change-Id: I76dc47427ec26834859fb737bd319dc379ae8697
2018-03-17Get rid of 'struct gsm_bts_role_bts'Harald Welte2-16/+10
gsm_bts_role_bts was introduced at a time when we still shared gsm_data_shared.[ch] between BSC and BTS, and where we then subsequently needed a BTS-private structure. Since that sharing was abandoned quite some time ago, we can merge gsm_bts_role_bts into gsm_bts and do away with the bts/btsb dualism in a lot of the code. Change-Id: I4fdd601ea873d9697f89a748cc77bcf7c978fa3e
2018-02-27L1SAP: Increase resolution of reported burst timingHarald Welte1-2/+2
Before this patch we had: * osmo-bts-trx internally using 1/256th bit/symbol period * osmo-bts-sysmo internally using 1/4 bit/smbol period * PCU interface using 1/4 * L1SAP interface using 1/4 * measurement processing code on top of L1SAP using 1/256 So for sysmo/lc15/octphy we are not loosing resolution, but for osmo-bts-trx we're arbitrarily reducing the resolution via L1SAP only then to compute with higher resolution again. Let's change L1SAP to use 1/256 bits and hence not loose any resolution. This requires a corresponding change in libosmocore for l1sap.h, which is found in Change-Id Ibb58113c2819fe2d6d23ecbcfb8b3fce4055025d Change-Id: If9b0f617845ba6c4aa47969f521734388197c9a7
2018-02-27trx/scheduler: Use integer math for TOA (Timing of Arrival)Harald Welte1-5/+5
There's no need to express TOA as a float: * We receive it as signed 16bit integer in units 1/256 symbol periods * We pass it to L1SAP as signed integer in 1/4 symbol periods So turn it into an int16_t with 1/256 symbol period accuracy throughout the code to avoid both float arithmetic as well as loosing any precision. Change-Id: Idce4178e0b1f7e940ebc22b3e2f340fcd544d4ec
2018-02-26split scheduler_mframe.c from scheduler.cHarald Welte1-1/+1
There are use cases for the multiframe scheduler tables outside the context of the entire scheduler. Let's prepare for that. Related: OS#2978 Change-Id: I6a501e66c47809ae3cdc55bef2cb6390ee0096b1
2018-02-23osmo-bts-virtual: Make sure PRIM_INFO_MEAS have non-zero frame numberHarald Welte1-2/+3
Measurement reports fed into L1SAP so far had their frame number always set to zero, resulting in higher-layer common code above L1SAP to never detect the end of the measurement period, which in turn caused no RSL MEAS REP to be sent. Related: OS#2978 Change-Id: I67837d19515ea335614928570c12dd5027104c6b
2018-02-22osmo-bts-virtual: Make use of LOGL1S() macro for contextHarald Welte1-67/+40
In Change-Id I5703b46c8a59fe00a3cdc063bcf72872980ec5e5 we introduced LOGL1S and starte to use in in common/scheduler.c as well as osmo-bts-trx but somehow we didn't introduce it in osmo-bts-virtual at the time. Let's catch up. Change-Id: I0b5fd3b7982b9119becda844531108f64c68d19f
2018-02-22Introduce + use LOG/DEBUGP with frame number prefixing/printingHarald Welte1-7/+7
Let's make sure whenever we do have a frame number, we print it as context in the related log line Change-Id: I751d5ddb3322fce489bc241459738cbcc55c890b
2018-02-22osmo-bts-virtual: Generate PRIM_INFO_MEAS (with bogus values)Harald Welte1-2/+5
The problem is that measurement processing above L1SAP requires/expects those PRIM_INFO_MEAS indications from the bts specific parts. Otherwise it will never generate even uplink-only measurement reports to the BSC, which is a violation of Abis protocol specs. Change-Id: I48f73293cb4f0ab4c657dfd00e7ddd032a3c030f
2018-02-22osmo-bts-virtual: Shut down gracefully on socket creation failureHarald Welte2-2/+7
Don't simply crash if creation of the multicast socket fails Change-Id: Ie87b6684b3aa7f21742e4cf21533e980485c1230
2018-02-22octphy: ensure all BTS models set featuresPhilipp Maier1-0/+7
Most of the BTS models do not or do register not all of thier features to the the feature list. - Update/extend the feature lists for all BTS-Models Change-Id: I26765a64153368016921c2ac115b1c4aec9bc5e4
2018-02-05virtual: l1_if.c: Remove unneeded warning messagePau Espin Pedrol1-2/+1
Commit 5eb17e28acdd6fba22a1f2e60f4d55aaef18b47a added this warning when implementing the full function. However, other backends seem to be also passing the primitive from the stack to l1sap_up without any visible issues. Furthermore, according to the documentation of l1sap_up, it takes ownership of the msgb, but doesn't take ownserhip of the prim itself. Change-Id: I45fe40e3377eac999d1dac5356678195381d94ca
2017-12-02scheduler_trx: L1P is for PH (data), L1M for MPH (control)Harald Welte1-2/+2
Almost all log statements in scheduler_trx.c were using the wrong logging subsystem. Let's fix this. Also, make it more obvious from the log subsystem help text Change-Id: I4312f8ab0414eb38db0d62f05c95ab961f500c14
2017-10-08Remove build dependency on legacy OpenBSCMax1-1/+1
* copy-paste gsm_data_shared.* from OpenBSC master * remove corresponding configure check and option * remove .deb dependency Actual refactoring with removal of unnecessary structures/parts, moving common OpenBSC/OsmoBSC parts into libraries etc. are left for further patches. Current patch will make coexistence with *BSC easier and will simplify our build infrastructure. Change-Id: I9f004fb5c4c1db29d4792dfd281d388c7063da13 Related: OS#1923
2017-08-20Fix static build of osmo-bts-trx and osmo-bts-virtual.Alexander Chemeris1-1/+1
New libosmocore has some plugin system which requires dlopen(). So we need to make sure we always link with libdl, even when building statically. Note that this doesn't fix static build of tests - they are still failing with some errors. Change-Id: I8315d6e032e34528def268a49fd88d07bc06ab2e
2017-08-09VIRT-BTS: Support for GPRSHarald Welte3-9/+7
Change-Id: Id851578c53255866537a16a0be6c3e9268e6ccbc
2017-07-30TRX / VIRT-PHY: Make check for BCCH/CCCH more specificHarald Welte1-2/+2
In bts_model_l1sap_down() we want to identify BCCH/CCCH channel numbers, but our check is a bit non-specific. Let's make the check more specific to only cover the BCCH, Uplink CCCH and Downlink CCCH C-bits as defined n 3GPP TS 08.58 Section 9.3.1 Change-Id: Ia20ab09b96c87c0dfbfaf98e5b2a8d36423fac67
2017-07-30VIRT-PHY: Print NOTICE log message from unimplemented stubsHarald Welte2-0/+13
There are plenty of functions stubbed out in osmo-bts-virtual, let's print a NOTICE level log message to be able to correlate any kind of erroneous behavior with the fact that a given function has no actual implementation. Change-Id: Ib607d192f90af7fb2d5a8747de5527f39e3cfefa
2017-07-19VIRT-PHY: Report virtual RACH bursts with plausible burst typeHarald Welte1-1/+3
Change-Id: I35b103c512993fc52d4e608f07115a4bb4b21022
2017-07-19virt: Don't print NOTICE log message if ARFCN doesn't matchHarald Welte1-4/+1
In a larger simulated network with multiple BTSs it is normal that one BTS will see GSMTAP frames for an ARFCN that is not an ARFCN used by the local BTS. This is just normal operation. Change-Id: Ic68cace9648ccb17500c94b6ede8814674aa9c29
2017-07-13VIRT-PHY: cause BTS to terminate in case of recv()/send() on udp socket ↵Harald Welte3-5/+19
returns 0 It is important that we reliably terminate the BTS in case any of the VirtPHY multicast sockets dies for whatever reason. Change-Id: I5ae3fdd7cc35fdf235550a3b8362020fdd287c13
2017-07-13VIRT-PHY: Use IPv4 multicast groups for private / local scopeHarald Welte1-2/+7
The addresses in the original code make little sense: * 224.0.0.1 is "All systems on this subnet" and not routed outside the local ethernet segment * 225.0.0.1 is in a RESERVED range that shouldn't be used Change-Id: Iba1ae69f3f193a33f1da343c6562f67bd8d3557f
2017-07-13VIRT-PHY: Added test option for fast hyperframe repeat.Sebastian Stumpf1-0/+8
Frame number will restart at 0 after each superframe (approx. 6.1 sec) if enabled. Can be enabled by preprocessor define. Change-Id: If3adf14df5fcd8daf53363c27b3772c42d7122e9
2017-07-13VIRT-PHY: Fix handling of default values for vty configurationHarald Welte3-14/+6
The defaults must be set during bts_model_phy_link_set_defaults() and can then later be overridden by the vty (from the config file). They should only be written back to the file if they differ from the default settings. Change-Id: I5d7f2c1dc8bc3d11db5c607b664730e4dcd58c96
2017-07-13VIRT-PHY: Fixed timeslot in gsmtap-msg on downlink which was always 0.Sebastian Stumpf1-0/+2
Timeslot is not encoded in the chan_nr accessible in the channel description but was taken from there and so it was always 0. Change-Id: I881a1c61ea47399c9b1385fb220cd587e3593e82
2017-07-13VIRT-PHY: Initial check-in of a new virtual BTSHarald Welte11-0/+1867
This patch adds a virtual physical layer designed to simulate the Um air interface between BTS and MS. It does so by encapsulating MAC blocks (Layer 2 PDUs) via GSMTAP and sending them through multicast UDP streams, both in uplink and in downlink. The purpose of this is enable testing without any radio hardware or related licenses. OsmocomBB has recently received as similar patch-set, adding a virty_phy executable that can be run on a PC instead of the classic 'layer1' firmware on a real phone. Using GSMTAP means that one can use unmodified wireshark to decode the messages exchanged on the virtual Um layer. This code was originally started by Harald in January 2016, continued by Sebastian Stumpf in late 2016 and early 2017, and finally completed by Harald in July 2017. Change-Id: I1bf7670975b1e367c1c62983020865a043542622