Commit Graph
524 Commits
Author SHA1 Message Date
Patrick Fallberg 6aa370d6f2 Personalization sketch for ATSHA204
This sketch is used to personalize the ATSHA204 crypto
circuit.
This is required in order to use the device for secure
communication.

The sketch also supports random key generation.

To personalize a ATSHA204 device, do the following:
1. Ensure the correct pin is used for the ATSHA204.
2. Execute the sketch without other changes to verify
   that it can communicate properly with the device.
3g. For a device used in a gateway:
    Enable LOCK_CONFIGURATION to lock the configuration
    and enable random key generation as well as key storage.
4g. Execute the sketch to lock the configuration and obtain
    a unique key. Be sure to note down the key printed in the
    UART log as it has been stored in the chip and will never
    be accessible again (a new key is calculated on subsequent
    runs).
    The key can still be changed.
5g. Enable SKIP_KEY_STORAGE to prevent generating new random
    keys on sketch re-execution.
3n. For a device used as a node:
    Enable USER_KEY_DATA and enter your private key data
    in user_key_data.
    Then enable LOCK_CONFIGURATION to lock the configuration
4n. Execute the sketch to lock the configuration and store
    the user-supplied key.
5n. Optionally: Enable SKIP_KEY_STORAGE to prevent re-writing
    the user supplied key on sketch re-execution.
6.  Optionally: Enable LOCK_DATA to prevent the key to be
    changed.
2015-01-10 19:57:09 +01:00
Patrick Fallberg 963a756605 sha204 library extended with CRC calculator
Locking operations are recommended to include CRC
and since sha204 library internally carries the proper
algorithm for this, it has now been refactored to support
both static and incremental calculations needed for both
command marchalling and locking.
2015-01-10 18:39:47 +01:00
Patrick Fallberg 1ac6f0a291 Removed examples from sha204 libraries
MySensors will have native support for sha204 and the
source for usage and personalization of sha204 will be
much more elaborate than this example so it does not
provide additional understanding for the chip.
2015-01-10 18:39:46 +01:00
Patrick Fallberg 9fd41b4030 Added sha204 library
Taken from the sha204_library folder in
https://github.com/jimblom/sha204-Breakout
Commit 8e1ac05ef987b1869605ad067db2bdbaec1c109f

ATSHA204 is a crypto cirquit from Atmel that enables
SHA256-based MAC and HMAC calculations as well as
secure key storage and random number generation.

This can be used to sign messages passed between
sensor nodes and prevent both man-in-the-middle and
replay attacking.
2015-01-10 18:37:43 +01:00
Henrik Ekblad 0dd6687488 Merge branch 'master' into development
Conflicts:
	libraries/MySensors/MySensor.cpp
	libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino
2014-11-25 16:52:07 +01:00
Henrik Ekblad 843e163328 Update BMP085 library.
And additional pressure sensor problems repoted by @MagKas.
http://forum.mysensors.org/topic/631/pressure-sensor-arduino-low-memory
2014-11-25 16:18:40 +01:00
Henrik Ekblad ab3db8b28b Fix bug in PressureSensor. 2014-11-25 15:48:10 +01:00
Henrik Ekblad 25230d7ef8 Update Time library to work on IDE 1.5.8
Also removed a few large pdfs from UTFT library to make library compile
on codebender (a but that they will fix eventually).
2014-11-19 09:03:51 +01:00
Henrik Ekblad 024d6efb82 Ethernet SoftSPI
Update ethernet sketch to give correct instructions when using
W5100/SoftSPI.
2014-11-14 00:36:49 +01:00
Henrik Ekblad f143fcd7a2 Moved RFM69 library to utility 2014-11-03 20:08:56 +01:00
Henrik Ekblad 03740b2555 Merge branch 'kolaf-development' into development 2014-11-03 19:52:51 +01:00
Frank Olaf Sem-Jacobsen db73e3c788 switched to low-power library 2014-11-03 19:21:40 +01:00
Frank Olaf Sem-Jacobsen 26138b7972 RF69 2014-10-31 20:27:20 +01:00
Henrik Ekblad 4783cac945 Set version to 1.4.1 2014-10-31 07:21:57 +01:00
Henrik Ekblad abe3956f5e Fixed bug resulting in ACK problems
Even thouh auto ack was enabled we still called
RF24::writeAckPayload(pipe,&pipe, 1 ); after reading a message.
This probably caused radio to misbehave.
2014-10-29 18:00:34 +01:00
Henrik Ekblad 3d2d7db845 Fix problem reported by Yveaux here:
https://github.com/mysensors/Arduino/commit/aeb9f30482532122b624fe4f061b5176571b0c6b#commitcomment-8300974
2014-10-25 10:49:32 +02:00
Henrik Ekblad 8ec2ebdfce Sent startup message to controller when it connects. 2014-10-23 09:02:30 +02:00
Henrik Ekblad aeb9f30482 Merge branch 'ToSa27-tosa' into development 2014-10-23 00:30:34 +02:00
Henrik Ekblad b0057cc152 Merge branch 'tosa' of https://github.com/ToSa27/Arduino into
ToSa27-tosa

Conflicts:
	libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino
2014-10-23 00:30:01 +02:00
Henrik Ekblad 301296359b Merge branch 'master' into development
Conflicts:
	libraries/UIPEthernet/utility/uipethernet-conf.h
2014-10-22 00:15:56 +02:00
Henrik Ekblad 9329626e8b Update to latest UIPEthernet library 2014-10-22 00:11:38 +02:00
Henrik Ekblad 3127b1549a Merge branch 'development' of https://github.com/mysensors/Arduino.git into development 2014-10-21 23:47:04 +02:00
Henrik Ekblad d5ca838371 Update UIPEthernet library 2014-10-21 23:44:52 +02:00
Henrik Ekblad 91e913f854 Update include statement resulting in compile error. 2014-10-17 16:41:58 +02:00
Henrik Ekblad e32c71c216 Merge branch 'master' of https://github.com/mysensors/Arduino.git 2014-10-17 00:07:44 +02:00
Henrik Ekblad c2acbac2e0 Forgot to enable MINIMAL mode for RF24 in the latest commit. 2014-10-17 00:07:15 +02:00
Henrik Ekblad 2fd948fc66 Add new scene controller with touch display example.
Upgraded RF24 to latest version which supports SoftSPI. 
Added DigitalIO and UTFT libraries to support the new example.
Fix problem reported in RelayWithButtonActuator example.
2014-10-17 00:01:55 +02:00
Henrik Ekblad f64e530353 Merge pull request #37 from fallberg/development
Fix for W5100 Ethernet module
2014-10-11 00:22:18 +02:00
Patrick Fallberg 96f5b39e50 Corrected merge mistake 2014-10-11 00:03:35 +02:00
Patrick Fallberg 99b7b12856 Merge remote-tracking branch 'upstream/development' into development
Conflicts:
	libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino
2014-10-11 00:00:27 +02:00
Patrick Fallberg e0e0d4aff3 Merge remote-tracking branch 'upstream/development' into development
Conflicts:
	libraries/MySensors/examples/EthernetGateway/EthernetGateway.ino
2014-10-10 23:56:29 +02:00
Patrick Fallberg f5ef712308 Support for WIZnet W5100 ethernet module SPI_EN
The W5100 module has a SPI_EN signal that enables or disables the SPI
bus.
A bug in the module causes MISO to be continously driven by the module
when SPI_EN is pulled high. This is described in this application note:
https://www.google.se/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CCAQFjAA&url=http%3A%2F%2Fwww.wiznet.co.kr%2FUpLoad_Files%2FReferenceFiles%2FW5100_AN_SPI.pdf&ei=ij84VK7uM6nNygPqvICYDw&usg=AFQjCNGz1qttBEwG1azc1Eza4j69v1rpDQ&sig2=UUUtb4Dr0F35g8ByHMsyig&bvm=bv.77161500,d.bGQ

