(TECH) call and sms broken in lua and create kit s/w

Moderators: lily.li, violet, jessie, chao.zhang

Post Reply
craig_comstock
Pre-kindergarten
Pre-kindergarten
Posts: 6
Joined: Mon Nov 09, 2015 8:34 pm

(TECH) call and sms broken in lua and create kit s/w

Post by craig_comstock » Tue May 17, 2016 11:29 am

I am working on lua at

https://github.com/craigcomstock/Lua_fo ... ree/shelli

as well as have tried the built distribution from the wiki as well as a build from

https://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: Select all

> print(gsm.cell_info())
261464      159     229     61464   58783   61464   58783
> print(gsm.sim_info())
1

Code: Select all

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:

Code: Select all

  vm_gsm_tel_set_output_device(VM_GSM_TEL_DEVICE_LOUDSPK); // VM_GSM_TEL_DEVICE
  vm_gsm_tel_set_volume(VM_AUDIO_VOLUME_6);
Last edited by craig_comstock on Tue May 17, 2016 10:39 pm, edited 1 time in total.

craig_comstock
Pre-kindergarten
Pre-kindergarten
Posts: 6
Joined: Mon Nov 09, 2015 8:34 pm

Re: (TECH) lua can't call or send sms

Post by craig_comstock » Tue May 17, 2016 10:37 pm

I built the RePhone Create Kit from https://github.com/WayenWeng/RePhone_Cr ... urce_Code/ and installed it. I tested some IFTT to play mp3 files, so I think the speaker works fine. I don't remember if there is an icon on the display for cell signal, but if there was it is not there for me. I tried to make a call, the UI says "calling" for a while then just pops back to the main screen. So maybe this is a firmware issue (i.e. not the built .vxp files but the flashed firmware that provides the vm_* APIs).???

I checked and the antenna is certainly attached. This did work for me before a long time ago but not sure exactly the situation when it worked. Real bummer since I was going to show this off at a linux fest this weekend! :p

http://www.kansaslinuxfest.us/
http://kansaslinuxfest.org/craig-comstock/

Cheers and I'll keep digging to try and figure it out.

nguyen_duyky
Pre-kindergarten
Pre-kindergarten
Posts: 4
Joined: Sun Mar 31, 2019 11:14 am

Re: (TECH) call and sms broken in lua and create kit s/w

Post by nguyen_duyky » Sat Jun 29, 2019 5:35 pm

I think your assembly process is not accurate. You can watch this video:
https://www.youtube.com/watch?v=qr7KfNbbDtQ
Have you set the highest audio volume?
Have you set a MP3 ringtone for your rephone?

Post Reply