User avatar
SFX Group
Posts: 74
Joined: Thu Nov 01, 2012 3:54 am
Location: Cambridge, ON. Canada
Contact: Website

accessing the Serial Number???

Sat Nov 02, 2013 8:24 pm

Hi

Not sure if this is the correct forum, however...

I have a Raspbian build (running XFCE4 desktop), its working very well... what i need to do is access the serial number of the RPi board.

Heres what i would like, using a "wget" command to call a page (www.domain.com/pi?serialnumber) so the webserver the other end sees the serial number.

How would i do this? if its a tiny shell script to get it then that would be great...

Ideas please.
Many Thanks
Ashley

© Copyright 2015 - www.ashleygriffin.ca

User avatar
joan
Posts: 15247
Joined: Thu Jul 05, 2012 5:09 pm
Location: UK

Re: accessing the Serial Number???

Sat Nov 02, 2013 8:26 pm

cat /proc/cpuinfo|grep erial

User avatar
DeeJay
Posts: 2027
Joined: Tue Jan 01, 2013 9:33 pm
Location: East Midlands, UK

Re: accessing the Serial Number???

Sat Nov 02, 2013 10:40 pm

pimon.org can do this.
How To Ask Questions The Smart Way: http://www.catb.org/~esr/faqs/smart-questions.html
How to Report Bugs Effectively: http://www.chiark.greenend.org.uk/~sgtatham/bugs.html

User avatar
SFX Group
Posts: 74
Joined: Thu Nov 01, 2012 3:54 am
Location: Cambridge, ON. Canada
Contact: Website

Re: accessing the Serial Number???

Sat Nov 02, 2013 10:45 pm

Code: Select all

cat /proc/cpuinfo |grep Serial
works but I need to try and isolate the number now....
Many Thanks
Ashley

© Copyright 2015 - www.ashleygriffin.ca

User avatar
SFX Group
Posts: 74
Joined: Thu Nov 01, 2012 3:54 am
Location: Cambridge, ON. Canada
Contact: Website

SOLVED accessing the Serial Number???

Sun Nov 03, 2013 2:16 am

UPDATE

Using below code gives me just the serial number... (thanks everyone)

Code: Select all

cat /proc/cpuinfo |grep Serial|cut -d' ' -f2
Many Thanks
Ashley

© Copyright 2015 - www.ashleygriffin.ca

Return to “Raspberry Pi OS”