I'll try to keep this as straightforward as possible. This project involves a Raspberry Pi 3, and an Android device.
The Pi
- Setup as a wireless access point (WiFi) which will have NO internet access (placed in a remote location that the Android device can still connect to).
- A GPS module is connected, and the data is parsed into a text file under a folder named data. This will contain all coordinates, speed, etc.
Android Device
Acts as the "middleman". Will recieve data from the Pi (the textfiles containing GPS information).
Will have the sshelper app to allow rSync commands if needed.
Unrelated, but the Android device will send the data gathered from the Pi to a server once internet access or cellular data is available.
With the roles of each component out of the way, the plan is to use rsync via SSH to synchronize the data from the raspberry pi and the android device, and send data whenever the android device is connected to the Pi's access point.
How can this be done? I know SSH allows sending data, and we've tested this, however we need to automate this task, therefore would it be possible to use cron and rsync to do this from the Pi? If so, how should we go about this?
I've seen a lot of examples in regards to backing up data from the Android device to the Pi, but not the other way around. Any help would be greatly appreciated.
Thank you!