1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-03-09 15:40:20 +00:00

Kernel 5.4 RUTX support

This commit is contained in:
Ycarus (Yannick Chabanois) 2023-08-14 17:47:02 +02:00
parent 839fcf1cab
commit cfce9f52b2
7376 changed files with 3902 additions and 546 deletions

View file

@ -20,6 +20,18 @@ strstr() {
print_array() {
json_add_array $1
case "$1" in
5G_NSA)
for element in $2
do
json_add_string "" "$(echo $element)"
done
;;
5G_SA)
for element in $2
do
json_add_string "" "$(echo $element)"
done
;;
4G)
for element in $2
do
@ -210,6 +222,28 @@ gather_band_capabilities() {
lte_bands=""
trysg_bands="850 1900"
dug_bands=""
###################### EC200A #########################
elif strstr $revision_from_unhandler "EC200AAU"; then #EC200AAU
lte_bands="1 2 3 4 5 7 8 28 40 66"
trysg_bands="850 900 1700 1900 2100"
dug_bands="850 900 1800 1900"
elif strstr $revision_from_unhandler "EC200AEU"; then #EC200AEU
lte_bands="1 3 5 7 8 20 28 38 40 41"
trysg_bands="850 900 2100"
dug_bands="900 1800"
####################### RG501QEU #######################
elif strstr $revision_from_unhandler "RG501QEU"; then #5G module
nsa_nr5g_bands="1 3 5 7 8 20 28 38 40 41 77 78"
sa_nr5g_bands="1 3 5 7 8 20 28 38 40 41 77 78"
lte_bands="1 3 5 7 8 20 28 32 38 40 41 42 43"
trysg_bands="2100 850 900"
dug_bands=""
elif strstr $revision_from_unhandler "RG520NEU"; then #5G module
nsa_nr5g_bands="1 3 5 7 8 20 28 38 40 41 75 76 77 78"
sa_nr5g_bands="1 3 5 7 8 20 28 38 40 41 75 76 77 78"
lte_bands="1 3 5 7 8 20 28 32 38 40 41 42 43"
trysg_bands="2100 850 900"
dug_bands=""
else
lte_bands="1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28"
trysg_bands="700 800 850 900 1500 1700 2600"
@ -249,6 +283,8 @@ setup_modem() {
validate_service_modes && {
gather_band_capabilities
json_select_object service_modes
[ -z "$nsa_nr5g_bands" ] || print_array "5G_NSA" "$nsa_nr5g_bands"
[ -z "$sa_nr5g_bands" ] || print_array "5G_SA" "$sa_nr5g_bands"
[ -z "$lte_bands" ] || print_array "4G" "$lte_bands"
[ -z "$trysg_bands" ] || print_array "3G" "$trysg_bands"
[ -z "$dug_bands" ] || print_array "2G" "$dug_bands"
@ -280,7 +316,10 @@ setup_modem() {
json_add_string type "$type"
json_add_string desc "$desc"
json_add_string control "$control"
json_add_string revision "${revision_from_unhandler::-2}"
json_add_object service_modes
[ -z "$nsa_nr5g_bands" ] || print_array "5G_NSA" "$nsa_nr5g_bands"
[ -z "$sa_nr5g_bands" ] || print_array "5G_SA" "$sa_nr5g_bands"
[ -z "$lte_bands" ] || print_array "4G" "$lte_bands"
[ -z "$trysg_bands" ] || print_array "3G" "$trysg_bands"
[ -z "$dug_bands" ] || print_array "2G" "$dug_bands"