[Q] sh script for WiFi - Captivate Q&A, Help & Troubleshooting

I've been having issues with the Wifi on my captivate since day one (two different devices over the span of about 2 months now). Since no updates from Samsung or AT&T have fixed it, I'm trying my own thing.
The problem I am having is that the Subnet Mask does NOT get configured properly on the eth0 interface from DHCP on a classless subnet. That is, if the Mask is 255.0.0.0 or 255.255.255.0, I have no problems, but at work my subnet mask is 255.255.252.0. The framework and DHCP report the right mask, but the interface itself always reports 255.0.0.0.
I've rooted the phone and figured out that I can manually change the mask using the ifconfig netmask command, but don't want to do that every time.
What I've been trying is creating a dhcpcd.exit-hook script that gets called by the dhcpcd-run-hooks script to check the mask and set it appropriately.
If the script ONLY sets the interface netmask to the classless mask, it works but then won't set the classful mask properly.
I've tried various if and case statement variations to fix this, but always seem to get weird syntax errors when I run them via sh. Obviously they don't work from being called from the run-hooks script.
Below is the latest code I've tried:
Code:
#!/system/bin/sh
# This script runs last, after all network configuration
# has completed. It sets a property to fix the Subnet Mask
# to use the classless mask from DHCP instead of classful.
varMask=`getprop dhcp.eth0.mask`
case "$varMask" in "255.255.255.0" )
exit
;;
esac
/system/bin/ifconfig eth0 netmask "$varMask"
exit
The error I'm getting is:
Code:
dhcpcd.exit-hook: 11: Syntax error: word unexpected (expecting ")")
When I did this with an if statement, was getting a similar error, except it was asking for a then, even though there was a then in the code and the syntax was right, as far as I've been able to determine.
I am not android or linux expert, so any assistance would be greatly appreciated.
Tks.
~CJ

