{"id":3720,"date":"2021-02-08T18:44:16","date_gmt":"2021-02-08T18:44:16","guid":{"rendered":"https:\/\/open-cells.com\/?p=3720"},"modified":"2022-10-04T09:22:42","modified_gmt":"2022-10-04T09:22:42","slug":"rf-simulator-1-enb-2-ues-all-in-one","status":"publish","type":"post","link":"https:\/\/open-cells.com\/index.php\/2021\/02\/08\/rf-simulator-1-enb-2-ues-all-in-one\/","title":{"rendered":"RF simulator, 1 eNB, 2 UEs, all-in-one"},"content":{"rendered":"\r\n<p class=\"wp-block-paragraph\">This tutorial explains how to connect 2 UEs to a eNB, with simulated RF board, on same machine.<\/p>\r\n\r\n\r\n\r\n<p class=\"wp-block-paragraph\">It reuse the other tutorials we published in a quite complex IP addresses configuration<\/p>\r\n\r\n\r\n\r\n<h1>Constrains<\/h1>\r\n\r\n\r\n\r\n<ol class=\"wp-block-list\">\r\n<li>50 RB (10MHz) as it seems current commit in develop branch doesn&#8217;t work well on 100RB<\/li>\r\n<li>Full mode, with EPC: the noS1 mode seems to not work with two UEs<\/li>\r\n<\/ol>\r\n\r\n\r\n\r\n<h1>Let&#8217;s go<\/h1>\r\n\r\n\r\n\r\n<h2>RF simulator and OAI UE tutorial<\/h2>\r\n<p>Do this tutorial, with the UE on same machine option.<\/p>\r\n<p>To install EPC, eNB, use all-in-one tuto, with latest commit in develop branch<\/p>\r\n<ul class=\"wp-block-list\">\r\n<li style=\"list-style-type: none;\">\r\n<ul>\r\n<li style=\"list-style-type: none;\">\r\n<ul>\r\n<li>you can add &#8211;ninja on .\/build_oai &#8230; and replace all &#8220;make&#8221; by &#8220;ninja&#8221; that will be faster compilation for same result<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<\/li>\r\n<\/ul>\r\n<p>you should reach <strong><span style=\"font-size: 14pt;\">one UE in traffic<\/span>, all on one machine<\/strong><\/p>\r\n<h2>Now, we will add the second UE<\/h2>\r\n<h3>Make a second SIM<\/h3>\r\n<p>The UE always use the current directory files for SIM files <br \/>( hidden files: .usim.nvram0,\u00a0 .ue.nvram0, .ue_emm.nvram0)<\/p>\r\n<p>so we make a second directory and create the files in this directory<\/p>\r\n<pre>cd ..<br \/>mkdir build2<br \/>cd build2<br \/>cp ~\/opencells-mods\/sim.conf sim2.conf<br \/># edit the file: change only the msin: MSIN=\"0100001112\";<br \/>..\/..\/nas_sim_tools\/build\/conf2uedata -c sim2.conf -o .<\/pre>\r\n<h3>Make a second network namespace<\/h3>\r\n<pre>sudo ip netns delete ueNameSpace2<br \/>sudo ip link delete v-eth2<br \/>sudo ip netns add ueNameSpace2 <br \/>sudo ip link add v-eth2 type veth peer name v-ue2<br \/>sudo ip link set v-ue2 netns ueNameSpace2<br \/>sudo ip addr add 10.201.1.1\/24 dev v-eth2 <br \/>sudo ip link set v-eth2 up <br \/>sudo iptables -t nat -A POSTROUTING -s 10.201.1.0\/255.255.255.0 -o enp0s31f6 -j MASQUERADE <br \/>sudo iptables -A FORWARD -i enp0s31f6 -o v-eth2 -j ACCEPT <br \/>sudo iptables -A FORWARD -o enp0s31f6 -i v-eth2 -j ACCEPT <br \/>sudo ip netns exec ueNameSpace2 ip link set dev lo up <br \/>sudo ip netns exec ueNameSpace2 ip addr add 10.201.1.2\/24 dev v-ue2 <br \/>sudo ip netns exec ueNameSpace2 ip link set v-ue2 up <br \/>sudo ip netns exec ueNameSpace2 bash<\/pre>\r\n<h3>Run the second UE<\/h3>\r\n<pre>cd build2<br \/>ip netns exec ueNameSpace2 bash<br \/>.\/lte-uesoftmodem -C 2685000000 -r 50 --rfsim --rfsimulator.serveraddr 10.201.1.1<\/pre>\r\n<h3>Traffic test<\/h3>\r\n<p>In one more window, launch some traffic in the second UE<\/p>\r\n<pre>ip netns exec ueNameSpace2 bash<br \/>ping -I oaitun_ue1 10.201.1.1<\/pre>\r\n<p>&nbsp;<\/p>\r\n\r\n\r\n","protected":false},"excerpt":{"rendered":"<p>This tutorial explains how to connect 2 UEs to a eNB, with simulated RF board, on same machine. It reuse the other tutorials we published in a quite complex IP addresses configuration Constrains 50 RB (10MHz) as it seems current commit in develop branch doesn&#8217;t work well on 100RB Full mode, with EPC: the noS1 &hellip; <a href=\"https:\/\/open-cells.com\/index.php\/2021\/02\/08\/rf-simulator-1-enb-2-ues-all-in-one\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;RF simulator, 1 eNB, 2 UEs, all-in-one&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_crdt_document":"","footnotes":""},"categories":[1],"tags":[],"class_list":["post-3720","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/open-cells.com\/index.php\/wp-json\/wp\/v2\/posts\/3720","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/open-cells.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/open-cells.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/open-cells.com\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/open-cells.com\/index.php\/wp-json\/wp\/v2\/comments?post=3720"}],"version-history":[{"count":7,"href":"https:\/\/open-cells.com\/index.php\/wp-json\/wp\/v2\/posts\/3720\/revisions"}],"predecessor-version":[{"id":4667,"href":"https:\/\/open-cells.com\/index.php\/wp-json\/wp\/v2\/posts\/3720\/revisions\/4667"}],"wp:attachment":[{"href":"https:\/\/open-cells.com\/index.php\/wp-json\/wp\/v2\/media?parent=3720"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/open-cells.com\/index.php\/wp-json\/wp\/v2\/categories?post=3720"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/open-cells.com\/index.php\/wp-json\/wp\/v2\/tags?post=3720"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}