laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/29723 )
Change subject: osmux: Improve NAT related documentation
......................................................................
osmux: Improve NAT related documentation
Related: SYS#5987
Change-Id: I5ed7aa834bfd0d5ef84ff69ece6d1d5e5b920d4e
---
M common/chapters/osmux/osmux.adoc
1 file changed, 25 insertions(+), 7 deletions(-)
Approvals:
Jenkins Builder: Verified
osmith: Looks good to me, but someone else must approve
laforge: Looks good to me, approved
diff --git a/common/chapters/osmux/osmux.adoc b/common/chapters/osmux/osmux.adoc
index 24dc446..a727e2e 100644
--- a/common/chapters/osmux/osmux.adoc
+++ b/common/chapters/osmux/osmux.adoc
@@ -45,13 +45,31 @@
that point on, the BSC/MGW punched a hole in the NAT (its connection table is
updated) and MSC/MGW is able to send data back to it on that connection.
-Moreover, NATs tend to drop connections from their connection tables after some
-inactivity time, meaning a peer may receive notice about the other end not being
-available while it actually is. This means the GSM network needs to be
-configured in a way to ensure inactivity periods are short enough that this
-cannot occur. That's the reason why OsmoMGW provides the `osmux dummy` VTY
-command to enable sending dummy packets from time to time to keep the
-connections alive.
+In order to make use of the features above, OsmoMGW must be made aware
+explicitly through VTY configuration that its peers are located behind a NAT.
+This is done through the `osmux peer-behind-nat (on|off)` VTY commands.
+
+If OsmoMGW itself is behind a NAT, it must use the VTY config `rtp keep-alive`
+(used for both RTP and Osmux) to at least the value `once`, in order for it to
+punch the hole in its NAT so that its peer can know where to send packets back
+to it.
+
+Another characteristic of NATs is that they tend to drop connections from their
+connection tables after some inactivity time, meaning a peer may receive notice
+about the other end not being available while it actually is. This means the GSM
+network needs to be configured in a way to ensure inactivity periods are short
+enough that this cannot occur.
+
+Hence, if OsmoMGW is behind a NAT, it is actually desirable to have the VTY
+config `rtp keep-alive` configured with the `<1-120>` value in order to force
+transmission of dummy packets ever few seconds.
+
+Osmux implementations such as OsmoMGW also come with the `osmux dummy` VTY
+command to enable sending dummy AMR payloads to the peer even if no real data
+was received (for instance if DTX is used). This is useful under some specific
+satellite links which were proven to work unreliably if the total throughput in
+use over the link changes over time. This way throughput resources are kept
+pre-allocated until they are needed again (audio is received again).
=== CID allocation
--
To view, visit https://gerrit.osmocom.org/c/osmo-gsm-manuals/+/29723
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-gsm-manuals
Gerrit-Branch: master
Gerrit-Change-Id: I5ed7aa834bfd0d5ef84ff69ece6d1d5e5b920d4e
Gerrit-Change-Number: 29723
Gerrit-PatchSet: 2
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-MessageType: merged
laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/29727 )
Change subject: usb: Claim and set interface alt-setting only for used lines
......................................................................
usb: Claim and set interface alt-setting only for used lines
If a line is not auto-created, there is no point on claiming the
matching interface and even less point setting the alt setting that
will try to use USB isoc bandwith.
With this you can no use only line 1 and not line 0 of a ice1usb
for instance. While previously it would still "enable" line 0 and
then line 1 would fail because on BW issues most of the case.
Signed-off-by: Sylvain Munaut <tnt(a)246tNt.com>
Change-Id: Iea5d72272f11875e7a32c78b60c188590deda831
---
M src/usb.c
1 file changed, 16 insertions(+), 15 deletions(-)
Approvals:
Jenkins Builder: Verified
laforge: Looks good to me, approved
diff --git a/src/usb.c b/src/usb.c
index 47fff14..c8ad97f 100644
--- a/src/usb.c
+++ b/src/usb.c
@@ -904,21 +904,6 @@
}
}
- /* Get interface and set it up */
- ret = libusb_claim_interface(devh, id->bInterfaceNumber);
- if (ret) {
- LOGP(DE1D, LOGL_ERROR, "Failed to claim interface %d:%s\n", id->bInterfaceNumber,
- libusb_strerror(ret));
- goto next_interface;
- }
-
- ret = libusb_set_interface_alt_setting(devh, id->bInterfaceNumber, 1);
- if (ret) {
- LOGP(DE1D, LOGL_ERROR, "Failed to set interface %d altsetting:%s\n", id->bInterfaceNumber,
- libusb_strerror(ret));
- goto next_interface;
- }
-
/* Setup driver data and find endpoints */
line_data = talloc_zero(e1d->ctx, struct e1_usb_line_data);
@@ -965,6 +950,22 @@
line->drv_data = line_data;
}
+ /* Get interface and set it up */
+ ret = libusb_claim_interface(devh, id->bInterfaceNumber);
+ if (ret) {
+ LOGP(DE1D, LOGL_ERROR, "Failed to claim interface %d:%s\n", id->bInterfaceNumber,
+ libusb_strerror(ret));
+ goto next_interface;
+ }
+
+ ret = libusb_set_interface_alt_setting(devh, id->bInterfaceNumber, 1);
+ if (ret) {
+ LOGP(DE1D, LOGL_ERROR, "Failed to set interface %d altsetting:%s\n", id->bInterfaceNumber,
+ libusb_strerror(ret));
+ goto next_interface;
+ }
+
+ /* Create data flows and start the line */
line_data->flow_in = e1uf_create(line, e1_usb_xfer_in, line_data->ep_in, 4, line_data->pkt_size, 4);
line_data->flow_out = e1uf_create(line, e1_usb_xfer_out, line_data->ep_out, 4, line_data->pkt_size, 4);
line_data->flow_fb = e1uf_create(line, e1_usb_xfer_fb, line_data->ep_fb, 2, 3, 1);
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/29727
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Iea5d72272f11875e7a32c78b60c188590deda831
Gerrit-Change-Number: 29727
Gerrit-PatchSet: 1
Gerrit-Owner: tnt <tnt(a)246tNt.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-MessageType: merged
Attention is currently required from: tnt.
laforge has posted comments on this change. ( https://gerrit.osmocom.org/c/osmo-e1d/+/29727 )
Change subject: usb: Claim and set interface alt-setting only for used lines
......................................................................
Patch Set 1: Code-Review+2
--
To view, visit https://gerrit.osmocom.org/c/osmo-e1d/+/29727
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-e1d
Gerrit-Branch: master
Gerrit-Change-Id: Iea5d72272f11875e7a32c78b60c188590deda831
Gerrit-Change-Number: 29727
Gerrit-PatchSet: 1
Gerrit-Owner: tnt <tnt(a)246tNt.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Attention: tnt <tnt(a)246tNt.com>
Gerrit-Comment-Date: Thu, 13 Oct 2022 11:45:26 +0000
Gerrit-HasComments: No
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment