Giter Site home page Giter Site logo

gsmcmullin / piksi_sample_grabber Goto Github PK

View Code? Open in Web Editor NEW

This project forked from swift-nav/piksi_sample_grabber

0.0 2.0 0.0 1002 KB

Utility to grab raw samples over USB from the Piksi

License: BSD 3-Clause "New" or "Revised" License

Makefile 0.46% C 75.52% C++ 24.01%

piksi_sample_grabber's Introduction

Dependencies

libftdi1

Dependency for sample_grabber http://www.intra2net.com/en/developer/libftdi/download.php

libftdi1 has the following dependencies:

libusb-1.0-0-dev: http://libusb.info/

libconfuse: http://www.nongnu.org/confuse/

We recommend installing these from source from the links. You may need to restart your computer to make sure these kernel modules are running before using the binaries.

FTDI D2XX drivers

Dependency for set_uart_mode and set_fifo_mode http://www.ftdichip.com/Drivers/D2XX.htm

Building

To build the binaries run the following command in the root directory of the repository after installing the dependencies:

$ make

Using the Piksi Sample Grabber

In order to use sample grabber, you must first set your Piksi into FIFO mode instead of the default UART mode. To do this, use set_fifo_mode.

$ ./set_fifo_mode -v

You may need to unload the FTDI Virtual Com Port kernel module before doing this. In Linux, this is done via the following:

$ sudo rmmod ftdi_sio

If using OSX, this is done via:

$ sudo kextunload -b com.FTDI.driver.FTDIUSBSerialDriver

Unplug and replug your Piksi to reset the FTDI chip. Now collect samples by running sample_grabber. Note that you'll need to add the new USB Product ID to your USB permissions in /etc/udev/rules.d (if using Linux), or use sudo on the following commands.

$ sudo ./sample_grabber -v -s 100M mysamples.dat

After you're finished collecting samples, put your Piksi back in UART mode via the following, and then unplugging and replugging the Piksi:

$ sudo ./set_uart_mode -v

If on OSX, you'll need to manually reload the virtual com port kernel module:

$ sudo kextload -b com.FTDI.driver.FTDIUSBSerialDriver

Note : Simultaneous sampling from multiple Piksies

In order to simultaneously sample from multiple Piksies, they must be assigned different USB product ID's. The FTDI custom product ID for Piksi is 0x8398, and this is the ID Piksi is assigned by set_fifo_mode by default. If you want to simultaneously sample from another Piksi, it must be assigned a different product ID. To do this, use the -i option with set_fifo_mode, e.g. :

$ ./set_fifo_mode -v -i 0x8399

This will assign the Piksi the product ID 0x8399, instead of the default 0x8398. Note that you'll need to now add the new USB Product ID to your USB permissions in /etc/udev/rules.d, or use sudo on the following commands. To collect samples from this Piksi, use sample_grabber with the -i option, e.g. :

$ sudo ./sample_grabber -v -s 100M -i 0x8399 my_sample_file.dat

After you finish sampling with this Piksi, you'll want to set it back into UART mode for normal operation. set_uart_mode looks for a device with our custom USB product ID 0x8398 by default, so you'll need to supply the -i option to set_uart_mode to reset the Piksi with the modified id of 0x8399, e.g. :

$ sudo ./set_uart_mode -v -i 0x8399

Binaries

sample_grabber

Receives an arbitrary number of raw samples from the Piksi, using the onboard FT232H in FIFO mode. The FT232H on the Piksimust be set in FIFO mode before sample_grabber can be used - run set_fifo_mode to do this. After finishing using sample_grabber, use set_uart_mode to set the FT232H on the Piksi in UART mode for normal operation.

set_fifo_mode

Writes settings to EEPROM attached to FT232H for synchronous FIFO mode in order to stream raw samples from the RF frontend through the FPGA. Must be used before running sample_grabber.

set_uart_mode

Erases EEPROM attached to FT232H to set the FT232H in UART mode for normal operation. Should be used after running sample_grabber.

piksi_sample_grabber's People

Contributors

aaronaxvig avatar cbeighley avatar fnoble avatar imh 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.