micropython
micropython copied to clipboard
cellular.call answer not implemented
There is no way to answer an incoming call.
I think it is easy enough to be implemented by someone else.
- Go to micropython docs and familiarize yourself with module layout.
- 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
- Copy-paste the function. Remove the body and rename all
modcellular_get_imsi
intomodcellular_answer
(I suggest to name this functioncellular.answer
). - In the function body just run
Call_Answer
as described in API docs. - Raise a
CellularError
if it returns False. Otherwise just returnNone
. - 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
- Build, flash and test whether it works on your module.
- Add function description to port
README.md
.
Total changes are around 10 lines in a single file.
Looks like something I should be able to do. Thanks.
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?
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