Giter VIP home page Giter VIP logo

915mhzedisonexplorer_sw's Introduction

Intel Edison Software Library for 915MHz Explorer Block

This software is still in progress. Check back later

This software is released under the MIT license. See the accompanying LICENSE.txt for more details.

Pre-Requisites

The Explorer board libraries require a current version of MRAA to run. MRAA allows the Explorer software to control the Edison's input/output pins directly.

If you're running yocto, do the following:

echo "src mraa-upm http://iotdk.intel.com/repos/3.0/intelgalactic/opkg/i586" > /etc/opkg/mraa-upm.conf
opkg update
opkg install mraa

If you're running ubilinux/jubilinux, follow the instructions here: https://learn.sparkfun.com/tutorials/installing-libmraa-on-ubilinux-for-edison

mraa with support for non-root users

Currently, mraa only works with root access. There's a branch of mraa that gets around this for the Edison, and if you want non-root users to be able to use mraa you can try the following (courtesy of [email protected]).

It’s in this branch https://github.com/intel-iot-devkit/mraa/tree/edison-perms. Imraa can be run with this config file: https://github.com/intel-iot-devkit/mraa/blob/edison-perms/imraa/imraa.io.edison.conf. Switch out ‘brendan’ for user/group combo of your choice and you can set gpio/i2c/spi to a user of your choice. Note that the first 4 lines are what you can edit, the rest should be left as is (we can only support ‘one’ user although you can play with groups to do combinations etc…). You will also need to chmod +x /sys/kernel/debug.

I’ve given it a quick run through and gpio/i2c/spi seems to work on my Arduino breakout, should work on others but may need a bit of tweaking in the config, syslog should tell you and you can add the IO as a raw pin, uart/pwm/aio needs a bit more work but should be easy to add. It’s a bit too Edison specific to get merged right now but with a bit more tweaking I think I can improve it a lot.

To run imraa: $ imraa –I imraa.io.edison.conf

You can run it with the systemd service file provided and put the config in /etc/imraa.conf. That way you don’t need the –I flag.

Setup

On your Intel Edison, run the following after connecting it to the internet:

mkdir ~/src
cd ~/src
git clone https://github.com/EnhancedRadioDevices/915MHzEdisonExplorer_SW.git
cd 915MHzEdisonExplorer_SW/spi_serial
python setup.py install

CC1110 Firmware

This software library is intended to work with a specific firmware variant on the TI CC1110.

You can get that firmware from: https://github.com/EnhancedRadioDevices/subg_rfspy

Installing new firmware onto the CC1110

While the default firmware for the CC1110 should work well with this library, there are cases where you'd want to change or update. To do that, please use the ccprog library from @ps2.

https://github.com/ps2/ccprog

Once you've cloned and made that program, you can flash a new hex file to the CC1110 using the following commands:

wget https://github.com/EnhancedRadioDevices/subg_rfspy/releases/download/v0.8-explorer/spi1_alt2_EDISON_EXPLORER_US_STDLOC.hex
ccprog -p 19,7,36 erase
ccprog -p 19,7,36 write spi1_alt2_EDISON_EXPLORER_US_STDLOC.hex

Note: the 19,7,36 numbers in the above string refer to the Edison hardware pins that are used to communicate with the CC1110. If you aren't using the Explorer board, you may need to use different pin numbers.

Testing

Automated Test Script

Once you have the Explorer software and firmware loaded, you should be able to run the Explorer hardware test script to verify that everything is working. You can do this as follows:

cd ~/src/915MHzEdisonExplorer_SW/
python ExplorerTest.py

This should return an OK message and blink the two user LEDs on the Explorer board. If that happens, your board is working well.

Explorer Radio Test

If you have two Explorers and would like to perform a more thorough test you can perform the following steps:

  1. Plug battery into Explorer. The PWR LED should light up.

  2. Connect USB into the UART port. The PWR LED should stay lit and the CHRG LED should light up (battery should be allowed to partially discharge beforehad to test CHRG)

  3. Run the following commands:

    cd ~/src/915MHzEdisonExplorer_SW/Examples/Wireless python RemoteLEDs.py

This should return a message about finding the CC1110 and indicate that it is waiting for a packet. 4. From the second Explorer run the following commands:

cd ~/src/915MHzEdisonExplorer_SW/Examples/Wireless
python ExplorerCtl.py
4,0,0,0,8,1,1,0

The first Explorer should print the received packet preceeded by RSSI and packet number e.g. [82,1,8,1,1,0]. The LED labeled D2 should also light up. 5. Switch the USB on the first Explorer from the UART to the OTG. The PWR and D2 LEDs should remain lit. On your computer you should see a volume labled "Edison" become available. 6. Remove the battery. The PWR and D2 LEDs should remain lit. The volume "Edison" should remain available.

If every step gave the described results then your board is working well.

USB OTG Testing

If you have a USB On-The-Go cable or adaptor, you can quickly test the OTG port functionality.

  1. Connect to your Explorer Board as normal (using the USB UART port) and log in.

  2. Using the USB OTG cable, connect any Android device (such as a phone) to the USB OTG port on the Explorer.

  3. Run the following command:

    lsusb

If your response looks like this:

unable to initialize libusb: -99

Try flipping your OTG cable around.

If it working correctly, you should see an output that looks something like this:

Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 004: ID 04e8:686c Samsung Electronics Co., Ltd
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

If you see this, then your USB OTG port is working well.

915mhzedisonexplorer_sw's People

Contributors

mogar avatar nick6x avatar oskarpearson avatar scottleibrand 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.