Kako narediti svoje Bitcoin Lightning Network Node Mobile PlatoBlockchain Data Intelligence. Navpično iskanje. Ai.

Kako narediti svoje Bitcoin Lightning Network Node mobilno

Now you can take the Bitcoin Layer 2 implementation wherever you go, giving you the ability to transmit sats everywhere!

This is an opinion editorial by Anthony Feliciano, a Bitcoin events organizer and contributor at Bitcoin Magazine.

Ta članek je nadaljevanje prejšnji članek, ki sem ga napisal, ki govori o različnih vrstah vozlišč Lightning. Razširil bom na RaspiBlitz Lightning Network node. I won’t be going into the many other options and features of what RaspiBlitz offers, but this is a unique twist.

This project started four years ago when I was sitting in my apartment, midday, and the power suddenly went out. The first thing that goes through a normal person’s mind, is “damn it, power’s out — I wonder how long is it going to take and do I need to start looking in the fridge to possibly BBQ what might defrost?”

Jaz ne! Takoj sem pomislil: "MOJ VOZIL STRELE!" Skratka, elektrike ni bilo le nekaj ur. Toda takrat me je spodbudilo razmišljanje, če se kaj takega ponovi, kaj lahko storim?

Sledil je projekt, ki mi je sledil pri postavitvi vozlišča RaspiBlitz LN. Ta projekt je ugotoviti način, kako ohraniti delovanje vozlišča LN, ko zmanjka energije in interneta.

Težave, ki jih je treba rešiti za:

  1. Power — what can I use to keep the LN node running during the next power outage?
  2. Internet — how do I keep the LN node connected to the internet to keep LN sync’d ?
  3. Mobility — what if there was a fire or emergency and I had to leave, taking only what I can carry?

moč

If you read through the issues, you yourself are probably already also thinking about solutions. The first problem is easy to solve – obtain an uninterruptible power supply (UPS) as a backup. Makes sense right? If the power goes out, UPS kicks on and keeps the device’s power on with no issues. Only follow-up question is, how long do you need? There are many UPSs on the market providing power for any number of hours, so at that point it becomes a matter of preference and budget. I went for an approximately two-hour power supply UPS model. At the time I had nothing, so this was still new to me and had never crossed my mind. While not the longest charge or most powerful UPS out there, the UPS I selected only provides backup power to my LN node and my router; if I lose internet, I can still keep my router power going and connect via a Secure Shell (SSH) na moje naprave v omrežju. Prva težava rešena.

Internet

**Note** The following solution is based upon if you are using a WiFi setup to begin with. If you are using the Ethernet cable, you can still add the WiFi network as a backup from the steps below. Also, if you keep your router powered up by a UPS, this doesn’t always mean you lose internet in a power outage, as this will depend upon whether your provider is affected as well. This method is for a greater area power outage or emergency situation, and will contribute to solving the third problem — mobility.

Internet in vzdrževanje povezljivosti

Medtem ko vse skrbi moč, in to upravičeno, mnogi pozabljajo na drugi najpomembnejši del - internetno povezavo. Kako ohranim to napravo povezano, če pride do izpada električne energije? Enostavno - takrat sem začel raziskovati; na srečo, ker uporabljam a Raspi 4 ki ima vgrajen WiFi, lahko s preprosto konfiguracijo datoteke WiFi dodate drugo omrežje WiFi.

Kako nastaviti drugo omrežje na vašem Raspiju:

Pojdite na to stran za več informacij: Nastavite WiFi na Raspi

To je vrstica kode, ki jo iščete:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

**OPOMBA** Če ne uporabljate WiFi in namesto tega uporabljate RJ45 (Ethernet), vaša datoteka wpa_supplicant.conf morda nima te kode na vrhu; če manjka dodaj:

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

update_config = 1

country=US – **Change your country code if outside the United States**

Če želite vnesti to kodo, zapustite meni RaspiBlitz na terminalski zaslon, ki bi moral izgledati takole:

admin@NODEIPADDRESS:~ $

Vnesite kodo, ki bo videti takole spodaj:

admin@NODEIPADDRESS:~ $ sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

I won’t be showing my configuration, but you will see your setup when you open the file. I took this from the “Set up WiFi on Raspi” link above. 

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

update_config = 1

država=ZDA

omrežje = {

ssid=”SchoolNetworkSSID”

psk=”passwordSchool”

id_str=”school”

}

omrežje = {

ssid=”HomeNetworkSSID”

psk=”passwordHome”

id_str=”home”

}

Kar boste videli v svoji datoteki, je vaše omrežje WiFi, ki ga že uporabljate. Tisto, kar dodajaš, je tisto drugo omrežje. Torej, kaj je vaše drugo omrežje? Mislim, na koliko točk WiFi se lahko povežete? Ali poznate SSID (identifikator niza storitev) and the password to connect to them? In my instance, I used my cellphone’s hotspot. That’s right, you can use your cellphone as a hotspot to act as WiFi, so that your LN node can connect to it. So for the second network on the list, I entered my SSID and the password that is given by my cellphone hotspot feature.

Vprašanje — kaj pa, če uporabljam dostopno točko svojega mobilnega telefona? Kako bom izvedel naslov IP za povezavo z njim? Ne skrbite, tudi to vam nudim. Na svoj telefon (uporabljam Android) prenesite aplikacijo, imenovano termius ki deluje kot terminal SSH od vašega mobilnega telefona do vaše LN naprave.

**Opomba** Če imate na vašem RaspiBlitzu zaslon, se bo naslov IP za povezavo prikazal tudi tam, kar pomeni, da ste pravilno vnesli drugo omrežje WiFi in da telefon in naprava komunicirata.

**Opomba** Če svojo napravo uporabljate brez glave (brez zaslona), kot to počnem jaz, morate pridobiti naslov IP iz informacij o »povezani napravi«, kar je korak, ki ga obravnavam spodaj

Aplikacija Termius

Koraki: Due to security policy I can’t take screenshots to show how to set up the app on your phone, but I can guide you.

  1. Odprite aplikacijo
  2. Click “+” – New Host
  3. Fill out the info – Alias (name for the connection)
  4. Hostname or IP Address: you will get this IP address when your node connects to your cellphone hotspot. I’ll show how to get this later.
  5. Make sure “SSH” box is checked.
  6. User name: for RaspiBlitz users the user name is “admin” but if you changed it to something else, then it is whatever you called it,.
  7. Password: DON’T ENTER A PASSWORD! If you enter it, it will automatically connect, which is a security flaw if someone gets into your phone. Leave it blank when you click on the alias name, it will ask you for the password of your device to connect to.
  8. Click the check mark at top to add the new connection.
  9. When you make your first SSH connection into the device it will ask you to accept the fingerprint to do so. Click “Yes.”

Spodaj je posnetek zaslona, ​​​​kako vse to izgleda:

Kako narediti svoje Bitcoin Lightning Network Node Mobile PlatoBlockchain Data Intelligence. Navpično iskanje. Ai.

As you can see, I’m on my cell phone hotspot.

Moje omrežje WiFi je »Gopoundsand« skupaj z navedenim geslom (psk), ki sem ga vnesel kot drugo omrežje WiFi.

omrežje = {

ssid=”Gopoundsand”

psk=”passwordHome”

id_str=”home”

}

Če vidite povezane naprave (ime vašega vozlišča LN), to pomeni, da ste uspešno nastavili sudo nano /etc/wpa_supplicant/wpa_supplicant.conf pravilno in je vaša naprava zdaj povezana z WiFi z vašim mobilnim telefonom in internetom. Čestitam, da ste prišli tako daleč!

**Opomba** Make sure your first connection if you use Ethernet is unplugged, or if you use WiFi, as your main connection, that it is turned off. For when you reboot, the device will lock onto your main WiFi network and won’t look for your second connection. This will take a few minutes on reboot to establish a connection.

Zdaj lahko iz nastavitev odprete mobilno dostopno točko in si ogledate povezane naprave ali pa povlečete navzdol iz vrstice z obvestili, kot je prikazano zgoraj, da si ogledate povezane naprave. Zdaj kliknite »podrobnosti« povezane naprave in znova »podrobnosti«. Tukaj boste videli naslov IP, ki ga je vaš mobilni telefon dal napravi. (Primer: 192.168.200.102.) Ti podatki bodo zdaj šli v aplikacijo Termius: Ime gostitelja ali naslov IP: ta naslov IP boste prejeli, ko se vaše vozlišče poveže z dostopno točko vašega mobilnega telefona.

Če vam je uspelo narediti vse pravilno, bi morali prispeti do tega mesta na posnetku zaslona:

Kako narediti svoje Bitcoin Lightning Network Node Mobile PlatoBlockchain Data Intelligence. Navpično iskanje. Ai.

To je menijski zaslon RaspiBlitza v mojem telefonu Android z aplikacijo Termius.

Če vam je uspelo opraviti vse korake, potem ste uspešno dodali drugo omrežje WiFi v svoj sudo nano /etc/wpa_supplicant/wpa_supplicant.conf, uspeli vzpostaviti povezavo vozlišča LN z vašim mobilnim telefonom prek dostopne točke in končno ste lahko SSH v svojo napravo in omogočite ponovno sinhronizacijo vozlišča LN prek mobilnega omrežja in dostop do menija RaspiBlitz, kot je prikazano na zgornjem posnetku zaslona. Čestitamo, uspelo vam bo!

Nasveti, če se kaj ne poveže:

  1. Make sure the SSID and password are correct in the sudo nano /etc/wpa_supplicant/wpa_supplicant.conf file. Ctrl+x to exit, “y” to save the file if the info is correct. Or “n” if you mistyped something.
  2. When rebooting the LN node, to connect to your cell phone hotspot, then give it a few minutes to establish that connection. So don’t fear you did something wrong – if it takes over five minutes, then it’s probably worth troubleshooting.
  3. Make sure your first connection if you use Ethernet is unplugged, or if you use WiFi, as your main connection, that it is turned off. For when you reboot, the device will lock onto your main WiFi network and won’t look for your second connection.
  4. On SSH via terminal, make sure you have the correct IP address from your hotspot. And add that info to the new host connection. (Side note: on some devices like mine, everytime I turned off and turned on the hotspot, I got a new IP address, so I have to “edit connection alias” in the app with the new IP address, and SSH will reconnect.

Mobilnost

We finally come to the last step. What if there is a major emergency, a fire or say just a vacation, and you had to take only what you could and go? Could you take your LN node with you? How would you do it? If you went with a moderately-sized UPS, you can always grab that and go, as it provides a few hours needed to keep your unit going until you can get to a more stable setup. Lets say, your UPS is big and chunky, and taking it with you is just not feasible. I thought about that as well, and decided to go with a 28800mAH solar backup charger, basically what you could use to charge your cell phone. Why is this handy? Because it’s small, light, and versatile. The unit also has uses (usb-c connector) for wall charging the unit. But more importantly, the solar charger provides the power (3Amp) necessary to power up your device including the external SSD.

Nasvet:

  1. You can’t wall-charge the backup charger while trying to power up the LN device; it didn’t kill the Pi, just stopped it from working. I pulled the power, waited some time, and rebooted back up.
  2. You can’t use both USB ports to connect to your Raspi USB ports. That will fry your board: So yea, I killed my board. Thankfully it was just the board, which was only a $35 replacement.

Če povzamem, učim se s poskusi in napakami. Upam, da ste se ob tem nasmejali, vendar upam, da bo komu pomagalo, da se izogne ​​nepotrebnemu stresu.

To je končni rezultat (fotografija, posneta v državnem parku v Rocky Mountains):

Kako narediti svoje Bitcoin Lightning Network Node Mobile PlatoBlockchain Data Intelligence. Navpično iskanje. Ai.

zaključek

This can be a weekend project for you. If you are already running a node and feel like getting a bit #reckless this is a fun way to expand your applications and skills. Even if you don’t do it this exact way, I hope this inspired you to think of a more creative way to solve the problems that I experienced.

Zdaj pa bodi #reckless.

To je gostujoča objava Anthonyja Feliciana. Izražena mnenja so povsem njihova in ne odražajo nujno mnenj BTC Inc oz Bitcoin Magazine.

Časovni žig:

Več od Bitcoin Magazine