How to wirelessly transfer files with a QR code

0



There are a number of different options for moving files between your computer and your mobile devices. The most common method is to use a USB cable, but this only works if you have access to the correct cable. What if we could send files between devices on the same network using nothing more than a QR code? For this we need qrcp.

Available for Linux, Windows or macOS, Qrcp works by binding a web server to the machine’s IP address with a random port number. It then generates a unique QR code that provides the relevant information. You can then read the QR code on your mobile device, which will automatically take you to the decoded URL. The web server stops automatically when the download is complete.

How to install qrcp

Qrcp is available for Windows, Mac and Linux machines, including the Raspberry pie. Our tutorial is Linux centric and Qrcp produces deb and rpm package files for 32 and 64 bit machines as well as ARM, if you want to install qrcp on a Raspberry Pi. But it’s pretty easy to install from inside. source tar archive.

1. Download the latest source version for your machine. At the time of writing this article was version 0.8.4.

2. Extract the downloaded file in a new directory called qrcp in your Downloads directory.

(Image credit: Tom’s Hardware)

3. Open a terminal / command prompt and navigate to the newly created qrcp directory.

$ cd ~/Downloads/qrcp

4. Move the extracted qrcp script in the / usr / local / bin directory. This allows the command to be used from any location. Windows users can copy the qrcp file to their Windows directory, allowing the command to be used from any location.

$ sudo mv qrcp /usr/local/bin/

Transfer files to mobile devices

The default qrcp configuration should suffice for most users. As soon as you specify the file you want to transfer, qrcp will create a unique url from which the file can be downloaded. Not only that, but the utility generates a QR code which you can scan from your mobile device. When you then navigate to the decoded URL, the file is automatically downloaded to your mobile device.

We will use Google Lens as our QR code scanner, but you can use another app if you want. The commands for using qrcp are the same between Windows, Mac and Linux.

1. From Terminal / Command Prompt, navigate to the directory that contains the file you want to share. In our case, we have a PDF on our desktop that we want to send to our mobile device.

$ cd ~/Desktop

2. Use qrcp to prepare the file for transfer. Qrcp generated a QR code, as well as a URL.

$ qrcp Technical-Specs.pdf

(Image credit: Tom’s Hardware)

3. On your mobile device, open a QR code scanner, like Google Lens and scan the QR code on the screen.

(Image credit: Tom’s Hardware)

4. Tap the decoded URL, the file transfer will start automatically and the connection will close when the transfer is complete.

Transfer multiple files with qrcp

You can also use qrcp to transfer multiple files, via a zip file including all the specified files.

$ qrcp filename1 filename2 filename3

(Image credit: Tom’s Hardware)

Transfer files from a mobile device to a desktop computer

You can just as easily use qrcp to transfer files to the desktop.

1. On your computer, open a terminal and set qrcp to receive a file.

qrcp receive

2. Using your mobile device, scan the generated QR code and tap the decoded URL.

(Image credit: Tom’s Hardware)

You are taken to a page where you are asked to choose the files you want to transfer.

3. Select files you want to send, press the Transfer button at the bottom of the page, and the specified files will be downloaded immediately.

(Image credit: Tom’s Hardware)

By default receive qrcp will download the files to the current directory, but you can also specify the directory where you want to receive the files.

qrcp receive --output=/path/to/directory

Configure qrcp

Although the default configuration of qrcp should be sufficient for most users, you can run the qrcp configuration command to set useful defaults. The command will ask a series of questions, such as the default network interface to use, the default port, the default directory for received files, whether to use HTTPS for transfers, etc. The process is quite straightforward and easy to follow. Once completed, the configuration is written to the config.json file under ~ / .config / qrcp directory (location of the Linux version).

(Image credit: Tom’s Hardware)

More Linux tutorials:



Leave A Reply

Your email address will not be published.