• Register
Welcome to Ubuntu-MM Q&A, Ubuntu Linux ႏွင့္ ပတ္သက္သမွ် သိခ်င္တာ ေမးပါ။ မေမးခင္ ေမးၿပီးသား ရွိမရွိ ရွာပါ။ အေမးရွိၿပီး အေျဖမရွိေသးပါက ေမးခြန္းကို Vote ေပးခဲ့ပါ။

phone နဲ့ usb tethering သံုး ရင္ ip address မေျပာင္း ေအာင္ ဘယ္ လိုလုပ္ တာလဲ please

1 like 0 dislike
asked May 6, 2015 in Beginner by hpauyu (170 points)

1 Answer

0 like 0 dislike
  • connect the smartphone to the PC with the USB cable
  • on the smartphone, activate USB tethering, using the Settings application
  • on the PC, enter the dmesg command. A message similar to this one should be displayed:
rndis_host 2-1.2:1.0: >usb0: register 'rndis_host' at usb-0000:00:1d.0-1.2, RNDIS device, 96:53:6d:9b:5e:a5
  • still on the PC, enter the following command (adapt usb0 if required) 
udevadm info -a -p /sys/class/net/usb0
  • you will get udev information for usb0 device, and then for its parents. Look for the device with ATTRS{serial}information. 
  • create the file /etc/udev/rules.d/90-local.rules with the following content (on the same line, xxxx being the value displayed for ATTRS{serial}), setting ownership to root:root:
ACTION=="add", DRIVERS=="usb", ATTRS{serial}=="xxxx", RUN+="/etc/udev/scripts/android"
  • create the file /etc/udev/scripts/android with the following content (you can choose any MAC address, provided that it is a locally administered address, i.e. the second least significant bit of the most significant byte is set to 1):
#!/bin/bash
ifconfig usb0 down
ifconfig usb0 hw ether 02:11:22:33:44:55
ifconfig usb0 192.168.42.1
ifconfig usb0 up
  • make this file executable, and set its ownership to root:root
  • reload udev rules:
sudo udevadm control --reload-rules
  • prevent Network Manager from managing usb0, adding into /etc/NetworkManager/NetworkManager.conf file the MAC address you specified in the script:
[keyfile]
unmanaged-devices=mac:02:11:22:33:44:55
  • restart Network Manager:
sudo service network-manager restart

That's it! 

If the smartphone is replaced by another one, modify the serial attribute in the udev rule.

 

copy from : http://www.monblocnotes.com/node/1895

answered May 7, 2015 by yethusoe (210 points)
/etc/network/interfaces
ကိုပြောင်းပြီးလုပ် လို့ရလားမသိဘူး bro

Related questions

2 like 0 dislike
1 answer
0 like 0 dislike
1 answer
asked Jun 5 in Beginner by Thura (610 points)
0 like 0 dislike
1 answer
0 like 0 dislike
2 answers
asked Mar 26, 2015 in Beginner by Shwe Tun (970 points)
...