Change the MAC address

1jafarpour

n3wb
Joined
Oct 25, 2019
Messages
15
Reaction score
1
Location
iran
I had an IP camera that wouldn't boot.Company name for this camera tvt. I got a camera with the same model. I copye ic flash camera flash using the programmer. I copied it to ic flash defective camera
Camera repaired, But a new problem arose :oops: I have 2 cameras with one MAC address, Unable to use the network at the same time, I put the flash program in the file and send it.
I'm using the app "Hex Workshop Hex Editor" I opened the read file And I found the MAC address.But once the Mac address camera is changed, it won't boot.

:facepalm:Please help me:facepalm:
 

Attachments

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,929
Reaction score
6,777
Location
Scotland
But once the Mac address camera is changed, it won't boot.
The MAC address is in the file MACFile.txt which is in a JFFS2 filesystem.
By making a change independent of the JFFS2 driver, there will be an invalid JFFS2 CRC.
But normally that should not be fatal.

Suggestion:
Using the working camera, see if telnet is available.
If so, log in as test/test1234 (not sure what the root password is) and see if you can find and edit the MACfile.txt file.
The file should be found like here :
Code:
if [ -f /mnt/cfg/ext/MACFile.txt ]; then
        echo "mac exist"
        MAC=$(cat /mnt/cfg/ext/MACFile.txt)
        echo $MAC
        ifconfig eth0 hw ether $MAC
else
        ifconfig eth0 hw ether 00:84:24:43:0F:69
        echo "00:84:24:43:0F:69" > /mnt/cfg/ext/MACFile.txt
fi
 

1jafarpour

n3wb
Joined
Oct 25, 2019
Messages
15
Reaction score
1
Location
iran
Thank you
But how do I connect to a camera through telnet, What instructions should I use to get the MAC address after I connect?
Could you please explain completely
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,929
Reaction score
6,777
Location
Scotland
But how do I connect to a camera through telnet
You need a telnet client.
Either enable one in Windows - Control panel | Programs and Features | Turn Windows features on or off (or similar)
Or download the very good PuTTY - Download PuTTY: latest release (0.73)

Then point the telnet client at the IP address of the camera.
If you are lucky - you will get a login prompt.
I don't know how much access test/test1234 will have, it's a user as opposed to root. But you should get a shell.

Then something like (from the script quoted above) :
To see the existing setting-
cat /mnt/cfg/ext/MACFile.txt

To change the setting (modify the MAC address to suit, or just leave as below) -
echo "00:84:24:43:0F:69" > /mnt/cfg/ext/MACFile.txt

Then power cycle the camera.
Good luck!
 

1jafarpour

n3wb
Joined
Oct 25, 2019
Messages
15
Reaction score
1
Location
iran
Unable to change MAC address via telnet because the port is closed by the company.
tanks a lot
 

1jafarpour

n3wb
Joined
Oct 25, 2019
Messages
15
Reaction score
1
Location
iran
I sent the camera flash file It is possible to change the MAC address in the flash file.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,929
Reaction score
6,777
Location
Scotland
No that is close by company TVT.
Looking at the firmware flash file you attached - it looks like telnet may be active but listening on a non-standard port :
Code:
telnetd -p 28
So you'd need to specify port 28, for example:
telnet <camera_IP_address> 28
Or use PuTTY and configure port 28.

I sent the camera flash file It is possible to change the MAC address in the flash file.
You said that you did that and the camera would not boot any more.
 

1jafarpour

n3wb
Joined
Oct 25, 2019
Messages
15
Reaction score
1
Location
iran
Looking at the firmware flash file you attached - it looks like telnet may be active but listening on a non-standard port :
Code:
telnetd -p 28
So you'd need to specify port 28, for example:
telnet <camera_IP_address> 28
Or use PuTTY and configure port 28.


You said that you did that and the camera would not boot any more.
yes I do,
But I couldn't find the crc code and change it
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,929
Reaction score
6,777
Location
Scotland
Did you manage to get a telnet session on port 28 ?
That may give you the ability to directly change the file that defines the MAC address, without hacking the flash file.
There would be no CRC errors resulting from that.

If that works, then re-applying the unchanged flash dump on the camera that stopped booting should bring it back to life.
And you'd no longer have duplicate MAC addresses, all would be good.
 

1jafarpour

n3wb
Joined
Oct 25, 2019
Messages
15
Reaction score
1
Location
iran
Did you manage to get a telnet session on port 28 ?
That may give you the ability to directly change the file that defines the MAC address, without hacking the flash file.
There would be no CRC errors resulting from that.

If that works, then re-applying the unchanged flash dump on the camera that stopped booting should bring it back to life.
And you'd no longer have duplicate MAC addresses, all would be good.
 

Attachments

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,929
Reaction score
6,777
Location
Scotland
You need to use port 28, as shown in my suggestion above.
You screenshot is showing the standard port 23.
telnet 192.168.9.9 28
Where do you see a ':' between the IP address and the port in the telnet command?
There must not be one.
Read the command above again.
You need to get the command correct, as I have specified.
 

alastairstevenson

Staff member
Joined
Oct 28, 2014
Messages
15,929
Reaction score
6,777
Location
Scotland
What you have done now is correct.
But it seems that telnet is not active on port 28.
That is a pity. And a bit odd as the startup script does activate it.
 

1jafarpour

n3wb
Joined
Oct 25, 2019
Messages
15
Reaction score
1
Location
iran
According to your own experience
How to change the MAC address via flash memory
How to find Mac address in flash memory؟
So that it does not change CRC and checksum؟
 
Top