Get aircrack-ng working on Raspberry Pi and Raspbian

Run these commands:

sudo -i
apt-get -y install libnl-dev
wget http://download.aircrack-ng.org/aircrack-ng-1.2-rc2.tar.gz
tar -zxvf aircrack-ng-1.2-rc2.tar.gz
cd aircrack-ng-1.2-rc2
make
make install
airodump-ng-oui-update
apt-get -y install iw
sudo apt-get install ethtool
airmon-ng start wlan0

The airodump-ng-oui-update will take a while to complete.

Looking out for networks

airodump-ng mon0

Information taken from here: http://www.aircrack-ng.org/doku.php?id=newbie_guide

 

Asus BT-400 Bluetooth dongle and Raspberry Pi

Here is a solution.

First switch to admin mode:

sudo -i

Now get the necessary packages. This will install all necessary software.

apt-get install bluetooth bluez blueman

Then use the lsusb command to list the connected USB devices…

lsusb

The result will include something like this:

Bus 001 Device 001: ID 0b05 17cb Vendor Desc.

Now you have to find the correct device. When you found it, copy the ID without colon and write it into the /sys/bus/usb/drivers/btusb/new_id. You can do it like this:

echo "0b05 17cb" >> /sys/bus/usb/drivers/btusb/new_id

Now we will use a tool called modprobe which allows us to load modules on our running system.

modprobe -v btusb

Almost done! Just edit the config with nano  (save= crtl+o ; quit= crtl+c)…

nano /etc/default/bluetooth

… and copy the few lines below

HID2HCI_ENABLED=0
HID2HCI_UNDO=0
HIDD_ENABLED=1

Restart bluetooth and you are ready to go!

invoke-rc.d bluetooth restart

 Testing the bluetooth dongle

Check the device is on and everything is up and running using this command:
/etc/init.d/bluetooth status
This should come back with something like this:
● bluetooth.service - Bluetooth service
 Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled)
 Active: active (running) since Wed 2015-11-18 10:38:48 GMT; 5min ago
 Docs: man:bluetoothd(8)
 Main PID: 3800 (bluetoothd)
 Status: "Running"
 CGroup: /system.slice/bluetooth.service
 └─3800 /usr/lib/bluetooth/bluetoothd

Pair the Pi with a keyboard (for example)

Use the hcitool to scan for devices:
hcitool scan
 This should come back with something like this:
Scanning ...
       00:0F:F6:82:D1:BB       Motorola Bluetooth Wireless Keyboard
Pair the Pi using the ID of the device. We’re using the PIN 1234 like this:
/home/pi# echo 1234|bluez-simple-agent hci0 00:0F:F6:82:D1:BB
RequestPinCode (/org/bluez/3964/hci0/dev_00_0F_F6_82_D1_BB)
Enter PIN Code: Release
New device (/org/bluez/3964/hci0/dev_00_0F_F6_82_D1_BB)
Now we need to trust the device so every time the Pi reboots, it connects automatically.
/home/pi# bluez-test-device trusted 00:0F:F6:82:D1:BB yes

Test the device as an input

/home/pi# bluez-test-input connect 00:0F:F6:82:D1:BB

After a reboot the keyboard should still connect. It’s possibe a keystroke is needed to connect. Connection can take a few seconds.

/home/pi# hcitool con
Connections:
       < ACL 00:0F:F6:82:D1:BB handle 41 state 1 lm MASTER AUTH ENCRYPT

Configure Wi-Fi on your Raspberry Pi via the command line

Find available Wi-Fi networks

To scan for Wi-Fi networks, use the command

sudo iwlist wlan0 scan

This will list all available Wi-Fi networks along with other useful information. Look out for:

ESSID:"testing"

This is the name of the Wi-Fi network.

IE: IEEE 802.11i/WPA2 Version 1

This is the authentication used; in this case it is WPA2, the newer and more secure wireless standard which replaces WPA1.

These instructions should work for WPA or WPA2.

You will also need the password for the WiFi network. For most home routers this is located on a sticker on the back of the router. The ESSID (ssid) for the network in this case is testing and the password is testPassword

Add the network details

Open the wpa-supplicant configuration file in nano:

