Skip to content

Instantly share code, notes, and snippets.

@todgru
Last active August 29, 2015 14:17
Show Gist options
  • Select an option

  • Save todgru/5363d2df212e294cb707 to your computer and use it in GitHub Desktop.

Select an option

Save todgru/5363d2df212e294cb707 to your computer and use it in GitHub Desktop.
Raspberry pi setup for TNC Baypac Model BP-2M MultiMode

Raspberry Pi Setup w/ Wifi and Packet Radio

Install image

Alternative to this is F6BVP`s [http://f6bvp.free.fr/AX25_BBS_Node_RaspBerry_Pi_install.html]

Begin by...

Assume headless version of Debian has been installed on the RPi. [http://www.raspberrypi.org/forums/viewtopic.php?f=91&t=74176]

Determine ip address of Pi. SSH into the Pi. Update.

ssh pi@10.0.0.0 Default password: raspberry

sudo apt-get -y update && sudo apt-get -y upgrade
sudo apt-get -y vim tmux git

Enable wifi

Notes from [http://elinux.org/RPi_Peripherals#Wireless:TP-Link_TL-WN722N_USB_wireless_adapter.28Debian_6.29] and [http://omarriott.com/aux/raspberry-pi-wifi/]

Summary

These are the steps that worked for installing the generic USB Wifi device, Nickname:"<WIFI@REALTEK>", RTL8188CUS. NOTE: I needed to supply auxiliary power to the USB device. Without the extra power, the USB Wifi will crash the Rpi.

Veryify this is needed sudo apt-get -y install wireless-tools usbutils

sudo lsusb should return something similar:

Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
Bus 001 Device 004: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter

Generate psk code, ie password hash: wpa_passphrase <ssid> <password>

Get list of wifi wifi networks: sudo iwlist wlan0 scan | grep ESSID

Create and edit a Wifi config file:

sudo vim /etc/wpa.config

# paste the following
network={
    ssid="<your ssid>"
    proto=RSN
    key_mgmt=WPA-PSK
    pairwise=CCMP TKIP
    group=CCMP TKIP
    psk="<your wpa key>"
}

Edit sudo vi /etc/network/interfaces. Keep etherenet eth0 directives. For wifi, wlan0, use either dhcp or static ip.

# loopback
auto lo
# ethernet
iface lo inet loopback
iface eth0 inet dhcp

# wifi (dhcp config)
#auto wlan0
#allow-hotplug wlan0
#iface wlan0 inet dhcp
#wpa-conf /etc/wpa.config

# wifi (static address config)
auto wlan0
iface wlan0 inet static
    address 10.0.1.59
    netmask 255.255.255.0
    gateway 10.0.1.1
 wpa-conf /etc/wpa.config

Restart the device: sudo ifup wlan0. May need to bring device down, first: sudo ifdown wlan0. Regarless of the message that is returned, in my case, the wifi device is working. This message RTNETLINK answers: File exists doesn't appear to stop the device from restarting. The static ip has been assigned. Try ifconfig.

Enable Serial port for the TNC

[http://www.hobbytronics.co.uk/raspberry-pi-serial-port]

Summary

Will need an adapter to bring the RPi serial levels up to 12v for the BayPac modem. [http://www.davidhunt.ie/add-a-9-pin-serial-port-to-your-raspberry-pi-in-10-minutes/] Instead of using the GPIO serial pins, an alternative is to use a USB to serial converter, such as the Keyspan 19hs, to connect to the BayPac modem.

Btw, sudo all the things below.

  1. Disable Serial Port Login. Edit /etc/inittab. Comment out or remove the last line T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100.

  2. Disable Bootup Info /boot/cmdline.txt Remove references to AMA0, such as console=ttyAMA0,115200 kgdboc=ttyAMA0,115200.

  3. Restart for changes to take effect. sudo shutdown -r now

  4. Test using minicom. Install sudo apt-get install minicom. Run minicom -b 9600 -o -D /dev/ttyAMA0. Should see characters echoed back.

TNC software

Software setup for the Baycom style of modems, BayPac BP-1, BP-2 and the BP-2M

AX.25

Extra time? Read up on the meat of installing AX.25 [http://www.tldp.org/HOWTO/AX25-HOWTO/]

NOTE This [http://www.qsl.net/5/5b8ap/projects/Quick_LinuxAX25_HowTO_v0.4.pdf] looks like a more promising way of installing AX.25. As of 3/16/2015, I could install all the AX.25 packages without recompiling the kernal. ncurses is needed.

What I've done so far...

Install AX.25 [http://www.ag6qo.com/installAX25.txt]

sudo apt-get install -y ax25-tools ax25-apps

Edit /etc/ax25/axports for your own call.

To attach the RPi's GPIO serial port to AX.25:

sudo kissattach /dev/ttyAMA0 1 10.1.1.1 what do these arguments mean?

Or, to attach the Keyspan USB to serial conveter, (this works! Keyspan status light state changes from flashing to solid.):

sudo kissattach /dev/ttyUSB0 1 10.1.1.1 what do these arguments mean?

To list tty ports, dmesg | grep tty.

The attached processes are running the background. To end the process, send SIGTERM, ie $ kill xxxx where xxxx is the process id.

Finally, sudo axlisten -a to listen to the port in kiss mode. what does this mean?

FBB

sudo apt-get install -y libax25-dev

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment