eg25-g/README.md

87 lines
2.7 KiB
Markdown
Raw Permalink Normal View History

2021-01-22 00:34:57 -04:00
# Quectel EG25-G GSM Modem
2021-02-19 21:44:23 -04:00
## Quectel Setup
The Quectel should be conencted to a ConnectTech's Elroy board.
The Quectel module requires to connect the antenna on the MAIN and GNSS sockets.
Make sure to use a SIM card with full access to the mobile network.
2021-01-22 00:34:57 -04:00
## Installation
2021-02-19 21:44:23 -04:00
Clone the repository:
2021-01-22 00:34:57 -04:00
```
2021-02-19 21:44:23 -04:00
mkdir ~/git/ && cd ~/git/
git clone https://git.spirirobotics.com/dchvs/eg25-g.git
cd eg25-g/
2021-01-22 00:34:57 -04:00
```
Create udhcpc directories, copy in the script, and give it execution permission:
```
sudo mkdir -p /usr/share/udhcpc
sudo mkdir -p /etc/udhcpc/
2021-02-19 21:44:23 -04:00
sudo cp quectel-CM/default.script /usr/share/udhcpc/
sudo cp quectel-CM/default.script /etc/udhcpc/
2021-01-22 00:34:57 -04:00
sudo chmod +x /usr/share/default.script
sudo chmod +x /etc/udhcpc/default.script
```
2021-02-19 21:44:23 -04:00
Create a udhcpc symbolic link:
```
sudo ln -s /bin/busybox /bin/udhcpc
```
2021-01-22 00:34:57 -04:00
Build the application:
```
2021-02-19 21:44:23 -04:00
cd quectel-CM/quectel-CM
2021-01-22 00:34:57 -04:00
make
```
## Running
The following command launches the package, with [apn-name] being substituted with the APN of the wireless provider. For BICS, the APN is bicsapn. To run this in the background, add & to the end of the command.
```
2021-02-19 21:44:23 -04:00
sudo ~/git/eg25-g/quectel-CM/quectel-CM -s [apn-name] &
2021-01-22 00:34:57 -04:00
```
## Troubleshooting
If the modem is correctly connected to the system, the following command will show the GSM modem attaching to ttyUSB0, ttyUSB1, ttyUSB2, and ttyUSB3:
```
dmesg | grep GSM
```
If the modem has successfully connected to a tower and is being served an IP address, then the following command will show an IP address being served:
```
ifconfig eth1
2021-02-19 21:44:23 -04:00
ping -I eth1 www.google.com
```
## Appends
#### Kernel Changes
The Driver for the EG25-G Quectel module consists has the following structure on the Kernel space side, for interfacing it and adding its Network packets transmisions on Kernel.
```bash
.
├── kernel
└── kernel-4.9-spiri
└── drivers
└── net
└── usb
├── GobiUSBNet.c
├── Kconfig
├── Makefile
├── QMI.c
├── QMIDevice.c
├── QMIDevice.h
├── QMI.h
└── Structs.h
2021-01-22 00:34:57 -04:00
```
2021-02-19 21:44:23 -04:00
In order to add the Driver to the Kernel, the following reference Kernel files are patched:
* drivers/usb/serial/option.c
* drivers/usb/serial/usb_wwan.c
* drivers/net/usb/qmi_wwan.c
2021-01-22 00:34:57 -04:00
2021-02-19 21:44:23 -04:00
#### Documentation
2021-01-22 00:34:57 -04:00
* <a href="https://nextcloud.spirirobotics.com/f/3971">Cellular modem hardware design</a>
* <a href="https://nextcloud.spirirobotics.com/f/3970">Cellular modem PPP</a>
* <a href="https://nextcloud.spirirobotics.com/f/3968">Cellular modem AT commands</a>
* <a href="https://nextcloud.spirirobotics.com/f/3969">Cellular modem GNSS AT commands</a>