I've noticed that the
DeviceConfigure["GPIO", 4 -> "Output"]
DeviceWrite["GPIO",4 -> 1]
does nothing being executed from the remote kernel of Mathematica.
When I write just
DeviceWrite["GPIO",4 -> 1]
from the command line, it works and the LED on GPIO4 pin turns on.
It's also interesting that the
DeviceConfigure["GPIO", 4 -> "Input"]
DeviceRead["GPIO",4]
works fine from the remote kernel and reads the real logical state of the pin.
You can even set "1" at GPIO4 from the console and read this "1" from the remote kernel (the fact that the pin has been configured as input from the remote kernel ignores at the console).
--- UPD ---
I've just executed
DeviceConfigure["GPIO", 4 -> "Input"]
from the console and it worked for the remote kernel (I can't write at GPIO4 anymore). Then I did
DeviceConfigure["GPIO", 4 -> "Output"]
DeviceWrite["GPIO",4 -> 1]
again from the remote notebook and the LED turned on!!!
I really don't understand how everything started to work, but it works now.
Maybe DeviceConfigure[] works unstable being executed from the remote.