Cov txheej txheem:

IOT BIT GSM V1.5 Lub kaus mom rau Raspberry Pi: 9 Kauj Ruam
IOT BIT GSM V1.5 Lub kaus mom rau Raspberry Pi: 9 Kauj Ruam

Video: IOT BIT GSM V1.5 Lub kaus mom rau Raspberry Pi: 9 Kauj Ruam

Video: IOT BIT GSM V1.5 Lub kaus mom rau Raspberry Pi: 9 Kauj Ruam
Video: Самый простой способ выровнять пол! Наливной пол за 20 минут. 2024, Hlis ntuj nqeg
Anonim
IOT BIT GSM V1.5 Lub kaus mom rau Raspberry Pi
IOT BIT GSM V1.5 Lub kaus mom rau Raspberry Pi

IOT BIT yog qhov kawg HAT uas ua rau koj Raspberry Pi muaj txiaj ntsig zoo nyob txhua qhov chaw. Peb qhov ntse HAT module muab GSM Txawb Cov Ntaub Ntawv rau Raspberry Pi, GPS cov ntaub ntawv qhia chaw thiab Bluetooth txuas. Nov yog qhov qauv zoo tshaj plaws rau hackers, kws tshawb fawb, thiab tus tsim khoom raws li nws muab rau koj Pi muaj zog sib txuas txhua qhov chaw koj nyob. Cias ntsaws peb tus qauv rau hauv koj li Raspberry Pi thiab pib ua si.

HAT tuaj yeem sib sau ua ke tau yooj yim nrog software ntawm koj lub operating system muab rau koj nkag mus rau cov ntaub ntawv dav dav hauv internet los ntawm lub xov tooj ntawm tes. Siv peb lub API lub kaus mom no muab lub peev xwm rau koj xa SMS (ntawv) cov lus thiab sib tham hauv Bluetooth. Peb tseem muab kev nkag tau yooj yim rau GPS onboard uas nthuav tawm cov ntaub ntawv chaw nyob.

HAT Nta:

  • Txhawb nqa ib qho micro sim, tsuas yog ntsaws koj daim npav SIM thiab mus.
  • Kev teeb tsa yooj yim, nrog ib qho lus txib dav dav, teeb tsa peb cov software kom hloov kho IOT BIT nrog koj li Raspberry Pi.
  • GSM Txawb Cov Ntaub Ntawv rau Raspberry Pi. Battery txhawb.
  • Tsa koj tus Pi lossis ua rau muaj xwm txheej nrog cov ntawv xov xwm.
  • Yeem sab nrauv kav hlau txais xov kom zoo dua qub.
  • Kev tswj hwm lub zog ua haujlwm siab txog li 3 amps.

Kauj Ruam 1: Dab tsi hauv Box?

Pob suav nrog:

  • 1 x GSM Board
  • 1 x GPS kav hlau txais xov
  • 1 x teeb liab kav hlau txais xov
  • 1 x Bluetooth kav hlau txais xov
  • 1 x USB cable rau micro USB
  • 1 Txuas mus rau cov lus qhia

Kauj Ruam 2: 40-Pin Header Layout

40-Pin Header Layout
40-Pin Header Layout

Cov txheej txheem ntawm 40-Pin header kom haum koj txoj haujlwm raws li nrog cov pins muaj.

Kauj Ruam 3: Muab IoT ntsis ua ke nrog Raspberry Pi

Muab IoT ntsis ua ke nrog Raspberry Pi
Muab IoT ntsis ua ke nrog Raspberry Pi
  • Raspberry Pi phab ntsa ntsaws rau hauv IOT BIT kom muaj zog ob IOT BIT thiab Raspberry Pi. (Koj tsis tas yuav tseem ntsaws rau hauv Raspberry Pi).
  • Muab 2 tus kav hlau txais xov thiab GPS kav hlau txais xov rau hauv IOT BIT.
  • Muab daim npav SIM tso rau hauv IOT BIT daim npav nrog daim ntawv txiav lub ntsej muag tig mus deb ntawm lub rooj tsavxwm (uas koj tuaj yeem yuav los ntawm ib tus muab kev pabcuam loj)

Kauj Ruam 4: Teeb Kho Raspberry Pi

Cheebtsam xav tau rau Raspberry Pi kom ua haujlwm tau zoo:

  • Raspberry Pi 2 lossis 3.
  • Saib xyuas.
  • Mouse thiab keyboard.
  • HDMI Cable.
  • Raspberry Pi Charger.
  • SD daim npav (ntau dua 8GB xav tau) nrog qhov hloov tshiab kawg ntawm Raspbian Jessie.

Phau ntawv qhia teeb tsa Raspberry Pi software tuaj yeem pom ntawm

Qhov hloov tshiab kawg ntawm Raspbian Jessie tuaj yeem pom ntawm

Kauj Ruam 5: IoT Ntsig Teeb Yooj Yim

Muaj ntau txoj hauv kev kom ua tiav qhov no. Thawj qhov yog rub tawm daim duab disk thiab nyem nws siv Win32 Disk Imager. Koj yuav xav tau daim npav SD uas yog 8GB lossis loj dua. Qhov txuas rau rub tawm yog hauv qab no:

Txhawm rau siv tig rau IoT Bit los ntawm kev txuas lub zog txuas mus rau USB chaw nres nkoj sau tias POWER. Thaum txuas nrog IoT Bit yuav ua rau lub zog Raspberry Pi.

Tsis tas li, koj tuaj yeem siv IOT BIT ntawm lub qhov rais system. Txhua yam koj yuav tsum ua yog siv cov tsav tsheb no thiab teeb tsa lawv:

Kauj Ruam 6: Kev ua haujlwm ntawm LEDs

Hwj chim (Ntsuab) - Cov Led no yuav tsum yog thaum IoT Bit txuas nrog ntawm USB thaum IoT Bit tau siv los ntawm roj teeb qhov kev coj no yuav tawm.

CHARGE (Xiav) - Led yog thaum IoT Bit txuas nrog ntawm USB thaum IoT Bit tau siv los ntawm roj teeb qhov kev coj no yuav tawm. Cov Led no tseem ua haujlwm ua qhov taw qhia thaum lub roj teeb tau them tas. Yog tias IoT Bit txuas nrog ntawm USB thiab lub roj teeb tau txuas nrog ib yam. Thaum lub roj teeb raug them lawm Led yuav tua.

ACTIVITY (Xiav) - Qhib thaum pib thaum nws tawm nws txhais tau tias lub modem tau npaj rau siv.

NET (Xiav) -Thaum nws tig los qhia tias IoT Bit tab tom nyeem daim npav SIM, thaum qhov coj no ntsais muag nrawm nws txhais tau tias tab tom nrhiav lub teeb liab xauv, thaum nws pib ntsais muag qeeb nws txhais tau tias nws tau xauv rau tus muab kev pabcuam lub Simcard.

RGB Led - Cov LED no yuav tig dawb thaum pib lub ntsiab lus tias pawg thawj coj tsis txuas nrog lub modem USB, tom qab ntawd lub teeb ua haujlwm yuav tig rau RGB yuav nyem ntsuab thiab tom qab ntawd xiav, qhov haujlwm thiab RGB yuav tua lub ntsiab lus ntawm lub modem yog npaj rau siv.

Kauj Ruam 7: Pab UAS Bus

IOTBit GSM HAT tsis muaj USB COM chaw nres nkoj interface, yog li ntawd, peb yuav siv UART los sib tham nrog nws. Yog li peb yuav tsum pab kom UART ntawm Raspberry pi. Peb yuav ua haujlwm nrog RPi 3 yog li cov lus qhia hauv qab no tshwj xeeb rau cov ntawv no. Yog tias koj siv cov laus raspberry pi thov hu rau peb rau kev txhawb nqa ntxiv.

Qhov no tuaj yeem ua tiav hauv ob txoj hauv kev:

Ua ntej, koj tuaj yeem siv peb tsab ntawv bash uas tuaj yeem pom ntawm no

nco ntsoov muab nws tso cai ua los ntawm kev ua:

$ chmod +x Uart_Enable_RPi3.sh Tom qab ntawd khiav nws los ntawm kev ua: $ sudo./Uart_Enable_RPi3.sh

Qhov thib ob, koj tuaj yeem ua nws tus kheej ua raws cov theem hauv qab no.

  1. Ua kom thaub qab ntawm koj cov kab ke tam sim no tsuas yog muaj dab tsi mus tsis raug !!!
  2. Qhib lub davhlau ya nyob twg thiab hom

    $ sudo nano /boot/config.txt

  3. ntxiv cov hauv qab no rau hauv cov ntawv

    • enable_uart = 1
    • dtoverlay = pi-miniuart-bt

      Duab
      Duab
    • Txuag cov ntaub ntawv siv ctrl-x ces y thiab nkag mus.
    • Tom ntej no qhib cov ntawv cmdline.txt siv cov lus txib hauv qab no.

      $ sudo nano /boot /cmdline.txt

    • Hloov kho cov ntaub ntawv kom cov ntsiab lus zoo ib yam li kab thib ob:

      • dwc_otg.lpm_enable = 0 console = serial0, 115200 console = tty1 root =/dev/mmcblk0p2 rootfstype = ext4 elevator = hnub tim rootwait

        Duab
        Duab
      • dwc_otg.lpm_enable = 0 console = tty1 paus =/dev/mmcblk0p2 rootfstype = ext4 of elevator = hnub tim rootwait

        Duab
        Duab
      • Tam sim no reboot lub system
      • Thaum koj tau rov pib dua lub tsheb npav UART yuav tsum tau qhib.
      • Txhawm rau sim siv qhov no:

        • $ sudo apt-tau nruab minicom
        • $ minicom -D /dev /serial0

          Nyob ntawm koj qhov Raspbian koj li UART chaw nres nkoj yuav yog ttyAMA0, ttyS0 lossis serial0. Yog tias koj siv Rasbian ncab nws yuav yog serial0.

        • Koj yuav tsum pom modem npaj txhij tas li.

          Duab
          Duab

Kauj ruam 8: Hloov kho Firmware

Cov kauj ruam no xav tau txij li tau muaj qhov hloov tshiab tshiab tsis ntev los no. Thaum UART tau qhib peb tau npaj txhij los rub tawm lub firmware tshiab. NCO NTSOOV, Nws yog ib qho tseem ceeb ntawm theem no, ua ntej txuas ntxiv, txhawm rau txhawb IoT Bit thiab Raspberry Pi ntawm nws tus kheej kom ua cov kauj ruam no.

Duab
Duab

Nkag mus rau IOTBit-GSM_Firmware_Update nplaub tshev koj tuaj yeem rub nws los ntawm

Siv davhlau ya nyob twg ua:

$ cd ~/IOTBit-GSM_Firmware_Update

$ sudo python Firmware_Updater_IOT.py

Duab
Duab

Tsab ntawv yuav nug koj txog qhov chaw nres nkoj txuas yog tias koj siv Raspbian ncab thiab siab dua koj tuaj yeem nkag /dev /serial0

Yog tias kev tshaj tawm tiav qhov kev zov me nyuam yuav sau thiab nyeem los ntawm ntau qhov chaw nco tom qab ntawd hais qhov tseeb

Duab
Duab

Kauj Ruam 9: Cov Lus Qhia Siv

Txhawm rau siv lub rooj sib tham yooj yim rub tawm Cov Piv txwv_Script.py thiab IOTBit_Library_GSM_Variant.py los ntawm GitHub repo:

Los ntawm cov piv txwv tsab ntawv, koj tuaj yeem sim ib txwm muaj AT cov lus txib hloov "AT+CPIN?" los ntawm koj cov lus txib, ntau AT lus txib rau SIM808 tuaj yeem pom hauv pdf txuas hauv tib GitHub repo.

Pom zoo: