Cov txheej txheem:

Lub Hnab Hluav Taws Xob: 3 Kauj Ruam
Lub Hnab Hluav Taws Xob: 3 Kauj Ruam

Video: Lub Hnab Hluav Taws Xob: 3 Kauj Ruam

Video: Lub Hnab Hluav Taws Xob: 3 Kauj Ruam
Video: Tus Cawm Seej Hloov Neeg Txoj Hmoo (HD) 2024, Hlis ntuj nqeg
Anonim
Hnab Hauv Hnab
Hnab Hauv Hnab

NCO TSEG: Tam sim no kuv muaj Cov Ntawv Qhia uas muab Arduino code rau RC522 thiab PN532.

Hauv kuv qhov tshaj tawm yav dhau los Kuv tau piav qhia qhov tseem ceeb rau kev sib txuas lus nrog MFRC522 thiab PN532 RFID cov qauv nyeem/sau cov ntaub ntawv los ntawm Mifare Classic 1k cim npe. Hauv kab ntawv no kuv coj nws ib kauj ruam ntxiv thiab qhia yuav siv cov qauv ntawd li cas los tsim lub hnab nyiaj hluav taws xob tawm ntawm cov cim npe. Ib yam li cov ntawv tshaj tawm dhau los, qhov no tau nthuav tawm raws li kev siv yooj yim tab sis yuav tsum muab lub hauv paus rau ntau yam kev thov uas xav tau kev nce qib/kev txo qis lossis suav cov haujlwm.

Kauj Ruam 1: Kev Ncaj Ncees Cov Ntaub Ntawv

Rau lub hnab nyiaj hluav taws xob ib txwm muaj kev txhawj xeeb tias ib tus neeg tuaj yeem ntxiv cov qhab nia yam tsis tau them nyiaj rau lawv. Kuj tseem muaj kev txhawj xeeb tias cov qhab nia ntawm daim ntawv tuaj yeem ua tsis ncaj ncees thaum lub sijhawm sau cov ntaub ntawv. Kev nkag mus siv cov ntaub ntawv xav tau siv tus lej tseem ceeb yog li nws yog qhov tsim nyog los hloov tus yuam sij thaum lub npe pib ua ntej. Muaj cov ntawv online uas tham txog yuav ua li cas hack ib daim ntawv txawm tias koj tsis paub tus yuam sij tab sis cov txheej txheem tsis tseem ceeb. Kuv yuav tsis pom zoo siv cov cim npe no rau koj tus as -qhauj hauv txhab nyiaj tab sis lawv zoo txaus rau ntau qhov kev thov pheej hmoo tsawg.

Qhov tshwm sim ntawm cov ntaub ntawv tsis ncaj ncees yog qhov me me tab sis software yuav tsum muaj peev xwm tsawg kawg los daws qhov teeb meem yooj yim. Cov txheej txheem no cuam tshuam nrog ob kauj ruam nrog thawj kauj ruam txhawm rau txheeb xyuas qhov kev ua tsis ncaj. Hauv qhov haujlwm no uas tau ua los ntawm kev khaws cia ob qho txiaj ntsig credit nrog rau 1 qhov ua tiav ntawm tus nqi qiv nyiaj. Uas tso cai rau kev sib piv yooj yim ntawm qhov muaj nuj nqis. Cov kauj ruam thib ob yog khaws cov ntaub ntawv khaws tseg ntawm ob qho nuj nqis thiab nws qhov ua tiav. Qhov ntawd tso cai rau kev rov ua haujlwm yog tias thawj cov qhab nia tau txais kev puas tsuaj. Yog tias ob qho tag nrho tau ua tsis zoo ces lub software tau sim rov ua dua daim ntawv uas ua rau poob tag nrho cov qhab nia.

Kauj ruam 2: Kho vajtse

Kho vajtse
Kho vajtse

Cov khoom siv sib txuas tau qhia hauv daim duab saum toj no. Nov yog qhov teeb tsa zoo ib yam li cov ntawv tshaj tawm yav dhau los nrog kev ntxiv ob lub keyboards thiab rub tawm qhov tawm tsam. Ib qho hloov pauv tsis xav tau rub tawm tus neeg tawm tsam vim tias nws nyob ntawm PIC cov tswv yim uas muaj peev xwm rub tawm tsis muaj peev xwm ua tau. Qhov pib hloov pauv yog nyob ntawm yeem (ua phau ntawv qiv nyiaj xoom) vim tias lub software tuaj yeem tshawb pom thiab pib ua cov ntawv tshiab ntawm nws tus kheej. Jumper pins tuaj yeem siv hloov chaw.

Kauj ruam 3: Software

Ntxiv rau lub voj tseem ceeb hauv software tau tsim los tso cai rau kev nyeem ntawv ntawm ob qhov hloov pauv thiab txhawm rau txheeb xyuas qhov xwm txheej uas xav tau kev pib ua ntej. Raws li tau hais hauv ntu kho vajtse, daim pib pib tuaj yeem ua tus kheej hais kom ua nrog kev hloov pauv. Lub software tseem tuaj yeem hais kom ua lub npe pib ua ob qhov xwm txheej. Ua ntej, yog tias nws pom ib daim ntawv tshiab lossis cov ntaub ntawv thiab thib ob, yog tias ob pawg ntawm cov ntaub ntawv qiv nyiaj tsis raug.

Kev lees paub ntawm cov cim npe xav tau siv "qhov tseem ceeb A" rau cov phiaj xwm cov ntaub ntawv. Lub hauv paus tseem ceeb rau Mifare Classic 1k cov cim npe yog "FF FF FF FF FF FF" tab sis yuav tsum tau hloov pauv rau koj daim ntawv thov. Lub software muab cov ntsiab lus rau ob qho tib si yuam sij thiab tus yuam sij tshiab (“My_Key”). Tsuas yog ntsaws qhov tseem ceeb koj xav tau rau hauv "My_Key". Lub software ib txwm sim ua ntej txheeb xyuas qhov cim npe siv "My_Key". Yog tias qhov tsis ua tiav, tom qab ntawv cov txheej txheem pib ua ntej yog hu ua thiab tus yuam sij pib yog siv rau kev txheeb xyuas qhov tseeb. Kev pib ua haujlwm niaj hnub hloov tus yuam sij rau "My_Key" thiab teeb tsa cov qhab nia rau xoom. Yog tias koj muaj daim ntawv cim nrog tus yuam sij tsis yog lub hauv paus thiab koj tsis paub tias nws yog dab tsi, tom qab ntawd daim ntawv tsis tuaj yeem lees paub qhov tseeb. Yog tias qhov no tshwm sim koj yuav xav tshawb xyuas lwm cov ntaub ntawv siv lub hauv paus yuam sij los saib seb puas muaj ib qho. Cov Trailer thaiv, Cov ntaub ntawv thaiv, thiab Cov thaub qab thaiv tau txhua yam tau piav qhia thaum pib ntawm cov npe software yog li koj tuaj yeem hloov pauv tau yooj yim.

Cov hom ntawv rau cov ntaub ntawv khaws tseg rau hauv daim ntawv rau daim ntawv thov no siv tsuas yog tus lej zoo (tsis muaj qhov tsis txaus tso cai) thiab cov txiaj ntsig tau khaws cia ua plaub bytes ntawm ntim BCD (Binary Coded Decimal). Qhov ntawd tso cai rau credit ntau los ntawm 0 txog 99, 999, 999 (ob tus lej ib byte). Tus nqi qiv nyiaj thiab nws 1 qhov ua tiav tsuas yog siv 8 ntawm 16 bytes hauv ib qho ntaub ntawv thaiv thiab qhov seem yog padded nrog xoom. Muaj chav nyob hauv tib cov ntaub ntawv thaiv rau cov ntawv theej tab sis kuv txiav txim siab tias nws yuav muaj kev nyab xeeb dua los tso cov thaub qab hauv cov ntaub ntawv cais. Cov thaub qab thaub qab yog nyob hauv tib txoj haujlwm raws li cov ntaub ntawv thaiv yog li yuav tsum tsis muaj pov thawj tseeb. Txhawm rau kom muaj kev nyab xeeb dua koj tuaj yeem txiav txim siab tso cov thaub qab hauv cov ntaub ntawv sib txawv tab sis tom qab ntawd yuav tsum tau cais cov ntawv pov thawj qib yuav tsum tau nkag mus rau cov ntaub ntawv ntawd.

Thaum nyeem tiav ntawm cov qhab nia qhov ua tiav tus lej tseem tau nyeem thiab tom qab ntawd ob qho sib piv sib piv. Yog tias muaj qhov tsis sib xws, tom qab ntawv teeb tsa tus nqi/ua tiav tau nyeem thiab sib piv. Yog tias lawv sib haum ces cov thaub qab xav tias raug thiab raug siv los kho cov ntaub ntawv tsis raug. Yog tias cov ntawv theej tawm tsis sib xws ces cov cim npe tau pom tias tsis zoo thiab kev sim ua rau rov pib dua nws.

Qhov nce thiab nqis qhov tseem ceeb tau hais tseg nyob ze ntawm xub ntiag ntawm cov npe thiab cia siab tias yuav ntim hauv BCD. Cov txheej txheem uas ua kom nce ntxiv thiab txo qis ua tau zoo ua rau tus lej 32-ntsis. Kev ua lej yog qhov yooj yim heev tab sis xav kom siv kev ua haujlwm txhawm rau kho cov txiaj ntsig rau nqa hauv txhua pob BCD byte thiab los ntawm ib byte mus rau lwm qhov. Qhov ntawd ua tiav los ntawm kev siv macros DAA (Decimal Adjust Addition) thiab DAS (Decimal Adjust Subtraction). Cov macros no kom ntseeg tau tias txhua 4-ntsis BCD tus lej ib txwm nyob hauv thaj tsam 0-9.

Ntxiv rau cov lus pom hauv kab lus dhau los, daim ntawv thov no muaj cov lus rau ntau qib ntxiv - tshwj xeeb yog tias muaj cov ntaub ntawv yuam kev thiab/lossis daim ntawv yuav tsum tau kho lossis pib ua. Cov qhab nia kuj tseem tso tawm ua ntej thiab tom qab nce qib/nqis qis kom koj tuaj yeem pom qhov txiaj ntsig hloov.

Nov yog nws rau kab ntawv no. Txheeb xyuas kuv lwm cov phiaj xwm hluav taws xob ntawm: www.boomerrules.wordpress.com

Pom zoo: