LTE 데이터로 인터넷 사용
LTE 유심을 가지고 LTE를 사용하는 방법을 기술
pi@CamPi:~ $ git clone https://github.com/sixfab/Sixfab_PPP_Installer.git
Cloning into 'Sixfab_PPP_Installer'...
remote: Enumerating objects: 524, done.
remote: Counting objects: 100% (75/75), done.
remote: Compressing objects: 100% (40/40), done.
remote: Total 524 (delta 45), reused 58 (delta 35), pack-reused 449
Receiving objects: 100% (524/524), 92.52 KiB | 2.57 MiB/s, done.
Resolving deltas: 100% (349/349), done.
pi@CamPi:~ $ ls -l
total 84
drwxr-xr-x 2 pi pi 4096 Jan 11 2021 Bookshelf
drwxr-xr-x 3 pi pi 4096 Nov 23 2022 Desktop
drwxr-xr-x 2 pi pi 4096 Jan 11 2021 Documents
drwxr-xr-x 2 pi pi 4096 Jan 11 2021 Downloads
drwxr-xr-x 2 pi pi 4096 Jul 9 2023 logs
drwxr-xr-x 2 pi pi 4096 Jan 11 2021 Music
-rw------- 1 pi pi 25635 Jul 9 2023 nohup.out
drwxr-xr-x 2 pi pi 4096 Jan 11 2021 Pictures
drwxr-xr-x 2 pi pi 4096 Jan 11 2021 Public
drwxr-xr-x 4 pi pi 4096 Mar 9 20:52 Sixfab_PPP_Installer
-rwxr-xr-x 1 pi pi 632 Sep 16 14:35 startCCTV.sh
drwxr-xr-x 9 pi pi 4096 Dec 16 19:56 stepperMotor
-rwxr-xr-x 1 pi pi 464 Mar 1 2022 stopCCTV.sh
drwxr-xr-x 2 pi pi 4096 Jan 11 2021 Templates
drwxr-xr-x 2 pi pi 4096 Jan 11 2021 Videos
pi@CamPi:~ $ cd Sixfab_PPP_Installer
pi@CamPi:~/Sixfab_PPP_Installer $ ls -l
total 44
-rw-r--r-- 1 pi pi 1063 Mar 9 20:52 LICENSE
-rwxr-xr-x 1 pi pi 3796 Mar 9 20:52 ppp_install_jetson.sh
-rwxr-xr-x 1 pi pi 9772 Mar 9 20:52 ppp_install.sh
-rwxr-xr-x 1 pi pi 11075 Mar 9 20:52 ppp_install_standalone.sh
-rw-r--r-- 1 pi pi 3415 Mar 9 20:52 README.md
drwxr-xr-x 3 pi pi 4096 Mar 9 20:52 src
-rw-r--r-- 1 pi pi 6 Mar 9 20:52 version
pi@CamPi:~/Sixfab_PPP_Installer $ chmod +x ppp_install.sh
그리고 실행
pi@CamPi:~/Sixfab_PPP_Installer $ sudo ./ppp_install.sh
Sixfab path already exist!
PPP path already exist!
Please choose your Sixfab Shield/HAT:
1: GSM/GPRS Shield
2: 3G, 4G/LTE Base Shield
3: Cellular IoT App Shield
4: Cellular IoT HAT
5: Tracker HAT
6: 3G/4G Base HAT
2
You chose Base Shield
Checking requirements...
Updating headers...
Hit:1 http://archive.raspberrypi.org/debian buster InRelease
Hit:2 http://raspbian.raspberrypi.org/raspbian buster InRelease
Reading package lists... Done
Copying setup files...
ppp installing...
Reading package lists... Done
Building dependency tree
Reading state information... Done
ppp is already the newest version (2.4.7-2+4.1+deb10u1).
The following package was automatically installed and is no longer required:
python-colorzero
Use 'sudo apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 370 not upgraded.
What is your carrier APN?
lte.sktelecom.com
Your Input is : lte.sktelecom.com
Does your carrier need username and password? [Y/n]
n
You chose n
What is your device communication PORT? (ttyS0/ttyUSB3/etc.)
ttyUSB3
Your input is: ttyUSB3
Do you want to activate auto connect/reconnect service at R.Pi boot up? [Y/n]
Y
You chose Y
Installing python3 if it is required...
Installing pip3 if it is required...
Installing or upgrading atcom if it is required...
Looking in indexes: https://pypi.org/simple, https://www.piwheels.org/simple
Requirement already satisfied: atcom in /usr/local/lib/python3.7/dist-packages (0.4.3)
Requirement already satisfied: pyyaml in /usr/local/lib/python3.7/dist-packages (from atcom) (6.0.1)
Requirement already satisfied: click in /usr/lib/python3/dist-packages (from atcom) (7.0)
Requirement already satisfied: pyserial in /usr/lib/python3/dist-packages (from atcom) (3.4)
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
WARNING: You are using pip version 22.0.3; however, version 24.0 is available.
You should consider upgrading via the '/usr/bin/python3 -m pip install --upgrade pip' command.
Installing WiringPi (gpio tool) if required...
fatal: destination path 'WiringPi' already exists and is not an empty directory.
/home/pi/Sixfab_PPP_Installer/WiringPi /home/pi/Sixfab_PPP_Installer
wiringPi Build script
=====================
WiringPi Library
[UnInstall]
make: Nothing to be done for 'all'.
[Install Headers]
[Install Dynamic Lib]
WiringPi Devices Library
[UnInstall]
make: Nothing to be done for 'all'.
[Install Headers]
[Install Dynamic Lib]
GPIO Utility
make: Nothing to be done for 'all'.
[Install]
All Done.
NOTE: To compile programs with wiringPi, you need to add:
-lwiringPi
to your compile line(s) To use the Gertboard, MaxDetect, etc.
code (the devLib), you need to also add:
-lwiringPiDev
to your compile line(s).
/home/pi/Sixfab_PPP_Installer
Copying setup file...
Press ENTER key to reboot
Rebooting...
Connection to 192.168.0.xxx closed by remote host.
Connection to 192.168.0.xxx closed.
....
APN은 아래와 같이 저는 SK
kt: lte.ktfwing.com 또는 lte150.ktfwing.com
skt: lte.sktelecom.com
lgu+: internet.lguplus.co.kr
다른 통신사는 하지 않아서 잘 모르겠음
재실행을 하면
pi@CamPi:~ $ ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
ether dc:a6:32:38:d8:c4 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 30 bytes 19025 (18.5 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 30 bytes 19025 (18.5 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 10.11.xxx.1xx netmask 255.255.255.255 destination 10.64.64.64
ppp txqueuelen 3 (Point-to-Point Protocol)
RX packets 9 bytes 498 (498.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 9 bytes 366 (366.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.0.xxx netmask 255.255.255.0 broadcast 192.168.0.255
inet6 fe80::1370:a71d:a9ab:b87e prefixlen 64 scopeid 0x20<link>
ether dc:a6:32:38:d8:c5 txqueuelen 1000 (Ethernet)
RX packets 55 bytes 6863 (6.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 74 bytes 12563 (12.2 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
wwan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 169.254.xx.xxx netmask 255.255.0.0 broadcast 169.254.255.255
inet6 fe80::374d:1f3c:d9aa:1681 prefixlen 64 scopeid 0x20<link>
ether 3e:d6:10:61:2c:d5 txqueuelen 1000 (Ethernet)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 38 bytes 5430 (5.3 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
ppp0가 보입니다.
이러면 성공 !