piSerial fails with getSerNum() -1

Topics about the Software of Revolution Pi
Post Reply
jenskastensson
Posts: 40
Joined: 27 Feb 2018, 15:47

piSerial fails with getSerNum() -1

Post by jenskastensson »

Hi,

how can I troubleshoot this issue:

1. flash a device with a new image
2. piSerial -s returns "getSerNum failed -1"

I dont have the original image so I cannot reverse.
Kindly
Jens
User avatar
lukas
Expert
Posts: 186
Joined: 13 Feb 2017, 10:29

Re: piSerial fails with getSerNum() -1

Post by lukas »

Usually this happens because the crypto chip on the i2c-1 bus is inaccessible.

Is this on a RevPi Core or Connect?
Are you using the original RevPi image?
Could you doublecheck if /boot/config.txt contains the line "dtoverlay=i2c1-bcm2708,sda1_pin=44,scl1_pin=45,pin_func=6"?
If you type "i2cdetect -l", is the i2c-1 bus listed?
If you type "i2cdetect 1", are devices 51 and 60 found on the bus?
If you invoke "piSerial" on the command line, do you get the error message as well?

Note: You can get past the factory reset on first login by pressing Ctrl+C (in order to enter the above-mentioned commands).
jenskastensson
Posts: 40
Joined: 27 Feb 2018, 15:47

Re: piSerial fails with getSerNum() -1

Post by jenskastensson »

After flashing the RevPi Core device (using an image file that has been confirmed good with 20 other devices) two devices fails.
The /boot/config.txt is empty.
The output from the commands, see screenshot:
Image

Please advise,
Jens
User avatar
dirk
KUNBUS
Posts: 2174
Joined: 15 Dec 2016, 13:19

Re: piSerial fails with getSerNum() -1

Post by dirk »

Hi Jens,
first of all it is suspicious that only some of the flashed devices have an empty /boot/config.txt . This empty file leadas to the missing I2C device nodes on the system.
The empty file may be the result of an immediate powercycle after the script revpi-factory-reset tries to write the MAC address to this file.
(The script revpi-factory-reset is automatically called after the first login on a fresh system and writes the MAC and the default password.)
Then the filesystem driver is unable to flush the changes.
So you could try to write the image again or you can just copy the /boot/config.txt from another device and adapt the MAC address accordingly.
Post Reply