Hello all,
I'm attempting to connect multiple BTS's to one E1 card. Each BTS is a single TRX and I'm using a dahdi card plugged into a DCS. The DCS maps the channels as follows:
Name Src Dest Speed Type -------------------------------------------------------------------------------- bscnok1 01.T1E1-A.02.01 01.T1E1-A.03.01 0256k D FDX bscnok2 01.T1E1-A.02.05 01.T1E1-A.04.01 0256k D FDX bscnok3 01.T1E1-A.01.09 01.T1E1-B.01.01 0256k D FDX
So essentially:
TS 1,2,3,4 from OpenBSC (T1E1-A-02) are mapped to nok1 1,2,3,4 (T1E1-A-03) TS 5,6,7,8 from OpenBSC (T1E1-A-02) are mapped to nok2 1,2,3,4 (T1E1-A-04) TS 9,10,11,12 from OpenBSC (T1E1-A-02) are mapped to nok3 1,2,3,4 (T1E1-B-01)
This all works fine. The BTS operates on TS1,2,3,4 on any of the ports I have configured. I just swap timeslots in openbsc.cfg from 1,2,3,4 to 5,6,7,8 or 9,10,11,12 and everything is happy.
Where I run into a problem is when I try to actually run multiple BTS's at once. So I take everything defined in "bts 0" and duplicate it as "bts 1". I change the time slots for oml, rsl, and traffic channels to match the appropriate channels for bts 1/2. But when I go to start osmo-nitb I get an error that it can't open /dev/dahdi/1 because it's already in use. It appears for some reason that it's attempting to open /dev/dahdi/1 for both BTS's even though only bts 0 uses /dev/dahdi/1 for OML - bts 1 should use /dev/dahdi/5 and bts 2 should use /dev/dahdi/9.
My /etc/dahdi/system.conf is defined as: span=1,1,0,ccs,hdb3,crc4 bchan=2-4,6-8,10-12 dchan=1,5,9
I'm at a loss. Has anyone tried to run multiple BTS's with dahdi on a single E1 or T1 span? Is there something special I need to specify so that OpenBSC doesn't grab the first dchan for each BTS?
Thanks, Gus
Hi Gus,
I hope the following two changes (see attachment) will solve the problem. They are already included in current libosmo-abis.git master.
On Wed, Aug 24, 2011 at 01:41:15PM +0200, Holger Hans Peter Freyther wrote:
On 08/24/2011 09:49 AM, Harald Welte wrote:
if (bfd->fd) {
close(bfd->fd);
bfd->fd = 0;
}
maybe using -1 for 'invalid' fd's is better?
"-1" already has a different meaning in the same part of the code, it means that there was some error in return to "open"
But yes, we could do "-2" or store the open result in a variable rather than a structure member. Feel free to do a follow-up patch ;)
Regards, Harald