micropython icon indicating copy to clipboard operation
micropython copied to clipboard

cellular.call answer not implemented

Open ahmadmicro opened this issue 4 years ago • 4 comments

There is no way to answer an incoming call.

ahmadmicro avatar Mar 15 '20 08:03 ahmadmicro

I think it is easy enough to be implemented by someone else.

  1. Go to micropython docs and familiarize yourself with module layout.
  2. Go to modcellular.c and look at, for example, modcellular_get_imsi. Something similar has to be implemented here.

https://github.com/pulkin/micropython/blob/892cf5203f1c320afb802c5c5efe30917448a46a/ports/gprs_a9/modcellular.c#L834-L850

  1. Copy-paste the function. Remove the body and rename all modcellular_get_imsi into modcellular_answer (I suggest to name this function cellular.answer).
  2. In the function body just run Call_Answer as described in API docs.
  3. Raise a CellularError if it returns False. Otherwise just return None.
  4. Register the function as a part of cellular module by adding a new line in the dict in the basement.

https://github.com/pulkin/micropython/blob/892cf5203f1c320afb802c5c5efe30917448a46a/ports/gprs_a9/modcellular.c#L1211-L1255

  1. Build, flash and test whether it works on your module.
  2. Add function description to port README.md.

Total changes are around 10 lines in a single file.

pulkin avatar Mar 15 '20 14:03 pulkin

Looks like something I should be able to do. Thanks.

ahmadmicro avatar Mar 15 '20 22:03 ahmadmicro

Sorry for being a beginner. How can I build flash after making the nessesary changes using microsoft windows. I noticed that the Makefile having some refferance to csdtk42-linux. I tried to use make command on cmd but it didn`t work. can you help?

drhisham343 avatar Jul 09 '23 22:07 drhisham343

Sorry for being a beginner. How can I build flash after making the nessesary changes using microsoft windows. I noticed that the Makefile having some refferance to csdtk42-linux. I tried to use make command on cmd but it didn`t work. can you help?

just try with linux bro

camp-easy avatar Apr 04 '24 18:04 camp-easy