Friday, May 25, 2018

How to use your Raspberry Pi to monitor broadband speed

How to use your Raspberry Pi to monitor broadband speed

Step 1: Check for updates

As usual, let’s start with checking for the latest updates. Run the following commands in Terminal:
sudo apt-get update
sudo apt-get upgrade

Step 2: Install speedtest-cli

There are various methods to measure the speed of broadband connection. We’re going to use speedtest-cli, which, in the words of its creator, is “a command line interface for testing internet bandwidth using speedtest.net.”
speedtest-cli isn’t available right away from the Raspbian archives, but we can install it from the Python Package Index (PyPI). That’s easy to do so by using a tool called pip that comes preinstalled on Raspbian Jessie and Stretch. You can make sure that you have pip by running this command:
sudo apt-get install python-pip
If you a message that reads “python-pip is already the newest version,” that means that we’re good to go.
Next, let’s use pip to install speedtest-cli:
sudo pip install speedtest-cli
With speedtest-cli now installed, you can measure your broadband speed easily with this command:
speedtest-cli
Though, for our purposes, using speedtest-cli’s simple mode is more convenient:
speedtest-cli --simple
You should see something like this:
Ping: 47.943 ms
Download: 40.93 Mbit/s
Upload: 2.33 Mbit/s
sumber :  https://thepi.io

Rx satu aprs packet dari YB0X-1


Thursday, May 24, 2018

Setting Up 20 Mhz or 40 Mhz Bandwidth

If you are confused about how to setup for 20 Mhz or 40 Mhz bandwidth for your router, you have come to the right guide here. We will go over some simple rules to help you decide the best bandwidth to use for your wireless network.

How to Choose 20 or 40 Mhz?

The answer is it depends on the devices that you have in your house. The answer lies closely with the type of radio broadcasting that you have chosen. The strategy to figure out the best radio broadcast can be found with out 2.4 ghz vs 5 ghz wireless guide.
When You Should Use 20 Mhz for Channel Width?
If you use 2.4 Ghz broadcasting radio, you should use 20 Mhz for the channel width. The simple reason is that 20 Mhz is really a supportive measure for your older devices. Using 20 Mhz on a 5 Ghz radio setting defeats the purpose of actually using 5 Ghz radio setting.
The only exception is that you somehow has a devices that support 5 Ghz broadcasting while only accepting a 20 Mhz bandwidth, however that is fairly uncommon. But if that does happen, see if your router supports duo bandwidth for both 20 Mhz and 40 Mhz.
When You Should Use 40 Mhz for Channel Width?
If you use 5 Ghz broadcasting radio, the chances are that your network is only consisted of the latest devices that support 802.11n. This is when you should use the 40 Mhz bandwidth.
When You Should Use Combination of 20 / 40 Mhz Combination.
Only use 20 Mhz / 40 Mhz combination if one of your devices require it. If not, just set it to 40 Mhz.

How to Control Channel

For 20 Mhz broadcasting with 2.4 Ghz
The best channel band to use are 1, 6, 11
For 40 Mhz broadcasting with 2.4 Ghz
The best channel band to use are 3, 11
For 20 Mhz broadcasting with 5 Ghz
You should use 40 Mhz instead of 20 Mhz, or use combination if your device needs it and the router supports it.
For 40 Mhz broadcasting with 2.4 Ghz
Any channel with the least amount of interference will do. The chances are you are free to use any channels. Consider using the auto function so that when your router can auto adjust for the best channel to use.
SUMBER : https://routerguide.net

Sunday, May 20, 2018

GENERAL COMMANDS

  • apt-get update: Synchronizes the list of packages on your system to the list in the repositories. Use it before installing new packages to make sure you are installing the latest version.
  • apt-get upgrade: Upgrades all of the software packages you have installed.
  • clear: Clears previously run commands and text from the terminal screen.
  • date: Prints the current date.
  • find / -name example.txt: Searches the whole system for the file example.txt and outputs a list of all directories that contain the file.
  • nano example.txt: Opens the file example.txt in the Linux text editor Nano.
  • poweroff: To shutdown immediately.
  • raspi-config: Opens the configuration settings menu.
  • reboot: To reboot immediately.
  • shutdown -h now: To shutdown immediately.
  • shutdown -h 01:22: To shutdown at 1:22 AM.
  • startx: Opens the GUI (Graphical User Interface).

FILE AND DIRECTORY COMMANDS

  • cat example.txt: Displays the contents of the file example.txt.
  • cd /abc/xyz: Changes the current directory to the /abc/xyz directory.
  • cp XXX: Copies the file or directory XXX and pastes it to a specified location; i.e. cp examplefile.txt /home/pi/office/ copies examplefile.txt in the current directory and pastes it into the /home/pi/ directory. If the file is not in the current directory, add the path of the file’s location (i.e. cp /home/pi/documents/examplefile.txt /home/pi/office/ copies the file from the documents directory to the office directory).
  • ls -l: Lists files in the current directory, along with file size, date modified, and permissions.
  • mkdir example_directory: Creates a new directory named example_directory inside the current directory.
  • mv XXX: Moves the file or directory named XXX to a specified location. For example, mv examplefile.txt /home/pi/office/ moves examplefile.txt in the current directory to the /home/pi/office directory. If the file is not in the current directory, add the path of the file’s location (i.e. cp /home/pi/documents/examplefile.txt /home/pi/office/ moves the file from the documents directory to the office directory). This command can also be used to rename files (but only within the same directory). For example, mv examplefile.txt newfile.txt renames examplefile.txt to newfile.txt, and keeps it in the same directory.
  • rm example.txt: Deletes the file example.txt.
  • rmdir example_directory: Deletes the directory example_directory (only if it is empty).
  • scp user@10.0.0.32:/some/path/file.txt: Copies a file over SSH. Can be used to download a file from a PC to the Raspberry Pi. user@10.0.0.32 is the username and local IP address of the PC, and /some/path/file.txt is the path and file name of the file on the PC.
  • touch example.txt: Creates a new, empty file named example.txt in the current directory.

NETWORKING AND INTERNET COMMANDS

  • ifconfig: To check the status of the wireless connection you are using  (to see if wlan0 has acquired an IP address).
  • iwconfig: To check which network the wireless adapter is using.
  • iwlist wlan0 scan: Prints a list of the currently available wireless networks.
  • iwlist wlan0 scan | grep ESSID: Use grep along with the name of a field to list only the fields you need (for example to just list the ESSIDs).
  • nmap: Scans your network and lists connected devices, port number, protocol, state (open or closed) operating system, MAC addresses, and other information.
  • ping: Tests connectivity between two devices connected on a network. For example, ping 10.0.0.32will send a packet to the device at IP 10.0.0.32 and wait for a response. It also works with website addresses.
  • wget http://www.website.com/example.txt: Downloads the file example.txt from the web and saves it to the current directory.

SYSTEM INFORMATION COMMANDS

  • cat /proc/meminfo: Shows details about your memory.
  • cat /proc/partitions: Shows the size and number of partitions on your SD card or hard drive.
  • cat /proc/version: Shows you which version of the Raspberry Pi you are using.
  • df -h: Shows information about the available disk space.
  • df /: Shows how much free disk space is available.
  • dpkg – –getselections | grep XXX: Shows all of the installed packages that are related to XXX.
  • dpkg – –getselections: Shows all of your installed packages.
  • free: Shows how much free memory is available.
  • hostname -I: Shows the IP address of your Raspberry Pi.
  • lsusb: Lists USB hardware connected to your Raspberry Pi.
  • UP key: Pressing the UP key will print the last command entered into the command prompt. This is a quick way to repeat previous commands or make corrections to commands.
  • vcgencmd measure_temp: Shows the temperature of the CPU.
  • vcgencmd get_mem arm && vcgencmd get_mem gpu: Shows the memory split between the CPU and GPU.

Friday, May 18, 2018

JSON format

{
"callsign": "9M2ZAK-3",
"passcode": "14782",
"gateway": ["rotate.aprs2.net:14580"],
"preferred_protocol": "any",
"append_callsign": true,
"source": "rtl",
"rtl": {
"freq": 145.825,
"ppm": 88,
"gain": 48,
"offset_tuning": false,
"device_index": 0
},
"alsa": {
"device": "default"
},
"beacon": {
"lat": 1.6661667,
"lng": 103.6316667,
"table": "/",
"symbol": "r",
"comment": "Kulai Ground station",
"path": "WIDE2-2,qAR,ARISS,W3ADO-1,YB0X-1,SGATE",
"status": {
"text": "Panchuri Malis",
"file": false
},
"weather": false,
"send_every": 1800,
"ambiguity": 0
}
}

Warning from apt-key: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg)

  This worked for me... Code:  Select all sudo cp /etc/apt/trusted.gpg /etc/apt/trusted.gpg.d