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

146 Commits

Author SHA1 Message Date
Alexander Chemeris 3d2c5ecfbc Update .gitignore to include new executables and config files. 2011-07-25 14:36:20 -04:00
Thomas Tsou 44aff7de0b uhd: remove uhd type argument
UHD recently modified the E100 type name from 'usrp-e' to
'e100' causing the device make to fail. Remove device type
checking to keep things working with the older and newer
names.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-07-08 17:37:11 -07:00
Thomas Tsou 6d34bace87 transceiver: reinsert digital gain scaling
Commit e161523c (transceiver: simplify transmit power control)
changed transmit gain control to RF setting only. This was
appropriate for a WBX board with 25 dB of gain control, but
inappropriate for an RFX with fixed transmit gain.

RFX boards will regain the ability to set transmit
attenuation. Since gain is set on the RF side first,
reintroducing digital gain settings should have limited
overall effect on non-RFX daughterboards.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2011-06-22 13:39:13 -07:00
Thomas Tsou 8301298f88 Merge branch 'remote-cli'
* remote-cli: (22 commits)
  Throw exception if usrp is not found. Don't crash transceiver.
  Update OpenBTS init script
  Correctly exit OpenBTS even if console is not started yet.
  Add option to run OpenBTS in a failsafe loop.
  Shutdown without core dump on a usual SocketError.
  Remove Transceiver PID file on OpenBTS exit.
  Save transceiver PID to a file and use it to kill old transceivers.
  Correct comment for Server.WritePID.
  Set FD_CLOEXEC flag on all sockets.
  Stupid bug fixed - can't move stack variables initialization to a separate function.
  Gracefully shutdown OpenBTS on transceiver timeout/error.
  Make functions and variables in OpenBTS.cpp static to avoid their use outside of the file.
  Remove PID file on program exit.
  Implemented daemon mode, configured from config.
  Better default name for OpenBTS control UNIX socket.
  Initialize logger right after loading config file.
  Use normal cout and cerr while we have only one thread.
  Better comments for previous commit.
  Catch SIGINT, SIGTERM and SIGHUP and shutdown the server gracefully.
  Uncomment real BTS start/stop.
  ...
2011-06-21 19:02:19 -07:00
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 23d826d3ba Throw exception if usrp is not found. Don't crash transceiver. 2011-06-21 16:46:55 -07:00
Alexander Chemeris f3fbf2a39e Update OpenBTS init script 2011-06-21 16:46:55 -07:00
Alexander Chemeris fc61ebaf53 Correctly exit OpenBTS even if console is not started yet. 2011-06-21 16:46:55 -07:00
Alexander Chemeris 7d9fa86569 Add option to run OpenBTS in a failsafe loop. 2011-06-21 16:46:55 -07:00
Alexander Chemeris d0c9057711 Shutdown without core dump on a usual SocketError. 2011-06-21 16:46:55 -07:00
Alexander Chemeris a0f3b96688 Remove Transceiver PID file on OpenBTS exit. 2011-06-21 16:46:55 -07:00
Alexander Chemeris 7b3c0d3090 Save transceiver PID to a file and use it to kill old transceivers. 2011-06-21 16:46:55 -07:00
Alexander Chemeris 1cd7f00470 Correct comment for Server.WritePID. 2011-06-21 16:46:55 -07:00
Alexander Chemeris f7d78ff578 Set FD_CLOEXEC flag on all sockets.
We don't want them to be inherited on exec(). We use exec() to run Transceiver and it OpenBTS process crashes, transceiver becomes owner of all LISTEN sockets.
2011-06-21 16:46:55 -07:00
Alexander Chemeris 08bdbb921c Stupid bug fixed - can't move stack variables initialization to a separate function. 2011-06-21 16:46:55 -07:00
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