| formatshort | |
| clear | |
| clc | |
| %Dati Iniziali | |
| D=15*10^3; %m | |
| c=299792458; %m/s | |
| k=1.38064*10^-23; %J/K | |
| T0=290; %K | |
| %% | |
| fc=2.4*10^9; %WiFi | |
| lambda=c/fc; %m | |
| %PATH PARAMETERS AND LOSSES | |
| FSL_lin=(4*pi*D/lambda)^2; | |
| FSL_dB=pow2db(FSL_lin); %dB | |
| Loss_pol_dB=0; %dB | |
| Loss_pol_lin=db2pow(Loss_pol_dB); | |
| Loss_point_dB=0.5; | |
| Loss_point_lin=db2pow(Loss_point_dB); | |
| %vapor d'acqua O OSSIGENO MOLECOLARE | |
| ro=7.5; %g/m^3 | |
| h=D*10^-3; %Km | |
| fc_G=fc*10^-9; | |
| gammaW=(0.067+(3/((fc_G-2.23)^2+7.3))+(9/((fc_G-183.3)^2+6))+(4.3/((fc_G-323.8)^2+10)))*fc_G^2*ro*10^-4; %dB/km | |
| gammaO=(7.19*10^-3+(6.09/(fc_G^2-0.22))+(4.81/((fc_G-57)^2+1.5)))*fc_G^2*10^-3; %dB/km; | |
| gamma=gammaW+gammaO; | |
| Loss_atm_dB=h*gamma; %dB | |
| Loss_atm_lin=db2pow(Loss_atm_dB); | |
| Loss_fog_dB=h*0.5*10^-2; | |
| Loss_fog_lin=db2pow(Loss_fog_dB); | |
| Loss_rain_dB=h*10^-1; | |
| Loss_rain_lin=db2pow(Loss_rain_dB); | |
| %TRANSIMITTER PARAMETERS | |
| %Pt_lin=; %mW | |
| Pt_dBm=20; %pow2db(Pt_lin); %dBm | |
| Pt_lin=db2pow(Pt_dBm); %mW | |
| Gt_dB=12; %dBi | |
| Gt_lin=db2pow(Gt_dB); | |
| EIRP=Gt_dB+Pt_dBm; %dBm | |
| Loss_tra_cable_dB=0; %dB | |
| Loss_tra_cable_lin=db2pow(Loss_tra_cable_dB); | |
| %RECEIVER PARAMETERS | |
| Gr_dB=Gt_dB; %dBi | |
| Gr_lin=db2pow(Gr_dB); | |
| Loss_rec_cable_dB=0; %dB | |
| Loss_rec_cable_lin=db2pow(Loss_rec_cable_dB); | |
| F=1; %dBi | |
| %TOTAL POWER SUMMARY | |
| Pr_dBm=Pt_dBm+Gt_dB+Gr_dB-FSL_dB-Loss_pol_dB-Loss_point_dB-Loss_tra_cable_dB-Loss_rec_cable_dB-Loss_fog_dB-Loss_atm_dB-Loss_rain_dB; %dBWm | |
| Pr_lin=db2pow(Pr_dBm); %mW | |
Wow it's working finally :)
DTN on ESP32
https://github.com/wi-sea/minidtnstack
[TEST] MQTT with DTN on Raspbery-pi
https://github.com/wi-sea/TS-IT
Video for the presentation has been done
| // sample web server node | |
| #include"IPAddress.h" | |
| #include"painlessMesh.h" | |
| #ifdef ESP8266 | |
| #include"Hash.h" | |
| #include<ESPAsyncTCP.h> | |
| #else | |
| #include<AsyncTCP.h> | |
| #endif | |
| #include<ESPAsyncWebServer.h> | |
| #defineMESH_PREFIX"wave-fi" | |
| #defineMESH_PASSWORD"wave-fi" | |
| #defineMESH_PORT5555 | |
| #defineSTATION_SSID"no-way" | |
| #defineSTATION_PASSWORD"no-way" | |
| #defineHOSTNAME"HTTP_BRIDGE" | |
| // Prototype | |
| voidreceivedCallback( constuint32_t &from, const String &msg ); | |
| IPAddress getlocalIP(); | |
| painlessMesh mesh; | |
| AsyncWebServer server(80); | |
| IPAddress myIP(0,0,0,0); | |
| IPAddress myAPIP(0,0,0,0); | |
| voidsetup() { | |
| Serial.begin(115200); | |
| mesh.setDebugMsgTypes( ERROR | STARTUP | CONNECTION ); // set before init() so that you can see startup messages | |
| // Channel set to 6. Make sure to use the same channel for your mesh and for you other | |
| // network (STATION_SSID) | |
| mesh.init( MESH_PREFIX, MESH_PASSWORD, MESH_PORT, WIFI_AP_STA, 6 ); | |
| mesh.onReceive(&receivedCallback); | |
| mesh.stationManual(STATION_SSID, STATION_PASSWORD); | |
| mesh.setHostname(HOSTNAME); | |
| // Bridge node, should (in most cases) be a root node. | |
| mesh.setRoot(true); | |
| // This node and all other nodes should ideally know the mesh contains a root, so call this on all nodes | |
| mesh.setContainsRoot(true); | |
| myAPIP = IPAddress(mesh.getAPIP()); | |
| Serial.println("My AP IP is " + myAPIP.toString()); | |
| //Async webserver | |
| server.on("/", HTTP_GET, [](AsyncWebServerRequest *request){ | |
| request->send(200, "text/html", "<form>Text to Broadcast<br><input type='text' name='BROADCAST'><br><br><input type='submit' value='Submit'></form>"); | |
| if (request->hasArg("BROADCAST")){ | |
| String msg = request->arg("BROADCAST"); | |
| mesh.sendBroadcast(msg); | |
| } | |
| }); | |
| server.begin(); | |
| } | |
| voidloop() { | |
| mesh.update(); | |
| if(myIP != getlocalIP()){ | |
| myIP = getlocalIP(); | |
| Serial.println("My IP is " + myIP.toString()); | |
| } | |
| } | |
| voidreceivedCallback( constuint32_t &from, const String &msg ) { | |
| Serial.printf("bridge: Received from %u msg=%s\n", from, msg.c_str()); | |
| } | |
| IPAddress getlocalIP() { | |
| returnIPAddress(mesh.getStationIP()); | |
| } |

| #!/bin/bash | |
| sudo apt-get update | |
| sudo apt-get upgrade | |
| sudo printf'blacklist dvb_usb_rtl28xxu\nblacklist rtl2832\nblacklist rtl2830'> /etc/modprobe.d/nortl.conf | |
| sudo apt-get install git-core | |
| sudo apt-get install git | |
| sudo apt-get install cmake | |
| sudo apt-get install libusb-1.0-0-dev | |
| sudo apt-get install build-essential | |
| git clone git://git.osmocom.org/rtl-sdr.git | |
| cd rtl-sdr | |
| mkdir build | |
| cd build | |
| cmake ../ -DINSTALL_UDEV_RULES=ON | |
| make | |
| sudo make install | |
| sudo ldconfig | |
| cd~ | |
| sudo cp ./rtl-sdr/rtl-sdr.rules /etc/udev/rules.d/ | |
| git clone git://github.com/MalcolmRobb/dump1090.git | |
| cd dump1090 | |
| make | |
| sudo reboot |
Draft of the project:
Wireless mesh network where all the nodes consists of data buoys, aptly provided with routers that interconnects them via wireless. This internet ad hoc system will represents as floating routers for the sailors/fishermens, who can connect their phone or any wireless system to them.
A software defined radio will also be provided to each router, so that real time ADSB signals from planes is provided to every fishermen, to enable their tracking