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

226 Commits

Author SHA1 Message Date
Alexander Chemeris 80963d1ed9 common libs: Use gethostbyname2_r() instead of gethostbyname() if available.
gethostbyname() is not thread-safe. It's recommended to use gethostbyname_r() or gethostbyname2_r() instead.

(cherry picked from commit f27e9581cdb6837f83d0aab467f0e5f83e814e7b)
2010-12-21 18:11:14 +03:00
Alexander Chemeris 422848f5c1 control: Save IMEI in TMSI table for informational purposes.
So yes, now you should be able to identify all those annoying iPhones.

(cherry picked from commit e09c0b87d2ecbb5df713c020b814e3a8f371a9d4)
2010-12-21 18:09:31 +03:00
Alexander Chemeris c5e8a2337d sip: Set display name for To field in a SIP MESSAGE.
(cherry picked from commit 82d2d87f3f726976d9003829517a6cce395543ee)
2010-12-21 18:07:36 +03:00
Alexander Chemeris 25cef9ef96 control: Use std::string in TransactionEntry to ctore messaging payload.
Originally there was a fixed-size char array, which didn't allow to work with long hex strings.

(cherry picked from commit fdc6fc85f9f431438ef7279975c2f7c230cb4aa5)
2010-12-21 18:06:31 +03:00
Alexander Chemeris c39af79c75 smqueue: Documentation fixes for sm_state enumeration in smqueue.
(cherry picked from commit 70dffa1fcfb497cb6f90c1f83bf5d34942d27c59)
2010-12-21 18:05:51 +03:00
Alexander Chemeris b854303428 gsm: Add 8-bit alphabet to enumeration of GSM alphabets.
(cherry picked from commit 6c2e5134808e66f525e7df3e250a3f7be5cfd31c)
2010-12-21 18:05:09 +03:00
Alexander Chemeris 9de3435b20 sip: More comments and minor code ordering in SIP::sip_message().
(cherry picked from commit e7d2a39129e86c9a844bdb0c282fdf489f2f4ee7)
2010-12-21 18:03:56 +03:00
Alexander Chemeris f92807c2bd smqueue: Fix compiler warning about char* and constant strings.
(cherry picked from commit d712b09cdd)
2010-12-21 18:01:56 +03:00
Alexander Chemeris 2c0be6d746 Transceiver: correctly exit if USRP is not found.
(cherry picked from commit 8880f019e8071eb7f43f3727ab5414f744aedc4b)
2010-12-21 17:52:18 +03:00
Alexander Chemeris 91d16c65b7 Transceiver52M: Fix wrong memcpy().
1) It should be memmove(), because source and destination regions may overlap.
2) Amount of moved memory was calculated incorrectly and was about 2x times more then really needed. We thus touched memory outside of the allocated array and may crash the program.

(cherry picked from commit fbed302055ebe77ca19b899c8bc307ca05b4a604)
2010-12-21 17:50:35 +03:00
Alexander Chemeris 889d45eb22 Better safety checks in TMSIRecord::load().
This also avoids "corrupt TMSI file" message on empty file.

(cherry picked from commit 8ce5b5ec29deb53a72c81139a1fd768db52f60aa)
2010-12-21 17:49:24 +03:00
Alexander Chemeris 0517600882 Zero file descriptors set before use.
(cherry picked from commit cc1e6635f58512ec1bc07f4a933d6535e2c75d7f)
2010-12-21 17:48:25 +03:00
Alexander Chemeris e8b244c306 Remove unused variable in BitVector::hex().
(cherry picked from commit 4ff6edb50ce90db31e66dba3f77e08259929f1ac)
2010-12-21 17:47:29 +03:00
Alexander Chemeris 955f6ca200 Move more code out of asserts.
This time I checked all occurrences of assert() and all others are ok, if I didn't miss anything

(cherry picked from commit 2afd3fd962eb89e08a73420542267191f459815f)
2010-12-21 17:45:55 +03:00
Alexander Chemeris 410d42eda0 Don't put real code into assert().
If you compile with optimization and NDEBUG is defined, then the whole assert() is replaced with ((void) 0) and your code is not executed at all.

Don't assert() on pthread_join() return value. If thread was not started yet, then pthread_join() will fail, but it's ok for us.

(cherry picked from commit d0b797e62c, 21a84dcec9cdf25657bba5c221aac9d4bb81d8b3, 8ed37a1f36e1b1266728647e715f95a28df3f900)
2010-12-21 17:42:09 +03:00
Alexander Chemeris f24e148432 Fix a bug with Timeval difference calculation on 64-bit Linux.
Subtracting uint32_t from uin32_t gives you uint32_t. And assigning result to a long doesn't make it a signed value, because on 64-bit Linux long is 64 bits.

(cherry picked from commit 82dd78d698)
2010-12-21 17:38:21 +03:00
Alexander Chemeris fc81223045 Fix a bunch of typos.
(cherry picked from commits 2da5a28a07, 6cddd36139. 7852c1e572abbc9fee2548a58e377cfbb3eff46d, f85d5b3f528ba19c598cbe77bad2566920bf9dd4, 0f8766a506f25118f732cca10fe44a1c9a0ace6a, 26adfe2d158e6a80d50b4e247c1539b5a07add9f)
2010-12-21 16:58:05 +03:00
Thomas Tsou b7bf610484 Merge branch 'master' of git://openbts.git.sourceforge.net/gitroot/openbts/openbts
* 'master' of git://openbts.git.sourceforge.net/gitroot/openbts/openbts:
  gsm: Remove obsolete PCAP stuff from gsmtap.h
  gsm: Update and enhance the GSM Tap functionality
  gsm: Add same ARFCN()/typeAndOffset() accessors to L1Decoder than L1Encoder
  gsm: Save time of received frame for later use in XCCHL1Decoder
  gsm: Create more precise TypeAndOffset cste for BCCH/CCCH
  transceiver: Fix misusage of ~ in bitfields
  misc: Add a proper .gitignore file
  build: Fix Transceiver/Makefile.am to use AM_CXXFLAGS instead of CXX_FLAGS
  build: Remove all files autogenerated by autoreconf

Fix trivial conflict:
	public-trunk/Transceiver/Makefile.am
2010-12-08 12:18:39 -05:00
Sylvain Munaut 647a207bde gsm: Remove obsolete PCAP stuff from gsmtap.h
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 00:46:02 +01:00
Sylvain Munaut e6d5057d5d gsm: Update and enhance the GSM Tap functionality
* switch to the new format
* add uplink frame dump as well
* fill more fields than before (not fully complete yet tough)

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 00:46:02 +01:00
Sylvain Munaut b6b3f6ace1 gsm: Add same ARFCN()/typeAndOffset() accessors to L1Decoder than L1Encoder
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 00:00:18 +01:00
Sylvain Munaut 3c7ad29fa8 gsm: Save time of received frame for later use in XCCHL1Decoder
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 00:00:18 +01:00
Sylvain Munaut 908bc39f5f gsm: Create more precise TypeAndOffset cste for BCCH/CCCH
Very useful to know in L1 what burst/encoder/fec are related to.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 00:00:18 +01:00
Sylvain Munaut a8834fde88 transceiver: Fix misusage of ~ in bitfields
Somehow it seems the author tought using ~ would set that bit to 0. But
it invert all bits and as such set all others to '1'.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 00:00:18 +01:00
Sylvain Munaut d82d8b9496 misc: Add a proper .gitignore file
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 00:00:18 +01:00
Sylvain Munaut 1a861cad9b build: Fix Transceiver/Makefile.am to use AM_CXXFLAGS instead of CXX_FLAGS
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-12-01 00:00:18 +01:00
Sylvain Munaut 50006e364d build: Remove all files autogenerated by autoreconf
Best practice is to not include those in repositories but only
in tar.gz dist tarball.

autoreconf -i will regenerate them

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
2010-11-30 23:58:50 +01:00
Thomas Tsou 2ce9041742 uhd: update to change in uhd metadata interface
Fixes the following build error.

UHDDevice.cpp:462: error: ‘EVENT_CODE_SUCCESS’ is not a member of ‘uhd::async_metadata_t’
UHDDevice.cpp:507: error: ‘EVENT_CODE_SUCCESS’ is not a member of ‘uhd::async_metadata_t’

Reported-by: Dirk Kirsten <Dirk.Kirsten@uni-konstanz.de>
Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2010-11-27 18:43:18 -05:00
Thomas Tsou 6e55e19418 uhd: add missing return in device open
Fixes a compile warning; returns true if all is goes well.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2010-11-27 17:58:00 -05:00
Thomas Tsou e9010cb9a0 uhd: fix potential buffer overrun
Fix a bug that might allow a sample buffer write to go a sample too far.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2010-11-27 17:57:06 -05:00
Thomas Tsou aaf378a111 uhd: update to new uhd range api
Fixes the following that occurs with recent uhd changes.

UHDDevice.cpp:260: error: ‘struct uhd::gain_range_t’ has no member named ‘max’
UHDDevice.cpp:260: error: ‘struct uhd::gain_range_t’ has no member named ‘min’

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2010-11-17 01:45:01 -05:00
Thomas Tsou 589dd9091e uhd: increase initial transmit latency and disable adaptive control
The underrun behaviour of the USRP2 is different from the USRP1, and
the adaptive latency mechanism is not directly transferable. Instead,
fix the latency with a higher starting value, which effectively
buffers more samples on the host in front of the Ethernet interface.

An alternative may be to use the adaptive approach with USRP2
specific upper and lower bounds. For now, just use preprocessor
directives until a better solution comes around.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2010-11-17 01:44:51 -05:00
Thomas Tsou af2ded3b01 uhd: remove I/Q swap from radio interface
There should be a better way to do this. Only the USRP1 option
in non-loopback mode needs the swap.

UHD   & !SWLOOPBACK: FLIP_IQ = 0
UHD   &  SWLOOPBACK: FLIP_IQ = 0
USRP1 & !SWLOOPBACK: FLIP_IQ = 1
USRP1 &  SWLOOPBACK: FLIP_IQ = 0

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2010-11-17 01:44:44 -05:00
Thomas Tsou fb852969db uhd: add conditional build support
Transceiver can be built with UHD by specifiying the --with-uhd
option. Fractional sample rates are not supported by the USRP2
so Transceiver52M is not built.

Otherwise, the default GNU Radio USRP1 implementation is used.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2010-11-17 01:44:38 -05:00
Thomas Tsou 2735b806dd uhd: add uhd device implementation
This patch adds USRP2 device support and future support for
other UHD based devices. On receive, a sample buffer class,
which is indexable by timestamps, is used to temporarily
hold data until the requested samples are available.

On transmit, samples are sent immediately unless sample
alignment is known to be off - during startup or after the
occurrence of underruns or other errors. To regain
synchronization at these moments, timestamps are compared
against the current device time and dropped unless there
exists significant delay margin to physically arrive at the
device before deadline.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2010-11-17 01:44:16 -05:00
Thomas Tsou ce33adf422 uhd: exit on device open failure
If the device doesn't open, there's no reason to continue. Shut down
so the process doesn't linger.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2010-11-16 22:11:50 -05:00
Thomas Tsou 9c091dc7a9 uhd: separate USRPDevice and create virtual device interface
Move essential interface components into an abstract Device class
and create a factory method for instantiating compile-time
specified derived types (USRP1 or UHD).

The radioInterface has a device specific type conversion call to
the USRP1 driver, so push that behind the Device interface too.

Signed-off-by: Thomas Tsou <ttsou@vt.edu>
2010-11-16 22:11:50 -05:00
Alexander Chemeris 62a2d77ccc Better code for MOUSSDController(). 2010-11-01 14:57:22 +03:00
Alexander Chemeris ce66ecb51d Some more changes. 2010-11-01 14:57:22 +03:00
Alexander Chemeris 94523e388a USSD SIP handler initial implementation.
It works for basic requests, but needs more tsting for timeouts and other exceptional cases.
2010-11-01 14:57:22 +03:00
Alexander Chemeris bf4c962d41 Implement another flavor of TransactionTable::find() with mobile ID and service type. 2010-11-01 14:57:22 +03:00
Alexander Chemeris aeedcc50b6 Print USSDData pointer when printing TransactionEntry. 2010-11-01 14:57:22 +03:00
Alexander Chemeris a2298288fe Other USSD code beautification and fixes. 2010-11-01 14:57:22 +03:00
Alexander Chemeris 9f707665ba Better result reporting for waitUSSDData() and postUSSDData(). 2010-11-01 14:57:22 +03:00
Alexander Chemeris 9c542926ac Always initialize mUSSDData in a transaction. 2010-11-01 14:57:22 +03:00
Alexander Chemeris c288b250b6 Remove second USSDHandler constructor. 2010-11-01 14:57:22 +03:00
Alexander Chemeris 00b1810997 Store mobile IMSI instead of TMSI in MOUSSD transaction. 2010-11-01 14:57:22 +03:00
Alexander Chemeris e8ffcdb72f Update SIP interface to support SIP MESSAGEs for USSD. 2010-11-01 14:57:22 +03:00
Alexander Chemeris 77d380565b Send correct text string with USSD release message. 2010-11-01 14:57:22 +03:00
Alexander Chemeris 86b066da63 Fix comments typos and code formating. 2010-11-01 14:57:22 +03:00