GithubHelp home page GithubHelp logo

gandy92 / mrgibbs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from brookpatten/mrgibbs

0.0 2.0 0.0 44.94 MB

A powerful, inexpensive, and extensible tactical sailing computer

Home Page: http://mrgibbs.io

C# 95.73% C++ 1.07% Arduino 1.04% PowerShell 2.13% Shell 0.03%

mrgibbs's Introduction

MrGibbs

Build Status

Project Website

Project Blog

(bad) Circuit Diagrams

Configuration Options(forthcoming)

These instructions are intended to be used on Raspbian Jessie-Lite, although they should be comparable on any BlueZ5 equipped linux distro.

#1 Raspbian Setup

  • Expand root partition
  • Enable I2C (sudo raspi-config)
  • Fast boot (don't wait for network)
  • Enable SSH (if you want it)
  • Disable Shell and Kernel Messages on the serial connection
  • Boot to command prompt
  • Update kernel
sudo apt-get install rpi-update
sudo rpi-update
sudo reboot

#2 Install & Configure BlueZ from source

sudo apt-get update
sudo apt-get install git build-essential autoconf cmake libtool libglib2.0 libdbus-1-dev libudev-dev libical-dev libreadline-dev
wget http://www.kernel.org/pub/linux/bluetooth/bluez-5.39.tar.xz
tar xvf bluez-5.39.tar.xz 
cd bluez-5.39/
./configure --prefix=/usr --mandir=/usr/share/man --sysconfdir=/etc --localstatedir=/var --enable-experimental --with-systemdsystemunitdir=/lib/systemd/system --with-systemduserunitdir=/usr/lib/systemd
make
sudo make install

Edit /etc/dbus-1/system.d/bluetooth.conf, add the following

<policy user="pi">
    <allow own="org.bluez"/>
    <allow send_destination="org.bluez"/>
    <allow send_interface="org.bluez.Agent1"/>
    <allow send_interface="org.bluez.MediaEndpoint1"/>
    <allow send_interface="org.bluez.MediaPlayer1"/>
    <allow send_interface="org.bluez.ThermometerWatcher1"/>
    <allow send_interface="org.bluez.AlertAgent1"/>
    <allow send_interface="org.bluez.Profile1"/>
    <allow send_interface="org.bluez.HeartRateWatcher1"/>
    <allow send_interface="org.bluez.CyclingSpeedWatcher1"/>
    <allow send_interface="org.bluez.GattCharacteristic1"/>
    <allow send_interface="org.bluez.GattDescriptor1"/>
    <allow send_interface="org.freedesktop.DBus.ObjectManager"/>
    <allow send_interface="org.freedesktop.DBus.Properties"/>
</policy>

Edit /etc/systemd/system/bluetooth.target.wants/bluetooth.service. Change the line

ExecStart=/usr/libexec/bluetooth/bluetoothd

to

ExecStart=/usr/libexec/bluetooth/bluetoothd --experimental

Start up bluetooth

sudo systemctl daemon-reload
sudo hciconfig hci0 down
sudo service bluetooth start
sudo hciconfig hci0 up

#3A (Raspberry Pi 2/3) Mono Installation As of this writing, a weekly build of mono is required as the necassary changes to mono.posix have not made it into a release yet. CI builds do not include ArmHF packages so if you're intalling on a Pi, Weekly is the path of least resistance (Compiling mono from git on the pi is very time consuming).

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
echo "deb http://download.mono-project.com/repo/debian alpha main" | sudo tee /etc/apt/sources.list.d/mono-alpha.list
sudo apt-get update
sudo apt-get install mono-devel

#3B (Raspberry Pi A/B/+/Zero) Mono Compilation

sudo apt-get install autoconf libtool automake build-essential gettext libtool-bin
#if you want to speed things up you could limit the depth
git clone --recursive https://github.com/mono/mono.git
cd mono
./autogen.sh --prefix=/usr/local
make get-monolite-latest
#(This will take about 6 hours)
make 
sudo make install
cd ..

#4 Build Mr.Gibbs

git clone --recursive git://github.com/brookpatten/MrGibbs.git
cd MrGibbs/src
xbuild

#5 Run It

./run.sh

#6 Set it to run at boot

Gibbs.exe.config Configuration Options

Most values have sensible defaults, but if you want to tweak things, this is where you do it.

<appSettings>
    <!--Enable Bluetooth discovery at startup to find any new devices-->
	<add key="BtEnableDiscovery" value="True"/>
	<!--How long to wait for new devices to appear before continuing startup-->
	<add key="BtDiscoveryWait" value="10"/>
	<!--which bt adapter to use-->
	<add key="BtAdapterName" value="hci0"/>
	<!--simulates sensor data, currently only works with gps and wind-->
	<add key="SimulateSensorData" value="False"/>
	<!--mac address of wind vane to use-->
	<add key="BlendMicroAnemometerAddress" value=""/>
	<!--device file for gps serial port-->
	<add key="GpsPort" value="/dev/ttyAMA0"/>
	<!--gps serial port baud rate-->
	<add key="GpsBaud" value="9600"/>
	<!--which i2c bus to use.  Newer pis all use 1, older ones use 0-->
	<add key="I2CAddress" value="1"/>
	<!--which file to use for magnetic deviation, defaults to newest cof file in exe dir-->
	<add key="cofFilePath" value="/home/brook/Desktop/MrGibbs/src/MrGibbs/bin/Debug/WMM.COF"/>
	<!--which pbw to send to pebbles, defaults ot newest in exe dir-->
	<add key="PbwPath" value="/home/brook/Desktop/MrGibbs/src/MrGibbs/bin/Debug/Mr._Gibbs.pbw"/>
	<!--where to write data files (sqlite), defaults to exe dir-->
	<add key="DataPath" value="/home/brook/Desktop/MrGibbs/src/MrGibbs/bin/Debug"/>
	<!--distance to mark at which mr gibbs will auto advance the "next" mark-->
	<add key="AutoRoundMarkDistanceMeters" value="30"/>
	<!--how long each iteration should take-->
	<add key="TargetCycleTime" value="1000"/>
</appSettings>

mrgibbs's People

Contributors

brookpatten avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.