Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

machine Module UART how to end connection ? ( GSM USSD work around attempt ) #333

Open
TravisDuck999 opened this issue May 7, 2021 · 0 comments

Comments

@TravisDuck999
Copy link

Hi.

I am trying to get around the limitation of the GSM Lib by connecting to a GSM module with UART and then finding the remaining Airtime with USSD.
( currently the GSM lib does not give the correct USSD response back, it only give s the first "ok" back.
Then going back to the GSM libaray functions.

So I can get the USSD response with the manual connection through UART but when I try dissconnect from it using : uart.deinit()

I get :

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ValueError: Cannot stop UART task!

Then I run uart.deinit() again and it seems happy.

But when I then try to connect to the GSM module with gsm.start() I get the error :
E (958736) uart: UART driver already installed

I think it is becuase I am not cleanly breaking away from the UART connection.

Any ideas how I can do that better ?

Of course this is just a work around the real goal would be to fix the USSD function in the GSM lib.

If I could get to the source code of the GSM modual I would love to have a look at it and see if I can make a very simple delay to return the full serial response if we just make the function wait a few seconds for a longer reply, say greater than 20 chars ?

I just have no idea where to find that or how I even go about compling it into a new MicroPythoin environment.

Please let me know if I can help with this at all.

Great project by the way, I am really loving it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant