When the defendant is brought before a magistrate upon arrest, either with or without a warrant, on a charge of having committed a public offense, the magistrate shall immediately inform the defendant of the offense with which the defendant is charged, and of the defendant's right to aid of counsel in every stage of the proceedings.
T.C.A. § 40-10-101