crescentvenus / WALB

WALB is raspberry Pi and HackRF based Wireless Attack LaunchBox.
119 stars 29 forks source link

Attempting to understand this code in order to modify the script #18

Open th2112 opened 3 years ago

th2112 commented 3 years ago

Hello, I'm trying to figure out "how" this code works. My question is .. Where is the updated coordinates are placed in what directory and the name of the file.
I know that when I click on the web map the file located in /var/www/html/webui/LatLon.txt gets updated with the New coordinates of the LAST clicked coordinates on the map. So that works just fine.
My question is where is the file named that gets updated every 1/10 sec? I know it say's it is /tmp/LatLon.txt, but I do not see that file in that directory?

from readme file

crescentvenus commented 3 years ago

You can find the file in /var/wwww/html/webui/LatLon.ini.php that is /tmp/LatLon.txt. Actually /tmp/LatLon.txt is FIFO file which is updated every 1/10 second. Clicked location is written into /var/wwww/html/webui/LatLon.txt. The file name is same "LatLon.txt" but path is deffrent.

th2112 commented 3 years ago

Sorry for my ignorance in coding and linux in general...
First, Everything seems to be working OK, and I can see myself move on my phone. I can't seem to get the hardware ( LCD and encoder scripts to work). I may open a case on that if it does not bug you too much to help. I was trying to figure out how to get a static location script to work. Seems like your script works better to keep the gps sync'd up than the standard GPS-SDR-SIM. I think it has something to do with the current time and date.

Anyway, I assume that the Smooth2.sh script does the math to produce the /tmp/LatLon.txt is FIFO file which is updated every 1/10 second. Should I be able see that file /tmp/LatLon.txt and read it?

crescentvenus commented 3 years ago

1) It is not difficult to control every thing via WebUI without any hardware. In this case, you need to write a small additional script. 2) GPS-SDR-SIM has -T option. You can specify date & time of GPS. 3) /tmp/LatLon.txt is just one line text file. You can read it by "$cat /tmp/LatLon.txt" for example.