T
T
TheSuperZhora2019-12-29 00:58:08
Python
TheSuperZhora, 2019-12-29 00:58:08

How to read incoming sms message python via modem?

I have a Huawei e1550 modem with sim card and rasberrypi. I need to make sure that if a message arrives on the SIM card, then the function is executed. I tried to do it through the gsmmodem library, but it throws an error TypeError: a bytes-like object is required, not 'str' and it does not fix in any way. and it's not about my code, since I took the code from the library's github. I also tried using pyserial, but it only displays the number from which the SMS came. Please help, I haven't been able to find a solution to this problem for a week now.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
L
Lev Zabudkin, 2019-12-29
@zabudkin

TypeError: a bytes-like object is required, not 'str'
-----
Well, process it as a string already.
How many bytes are left?
I'm probably the only one here who fumbles with TPU and controllers.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question