laforge
/
openbts-osmo
Archived
1
0
Fork 0
Commit Graph

211 Commits

Author SHA1 Message Date
Alexander Chemeris 1965ab4255 Gracefully shutdown OpenBTS on transceiver timeout/error. 2011-06-21 16:46:55 -07:00
Alexander Chemeris 0e6f974b1e Make functions and variables in OpenBTS.cpp static to avoid their use outside of the file. 2011-06-21 16:46:55 -07:00
Alexander Chemeris 7a3d355655 Remove PID file on program exit. 2011-06-21 16:46:55 -07:00
Alexander Chemeris 7db74d0cce Implemented daemon mode, configured from config.
I have to do a weird thing - forking during initialization of static variables. I turns out main() is too late for that, because we bind sockets in static variables and when we run second instance, it fails in bind and not in our lockfile checking code. Some other ramifications come out because of our heavy use of global variables. Don't do that in your next project - use global variables only when strictly necessary.
2011-06-21 16:46:55 -07:00
Alexander Chemeris 2bafba55a3 Better default name for OpenBTS control UNIX socket. 2011-06-21 16:46:55 -07:00
Alexander Chemeris 7be28a2263 Initialize logger right after loading config file.
This avoids printing of log messages to the screen on program startup.
2011-06-21 16:46:55 -07:00
Alexander Chemeris a5c9b9ecbb Use normal cout and cerr while we have only one thread.
COUT() and CERR() macros output current time before text, which looks ugly for the welcome message.
2011-06-21 16:46:54 -07:00
Alexander Chemeris aec7d8c604 Better comments for previous commit. 2011-06-21 16:46:54 -07:00
Alexander Chemeris 8598e72800 Catch SIGINT, SIGTERM and SIGHUP and shutdown the server gracefully. 2011-06-21 16:46:54 -07:00
Alexander Chemeris 163290b60e Uncomment real BTS start/stop. 2011-06-21 16:46:54 -07:00
Alexander Chemeris a4cbf3bae3 Update files generated by autoconf. 2011-06-21 16:46:54 -07:00
Alexander Chemeris 5ababfad65 A big patch implementing remote CLI.
This patch adds ability to connect to OpenBTS CLI with TCP socket and UNIX socket. This is configurable in the config file. To connect to the CLI use apps/OpenBTScli executable, which reads configuration from the same config file.
2011-06-21 16:46:54 -07:00
Alexander Chemeris 1418461410 smqueue: Add SMSC short code to smqueue.config.example 2011-06-21 15:30:44 -07:00
Alexander Chemeris 2b26d6cf26 Checking in forgotten smsc.cpp and smsc.h files. 2011-06-21 15:30:44 -07:00
Alexander Chemeris 970beeb816 Ignore User-Data-Header in SMS TPDU when decoding text in TLUserData::encode7bit(). 2011-06-21 15:30:44 -07:00
Alexander Chemeris ef988a4b2f Transparently pass TP-UHDI (User-Data-Header-Indicator) from SMS-SUBMIT to SMS-DELIVER.
Among other things this allows us to correctly pass-through concatenated SMS messages.
2011-06-21 15:30:44 -07:00
Alexander Chemeris 63202cbf24 Slightly cleaner output in TLUserData::write(). 2011-06-21 15:30:44 -07:00
Alexander Chemeris 7318cc60f9 Log contents of a message instead of its memory addresss in SMS::parseTPDU(). 2011-06-21 15:30:44 -07:00
Alexander Chemeris a55a85eeba Use decoded text from original message in bounce and e-mail messages. 2011-06-21 15:30:44 -07:00
Alexander Chemeris ff7b341dae More readable bounce message. 2011-06-21 15:30:44 -07:00
Alexander Chemeris 53123da4f0 Maximum SMS length is 160 symbols in default alphabet. 2011-06-21 15:30:44 -07:00
Alexander Chemeris e61168a39c Avoid duplication of "IMSI" in SC.Register.Msg.
"IMSI" is also a prefix to phone's imsi-number, so when you output this error message, you get something like IMSIIMSI310260550682564.
2011-06-21 15:30:44 -07:00
Alexander Chemeris d498358b6e Set Log.Alarms.* values in smqueue config.
Logging system expect those valus to exist.
2011-06-21 15:30:44 -07:00
Alexander Chemeris 49b8ffd2d8 Make "from" address for bounce messages configurable. 2011-06-21 15:30:44 -07:00
Alexander Chemeris d54e4d82fd Move most of the SMS processing to smqueue (initial check-in).
Idea is to make OpenBTS as dumb as possible. It should forward all received SMS messages' RPDU to SMSC (smqueue) and vice versa. All actual message decoding and processing is to be done in smqueue.
2011-06-21 15:30:44 -07:00
Alexander Chemeris 57d292d962 Better documentation and error reporting for ThreadSemaphore. 2011-06-21 15:30:44 -07:00
Alexander Chemeris 971b6ba700 Implementation of Semaphore. 2011-06-21 15:30:44 -07:00
Alexander Chemeris 2ab4ca6648 Implemented "trans" CLI command to list all active transacions. 2011-06-21 15:30:29 -07:00
Thomas Tsou 215b8f7e5d Revert "config: modify example defaults"
This reverts commit acdb4969d5.

