1

As many of other I am facing the google glass overheating issue. My question is how to detect it in the application?

I was looking through the log but nothing that indicates it expect a message on the screen.

Califlower
  • 467
  • 4
  • 15
  • A Linux kernel usually puts some CPU state information in /proc so you might take a look there for anything relevant. – Chris Stratton Jan 20 '15 at 19:02
  • oki, I found two files where supposively temperature should be stored. But the values there are a wierd. One is showing 240 another 2453219 7578755432128. Even in F 240 is high! – Califlower Jan 20 '15 at 19:44
  • There is indeed no guarantee they are meaningful, but you could shut the device down for an hour and then plot readings for a few minutes after restart, or examine the kernel sources and see where they come from. – Chris Stratton Jan 20 '15 at 19:53
  • can you add the information of these files to the question? I left my glass at home but would also like to try this out. – petey Jan 20 '15 at 19:55
  • 1
    I adb shell into glass and then cat /sys/devices/platform/omap_i2c.1/i2c-1/1-0055/power_supply/bq27520-0/temp as I wrote the value is increasing, but does not make sense. It cant be 24.0 because glass is hot on the outside but it cant be 200 F because that would burn :) – Califlower Jan 20 '15 at 20:06
  • @ChrisStratton thanks again, checked out in kerned docs and it supposed to be in 10 of celcius which makes the temperature 24 degrees. However it does feel more. While feel is obscure measurement it's hotter than my head :) – Califlower Jan 20 '15 at 20:52
  • This may be a valid temperature, but of something a distance from the CPU. Is there anything for the CPU itself? – Chris Stratton Jan 20 '15 at 20:57
  • @ChrisStratton it seems so, digging through the system files gave no more usefull info. It may well be battery temperature, but seem like 31 C (I assume) is a dead point for Glass. Doesn't it seem to low? – Califlower Jan 21 '15 at 02:02

1 Answers1

4

Google Glass have (at least) two temperature probes.
One for the battery, and the other for the CPU board.
You can read them as a regular file.

Battery
/sys/devices/platform/omap_i2c.1/i2c-1/1-0055/power_supply/bq27520-0/temp

CPU Board
/sys/devices/platform/notle_pcb_sensor.0/temperature

But keep in mind that these files may change location as new versions of Google Glass are shipped.

The code (simplified version)

private String readTemperature(String path) throws IOException {
    return new BufferedReader(new InputStreamReader(new FileInputStream(new File(path)))).readLine();
}

Interpretation

The values you'll get from these files are in different units.
The CPU Board temperature must be divided by 1000 to get the temperature in °C.
The battery temperature must be divided by 10 to get the temperature in °C.

Logcat

The logcat also gives you the temperatures every minutes or so in a one line log.
You could even parse it:

I/UserEventService(568): [GlassUserEventPerformanceStats ... battery_temperature_milli_centigrade: 34000 board_temperature_milli_centigrade: 44000 ]

Values

From what I've experience, values of the CPU board can go from 25°C to 70°C.
If you go above 70°C, you app or any active app is likely to be killed by the system and you'll see the message "Glass must cool down to run smoothly".

Simon Marquis
  • 7,248
  • 1
  • 28
  • 43