Project

General

Profile

Actions

Feature #3040

closed

osmo-gsm-tester: Add support for ip.access nanoBTS

Added by pespin about 6 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
-
Start date:
03/07/2018
Due date:
% Done:

100%

Spec Reference:

Description

The two types of nanobts (band 1800?, band 1900) should be supported and tested by OsmoGsmTester in the regular tests.

Related: SYS#3890

Actions #1

Updated by pespin about 6 years ago

  • Subject changed from osmo-gsm-tester: Add support for nanoBTS to osmo-gsm-tester: Add support for ip.access nanoBTS
Actions #2

Updated by pespin about 6 years ago

As there's no known way to stop the BTS from transmitting packets against the assigned BSC through ip-configure, the idea is to power if off from current using some software-controlled socket.

We installed in R&D env a device which can be controlled using the following pieces:

The hw we are using has 4 ports, numbered 1..4. The idea is to have an attribute in resources.conf for the BTS: power-path: '1'. Then we could have a PowerControl class with an implementation PowerControlSyspm which uses pysispm underneath. Then NanoBts class should use an instance of that class to control power on and off.

NanoBTS is to be connected to port 1
Nano3g will be connected to port 2.

Actions #3

Updated by pespin about 6 years ago

Started work on RnD.

Required extra installation (to be added to ansible):

Instructions in here to be able to access usb device through non-root user:
https://pypi.python.org/pypi/pysispm/0.5

Extra dependencies:

apt-get install python3-usb
pip3 install pysispm

Actions #4

Updated by pespin about 6 years ago

  • Status changed from New to In Progress
  • Assignee set to pespin

Trying to set up the nanobts with a static IP now:
10.42.42.1 is the IP of the main unit.
10.42.42.190 is the assigned to the nanobts (by DHCP?) and found usig abisip-find

ipaccess-config --ip-address 10.42.42.53/24 10.42.42.190
ipaccess-config --ip-gateway 10.42.42.1 10.42.42.190
ipaccess-config --restart 10.42.42.190

After reboot, I see the orange light blinking from time to time, which according to https://osmocom.org/projects/openbsc/wiki/NanoBTS_Getting_Started#Network-configuration means that the nanobts is started.

However, I am unable to find it. abisip-find shows nothing, ping returns 100% packet loss, and ipaccess-config timeouts.

Interestingly, nmap shows that the nanobts correctly changed the IP:

Nmap scan report for 10.42.42.53
Host is up (-0.100s latency).
All 1000 scanned ports on 10.42.42.53 are filtered
MAC Address: 00:02:95:00:41:B3 (IP.Access Limited)

Actions #5

Updated by pespin about 6 years ago

It seems DHCP needs to be disabled before, otherwise it keeps using DHCP even if a static address was set:

ipaccess-config -S static-ip -U dhcp-enabled -r 10.42.42.190
Now run he previously documented commands...

Actions #6

Updated by pespin about 6 years ago

That worked for the nanobts on my table, but not for the one in the RnD setup.

The difference: the one on my table seems to have the port 3006 up after restarting with the static ip set:

Nmap scan report for 192.168.30.2
Host is up (0.0068s latency).
Not shown: 999 closed ports
PORT     STATE SERVICE
3006/tcp open  deslogind
MAC Address: 00:02:95:00:6A:0B (IP.Access Limited)

They are running different firmware versions.

working static ip: Software_Version='168a302_v142b13d0'
non-working static ip: Software_Version='168a352_v200b44d0'

Strangely enough, the non-working one seems to contain a newer version than the working one.

I'll probably set up a DHCP server in the main unit to match against the MAC address of the nanobts (00:02:95:00:41:b3) and assign it IP 10.42.42.53.

Actions #7

Updated by pespin about 6 years ago

  • % Done changed from 0 to 70

Support added in osmo-gsm-tester and submitted to gerrit, see https://gerrit.osmocom.org/#/c/7168

All test suites seem to be working in RnD. I once saw a crash in osmo-msc during "voice" test running. Issue being tracked in #3062.

TODO:
- Add nanoBTS to prod setup (roh)
- Talk with lynxis about the new bits we require in ansible scripts [1], and set up prod accordingly.
- Add documentation in RnD and prod wiki pages
- Add documentation in osmo-gsm-tester manual.
- Merge gerrit patches and test in prod setup.

[1]:
Required by osmo-gsm-tester:
apt-get install python3-usb
pip3 install pysispm (and set up udev rules as explained in https://github.com/xypron/pysispm#permissions)
apt-get install udhcpd (+ configure it to serve 10.42.42.53 to nanobts MAC addr).

Nice to have as management:
- Add osmocom:latest repos + install abisip-find and ipaccess-config
- apt-get install sispmctl (to control the smtart power socket).

Actions #8

Updated by roh about 6 years ago

added the nanobts1800 to the setup with the same rf attenuation as on the rnd setup
connected the power via a controllable power strip on port '1'
installed pysispm
installed python3-usb
installed pysispm
installed udhcpd and set it up to give the nanobts mac a constant ip (10.42.42.53)
added the osmocom:latest repos
updated the machine to debian9.4
installed osmocom-ipaccess-utils from the osmocom:latest (which pulls libosmoabis5, libosmocore9, libosmogsm8, libosmovty4)

Actions #9

Updated by pespin about 6 years ago

Patches for nanobts have been merged and they seem to be working mostly fine. However, there are still some race conditions when managing the nanobts from time to time. For instance I see lots of times ipaccess-config fails to set the unit-id to 9. This is strange for two reasons. First because we always use the same unit-id, which means once set, as we check the current unit-id with ipabis-find, we should not be setting it again. Looking at the ipabis-find output it seems the nanobts announce it has the 2^32-1 unit-id. I still need to find out if really the nanobts forgot the unit-id, or if after a few seconds the correct unit-id is shown again. I think ipaccess-config fails because the conn is refused, so it may make sense to re-try waiting 1 sec if we see in stderr "Connection refused", or just wiating around 10sec after ipabis-find finds the BTS.

Updated TODO:
- Talk with lynxis about the new bits we require in ansible scripts [1], and set up prod accordingly.
- Add documentation in RnD and prod wiki pages
- Add documentation in osmo-gsm-tester manual.

[1]:
Required by osmo-gsm-tester:
apt-get install python3-usb
pip3 install pysispm (and set up udev rules as explained in https://github.com/xypron/pysispm#permissions)
apt-get install udhcpd (+ configure it to serve 10.42.42.53 to nanobts MAC addr).

Nice to have as management:
- Add osmocom:latest repos + install abisip-find and ipaccess-config
- apt-get install sispmctl (to control the smtart power socket).

Actions #10

Updated by pespin about 6 years ago

Another improvement to be done: abisip-find can be called with -b src_ip instead of passing the iface. This way it doesn't require root access and we can use LD_LIBRARY_PATH instead of patching RPATH with patchelf and running it as root.

Actions #11

Updated by pespin about 6 years ago

  • Assignee changed from pespin to lynxis

The improvment from last commit is already merged in master. Also we have a list of patches currently in gerrit to support too the 2nd nanobts in prod which runs in a different band than the first (1900 vs 900).

Assigning to lynxis so he remembers to add all the required setup to ansible scripts. Please have a look at comment "9" in this ticket as well as at the prod main unit in case you have any question about the setup required for ansible.

Actions #12

Updated by lynxis almost 6 years ago

pespin: what do you mean with - Add osmocom:latest repos + install abisip-find and ipaccess-config

You just want both tools from master or do you additional want the osmocom:latest repos?

Actions #13

Updated by lynxis almost 6 years ago

  • Assignee changed from lynxis to pespin
Actions #14

Updated by lynxis almost 6 years ago

  • Assignee changed from pespin to lynxis

apt:
name:
...
- abisip-find
- ipaccess-config

apt_repo:
- add OBS repo :latest

Actions #15

Updated by lynxis almost 6 years ago

  • Assignee changed from lynxis to pespin
  • % Done changed from 70 to 80

https://gerrit.osmocom.org/7734 ansible: hosts: gsm-tester: use ansible_host to have more readable ansible ...
https://gerrit.osmocom.org/7735 ansible: add role udhcpd: setup a udhcpd server
https://gerrit.osmocom.org/7736 ansible: setup-gsm-tester: use udhcpd as dhcp server
https://gerrit.osmocom.org/7737 ansible: gsm-tester-bts: install ip.access dependencies
https://gerrit.osmocom.org/7738 ansible: gsm-tester: move usrp tasks to gsm-tester-bts
https://gerrit.osmocom.org/7739 ansible: gsm-tester-modems: improve name
https://gerrit.osmocom.org/7740 ansible: gsm-tester: install sispmctl to control usb power sockets
https://gerrit.osmocom.org/7741 ansible: gsm-tester-bts: add OBS osmocom:nightly to install osmocom utilities

see also https://gerrit.osmocom.org/#/q/status:open+project:osmo-ci+branch:master+topic:gsm-tester

assigning it to you for feedback. I already deployed these patches to the rnd setup.

Actions #16

Updated by pespin almost 6 years ago

  • Status changed from In Progress to Feedback
  • Assignee changed from pespin to lynxis
  • % Done changed from 80 to 90

I think all of these have been merged and everything's finish from my side, lynxis please confirm and close the issue.

Actions #17

Updated by lynxis almost 6 years ago

  • Status changed from Feedback to Resolved
  • % Done changed from 90 to 100
Actions

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 48.8 MB)