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.
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 firstname.lastname@example.org).
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.
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
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.
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.
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:
Plug battery into Explorer. The PWR LED should light up.
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)
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.
Connect to your Explorer Board as normal (using the USB UART port) and log in.
Using the USB OTG cable, connect any Android device (such as a phone) to the USB OTG port on the Explorer.
Run the following command:
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.