Multiple HC1s have same MAC address

Post Reply
Ameridroid
Posts: 278
Joined: Thu Mar 17, 2016 4:19 am
languages_spoken: english
Has thanked: 54 times
Been thanked: 30 times
Contact:

Multiple HC1s have same MAC address

Post by Ameridroid »

We have a customer who followed the Wiki article for changing the MAC address using the special OS image https://wiki.odroid.com/odroid-xu4/trou ... change_mac, but still hasn't had success with changing the MAC address. Here is what he tried:
I Imaged a MicroSD card with Ubuntu 16.04 image and instructions from the page you sent (Also ran sync multiple times after dd write). The boot process does not bring up the network interface so I cannot SSH in to run the ./efuse.sh. Also tried to place dhcp config to /etc/network/interfaces to bring up interface at boot - this did not take effect. The blue heartbeat led is blinking, so kernel should be running. I'm not sure if boot is in initramfs shell or if device has fully booted to OS in the second partition of the card.

I Tried to connect 1.8 Volt USB-to-serial to find out if device is fully booted up (and interact with the system), but serial connector is too small to take 4 pin "standard" (female) header strip into it (And I did now want to cut the "walls" out in case I have to exchange unit).

With 18.04 image device fully functions with original programmed overlapping MAC (can have only 1 unit in network at one time). However when mounting 16.04 image (w. efuse.sh) via NFS (to /mnt/root/efuse) I sadly get following errors and MAC address is not changed (verified by reboot, See efuse.sh errors below). Seems the 18.04 system+kernel runtime is not willing to run the MAC reprogrammer installed in 16.04 image smoothly (the underlying rtu utility is statically linked, so missing dependencies are not the reason).

Let me know if you have further ideas.
BR
Olli

Code: Select all

root@odroid:/mnt/root/efuse# ./efuse.sh

*************************************************************************
*   RTUNicPG  - EFUSE/EEPROM/FLASH Programming Utility for 
*         RTL8152/RTL8153 Family USB FE/GBE Network Adapter 
*   Version : v1.0.20.9 
* Copyright (C) Realtek Semiconductor Corp. 2015. All Rights Reserved.
*************************************************************************
OCP_READ offset=0xe610 error!!!
ReadUshort TCR fail
Get chip type fail! Count = 1 TCRValue = 0x0
OCP_READ offset=0xe610 error!!!
ReadUshort TCR fail
Get chip type fail! Count = 2 TCRValue = 0x0
OCP_READ offset=0xe610 error!!!
ReadUshort TCR fail
Get chip type fail! Count = 3 TCRValue = 0x0
OCP_READ offset=0xe610 error!!!
ReadUshort TCR fail
Get chip type fail! Count = 4 TCRValue = 0x0
OCP_READ offset=0xe610 error!!!
ReadUshort TCR fail
Get chip type fail! Count = 5 TCRValue = 0x0
Can not Get TCR!!! 
get_dev_info fail!

Error (E_PG_NIC_NOT_EXIST): RTK NIC not exist

lsc1117
Posts: 187
Joined: Thu Aug 22, 2013 12:46 am
languages_spoken: english
Location: South Korea
Has thanked: 0
Been thanked: 16 times
Contact:

Re: Multiple HC1s have same MAC address

Post by lsc1117 »

Hi Ameridroid,

Please check if STARTID and ENDID have been modified well in the "EF8153B.cfg" file.
The NODEID must be exist between this STARTID and ENDID.

I have updated the wiki for the checking the STARTID and ENDID.
https://wiki.odroid.com/odroid-xu4/trou ... s_you_want

ohollmen
Posts: 4
Joined: Fri Jul 24, 2020 12:14 pm
languages_spoken: english
ODROIDs: U3,XU4,HC1,N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Multiple HC1s have same MAC address

Post by ohollmen »

