• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomepcDuinoLinux ApplicationsHow to check CPU Serial Number of pcDuino1/2/3
Previous Next

How to check CPU Serial Number of pcDuino1/2/3

Posted by: admin , August 12, 2014

In cases, we would like to track down the pcDuino in the field. This can be achieved by check the CPU serial number of pcDuino. In this post, we show how to check the CPU serial number information.

 

We can get CPU ID by loading cpu_id.ko (this is built for pcDuino 2).   The following are the commands we typed at the terminal of pcDuino:

 

$ sudo insmod cpu_id.ko
$ cat /proc/cpu_id
VER:C
ID:165166c380485370515248480301dc8b

 

cpu_info

 

 

The source code can be found at:  https://github.com/pcduino/modules/tree/master/sun4i-cpu-id

 

The ko file for pcDuino3 can be downloaded here.

 
To buiild the ko file for pcDuino3, we need to first install the dependency software package:

$sudo apt-get install pcduino-linux-headers-3.4.79+

Then we need to change the kernel location in Makefile to 3.4.79+, and comment out:

/*
case MAGIC_VER_A:
ver=’A’;
break;
case MAGIC_VER_B:
ver=’B’;
break;
case MAGIC_VER_C:
ver=’C’;
break;
*/

in file cpu_id.c.

 

 

 

 

Tags: Linux Applications

Share!
Tweet

admin

About the author

One Response to “How to check CPU Serial Number of pcDuino1/2/3”

  1. Log in to Reply
    Mark Holler
    October 23, 2014 at 9:48 am

    I tried to use this on a pcDuino3-Nano and got an invalid module format when running insmod. I then tried to recompile the source provided but, couldn’t find the module.h file required anywhere on the Nano. Where can I get a cpu_id.ko module or the proper module.h file to recompile the code for the pcDuino3-Nano?

    I want to use the serial number to label data sent from the Nano.
    Thanks

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors