Steps
1) Connect your TG01 with your wifi router and get the address
2) Open a terminal and lunch ./console
The command to watch GPIOs is "watch GPIOS
3)For the first time just run the followinf command to see what happens
watch GPIOS 1
Here you will see a lot of numbers and you will not understand a thing, it is normal.
Actually the LCD, usb,sd,wifi gpios are always running so these is a reason why you will always see the same numbers.
Haret provides a command which can block certain gpios.
ibit gpios
In the htc-linux.org Leo page . I found that we can block this gpios so we can start searching for others.
#lcd
ibit gpios 426 427 428 429 430 433
ibit gpios 448 449 450 451 452 456 457 458 459 460 461 462 463 464
# cam
ibit gpios 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271
# sd
ibit gpios 339 340 341 342 343 344
#wifi
ibit gpios 328 329 330 331 332 333
4) run the previous commands
5) Run
watch GPIOS 20
Still you will see that there are some gpios that are still printing all the way
6) Block them with the command
ibit gpios
7) And finally Run
watch GPIOS 20
And if you push the Camera buttton you will see that something with in1(23) that is you gpio for the camera button!
8) Run
watch GPIOS 20
And now can activate your Bluetooth too to see what happen!