「Raspberry Pi Unboxing」修訂間的差異

出自ChevyneWiki
跳至導覽 跳至搜尋
 
(未顯示同一使用者於中間所作的 7 次修訂)
行 45: 行 45:
 
* Download OpenWrt image for Raspberry Pi 5
 
* Download OpenWrt image for Raspberry Pi 5
 
https://firmware-selector.openwrt.org/?version=SNAPSHOT&target=bcm27xx%2Fbcm2712&id=rpi-5
 
https://firmware-selector.openwrt.org/?version=SNAPSHOT&target=bcm27xx%2Fbcm2712&id=rpi-5
* SIM
 
* RS-485
 
* MQTT
 
 
=== Raspberry Pi OS ===
 
=== Raspberry Pi OS ===
  +
* WaveShare SIM7600E-H-4G-HAT
* SIM
 
  +
https://www.waveshare.net/wiki/SIM7600CE_4G_HAT
  +
  +
wget https://www.waveshare.net/w/upload/2/29/SIM7600X-4G-HAT-Demo.7z
  +
# sudo apt-get install p7zip-full
  +
7z x SIM7600X-4G-HAT-Demo.7z -r -o/home/openrich
  +
sudo chmod 777 -R SIM7600X-4G-HAT-Demo
  +
mv SIM7600X-4G-HAT-Demo/Raspberry/c SIM7600X
  +
/home/openrich/SIM7600X/sim7600_4G_hat_init
  +
nano /home/openrich/SIM7600X/sim7600_4G_hat_init
  +
# pinctrl for Raspberry Pi 5
  +
pinctrl -e set 4 op dl
  +
pinctrl -e set 6 op dl
  +
## raspi-gpio for Raspberry Pi 4
  +
# raspi-gpio set 4 op dl
  +
# raspi-gpio set 4 op dl
  +
## sysfs for old
  +
# echo "4" > /sys/class/gpio/export
  +
# sleep 0.1
  +
# echo "out" > /sys/class/gpio/gpio4/direction
  +
# echo "0" > /sys/class/gpio/gpio4/value
  +
# echo "6" > /sys/class/gpio/export
  +
# sleep 0.1
  +
# echo "out" > /sys/class/gpio/gpio6/direction
  +
# echo "0" > /sys/class/gpio/gpio6/value
  +
nano /etc/rc.local
  +
sh /home/openrich/SIM7600X/sim7600_4G_hat_init
  +
exit 0
  +
nano /boot/firmware/config.txt
  +
enable_uart=1
  +
  +
wget https://www.waveshare.net/w/upload/0/00/SIM7600_NDIS.7z
  +
# sudo apt-get install p7zip-full
  +
7z x SIM7600_NDIS.7z -r -o./SIM7600_NDIS
  +
cd SIM7600_NDIS
  +
sudo apt install raspberrypi-bootloader raspberrypi-kernel raspberrypi-kernel-headers
  +
sudo su
  +
make clean
  +
make
  +
insmod simcom_wwan.ko
  +
lsmod
  +
  +
sudo raspi-config
  +
# 3 Interfacing Options -> I6 Serial Port -> no -> yes
  +
  +
apt install minicom
  +
# ttyAMA0 5/2B/zero
  +
# ttyS0 3B/3B+/4B
  +
minicom -D /dev/ttyAMA0
  +
  +
  +
cd ~/bcm2835
  +
chmod +x configure
  +
./configure
  +
sudo make
  +
sudo make install
  +
  +
sudo make clean
  +
sudo make
  +
sudo ./PhoneCall
 
* RS-485
 
* RS-485
 
* MQTT
 
* MQTT

於 2024年11月21日 (四) 20:46 的最新修訂

樹莓派開箱

樹莓派 Raspberry Pi

  • Raspberry Pi 5 Model B 2GB
  • Raspberry Pi 5 Active Cooler
  • Raspberry Pi 27W USB-C Power Supply
  • Raspberry Pi microSD 32GB - Raspberry Pi OS (64-bit)
  • Raspberry Pi microSD 32GB A2 V30 C10

