Android Stockfish communication works differently than on PC? How is number of threads to use written on Android versions of Stockfish? Whole communication works but somehow I still can't change number of threads. I even have working code for PC version of Stockfish where changing number of threads works.

This is what I do:

SendLine("setoption name Threads value " + threads.ToString());


And this is what I get as a reply from Stockfish...


  "Unknown command: setoption name Threads value 3"


When I send the same line with multiPV, Stockfish does everything as expected, sending desired number of PVs.

Is there something to consider when changing number of threads? Something that must be done prior to sending this command? Or is another command expected?

EDIT: I checked that when I "later" send meaningless line 'setoption name abc value true' it returns different text "No such option: abc". While the engine is silent when sending number of threads "later". So I expect it actually works after some time, so my question is, what must be done before sending command to change number of threads? As on the very initialisation it doesn't work for me.
I'm not sure what exactly happened, but looking through the source code, it appears your first token (setoption) is corrupted or not read properly.

Have you modified the code yourself? If so, please revert all your changes.
Please double and triple check the source code where you compile Stockfish.


  As on the very initialisation it doesn't work for me.


You don't need to initialise anything to make SF work. The common uci is absolutely useless (look in the source code to convince yourself). There is nothing you should need to do to initalize the engine.

I believe the problem was in how you compiled the engine. There's not enough information here for me to give you a complete answer.