|
2017-10-21
, 23:12
|
Posts: 635 |
Thanked: 1,535 times |
Joined on Feb 2014
@ Germany
|
#192
|
#!/bin/bash ##Original script by joschobart can be found here: https://together.jolla.com/question/170006/xperia-x-wlan-sharing-not-working/ ## if [ "$EUID" -ne 0 ] then echo "Please run as root (type devel-su first)" exit 1 fi if [[ $1 == "off" ]]; then echo "Switch Tethering off..." /bin/dbus-send --print-reply --type=method_call --system --dest=net.connman /net/connman/technology/wifi net.connman.Technology.SetProperty string:Powered variant:boolean:false > /dev/null 2>&1 sleep 1 echo 0 > /sys/module/bcmdhd/parameters/op_mode /bin/dbus-send --print-reply --type=method_call --system --dest=net.connman /net/connman/technology/wifi net.connman.Technology.SetProperty string:Powered variant:boolean:true > /dev/null 2>&1 sleep 1 ifconfig wlan0 down ifconfig wlan0 up systemctl restart connman echo "...Tethering should be turned off now" exit 0 elif [[ $1 == "on" ]]; then echo "Switch Tethering ON.." /bin/dbus-send --print-reply --type=method_call --system --dest=net.connman /net/connman/technology/wifi net.connman.Technology.SetProperty string:Powered variant:boolean:false > /dev/null 2>&1 sleep 1 echo 2 > /sys/module/bcmdhd/parameters/op_mode sleep 1 echo "Now enable hotspot (\"Settings > Internet sharing\")" read -p "Done with the instruction above? Then press [Enter] to continue..." ip link set dev wlan0 master tether sleep 1 echo "Enjoy tethering on your Nexus5 ;)" exit 0 else echo "USAGE: $0 <on><off>" exit 1 fi
chmod +x hotspot.sh
devel-su ./hotspot.sh on
devel-su ./hotspot.sh off
The Following 7 Users Say Thank You to mautz For This Useful Post: | ||
|
2017-10-22
, 19:27
|
Posts: 387 |
Thanked: 707 times |
Joined on May 2015
@ Italy
|
#194
|
|
2017-10-22
, 19:39
|
Posts: 635 |
Thanked: 1,535 times |
Joined on Feb 2014
@ Germany
|
#195
|
The Following User Says Thank You to mautz For This Useful Post: | ||
|
2017-10-22
, 20:35
|
Posts: 387 |
Thanked: 707 times |
Joined on May 2015
@ Italy
|
#196
|
Have you downloaded the hotspot.sh file or created your own one with the content i posted? Line 30 and 31 don't contain the parts, you get as an errors, maybe something went wrong while copying and pasting....could you try to download the file?
|
2017-10-22
, 20:43
|
Posts: 635 |
Thanked: 1,535 times |
Joined on Feb 2014
@ Germany
|
#197
|
The Following User Says Thank You to mautz For This Useful Post: | ||
|
2017-10-22
, 20:53
|
Posts: 635 |
Thanked: 1,535 times |
Joined on Feb 2014
@ Germany
|
#199
|
The Following User Says Thank You to mautz For This Useful Post: | ||
|
2017-10-23
, 18:56
|
Posts: 635 |
Thanked: 1,535 times |
Joined on Feb 2014
@ Germany
|
#200
|
The Following User Says Thank You to mautz For This Useful Post: | ||
So, a
SFOS Nexus5 CM12.1 custom kernel