ximinez
Posts
-
Sensebender Micro -
Sensebender MicroIs there a "pre setup" available yet? The failed transmits are before sensor values are transmitted, so they aren't in the actual sketch but somewhere in the library. I'd like to try just sleeping the sensor 5-10 seconds before the initial data is transmitted and see if that makes a difference.
-
Sensebender MicroI just ignore the first fails. It works after that, and has done so for close to a month.
-
Sensebender MicroI'm seeing the same failed signings when the device powers up, but it doesn't fail after those.
-
software AES encryption for NRF24@FotoFieber said:
@Anticimex said:
@FotoFieber with a SenseBender, there is no reason for soft signing. It should have a ATSHA204A chip. But nice that you have working setup :)
Yes, but encryption and ATSHA204A is to big for the SenseBender... :(
Old thread, but... In the dev branch, there's a RF24 refactor that is much smaller. With that, and removing test-mode, there's plenty of space on the sensebender:
#define MY_RADIO_NRF24
#define MY_SIGNING_ATSHA204
#define MY_SIGNING_REQUEST_SIGNATURES
#define MY_SIGNING_NODE_WHITELISTING {{.nodeId = GATEWAY_ADDRESS,.serial = {0xBO,0xGU,0xSK,0xEY,0xZZ,0xFC,0xAD,0x04,0xD1}}}
#define MY_OTA_FIRMWARE_FEATURE
#define MY_RF24_ENABLE_ENCRYPTIONSketch uses 23,196 bytes (75%) of program storage space. Maximum is 30,720 bytes.
Global variables use 1,386 bytes (67%) of dynamic memory, leaving 662 bytes for local variables. Maximum is 2,048 bytes.Even with debug it's only at 91%.
My W5100 gateway ends up at 107% with AES though, but it fits (with 592 bytes to spare) if I use a static address instead of DHCP.
Serial Gateway ends up at only 65%. -
Radio fails to init on W5100Both soft and hard SPI work on my cheap W5100 clone shield (with SD).
-
Radio fails to init on W5100@tekka said:
@ximinez Just tested your setup/settings using an Arduino UNO + W5100 shield and I can confirm, that SOFTSPI (A2=MISO, A1=MOSI, A0=SCK, D6=CSN, D5=CE) and HWSPI (D12=MISO, D11=MOSI, D13=SCK, D6=CSN, D5=CE + #define MY_W5100_SPI_EN 4) work with the refactored RF24 driver.
Please double check you are using the most recent MySensors 2.0.0-beta lib and GatewayW5100 sketch.
I just did (for the second time), and lo and behold it works. Absolutely no clue why, but I'm sorry I've wasted your time.
My gateway can finally have DHCP and signing at the same time :)
-
Radio fails to init on W5100#define MY_DEBUG
#define MY_RADIO_NRF24
#define MY_DEBUG_VERBOSE_RF24
#define MY_GATEWAY_W5100
#define MY_SIGNING_SOFT
#define MY_SIGNING_REQUEST_SIGNATURES
#define MY_RF24_CE_PIN 5
#define MY_RF24_CS_PIN 6Using an UNO with an ethernet shield, wired up like this: https://www.mysensors.org/build/ethernet_gateway
A2 MISO
A1 MOSI
A0 SCK
6 CSN
5 CE -
Radio fails to init on W5100Yes. When I say that I haven't changed the pins, I mean that I haven't changed the physical pins (or the CE/CSN numbers in my sketch) compared to when the same setup worked with the previous RF24 driver.
I love the difference in available space the new driver gives, but I'd love it even more if the radio continued to work :-P
-
Radio fails to init on W5100I updated to dev branch yesterday, and on my W5100 gateway the radio now fails to initialize:
0;255;3;0;9;Starting gateway (RNNGA-, 2.0.0-beta)
0;255;3;0;9;write register, reg=0, value=6
0;255;3;0;9;write register, reg=3, value=3
0;255;3;0;9;write register, reg=4, value=95
0;255;3;0;9;write register, reg=5, value=76
0;255;3;0;9;write register, reg=6, value=35
0;255;3;0;9;read register, reg=6, value=255
0;255;3;0;9;read register, reg=6, value=255
0;255;3;0;9;Sanity check failed: RF_SETUP register=255 instead of 35, check wiring, replace module or non-P version
0;255;3;0;9;Radio init failed. Check wiring.I've tried three different (confirmed working on my sensebender micro) radios, I've quadruple-checked my wiring, and I haven't changed the pins. So something is funky after the RF24 refactor.
-
Sensebender Micro@tbowmo said:
While you're at it, also power down the external flash, as it might also contribute a bit..
I forgot about the flash. That would require bootloader support though? Or is the OTA done by jumping to the bootloader while running, keeping pin states?
I'm waiting for some SOIC breakouts in the mail. When I get them, I'll scavenge the ATSHA and flash module from my zombie sensor and build my own sensebender with blackjack and hookers. -
Sensebender MicroLooks like it works now, but what's the deal with the initial failed signs? Look at http://pastebin.ca/3585005 (GW side) and http://pastebin.ca/3585014 (Sensor side. Not the same powerup). It starts by failing a lot, then after a while everything looks OK.
-
Sensebender MicroYes, I know serial must be unique. Serials go in the whitelist for the corresponding node ID. It turned out to be the NRF24L01+-modules with antennas. Replaced it with a regular module and it worked fine.
(Which is strange, because one of those modules worked fine on the ethernet gw. It doesn't eat that much power does it?) -
Sensebender MicroNo matter what I do now, this is what I get:
send: 2-2-0-0 s=1,c=3,t=16,pt=0,l=0,sg=0,st=fail:
sign fail
send: 2-2-0-0 s=1,c=1,t=0,pt=7,l=5,sg=0,st=fail:26.0
send: 2-2-0-0 s=2,c=3,t=16,pt=0,l=0,sg=0,st=fail:
sign fail
send: 2-2-0-0 s=2,c=1,t=1,pt=2,l=2,sg=0,st=fail:34
send: 2-2-0-0 s=255,c=3,t=16,pt=0,l=0,sg=0,st=fail:
sign fail -
Sensebender MicroI've built a nicer-looking serial gateway instead of the rather large ethernet gateway. I thought that would basically be a "slot-in" as long as I personalize the GW it with the same SOFT_HMAC_KEY, SOFT_SERIAL and AES_KEY as the original GW. Are there more steps that need to be taken to get the sensors to connect?

-
Sensebender Micro@Anticimex Sensor values are getting through though. And signing is requested on both ends (for one sensor so far). I can't see any other #defines that should be set to enable signing. I get the same result on both the zombie sensor and the unmodded one.
I get three "sign fail" (showing up as verify fail on gw) before the sketch reaches setup(), where the ATSHA gets powered up. I will need to power the ATSHA somewhere in the mysensors library. However, once setup() is reached, the ATSHA seems to handle powering down and up just fine.
I can however say that it the Si7021 doesn't like being powered off and back on again after sleep. That causes the MCU to reset.
-
Sensebender Micro0;255;3;0;9;read: 3-3-0 s=1,c=0,t=6,pt=0,l=0,sg=0:
0;255;3;0;9;read: 3-3-0 s=2,c=3,t=16,pt=0,l=0,sg=0:
0;255;3;0;9;send: 0-0-3-3 s=255,c=3,t=17,pt=6,l=25,sg=0,st=ok:57ACB4BD46843BFCC7ABA693CC5AA527F7724531F525338E8A
0;255;3;0;9;read: 3-3-0 s=2,c=0,t=7,pt=0,l=0,sg=0:I feel more secure now :-P
-
Sensebender Micro@Anticimex I've set MY_SIGNING_SOFT, MY_SIGNING_REQUEST_SIGNATURES and MY_SIGNING_NODE_WHITELIST on the GW, and reenabled (normal) debug but not signing debug since that is too big.
With those enabled, if the sending node does not sign, I should not get this?0;255;3;0;9;read: 2-2-0 s=1,c=1,t=0,pt=7,l=5,sg=0:6.3
0;255;3;0;9;read: 2-2-0 s=2,c=1,t=1,pt=2,l=2,sg=0:59 -
Sensebender MicroOk. I set up my GW, and set up my healthy sensebender as an outdoor sensor. The zombie sensor is now a working indoor sensor.
I have enabled signing and set up whitelisting, but enabling signing debugging makes the sketch oversize, so I can't actually check if signing works - but atleast now I have two sensors.
-
Sensebender MicroYup. Setting up my other sensebender as a proper signing sensor and my uno as a gateway. This will have to wait until I get a couple more working sensors.