An Acratic Agent

install pyserial

Use pip to install pyserial. First install pip:

sudo apt-get install python-pip

After that install pyserial:

sudo pip install pyserial

lsusb -v -d 0fcf:1008

Bus 001 Device 007: ID 0fcf:1008 Dynastream Innovations, Inc. 

Couldn’t open device, some information will be missing

Device Descriptor:

  bLength                18

  bDescriptorType         1

  bcdUSB               2.00

  bDeviceClass            0 (Defined at Interface level)

  bDeviceSubClass         0 

  bDeviceProtocol         0 

  bMaxPacketSize0        32

  idVendor           0x0fcf Dynastream Innovations, Inc.

  idProduct          0x1008 

  bcdDevice            1.00

  iManufacturer           1 

  iProduct                2 

  iSerial                 3 

  bNumConfigurations      1

  Configuration Descriptor:

    bLength                 9

    bDescriptorType         2

    wTotalLength           32

    bNumInterfaces          1

    bConfigurationValue     1

    iConfiguration          2 

    bmAttributes         0x80

      (Bus Powered)

    MaxPower              100mA

    Interface Descriptor:

      bLength                 9

      bDescriptorType         4

      bInterfaceNumber        0

      bAlternateSetting       0

      bNumEndpoints           2

      bInterfaceClass       255 Vendor Specific Class

      bInterfaceSubClass      0 

      bInterfaceProtocol      0 

      iInterface              2 

      Endpoint Descriptor:

        bLength                 7

        bDescriptorType         5

        bEndpointAddress     0x81  EP 1 IN

        bmAttributes            2

          Transfer Type            Bulk

          Synch Type               None

          Usage Type               Data

        wMaxPacketSize     0x0040  1x 64 bytes

        bInterval               1

      Endpoint Descriptor:

        bLength                 7

        bDescriptorType         5

        bEndpointAddress     0x01  EP 1 OUT

        bmAttributes            2

          Transfer Type            Bulk

          Synch Type               None

          Usage Type               Data

        wMaxPacketSize     0x0040  1x 64 bytes

        bInterval               1

RPi ANT+ USBStick

First Time

Make sure you have permission to access the USB device. Add a text file with one of the following to /etc/udev/rules.d/99-garmin.rules.

On Ubuntu 10.04 (or other other older distros):

SUBSYSTEM=="usb", SYSFS{idVendor}=="0fcf", SYSFS{idProduct}=="1008", MODE="666"

On Ubuntu 12.04 (or other distros running newer udev):

SUBSYSTEM=="usb", ATTR{idVendor}=="0fcf", ATTR{idProduct}=="1008", MODE="666"

Getting my Ralink Technology, Corp. RT5370 Wireless Adapter working with the Raspberry Pi

I’ve gone around the houses a couple of times trying to get this up and running, using various options including /etc/wpa_supplicant/wpa_supplicant.conf and /etc/wpa.config as advised on various sites. I was really looking for a quick-and-dirty way of getting the WiFi dongle checked out. In the end it was very simple.

$ sudo nano /etc/network.interfaces

auto lo

auto wlan0

iface lo

inet loopback

iface eth0 inet dhcp

iface wlan0 inet dhcp

wpa-ssid “LocalNetworkSSID”

wpa-psk “MySecretPassord”

iface default inet dhcp

and that was it! I know it’s not the most secure, but just to check out wlan0 it was enough.

mosquitto install

mosquitto has been installed with a default configuration file.

    You can make changes to the configuration by editing

    /usr/local/etc/mosquitto/mosquitto.conf

Python client bindings can be installed from the Python Package Index

    pip install mosquitto

Javascript client is available at

    http://mosquitto.org/js/

To have launchd start mosquitto at login:

    ln -sfv /usr/local/opt/mosquitto/*.plist ~/Library/LaunchAgents

Then to load mosquitto now:

    launchctl load ~/Library/LaunchAgents/homebrew.mxcl.mosquitto.plist

Or, if you don’t want/need launchctl, you can just run:

    mosquitto -c /usr/local/etc/mosquitto/mosquitto.conf

Warning: /usr/local/sbin is not in your PATH

You can amend this by altering your ~/.bashrc file