From 40882c6149350c0bac6887a12defa0f705f685c5 Mon Sep 17 00:00:00 2001 From: dchvs Date: Fri, 19 Feb 2021 19:44:23 -0600 Subject: [PATCH] documentation: Update README --- README.md | 73 +++++++++++++++++++++++++++++++++---------------------- 1 file changed, 44 insertions(+), 29 deletions(-) diff --git a/README.md b/README.md index ffe2993..7001c02 100644 --- a/README.md +++ b/README.md @@ -1,55 +1,44 @@ # Quectel EG25-G GSM Modem -## Kernel Changes -This package requires the Spiri Mu kernel and modifications to the following files: -* drivers/usb/serial/option.c -* drivers/usb/serial/usb_wwan.c -* drivers/net/usb/qmi_wwan.c -* drivers/net/usb/Makefile - -It also requires these new files: -* drivers/net/usb/GobiUSBNet.c -* drivers/net/usb/QMI.c -* drivers/net/usb/QMI.h -* drivers/net/usb/QMIDevice.c -* drivers/net/usb/QMIDevice.h -* drivers/net/usb/Structs.h - -All these modifications and additions are part of the Spiri Mu kernel. The files are represented in https://git.spirirobotics.com/Spiri/mu_kernel_sources as symlinks from this repository. +## 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. ## Installation + Clone the repository: ``` -cd ~/git -git clone https://git.spirirobotics.com/Spiri/mu_packages.git -``` - -Create a udhcpc symbolic link: -``` -cd /bin -sudo ln -s busybox udhcpc +mkdir ~/git/ && cd ~/git/ +git clone https://git.spirirobotics.com/dchvs/eg25-g.git +cd eg25-g/ ``` Create udhcpc directories, copy in the script, and give it execution permission: ``` sudo mkdir -p /usr/share/udhcpc sudo mkdir -p /etc/udhcpc/ -sudo cp ~/git/mu_packages/eg25-g/default.script /usr/share/udhcpc -sudo cp ~/git/mu_packages/eg25-g/default.script /etc/udhcpc +sudo cp quectel-CM/default.script /usr/share/udhcpc/ +sudo cp quectel-CM/default.script /etc/udhcpc/ + sudo chmod +x /usr/share/default.script sudo chmod +x /etc/udhcpc/default.script ``` +Create a udhcpc symbolic link: +``` +sudo ln -s /bin/busybox /bin/udhcpc +``` Build the application: ``` -cd ~/git/mu_packages/eg25-g/quectel-CM +cd quectel-CM/quectel-CM 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. ``` -sudo ./git/mu_packages/eg25-g/quectel-CM/quectel -s [apn-name] +sudo ~/git/eg25-g/quectel-CM/quectel-CM -s [apn-name] & ``` ## Troubleshooting @@ -61,9 +50,35 @@ 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 +ping -I eth1 www.google.com ``` -## Documentation +## 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. + +. +├── kernel + └── kernel-4.9-spiri + └── drivers + └── net + └── usb + ├── GobiUSBNet.c + ├── Kconfig + ├── Makefile + ├── QMI.c + ├── QMIDevice.c + ├── QMIDevice.h + ├── QMI.h + └── Structs.h + +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 + +#### Documentation * Cellular modem hardware design * Cellular modem PPP * Cellular modem AT commands -- 2.40.1