Difference between revisions of "Template:Compute Module 4 PoE 4G Board manual"

From Waveshare Wiki
Jump to: navigation, search
Line 22: Line 22:
 
==4G/5G==
 
==4G/5G==
 
To work with 4G/5G, you need to connect a wireless module to the M.2 B KEY for featuring corresponding functions. M.2 B KEY only extends USB2.0 interfaces, it doesn't support PCIe devices.<br>
 
To work with 4G/5G, you need to connect a wireless module to the M.2 B KEY for featuring corresponding functions. M.2 B KEY only extends USB2.0 interfaces, it doesn't support PCIe devices.<br>
[[FILE:Compute Module 4 PoE 4G Board_3.png | 600px]]<br>
+
[[FILE:Compute Module 4 PoE 4G Board_3.png | 400px]]<br>
 
SIM card is required to work with the 4G/5G module<br>
 
SIM card is required to work with the 4G/5G module<br>
 
This carrier board supports the 4G module by default, if you use it with 5G modules, some of the 5G functions are not supported.<br>
 
This carrier board supports the 4G module by default, if you use it with 5G modules, some of the 5G functions are not supported.<br>
 
If you use a 5G module, please check the [[https://www.waveshare.com/wiki/SIM8200EA-M2_5G_HAT SIM8200EA-M2_5G HAT wiki]] about how to set up 5G.
 
If you use a 5G module, please check the [[https://www.waveshare.com/wiki/SIM8200EA-M2_5G_HAT SIM8200EA-M2_5G HAT wiki]] about how to set up 5G.
===4G===
+
 
 
If you need to toggle the working status of the 4G module, you can control the GPIO6(BCM), set the GPIO6 to High for disabling the 4G module and set it to Low for enabling.<br>
 
If you need to toggle the working status of the 4G module, you can control the GPIO6(BCM), set the GPIO6 to High for disabling the 4G module and set it to Low for enabling.<br>
 
To toggle the working status of the 4G module, please add delay time for waiting for the operation to work.<br>
 
To toggle the working status of the 4G module, please add delay time for waiting for the operation to work.<br>
<!--
+
===SIM7600 M.2 module===
M.2 status状态 红色LED 灯座 指示的就是4G 模组使能,红色灯亮起说明4G 模组已开机(5G模组不受使能管脚控制)
+
Status of M.2 indicators:
M.2 状态 绿色色LED 灯座 指示的就是4G 模组状态,绿色灯亮起说明4G 模组 开机完成,绿色闪烁说明模组已经成功联网
+
{|class="wikitable"
 +
!M.2_NET !! M.2_STA !!
 +
|-
 +
|Red LED || Green LED|| Status
 +
|-
 +
|Solid || OFF ||Power OFF
 +
|-
 +
|Solid || OFF ||Starting
 +
|-
 +
|Solid || Solid || SIM card is an invalid or weak signal
 +
|-
 +
|Solid || Blink || Working
 +
|-
 +
|OFF ||Blink/Solid||Shutdowning
 +
|}
  
在配置前,请确认 4G 模块已经开机, 4G 模块对应了两个4G的LED已经亮起或者闪烁说明已经开机<br>
+
Before you configure the SIM7600 module, please make sure that the module is started normally.
关机状态下两个LED全部是熄灭的<br>
+
两个LED长亮是没有SIM卡<br>
+
 
<pre>
 
<pre>
 
sudo apt-get install minicom
 
sudo apt-get install minicom
 
sudo minicom -D /dev/ttyUSB2
 
sudo minicom -D /dev/ttyUSB2
#输入以下指令:
+
</pre>
 +
Type the following command on the minicom<br />
 +
<pre>
 
AT+CUSBPIDSWITCH=9011,1,1
 
AT+CUSBPIDSWITCH=9011,1,1
#返回OK 即可
+
</pre>
#然后重启
+
Close the minicom and configure usb0<br />
sudo reboot
+
<pre>
#如果无法获取USB0网卡执行:
+
 
sudo dhclient -v usb0
 
sudo dhclient -v usb0
 
</pre>
 
</pre>
RNDIS拨号上网请参考:
 
[https://www.waveshare.net/wiki/%E6%A0%91%E8%8E%93%E6%B4%BERNDIS%E6%8B%A8%E5%8F%B7%E4%B8%8A%E7%BD%91 RNDIS拨号上网]
 
  
正常执行上面之后会识别到USB0网卡(如果你没有连接其他USB网卡)<br>
+
About RNIDS networking, please refer to [Raspberry Pi networked via RNDIS RNIDS Networking method]<br />
 
+
With the operations above, a USB0 port will be recognized.<br />
<font color="#ff00ff">如果你使用物联网卡,比如移动物联网卡,成功注册网络;但是拨号上网失败,无法ping通,可以尝试用以下AT指令的其中一条选择最优频段:</font>
+
If the network cannot work, please try to switch frequency with the following AT commands:
 +
<pre>
 
  AT+CNBP=0x0002000000400183,0x000001E000000000,0x0000000000000021
 
  AT+CNBP=0x0002000000400183,0x000001E000000000,0x0000000000000021
 
  AT+CNBP=0x0002000000400180,0x480000000000000000000000000000000000000000000042000001E200000095,0x0000000000000021
 
  AT+CNBP=0x0002000000400180,0x480000000000000000000000000000000000000000000042000001E200000095,0x0000000000000021
 
+
</pre>
===<font color="Bf0000">'''AT指令'''</font>===
+
===<font color="Bf0000">'''AT Commands'''</font>===
如果无法连接网络,可以通过指令AT检查状态
+
If the network cannot work, plaese check module with AT commands
 
<pre>
 
<pre>
 
sudo apt-get install minicom
 
sudo apt-get install minicom
Line 63: Line 75:
 
</pre>
 
</pre>
  
=== 常用AT指令 ===
+
=== Common AT commandsni  ===
 
{| class="wikitable"
 
{| class="wikitable"
 
|-
 
|-
! 命令 !! 说明 !! 返回值
+
! Command !! Description !! Return
 
|-
 
|-
| AT || AT测试指令 || OK
+
| AT || AT test || OK
 
|-
 
|-
| ATE || ATE1设置回显<br /> ATE0关闭回显|| OK
+
| ATE || ATE1 enable echo <br /> ATE0 disable echo|| OK
 
|-
 
|-
| AT+CGMI || 查询模组制造商 || OK
+
| AT+CGMI || Check manfacture || OK
 
|-
 
|-
| AT+CGMM || 查询模组型号 || OK
+
| AT+CGMM || Check module type || OK
 
|-
 
|-
| AT+CGSN || 查询产品序列号 || OK
+
| AT+CGSN || Check SN || OK
 
|-
 
|-
| AT+CSUB || 查询模块版本以及芯片 || OK
+
| AT+CSUB || Check module version || OK
 
|-
 
|-
| AT+CGMR || 查询固件版本序列号 || OK
+
| AT+CGMR || Check firmware version || OK
 
|-
 
|-
| AT+IPREX  || 设置模块硬件串口波特率 || +IPREX:<br />OK
+
| AT+IPREX  || Configure hardwara baud rate || +IPREX:<br />OK
 
|-
 
|-
| AT+CRESET || 复位模块 || OK
+
| AT+CRESET || Reset module || OK
 
|-
 
|-
| AT+CSQ || 网络信号质量查询,返回信号值 || +CSQ: 17,99<br />OK
+
| AT+CSQ || Check signal quanlity || +CSQ: 17,99<br />OK
 
|-
 
|-
| AT+CPIN? || 查询SIM卡状态,返回READY,表示SIM卡能正常识别 || +CPIN: READY
+
| AT+CPIN? || Check SIM status || +CPIN: READY
 
|-
 
|-
| AT+COPS? || 查询当前运营商,正常联网后会返回运营商信息 || +COPS:<br />OK
+
| AT+COPS? || CHeck the current supplier || +COPS:<br />OK
 
|-
 
|-
| AT+CREG? || 查询网络注册状态 || +CREG:<br />OK
+
| AT+CREG? || Check network status || +CREG:<br />OK
 
|-
 
|-
| AT+CPSI? || 查询UE系统信息 ||  
+
| AT+CPSI? || Check UE information ||  
 
|-
 
|-
|AT+CNMP || 网络模式选择命令:<br />2:Automatic<br />13:GSM only<br />38:LTE only<br />48 : Any modes but LTE<br />... .... ||  OK
+
|AT+CNMP || Configure network mode:<br />2:Automatic<br />13:GSM only<br />38:LTE only<br />48 : Any modes but LTE<br />... .... ||  OK
 
|}
 
|}
 
<font color="red">
 
<font color="red">
更多AT指令参考: [https://www.waveshare.net/w/upload/6/68/SIM7500_SIM7600_Series_AT_Command_Manual_V2.00.pdf AT_Command_V2.00]<br />
+
For more AT commands, please refer to: [https://www.waveshare.com/w/upload/6/68/SIM7500_SIM7600_Series_AT_Command_Manual_V2.00.pdf AT_Command_V2.00]<br />
更多文档参考:[https://cn.simcom.com/product/SIM7600X-H.html SIMCom]
+
You can also refer to:[https://cn.simcom.com/product/SIM7600X-H.html SIMCom]
 
</font><br />
 
</font><br />
-->
+
==PCIE==
 +
The PCIe interface is PCIe 2.0 X1, the maximum speed is 500Mb/s <br />
 +
Most of the PCIEx1 device is not supported by Raspberry Pi without a driver. <br />
 +
Please check your PCIe device before you used [https://pipci.jeffgeerling.com/ Supported device testing] <br />
 +
Raspberry [https://github.com/geerlingguy/raspberry-pi-pcie-devices/tree/master/extras/cross-compile Kernel compiling]

Revision as of 13:21, 10 September 2021

Writing Image

USB2.0

The USB interfaces are default disabled in CM4, you need to enable it by adding the following lines:the config.txt

dtoverlay=dwc2,dr_mode=host

USB TO UART

The USB to UART port is connected to GPIO14(BCM) and GPIO15(BCM) pins of CM4 with a converter.
You can connect the USB to UART port for login CM4 via serial.
The USB to UART port can also be used for power, in this case, you need to solder a 0ohm resistor to the pad for enabling the powering function.
Compute Module 4 PoE 4G Board 6.png

Buzzer/LED

Buzzer

The buzzer is connected to GPIO22(BCM), low active.

Compute Module 4 PoE 4G Board 4.png

LED

Two LEDs are integrated for users, the green one is connected to GPIO20(BCM)and the red one is connected to GPIO21(BCM), low active.

Compute Module 4 PoE 4G Board 5.png

4G/5G

To work with 4G/5G, you need to connect a wireless module to the M.2 B KEY for featuring corresponding functions. M.2 B KEY only extends USB2.0 interfaces, it doesn't support PCIe devices.
Compute Module 4 PoE 4G Board 3.png
SIM card is required to work with the 4G/5G module
This carrier board supports the 4G module by default, if you use it with 5G modules, some of the 5G functions are not supported.
If you use a 5G module, please check the [SIM8200EA-M2_5G HAT wiki] about how to set up 5G.

If you need to toggle the working status of the 4G module, you can control the GPIO6(BCM), set the GPIO6 to High for disabling the 4G module and set it to Low for enabling.
To toggle the working status of the 4G module, please add delay time for waiting for the operation to work.

SIM7600 M.2 module

Status of M.2 indicators:

M.2_NET M.2_STA
Red LED Green LED Status
Solid OFF Power OFF
Solid OFF Starting
Solid Solid SIM card is an invalid or weak signal
Solid Blink Working
OFF Blink/Solid Shutdowning

Before you configure the SIM7600 module, please make sure that the module is started normally.

sudo apt-get install minicom
sudo minicom -D /dev/ttyUSB2

Type the following command on the minicom

AT+CUSBPIDSWITCH=9011,1,1

Close the minicom and configure usb0

sudo dhclient -v usb0

About RNIDS networking, please refer to [Raspberry Pi networked via RNDIS RNIDS Networking method]
With the operations above, a USB0 port will be recognized.
If the network cannot work, please try to switch frequency with the following AT commands:

 AT+CNBP=0x0002000000400183,0x000001E000000000,0x0000000000000021
 AT+CNBP=0x0002000000400180,0x480000000000000000000000000000000000000000000042000001E200000095,0x0000000000000021

AT Commands

If the network cannot work, plaese check module with AT commands

sudo apt-get install minicom
sudo minicom -D /dev/ttyUSB2

Common AT commandsni

Command Description Return
AT AT test OK
ATE ATE1 enable echo
ATE0 disable echo
OK
AT+CGMI Check manfacture OK
AT+CGMM Check module type OK
AT+CGSN Check SN OK
AT+CSUB Check module version OK
AT+CGMR Check firmware version OK
AT+IPREX Configure hardwara baud rate +IPREX:
OK
AT+CRESET Reset module OK
AT+CSQ Check signal quanlity +CSQ: 17,99
OK
AT+CPIN? Check SIM status +CPIN: READY
AT+COPS? CHeck the current supplier +COPS:
OK
AT+CREG? Check network status +CREG:
OK
AT+CPSI? Check UE information
AT+CNMP Configure network mode:
2:Automatic
13:GSM only
38:LTE only
48 : Any modes but LTE
... ....
OK

For more AT commands, please refer to: AT_Command_V2.00
You can also refer to:SIMCom

PCIE

The PCIe interface is PCIe 2.0 X1, the maximum speed is 500Mb/s
Most of the PCIEx1 device is not supported by Raspberry Pi without a driver.
Please check your PCIe device before you used Supported device testing
Raspberry Kernel compiling