The example log level was dropped down ERROR in order
to be extra nice to embedded devices, but NOTICE level
is still a more useful default setting for broader
issues.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-06-10 11:27:12 -07:00
Thomas Tsou 96710c8077 uhd: flush receive buffer should return true on timeout
Receive buffer flush should continue to read until
either the desired number of packets has been read or
timeout, which means that the buffer has been emptied.
These are expected behaviours and should return true.

Ignore errors at this stage as the data and associated
metadata can be considered garbage and not worth
reporting. Actual error conditions will be caught
further downstream when useful data comes in.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-06-09 12:47:32 -07:00
Thomas Tsou d186353546 usrp1: fix transmit side tuning bug
Transmit tuning was primarily setup for side A only. Some boards
- WBX - would still tune with improper channel arguments, though
receiver performance was disrupted.

Previous testing was primarily with single board on side A only
or dual configuration with side A transmit, so this bug largely
went undetected. Patch tested with RFX and WBX daughterboards
in single and dual configurations sides A and B.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-06-03 21:47:27 -07:00
Thomas Tsou e8cb2708b2 usrp1: fix typo in rx gain setting log message
Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-06-03 12:18:25 -07:00
Thomas Tsou e8b9db51e2 uhd: log asynchronous errors as errors
Bump abnormal asynchronous events - basically send errors -
up to ERROR level. These errors are dominated almost
entirely by underflow events, which should not be regularly
occuring.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-06-02 11:19:30 -07:00
Thomas Tsou b70ddd4be2 uhd: change configure default to uhd
This is, afterall, the OpenBTS repository for UHD.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-06-01 15:53:34 -07:00
Thomas Tsou c42165cba5 usrp: remove unnecessary I/Q swap for non-uhd
This bug slipped in because the following patch
was made before tuning adjustment changes that
negated the need for the I/Q swap.

753118031e

At this point, we assume that there are no
big-endian users of OpenBTS with the USRP1. If
there are any SPARC, PowerPC, or MIPS users,
hopefully they will be resourceful enough to
search the commit log and add the necessary
byte swaps.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-06-01 15:03:32 -07:00
Thomas Tsou 7fc5b4e6cd usrp: fix receive gain setting bug on non-uhd
When setting rx gain from the console, the returned set
value would never change due to a braces error around
logging macros.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-06-01 15:02:48 -07:00
Florian Wolff 6a8641438a gsm: fix for "L3 RR GPRS Suspension Request" error
Certain phones with GPRS capabilities will fail to
initiate calls with the following error. No call output
will be present in the Asterisk log.

1265648543.0255 INFO 3073350512 GSML3Message.cpp:162:parseL3: L3 recv RR GPRS Suspension Request
1265648543.0257 NOTICE 3073350512 DCCHDispatch.cpp:144:DCCHDispatcher: UnexpectedMessage

The issue and patch were discussed on the openbts-discuss
mailing list.

"David is right that openBTS does not emit any GPRS beacon,
so the behaviour is triggered from mobile station which
believe that there has been some GPRS before (i.e. in it's
old location area).

Unfortunately openBTS does not simply ignore this L3 RR
GPRS Suspension Request, instead a expected message flow
sequence (i.e. during call setup) is terminated with an
exception.

However we created a small patch against openbts-2.5.3
Lacassine to really ignore the L3 message. Feel free to
distribute it upstream to the community."

The author of the patch is >> Florian.Wolff@Siemens.com <<

According to his statement, O2 XDA Orbit and Motorola
Milestone are working fine with those changes. They had
the same problems before as with the iPhone.

Reported-by: Michael Folz <michael.folz@fh-kl.de>
Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-05-31 16:01:00 -07:00
Thomas Tsou 3896e7499f transceiver: fix energy threshold bug
If no bursts were received over a long enough duration
then the threshold would roll into negative territory.
The energy detection is based on a comparison with the
squared threshold, so all handsets would become
effectively barred after a certain period of
inactivity.

In theory, this bug also exists in the mainline tree,
but there the daughterboard receive gain is fixed at
max, which always allows the ADC to generate sufficient
noise to trigger the energy dectector and keep the
system in a valid steady state.

To fix, simply add a negative value check like those
already in place for other locations.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-05-26 15:40:38 -07:00
Thomas Tsou f398757fe6 Merge branch 'master' of git://openbts.git.sourceforge.net/gitroot/openbts/openbts
* 'master' of git://openbts.git.sourceforge.net/gitroot/openbts/openbts:
  configure.ac: use AM_SILENT_RULES if available
2011-05-26 15:40:21 -07:00
Thomas Tsou e456a41edf transceiver: fix bug on non-UHD builds
Add a missing variable that was supposed to go with,

b7c09bba14

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-05-26 15:40:03 -07:00
Thomas Tsou e161523c8b transceiver: simplify transmit power control
UHD will internally accept floats with a range of +/-1.0,
which corresponds to a 16-bit signed integer range of
apporximately +/- 32000. Set the default amplitude to .3,
which is a safe value agaist saturation elsewhere in the
transmit chain.

The non-UHD maximum amplitude is unchanged at 13500.

Remove digital gain control because it's unnecessary and
causes extra load on enbedded systems.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-05-26 15:39:54 -07:00
Thomas Tsou acdb4969d5 config: modify example defaults
Lower the default setting to ERROR for main and TRX
logs. This makes the log friendlier for embedded
installations.

With default setting of midpoint and WBX board on
N200, the overall receive gain comes out to 19 dB.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-05-26 15:39:32 -07:00
Thomas Tsou a3bd572e45 uhd: reorganize error handling, exit when non-recoverable
This is primarily a minor refactor with the exception
of non-recoverable errors - notably if the receive times
out - which almost always requires a reload of the FPGA.
In these cases, quit without trying as resistance is
futile.

ERROR_TIMING:          Soft restart of streaming
ERROR_UNHANDLED:       Benign errors
ERROR_UNRECOVERABLE:   Abandon ship

Non-recoverable behaviour has not been observed in recent
builds, but may exist in older (or future) configurations.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-05-25 17:02:10 -07:00
Thomas Tsou 99a1466155 uhd: enable automatic alignment updates
Overnight testing shows that this shouldn't be required
in the majority of cases, but shit happens. Enabling
this forces transmit timing realignment at one minute
intervals. As a fallback method, timing slips not
caught by normal checks will be reset at the update.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-05-23 19:01:32 -07:00
Thomas Tsou 6ddbc257c8 uhd: cleanup startup timestamp alignment
At startup, instead of flushing initial packets blindly,
send a stop streaming command, flush, and start. The same
procedure is used in the event of a runtime timestamp
validity error.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-05-23 19:01:21 -07:00
Thomas Tsou 055af67a4e transceiver: rework digital gain settings
The output of the modulator or resampler is scaled and
converted from floating point to fixed point. The scaling
factor is the leftover dB in RF attention (relative to max
transmit power), which is handled prior to the integer
conversion. This should work across all daughterboards and
non-UHD installations.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-05-23 19:01:12 -07:00
Thomas Tsou b7c09bba14 transceiver: populate gain setting operations
These were carried over from the 52M transceiver to
allow recently added control commands to actually
work.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-05-23 19:00:56 -07:00
Thomas Tsou 2ba373fea9 Merge branch 'dboard'
* dboard:
  Transceiver52M: add WBX, DBSRX, and single board support
  Transceiver: add WBX, DBSRX, and single board support

Conflicts:
	public-trunk/Transceiver/radioInterface.cpp
2011-05-23 19:00:44 -07:00
Thomas Tsou dd0ee20c1a transceiver: enable adjustable gain settings on non-52MHz
Add gain and attenuation settings that were present
only in the 52MHz transceiver. This patch also
fixes SETRXGAIN failed warnings at startup.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-05-23 18:59:58 -07:00
Thomas Tsou db419b17c7 uhd: set attenuation relative to max RF gain
Previously this was referenced off the the ad9862
PGA with a range from 0 to -20 dB. Instead base
the attenuation factor on the maximum total RF
gain returned by the device.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-05-23 12:08:09 -07:00