sudo nano /etc/wpa_supplicant/wpa_supplicant.conf

Go to the bottom of the file and add the following:

network={
    ssid="The_ESSID_from_earlier"
    psk="Your_wifi_password"
}

In the case of the example network, we would enter:

network={
    ssid="testing"
    psk="testPassword"
}

Now save the file by pressing ctrl+x then y, then enter.

At this point, wpa-supplicant will normally notice a change has occurred within a few seconds, and it will try and connect to the network. If it does not, either manually restart the interface with:

sudo ifdown wlan0
sudo ifup wlan0

or reboot your Raspberry Pi with

sudo reboot

You can check if it’s worked using

ifconfig wlan0

If the inet addr field has an address beside it, the Pi has connected to the network. If not, check your password and ESSID are correct.

Setting up a Raspberry Pi with a Tontec TFT 3.5″ screen (Model MZ61581)

Install the drivers

Taken from: https://s3.amazonaws.com/ttbox/35screen.zip

This is taken from information last updated on 2015-09-05

Below you will find instructions for installing the appropriate drivers for the Tontec 3.5 inch screen on your Raspberry Pi (including Pi 2). This guide was written for Raspbian wheezy, specifically 2015-05-05-raspbian-wheezy.img, though the guide should work on later versions as well.

1. Initial Config of New Raspberry Pi Install

After booting your Raspberry Pi for the first time on Raspbian-Wheezy, we will need to perform the normal tasks of setting up our Raspberry Pi. E.g expand filesystem,

Then we need “update” and “upgrade”

sudo apt-get update
sudo apt-get upgrade
sudo reboot

2. Update Firmware

We now need to update the dtb file to the newest version to support Tontec screen.

cd /boot/overlays
sudo rm mz61581-overlay.dtb
sudo wget http://www.itontec.com/mz61581-overlay.dtb
sudo reboot

3. Enable SPI and set overlay for Tontec MZ61581 Screen

Open /boot/config.txt

sudo nano /boot/config.txt

And add these lines to the bottom

dtparam=spi=on
dtoverlay=mz61581

Then save and reboot

4. Set Tontec 3.5 Screen as the default display instead of HDMI

sudo nano /usr/share/X11/xorg.conf.d/99-fbturbo.conf

Here we will change the default output display from HDMI to Tontec Screen

Change

Option "fbdev" "/dev/fb0"

To

Option "fbdev" "/dev/fb1"

– if you want to switch back to the HDMI display, just change it back to fb0

5.  Edit cmdline.txt

Here we will enable Tontec Screen to display during the booting process

sudo nano /boot/cmdline.txt

Add fbcon=map:10 at the end of current line. (No need to start a new line)

6.  Reboot

sudo reboot

Done!


 

Calibrate the touch screen for X Windows

Taken from: http://s3.amazonaws.com/ttbox/35calibrate.zip

We’ll install an xinput_calibrator and a script to load the calibration data each time X starts.

 

1. Install all the prerequisites required for calibration

sudo apt-get install libtool libx11-dev xinput autoconf libx11-dev libxi-dev x11proto-input-dev -y

2. Download and install xinput_calibrator

git clone https://github.com/tias/xinput_calibrator
cd xinput_calibrator/
./autogen.sh
make
sudo make install

3. Download and setup the calibration script

cd ~
wget http://s3.amazonaws.com/ttbox/xinput_calibrator_pointercal.sh
sudo cp ~/xinput_calibrator_pointercal.sh /etc/X11/Xsession.d/xinput_calibrator_pointercal.sh
sudo sh -c 'echo "sudo /bin/sh /etc/X11/Xsession.d/xinput_calibrator_pointercal.sh" >> /etc/xdg/lxsession/LXDE-pi/autostart'

4. Reboot

sudo reboot

Calibrating

Start up X Windows

startx

Plug in a USB mouse as you won’t be able to click on much as the screen’s not calibrated.

Click on [Menu] -> [Preferences] -> [Calibrate Touchscreen]

Go through the calibration and a console window will appear.

The calibration program will create a file which stores the calibration data( /etc/pointercal.xinput)

Click [File] -> [Close]

To perform calibration again, just delete /etc/pointercal.xinput and restart X. You will be presented again with the calibration program once X starts.