Skip to content

Commit

Permalink
deprecate r2lora integration
Browse files Browse the repository at this point in the history
  • Loading branch information
dernasherbrezon committed Jan 6, 2024
1 parent 2282f45 commit f3559a2
Show file tree
Hide file tree
Showing 7 changed files with 20 additions and 22 deletions.
Binary file modified docs/diagram.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 10 additions & 10 deletions docs/diagram.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<mxfile modified="2023-09-09T09:07:32.376Z" host="app.diagrams.net" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Safari/605.1.15" etag="4rlz0UTL2s14BMHsIlBQ" version="21.7.4" type="device">
<mxfile modified="2024-01-06T21:44:25.743Z" host="app.diagrams.net" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/17.1.2 Safari/605.1.15" etag="kvGFgOerqEpzzN8Mqkdr" version="22.1.17" type="device">
<diagram name="Page-1" id="c0bfa250-c0e4-6324-b2e6-f258c6c8219e">
<mxGraphModel dx="1830" dy="655" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="826" pageHeight="1169" background="#ffffff" math="0" shadow="0">
<mxGraphModel dx="2260" dy="802" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="826" pageHeight="1169" background="#ffffff" math="0" shadow="0">
<root>
<mxCell id="0" />
<mxCell id="1" parent="0" />
Expand Down Expand Up @@ -111,11 +111,11 @@
<mxCell id="4j4RozMyH-ZOtFfQHbCX-116" value="&lt;p style=&quot;margin: 0px ; margin-top: 4px ; text-align: center ; text-decoration: underline&quot;&gt;&lt;strong&gt;plutosdr device N&lt;/strong&gt;&lt;/p&gt;&lt;hr&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;rtl_sdr&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;rtf_rm&lt;br&gt;&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;rotctrld&lt;/p&gt;" style="verticalAlign=middle;align=center;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;rounded=1;fontStyle=1;strokeWidth=3;fillColor=#FFFFCC;" parent="1" vertex="1">
<mxGeometry x="110" y="585" width="110" height="80" as="geometry" />
</mxCell>
<mxCell id="4j4RozMyH-ZOtFfQHbCX-117" value="&lt;p style=&quot;margin: 0px ; margin-top: 4px ; text-align: center ; text-decoration: underline&quot;&gt;&lt;strong&gt;lora device 0&lt;/strong&gt;&lt;/p&gt;&lt;hr&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;r2loraclient&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;rotctrld&lt;/p&gt;" style="verticalAlign=middle;align=center;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;rounded=1;fontStyle=1;strokeWidth=3;fillColor=#FFFFCC;" parent="1" vertex="1">
<mxCell id="4j4RozMyH-ZOtFfQHbCX-117" value="&lt;p style=&quot;margin: 0px ; margin-top: 4px ; text-align: center ; text-decoration: underline&quot;&gt;&lt;strong&gt;lora device 0&lt;/strong&gt;&lt;/p&gt;&lt;hr&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;LoraAtClient&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;rotctrld&lt;/p&gt;" style="verticalAlign=middle;align=center;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;rounded=1;fontStyle=1;strokeWidth=3;fillColor=#FFFFCC;" parent="1" vertex="1">
<mxGeometry x="241" y="481" width="99" height="69" as="geometry" />
</mxCell>
<mxCell id="4j4RozMyH-ZOtFfQHbCX-118" value="&lt;p style=&quot;margin: 0px ; margin-top: 4px ; text-align: center ; text-decoration: underline&quot;&gt;&lt;strong&gt;lora device N&lt;/strong&gt;&lt;/p&gt;&lt;hr&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;r2loraclient&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;rotctrld&lt;/p&gt;" style="verticalAlign=middle;align=center;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;rounded=1;fontStyle=1;strokeWidth=3;fillColor=#FFFFCC;" parent="1" vertex="1">
<mxGeometry x="360" y="481" width="100" height="69" as="geometry" />
<mxCell id="4j4RozMyH-ZOtFfQHbCX-118" value="&lt;p style=&quot;margin: 0px ; margin-top: 4px ; text-align: center ; text-decoration: underline&quot;&gt;&lt;strong&gt;lora device N&lt;/strong&gt;&lt;/p&gt;&lt;hr&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;LoraAtWifiClient&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;rotctrld&lt;/p&gt;" style="verticalAlign=middle;align=center;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;rounded=1;fontStyle=1;strokeWidth=3;fillColor=#FFFFCC;" parent="1" vertex="1">
<mxGeometry x="355" y="481" width="110" height="69" as="geometry" />
</mxCell>
<mxCell id="4j4RozMyH-ZOtFfQHbCX-121" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;fontSize=16;startArrow=classic;startFill=1;strokeWidth=2;strokeColor=#990000;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" parent="1" source="4j4RozMyH-ZOtFfQHbCX-127" target="4j4RozMyH-ZOtFfQHbCX-118" edge="1">
<mxGeometry relative="1" as="geometry">
Expand All @@ -138,7 +138,7 @@
<mxCell id="4j4RozMyH-ZOtFfQHbCX-125" value="" style="verticalLabelPosition=bottom;shadow=0;dashed=0;align=center;html=1;verticalAlign=top;shape=mxgraph.electrical.radio.aerial_-_antenna_1;fontSize=16;fillColor=#FFFFCC;" parent="1" vertex="1">
<mxGeometry x="120" y="300" width="55" height="60" as="geometry" />
</mxCell>
<mxCell id="4j4RozMyH-ZOtFfQHbCX-127" value="&lt;p style=&quot;margin: 0px ; margin-top: 4px ; text-align: center ; text-decoration: underline&quot;&gt;&lt;strong&gt;r2lora&lt;/strong&gt;&lt;/p&gt;&lt;hr&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;esp32&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;SX127X&lt;/p&gt;" style="verticalAlign=middle;align=center;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;rounded=1;fontStyle=1;strokeWidth=3;fillColor=#E6FFCC" parent="1" vertex="1">
<mxCell id="4j4RozMyH-ZOtFfQHbCX-127" value="&lt;p style=&quot;margin: 0px ; margin-top: 4px ; text-align: center ; text-decoration: underline&quot;&gt;lora-at-wifi&lt;/p&gt;&lt;hr&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;esp32&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;SX127X&lt;/p&gt;" style="verticalAlign=middle;align=center;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;rounded=1;fontStyle=1;strokeWidth=3;fillColor=#E6FFCC" parent="1" vertex="1">
<mxGeometry x="372.75" y="340" width="74.5" height="70" as="geometry" />
</mxCell>
<mxCell id="4j4RozMyH-ZOtFfQHbCX-128" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;entryX=1;entryY=0.5;entryDx=0;entryDy=0;fontSize=16;startArrow=none;startFill=0;strokeColor=#990000;strokeWidth=2;exitX=0.5;exitY=1;exitDx=0;exitDy=0;exitPerimeter=0;" parent="1" source="4j4RozMyH-ZOtFfQHbCX-129" target="4j4RozMyH-ZOtFfQHbCX-127" edge="1">
Expand All @@ -149,19 +149,19 @@
<mxCell id="4j4RozMyH-ZOtFfQHbCX-129" value="" style="verticalLabelPosition=bottom;shadow=0;dashed=0;align=center;html=1;verticalAlign=top;shape=mxgraph.electrical.radio.aerial_-_antenna_1;fontSize=16;fillColor=#FFFFCC;" parent="1" vertex="1">
<mxGeometry x="500" y="290" width="55" height="60" as="geometry" />
</mxCell>
<mxCell id="WnreJpPuXsVMPuMwl7OP-112" value="&lt;p style=&quot;margin: 0px ; margin-top: 4px ; text-align: center ; text-decoration: underline&quot;&gt;SpyServer&lt;/p&gt;&lt;hr&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;Airspy Mini&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;Airspy R2&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;rtl-sdr&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;&lt;br&gt;&lt;/p&gt;" style="verticalAlign=middle;align=center;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;rounded=1;fontStyle=1;strokeWidth=3;fillColor=#E6FFCC" vertex="1" parent="1">
<mxCell id="WnreJpPuXsVMPuMwl7OP-112" value="&lt;p style=&quot;margin: 0px ; margin-top: 4px ; text-align: center ; text-decoration: underline&quot;&gt;SpyServer&lt;/p&gt;&lt;hr&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;Airspy Mini&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;Airspy R2&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;rtl-sdr&lt;/p&gt;&lt;p style=&quot;margin: 0px ; margin-left: 8px&quot;&gt;&lt;br&gt;&lt;/p&gt;" style="verticalAlign=middle;align=center;overflow=fill;fontSize=12;fontFamily=Helvetica;html=1;rounded=1;fontStyle=1;strokeWidth=3;fillColor=#E6FFCC" parent="1" vertex="1">
<mxGeometry x="20" y="760" width="100" height="80" as="geometry" />
</mxCell>
<mxCell id="WnreJpPuXsVMPuMwl7OP-113" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;fontSize=16;startArrow=classic;startFill=1;strokeColor=#990000;strokeWidth=2;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" edge="1" parent="1">
<mxCell id="WnreJpPuXsVMPuMwl7OP-113" value="" style="edgeStyle=orthogonalEdgeStyle;rounded=1;orthogonalLoop=1;jettySize=auto;html=1;fontSize=16;startArrow=classic;startFill=1;strokeColor=#990000;strokeWidth=2;exitX=0.5;exitY=1;exitDx=0;exitDy=0;" parent="1" edge="1">
<mxGeometry relative="1" as="geometry">
<mxPoint x="290" y="390" as="sourcePoint" />
<mxPoint x="290" y="481" as="targetPoint" />
</mxGeometry>
</mxCell>
<mxCell id="WnreJpPuXsVMPuMwl7OP-114" value="" style="fontColor=#0066CC;verticalAlign=top;verticalLabelPosition=bottom;labelPosition=center;align=center;html=1;outlineConnect=0;fillColor=#CCCCCC;strokeColor=#6881B3;gradientColor=none;gradientDirection=north;strokeWidth=2;shape=mxgraph.networks.satellite_dish;flipH=1;" vertex="1" parent="1">
<mxCell id="WnreJpPuXsVMPuMwl7OP-114" value="" style="fontColor=#0066CC;verticalAlign=top;verticalLabelPosition=bottom;labelPosition=center;align=center;html=1;outlineConnect=0;fillColor=#CCCCCC;strokeColor=#6881B3;gradientColor=none;gradientDirection=north;strokeWidth=2;shape=mxgraph.networks.satellite_dish;flipH=1;" parent="1" vertex="1">
<mxGeometry x="-160" y="680" width="90" height="100" as="geometry" />
</mxCell>
<mxCell id="WnreJpPuXsVMPuMwl7OP-115" value="" style="edgeStyle=orthogonalEdgeStyle;strokeColor=#990000;strokeWidth=2;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=0.07;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;startArrow=none;startFill=0;" edge="1" parent="1" target="WnreJpPuXsVMPuMwl7OP-112">
<mxCell id="WnreJpPuXsVMPuMwl7OP-115" value="" style="edgeStyle=orthogonalEdgeStyle;strokeColor=#990000;strokeWidth=2;entryX=0;entryY=0.5;entryDx=0;entryDy=0;exitX=0.07;exitY=0.5;exitDx=0;exitDy=0;exitPerimeter=0;startArrow=none;startFill=0;" parent="1" target="WnreJpPuXsVMPuMwl7OP-112" edge="1">
<mxGeometry width="100" height="100" relative="1" as="geometry">
<mxPoint x="-70" y="740" as="sourcePoint" />
<mxPoint x="66" y="779" as="targetPoint" />
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/ru/r2cloud/lora/loraat/LoraAtWifiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public class LoraAtWifiClient implements LoraAtClient {
public LoraAtWifiClient(String host, int port, String username, String password, int timeout) {
this.hostname = "http://" + host + ":" + port;
this.basicAuth = "Basic " + Base64.getEncoder().encodeToString((username + ":" + password).getBytes(StandardCharsets.ISO_8859_1));
this.httpclient = HttpClient.newBuilder().version(Version.HTTP_2).followRedirects(Redirect.NORMAL).connectTimeout(Duration.ofMillis(timeout)).build();
this.httpclient = HttpClient.newBuilder().version(Version.HTTP_1_1).followRedirects(Redirect.NORMAL).connectTimeout(Duration.ofMillis(timeout)).build();
}

@Override
Expand Down
3 changes: 0 additions & 3 deletions src/test/java/ru/r2cloud/it/ObservationTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ public void testTwoTransmittors() throws Exception {
JsonHttpResponse spectogramHandler = new JsonHttpResponse("r2cloudclienttest/empty-response.json", 200);
server.setSpectogramMock(1L, spectogramHandler);

loraAtWifiServer.createContext("/lora/rx/start", new JsonHttpResponse("r2loratest/success.json", 200));
loraAtWifiServer.createContext("/rx/stop", new JsonHttpResponse("r2loratest/successStop.json", 200));

// start observation
String satelliteId = "46494";
List<String> observationIds = client.scheduleStart(satelliteId);
Expand Down
4 changes: 2 additions & 2 deletions src/test/java/ru/r2cloud/it/util/BaseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ public abstract class BaseTest {
private static final Logger LOG = LoggerFactory.getLogger(BaseTest.class);
public static final int ROTCTRLD_PORT = 8004;
private static final int ROTCTRLD_PORT_LORA = 8006;
private static final int R2LORA_PORT = 8005;
private static final int LORA_AT_WIFI_PORT = 8005;
private static final int SPYSERVER_MOCK = 8008;

private R2Cloud server;
Expand Down Expand Up @@ -116,7 +116,7 @@ public void start() throws Exception {
rotctrlMockForLora.setHandler(new CollectingRequestHandler("RPRT 0\n"));
rotctrlMockForLora.start();

loraAtWifiServer = HttpServer.create(new InetSocketAddress("127.0.0.1", R2LORA_PORT), 0);
loraAtWifiServer = HttpServer.create(new InetSocketAddress("127.0.0.1", LORA_AT_WIFI_PORT), 0);
loraAtWifiServer.createContext("/api/v2/status", new JsonHttpResponse("loraatwifitest/status.json", 200));
loraAtWifiServer.start();

Expand Down
12 changes: 6 additions & 6 deletions src/test/java/ru/r2cloud/lora/loraat/LoraAtWifiClientTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ public void testStartStop() {
response = client.stopObservation();
assertEquals(ResponseStatus.SUCCESS, response.getStatus());
assertEquals(1, response.getFrames().size());
LoraFrame r2loraFrame = response.getFrames().get(0);
assertArrayEquals(new byte[] { (byte) 0xca, (byte) 0xfe }, r2loraFrame.getData());
assertEquals(-121, r2loraFrame.getRssi());
assertEquals(-5.75, r2loraFrame.getSnr(), 0.00001f);
assertEquals(-729, r2loraFrame.getFrequencyError());
assertEquals(1641987504, r2loraFrame.getTimestamp());
LoraFrame frame = response.getFrames().get(0);
assertArrayEquals(new byte[] { (byte) 0xca, (byte) 0xfe }, frame.getData());
assertEquals(-121, frame.getRssi());
assertEquals(-5.75, frame.getSnr(), 0.00001f);
assertEquals(-729, frame.getFrequencyError());
assertEquals(1641987504, frame.getTimestamp());
}

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import ru.r2cloud.model.Transmitter;
import ru.r2cloud.util.Configuration;

@Deprecated
public class R2loraReaderTest {

@Rule
Expand Down

0 comments on commit f3559a2

Please sign in to comment.