I think I got it
Figures! I'd figure it out 10 mins after I asked for help!
The syntax error seems to have been casued by file formats. I originally was using wordpad and apparently android/*nix didn't like the carrige returns.
I installed and used Notepad++, saw the file format difference and coverted it.
No errors and the script appears to work as desired, though I haven't had a chance to test in on my home "classfull" network yet.
I'll update when I test things fully.
EDIT: Thought wrong! It appears to work when I manually run it, but it does not appear to be running from the dhcpcd-run-hooks script...

Perhaps now
After rebooting the phone, it appears to be working. I've even bounced back and forth between a test network I have here on the 255.255.255.0 subnet and the production network which is 255.255.252.0.
I did have turn wifi off and on the first time I went from production to test, but it seemed to work both ways.
I'm going to continue to test from my home and other networks before I feel comfortable calling this one won.

Still having trouble at home. Seems to want to assign 255.255.255.255 mask on class C subnets. Hmmm.

Related

[Q] Help! Changing DNS settings

I need to change the DNS settings for a connection I use a lot that is managed by company who has setup OpenDNS to block a lot of stuff...
How can I go about doing this on a wpa encrypted wireless network where i do no not have a dynamic ip address?? It seems it only supports changing a DNS server when the phone is setup dynamically.. I need it to work on DHCP, I just need the DNS server changed, i dont need or want a dynamic ip..
HELP!
tiptoekirk said:
I need to change the DNS settings for a connection I use a lot that is managed by company who has setup OpenDNS to block a lot of stuff...
How can I go about doing this on a wpa encrypted wireless network where i do no not have a dynamic ip address?? It seems it only supports changing a DNS server when the phone is setup dynamically.. I need it to work on DHCP, I just need the DNS server changed, i dont need or want a dynamic ip..
HELP!
Click to expand...
Click to collapse
This is the code needed to change the DNS settings. Just connect your N1 to your PC and open command in your PC then;
adb shell setprop net.dns1 8.8.8.8
adb shell setprop net.dns2 8.8.8.4
henihazbay said:
This is the code needed to change the DNS settings. Just connect your N1 to your PC and open command in your PC then;
adb shell setprop net.dns1 8.8.8.8
adb shell setprop net.dns2 8.8.8.4
Click to expand...
Click to collapse
That did not seem to do it... I tried several times with wifi on and off and even restarted the phone.. any other ideas??
tiptoekirk said:
I need to change the DNS settings for a connection I use a lot that is managed by company who has setup OpenDNS to block a lot of stuff...
How can I go about doing this on a wpa encrypted wireless network where i do no not have a dynamic ip address?? It seems it only supports changing a DNS server when the phone is setup dynamically.. I need it to work on DHCP, I just need the DNS server changed, i dont need or want a dynamic ip..
HELP!
Click to expand...
Click to collapse
Not sure if i get that... When you use static ip there is a section that allows you to specify the DNS... not sure what you mean The problem as i see it, is that there is no easy way (via android GUI) of changing DNS if you use DHCP
Anyways... try...
adb shell setprop dhcp.eth0.dns1 <IP>
adb shell setprop dhcp.eth0.dns2 <IP>
etc
This will only change the DNS server. If you know shell scripting, You could make this more permanent by editing :
/system/etc/dhcpcd/dhcpcd-hooks/20-dns.conf
If that works, and you are unfamiliar with shell scripting, then post some conditions (i.e SSID of network, gw of network etc) and i'll see if i can knock something up for you.
Hope that helps
yasn77 said:
Not sure if i get that... When you use static ip there is a section that allows you to specify the DNS... not sure what you mean The problem as i see it, is that there is no easy way (via android GUI) of changing DNS if you use DHCP
Anyways... try...
adb shell setprop dhcp.eth0.dns1 <IP>
adb shell setprop dhcp.eth0.dns2 <IP>
etc
This will only change the DNS server. If you know shell scripting, You could make this more permanent by editing :
/system/etc/dhcpcd/dhcpcd-hooks/20-dns.conf
If that works, and you are unfamiliar with shell scripting, then post some conditions (i.e SSID of network, gw of network etc) and i'll see if i can knock something up for you.
Hope that helps
Click to expand...
Click to collapse
Yes i am wanting to just change the DNS server that my phone uses when connecting to wifi but i cant set it up dynamically so i am forced to keep it dhcp.
i tried the way you said and it didn't do it.. this android stuff is new to me.. after i type in that command in it does not say anything.. i have rooted and unlocked my nexus one and pretty good with computers but this linux stuff is another ballgame..
ive done some dos scripting back in the day, is this anything similar? what other info would u need from me to create the file? SSID, password, ??
THANKS!
How to set the dns for the mobile internet connection?! I wanna use FoolDNS in place of Google DNS.. Because with froyo 2.2 and flashplayer we see allllllll the advertising on web and navigation becames much slower

HOWTO: Set up your G1's Wi-Fi (in order to make it actually *work*)

I've received my Dream yesterday and the wi-fi is painfully slow. At first it didn't work at all, so I entered all settings by hand, assigned it a static IP address and other stuff. Then it worked, albeit very slowly. So, here's what you need to do if your wi-fi isn't too fast.
Go to Wi-Fi settings, press Menu and select Advanced Settings. On your computer (if you're using an unix based OS, at least - can some Windows guru help me out with this?), get to a terminal emulator and type:
Code:
ifconfig en1
This should give you output like this:
Code:
Wiktoria:~ Nekkoru$ ifconfig en1
en1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:1c:b3:bd:b9:cb
inet6 fe80::21c:b3ff:febd:b9cb%en1 prefixlen 64 scopeid 0x6
inet 192.168.55.102 netmask 0xffffff00 broadcast 192.168.55.255
media: <unknown subtype>
status: active
Wiktoria:~ Nekkoru$ [CODE]
The IP address after inet (192.168.55.102 in my case) is what you're after. On your phone, enter your IP address as the IP adress you got, with the last block changed to anything that's not being used on your network. I assigned 192.168.55.69 to my phone, because it's easy to remember and it's kind of childish.
Now, your "Gateway" should be your router's IP address. Your router's IP should be specified in it's manual - or your system settings. Your subnet mask should always be 255.255.255.0.
We need your DNS settings now - this is where most of us screw up and this is what you need to fix the most. Go back to your computer's terminal and type in
[CODE]dig
Look at the bottom. You're interested in a line that says "SERVER: xxx.xxx.xxx.xxx". That's your primary, first DNS. If you give that to your phone, your wi-fi should work way faster. Set it up as the second DNS as well, unless you know a better DNS server than your ISP's (anyone?).
I'm sorry this got so complicated, but that's the best way to set up your G1's internet if it gives you any trouble. I hope I helped somewhat.

Any way to name my phone

Just wondering cause i like seeing names for the devices that are connected to my router without having to check on each item.. My phone comes up as blank on my router settings page. My wifes iphone(hate saying that word) shows up as her name. Same with all my PCs just wish my phone showed up other than a blank.
My Uncle had asked me about that at one point as well. He uses MAC address approval on his AP at his house and had no clue how to distinguish which from phone from who had it. We have 3 Captivates in my house.
Sucks having to check mac address just to see whos connected to my router.
For now I know I'm the only one on it but I check everyday to see if some one tried to jump on my ship and would love to see a name. .
Sent from my SAMSUNG-SGH-I897 using XDA App
Couldn't someone just change their device name and MAC address to match yours?
On any note, some devices use the same name stored for bluetooth. I can't really test it right now, but try and change it from the default BT name. Sounds dumb, usually I would test these things before saying anything though, so forgive me if I'm wrong!
I don't use mac address security.
The blue tooth is a good idea. Image test after work today. If u get a chance before me just let me know what happens.
Thanks for the idea
Sent from my SAMSUNG-SGH-I897 using XDA App
Our phone does not use the BT name as its network name. I have been trying to figure out where it would keep its name, because I would like to accomplish the same thing. I mean, all my devices have names, even my network printer, the kid's wii, etc.
on a normal linux box, the host name would be stored in /etc/hostname
Pirateghost said:
Our phone does not use the BT name as its network name. I have been trying to figure out where it would keep its name, because I would like to accomplish the same thing. I mean, all my devices have names, even my network printer, the kid's wii, etc.
on a normal linux box, the host name would be stored in /etc/hostname
Click to expand...
Click to collapse
Haven't confirmed it on the captivate (mines at the shop getting repaired) but i did try this method on my tilt2 running xdandroid (froyo 2.2) and a smartq V7 android tablet (eclair 2.1).
edit your init.rc file
find the section that looks something like this
Code:
on boot
#basic network init
ifup lo
hostname localhost
domainname localdomain
change hostname localhost to hostname name_of_device.
For example I called mine XDAndroiD. This is how the section looks like.
Code:
on boot
#basic network init
ifup lo
hostname XDAndroiD
domainname localdomain
This method will survive a phone reboot. Another method (that wont survive reboot) is to issue this command in a terminal under root
Code:
su
echo name_of_device > /proc/sys/kernel/hostname
This example using my XDAndroiD name would look like this.
Code:
su
echo XDAndroiD > /proc/sys/kernel/hostname
***Again I haven't tried this on my Captivate yet. Will test it out when I get my phone back from the shop.
thanks for that. i will have a look later today and see what happens.

[Howto] Use your desktop keyboard & mouse on the webtop

While this may not be something that most people may want to do, it's something that I wanted to figure out here at work since I have a tri-monitor setup and wanted to use my existing keyboard & mouse on my Atrix's webtop without having to get the HD dock and use a physical KVM. Another obstacle to overcome was the fact that my linux workstation (main machine) is on a separate, wired network from my Atrix, which is connected via a 3G/4G MiFi device. You'll want to make sure you're rooted in both android OS and the webtop OS. You'll also need lxterminal working in the webtop.
So you'll need to get a couple of Jaunty packages compiled for arm:
x11vnc
libvncserver0
Once downloaded, you'll need to get them onto the /osh partition for installation. I do this via adb:
adb push x11vncfiles/ /sdcard/tmp/
adb shell
su
mkdir /osh/tmp
cd /sdcard/tmp
cp *.deb /osh/tmp
sudo -H -u adas bash (switch you to adas user in webtop)
sudo /bin/bash (switches you to root in webtop; you may need to use sulogin)
chroot /osh
cd /tmp
dpkg -i *.deb
exit
Now on to testing...
If you are like me and need to be able to get to the webtop but it isn't on the same network that your desktop/laptop machine is on, you can use the USB cable and adb forward to handle the connectivity. A positive side-effect of this limitation is that x11vnc only needs to listen on the lo (localhost) interface, which helps keep that connection more secure.
LOCAL USB CONNECTION
In lxterminal in the webtop, run the following (as adas) for testing:
export DISPLAY=:0.0
x11vnc -noncache -nolookup -localhost
On your desktop/laptop, run the following:
adb forward tcp:5900 tcp:5900
Using a vnc viewing application (vncviewer, tightvnc, etc), connect to localhost:5900
If all worked out, you should see a remote view of your webtop
REMOTE WIFI CONNECTION
If your Atrix and desktop/laptop are on the same network (or can reach each other via routing), you can do the following steps to test:
In lxterminal in the webtop, run the following (as adas) for testing:
export DISPLAY=:0.0
ifconfig (notate the IP address for eth0)
x11vnc -noncache -nolookup -listen ip_addr_from_prev_step
On your desktop/laptop, run the following:
Using a vnc viewing application (vncviewer, tightvnc, etc), connect to ip_addr_of_atrix:5900
If all worked out, you should see a remote view of your webtop
AUTOMATING THE PROCESS
In order for the x11vnc process to spawn automatically, we need to add it to the lxsession autostart file. This file is read when lxsession starts up and in turn fires off whatever scripts are listed in there. The file is located at:
/etc/xdg/lxsession/LXDE/autostart
By default, the only thing listed in that file is start-oshwt-1.sh, which is a script located at /usr/local/bin. So to get x11vnc working, we add an additional entry into that file:
(as root in webtop): echo start-x11vnc.sh >> /etc/xdg/lxsession/LXDE/autostart
Then we need to create that script in /usr/local/bin:
vi /usr/local/bin/start-x11vnc.sh
Code:
#!/bin/sh
export DISPLAY=:0.0
cd ~
nohup /usr/bin/x11vnc -usepw -forever -nossl -logappend /home/adas/.vnc/x11vnc.log -noncache -nolookup -localhost -nofb -bg
(If you're using it on the same network, replace -localhost with -listen ip_addr like the example above)
Save that file, and make it executable:
chmod +x /usr/local/bin/start-x11vnc.sh
Also, we need to modify Tomoyo to allow it to run that script. Edit /etc/tomoyo/domain_policy.conf and around line 1440:
Code:
<kernel> /osh/usr/bin/lxsession
use_profile 3
Change the 3 to a 2.
Add the following lines to that section:
Code:
allow_execute /osh/usr/bin/x11vnc
allow_execute /osh/usr/local/bin/start-x11vnc.sh
FINAL TOUCHES
I wanted to be able to just move my mouse cursor to the right edge of my desktop machine and have it magiaclly jump to the atrix monitor. To do this, I use a piece of software called x2vnc. If you're using Windows, there's also a package called Win2VNC that will accomplish the same thing. With either software, you run the client (in my case, it's x2vnc) and tell it which direction your vnc server is located at. So to the right of my linux desktop would be east, so I run x2vnc like so:
x2vnc -east localhost:5900
And this connects me to the x11vnc instance running on the atrix. By moving my mouse to the right edge of my main screen, the cursor now appears on the webtop, and I'm able to mouse around and type using my desktop's keyboard.
USING X2X INSTEAD OF X2VNC/WIN2VNC
For anyone that would rather not install any additional packages, and are already running a local X server (XFree/Xorg/Cygwin) you can use x2x to directly connect to the X server running on the Atrix. In order to do this, you'd need to modify /etc/init.d/startXServer.sh and remove the -nolisten tcp from the startx lines and reboot. Then X will listen on port 6000 (for the first display) and that can be used via adb forward on your host machine. The keyboard entry still doesn't work in the Mobile View for some reason...still investigating this. But the mouse seems to function a lot better over native X; selecting text and dragging windows works fine, as does copy & paste.
The top section still applies (you'll need double-root), but the changes are rather minimal:
Code:
adb shell
su
sudo -H -u adas bash
sudo /bin/bash
vi /etc/init.d/startXServer.sh
At the bottom of this script you'll find the lines:
Code:
sudo -u adas -i /usr/bin/startx -- -nolisten tcp -layout HDMI vt2 &
else
sudo -u adas -i /usr/bin/startx /usr/local/bin/xnull -- -nolisten tcp -layout HDMI vt2 &
Remove the -nolisten tcp from both of those lines. Save that file.
You'll also need a method of giving your localhost access via xhost. This has to run under the user context that has the primary display (adas). Since I went to this method after the x11vnc method, I already have the /usr/local/bin/start-x11vnc.sh script setup. I modified this to not run x11vnc but to instead disable access controls for X connections:
Code:
cat /usr/local/bin/start-x11vnc.sh
#!/bin/sh export DISPLAY=:0.0
xhost +
With those set, reboot your phone. When ready, relaunch the webtop and either fire up x2x directly or via forwarding over adb like so:
adb forward tcp:6001 tcp:6000
x2x -east -to localhost:1 &
You should now be able to mouse around on your webtop. Typing in terminal, browser, etc works, but Mobile View is still not working. I think I have it narrowed down to that app (aiw) not responding to XKEYBOARD events. I'll know more once I get my usb hub working and can plug in a keyboard.
This is awesome. I noticed that everything works great but then when I try to click into my mobile view and use my keyboard it wont work there. So for instance once my vnc is up, i can type in firefox, lxterminal, etc etc. But once I click into the phones mobile view the keyboard just isnt recognized. Its pretty odd.
Again though. This is great. Thanks.
EDIT: After poking around some more, I guess I was mistaken. I must've been using my BT keyboard when I was typing in Handcent. The keyboard via vnc isn't being passed to the aiw (Mobile View) window. I'll try and get that resolved.
Awesome work. This is sweet.
Synergy?
Has anyone tried installing a program called Synergy?
It's a software KVM that lets you "place" another screen beside your current screen and lets you control it by moving your mouse beyond the edge of your screen. For example, you have a desktop monitor in front of you and a laptop to the left. Running the server program on the desktop (where the mouse and keyboard are plugged in) and the client program on the laptop, after a quick setup, you can move your desktop mouse+keyboard to control the laptop. You can't drag windows or files across but copy+paste does work for text between computers, which is very useful.
It's open source and runs on Linux so I don't see any reason the client software couldn't be installed on the webtop (may have to be compiled from source).
I can't post links in the forum yet but the software is at www dot synergy-foss dot org.
I don't have an Atrix (yet) so I can't test it but if VNC works then I don't see any reason that this shouldn't work.
The default port on Synergy is 24800, so substituting that in the tutorial should allow the same thing to be achieved.
If this works it would be one more reason to get the phone when it comes out in Canada (2 days)!
Yep, I tried synergy first, but unfortunately, it wouldn't work in my situation since the synergyc (client) runs on the phone and tries to connect to the syngerys (server) on my PC. I can't redirect ports in that direction over USB, so x11vnc it was.
For those on the same network, there's no reason it wouldn't work just fine. I actually use synergy on the other side of my tri-monitor setup to control our 50" plasma when doing demos and whatnot.
D'oh
I was hoping this was a "got usb host working" thread
Oh well...
/me begins learning about his phone to get that project started.
Does the hdmi cable need to be connected to phone after we setup vnc server to run automatically ? What happens after reboot without cable plugged in ..
The x11vnc server will autostart whenever the webtop is started for the first time. After that, I believe that entire X instance runs in the background. It's just idle, waiting for the next time you connect the hdmi cable/dock.
x2vnc auto reconnects by default, but for those that are forwarding tcp ports via adb, you'll have to recreate the port forward prior to it reconnecting.
agentdr8 said:
The x11vnc server will autostart whenever the webtop is started for the first time. After that, I believe that entire X instance runs in the background. It's just idle, waiting for the next time you connect the hdmi cable/dock.
Click to expand...
Click to collapse
Was your hdmi cable always plugged in your testing ?
I just tested this right now; disconnected both cables and rebooted. Once the phone was fully up, I plugged in usb and adb shell'd in:
Code:
[email protected]:~# ps aux | grep x11vnc
Unknown HZ value! (176) Assume 100.
root 4351 0.0 0.0 1648 528 ? S+ 08:42 0:00 grep x11vnc
[email protected]:~# uptime
Unknown HZ value! (171) Assume 100.
08:42:39 up 2 min, 0 users, load average: 2.29, 1.29, 0.50
[email protected]:~#
And then I plugged the hdmi in, selected Webtop from the popup, and reran that above:
Code:
[email protected]:~# !ps
ps aux | grep x11vnc
adas 4645 0.2 0.2 9832 2020 ? Ss 08:44 0:00 /usr/bin/x11vnc -usepw -forever -nossl -logappend /home/adas/.vnc/x11vnc.log -noncache -nolookup -localhost -nofb -bg
root 5258 0.0 0.0 1652 548 ? S+ 08:44 0:00 grep x11vnc
[email protected]:~# uptime
08:44:36 up 4 min, 0 users, load average: 1.26, 1.16, 0.53
[email protected]:~#
Not sure if usb host without a Motorola media hub / lapdock has been mentioned. I managed to get my Atrix working with full usb host by applying 5vdc to the usb power rail. Seems to work with any usb hub and keyboard / mouse combo long as 5vdc is present on the host side(phone microusb connector). This works in both webtop and normal android shell.
agentdr8 said:
EDIT: For anyone that would rather not install any additional packages, and are already running a local X server (XFree/Xorg/Cygwin) you can use x2x to directly connect to the X server running on the Atrix. In order to do this, you'd need to modify /etc/init.d/startXServer.sh and remove the -nolisten tcp from the startx lines and reboot. Then X will listen on port 6000 (for the first display) and that can be used via adb forward on your host machine. The keyboard entry still doesn't work in the Mobile View for some reason...still investigating this. But the mouse seems to function a lot better over native X; selecting text and dragging windows works fine, as does copy & paste.
Click to expand...
Click to collapse
Hey, this is great. I was wondering if you could make more of a step by step guide for this portion. I'm currently in the middle of getting Cygwin but just in case anything goes wrong haha. Thanks.
^^ Sure thing. I'll update the first post tomorrow.
usb host...?
@callen81 - You got USB host working?! I am highly interested in how this would work, but by applying 5v DC to USB, I don't exactly get what you mean. Could you possibly post a guide? I know a TON of people on this forum would love to hear how exactly you did it.
It's as easy as it sounds; you just connect a micro usb togo cable to a hub and make sure power goes back to the phone. Usually most hubs have a diode to make sure power can only come from the host port not to it. So I just hardwired +5vdc from the hub power socket.
Great work callen. Will give it a try. You may want to draw up a simple schematic or maybe some pics and start a new post in Dev or Accessories so others can benefit from your discovery.
agentdr8 said:
Great work callen. Will give it a try. You may want to draw up a simple schematic or maybe some pics and start a new post in Dev or Accessories so others can benefit from your discovery.
Click to expand...
Click to collapse
I just made a small film.
http://www.youtube.com/watch?v=shvFmLRUNGA
so agentdr8, great guide but im just havin to much trouble with tryin to get x2x workin. its bein a pain with cygwin on my windows box, and too much work for my osx box. im wonderin, would it be hard to just get X workin forwardin the webtop session straight over like ssh or even telnet :/
I haven't tried redirecting the entire webtop X session to a different X server...not sure how that would work out.
I did try some simple ssh forwarding and that works fine. You'd need to install openssh-server, openssh-client, and grep packages (use -i --force-overwrite for grep). You can then tunnel whatever you want over that ssh connection to the phone.

[SCRIPT] Change Hostname

No credit to me please.
I modified the script attached in http://forum.xda-developers.com/showthread.php?t=1366934, for LG Revo.
I merely changed /bin/hostname to /system/xbin/hostname, which is the correct path to access the hostname command in GingerVolt 1.3
Run using script manager, (su and on-boot).
Why change hostname ? Well by default the hostname is something like 'android_<IMEI-NO>', which is way too long, and makes it difficult to spot your device in your routers 'attached devices' log.
Change the "LGRevo" in the line "devName=LGRevo", to what ever hostname you like.
Code:
#!/system/bin/sh
#change devName to whatever you want.
devName=LGRevo
if [ "$(/system/xbin/hostname)" = "$devName" ] && [ "$(getprop net.hostname)" = "$devName" ]
then
echo "Device hostname does not need to be changed."
else
echo "Device hostname is being changed to $devName."
/system/xbin/hostname $devName
setprop net.hostname $devName
if [ "$(/system/xbin/hostname)" != "$devName" ] && [ "$(getprop net.hostname)" != "$devName" ]
then
echo "Device hostname has not been changed."
else
echo "Device hostname has been successfully changed."
fi
fi
gumnaam.sur said:
Why change hostname ? Well by default the hostname is something like 'android_<IMEI-NO>', which is way too long, and makes it difficult to spot your device in your routers 'attached devices' log.
Click to expand...
Click to collapse
Nice find, just a quick question though.
Is there any way you could elaborate a little more on this? Why is shortening the hostname and making it easier to find in the "attached devices" log important?
More explanation on why change the hostname....
As of this writing I have about 6 android devices connected to my home wifi router. Most wifi routers have a page which shows the details of attached devices. This helps you to determine if any unwanted device has managed to hook on your wifi etc.
With the default hostname like 'android_<IMEI-NO>', the list of attached devices is hard to de-cipher. So changing the hostname enables me to make some sense out of the 'attached devices' page. I know exactly which device has hooked to my router.
Secondly, on my router's config, I have assigned static DHCP for all these devices, and also entered them in the DNS. That way each device can talk to another if needed, say over 'SMB' / 'SSH', simply by using the other device's hostname, w/o having to remember each devices IP.
Makes sense ?
gumnaam.sur said:
More explanation on why change the hostname....
As of this writing I have about 6 android devices connected to my home wifi router. Most wifi routers have a page which shows the details of attached devices. This helps you to determine if any unwanted device has managed to hook on your wifi etc.
With the default hostname like 'android_<IMEI-NO>', the list of attached devices is hard to de-cipher. So changing the hostname enables me to make some sense out of the 'attached devices' page. I know exactly which device has hooked to my router.
Secondly, on my router's config, I have assigned static DHCP for all these devices, and also entered them in the DNS. That way each device can talk to another if needed, say over 'SMB' / 'SSH', simply by using the other device's hostname, w/o having to remember each devices IP.
Makes sense ?
Click to expand...
Click to collapse
Oh ok cool! I never even thought of doing it so it's easier to check for unwanted devices. Very nice find, thanks!

Categories

Resources