Change the MAC address

1jafarpour

n3wb
Oct 25, 2019
15
1
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

  • 2ML.bin
    2ML.bin
    16 MB · Views: 94
  • mac.JPG
    mac.JPG
    431.2 KB · Views: 110
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
 
  • Like
Reactions: fenderman
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
 
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!
 
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.
 
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
 
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.
 
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

  • Capture.JPG
    Capture.JPG
    23.9 KB · Views: 64
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.
 
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.
 
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؟