maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Nokia N9 / N950 (https://talk.maemo.org/forumdisplay.php?f=51)
-   -   n9 commands to get the mac address of a router (https://talk.maemo.org/showthread.php?t=88726)

skyleth 2013-01-21 11:14

n9 commands to get the mac address of a router
 
my uncle has a problem with his router, but we can't access the configuration page and he doesn't want to reset it. i'm trying to access the router but i need to get the mac address. which are the commands in meego harmattan to get the mac address of a router without actually being connected to it

anthonie 2013-01-21 11:26

Re: n9 commands to get the mac address of a router
 
I didn't read your question right, so I thought you were looking for the internal mac address of the N9.

Problem is: Normally one would use "arp" to find out this address, however, it is not available on the N9. So you need to get it elsewhere, being:

Code:

cat /proc/arp
(HW Address is the term used here)

For this to work, however, you would need to be connected to it.

ladoga 2013-01-23 10:03

Re: n9 commands to get the mac address of a router
 
@anthonie
You probably meant /proc/net/arp?

@skyleth
I don't understand what you mean by "not connected" as obiviously you can't get any information of anything without some kind of connection to it. So I will presume you are connected to the same LAN that the router is in.

If you have busybox-power (I'm not sure if harmattan's stock busybox includes /usr/sbin/arp) installed you can:
Code:

$ /usr/sbin/arp -n <router's IP-address>
Or if you have nmap installed:
Code:

$ devel-su
<rootme>
# develsh
# nmap -sP <router's IP-address>

If you don't know router's IP-address you can replace the nmap command above with:
Code:

# nmap -sP 192.168.*.* | grep -B3 MAC
...and it will scan all the addresses inside your LAN.

skyleth 2013-01-23 14:34

Re: n9 commands to get the mac address of a router
 
thank you, i will try with your suggestions to see what i can get

anthonie 2013-01-23 15:17

Re: n9 commands to get the mac address of a router
 
Quote:

Originally Posted by ladoga (Post 1316902)
@anthonie
You probably meant /proc/net/arp?

Man, I thought I deleted that post. At first I hadn't looked securely enough and assumed it was about the N900. So the advice I typed was meant for that. Than I noticed the threadlocation and started changing text, only to notice that I was wrong. Hence I intended to delete it. Yet failed. Such a simpel action.

Ahum... :)

ladoga 2013-01-23 20:34

Re: n9 commands to get the mac address of a router
 
Quote:

Originally Posted by skyleth (Post 1316977)
thank you, i will try with your suggestions to see what i can get

To install busybox-power see; http://talk.maemo.org/showthread.php...ybox+harmattan (requires inception or open mode).

Nmap can be installed from rzr's repository with apt-get or you can download it from here and install as usual with dpkg -i </path/to/package.deb>.


All times are GMT. The time now is 01:29.

vBulletin® Version 3.8.8