I discovered the root cause of the problem. The subid number is generate from iccid of simcard. Android gets it calling AT+CRSM=176,12258,0,0,15. In my case the problem is exactly this command, because modem doesn't accept P3 parameter as 15, the correct is 10 (AT+CRSM=176,12258,0,0,10). The solution in my case was change the P3 parameter inside reference-ril, when command is 12258. See below. Now Android can get iccid and subId, phoneId and slotId are correct and I can see the modem signal. Now I'm implementing the gsm0710muxd to get two channels, because Android needs one for command and another for data.
Inside this function: void requestSIM_IO(void *data, size_t datalen __unused, RIL_Token t)
Add:
if (modemModel & MDM_GL865){ // SEVA
if (p_args->fileid == 0x2FE2) {
if (p_args->command == 0xb0) {
p_args->p3=10; //Change P3 from 15 to 10
}
}
}