擴充板 - 微雪 Waveshare

  • SIM7600CE Raspberry Pi 5 4G 模組 LTE Cat-4 擴充板
  • Waveshare RS485 CAN HAT for Raspberry Pi 5

Raspberry Pi Unboxing 01.jpg


  • 樹莓派主機板
  • 4G 擴充板
  • RS485 擴充板

Raspberry Pi Unboxing 02.jpg

  • 4G 擴充板背面

Raspberry Pi Unboxing 03.jpg


樹莓派組裝

  • 樹莓派主機板

Raspberry Pi Unboxing 04.jpg


  • 主機板安裝散熱片風扇

Raspberry Pi Unboxing 05.jpg


  • 主機板上層安裝 4G 模組

Raspberry Pi Unboxing 06.jpg


  • 4G 模組右上方 GNSS IPEX 接出轉 SMA 接 GPS 天線
  • 4G 模組下方 2組 4G IPEX
MAIN 接出轉 SMA 接 4G 天線
  • 4G 模組上層安裝 RS485 擴充板

Raspberry Pi Unboxing 07.jpg


  • 右側面
  1. 上層上方 RS485 接線端子
  2. 中層下方 nanoSIM 插槽
  3. 下層下方 microSD 插槽

Raspberry Pi Unboxing 08.jpg


軟體測試

OpenWrt

  • Download OpenWrt image for Raspberry Pi 5
https://firmware-selector.openwrt.org/?version=SNAPSHOT&target=bcm27xx%2Fbcm2712&id=rpi-5

Raspberry Pi OS

  • WaveShare SIM7600E-H-4G-HAT
https://www.waveshare.net/wiki/SIM7600CE_4G_HAT
wget https://www.waveshare.net/w/upload/2/29/SIM7600X-4G-HAT-Demo.7z
# sudo apt-get install p7zip-full
7z x SIM7600X-4G-HAT-Demo.7z -r -o/home/openrich
sudo chmod 777 -R SIM7600X-4G-HAT-Demo
mv SIM7600X-4G-HAT-Demo/Raspberry/c SIM7600X
/home/openrich/SIM7600X/sim7600_4G_hat_init

nano /home/openrich/SIM7600X/sim7600_4G_hat_init

# pinctrl for Raspberry Pi 5
pinctrl -e set 4 op dl
pinctrl -e set 6 op dl
## raspi-gpio for Raspberry Pi 4
# raspi-gpio set 4 op dl
# raspi-gpio set 4 op dl
## sysfs for old
# echo "4" > /sys/class/gpio/export
# sleep 0.1
# echo "out" > /sys/class/gpio/gpio4/direction
# echo "0" > /sys/class/gpio/gpio4/value
# echo "6" > /sys/class/gpio/export
# sleep 0.1
# echo "out" > /sys/class/gpio/gpio6/direction
# echo "0" > /sys/class/gpio/gpio6/value

nano /etc/rc.local

sh /home/openrich/SIM7600X/sim7600_4G_hat_init
exit 0

nano /boot/firmware/config.txt

enable_uart=1
wget https://www.waveshare.net/w/upload/0/00/SIM7600_NDIS.7z
# sudo apt-get install p7zip-full
7z x SIM7600_NDIS.7z -r -o./SIM7600_NDIS
cd SIM7600_NDIS
sudo apt install raspberrypi-bootloader raspberrypi-kernel raspberrypi-kernel-headers
sudo su
make clean
make
insmod simcom_wwan.ko
lsmod
sudo raspi-config
# 3 Interfacing Options -> I6 Serial Port -> no -> yes
apt install minicom
# ttyAMA0	5/2B/zero
# ttyS0	3B/3B+/4B
minicom -D /dev/ttyAMA0

cd ~/bcm2835
chmod +x configure
./configure
sudo make
sudo make install
sudo make clean
sudo make
sudo ./PhoneCall
  • RS-485
  • MQTT

未完待續