- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在运行AT命令AT+KCELL获取单元格信息,除其他外,它返回一个 PLMN
( Public Land and Mobile Network ) - 文档中对此的描述是:
PLMN identifiers (3 bytes), made of MCC (Mobile Country Code), and MNC (Mobile Network Code).
好的,这符合维基百科的说法 - 其中有 MCC 和 MNC。现在我不明白的是如何提取上述 MCC 和 MNC 值?
这是一个例子。我回来了:
32f210
有人告诉我(尽管我对此持怀疑态度)这应该会导致:
MNC: 1
MCC: 232
但我一生都无法弄清楚如何从 PLMN 获取结果,那么我该如何解析它?
最佳答案
好吧,我已经发现了这一点,并想我会在这里添加一个答案,以防有其他不幸的灵魂必须这样做 - PDF 名为 GSM Technical Specification (第10.2.4节)包含答案,相关位是:
PLMN Contents: Mobile Country Code (MCC) followed by the Mobile Network Code (MNC). Coding: according to TS GSM 04.08 [14].
- If storage for fewer than the maximum possible number n is required, the excess bytes shall be set to 'FF'. For instance, using 246 for the MCC and 81 for the MNC and if this is the first and only PLMN, the contents reads as follows: Bytes 1-3: '42' 'F6' '18' Bytes 4-6: 'FF' 'FF' 'FF' etc.
所以我的怀疑是错误的!
我需要从左侧读取,交换数字,因此前两个字节将是MCC,因此将是232f
,MNC将是01
,然后我只要丢弃 f,我就有 232 和 1!很高兴其中一个已排序。
例如,在 C# 中,您可以这样做:
string plmn = "whatever the plmn is";
string mcc = new string(plmn.Substring(0, 2).Reverse().ToArray())
+ new string(plmn.Substring(2, 2).Reverse().ToArray())
.Replace('f', ' ')
.Trim();
string mnc = new string(plmn.Substring(4, 2).Reverse().ToArray())
.Replace('f', ' ')
.Trim();
关于gsm - 如何从 PLMN 中提取 MCC 和 MNC?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10345379/
我想使用 GSM 调制解调器对电话号码进行语音调用,播放录制的消息,等待按下数字然后断开调用。系统需要知道线路是否占线、用户是否应答以及用户按下了哪个数字(如果有)。如果在 30 秒内没有按下任何内容
我想以 PDU 模式发送短信。我已经检查了我的调制解调器的规范,它支持 PDU 模式。 我已经开发了 PDU 编码器和解码器,但现在我不知道如何将数据发送到我的调制解调器。我尝试了这些 AT 命令:
我正在使用 SIM9000A GSM 调制解调器并将其连接到我的 PC。 问题是,每当我的 SIM 卡收到短信时,我都会在 PC 中收到以下数据: +CMTI: "SM",8 我希望所有传入的短信都应
我是 NodeMCU 的新用户,我想让它与 SIM900 等 GSM 模块通信。我可以使用ESP8266的第二个UART端子与GSM模块连接吗? 谢谢。 最佳答案 我写了一个教程:http://atc
我正在寻找 GSM-MAP 和 INAP 协议(protocol)的 ASN.1 文件。我尝试在 3gpp.org 中搜索但找不到。 任何帮助将不胜感激。 最佳答案 GSM MAP操作在29.002中
我正在开发一个 Android 应用程序项目,该项目需要为运行该应用程序的每台设备激活。在 Windows PC 上,我知道一些解决方案,例如使用 HDD 的序列号作为激活过程的唯一标识符。 但是我需
我有个问题。我想为橙派零加2等小型机购买GSM/GPS/3G模块,所以不能是Raspberry Pi GSM Hat .我真的找到了good module ,但我不确定某些事情。也许你可以帮助我。 第
是否可以禁用 GSM 调用、SMS、MMS 并保持 GSM 调制解调器启用?我想在没有除调制解调器之外的所有服务的情况下使用我的 iPhone。谢谢你的回答! 最佳答案 不,这是不可能的,作为开发人员
使用 AT 命令可以完成哪些任务?是否可以获得手机的当前状态、制造商以及与手机相关的其他一些详细信息? 最佳答案 我找到了你的答案 GSM module文章。 获取有关移动电话或 GSM/GPRS 调
各位 我有两个原型(prototype)(比如原型(prototype) A 和 B )。两种原型(prototype)机都使用 Telit GSM 调制解调器。我使用通用 SIM 卡来与它们一起使用
情况: 在基于 GSM 的调制解调器上,您使用 ATDxxxxxxxxx 开始语音通话; 某些调制解调器在远程端应答时发出“CONNECT”,或者其他调制解调器在诊断端口上返回“^CONN: 1, 0
GSM 有端到端的语音加密吗? 如果不是,是手机和手机之间的语音通信吗? 移动基站,至少加密? 那里使用了哪些键以及哪些算法?任何的想法? 最佳答案 Is there end-to-end voice
我知道一条 USSD 消息由 160 个字节组成。对于 7 位数据编码方案,最大字符数为 160*8/7,即 182 个字符。我不清楚 UCS2 编码的最大字符数是多少。通常,它会类似于 160/2,
我有一个中兴通讯制造的 GSM 调制解调器。我想开发一个应用程序来通过此设备发送短信。问题是我无法连接到 COM 端口。我在设备管理器中只能看到 COM22 上的 HSPADataCard 诊断接口(
我有一个 arduino GSM 扩展板,位于 arduino uno 之上。我有下面的代码。屏蔽仅显示它正在连接,但从未显示它已连接。我想知道为什么它没有连接。我将不胜感激任何帮助。我正在使用 ar
我有一个设备可以向我发送它的位置。它通常发送从 GPS 获得的坐标,但如果 GPS 信号不好,它会进行 GSM 三角测量并向我发送 MCC、MNC、LAC 和 CELLID 值。 有了这4个值,我需要
我正在开发一个 C++ 程序,用于录制音频并将其压缩到 GSM。我能够录制音频并将原始数据写入文件。但我无法让 GSM 压缩工作。我正在尝试使用我在这个网站上找到的源代码进行压缩 ftp://ftp.
我有 2 个 GSM 调制解调器,K3772-Z 的字符集为 8859-1,工作正常。 但对于我的其他 GSM 调制解调器,它是 ZTE K3565-Z,它无法正常工作,它一直返回“设置字符集失败”
我想使用 GSM 调制解调器从一个号码向另一个带有号码的 GSM 调制解调器进行语音调用。这可能吗?我可以使用什么软件? 最佳答案 是的,假设您只想发起和接收语音调用,这是可能的。您将无法使用软件处理
我刚刚连接了一个 A6 GSM 模块并编写了一个代码,通过以 9600 波特率连接的串口监视器与其交互。但是字符“?”只是不停地来,没有别的工作。 这是我的代码: #include SoftwareS
我是一名优秀的程序员,十分优秀!