This commit changes the Ethernet gateway sketch to drive SPI_EN high or
low, depending on which module is in use (SPI bus is shared between
Ethernet and RF modules).
The pin attached to SPI_EN is defined by W5100_SPI_EN. This define can
be commented out if SPI_EN is not needed (different module) or if the
module manages SPI_EN in hardware (some W5100 shields does this).
2014-10-10 22:39:47 +02:00
Patrick Fallberg b97372ed01 Added .gitignore to filter stino settings files
Stino is a plugin for SublimeText to allow SublimeText to act as
an Arduino IDE.
2014-10-10 22:34:14 +02:00
ToSa27 2647345c4d Adding defines for different board layouts in MyConfig
Adjusted all Gateway examples but only one sensor example so far
(DallasTemperature). Other sensor examples should get the same three
lines added (not mandatory but helps avoiding unnecessary debugging when
selecting the wrong setup)
2014-09-29 10:33:16 +02:00
ToSa27 39bab3dfba Split Application and Driver Layer 2014-09-29 00:24:57 +02:00
ToSa27 c3dbcd1fea Accept Time Broadcasts
NodeJsController sending Time broadcasts every few minutes.
Sensor accepting not just Time messages addressed to the specific
sensor.
2014-09-28 23:47:22 +02:00
ToSa27 7a304a0523 Reduce Bootloader Size
changing few uint16 variables to uint8
2014-09-28 23:43:28 +02:00
Henrik Ekblad f71ed97aaa Made Time, LiquidCrystal and RealTimeClockDisplaySensor example work in Arduino IDE 1.5.7. 2014-09-20 13:04:01 +02:00
Henrik Ekblad 82dda0fe30 Merge branch 'master' into development 2014-09-16 22:19:21 +02:00
Henrik Ekblad 26129b06a9 Upgrade UIP-library to latest. Recommend Arduino IDE 1.5.7 when compiling EtherentGateway sketch. 2014-09-16 22:17:07 +02:00
Henrik Ekblad 27885fad9b Prefix enums to proghibit name clash with other libraries. 2014-09-15 19:29:42 +02:00
Henrik Ekblad 78b5df44b4 Remove spam from pulse sensors when gateway is unable to receive request for meter value. 2014-09-15 13:48:44 +02:00
Henrik Ekblad 86b6411280 Merge branch 'hek-gateway-rework' into development
Conflicts:
	libraries/MySensors/MySensor.cpp
	libraries/MySensors/MySensor.h
2014-09-11 09:56:30 +02:00
Henrik Ekblad d8ba222759 Merge branch 'master' into development 2014-09-11 09:51:59 +02:00
Henrik Ekblad 3b86153a18 Merge pull request #35 from Yveaux/development
Improved parent node search
2014-09-11 09:42:07 +02:00
Yveaux e5bd891a77 Improved parent node search
Retry parent node search with each transmit when parent has not been
found.
Transmit does not block on transmit when no parent has been found as
this depletes batteries on battery powered nodes.
Fix nRF24 configuration for dynamic ACK's. This bug caused broadcasts to
be sent with auto-ACK's.
To not break existing functionality parent search can be started when
node ID is still unknown. In this case node ID is set to broadcast ID,
which can cause funky stuff to happen...
2014-09-11 09:37:42 +02:00
Henrik Ekblad 8f1cf6c454 Merge branch 'master' of https://github.com/mysensors/Arduino 2014-09-11 00:46:07 +02:00
Henrik Ekblad bfd589455b Add new example showing RTC with LCD display. 2014-09-11 00:45:56 +02:00
Henrik Ekblad 01a6adb1cc Merge pull request #34 from mysensors/revert-33-master
Revert "Force parent node search for all transmits when parent node is n...
2014-09-10 21:27:40 +02:00
Henrik Ekblad 6314cf8ef1 Revert "Force parent node search for all transmits when parent node is not set or communication failed a number of times" 2014-09-10 21:23:52 +02:00