https://osmocom.org/https://osmocom.org/favicon.ico?16647414092020-06-08T10:28:53ZOpen Source Mobile CommunicationsCellular Network Infrastructure - Feature #4587: Add port numbers to /etc/services during installationhttps://osmocom.org/issues/4587?journal_id=186052020-06-08T10:28:53Zneelsnhofmeyr@sysmocom.de
<ul><li><strong>File</strong> <a href="/attachments/4199">vty</a> <a class="icon-only icon-download" title="Download" href="/attachments/download/4199/vty">vty</a> added</li></ul><p>Related: Keith has written an expect script that connects to an osmocom telnet by name, and is also able to establish a desired logging config every time.<br />Attaching and pasting it. This one contains a few tweaks introduced at 36c3. We could rename to osmo-vty and install from libosmocore?</p>
<pre><code>vty bsc</code></pre>
<p>or</p>
<pre><code>vty osmo-bsc</code></pre>
<pre>
#!/usr/bin/expect -f
set vty [lindex $argv 0]
set host localhost
switch $vty {
hlr { set port 4258 }
bsc { set port 4242 }
mgw { set port 4243 }
mgw2 {
set host 127.0.0.2
set port 4243
}
sg { set port 4245 }
msc { set port 4254 }
sip { set port 4256 }
gg { set port 4260 }
ggsn { set port 4260 }
hnbgw { set port 4261 }
osmo-hlr { set port 4258 }
osmo-bsc { set port 4242 }
osmo-mgw { set port 4243 }
osmo-mgw-for-bsc { set port 4243 }
osmo-mgw-for-msc {
set host 127.0.0.2
set port 4243
}
osmo-sgsn { set port 4245 }
osmo-msc { set port 4254 }
osmo-sip-connector { set port 4256 }
osmo-ggsn { set port 4260 }
osmo-hnbgw { set port 4262 }
default { set port 4242 }
}
spawn telnet localhost $port
expect ">"
send "enable\r"
expect "#"
send "logging enable\r"
expect "#"
send "logging print category 1\r"
expect "#"
send "logging print category-hex 0\r"
expect "#"
send "logging print level 1\r"
expect "#"
send "logging print file basename last\r"
expect "#"
send "logging print extended-timestamp 1\r"
expect "#"
send "logging level set-all notice\r"
expect "#"
switch $vty {
msc {
send "logging level mm info\r"
expect "#"
send "logging level cc info\r"
expect "#"
}
}
send "logging filter all 1\r"
expect "#"
interact
</pre> Cellular Network Infrastructure - Feature #4587: Add port numbers to /etc/services during installationhttps://osmocom.org/issues/4587?journal_id=211902021-02-06T14:14:53Zlaforge
<ul><li><strong>Related to</strong> <i><a class="issue tracker-2 status-1 priority-1 priority-lowest" href="/issues/5013">Feature #5013</a>: investigate "vtysh" for Osmocom</i> added</li></ul>