Cov txheej txheem:

EcoPrinter: 7 Kauj Ruam
EcoPrinter: 7 Kauj Ruam

Video: EcoPrinter: 7 Kauj Ruam

Video: EcoPrinter: 7 Kauj Ruam
Video: nkauj ntsuag lub kuas muag daim 7 2024, Hlis ntuj nqeg
Anonim
Image
Image
EcoPrinter
EcoPrinter
EcoPrinter
EcoPrinter

Kev siv ntawv tau nce ntau heev thiab qhov cuam tshuam tsis zoo ntawm qhov no rau ib puag ncig yog qhov tseem ceeb. Tsis ntseeg, tam sim no yog lub sijhawm rau peb nqis tes ua thiab txo kev siv cov ntawv hauv peb lub neej txhua hnub. Tias yog vim li cas peb tab tom qhia txog ecoPrinter !!! Cov cuab yeej tshiab no uas yog kev siv ntawm Android Beam thiab USB Tshuab Luam Ntawv Gadget tuaj yeem pab peb hloov cov ntawv nyuaj nrog hloov cov ntaub ntawv. Thiab kwv yees dab tsi … qhov no tuaj yeem ua tiav tiav thiab ntawm tus nqi qis heev !!!

EcoPrinter yog lub cuab yeej uas tso cai rau tus neeg siv siv NFC raws tu qauv nrog Android Beam kev siv txhawm rau txhawm rau hloov txhua yam kev luam ua haujlwm mus rau lub xov tooj ntawm tes yam tsis tau ua qhov tsim nyog tshwj tsis yog qhib lub xov tooj ntawm tes! Los ntawm tus neeg siv lub zeem muag, lub ntsiab lus rau cov neeg uas xav tau txais cov ntaub ntawv ntawm lub xov tooj ntawm tes, tsis tas yuav tsum ua dab tsi ntxiv (ua haujlwm zoo ib yam li NFC Kev Them Nyiaj). Tsis muaj App teeb tsa, tsis teeb tsa, nws tsuas yog ua haujlwm "ua haujlwm". Los ntawm tus kws kho mob qhov kev xav txhua yam nws yuav tsum tau ua yog txuas ecoPrinter rau lub khoos phis tawj thiab khiav cov lus txib kom cuam tshuam nrog Microsoft Driver tsim nyog nrog lub cuab yeej (Tsis muaj tus tsav tsheb raug cai, tsis muaj rub tawm, tsis muaj kev teeb tsa - Tsuas yog kev hais kom ua). -cov txheej txheem thiab tom qab ntawd cov neeg siv tuaj yeem txaus siab rau cov txiaj ntsig ntawm ecoPrinter!

EcoPrinter yuav tsum tsis tsuas yog suav tias yog khoom siv rau tus kheej tab sis rau kev siv ua haujlwm ib yam. Xav txog tias yuav muaj txiaj ntsig zoo li cas yog tias txhua lub lag luam, koom haum lossis txoj cai siv ecoPrinter. Txhua daim ntawv txais nyiaj thiab lwm cov ntaub ntawv tseem ceeb yuav raug khaws tseg thiab teeb tsa ntawm koj lub xov tooj ntawm tes kom nkag tau yooj yim txhua lub sijhawm xav tau. Tsis ntseeg, los ntawm kev txiav kev siv cov ntawv tsis tsuas yog muaj txiaj ntsig zoo rau peb ib puag ncig tab sis tseem tuaj yeem pab cov neeg siv kom txuag nyiaj los ntawm ntawv thiab siv toner.

Nws yuav tsum tau sau tseg tias txhua tus ecoPrinter muaj tus lej tshwj xeeb uas tuaj yeem siv tau kom muaj kev siv tag nrho ntawm ib lub khw / qeb, kev tswj hwm koj lub xeev nyiaj txiag zoo dua, txawm tias sau los ntawm txhua tus neeg muag khoom.

EcoPrinter yuav tsis tsuas yog pab txo cov ntawv uas peb siv tab sis nws tseem yuav pab cov neeg siv teeb tsa thiab khaws lawv cov ntawv txais nyiaj, ntawv xa nyiaj, cov ntaub ntawv nrog qhov tsawg kawg ntawm kev mob siab rau uas xav tau los ntawm ob tog (tus siv & tus muab kev pabcuam)

EcoPrinter yog pov thawj ntawm lub tswv yim thiab tsuas yog qhov tsawg kawg nkaus liab qab tau piav qhia hauv no.

Wb mus tsis muaj ntawv !!!

Nws ua haujlwm li cas

  • Tus muab kev pabcuam (tus tswv ntawm lub cuab yeej) txuas tus ecoPrinter thiab cuam tshuam nrog tus tsav tsheb uas tsim nyog.
  • Tus muab kev pabcuam ntawm ecoPrinter ua haujlwm yooj yim xaiv cov ntawv yuav tsum luam tawm thiab xaiv ecoPrinter raws li lub tshuab luam ntawv nyiam.
  • Cov ntawv yuav xa mus rau Raspberry Pi thiab hloov pauv mus rau PDF.
  • WS2812B qhia rau tus neeg siv tias nws yog lub sijhawm los tso lub cuab yeej rau ecoPrinter
  • Tsis muaj lwm qhov kev cuam tshuam cov ntaub ntawv raug xa mus rau lub xov tooj ntawm tes ua PDF.

Kev piav qhia ntxaws ntxaws ntawm kev xa cov ntaub ntawv siv ecoPrinter (Lub ntsiab lus ntawm cov teeb pom kev sib txawv li cas)

  1. Txoj Haujlwm Luam tau raug xa los ntawm lub khoos phis tawj mus rau ecoPrinter (zoo ib yam li txheej txheem luam ntawv txheej txheem)
  2. Ntsuab lub teeb ntsuab cuam tshuam rau ecoPrinter txhais tau tias lub cuab yeej tau txais txoj haujlwm luam tawm thiab hloov cov ntawv mus rau hauv PDF.
  3. Lub teeb liab lub teeb liab txhais tau tias ecoPrinter tab tom tos NFC Device los txuas
  4. Lub teeb ntsuab lub ntsej muag cuam tshuam tom qab liab liab, txhais tau hais tias NFC kev sib txuas tau ua tiav thiab ecoPrinter tseem tos Bluetooth txuas
  5. Lub teeb xiav lub ntsej muag cuam tshuam, Bluetooth txuas tau pib thiab cov ntaub ntawv raug xa mus rau koj lub xov tooj ntawm tes.

Khoom siv

Rau tus muab kev pab

  • Raspberry PI Zero W (Yuav siv tau ua USB Gadget, thiab muaj WIFI thiab Bluetooth onboard)
  • PN532 NFCShield (lwm cov ntaub thaiv npog kuj tseem yuav ua haujlwm tau zoo rau Mr.

    Stephen Tiedemann, tus tsim lub tsev qiv ntawv nfcpy)

  • WS2812 5050 RGB 12 LEDs Nplhaib (yeem)

Rau tus neeg siv kawg

  • Android Ntaus nrog NFC kev ua haujlwm thiab Android version ntawm 9 (PIE) lossis yav dhau los.
  • Android Beam tau qhib los ntawm Device's Settings menu.

Kauj Ruam 1: Ua Kev Kho Vajtse Txuas

Ua Kev Sib Txuas Kho Vajtse
Ua Kev Sib Txuas Kho Vajtse
Ua Kev Sib Txuas Kho Vajtse
Ua Kev Sib Txuas Kho Vajtse
Ua Kev Sib Txuas Kho Vajtse
Ua Kev Sib Txuas Kho Vajtse

EcoPrinter kho vajtse teeb tsa tau yooj yim heev thiab yog raws li hauv qab no:

  1. Txuas NFC Pawg Thawj Coj, siv Raspberry's UART (GPIOs 14, 15). Muaj ntau hom NFC Boards sib txawv tab sis yuav luag txhua tus ntawm lawv txhawb nqa kev sib txuas lus. Xaiv pawg thawj coj uas tau sib xws nrog nfcpy tsev qiv ntawv thiab AVOID cov khoom siv uas txuas nrog USB vim tias Raspberry PI tsis tuaj yeem yog USB Host thiab USB Gadget tib lub sijhawm (Yog li nws yuav tsis ua haujlwm)
  2. Siv GPIO 18 ua DATA tus pin los tswj WS2812B coj vaj huam sib luag.
  3. Muab lub zog rau ob qho tib si los ntawm Raspberry PI.

Kauj Ruam 2: Npaj Raspberry

Npaj Raspberry
Npaj Raspberry
Npaj Raspberry
Npaj Raspberry
Npaj Raspberry
Npaj Raspberry
  1. Rub tawm Raspbian kawg (Version: Lub Ob Hlis 2020) los ntawm nplooj ntawv raug cai
  2. Npaj daim npav SD nrog Raspbian ua raws cov lus qhia los ntawm no
  3. Tsim cov ntawv tshiab nrog lub npe ssh (tsis txhob siv ib qho txuas ntxiv), hauv kev faib ua khau raj ntawm SD Card
  4. Tsim cov ntaub ntawv tshiab wpa_supplicant.conf, hauv kev faib ua khau raj ntawm SD Card thiab sau cov ntsiab lus hauv qab no:

    ctrl_interface = DIR =/var/run/wpa_supplicant GROUP = netdev

    update_config = 1 network = {ssid = "YOUR_WIFI_NETWORK_SSID" psk = "YOUR_WIFI_NETWORK_PASSWORD"}

  5. Ua raws cov kab hauv qab no thaum kawg ntawm cov ntawv teeb tsa.txt hauv kev faib ua khau raj ntawm SD daim npav

    # Pab kom muaj kev sib txuas lus txuas ntxiv - Nws yuav siv rau kev sib txuas lus nrog NFC Shield

    enable_uart = 1 # Teeb GPU nco rau 16 MB, tsuav peb tsis siv cov zaub gpu_mem = 16 # Pab kom dwc2 overlay txhawm rau hloov Raspi rau Tshuab Luam Ntawv Gadget dtoverlay = dwc2

  6. Tshem tawm cov ntawv hauv qab no los ntawm cov ntawv cmdline.txt hauv kev faib ua khau raj ntawm SD daim npav, txhawm rau txhawm rau txhawm rau siv kev siv console ntawm chaw nres nkoj txuas.

    console = serial0, 115200

  7. Nyab xeeb tshem SD-Card los ntawm koj lub computer, ntxig rau hauv Raspberry PI thiab khau raj.
  8. Tom qab kev teeb tsa khau raj ua tiav, ua raws cov txheej txheem tsim nyog rau koj Cov Txheej Txheem Ua Haujlwm (Windows, Windows 10, Mac lossis Linux) txhawm rau txuas rau lub cuab yeej siv SSH.
  9. Hloov kho Raspbian lub chaw cia khoom thiab software siv cov lus txib hauv qab no.

    sudo apt-tau hloov tshiab

    sudo apt -tau hloov tshiab -y

  10. Teeb tsa cov qauv tsim nyog kom raug thauj khoom ntawm txhua lub khau raj los ntawm kev siv cov lus txib hauv qab no:

    sudo ua

    ncha 'dwc2' >> /etc /modules echo 'libcomposite' >> /etc /modules tawm Tom qab ntaus ntawv sudo su, tus neeg siv qhia yuav hloov pauv thiab txhua cov lus txib yuav ua tiav raws li hauv paus.

  11. Koj tuaj yeem lees paub koj qhov kev ua los ntawm kev tso tawm cov ntaub ntawv /etc /modules

    miv /etc /modules

  12. Txhim kho cov tsev qiv ntawv xav tau rau WS2812B Neopixel Ring siv cov lus txib:

    sudo pip3 nruab rpi_ws281x adafruit-circuitpython-neopixel

Kauj Ruam 3: Hloov Raspberry PI mus rau Lub Tshuab Luam Ntawv Gadget

Hloov Raspberry PI mus rau Lub Tshuab Luam Ntawv Gadget
Hloov Raspberry PI mus rau Lub Tshuab Luam Ntawv Gadget
Hloov Raspberry PI mus rau Lub Tshuab Luam Ntawv Gadget
Hloov Raspberry PI mus rau Lub Tshuab Luam Ntawv Gadget
Hloov Raspberry PI mus rau Lub Tshuab Luam Ntawv Gadget
Hloov Raspberry PI mus rau Lub Tshuab Luam Ntawv Gadget
Hloov Raspberry PI mus rau Lub Tshuab Luam Ntawv Gadget
Hloov Raspberry PI mus rau Lub Tshuab Luam Ntawv Gadget
  1. Tsim cov npe uas yuav tuav cov ntawv teeb tsa

    sudo mkdir/usr/bin/nm_gadget

  2. Tsim USB Gadget configuration file

    sudo nano/usr/bin/nm_gadget/ecoPrinter

  3. Muab tshuaj txhuam lub tshuab luam ntawv teeb tsa

    #!/bin/tsoo

    #ecoPrinter Gadget #author: novamostra.com modprobe libcomposite cd/sys/kernel/config/usb_gadget/mkdir -p ecoPrinter cd ecoPrinter #Ntaus Cov Ntaub Ntawv echo 0x04a9> idVendor echo 0x1761> idProduct echo 0x0100> bcdDevice0 0x0200> bcdDevice0x0200 ncha 0x01> bDeviceSubClass ncha 0x01> bDeviceProtocol # Teeb Askiv Hauv paus mkdir -p cov hlua/0x409 ncho "10000001"> hlua/0x409/serialnumber echo "Novamostra"> hlua/0x409/chaw tsim khoom echo "ecoPrinter"> cov hlua/0x409/khoom p teeb tsa/c.1/hlua/0x409 ncho 120> teeb tsa/c.1/MaxPower mkdir -p ua haujlwm/tshuab luam ntawv.usb0 echo 10> muaj nuj nqi/tshuab luam ntawv.usb0/q_len echo "MFG: linux; MDL: g_printer; CLS: TSWV NTUJ; SN: 1; " > functions/printer.usb0/pnp_string echo "Conf 1"> configs/c.1/strings/0x409/configuration ln -s functions/printer.usb0 configs/c.1/ls/sys/class/udc> UDC

  4. Siv Ctrl + X qhov tseem ceeb ua ke los kaw cov ntawv
  5. Thaum nug kom txuag kev hloov pauv, nyem "y"
  6. Nias nkag mus txhawm rau hla xaiv lub npe tshiab rau cov ntawv.
  7. Ua kom cov ntaub ntawv teeb tsa ua tiav

    sudo chmod +x/usr/bin/nm_gadget/ecoPrinter

  8. Teeb tsa cov ntawv teeb tsa kom khiav ntawm khau raj los ntawm kev kho cov ntaub ntawv rc.local

    sudo nano /etc/rc.local

  9. Thiab ntxiv kab hauv qab no ua ntej lo lus "tawm"

    /usr/bin/nm_gadget/ecoPrinter

  10. Nruab Ghostscript uas yuav lis kev hloov pauv ntawm Postscript rau PDF

    sudo apt -tau nruab ghostscript -y

  11. Tam sim no lub tshuab luam ntawv tau npaj tiav. Fais fab tawm koj li Raspberry Pi:

    sudo poweroff ua

  12. Txuas ib lub xov tooj usb los ntawm Khoos phis tawj mus rau USB chaw nres nkoj (tsis yog lub hwj chim chaw nres nkoj) ntawm Raspberry PI. Koj tus PI yuav khau raj thiab ceeb toom txog lub cuab yeej tsis paub tshiab, yuav tshwm rau ntawm Windows.
  13. Hauv Tus Thawj Saib Xyuas Ntaus Ntawv ntawm koj lub Windows Computer, Raspberry PI yuav tshwm los ua cov khoom siv sib xyaw.

Kauj ruam 4: Teeb Tsav Tsheb ntawm Windows

Teeb tsa tus tsav tsheb ntawm Windows
Teeb tsa tus tsav tsheb ntawm Windows
Teeb tsa tus tsav tsheb ntawm Windows
Teeb tsa tus tsav tsheb ntawm Windows

Tom qab txuas lub ecoPrinter ntaus ntawv siv lub micro usb cable koj lub khoos phis tawj, qhib Command Prompt Window nrog Cov Cai Tswjfwm Ntiag Tug thiab khiav cov lus txib hauv qab no:

printui /yog /b "ecoPrinter" /f %windir %\ inf / ntprint.inf /m "Microsoft PS Class Driver" /r "USB001"

Qhov no yuav cuam tshuam nrog Microsoft PS Class Driver rau ecoPrinter, thiab lub tshuab luam ntawv tshiab yuav tshwm nyob hauv koj lub tshuab luam ntawv.

Yog tias tom qab ua haujlwm cov lus txib koj tau txais cov lus Kev ua haujlwm tsis tuaj yeem ua tiav (yuam kev 0x00000704), uas txhais tau tias lub cuab yeej tau teeb tsa ntawm lwm qhov chaw nres nkoj. Rov ua cov lus txib hloov pauv USB001 rau USB002 lossis USB003.

Yog tias tsis muaj qhov yuam kev tshwm sim uas txhais tau tias koj lub cuab yeej raug teeb tsa raug. Koj tuaj yeem lees paub qhov no, los ntawm kev qhib Tus Thawj Tswj Ntaus Ntawv thiab hauv qab Luam kab ntawv "ecoPrinter" ntaus ntawv muaj.

Kauj Ruam 5: Teeb Bluetooth Kev Sib Txuas

Teeb Bluetooth Kev Sib Txuas
Teeb Bluetooth Kev Sib Txuas

Teeb Obex FTP uas xav tau rau kev xa cov ntaub ntawv, siv cov lus txib

sudo apt-tau nruab obexftp

Nrhiav Raspberry Pi qhov chaw nyob bluetooth siv qhov hais kom ua

hciconfig

Tseem ceeb: Khaws ib daim ntawv ntawm Bluetooth MAC chaw nyob vim tias peb yuav siv nws hauv cov ntaub ntawv teeb tsa ntawm ecoPrinter uas xav tau rau Bluetooth Handover.

Kauj Ruam 6: Teeb NFC Kev Sib Txuas Lus

Teeb NFC Kev Sib Txuas Lus
Teeb NFC Kev Sib Txuas Lus

Cov cuab yeej no siv nfcpy lub tsev qiv ntawv los pib qhov kev sib txuas thiab ua kom tiav rau Bluetooth raws tu qauv.

Pib los ntawm kev txhim kho Python Pob Installer khiav cov lus txib hauv qab no:

sudo apt-tau nruab python3-pip -y

thiab tom qab ntawd nruab nfcpy tsev qiv ntawv siv cov lus txib hauv qab no:

sudo pip3 nruab nfcpy

Nco ntsoov tias txhua yam raug teeb tsa thiab kho vajtse sib txuas raug siv cov lus txib:

python3 -m nfc --search -tty

Koj lub cuab yeej yuav tsum tshwm ntawm serial/ttyS0

Kauj Ruam 7: Luam Cov Ntaub Ntawv Tsim Nyog Los Ntawm EcoPrinter Repository

Luam cov ntaub ntawv tsim nyog los ntawm EcoPrinter Repository
Luam cov ntaub ntawv tsim nyog los ntawm EcoPrinter Repository
Luam cov ntaub ntawv tsim nyog los ntawm EcoPrinter Repository
Luam cov ntaub ntawv tsim nyog los ntawm EcoPrinter Repository

Tam sim no koj Raspberry yog Lub Tshuab Luam Ntawv nrog Bluetooth thiab NFC ua haujlwm. Kauj ruam kawg yog txuas tag nrho cov khoom sib cais no mus rau qhov khoom kawg. Thawj install git:

sudo apt -tau nruab git -y

thiab tom qab ntawd clone ecoPrinter repository siv cov lus txib:

git clone

Kho cov ntaub ntawv ecoPrinter.conf thiab ntxiv koj lub cuab yeej Bluetooth MAC chaw nyob

sudo nano ecoPrinter/code/ecoPrinter.conf

Ua cov npe tshiab los khaws cov haujlwm luam tawm

mkdir ecoPrinter/chaws/luam tawm

Teem qhov kev tso cai tsim nyog rau daemon:

sudo chmod +x ecoPrinter/code/ecoPrinter.sh

Hloov kho lwm lub sijhawm rc.local cov ntaub ntawv:

sudo nano /etc/rc.local

Thiab ntxiv kab hauv qab no ua ntej lo lus "tawm"

/home/pi/ecoPrinter/code/ecoPrinter.sh

Nrog koj zoo siab !! Koj ecoPrinter tau teeb tsa tiav! Rov pib dua koj lub cuab yeej thiab koj npaj txhij mus !!!

[Hloov Kho] Tsib Hlis 2019: Txhua txoj haujlwm tam sim no tau siv lub teeb tsa.sh los ntawm ecoPrinter lub chaw cia khoom!

Pom zoo: