顯示具有 5G 標籤的文章。 顯示所有文章
顯示具有 5G 標籤的文章。 顯示所有文章

Raspberry PI with 5G module.

Raspberry PI OS is the free operating system and recommended operating system for normal use on a raspberry. Thence we use the raspberry pi 4 B+ as a client of devices.

The user should control the raspberry pi via ssh or xsrdp by hostname and based on the raspberry pi to control and verify the DUT’s functions.



The Architecture:

Currently, we use the wireless interface of the raspberry pi to access the testing network domain. After executing the test they automatically upload the status to JIRA, also connecting the USB interface to the device.

The raspberry pi supports two UARTs (GPIO 14 & 15). when the device provides the serial console, we use it for debugging.

The Raspberry Pi installed programs list and server setup guide.

  1. SSH
    enable the SSH services.

    pi@raspberrypi-xs5g03:~ $ sudo raspi-config select "3. Interface Options" and choose "I2 SSH" to enable the SSH
  2. VNC
    enable the VNC server

    pi@raspberrypi-xs5g03:~ $ sudo raspi-config select "3. Interface Options" and choose "I3 VNC" to enable the VNC
  3. Xrdp
    install the xrdp and add a new user for this service.

    root@Raspbian:~# apt-get install xrdp
    root@Raspbian:~# reboot
    root@Raspbian:~# useradd -m atd #-m參數為新增使用者建立家目錄 
    root@Raspbian:~# passwd atd #pw XSlinux123
  4. tftp server / ftp server
    Installing the tftpd server.

    sudo systemctl status tftpd-hpa

    check the tftpd status

    pi@raspberrypi-xs5g03:~ $ sudo service vsftpd status
    vsftpd.service - vsftpd FTP server
         Loaded: loaded (/lib/systemd/system/vsftpd.service; enabled; vendor preset: enabled)
         Active: active (running) since Thu 2022-10-27 13:45:45 CST; 1min 22s ago
        Process: 2275 ExecStartPre=/bin/mkdir -p /var/run/vsftpd/empty (code=exited, status=0/SUCCESS)
       Main PID: 2276 (vsftpd)
          Tasks: 1 (limit: 4915)
            CPU: 16ms
         CGroup: /system.slice/vsftpd.service
                 └─2276 /usr/sbin/vsftpd /etc/vsftpd.conf
    
    Oct 27 13:45:45 raspberrypi-xs5g03 systemd[1]: vsftpd.service: Succeeded.
    Oct 27 13:45:45 raspberrypi-xs5g03 systemd[1]: Stopped vsftpd FTP server.
    Oct 27 13:45:45 raspberrypi-xs5g03 systemd[1]: Starting vsftpd FTP server...
    Oct 27 13:45:45 raspberrypi-xs5g03 systemd[1]: Started vsftpd FTP server.
    
  5. web server (for WebUI direct)
    Installing Apache:

    pi@raspberrypi:~ $sudo apt-get update pi@raspberrypi:~ $sudo apt-get install apache2 -y

    Configure the default web page:

    pi@raspberrypi:~ $cd /var/www/html
    pi@raspberrypi:~ $ls -la
  6. go language
    Installing the golang

    pi@raspberrypi:~ $ sudo apt-get install golang
    pi@raspberrypi:~ $ go version
    go version go1.15.15 linux/arm
  7. adb
    Installing the adb

pi@raspberrypi:~ $ sudo apt-get update pi@raspberrypi:~ $ sudo apt-get install adb android-sdk-platform-tools-common ppi@raspberrypi-xs5g03:~ $ adb --version Android Debug Bridge version 1.0.41 Version 28.0.2-debian Installed as /usr/lib/android-sdk/platform-tools/adb

Verify the adb function.

pi@raspberrypi:~ $ lsusb Bus 002 Device 002: ID 0e8d:7129 MediaTek Inc. USB DATA CARD pi@raspberrypi-xs5g03:~ $ adb devices * daemon not running; starting now at tcp:5037 * daemon started successfully List of devices attached 351488270000880 device pi@raspberrypi:~ $ adb shell

8. Enable the UART port.

launch the raspi-config

pi@raspberrypi:~ $ sudo raspi-config

Turn on the serial port.

Install the termial “minicom”

pi@raspberrypi:~# apt-get update pi@raspberrypi:~# apt-get install minicom

Launch the Serial console port:

pi@raspberrypi:~# sudo minicom -D /dev/ttyUSB4 -b 921600

For XS5G03/04:

Auto add XS5G03/04 modules on raspberry pi:

  • Add a udev rules file that contains the USB configuration.

pi@raspberrypi:~ $ sudo vim /etc/udev/rules.d/51-android.rules
SUBSYSTEM=="usb", ATTR{idVendor}=="0e8d", ATTR{idProduct}=="7127", MODE="0666", GROUP="plugdev", SYMLINK+="android%n", RUN+="/bin/sh -c 'echo "0e8d 7129" > /sys/bus/usb-serial/drivers/generic/new_id'"
  • Crate a USB serial configuration file

pi@raspberrypi:~ $ sudo vim /etc/modules-load.d/usbserial.conf usbserial
  • Disable the Modem Manager to release /dev/ttyUSB4 (MD AT port)

systemctl disable ModemManager.service systemctl stop ModemManager.service
  • Check the Modem Manager status.

systemctl list-dependencies multi-user.target | grep Modem
  • Reboot the raspberry.

  • Check the USB devices information.

pi@raspberrypi:~ $lsusb Bus 002 Device 002: ID 0e8d:7129 MediaTek Inc. USB DATA CARD
  • View the network interfaces

pi@raspberrypi:~ $ifconfig .... wwan0: flags=4291<UP,BROADCAST,RUNNING,NOARP,MULTICAST> mtu 1500 inet 169.254.26.41 netmask 255.255.0.0 broadcast 169.254.255.255 inet6 fe80::3abc:c06e:2352:d2b0 prefixlen 64 scopeid 0x20<link> ether 26:c9:17:59:46:25 txqueuelen 1000 (Ethernet) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 2818 bytes 1021241 (997.3 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
  • Launch the Serial console port:

pi@raspberrypi:~# sudo minicom -D /dev/ttyS0 -b 921600 Port /dev/ttyUSB4 Press CTRL-A Z for help on special keys +ESIMS: 1,29 +ESIMS: 0,1 +ESIMS: 0,11 at OK

Manual add XS5G03/04 modules on a raspberry pi:

pi@raspberrypi:~ $ ls /dev/tty* pi@raspberrypi:~ $ sudo modprobe usbserial pi@raspberrypi:~ $ sudo chmod u+w /sys/bus/usb-serial/drivers/generic/new_id pi@raspberrypi:~ $ sudo echo "0e8d 7129" > /sys/bus/usb-serial/drivers/generic/new_id pi@raspberrypi:~ $ ls /dev/ttyUSB* /dev/ttyUSB0 /dev/ttyUSB1 /dev/ttyUSB2 /dev/ttyUSB3 /dev/ttyUSB4 /dev/ttyUSB5 /dev/ttyUSB6 /dev/ttyUSB7 pi@raspberrypi:~ $ minicom -b 115200 -D /dev/ttyUSB3

Reference information:

Raspberry Pi setup part:

reference : https://www.raspberrypi.com/products/raspberry-pi-4-model-b/

https://www.circuitbasics.com/introduction-to-web-servers/

UART Part:

The PIN Code and PUK Code.

 如果你沒有更改過PIN碼,你可以先嘗試1次以下台灣SIM卡預設PIN碼:

  • 中華電信:PIN1為0000,PIN2為1111
  • 台灣大哥大:1234
  • 遠傳電信:PIN1為8888,PIN2為1234
  • 台灣之星:0000
  • 亞太電信:1234
  • 如果嘗試預設PIN碼失敗,或者你更改過PIN碼,那麼可以向運營商尋求協助。你需要提供身份證明,表示這組號碼是屬於你的,以下是PUK碼查詢與客服專線:

    Testing Beyond the 5 C’s of IoT -Keysight

    5C's +1 Test Approach ensures your devices thrive

    They need to address the following 5 C challenges across the IoT device lifecycle: 

    • Connectivity ensures that your IoT devices connect to other IoT devices, the cloud, and the world around them.
    • Continuity requires that your IoT devices have an extended battery life to do their jobs.
    • Compliance requires that your IoT devices adhere to global regulations.
    • Coexistence ensures that your IoT devices work harmoniously in crowded IoT environments.
    • Cybersecurity safeguards your data from cyber security threats.

    Build Customer Experience-Centered IoT Devices

    The first five C’s — connectivity, continuity, compliance, coexistence, and cybersecurity — are all important.

    another C, customer experience, puts your device ahead of the competition.

    • Customer experience testing ensures quality products that delight and retain your users.

    Reference:
    https://blogs.keysight.com/blogs/inds.entry.html/2021/09/20/testing_beyond_the5csofiot-19XA.html