I investigated further and it seems that libgphoto2 <= 2.5.23 suffer from a bug for Nikon camera preventing to capture images longer than 5s, this is fixed on 2.524 (
www.gphoto.org/news/
). I then compiled from source the newest version of libgphoto2 and uninstalled the old one (without breaking the deps) and now the capure of a 30s shot seems to work fine.