Compute Module PoE 4G Board

From Waveshare Wiki
Jump to: navigation, search
Compute Module PoE 4G Board
Compute Module PoE 4G
Compute Module PoE 4G Board (with case)

{{{name2}}}

{{{name3}}}

{{{name4}}}

{{{name5}}}

Instruction

Compute Module PoE 4G Board is an industrial-grade host based on the Raspberry Pi compute module. It supports global communication 4G/3G/2G cellular, PoE Ethernet and WiFi and other network communication modes, and expands a variety of industrial isolated interface resources (such as CAN, RS485, RS232, ADC, GPIO, etc.), which is suitable for various industrial IoT applications.

Features

  • Compatible with Raspberry Pi CM3 / CM3 Lite / CM3+ / CM3+ Lite.
  • Onboard SIM7600X module, supports 4G/3G/2G global communication (via onboard SIM card slot).
  • Onboard 10/100M auto-negotiation Ethernet port, supports power via the PoE Ethernet interface (RJ45 interface specification).
  • Supports 2.4GHz WiFi wireless connection.
  • 1 × ADC port, screw terminal, isolated, 16-bit, 860SPS.
  • 4 × GPIO ports, screw terminal, isolated, 2 channels as isolated input, 2 channels as isolated output.
  • 1 × RS232 port, DR9 (male), isolated, with TVS protection, anti-surge, and ESD protection.
  • 1 × RS485 port, screw terminal, isolated, with 600W lightning-proof, anti-surge, and 15KV ESD protection, allows using 120Ω terminal resistor.
  • 1 × CAN interface, screw terminal, isolated, lightning-proof, and ESD protection, allows using 120Ω terminal resistor.
  • Onboard USB HUB, allows connecting more USB devices.
  • Onboard USB TO UART, for serial debugging.
  • Audio interface: 1 ×3.5mm audio jack, stereo output.
  • Speaker interface: 1 × 4PIN speaker connector, supports 8Ω 5W speaker.
  • Onboard external RTC chip, with temperature sensor inside.
  • 2 × CSI camera interfaces, allow connecting the cameras.
  • Onboard HDMI / DSI interfaces for connecting displays.
  • Industrial-grade aluminum alloy case.

Onboard resources

Compute-Module-PoE-4G-Board-details-intro1.jpg

1: Compute Module socket: for connecting Raspberry Pi Compute Module CM3 / CM3 Lite / CM3+ / CM3+ Lite

2: PoE enabled Ethernet port: 10/100M auto-negotiation, with PoE Power Over Ethernet features

3: USB Ports: allows connecting the USB device

4: HDMI Ports: allows connecting the HDMI device.

5: 3.5mm audio jack

6: Dual-channels speaker connector: allows connecting the speaker directly.

7: USB SLAVE: allows you to burn system image into CM3 or CM3+

8: USB TO UART: for serial debugging

9: DC power input: supports 7-36V power supply

10: DSI display port: for connecting Raspberry Pi LCD

11: CSI camera port: for connecting Raspberry Pi Camera

12: RTC real time clock battery holder: supports rechargeable Li cell ML1220

13: 4G antenna connector

14: WiFi antenna connector

15: Isolated ADC: ADC differential input

16: Isolated 5V power: max output current 100mA

17: Isolated GPIO: allows controlling / detecting devices via GPIO

18: Isolated RS485 interface: interface communication via RS485

19: Isolated CAN interface: interface communication via CAN

20: Isolated RS232 interface: interface communication via RS232

Compute-Module-PoE-4G-Board-details-intro2.jpg

21: SIM slot: supports standard 4G/3G/2G SIM card

22: Micro SD card slot: insert a Micro SD card with a pre-burnt system, to start up the CM3 Lite / CM3+ Lite variant

23: SIM7600G-H communication module: supports 4G/3G/2G communication and GNSS function

24: WiFi module: supports 2.4G WiFi connection

