Rasberry Pi WiFi Dongle


#1

I notice that the Raspbery pi on board WiFi has a limited range.
I plugged in a USB wifi dongle with a separate antenna to get longer range
however the raspberry does not seem to be using it.

Any suggestions?

The goal is to put the USB dongle and raspberry up as high as possible
and feed it down via wifi.

So far, I’ve used 60 ft of cable to deliver 5volts, it works ok with the 60 ft curled up
in front of me, used 4 wires on negative and 4 positive to minimize voltage drop.


#2

POE is simple and can go 300 ft.
I use this connect power and data to my devices in my attic:-


With a Netgear POE switch.
You can get injector kits if you only need to power one device.

I recommend that you get quality POE gear to keep the RPI stable.

POE is so much more reliable than WIFI.


#3

johhawkes, My question was about using a WiFi Dongle with a Raspberry pi

Yes, POE works, but it costs, if power cable is free, just cut a USB cable and splice it to
some eithernet cable an it can go hundreds of feet at 5 volts without any significant voltage drop.

Again, I’d like to know if you need to change anything in the Raspberry pi in order to use a USB WiFi Dongle
rather than on board wifi which I think is very limited range… perhaps someone knows the answer to this
question?

Thanks

Ramjet


#4

biquad antenna wifi
http://martybugs.net/wireless/biquad/


#5

@ramjet555

You can edit /boot/config.txt and add this two lines:

dtoverlay=pi3-disable-wifi
dtoverlay=pi3-disable-bt

After reboot, WiFi & Bluetooth will be fully disabled.

NOTE:
I have NOT tested this method (I dont have Pi3, only have Pi2 :slight_smile: ). I found it by Googling on this web page:

Disable onboard WiFi & Bluetooth Raspberry Pi 3

.


#6

PiAware has a setting to turn off the internal wifi on the Raspberry pi 3 board with the “rfkill yes” setting.
https://flightaware.com/adsb/piaware/advanced_configuration
On the command line type “piaware-config rfkill yes”

Piaware will detect and use most of the common usb wifi dongles and connect to the SSID and password automatically with no extra configuration.

PiAware will need a reboot to detect and configure usb wifi dongles after setting the rfkill setting.

You can check if the network is working with “sudo ifconfig” or by viewing the syslog.
You can check all the local access points and the signal strength with “sudo iwlist wlan0 scan”


#7

David,
Will PiAware automatically use the USB WiFi Dongle or will it require a
CHANGE in command line
type “piaware-config rfkill yes” ?

Do you mean that AFTER the change in command line to rfkill yes the
Piaware will auto detect and use the USB WiFi Dongle?

How or where do you check for “sudo ifconfig”, does that require pulling out the SD card
and putting into a laptop to view a text config file?


#8

The Double BiQuad is a directional antenna, you would need multiple Raspberry Pi to be able to cover each zone. It is not a suitable antenna for ADS-B.

If you keep adding elements to a Quad Antenna, put it in a circle with an inner reflector, than it would be more omni-directional but it could have a zone that is not covered as evenly as the rest of the pattern.

The co-linear is more suitable, as would be a slim jim, j-pole, folded dipole or
perhaps even more suitable is stacked folded dipoles.

For a specific direction, stacked long yagies is going to get the maximum range in a direction or zone.


#9

Update, while a 60 ft run of eithernet cable with 4 wires each side, gave 5 volts at the end, when I plugged in a WifFi USB dongle, I noticed all the aircraft disappeared after a few minutes, took out the dongle and later they came back on. It appears that the WiFi Dongle draws sufficient amount of current to drop the voltage so that the Piaware stops working properly, even though it is still flashing a green light. Perhaps someone who knows this better can comment.


#10

Feeding 5V on long PoE cable may cause excessive voltage drop and low voltage at RPi.

For long PoE cables, a 48V DC supply at router/switch, and a down convertor to 5V at RPi works satisfactorily.

.

Po_E_48_V

There are two types available. Some models are not AF compliant, and some other are “AF-compliant”. Go for “AF-compliant” POE. It will only apply power after being “asked” for it, and will protect non-POE devices, if you plug them in.

Some cheap non-standard POE stuff will fry your non-POE devices if you forget, and plug them in without the POE splitter.

Below is one such complete kit. This item is given as an example for guidance only. If you search Amazon and eBay, you will find many other makes and prices.

AF-compliant:

Injector TP-Link TL-PoE150S
amazon.com/gp/aw/d/B001PS9E5I

Splitter TP-Link TL-PoE10R
amazon.com/gp/aw/d/B003CFATQK

Injector User Guide / Specs:
static.tp-link.com/resources/doc … _Guide.pdf

Splitter User Guide / Specs:
static.tp-link.com/resources/doc … _Guide.pdf


Noise level - ads-b muta setup
#11

Will PiAware automatically use the USB WiFi Dongle or will it require a
CHANGE in command line
type “piaware-config rfkill yes” ?

The wifi dongle will load on boot as wlan1 if you have the internal Wifi adapter active. If you deactivate the wifi internal wifi adapter then the external wifi will load as wlan0. Piaware will only configure the wifi adapter on wlan0 to connect to your wifi network. (configuration is loaded from the ssid and password setting)

By setting “rfkill yes” the wifi dongle will load as wlan0 and the wifi dongle will work the same as the internal RPi3 wifi adapter.

Do you mean that AFTER the change in command line to rfkill yes the
Piaware will auto detect and use the USB WiFi Dongle?

Yes. You only need to set “rfkill yes” and reboot. The wifi dongle will then be detected and setup with no other changes.

How or where do you check for “sudo ifconfig”, does that require pulling out the SD card
and putting into a laptop to view a text config file?

The command “sudo ifconfig” is a command line that works by connect by SSH to the device. Usually connected by either wifi or ethernet. The ifconfig command will list all the active networking adapters (i.e. eth0 for ethernet adapter and wlan0 for wireless adapters).

Here are the steps to make this a bit more clear.

  1. Set rfkill yes. Either pull out the SD card and edit the piaware-config.txt file by added a new line with only “rfkill yes” on it (without the quotes). This line will not be in the piaware-config.txt file already and you can add it anywhere in the file.
    OR log into the box through SSH and run the command “piaware-config rfkill yes”. This command will just add the rfkill line to the file.

  2. Plug in the wifi dongle into one of the USB ports

  3. reboot

If your piaware was working with the internal wifi then it should now be running through the wifi dongle under the same SSID and password.

You can switch back to the internal wifi by setting “rfkill no”. Reboot and you are back on to using the internal wifi.


#12

I added piaware-config rfkill yes to the END of the file
called the command file.
I cannot see if the USB WiFi Dongle is working, When I remove the USB WiFi Dongle Flight Aware map still shows aircraft registering.

I have not got a clue where "sudo ifconfig or syslog is, and nor do I know if you are referring to the Raspberry Pi, or the main computer, and if its the Raspberry Pi, so far, there is no direction on how to look into the Rasberry and see those files. Putting in the ip address just gives you a Flight Aware page without any options of looking at files or at what is on the sd card.


#13

If your main computer is Linux, or Mac, open the terminal and type
ssh pi@192.168.0.1
Replace 192.168.0.1 by you Pi’s IP

It will ask you Pi’s Password, type it (you wont see it) and press Enter key. Now the command prompt will change to pi@piaware $, and you can enter command to Pi through this terminal.

If you are using Windows computer, you have to download and installl SSH client PuTTY, and run it, login to Pi, to open SSH terminal. It will have a command prompt pi@piaware $. You can now enter commands to Pi.

https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

.


#14

Its Windows 10

Does that apply also to Windows 10?


#16

The file on the SD card is called piaware-config.txt. You can see this file by taking out the SD card from the Raspberry pi and opening it on your windows machine.

Open the piaware-config.txt file and add the “rfkill yes” to it.

There isn’t a command file. Did you mean cmdline.txt or config.txt? These are the wrong files.
These files are for configuration of the Operating system.
The piaware-config.txt file is where the piaware configuration is stored.


SSH is a bit more tricky to setup but also allows you to change settings without physically touching the SD card or powering down the raspberry pi.

Putty is the windows SSH program. It handles the connection from one computer to another through a command window. You can then type commands in the window and they will run directly on the PiAware computer.

The raspberry pi foundation has their own SSH enable walkthrough.

Steps to do SSH.

  1. take out the SD card and put a new text file called ssh.txt. The next time the Raspberry pi boots it will enable SSH remote access.
  2. Download Putty on your windows machine and run the program
  3. Enter the IP and connection information (login is pi and password is flightaware)
  4. A window will pop up to allow you to type commands

Type the following three commands to see how the system is running.

sudo ifconfig
piaware-config -showall
piaware-config rfkill yes
sudo reboot

When the system reboots you can reconnect and then run
sudo ifconfig
It should now be running your wifi dongle as the main wlan0.


#17

HOW TO SET UP PUTTY IN WINDOWS

(A) Enable SSH in Pi

As David Baker has rightly pointed out, first thing you have to do is to enable SSH.

The easiest way to do this is:
(1) Shutdown/Power off Pi.
(2) Slip-out microSD card from Pi, slip it in a card reader. Plug card reader into your Windows/Mac Computer.
(3) Open Windows/Mac File explorer/File Manager and click on drive pertaining to microSD card. It is drive (F) in my computer, but may be different letter in your computer. This will open the boot folder of the microSD Card.

(4) Create a new blank text file SSH (SSH.txt if file extensions are shown) in the microSD card’s boot folder.

(5) Eject microSD card from Windows/Mac computer, slip it into Pi, and power-up. The Pi will now be enabled for SSH, and you can connect to it through PuTTY.

NOTE: The microSD card will show as boot if you are using Raspbian image. If you are using Puaware SD card image, the microSD card will show as piaware
SSH-1

(B) Install, setup and use PuTTY

(1) Find out your local IP from your Flightaware status page (you must be logged in to your FA account).

https://flightaware.com/adsb/stats/user/

.
Putty-1

.
(2) Download PuTTY windows installer:

Download Page:
https://www.chiark.greenend.org.uk/~sgtatham/putty/latest.html

Direct download link (32-bit):
https://the.earth.li/~sgtatham/putty/latest/w32/putty-0.70-installer.msi


(3) Doble click downloaded installer to install the PuTTY.

.
.
(4) After installation is complete, open PuTTY. It will be like screenshot below

PuTTY-1

.
.
(5) Enter your Pi’s Local IP you found from your flightaware stats page in step (1), and make sure SSH is selected and port is 22. Click Open button.

PuTTY-2
.
.
(6) You will get a warning. Click Yes button

!PuTTY-3
.
.
(7) A SSH Cosole window will open with one line Login as . Type pi and press enter. Then it will ask password . Type password (the typed password will not be visible to you). Press Enter key, and you are ready to start using commands.

PuTTY-4


Connect ADS-B Trafic Reciever Kit to iPad ForeFlight
#18

Thanks to you and David.
Just saved it as an SSH, loaded the SD card, recycled the power and it worked.

I’ve now just moved the Raspberry to 30 feet above the ground using a WiFi USB dongle to make the link. So far its doubled the number of aircraft sending data but yet to see any increase in range.

I"m also running an RTL1090 with an antenna 6 feet above the ground and every ID is different to that I can see on flight aware at this point in time.