The PIN next to RX on ESP12 (and ESP07) modules is GPIO5. The library is correct on the ESP-12E, but on ESP12, ESP12-SMD and ESP07-16PIN GPIO4 and GPIO5 swapped!
Actually this is a quite common/stupid error, because there exist lots of modules with also wrong silkscreen.
The PIN next to RX on ESP12 (and ESP07) modules is GPIO5. The library is correct on the ESP-12E, but on ESP12, ESP12-SMD and ESP07-16PIN GPIO4 and GPIO5 swapped!
Actually this is a quite common/stupid error, because there exist lots of modules with also wrong silkscreen.
See http://www.esp8266.com/viewtopic.php?f=13&t=1370