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

120 Commits

Author SHA1 Message Date
Thomas Tsou 3ea07de75c Merge branch 'sms-split'
* sms-split:
  smqueue: Add SMSC short code to smqueue.config.example
  Checking in forgotten smsc.cpp and smsc.h files.
  Ignore User-Data-Header in SMS TPDU when decoding text in TLUserData::encode7bit().
  Transparently pass TP-UHDI (User-Data-Header-Indicator) from SMS-SUBMIT to SMS-DELIVER.
  Slightly cleaner output in TLUserData::write().
  Log contents of a message instead of its memory addresss in SMS::parseTPDU().
  Use decoded text from original message in bounce and e-mail messages.
  More readable bounce message.
  Maximum SMS length is 160 symbols in default alphabet.
  Avoid duplication of "IMSI" in SC.Register.Msg.
  Set Log.Alarms.* values in smqueue config.
  Make "from" address for bounce messages configurable.
  Move most of the SMS processing to smqueue (initial check-in).
  Better documentation and error reporting for ThreadSemaphore.
  Implementation of Semaphore.
  Implemented "trans" CLI command to list all active transacions.
2011-06-21 19:02:10 -07:00
Thomas Tsou f6ed307167 control: use braces with conditions and logging macros
Removes warnings and may prevent future clumsy mistakes.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-06-21 17:49:29 -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
Thomas Tsou e94b1f4827 uhd: disable adaptive buffering in 52 MHz transceiver
Similar to the non-52 Mhz case,

589dd9091e

This drastically reduces underruns on the E100.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-05-23 12:02:56 -07:00
Thomas Tsou 4f08ddf45a uhd: rework handling of timestamp errors
On a lapses of time monotonicity (and possibly other errors),
stop and restart the receive streaming with a buffer flush
in between. This is a cleaner replacement to the previous
clock reset with that didn't attempt to stop steaming.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-05-23 11:52:46 -07:00
Thomas Tsou de018f7fef uhd: fix timestamp conversion bug on 32-bit architectures
Type size_t was used in the UHD time_spec_t to integer
conversion, which would overflow at roughly 4 and a half
hours causing the sample buffer to error on timestamp
validity. Builds where size_t takes on 64-bits were not
affected by this bug.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-05-23 11:32:37 -07:00
Alexander Huemer a2d4ed5c71 configure.ac: use AM_SILENT_RULES if available
M_SILENT_RULES improves readability of the messages emitted by make,
compiler warnings are easier to spot.

Available since automake-1.11, ignored on earlier versions.

Traditional verbose output can be forced by
"./configure --disable-silent-rules" or "make V=1"

Written-by: Alexander Huemer <alexander.huemer@xx.vu>
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2011-05-23 19:04:50 +02:00
Thomas Tsou 551dbd3326 uhd: reset sample clock when time goes non-monotonic
With UHD b4fc0d61bb6cbd1a5614745bab9aeb0abc22cb6f

Sample clock will reset to zero after an overrun. Earlier
versions may hang the FPGA, which is non-recoverable,
requiring a manual image reload or reboot.

If reset to zero, attempt to kick the sample clock to the
last properly received timestamp value. At this point,
there will be a timing continuity jump, which will drop
connections, but transmit and receive chains should be
aligned allowing for re-establishment.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-05-08 13:46:29 -04:00
Thomas Tsou 67714e4292 uhd: inline thread priority setting
Push the ability to set thread priority out to the 52M
Transceiver interface, because that's where the thread
control exists.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-05-06 21:01:42 -04:00
Thomas Tsou 17750fd756 uhd: move static functions into the uhd_device class
Simplifies things slightly, and this is supposed to be
C++ after all.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-05-06 20:35:47 -04:00
Thomas Tsou 88223de898 uhd: allow the non-uhd to still compile unchanged
The missing methods are not implemented and simply return. They
didn't exist in the first place.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-05-06 17:42:29 -04:00
Thomas Tsou 8c86da79c0 uhd: move non-52MHz transceiver to common radio device interface
Use the same header files for the device and start moving
toward a commmon transceiver without so much redundant code.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-05-06 17:42:18 -04:00
Thomas Tsou 258ad91549 uhd: set and shadow settings through interface
Shadow all gains and frequencies, which minimizes device access.
This allows the transceiver to variably control the device
settings.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-05-06 17:42:09 -04:00