25: Buzzer

26: DS3231: high precision RTC chip, I2C bus

27: Raspberry Pi indicator

ACT: Raspberry Pi operating status indicator
PWR: Raspberry Pi power indicator

28: SIM7600G-H indicator

NET: network indicator
STA: status indicator

29: User LED: handy for I/O output testing, or program running status monitoring

30: Serial port connection setting

31: Volume adjustment

32: PoE configuration

DIS: disable PoE
EN: enable PoE

33: ADC chip power supply selection

34: RS485 CAN terminal resistor selection

Write image

  • Download the rpiboot_setup software to the PC, unzip it and install the rpiboot.

Note: Pay attention to remembering the installation directory.

  • Download the latest version of the image on the Raspberry Pi official website., or directly download and use the pre-configured image we provide on the 'Resources' page (If you use our pre-configured image, you don't need to download the sample demo).

Note: You should prepare a 16G or larger SD card if you want to use the pre-configured image we provide.

Using with Compute Module 3 Lite or Compute Module 3+ Lite

If you use Compute Module 3 Lite or Compute Module 3+ Lite, you should write the image to the SD card just like a common Raspberry Pi.

  • To write the image, you should prepare an SD card (8G or larger, we suggest using 16G) and a card reader.
  • Use Win32DiskImager software to write the image to an SD card. (It is the same as how you write an image for Pi 3B).
  • After the image has finished writing, insert the SD card into the SD card slot interface of the Board.
  • Insert CM3L/CM3+L into the CM3 card slot, and then power on the board.

Using with Compute Module 3 or Compute Module 3+

If you use Compute Module 3 or Compute Module 3+, you should write an image to the internal eMMC.

  • Insert your CM3/CM3+ into PoE 4G board, then use a USB cable to connect the SLAVR interface of the PoE 4G board to your PC, and then connect the Power interface of the PoE 4G board to the power adapter.

Compute Module PoE 4G Board02.png

  • In the installation directory of rpiboot_setup, run rpiboot.exe as administrator, PC will recognize the eMMC of Compute module as a portable drive. (Note: When CM3+ is used for the first time, you may need to manually format and assign a drive letter in the PC's Disk management before it can be found in your Computer)
  • Open the Win32DiskImager software, select the system image downloaded in the previous step, and click 'Write' to write the image to eMMC(the disk recognized by the PC, remember to format it first).
  • After writing, you can disconnect the USB cable, and re-power the POE 4G board to start the CM3/CM3+.

【Note】

  • While writing the image, DO NOT write other portable storage drives to avoid conflict.
  • The default user name and password of the image of Raspberry is pi and raspberry.
  • The EMMC of CM3+ is extended, which allows CM3+ to install a common desktop image. However, the eMMC of CM3 is only 4G, therefore if you want to write an image to CM3, please choose Raspbian Lite. You can also install GUI for Lite image separately by the commands below (network is required).
sudo apt-get update
sudo apt-get install raspberrypi-ui-mods

Connect CSI Camera

  • 1. Test camera with a pre-configured image.

If you are using the image provided by us, the relevant files have already been configured, so no additional settings are required. You can directly test the cameras after connection.

  • 2. Test camera with the original image

The official Raspbian image doesn't have the startup file of the official camera and the official 7-inch screen configuration by default. In this case, if you use the official Raspbian image, you need to convert the official dts file into a bin file and put it under the system /boot/ directory. (You can find the dts file in the demo of Compute_Module_PoE_4G_Board.7z.)

Use the following command to convert:

cd /boot/
sudo dtc -I dts -O dtb -o /boot/dt-blob.bin dt-blob-disp1-cam2.dts

View the image of the camera connected

  • Test the camera 1
sudo raspivid -t 0 -cs 0
  • Test camera 2
sudo raspivid -t 0 -cs 1

【Note】: -cs indicates the number of cameras that are connected, but the camera number indicated by the -cs parameter maybe not be the same as the silkscreen of the board and the case. For example, if you connect a camera to the CAM1 interface, the command should be -cs 0 to indicate the first camera connected.

Download the demo for Raspberry Pi OS

  • If you are using our pre-configured image, you don't need to download the demo code, you can skip this step directly. If you are using the original Raspberry Pi OS, please refer to the following steps to download the demo.
  • You may need to connect a keyboard and HDMI LCD to Pi for demo installation or log in remotely with SSH or VNC.
  • You need to install the bcm2835 and the wiringPi function library before you install the demo.

Install BCM2835 function library

Execute the following commands on the Raspberry Pi terminal:

wget http://www.airspayce.com/mikem/bcm2835/bcm2835-1.68.tar.gz
tar zxvf bcm2835-1.68.tar.gz 
cd bcm2835-1.68/
sudo ./configure && sudo make && sudo make check && sudo make install

Install wiringPi function library

Execute the following commands on the Raspberry Pi terminal:

sudo apt-get install wiringpi  

Note: This step is for the version of the Raspberry Pi system after May 2019, which may need to be upgraded(it may not be executed for the system earlier than this before.)

wget https://project-downloads.drogon.net/wiringpi-latest.deb
sudo dpkg -i wiringpi-latest.deb
gpio -v   

Run gpio -v and the 2.52 version will appear. If it does not appear, it means that the installation error occurred.

Install the demo cade

Execute the following commands on the Raspberry Pi terminal:

sudo apt-get install p7zip-full
sudo wget  https://www.waveshare.com/wiki/File:Compute_Module_PoE_4G_Board.7z
7z x Compute_Module_PoE_4G_Board.7z -O./Compute_Module_PoE_4G_Board
sudo chmod 777  -R Compute_Module_PoE_4G_Board
cd Compute_Module_PoE_4G_Board

SIM7600X module

For the original Raspberry Pi OS

1. Turn on the SIM7600X module.

Open the config.txt in the terminal:

sudo nano /boot/config.txt

Add the following code at the end of the config.txt:

dtoverlay=sc16is752-spi1,int_pin=16

And then reboot the system.

sudo reboot 

Enter the following directory after reboot.

cd Compute_Module_PoE_4G_Board/

After executing this command, the 4G module will be turned on, and you need to wait for 1 minute. And then the LED corresponding to 4G_STA will light up, which means that the 4G module has been turned on.

sudo ./4G_Module.sh 1

And use the following command to turn off the 4G modules, you need to wait for 1 minute. And then the LED corresponding to 4G_STA will light off, which means that the 4G module has been shut down.

sudo ./4G_Module.sh 0

Note:

  • If you add some USB devices, the original pin number will be changed, for example, the default is 503, after connecting FT232RL and restarting the pin number becomes 499.

Compute Module PoE 4G Board Manual 4G.png

  • If you need to boot up and start the 4G board automatically, you can add the corresponding command in sudo nano /etc/rc.local
sudo nano /etc/rc.local

And then add the following line and the end of the file(before the exit 0).

sudo /home/pi/Compute_Module_PoE_4G_Board/4G_Module.sh

Or solder a 0R resistor on this pan or solder directly to connect(under the SIM card slot on the back).

Compute Module PoE 4G Board Manual 4G 1.png

2. SIM7600 configuration to network


【Note】Status of the two LED indicators for 4G_NET and 4G_STA.

LEDs status Module status
Two LED lights flash SIM7600X module has been turned on normally
Two LED lights are off SIM7600X module did not start successfully
Two LED lights are on always SIM card not inserted/recognized

Before configuration, please make sure that the SIM7600X module has been turned on. Execute the following commands on the Raspberry Pi terminal:

cd Compute_Module_PoE_4G_Board
sudo chmod 777 sim7600_4G_hat_init

Set the boot initialization script:

sudo nano /etc/rc.local

Add the following line before exit 0.

sh /home/pi/Compute_Module_PoE_4G_Board/sim7600_4G_hat_init

Set up the network by using minicom.

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

Enter the following command:

AT+CUSBPIDSWITCH=9011,1,1

And then reboot the system

sudo reboot

For the pre-configured image

If you use our pre-configured image, the SIM7600 module has been already turned on. You can directly use the following code to configure the network.

sudo minicom -D /dev/ttyUSB2

Enter the following command:

AT+CUSBPIDSWITCH=9011,1,1

And then reboot the system:

sudo reboot
  • RNDIS refers to : RNDIS
  • PPP refers to: PPP

AT commands for testing

If you cannot connect to the network, you can check the status by AT command:

sudo apt-get install minicom
sudo minicom -D /dev/ttyUSB2
AT Command Description Return
AT AT test command OK
ATE ATE1: Echo mode on
ATE0: Echo mode off
OK
AT+CGMI Request manufacturer indentification OK
AT+CGMM Request model indentification OK
AT+CGSN Request product serial number identification OK
AT+CSUB Request porduct version OK
AT+CGMR Request firmware version OK
AT+IPREX Configure buad rate of model +IPREX:OK
AT+CRESET Reset model OK
AT+CSQ Query network signal quality, return sugnal value +CSQ: 17,99
OK
AT+CPIN? Query SIM card status +CPIN:RRADY
AT+COPS? Query provider information +COPS:OK
AT+CREG? Query network registation status +CREG: OK
AT+CPSI? Query UE system information
AT+CNMP Select Network Mode:

2: Automatic
13: GSM only
38: LTE only
48: Any modes but LTE <nr /> ....

OK

More AT commands refer to: AT_Command_V2.00

For more information, please refer to: SIMCom

Open the Audio

sudo nano /boot/config.txt
dtoverlay=pwm-2chan,pin=12,func=4,pin2=13,func2=4
sudo reboot
#sudo raspi-config -> Advanced Options -> Audio
The new version of the system needs to be added as follows
dtoverlay=audremap
dtparam=audio=on
#Note that after using this, you will see a GPIO12 error in dmesg, which is because of repeated definitions and does not affect the use.

ADC test

C

Execute the following commands to run the demo.

cd ADC/c/
sudo ./main

python

cd ADC/python/
sudo python examples/main.py

Result: output voltage value.

【Note】The ADC function uses the ADS1113 chip, the internal reference voltage is 2.048V, differential input, input voltage range: ±2.048V.

CAN test

Connect the module to the Raspberry Pi, and then reboot the Pi and modify the config.txt.

sudo nano /boot/config.txt

Add the following lines at the end of the config.txt.

dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25

Reboot the system

sudo reboot

After rebooting, use the following command to check the SPI information:

dmesg | grep spi

Compute-Module-board-Manual-can-1.png

Turn on CAN.

sudo ip link set can0 up type can bitrate 1000000
sudo ifconfig can0 txqueuelen 65536

Note: For more information on the CAN kernel commands please refer to this link: https://www.kernel.org/doc/Documentation/networking/can.txt.

Check the ifconfig

ifconfig

Compute-Module-board-Manual-can-2.png

C

Enter the following commands in the terminal:

1. Receive

cd CAN/c/receive/
sudo make clean
sudo make
sudo ./can_receive

2. Send

cd CAN/c/send/ 
sudo make clean
sudo make
sudo ./can_send

python

cd python/

1. Receive

sudo python receive.py

2. Send

sudo python send.py

【Note】The CAN demo uses the method of the combination of the MCP2515 and SN65HVD230 chip, and the demo cannot be used without adding a driver. If you need to test two CAN modules, you can choose 2-CH CAN HAT or RS485 CAN HAT.

GPIO test

The GPIO ports can support 5V or 3.3V power input, which needs to be switched by the jumping cap.

C

Enter the following code in the terminal:

cd IO/c/
sudo ./main

python

cd IO/python/
sudo python examples/main.py

Result: If OUT1 and IN1 are short-circuited, and OUT2 and IN2 are short-circuited, the output result is as follows.

Compute-Module-board-Manual-IO-1.png

【Note】

  • The IN1 input uses the SPI0.1 chip select pin of the Raspberry Pi, if you need to use IN1, please be careful to prevent SPI pin conflicts.
  • If you need to use the CAN and the GPIO at the same time, please refer to the following steps in the terminal:
sudo raspi-config

Turn off the SPI interface

Compute-Module-board-Manual-IO-2.png

sudo nano /boot/config.txt

Add the following lines in the config.txt

dtparam=spi=on
dtoverlay=mcp2515-can0,oscillator=16000000,interrupt=25

And then reboot the system:

sudo reboot

OUT can only be used as output, IN can only be used as input.

LED buzzer test

C

cd LED_BUZZER/c/
sudo make clean
sudo make
sudo ./main 

python

cd LED_BUZZER/python/
sudo python main.py

Result:

Compute-Module-board-Manual-LED BUZZER-1.png

The buzzer stops and the LED lights up alternately.

RS232 test

Edit the config.txt in the terminal.

sudo nano /boot/config.txt 

Add the following line at the end of the file.

dtoverlay=sc16is752-spi1,int_pin=16

C

cd RS232/c/
sudo make clean
sudo make
sudo ./main 

python

cd RS232/python/
sudo python examples/main.py

Result:

After receiving any string, click 'Enter' and then it will return any string immediately.

【Note】This test using USB TO RS232/485/TTL communicate with the computer.

RS485 test

Edit the config.txt in the terminal.

sudo nano /boot/config.txt 

Add the following line at the end of the file.

dtoverlay=sc16is752-spi1,int_pin=16

C

cd RS485/c/
sudo make clean
sudo make
sudo ./main 

python

cd RS485/python/
sudo python examples/main.py

Result:

After receiving any string, click 'Enter' and then it will return any string immediately.

【Note】This test using USB TO RS232/485/TTL communicate with the computer.

RTC test

Open SPI and I2C interface

Open the Raspberry Pi terminal and enter the following command to enter the configuration interface.

sudo raspi-config

And then select Interfacing Options -> SPI -> Yes to open the SPI interface.

RPI open spi.png

And then reboot the system

sudo reboot

The way to open the I2C interface is the same as the SPI. Enter the configuration interface and select Interfaceing Options -> I2C -> Yes to open the IIC interface, and then reboot the system.

C

cd RS485/c/
sudo make clean
sudo make
sudo ./main 

python

cd RTC/python/
sudo python examples/main.py

Result: Show the data of week, date, time

Compute-Module-board-Manual-RTC-1.png

Resources

Documents

Demo

Software

Image

FAQ

 Answer:
  • Please check whether your CM3/CM3+ is the eMMC version, There is an additional IC on the back of the eMMC version of CM3/CM3+. Only the eMMC version of the CM3/CM3+ can be written image via USB SLAVE.

Compute Module PoE Board User Manual FAQ10.jpg

  • We suggest using the WIN10 system for burning because burning in WIN7 or Linux systems is unstable.
  • The PoE 4G Board should use a 12V 2A or above power adapter, please try to power on the board again.
  • It needs to open the software rpiboot.exe with administrator authority.
  • Try to change to use another USB data cable.
  • Try to change to use another USB interface of a PC.
  • Try to plug and connect the CM3/CM3+ again.
  • Try to reboot the PC.
  • Try to write the image by using another computer.
{{{3}}}
{{{4}}}

{{{5}}}


Support



Technical Support

If you need technical support or have any feedback/review, please click the Submit Now button to submit a ticket, Our support team will check and reply to you within 1 to 2 working days. Please be patient as we make every effort to help you to resolve the issue.
Working Time: 9 AM - 6 AM GMT+8 (Monday to Friday)