We thought we had to arrange all visa in advance, but this seems to be more work (require more papers) than doing this on our way.

Per country:

Iran: Request in Istanbul, pick up in Ankara
Uzbekistan: Arrange in Ankara (need letter of invitation)
Turkmenistan: Arrange in Mashad (Iran, before border with Turkmenistan)
Tajikistan: Buy at border
Kyrgyzstan: Buy at border
China: Arrange in Tashkent (Uzbekistan)