Hi !
I'm the Ameridroid customer who had the problem.
I noticed the above MAC constraints in the config file (but it's still good you added it to documentation) and configured NODEID in between the STARTID and ENDID:
NODEID = 00 1E 06 36 DD AE
STARTID = 00 1E 06 30 00 00
ENDID = 00 1E 06 36 FF FF
.. as you can see.
I hope you can carefully read my description in Ameridroid's post above. Please ask questions if something is not clear. I'll summarize here briefly:
- I ran efuse.sh *on* 18.04 minimal with 16.04 "...change-mac.img" image mounted over NFS ( image was loop-mounted on NFS server), the efuse.sh output relates to that run
- I also tried to boot from microSD written with "...change-mac.img" image, but it would not bring up network to SSH into it to run efuse.sh
- Does running require serial console? Would not believe so as very few people have 1.8V serial-to-USB converters
- I used nmap discovery and DHCP server log check to see that HC1 booted with "...change-mac.img" is *not* on network at all
- Device is not bricked. It works with 18.04 minimal, configures interface eth0 and launches SSH.

Looking forward to taking the units with overlapping MAC address 00:1e:06:36:dd:ac into use (This duplicated address was mentioned also on other posts).
BR
Olli

lsc1117
Posts: 187
Joined: Thu Aug 22, 2013 12:46 am
languages_spoken: english
Location: South Korea
Has thanked: 0
Been thanked: 16 times
Contact:

Re: Multiple HC1s have same MAC address

Post by lsc1117 »

Hi ohollmen,

Because of the compatibility of the ethernet driver, the fusing must be ran on the 16.04 image.
Please boot on the "ubuntu-16.04-minimal-odroid-xu3-change-mac.img.xz" and proceed again.

Sorry about this happened.

ohollmen
Posts: 4
Joined: Fri Jul 24, 2020 12:14 pm
languages_spoken: english
ODROIDs: U3,XU4,HC1,N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Multiple HC1s have same MAC address

Post by ohollmen »

Please read my post again if needed. You are suggesting something I already tried several times.
When booting up with "ubuntu-16.04-minimal-odroid-xu3-change-mac.img.xz" the network (interface, eth0) does not come up and I cannot SSH in (to run the efuse.sh).
Blue heartbeat led blinks, which indicates kernel should be running (can't tell more about the state of OS, but no network for sure).

Please focus on helping me getting network interface (an SSH) up with "ubuntu-16.04-minimal-odroid-xu3-change-mac.img.xz".
What could be the reasons the network (eth0) is not up out-of-the-box with "ubuntu-16.04-minimal-odroid-xu3-change-mac.img.xz" ?
With 18.04 (microSD) booted up everything works (network up, SSH works with creds: root/odroid), so this is not a HW, cabling, switch, other network or DHCP problem.
BR
Olli

ohollmen
Posts: 4
Joined: Fri Jul 24, 2020 12:14 pm
languages_spoken: english
ODROIDs: U3,XU4,HC1,N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Multiple HC1s have same MAC address

Post by ohollmen »

While you are formulating the answer, let me ask what the boot-up time behavior of network interface (eth0) *should* be:
- Not come up at all (does not seem likely)
- Use DHCP request to local network
- Use static hard-wired address. What would this address be ?
I probably expected DHCP (second bullet) and I'm using following to detect Odroid in local network: nmap -sn 192.168.1.0/24 .
I recall 18.04 used DHCP and with one device in network (and no MAC overlaps) I never had a problem detecting it with nmap and logging in with SSH.
BR
Olli

mad_ady
Posts: 8331
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 574 times
Been thanked: 438 times
Contact:

Re: Multiple HC1s have same MAC address

Post by mad_ady »

In the mean time, here's an idea you can try on 16.04 without network. Add your commands to /etc/rc.local (make it executable) and add a sleep 150 before them, for good measure. Log stdout and stderr to a file so you can analyze it after you run it.
These users thanked the author mad_ady for the post (total 2):
tobetter (Sat Jul 25, 2020 2:49 pm) • odroid (Mon Jul 27, 2020 11:42 am)

ohollmen
Posts: 4
Joined: Fri Jul 24, 2020 12:14 pm
languages_spoken: english
ODROIDs: U3,XU4,HC1,N2
Has thanked: 0
Been thanked: 0
Contact:

Re: Multiple HC1s have same MAC address

Post by ohollmen »

Thanks for this radical and resourceful suggestion. Added following to /etc/rc.local:

Code: Select all

cd /root/efuse
./efuse.sh > /root/efuse.output.txt 2>&1
After booting and removing card the /root/efuse.output.txt shows:

Code: Select all

SIOCSIFHWADDR: Device or resource busy

*************************************************************************
*   RTUNicPG  - EFUSE/EEPROM/FLASH Programming Utility for 
*         RTL8152/RTL8153 Family USB FE/GBE Network Adapter 
*   Version : v1.0.20.9 
* Copyright (C) Realtek Semiconductor Corp. 2015. All Rights Reserved.
*************************************************************************
 - RTL8153VB - 00 00 01


Current select card #0
This is RTL8153VB
#0  Flash Manufacturer : 
#0 Unknown Manufacturer
EEPROM does not exist!!!
--- Program Efuse --- 
EFuse Write Count = 1
Num Of Chaged Item = 0x1
Program 4 Bytes to EFuse.
---Clear conflict parameter in Efuse---
---Write Cfg file to EFuse---
 Write NODEID to EFuse
RTUNicPG : (CFG MAC) 00 1E 06 36 DD AE 
RTUNicPG : 0x962eb, 0xbe9ceb74, 4

RTUNicPG :  20 C0 05 AE 00 00
RTUNicPG :  20 C0 05 AE 00 00
RTUNicPG : lastEndByte = 34, lastMatchByte = 30 
RTUNicPG : Index = 1, StartIndex = 5 
RTUNicPG : (NIC MAC) AE 
NODEID = 00 1E 06 36 DD AE
EFUSE_LED_SEL_CFG = A9 7C
SN = 00 00 01
EFuse PG Version(CFG Version) = V1.20(1.007) 
EFuse Remain 134 Bytes!!!
EFuse Write Count = 2
Update Efuse/Eeprom CFG file...
PG EFuse is Successful!!!
And booting up the 18.04 Shows the MAC address changed - great !
Haven't done much normal usage / testing to see if everything (about networking) is okay, but it's looking good.
Please let me know if you see anything worrisome in the output.
BR
Olli

mad_ady
Posts: 8331
Joined: Wed Jul 15, 2015 5:00 pm
languages_spoken: english
ODROIDs: XU4, C1+, C2, C4, N1, N2, H2, Go, Go Advance
Location: Bucharest, Romania
Has thanked: 574 times
Been thanked: 438 times
Contact:

Re: Multiple HC1s have same MAC address

Post by mad_ady »

Looks ok to me.

Post Reply

Return to “Issues”

Who is online

Users browsing this forum: No registered users and 1 guest