sh GPS和推送通知以及速度测试来自:http://decryption.net.au/index.php/2013/10/05/raspberry-pi-portable-3g4g-network

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh GPS和推送通知以及速度测试来自:http://decryption.net.au/index.php/2013/10/05/raspberry-pi-portable-3g4g-network相关的知识,希望对你有一定的参考价值。

#!/bin/bash
# time stamp this shit yo
nowdate=$(date "+%d-%m-%y")
nowtime=$(date "+%H:%M:%S")
# stole this idea of using gpspipe, grep and awk from here: http://thomasloughlin.com/gpspipe-gps-client/
gpsdata=$(gpspipe -w -n 10 | grep -m 1 lon)
lat=$(echo "$gpsdata" | jsawk ‘return this.lat’)
lon=$(echo "$gpsdata" | jsawk ‘return this.lon’)
gpsspeed=$(echo "$gpsdata" | jsawk ‘return this.speed’)
# runs my modified the speedtest-cli python script and uses tr instead of grep to remove some line feeds and change it to a comma to suit the csv
speed=$(python /home/pi/speed.py –simple –server 3252 | tr ‘n’ ‘,’)
# writes the values to a csv file – the $speed value returns like 5.01,0.03, (note the trailing comma) which is why there’s no comma between $speed and $lat
echo "$nowdate,$nowtime,$speed$lat,$lon,$gpsspeed" >> /home/pi/vha_speedlog.csv
# sends info to the Pushover service, which then sends a push notification to my iPad with the results of the speedtest
curl -s
-F "token=sekrit"
-F "user=sekrit"
-F "message=down,up speedtest result : $speed"
https://api.pushover.net/1/messages.json
exit 0

以上是关于sh GPS和推送通知以及速度测试来自:http://decryption.net.au/index.php/2013/10/05/raspberry-pi-portable-3g4g-network的主要内容,如果未能解决你的问题,请参考以下文章

未收到来自 CloudKit 订阅的推送通知

没有收到来自 Firebase 控制台的推送通知

来自 php 服务器的 Android 推送通知

来自服务器的 Apple 推送通知

Android 没有收到来自新 Parse Server 的推送通知

APNS Apple 推送通知服务未收到来自 Apple 的成功消息