#!/bin/bash
echo -e "\nGetting ESP Chip Info...\n"
# echo -e "Base MAC Address:"
# esptool.py --port $ESPPORT --baud $ESPBAUD --chip auto read_mac
echo -e "\nChip ID:"
esptool --port $ESPPORT --baud $ESPBAUD --chip auto chip-id

echo -e "\nFlash ID:"
esptool --port $ESPPORT --baud $ESPBAUD --chip auto flash-id

echo -e "\nFlash Status:"
esptool --port $ESPPORT --baud $ESPBAUD --chip auto read-flash-status

echo -e "\nSecurity Info:"
esptool --port $ESPPORT --baud $ESPBAUD --chip auto get-security-info

if [ -f "./CMakeLists.txt" ]; then
	echo -e "\nEfuse Table:"
	idf.py --preview --port $ESPPORT --baud $ESPBAUD efuse-dump
fi

echo -e "\nAll donsies~ :3\n"
