atcop_test: Make example actually work
The reason it wasn't working so far is that the baseband firmware appears have a compile-time white-list of AT commands for which the AT command forwarding is permitted. Any other commands are rejected with error 48 (invalid argument) :/
This commit is contained in:
parent
cdc4f97ab5
commit
dd4a64b881
|
@ -15,11 +15,15 @@ static void at_command_cb(int user_handle, qmi_service_id_type service_id,
|
||||||
printf("at_command_cb()\n");
|
printf("at_command_cb()\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* here we can register forwarding for certain AT commands. Qualcomm
|
||||||
|
* default sems to be +CLVL, +CKPD, +CMUT, +CTSA, +CBKLT, +CFUN, +CDIS,
|
||||||
|
* +CRSL, +CMAR, +CSO, +CSS, +CBC, $QCPWRDN - this may bee extended by
|
||||||
|
* vendor-specific commands, such as +QFOTADL in the quectel case */
|
||||||
static qmi_atcop_at_cmd_fwd_req_type at_cmd_fw_tbl[] = {
|
static qmi_atcop_at_cmd_fwd_req_type at_cmd_fw_tbl[] = {
|
||||||
{
|
{
|
||||||
.num_of_cmds = 1,
|
.num_of_cmds = 1,
|
||||||
.qmi_atcop_at_cmd_fwd_req_type = {
|
.qmi_atcop_at_cmd_fwd_req_type = {
|
||||||
{ QMI_ATCOP_AT_CMD_NOT_ABORTABLE, "+SYSMO" },
|
{ QMI_ATCOP_AT_CMD_NOT_ABORTABLE, "+QFOTADL" },
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
@ -106,5 +110,8 @@ int main(int argc, char **argv)
|
||||||
|
|
||||||
printf("Initialization done\n");
|
printf("Initialization done\n");
|
||||||
|
|
||||||
|
while (1) {
|
||||||
|
}
|
||||||
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue