LUGRo-Mesh Forum (espaņol/english)
December 06, 2021, 09:06:08 am
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free
 
  Home   Forum   Help Search Gallery Staff List Login Register  

Problems to adapt firmware

Pages: 1 [2]  All   Go Down
  Print  
Author Topic: Problems to adapt firmware  (Read 2479 times)
scriado
Administrator
Full Member
*****
Posts: 135


« Reply #15 on: June 18, 2009, 10:22:34 pm »

Ok.
What do you see if you enter this command?

ifconfig eth0 | grep HWaddr | awk '{print $5}'

Do you see your MAC ADDRESS?
Report Spam   Logged
PCDOM
Full Member
***
Posts: 105


« Reply #16 on: June 21, 2009, 05:23:08 am »

Ok.
What do you see if you enter this command?

ifconfig eth0 | grep HWaddr | awk '{print $5}'

Do you see your MAC ADDRESS?

Yes, I see the MAC ADDRESS
00:15:6D:AE:CC:00

if I try this command

 ifconfig eth0 | grep HWaddr | awk -F : '{print $1$2$3$4$5$6}'

this is the result

eth0      Link encapEthernet  HWaddr 00156DAECC

and this command

ifconfig eth0 | grep HWaddr | awk -F : '{print $1$2$3$4$5$6$7}'

this is the result

eth0      Link encapEthernet  HWaddr 00156DAECC00

and this command

 ifconfig eth0 | grep HWaddr | awk -F : '{print $3$4$5$6$7}'

this is the result

156DAECC00

is it the command will be

 let NODE_ID=00$(echo $LAN_MAC| awk -F: '{print $3$4$5$6$7}')

Huh
« Last Edit: June 21, 2009, 06:14:48 am by PCDOM » Report Spam   Logged
scriado
Administrator
Full Member
*****
Posts: 135


« Reply #17 on: June 21, 2009, 08:48:04 pm »

try this

LAN_MAC=$(ifconfig $LAN_IFACE | grep HWaddr | awk '{print $5}')
NODE_ID=$(echo $LAN_MAC|tr -d Smiley
Report Spam   Logged
PCDOM
Full Member
***
Posts: 105


« Reply #18 on: June 22, 2009, 05:56:27 am »

try this

LAN_MAC=$(ifconfig $LAN_IFACE | grep HWaddr | awk '{print $5}')
NODE_ID=$(echo $LAN_MAC|tr -d Smiley
ok I try it, it seems that will be good soon

After try it, I execute this command
echo $NODE_ID

and this is the result

00156DADCC00 06156DADCC00 0A156DADCC00 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 00156DAECC00 00-15-6D-AD-CC-00-00-00-00-00-00-00-00-00-00-00

after I try

echo $NODE_ID | awk '{print $5}'

and this is the result

00156DAECC00

I try this script

## Determine nodo_id for the first time. Then it could be changed.
LAN_MAC=$(ifconfig eth0 | grep HWaddr | awk '{print $5}') NODE_ID=$(echo $LAN_MAC| awk -F: '{print $1$2$3$4$5$6}')

it works fine !!!

Helene Gauthier
« Last Edit: June 25, 2009, 08:38:41 am by PCDOM » Report Spam   Logged
Pages: 1 [2]  All   Go Up
  Print  
 
Jump to:  

Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum
Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy