Cov txheej txheem:
- Kauj ruam 1: Yuav tsum tau ua
- Kauj Ruam 2: Txhim kho thiab ua kom pom lub Sensor's Firmware
- Kauj Ruam 3: Teeb Huab
- Kauj Ruam 4: Teeb tsa AWS Lambda
- Kauj Ruam 5: Teeb AWS Kinesis Firehose Data Stream
- Kauj Ruam 6: Teeb IAM Txoj Haujlwm rau Kinesis
- Kauj Ruam 7: Teeb tsa AWS EC2
- Kauj Ruam 8: Teeb IAM Kev Ruaj Ntseg Ruaj Ntseg rau EC2
- Kauj Ruam 9: Nkag Mus Rau Koj Li EC2
- Kauj ruam 10: Rov qab Google Maps API
- Kauj ruam 11: Launch Server
- Kauj Ruam 12: Ua HTTP Kev Sib Koom ntawm Cov Khoom Network
- Kauj Ruam 13: Ua Cov Ntaub Ntawv
- Kauj Ruam 14: Pom kev
- Kauj Ruam 15: Khab nias thiab Txuas Sab Nraud
Video: Kev Saib Xyuas Txoj Kev: 15 Kauj Ruam
2024 Tus sau: John Day | [email protected]. Kawg hloov kho: 2024-01-30 09:27
Hnub no peb yuav qhia koj li cas peb teeb tsa txoj kev tsis xws luag raws li kev ntsuas nrawm, LoRaWAN, Amazon Web Services thiab Google Cloud API.
Kauj ruam 1: Yuav tsum tau ua
- DISCO-L072CZ-LRWAN1 pawg thawj coj saib
- X-NUCLEO-IKS01A2 nthuav dav nthuav dav (rau lub ntsuas cua)
- X-NUCLEO-GNSS1A1 (rau kev hloov chaw)
- AWS account
- Tus lej Google Cloud Platform
Kauj Ruam 2: Txhim kho thiab ua kom pom lub Sensor's Firmware
Txuas IKS01A2 thiab GNSS1A1 nyob rau sab saum toj ntawm lub rooj tsavxwm los ntawm GPIO pins. Rub lub firmware tus lej los ntawm GitHub. Tsim (yog tias koj tsis muaj ib qho) tus as khauj ntawm ARM Mbed thiab ntshuam cov cai hauv repo ntawm online compiler. Teem lub hom phiaj platform rau DISCO-L072CZ-LRWAN1 thiab txuag txoj haujlwm. Tam sim no lub taub hau rau Cov Khoom Network thiab tsim ib tus as khauj yog tias koj tsis muaj nws lawm. Tsim daim ntawv thov, tsim cov cuab yeej tshiab hauv daim ntawv thov thiab teeb tsa hom kev sib txuas rau OTAA. Lob qhov tsis tsim nyog los ua cov hauv qab no hauv kab ntawv mbed_app.json: "lora.appskey", "lora.nwkskey", "lora.device-address".
Lub ntsuas yuav ntsuas cov ntaub ntawv ntsuas thiab GNSS cov ntaub ntawv ib ntus thiab xa lawv los ntawm LoRa kev txuas mus rau lub qhov rooj ze tshaj, uas yuav xa lawv mus rau peb daim ntawv thov ntawm Cov Khoom Network. Cov kauj ruam tom ntej yog teeb tsa huab server, thiab kev koom ua ke HTTP ntawm TTN.
Kauj Ruam 3: Teeb Huab
Tam sim no peb tau npaj los teeb tsa cov txheej txheem huab uas yuav sau thiab sib sau cov ntaub ntawv los ntawm txhua lub rooj xa ntawv. Cov txheej txheem no tau qhia hauv daim duab hauv qab no thiab nws tau tsim los ntawm:
- Kinesis, los daws cov ntaub ntawv nkag mus;
- Lambda, txhawm rau lim thiab npaj ua ntej cov ntaub ntawv ua ntej khaws cia;
- S3, khaws tag nrho cov ntaub ntawv;
- EC2, txhawm rau txheeb xyuas cov ntaub ntawv thiab tuav peb lub hauv ntej-kawg.
Kauj Ruam 4: Teeb tsa AWS Lambda
Peb yuav piav qhia cov kauj ruam tsim nyog los teeb tsa cov txheej txheem no, pib nrog Lambda.
- Nkag mus nrog koj tus lej AWS, thiab los ntawm console nplooj ntawv tseem ceeb thiab mus rau Lambda
- Nyem rau Tsim Cov Haujlwm
- Nyob rau sab saud ntawm nplooj ntawv nws yuav tsum raug xaiv Tus Sau los ntawm Kos. Tom qab ntawd ua tiav lwm cov haujlwm raws li hauv daim duab thiab tom qab ntawd nyem Tsim Ua Haujlwm
- Tam sim no koj tau tsim AWS Lambda ua haujlwm, mus rau https://github.com/roadteam/data-server thiab luam cov ntsiab lus ntawm aws_lambda.py cov ntaub ntawv rau hauv cov editor uas koj pom ib nrab ntawm nplooj ntawv. Koj li haujlwm Lambda tam sim no tau npaj lawm:)
Kauj Ruam 5: Teeb AWS Kinesis Firehose Data Stream
- Rov qab tam sim no rau AWS console nplooj ntawv tseem ceeb, thiab hauv Cov Kev Pabcuam mus rau Kinesis
- Tam sim no koj nyob hauv nplooj ntawv tseem ceeb ntawm Kinesis. Ntawm sab xis ntawm nplooj ntawv, hauv qab 'Kinesis Firehose xa cov kwj dej', xaiv 'Tsim cov kwj xa tshiab'
- Hauv 'Kev xa npe lub npe' sau 'txoj kev-saib xyuas-kwj'. Tawm ntawm lwm qhov chaw mus rau qhov tsis raug thiab nyem tom ntej
- Tam sim no nyob rau hauv 'Hloov pauv cov ntaub ntawv nrog AWS Lambda' xaiv Enabled, thiab raws li Lambda ua haujlwm nyem rau ntawm qhov tsim tshiab 'txoj kev-saib xyuas-lambda'. Tsis txhob txhawj xeeb yog tias muaj lus ceeb toom txog lub sijhawm ua haujlwm tshwm tuaj, vim tias kev ua haujlwm uas peb tab tom ua tsis raug suav nrog. Tawm ntawm lwm qhov chaw mus rau qhov tsis raug thiab nyem tom ntej
- Raws li lub hom phiaj xaiv Amazon S3, thiab raws li S3 lo lus xaiv xaiv Tsim Tshiab. Raws li lub npe thoob nkag mus 'txoj kev-saib xyuas-thoob' thiab tom qab ntawd mus. Tam sim no tawm ntawm lwm qhov chaw rau lub neej ntawd thiab nyem Tom ntej
- Koj tuaj yeem xav teeb tsa Qhov Loj rau 1MB thiab Lub Sij Hawm Tsis pub dhau 60 vib nas this. Qhov tsis tuaj yeem yuav yaug mus rau S3 thaum twg ib qho ntawm ob qhov xwm txheej txaus siab. Tsis txhob tawm ntawm nplooj ntawv, saib cov kauj ruam tom ntej
Kauj Ruam 6: Teeb IAM Txoj Haujlwm rau Kinesis
Tam sim no peb teeb tsa kev tso cai kev nyab xeeb rau Kinesis, txij li nws yuav tsum hu rau Lambda ua haujlwm rau kev npaj ua ntej thiab tom qab ntawd nws yuav sau rau ntawm S3
- Hauv qab ntawm nplooj ntawv uas koj nyob hauv 'IAM lub luag haujlwm' xaiv 'Tsim tshiab ntawm kev xaiv', tsim lub luag haujlwm IAM tshiab raws li hauv daim duab thiab nyem Cia
- Tam sim no koj tau rov qab mus rau nplooj ntawv dhau los, nyem tom ntej. Tam sim no koj tuaj yeem xav ntsuas ob zaug txhua qhov ntsuas. Thaum ua tiav nyem rau ntawm 'Tsim Kev Xa Dej'
Cov kav dej Kinesis-Lambda-S3 tab tom tab tom ua haujlwm!
Kauj Ruam 7: Teeb tsa AWS EC2
Tam sim no peb yuav teeb tsa ib qho piv txwv EC2 nrog qee qhov API uas yuav tso cai rau peb thawb thiab rub cov ntaub ntawv los ntawm AWS huab thiab tseem yog lub server rau qhov twg los tuav peb daim ntawv thov. Hauv kev tsim khoom ib puag ncig, koj yuav xav tshaj tawm API siv qhov ntau ntxiv AWS API Gateway.
- Los ntawm AWS console nplooj ntawv tseem ceeb, mus rau EC2 kev pabcuam
- Nyem rau Launch Instance
- Hauv qhov tshawb nrhiav sab sau muab tus lej no: 'ami-08935252a36e25f85', uas yog tus lej cim ntawm lub tshuab ua ntej tau teeb tsa ua ntej siv. Nyem Xaiv ntawm sab xis
- Xaiv t2.micro los ntawm kab ntawv 'Hom' thiab nyem 'Tshawb xyuas thiab tso tawm'. Tsis txhob tso qhov piv txwv tsis tau, mus rau kauj ruam tom ntej
Kauj Ruam 8: Teeb IAM Kev Ruaj Ntseg Ruaj Ntseg rau EC2
- Ua ntej tshaj tawm peb xav hloov kho pawg neeg ruaj ntseg ntawm peb qhov piv txwv. Txhawm rau ua qhov no, nyob rau sab xis ntawm ntu 'Pawg Pawg Ruaj Ntseg' nyem 'Kho kom raug pawg ruaj ntseg' teeb tsa pab pawg ruaj ntseg tshiab raws li hauv qab no. Qhov no pib teeb tsa lub firewall ntawm koj qhov piv txwv nthuav tawm chaw nres nkoj 22 rau SSH kev txuas thiab chaw nres nkoj 80 rau http cov kev pabcuam
- Nyem dua 'Tshawb xyuas thiab Tua tawm'. Tam sim no xyuas tias txhua qhov ntsuas tau teeb tsa. Thaum ua tiav nyem Launch
- Nyem rau ntawm lub qhov rai tshiab yuav tshwm tuaj teeb tsa tus yuam sij khub rau ssh txuas nrog rau qhov piv txwv. Xaiv 'Tsim tus yuam sij tshiab' thiab raws li lub npe nkag 'ec2-txoj kev-saib xyuas'. Nyem Download tus yuam sij khub. Nws yog ib qho tseem ceeb heev uas cov ntaub ntawv no ploj lossis (zuj zus) tau khaws cia yam tsis muaj kev nyab xeeb: koj yuav tsis tuaj yeem rub tus yuam sij ntxiv. Thaum rub tawm qhov tseem ceeb.pem piv txwv yog npaj los pib
Kauj Ruam 9: Nkag Mus Rau Koj Li EC2
Koj qhov piv txwv EC2 tshiab tau nce hauv AWS huab. Koj tuaj yeem txuas rau nws nrog cov ntaub ntawv tseem ceeb rub tawm ua ntej (rau qhov kev qhia no peb xav tias koj paub qhov pib ntawm ssh). Koj tuaj yeem khaws qhov piv txwv IP los ntawm kev xaiv nws hauv lub dashboard hauv ntu 'Nqe lus piav qhia' raws li hauv qab no: Koj tuaj yeem siv ob qho tib si koj tus IP lossis koj tus pej xeem DNS nws zoo ib yam. Nrog tus neeg siv ssh tam sim no nkag mus rau cov lus txib:
ssh -i ec2-road-monitoring.pem ec2-user@YOUR-IP-ADDR-OR-DNS
qhov twg ec2-txoj kev-xyuas.pem yog koj qhov tseem ceeb tsim ua ntej.
Tam sim no npaj mus rub tus server-sab chaws hla
git clone-ua tau zoo
Kauj ruam 10: Rov qab Google Maps API
Peb yuav luag tiav. Tam sim no peb yuav tsum teeb tsa google maps API hauv peb nplooj ntawv html txhawm rau nthuav qhia daim ntawv qhia nrog cov ntsiab lus rau cov neeg siv:
- Nkag mus rau koj tus lej Google thiab mus rau
- Nyem rau 'Pib Pib' nyob rau sab laug ntawm nplooj ntawv
- Xaiv 'Maps' hauv cov ntawv qhia zaub mov thiab tom qab ntawd nyem txuas ntxiv
- Raws li lub npe project nkag mus rau 'txoj kev saib xyuas' thiab nyem Next
- Sau koj cov ntaub ntawv them nqi thiab nyem Txuas ntxiv
- Tam sim no koj txoj haujlwm tau npaj tiav thiab peb yuav tau txais tus lej API los ntawm txhaj rau APIs & Cov Kev Pabcuam -> Ntawv Pov Thawj
Kauj ruam 11: Launch Server
Thiab nyob ntawd nws yog koj tus lej API. Qhov kawg koj yuav tsum tau ua yog mus rau data_visualization/anomalies_map.html thiab luam koj tus yuam sij mus rau qhov kawg ntawm cov ntaub ntawv zoo li, hloov 'KOJ-KEY-HERE'
Tam sim no txhua yam tau teeb tsa thiab npaj mus! Txhawm rau kom nws pib ua haujlwm hauv EC2 piv txwv: 'cd data-server' 'python flask_app.py'
Nkag mus rau hauv koj tus browser lub ip lossis dns chaw nyob ntawm koj li EC2 piv txwv, koj yuav tsum pom daim ntawv qhia tsis sib xws nrog qee cov ntaub ntawv dag
Kauj Ruam 12: Ua HTTP Kev Sib Koom ntawm Cov Khoom Network
Tam sim no peb muaj txhua qhov kev txhawb nqa rov qab thiab ua haujlwm peb tuaj yeem ua tiav los ua HTTP kev koom ua ke.
- Tsim daim ntawv thov tshiab thiab sau npe koj lub cuab yeej. Peb xav tias kev paub pib ntawm TTN, yog tias tsis xa mus rau phau ntawv qhia pib sai
- Hauv koj daim ntawv thov zaub mov xaiv 'Kev Sib Koom' thiab tom qab ntawd 'ntxiv kev koom ua ke'
- Xaiv HTTP kev koom ua ke
- Nkag mus rau cov teb tom qab daim duab thiab hloov pauv nrog koj li EC2 ip lossis pej xeem DNS
Kauj Ruam 13: Ua Cov Ntaub Ntawv
Rau txhua qhov tuple ntawm cov ntaub ntawv T sau los ntawm lub ntsuas koj yuav tsum ua cov hauv qab no:
- Tau txais cov txheej tuples uas muaj GPS tswj hwm poob hauv thaj tsam ntawm T. Hauv cheeb tsam hauv cheeb tsam yog txhua qhov tuples uas yog 100 metres ncig T.
- Rau txhua qhov nyob ze tuple N laij cov xwm txheej ntawm tus accelerometer Z-axis hauv N. Hauv pseudocode: mean = sum ([x. Z_accel ** 2 rau x nyob ze]) / near.size
- Suav tus qauv sib npaug sib txawv. Hauv pseudocode: std = sum ([(x. Z_accel ** 2 - txhais tau) ** 2 rau x nyob ze])
- Cov zis hauv hom ntawv no: lat, ntev, Z_accel ** 2, txhais tau tias, std
Txhawm rau suav thaj tsam hauv zos siv GPS nrug deb li cas hauv metres. Hauv C ++:
#define D2R (M_PI / 180.0)
#define EARTH_RAY 6371 ob npaug nrug (ob lat1, ob zaug ntev 1, ob lat2, ob zaug ntev2) {ob dlong = (long2 - long1) * D2R; ob dlat = (lat2 - lat1) * D2R; ob a = pow (sin (dlat/2.0), 2) + cos (lat1 * D2R) * cos (lat2 * D2R) * pow (sin (dlong/2.0), 2); ob npaug c = 2 * atan2 (sqrt (a), sqrt (1-a));
Tam sim no, siv cov ntaub ntawv nruab nrab uas tsim tawm hauv cov kauj ruam dhau los, txheeb xyuas qhov tsis sib xws thiab ua qhov tsis paub qab hau kev siv qhov kev txiav txim siab no siv rau txhua kab:
kab = daim ntawv qhia (ntab, line.split (","))
v = kab [2] txhais tau tias = kab [3] std = kab [4] yog v (txhais + std*3): yog v (txhais + std*2): yog v (txhais + std): o.append ([1, kab [0], kab [1]) lwm: o.append ([2, kab [0], kab [1]) lwm: o.append ([3, kab [0], kab [1]))
Qhov tsis xws luag raug cais los ntawm kev siv 68-95-99.7 txoj cai
Tam sim no koj muaj kev sau nrog hom ntawv no [hom, lat, ntev].
Lub ntsiab lus hom yog cov hauv qab no:
- Me ntsis anomaly, tej zaum tsis muaj feem cuam tshuam
- Qhov nruab nrab qhov txawv txav
- Qhov tsis txaus ntseeg
Kauj Ruam 14: Pom kev
Txhawm rau nkag siab thiab tej zaum hloov pauv qhov pom kev peb yuav tsum kawm paub siv tus cim kev cai, tus yam ntxwv ntawm Google Maps API
Ua ntej, daim ntawv qhia yuav tsum tau pib ua hauv kev hu rov qab:
muaj nuj nqi initMap () {
cov ntaub ntawv = queryData (); map = new google.maps. Map (document.getElementById ('map'), {zoom: 15, center: {lat: data [0] [1], lng: data [0] [2]}}); lus (); }
Qhia lub npe ntawm qhov kev hu rov qab hauv qhov url (peb tso rau ntawm no ua ntej peb tus lej API) hauv HTML tag:
tsab ntawv async defer src = "https://maps.googleapis.com/maps/api/js?key=[KEY]&callback=initMap"
Lub cim tuaj yeem tso rau hauv daim duab qhia chaw thaum tsim cov khoom:
google.maps. Marker tshiab ({txoj haujlwm: {lat: LATITUDE, lng: LONGITUDE}, daim ntawv qhia: daim duab qhia chaw, cim: "/path/to/icon.png"})
Koj tuaj yeem pom hauv cov cai uas rau txhua cov ntaub ntawv hauv cov ntaub ntawv ntawm qhov tsis sib xws lub cim tau muab ntxig (saib cov lus hais () muaj nuj nqi) thiab lub cim yog ua raws ntawm chav kawm ntawm qhov tsis xws luag. Thaum khiav qhov no mus rau qhov browser peb tuaj yeem tshawb xyuas daim ntawv qhia chaw uas qhov txawv txav tuaj yeem raug lim siv lub npov, raws li pom hauv daim duab.
Kauj Ruam 15: Khab nias thiab Txuas Sab Nraud
Txoj haujlwm no yog tsim los ntawm Giovanni De Luca, Andrea Fioraldi thiab Pietro Spadaccino, thawj xyoo MSc hauv Engineering hauv Computer Science cov tub ntxhais kawm ntawm Sapienza University of Rome.
-
Xaub cov kws sau ntawv siv los nthuav qhia qhov pov thawj ntawm lub tswvyim no:
www.slideshare.net/PietroSpadaccino/road-m…
-
GitHub repos nrog txhua tus lej:
github.com/roadteam
Pom zoo:
Kev Saib Xyuas Tus Kheej Ntiag Tug Hacked Los Ntawm Cov Laus LCD Saib: 7 Kauj Ruam (nrog Duab)
Kev Saib Xyuas Tus Kheej Ntiag Tug Los Ntawm Lub Luag Qub LCD: Thaum kawg koj tuaj yeem ua qee yam nrog lub qub LCD saib uas koj muaj hauv lub nkas -las. Koj tuaj yeem tig nws mus ua tus saib xyuas ntiag tug! Nws zoo nkaus li dawb rau txhua tus neeg tshwj tsis yog koj, vim tias koj hnav "khawv koob" tsom iav! Txhua yam koj yuav tsum muaj yog pa
Kev Nyuaj Siab: Kev Saib Xyuas thiab Saib Xyuas Ntxiv rau Kev Teeb Meem: 9 Cov Kauj Ruam
Hard Drive: Kev Saib Xyuas thiab Kev Saib Xyuas Ntxiv Teeb Meem: Daim duab saum toj no yog Hard Drive ib txwm muaj. Cov no yog cov tsav tsheb feem ntau siv niaj hnub no, tab sis tsis tas yuav nrawm tshaj. Tib neeg siv tus tsav no rau nws tus nqi qis dua gigabyte thiab lub neej ntev dua. Phau ntawv qhia no yuav qhia koj txog qhov sib txawv
Kev Kawm Lub Plawv Tus Kheej Saib Xyuas Zaum Saib: 19 Cov Kauj Ruam (nrog Duab)
Kev cob qhia Lub Plawv Tus Kheej Saib Xyuas Zaum Saib: Tsev Kawm Qib Siab yog lub sijhawm nyuaj thiab ntxhov siab hauv ib tus neeg lub neej, yog vim li ntawd nws thiaj tseem ceeb heev kom koj qhov kev nyuaj siab nyob qis. Ib txoj hauv kev peb nyiam ua qhov no yog los ntawm kev ua haujlwm, nws pab ua kom koj lub siab meej thiab lub cev zoo. Tias yog vim li cas peb tsim lub portabl
Kom Tau Tshuaj Tiv Thaiv lossis Tsis? Txoj Haujlwm Saib Xyuas Kev Tiv Thaiv Kab Mob Los Ntawm Kab Mob Simulation: 15 Kauj Ruam
Kom Tau Tshuaj Tiv Thaiv lossis Tsis? Txoj Haujlwm Saib Xyuas Kev Tiv Thaiv Kab Mob Los Ntawm Kab Mob Simulation: Txheej txheem cej luam ntawm Txoj Haujlwm: Peb txoj haujlwm tshawb nrhiav pab pawg tiv thaiv kab mob thiab vam tias yuav txhawb cov tib neeg kom txhaj tshuaj tiv thaiv kom txo tus kab mob hauv peb cov zej zog. Peb txoj haujlwm sim ua li cas tus kab mob kis rau cov pejxeem nrog feem pua sib txawv ntawm kev txhaj tshuaj tiv thaiv kab mob
3 Txoj Kev Tsis Ncaj Ncees kom Tau Tus Thawj Coj Saib Xyuas Kev Ruaj Ntseg ntawm Windows XP lossis Vista: 3 Kauj Ruam
3 Txoj Kev Tsis Ncaj Ncees kom Tau Tus Thawj Coj Saib Xyuas Kev Ruaj Ntseg ntawm Windows XP lossis Vista: Cov lus qhia no yuav qhia koj 3 txoj hauv kev txhawm rau nrhiav tus password rau ib tus account hauv computer. Cov phiaj xwm 3 no yog Cain thiab Abel, OphCrack, thiab OphCrack Live Cd