I am working on lua at
github.com/craigcomstock/Lua_fo … ree/shelli
as well as have tried the built distribution from the wiki as well as a build from
github.com/Seeed-Studio/Lua_for_RePhone
I can’t seem to get any of them to make or receive phone calls or make or receive SMS messages.
I added some diagnostics to get SIM info and CELL info and that looks “ok”. I also noticed that the return codes for call/text are 0 (status OK I think).
[code]> print(gsm.cell_info())
261464 159 229 61464 58783 61464 58783
print(gsm.sim_info())
1
[/code]
int gsm_cell_info(lua_State *L)
{
vm_gsm_cell_info_t *info;
// vm_gsm_cell_info_t *neighbor_info
// int num_neighbors;
vm_gsm_cell_get_current_cell_info(info);
lua_pushnumber(L,info->arfcn);
lua_pushnumber(L,info->bsic);
lua_pushnumber(L,info->rxlev);
lua_pushnumber(L,info->mcc);
lua_pushnumber(L,info->mnc);
lua_pushnumber(L,info->lac);
lua_pushnumber(L,info->ci);
// arfcn, bsic, rxlev, mcc, mnc, lac, ci
// vm_gsm_cell_get_neighbor_cell_info(neighbor_info,num_neighbors);
return 7;
}
int gsm_sim_info(lua_State *L)
{
VM_GSM_SIM_ID id = vm_gsm_sim_get_active_sim_card();
VM_GSM_SIM_STATUS status = vm_gsm_sim_get_card_status(id);
lua_pushnumber(L,status); // -1 ERROR, 0=VACANT, 1=WORKING
return 1;
}
For voice I also tried setting the output device and volume:
vm_gsm_tel_set_output_device(VM_GSM_TEL_DEVICE_LOUDSPK); // VM_GSM_TEL_DEVICE
vm_gsm_tel_set_volume(VM_AUDIO_VOLUME_6);