pulkin / micropython

MicroPython implementation on Ai-Thinker GPRS module A9 (RDA8955)
https://micropython.org
MIT License
103 stars 30 forks source link

Probably wrong MNC code #68

Open bokolob opened 3 years ago

bokolob commented 3 years ago

I'm about this macros #define MNC(x) ((x)[0] 100 + (x)[1] 10 + (x)[2])

My network is Beeline and has code 99 (one of them) (it's enlisted here - https://www.mcc-mnc.com/ and on other web-sites) But cellular.get_network_status() returns (250, 990). I think the last term in the sum is excessive (correct me if I'm wrong)

ens4dz commented 2 years ago

yes my network also displayed wrong so I turned it to: #define MNC(x) ((x)[0] * 10 + (x)[1] )

note that if you using agps library you need to comment/remove this line : https://github.com/pulkin/mpy-agps/blob/6f8c7d7a17c54bc02e129a45e5f97b75d834106d/agps.py#L74