0
\$\begingroup\$

Assuming that we have an application which a lot of devices can connect and interact each other (like Internet of Things). Is there a way to identify the micro-controller that each connecting device contain inside? For example to identify if one device has a PIC or an Atmel or else? If not can at least identify if the micro-controller is 8bit vs 16bit or else?

edit: Can the firmware return the version of a microcontroller?

\$\endgroup\$
  • \$\begingroup\$ How much access do you have to this device? \$\endgroup\$ – Ignacio Vazquez-Abrams Nov 22 '14 at 23:16
  • 5
    \$\begingroup\$ You're approaching this with the assumption that these systems are running traditional operating systems. Many (most) microcontrollers are loaded with single-purpose firmware. No high level operating system. In that context, "root access" is meaningless. \$\endgroup\$ – Dan Laks Nov 22 '14 at 23:22
  • 2
    \$\begingroup\$ Right. That particular demand (know what it is) is basically impossible, although precise timing measurement will enable you to spot it running faster. However microcontrollers can have read protection on the firmware as a very effective anti reverse engineering method. \$\endgroup\$ – pjc50 Nov 22 '14 at 23:42
  • 2
    \$\begingroup\$ user29966, are YOU the one writing the firmware for all of these devices? It's not clear if you're the author or if you're trying to identify devices other people designed. I think people responding here are confused about this. \$\endgroup\$ – Dan Laks Nov 22 '14 at 23:42
  • 1
    \$\begingroup\$ @DanLaks I will write the firmware for my devices but it will be open for 3rd party devices to connect as well. \$\endgroup\$ – user29966 Nov 22 '14 at 23:47
2
\$\begingroup\$

This answer is written on the basic assumption that the OP is choosing the devices and writing the firmware him/herself. The OP indicates this to be true in the comment discussion below the question.

Yes, you can certainly include functionality that will identify the device in use. Most (if not all) microcontrollers will have read-only memory that contains a device ID and a silicon revision number. The microcontroller will probably have the ability to read its own memory location in firmware so that it can report those values upon request. How you implement that functionality is entirely up to you.

If you're trying to prevent thieves from porting your firmware into other chips, this method will not prove to be very effective. It will be trivial for them to report dummy identification values when requested to make their chip look like another.

\$\endgroup\$
4
\$\begingroup\$

If you're only looking at the network traffic, then no, different microcontrollers don't leave different "fingerprints" on the byte streams somehow.

How a device behaves on the network is a function of its firmware, not hardware. The hardware has to do the minimum things for the device to work, but the network stack above the MAC layer is going to be implemented in firmware on small and cheap devices.

There are standards for what the various layers in the protocol stack are supposed to do, so mostly different implementations will do the same thing. Still, there is some wiggle room, and different implementations will have different quirks while adhering to the standards. You might be able to identify some of these quirks and infer some implementation inside, but that won't be easy and will never be definative.

\$\endgroup\$
  • 1
    \$\begingroup\$ Can we check from the firmware which microcontroller (type) runs the firmware? Is there a call from the firmware that can return the version of the microcontroller? \$\endgroup\$ – user29966 Nov 22 '14 at 23:30
  • \$\begingroup\$ @user: First, I thought you were asking how to identify a microcontroller from the network traffic. If you have physical access, look at the label on the chip. From the network, there are no "calls". The concept makes no sense. Second, a device may return its firmware version information, but only if it was specifically programmed to do so. This would also be in a proprietary part of the protocol most likely. Standard protocols like TCP, IP, and ethernet don't have standard ways of inquiring the firmware or hardware versions. \$\endgroup\$ – Olin Lathrop Nov 22 '14 at 23:38
  • \$\begingroup\$ The firmware when try to connect in the network can reveal the microcontroller version? \$\endgroup\$ – user29966 Nov 22 '14 at 23:44
  • \$\begingroup\$ @user: Your questions are now going around in circles. Giving up. \$\endgroup\$ – Olin Lathrop Nov 23 '14 at 14:08
  • \$\begingroup\$ I don't like to give-up, some of the answers are pointed me to the right direction, i will search more and at the end I will succeed in my project. \$\endgroup\$ – user29966 Nov 23 '14 at 17:59
2
\$\begingroup\$

Your questions seems to be "I have an application (I'm assuming it's on a server or running in the web) how do I identify what is talking to my application?"

If you want a micro controller to report an ID or firmware version you need to code it to do that.

If you are thinking others will take your code, port and run on another micro then maybe they will. But only if your application is successful enough will people want to do this. Then you can't enforce any changes to the firmware version reporting or anything else.

An alternative is to write for all the versions of micro so no one else has to. Not practical IMHO as it's a lot of work.

Another is to use some serial number, encryption and individual pass code you only give to legitimate users. Not recommended as it's a pain in the a***. I have had this with software licenses.

Another way would be to release the source code and it contains comments to the coder to include the micro controller type. Here I would insert a table of codes telling them the codes to use. Or you could just tell them to fill in a string description and accept what ever they want. Limit it to 16 characters maybe.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.