aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2016-07-02sysmobts: Store the netmask as suffixsysmocom/old-stableHolger Hans Peter Freyther2-15/+38
If one uses ip(8) one can configure the ip using the form of A.B.C.D/N. Store N as uint8_t and parse it using strtok_r to get the otional /N. Change-Id: I45f884e1a980511fdb3a09425408262420870e0b
2016-07-02sysmobts: Store a simple network config in the EEPROM as wellHolger Hans Peter Freyther4-8/+168
Make it possible to store: * Static vs. DHCP mode * IPv4 address * Netmask * GW IPv4 address * DNS IPv4 address Add a simple CRC8 and pick 0xFF as initial value so an all zero EEPROM will not generate a 0 CRC. The code tries to differentiate exit code between unreadable EEPROM and CRC error. This is a reference to see if we want to have store it in the EEPROM or not. Change-Id: Ia7c59506d9f6e4cb6acd4bb0e198abd28a90f50f
2016-07-02sysmobts: Make reservation for mode/netmask/ip and sucHolger Hans Peter Freyther2-1/+16
Change-Id: I84a7ecb310034d1d3927008f392028b3ef87a394
2016-07-02sysmobts: Fix eeprom padding before gpg keyHolger Hans Peter Freyther2-1/+7
Correct the too short padding I introduced in the commit a55b166c6c7af79cbefe8e65fe77b2d61c634d2d. The result needs to be 121 and not 120. Add static asserts to make sure it does not happen again. Change-Id: Icaaf520a280ee58c483fa64df4e447702ec746ac
2016-07-02sysmobts: Add the barebox boot state reservationHolger Hans Peter Freyther1-1/+2
We are using up to 48 (actually only 8) bytes to manage the boot state of the device. Add it to the eeprom reservation. It turns out the current padding was too large (37 + 84 don't end at 120). Change-Id: I8354a05afcf3cb5f4fa1660cec78b6cbe26f9168
2016-06-09sysmobts: Catch up with the API changes and specify the versionHolger Hans Peter Freyther2-0/+15
API revision 5.1 allows us to pass a version number for the rx/tx calibration and the DSP/FPGA will inform us about clock errors.
2016-06-09sysmobts: support eeprom map version 2Minh-Quang Nguyen2-61/+446
[hfreyther: Accept the mixing of whitespace to ease future merges]
2016-05-13sysmobts: Read the clock calibration from another placeHolger Hans Peter Freyther4-11/+42
Read the clock calibration from the place that will be read by the BTS process. Use the standard eeprom code for doing that. The code assumes that this and the other eeprom code don't write/invlidate the others reason. If that assumption would not be true calls to eeprom_free_resources should be added.
2016-05-13sysmobts: Don't list non integer parameters in the helpHolger Hans Peter Freyther3-2/+23
The command can only read integer parameters. Don't offer buffers as this will lead to error 22.
2016-05-13eeprom: Fix brown paper bag introduced a long while agoHolger Hans Peter Freyther1-1/+1
91d204e2db8f53a6ae4827ecc4b0ccb0137375d0 while adding checks to resolve coverity issues. We simply had no one writing to the eeprom so this was unnoticed for a long time.
2016-05-13Correctly fill system information messages from BSCAndreas Eversberg1-2/+7
SI 5*/6 require L2 header of 0x03,0x03. All SI might be less than 23 octets, so they need to be filled with 0x2b.
2014-08-25tx: Generate a working configuration file on "write"Holger Hans Peter Freyther1-2/+2
We do not have the vty test script to do roundtrip testing. There is no max-initinal-pout, then there was a typo inside 'initial' and for the relative step size the unit is dB/mdB. Fix both of that.
2014-08-25tx: Fix another typo i found today morningHolger Hans Peter Freyther1-1/+1
2014-08-25sysmobts: Remove left-over from non-generic power controlHolger Hans Peter Freyther1-5/+0
2014-08-25ctrl: Use msgb_free to free messageHolger Hans Peter Freyther1-8/+8
2014-08-25tx_power.c: fix potential array out-of-bounds accessHarald Welte1-1/+1
2014-08-25make use of libosmocore 'gsm_meas_rep_unidir'Harald Welte1-8/+10
Back in March 2013, some structures and defines related to decoded measurement reports have been moved from openbsc to libosmocore (libosmocore e128f4663104ed64e33e362cff2566f36d65e658) so that they can be used also from osmo-bts. This finally follows up on that. You need openbsc 7ff4f0e0fc692bfab829da50edb104e58b271e7e or later.
2014-08-25add nominal transmit power for upcoming sysmoBTS 1020 and 1100Harald Welte1-0/+6
2014-08-25tx_power.c: Fix typos in commentsHarald Welte1-2/+2
2014-08-25add information on unit (milli-dB) to control interface docHarald Welte1-3/+7
2014-08-24disable clock control interface on HW_SYSMOBTS_V1Harald Welte1-0/+4
2014-08-24add control_if.h to Makefile.amHarald Welte1-1/+1
2014-08-24add a small document describing the use of the control interfaceHarald Welte1-0/+57
2014-08-24ctrl: Add sysmobts control interfaceHarald Welte3-1/+255
This sysmobts specific control interface allows for clock calibration from an external program by means of the "trx.0.clock-info" and "trx.0.clock-correction" values.
2014-08-24l1_if: pass private 'void *data' from call to callbackHarald Welte4-44/+62
When enqueueing a command towards the L1, we can now pass along a private data pointer, which then gets passed to the call-back upon completion.
2014-08-24fix build problem introduced with control interfaceHarald Welte3-3/+3
2014-08-24use libocmocore #defines for VTY port numbersHarald Welte2-2/+4
2014-08-24ctrl_if: Move control interface to port 4238Harald Welte3-4/+6
... which is now defined in libosmocore
2014-08-24add control interface to common BTS (for thermal attenuation)Harald Welte5-1/+190
Using this control interface, an external program can request attentuation of the transmitter for thermal management reasons. The external application doesn't have to know anthing about the actual transmit power, but it can just configure a certian value of milli-dB (1/10000 bel) and update (increase/decrease) that value depending on the thermal environment.
2014-08-24New generic transmit power handlingHarald Welte13-152/+455
In order to support transmit power reduction by thermal management as well as the variety of new internal / external PA configurations of BTSs, we need a slightly more complex system. Also, as at high power a single dB can be quite a big difference, we are now doing all computations in milli-dB(m), i.e. 1/10000 bel. Ramping is now used both for up and down ramping, as that is useful in cases where you want to gracefully shut down a cell by shrinking its radius, gradually handing over subscribers to neighboring cells. Furthermore, this code is becoming part of the 'common' codebase, as it is not really specific to how sysmobts is working. The user can specify a single aggregate value for external system gain/attenuation. Let's say you have 1dB loss of antenna cable, so you can put that as 'user-gain -1' into the config, which means that a 'transmit power of 20dBm' will be compensatet for that and the TRX is instructed to output 21dBm to compensate the cable loss. Similarly, external PAs can be described by a positive user-gain. One of the next steps will be to communicate those values and the nominal power capability of the specific BTS to the BSC, so the BSC will automatically show correct signal levels in the VTY and log files. The code includes provisions for future extensions regarding * an external and an internal PA with calibration tables * a thermal attenuation setting to be controlled by the site manager
2014-08-24remove copy of gsm_bts_num()Harald Welte1-15/+0
... which is now available from gsm_data_shared.[ch] of openbsc
2014-08-22sysmobts: Use the uc connection on both slave and masterHolger Hans Peter Freyther3-6/+11
We can use this on both slave and master. But only have the master switch on the PA.
2014-08-21Merge branch 'sysmocom/features/sysmobts-mgr-temp'Holger Hans Peter Freyther9-203/+780
Implement the first round of temperature control and actions. Only the PA can be switched off, it will never be switched on again, in case the microcontroller doesn't respond we will do nothing as well. These todos need to be addressed in the near future.
2014-08-21sysmobts: Enable the PA on start and disable it as first actionHolger Hans Peter Freyther5-6/+66
The PA will be unconditionally turned. This makes it possible that in case of a crash, the PA will be turned on and then we will do the temperature measurement and turn it off again. There are no known crashes with the sysmobts-mgr right now so the risk seems to be okay. In case we can't switch off the PA we have no way to escalate it right now. We have not seen a dead uc either so the risk is okay as well. We can't switch the PA back on once we reach the normal level as the BTS might transmit with full power and we would need more current than the power supply/rails can carry. So leave the system off right now. What is missing is to use the OML router to actually inform the BSC that something bad has happened at the BTS.
2014-08-21sysmobts: Show the current temperature controls state int he VTYHolger Hans Peter Freyther3-0/+8
2014-08-21sysmobts: Provide information about the state transitionsHolger Hans Peter Freyther1-0/+12
2014-08-21sysmobts: Implement a small state machine for temp controlHolger Hans Peter Freyther6-7/+206
Check the temperature and move between "NORMAL", "WARNING" and "CRITICAL" state. We will only return from CRITICAL to WARNING when the temperature has significantly changed, and when being in state "WARNING" we enter an intermediate state to allow an easy hysteris.
2014-08-21sysmobts: Remove the sbt2050 timer and move defines backHolger Hans Peter Freyther3-19/+6
We haven't done anything with the result of the micro controller query and querying every six hours for the temperature of the system will not help us. We need to query the temperatures more frequently but avoid writing to the eeprom too frequently so we will start another timer for that.
2014-08-21sysmobts: Simplify some includes/dependenciesHolger Hans Peter Freyther3-19/+1
2014-08-21sysmobts: Begin to add various limits and actionsHolger Hans Peter Freyther3-13/+275
The idea is that for different parts of the system we can define thresholds for warning and critical (severe) temperate thresholds. And once any of these temperatures is reached we will execute an action. When crossing from NORMAL to WARNING or WARNING to SEVERE we will need to apply some hysteris before switching back to the lower level. E.g. when being SEVERE mode, at least wait until we are below the warning level again. Besides being able to switch off things we could start reducing the transmit power of the system until the system is cold enough again. No action is implemented so far, everything is varpoware!
2014-08-21sysmobts: Fix the temperature log message alignmentHolger Hans Peter Freyther1-1/+1
2014-08-21sysmobts: Move ipaccess-find counterpart to a dedicated source fileHolger Hans Peter Freyther5-145/+212
2014-08-21sysmobts: Fix the build when no 2050 uc header file was foundHolger Hans Peter Freyther1-0/+14
Fix the build (provide empty stubs) when the header file is not present.
2014-08-21Merge branch 'sysmocom/features/sysmobts-mgr'Holger Hans Peter Freyther4-49/+133
Add some VTY code to show the temperature on all devices and to query the external micro controller for voltage/current and the temperature in the "show manager" command. It should probably be a "show system" command though.
2014-08-21sysmobts: Fix the power request resultHolger Hans Peter Freyther3-25/+63
We want to know which componets are enabled and the voltage and current used by the components.
2014-08-21sysmobts: Read the temperature sensors on the deviceHolger Hans Peter Freyther1-0/+16
Read the sensors that are always present and the ones that are only present on the sysmoBTS 2050.
2014-08-21sysmobts: Add is_sbts2050_masterHolger Hans Peter Freyther3-4/+11
2014-08-21sysmobts: Read the model number and trx once from the deviceHolger Hans Peter Freyther3-21/+43
Use it for the ipaccess-find response and for the sysmobts classification code. This can be used by the vty in a second.
2014-08-21sysmobts: Initialize fd with an invalid fdHolger Hans Peter Freyther1-1/+2
Initialize the ucinfo with an invalid fd to prevent writing on fd=0 by accident.
2014-08-21Merge commit 'sysmocom/features/sysmobts-mgr-vty'Holger Hans Peter Freyther11-345/+562
Some re-factorings. Still a very long way to go. It should work with haralds re-based but that wasn't verified due my toolchain not having the most recent libosmocore. The service file and screenrc change has not been verified either.