android - Setting up a Mac as a wifi hotspot to run mobile broadband test cases -
i need set environment can simulate mobile network internet connectivity ios , android devices don't have mobile data plans. thinking use mac set wifi hotspot , use ipfw throttle data connection simulate 3g network. i've managed mac set through "internet sharing" settings in system preferences. can connect both iphone 4 , samsung galaxy s3 fine , pull web pages no problem. however, i'm having trouble ipfw side of it. put linux script set pipes, when run program smartphones can no longer connect internet. think might routing issue, i'm not sure i'm missing. here's script looks like:
ipfw del pipe 1 ipfw del pipe 2 ipfw -q -f flush ipfw -q -f pipe flush bw_down=780 [ ! -z $1 ] && bw_down=$1 bw_up=330 [ ! -z $2 ] && bw_up=$2 if [ "$1" == "off" ]; echo "disabling bw limit" exit else echo "download = ${bw_down}kbyte/s, upload = ${bw_up}kbyte/s" ipfw add pipe 1 ip any ipfw add pipe 2 ip any ipfw pipe 1 config bw ${bw_down}kbyte/s ipfw pipe 2 config bw ${bw_up}kbyte/s fi
any ideas?
Comments
Post a Comment