Initial Commit

Start new branch for development on new 64bit x75 platfom.
This commit is contained in:
Cameron Thompson
2024-07-07 20:15:59 -04:00
parent 88d300303c
commit bfd4b31fea
83 changed files with 599 additions and 0 deletions

View File

@@ -0,0 +1,31 @@
#!/bin/bash
QUERY_STRING=$(echo "${QUERY_STRING}" | sed 's/;//g')
urldecode() {
local data
data="${*//+/ }"
echo -e "${data//%/\\x}"
}
if [ "${QUERY_STRING}" ]; then
export IFS="&"
for cmd in ${QUERY_STRING}; do
if [[ "$cmd" == *=* ]]; then
key=$(echo "$cmd" | awk -F '=' '{print $1}')
value=$(echo "$cmd" | awk -F '=' '{print $2}')
eval "$key"="$(urldecode "$value")"
fi
done
fi
phone_number="$number"
message_encoded="$msg"
send_at_command() {
local cmd=$1
echo -en "$cmd\r" | microcom -t 100 /dev/ttyOUT2
}
send_at_command "AT+CMGS=\"$phone_number\","$Command""
runcmd=$((echo -en "$message_encoded"; echo -en "\x1A") | microcom -t 500 /dev/ttyOUT2)
echo "$runcmd"