Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. tekka
    3. Posts
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by tekka

    • RE: Code Garage to the rescue.

      @OldSurferDude The website should be back again.

      posted in General Discussion
      tekka
      tekka
    • RE: MYSBootloader 1.3 pre-release & MYSController 1.0.0beta

      @luizrrocha Can you post your sketch and (if available) debug log here?

      posted in Development
      tekka
      tekka
    • RE: Instable ESP32 MQTT gateway with RFM69

      @electrik Probably this is PubSubClient-related. Please provide additional infos:

      • ESP board definitions version
      • MySensors version
      • GW sketch
      posted in Troubleshooting
      tekka
      tekka
    • RE: [RFM95] Ant Switch/TxRx switch pins

      @eiten A similar approach was used for a NRF5 +PA/LNA module: https://github.com/mysensors/MySensors/pull/1414/files#diff-7b958e4728831b83d2359a08827bcae1R64-R80

      posted in My Project
      tekka
      tekka
    • RE: ATC and repeating nodes

      @eiten Would be helpful to see the debug logs (in rfm/sx verbose mode)

      posted in Development
      tekka
      tekka
    • RE: CubeCell reloaded: the SX126x hal drivers, please test

      @eiten Yep, already saw this one. Based on the heltec implementation, the sx-registers are mapped to specific memory regions of the mcu. Would be interesting to have here a complete ASR-specific documentation...

      posted in Hardware
      tekka
      tekka
    • RE: CubeCell reloaded: the SX126x hal drivers, please test

      @eiten Great job! Did you come across an "usable" ASR6501 datasheet - so far the information on this SoC is rather sparse?

      posted in Hardware
      tekka
      tekka
    • RE: [Solved] Arduino Nanos don't work as nodes

      @Avamander Can you upload both, the GW and node sketches from the working pair nanoGW/megaNode? Also, it would be helpful to see the full GW log from the non-working combination (nanoNode/megaGW) with MY_DEBUG_VERBOSE_RF24 enabled. If time allows, I'd like to reproduce and test your setup.

      posted in Hardware
      tekka
      tekka
    • RE: Node to Node Communication via Gatreway

      @FullMetal said in Node to Node Communication via Gatreway: Please upload the debug logs for further troubleshooting.

      posted in Development
      tekka
      tekka
    • RE: [Solved] How to adjust MySBootloader files to compile other EN & CSN pins different channel and external 8MHz crystal

      @Joerideman Glad to hear you finally got FOTA working πŸ‘ - generally speaking, you can do both, serial FW uploads and FOTA, however, switching from FOTA to serial updates or vice-versa, you may want to clear the FW checksum stored in the EEPROM as instructed above. If your sketches are rather large or for prototyping/dev, I'd advise you to use the optiboot bootloader as the serial uploads are faster and the optiboot bootloaders uses less flash storage...

      posted in Development
      tekka
      tekka
    • RE: [Solved] How to adjust MySBootloader files to compile other EN & CSN pins different channel and external 8MHz crystal

      @Joerideman That looks already much better!

      For the sake of completeness, here is the modified MYSBootloader source code.

      Try clearing the EEPROM and then re-assign the FW

      fe0a6e88-92cd-470f-a961-5864fdf6076e-image.png

      posted in Development
      tekka
      tekka
    • RE: [Solved] How to adjust MySBootloader files to compile other EN & CSN pins different channel and external 8MHz crystal

      @Joerideman You can ignore that warning (it is related to rm not being found).

      Can you try this .hex file: CE=8, CSN=9, CLK=8MHz, BAUD=57600, RF24 channel=122: download file

      Please post the log of the bootloader flashing process...

      posted in Development
      tekka
      tekka
    • RE: [Solved] How to adjust MySBootloader files to compile other EN & CSN pins different channel and external 8MHz crystal

      @Joerideman Thanks, I again had a quick look at your HW.h file and found the issue:

      // set pin mode: MOSI,SCLK,CE,CSN = OUTPUT, MISO = INPUT (=> all on same port)
      SPI_DDR = _BV(SPI_MOSI) | _BV(SPI_SCLK) | _BV(CE_PIN) | _BV(PB2) | ~_BV(SPI_MISO);
      CSN_DDR = _BV(CSN_PIN);
      

      SPI_DDR and CSN_DDR are both pointing at DDRB:

      // SPI communication
      #define SPI_PORT	PORTB	// 
      #define SPI_DDR		DDRB	//
      

      and

      #elif defined(SPI_PINS_CE8_CSN9)
      	#define CSN_PORT	PORTB	// port for CSN
      	#define CSN_DDR		DDRB	// DDR for CSN
      	#define	CSN_PIN		PB1		// Arduino Pin 9 <-> Bit 1 of port B
      
      

      Thus, setting CSN_DDR = _BV(CSN_PIN) you overwrite SPI_DDR. Comment out the second line and add _BV(CSN_PIN) to SPI_DDR:

      // set pin mode: MOSI,SCLK,CE,CSN = OUTPUT, MISO = INPUT (=> all on same port)
      SPI_DDR = _BV(SPI_MOSI) | _BV(SPI_SCLK) | _BV(CE_PIN) | _BV(PB2) |  _BV(CSN_PIN);
      //CSN_DDR = _BV(CSN_PIN);
      
      
      posted in Development
      tekka
      tekka
    • RE: Node to Node Communication via Gatreway

      @FullMetal Please post a full debug log of both nodes showing the observed behaviour.

      posted in Development
      tekka
      tekka
    • RE: [Solved] How to adjust MySBootloader files to compile other EN & CSN pins different channel and external 8MHz crystal

      @Joerideman Yeah, I assume something is wrong with the bootloader configuration. Can you zip and upload all bootloader files (or the entire folder) you are using with all the settings and modifications you did?

      posted in Development
      tekka
      tekka
    • RE: [Solved] How to adjust MySBootloader files to compile other EN & CSN pins different channel and external 8MHz crystal

      @Joerideman The bootloader doesn't generate serial debug output, would be helpful to see the GW debug log

      posted in Development
      tekka
      tekka
    • RE: [Solved] How to adjust MySBootloader files to compile other EN & CSN pins different channel and external 8MHz crystal

      @Joerideman That looks alright! Just out of curiosity, if you use the bootloader with the default settings (channel, ce/csn assignment), do you see a difference in the debug log?

      posted in Development
      tekka
      tekka
    • RE: [Solved] How to adjust MySBootloader files to compile other EN & CSN pins different channel and external 8MHz crystal

      @Joerideman There is no sign of the bootloader here - can you confirm that your GW is listening on channel 122?

      posted in Development
      tekka
      tekka
    • RE: [Solved] How to adjust MySBootloader files to compile other EN & CSN pins different channel and external 8MHz crystal

      @Joerideman Setting PB2 as output ensures that the SPI runs in master mode which is essential for a correct communication between the ATmega328 and the RF24 radio.

      However, after setting PB2 you report:

      And now I can use the serial upload :).

      which is not related to SPI (serial upload uses the UART interface).

      I have watch the MyScontroller Debug window and the messages. But I only see a presentation at some point, and than it is started.

      Please provide debug logs / screenshots / whatever you have for further troubleshooting...

      posted in Development
      tekka
      tekka
    • RE: [Solved] How to adjust MySBootloader files to compile other EN & CSN pins different channel and external 8MHz crystal

      @Joerideman I'm not quite sure how setting the master SPI mode should fix the serial upload issue...What exactly are you referring to? Serial upload via FTDI adapter or FOTA (=firmware over the air) update via RF24?

      posted in Development
      tekka
      tekka
    • RE: [Solved] How to adjust MySBootloader files to compile other EN & CSN pins different channel and external 8MHz crystal

      @Joerideman I noticed that you didn't set PB2 as output (see comments) => SPI operates in slave mode. Do you see radio activity on channel 122 after fixing that?

      posted in Development
      tekka
      tekka
    • RE: [Solved] How to adjust MySBootloader files to compile other EN & CSN pins different channel and external 8MHz crystal

      @Joerideman What board are you using? Also, please post the entire SPI communication section from HW.h for full reference.

      posted in Development
      tekka
      tekka
    • RE: Something's cooking in the MySensors labs...

      @BearWithBeard Excellent! Thanks for the feedback. (If your setup/time allows, would be interesting to get your feedback on the ESP MQTT GW with dualRF...)

      posted in Announcements
      tekka
      tekka
    • RE: Something's cooking in the MySensors labs...

      @monte yes, all transport types are supported

      posted in Announcements
      tekka
      tekka
    • Something's cooking in the MySensors labs...

      20200501_181009.jpg

      Sensbender, Janus, and HALO - they all support multiple RF modules, but the MySensors framework doesn't...until now πŸ™‚

      Example of a dualRF Sensebender serial gateway configuration - as simple as that:

      #define MY_GATEWAY_SERIAL
      
      #define MY_RADIO_RF24
      #define MY_RADIO_RFM69
      #define MY_RFM69_NEW_DRIVER // required for multitransport
      
      // optional (but recommended)
      #define MY_RF24_USE_INTERRUPTS
      

      Some of the new features:

      • multiple transports with RX queue
      • GW does radio-specific routing, however, the network is still limited to 254 nodes
      • RFM95 radio driver can run in RFM69 compatibility mode

      This is still WIP (and will be for a while) but you can already get your hands dirty and test the PR.

      Kudos to @scalz (Janus and HALO) and @tbowmo (Sensebender) for their cool boards!

      Have fun!

      https://github.com/mysensors/MySensors/pull/1414

      posted in Announcements
      tekka
      tekka
    • RE: Is it worth it adding a reset circuit to MySensors nodes?

      @mfalkvidd @bjacobse correct, WDT settings are saved and restored - see here https://github.com/mysensors/MySensors/blob/development/hal/architecture/AVR/MyHwAVR.cpp#L92 and https://github.com/mysensors/MySensors/blob/development/hal/architecture/AVR/MyHwAVR.cpp#L116-L119

      posted in Hardware
      tekka
      tekka
    • RE: πŸ’¬ MYSController

      @andy5211d MYSController won't work with GW debug output. Use the GatewaySerial or GatewayW5100 example sketch to interact with your nodes.

      posted in Announcements
      tekka
      tekka
    • RE: ESP32 + Signing fails after xxx msg as result of memory leak

      @Technovation It take the blame πŸ™‚
      Thanks for reporting, PR submitted.

      (The debug message is correct; msg contains the incoming nonce request => the sender is the recipient of the nonce response)

      https://github.com/mysensors/MySensors/pull/1402

      posted in Bug Reports
      tekka
      tekka
    • RE: !MCO:PRO:RC=1 in debug logs

      Updated log parser to include RC debug messages: https://github.com/mysensors/MySensors/pull/1396

      posted in Troubleshooting
      tekka
      tekka
    • RE: STM32L0 support

      @Marcell-Gerzsenyi Perfect, thanks for reporting back!

      posted in Hardware
      tekka
      tekka
    • RE: [SOLVED] Need help with ESP8266 MQTT Gateway (RFM69HW radio)

      @willemx Excellent! Have fun! πŸ‘

      posted in Troubleshooting
      tekka
      tekka
    • RE: [SOLVED] Need help with ESP8266 MQTT Gateway (RFM69HW radio)

      @willemx said in Need help with ESP8266 MQTT Gateway (RFM69HW radio):

      450 !RFM69:INIT:SANCHK FAIL

      There is a problem with the rfm69 module and/or wiring on your GW - can you exchange the rfm69 module with the one from the node and post the logs?

      posted in Troubleshooting
      tekka
      tekka
    • RE: [SOLVED] Need help with ESP8266 MQTT Gateway (RFM69HW radio)

      @willemx Can you try with the new rfm69 driver & debug verbose mode on both, node & gw - i.e.

      #define MY_RFM69_NEW_DRIVER
      #define MY_DEBUG_VERBOSE_RFM69
      

      and post the debug logs here.

      posted in Troubleshooting
      tekka
      tekka
    • RE: [SOLVED] Need help with ESP8266 MQTT Gateway (RFM69HW radio)

      @willemx And you have 868Mhz modules?

      posted in Troubleshooting
      tekka
      tekka
    • RE: [Solved] Getting Arduino IDE error with Relay Actuator sketch

      @mrhutchinsonmn It compiles here, can you post the entire compilation log?

      posted in General Discussion
      tekka
      tekka
    • RE: How can one use MyMessage class in library?

      @matkor like that:

      #define MY_CORE_ONLY
      #include <MySensors.h>
      MyMessage MyVar;
      
      void setup() {}
      void loop() {}
      
      posted in Development
      tekka
      tekka
    • RE: STM32L0 support

      @Marcell-Gerzsenyi I've added initial support for the Arduino STM32 core, but things move slowly with limited bandwith. Please feel free to test and report back:

      https://github.com/tekka007/MySensors/tree/STM32duinoUpdate

      posted in Hardware
      tekka
      tekka
    • RE: [Solved] Getting Arduino IDE error with Relay Actuator sketch

      @mrhutchinsonmn Looks like your MySensors library is outdated, please update to 2.3.2

      posted in General Discussion
      tekka
      tekka
    • RE: Error ! nowhere to send

      @mntlvr Looks like you're running an older version of the Arduino IDE (1.8.4) - please update to 1.8.12 and give it another shot.

      posted in Development
      tekka
      tekka
    • RE: [Solved] Small problem with getting RSSI in an otherwise working RFM95 setup

      PR submitted: https://github.com/mysensors/MySensors/pull/1392

      posted in Troubleshooting
      tekka
      tekka
    • RE: MySensors GW sends it's internal command I_VERSION every 10 sec

      @macieiks This is triggered by the HA, as the log suggests:

      2020-02-19 08:18:39 DEBUG (MainThread) [mysensors] Sending 0;255;3;0;2; 
      2020-02-19 08:18:39 DEBUG (MainThread) [mysensors] Receiving 0;255;3;0;2;2.3.2 
      2020-02-19 08:18:49 DEBUG (MainThread) [mysensors] Sending 0;255;3;0;2;
      2020-02-19 08:18:49 DEBUG (MainThread) [mysensors] Receiving 0;255;3;0;2;2.3.2
      

      Please check with the HA ppl

      posted in Home Assistant
      tekka
      tekka
    • RE: [Solved] Small problem with getting RSSI in an otherwise working RFM95 setup

      @Joost did you set

      #define MY_SIGNAL_REPORT_ENABLED
      

      to enable the signal report functionality as documented here?

      posted in Troubleshooting
      tekka
      tekka
    • RE: to much processing in loop

      @rozpruwacz You can call

      _process();
      

      however, this is an internal function and may change in upcoming releases.

      posted in General Discussion
      tekka
      tekka
    • RE: MySensors 2.3.2 released

      @alowhum No need to substitute isAck() - it is marked deprecated but remains fully functional in the 2.x code. However, it is advisable to use isEcho() in the future to avoid confusions.

      posted in Announcements
      tekka
      tekka
    • MySensors 2.3.2 released

      Yet another early holiday gift, MySensors 2.3.2 has finally been released!

      Highlights

      • Add support for RPI4
      • Transport and crypto HAL update
      • Rename "soft ack" to echo
      • Add log parser
      • RF24 improvements

      ...and many other bug fixes and tweaks

      Release notes and changelog: https://github.com/mysensors/MySensors/releases/tag/2.3.2

      Important information:

      If you encounter compilation issues, update your board definitions:

      • AVR 1.8.2
      • ESP8266 2.6.2
      • ESP32 1.0.4
      • SAMD 1.8.4
      • nRF5 0.6.0 (Sandeep Mistry)
      • STM32F1 2019.12.8 (stm32duino)

      Special thanks to the following people who have contributed code to this release:

      • Alfredo
      • desander
      • hannesweisbach
      • ltigges
      • Mikael Falkvidd
      • Patrick Fallberg
      • pragtich
      • Rik Jansen
      • tekka
      • Yveaux

      ...and a little teaser: 2.4 will come with a set of new features some of you have been waiting for... stay tuned πŸ™‚

      posted in Announcements
      tekka
      tekka
    • RE: Signing fails due to NACKed messages

      @encrypt said in Signing fails due to NACKed messages:

      I can't enable radio logging easily but I suspect it could be caused by the auto-adjusting RSSI feature...

      I'm afraid, but without additional debug information it's gonna stay a guessing game. If possible, enable

      #define MY_DEBUG_VERBOSE_SIGNING
      #define MY_DEBUG_VERBOSE_RFM69
      

      for additional info. Also, please post the node sketch to interpret the log in the right context.

      posted in Troubleshooting
      tekka
      tekka
    • RE: Introducing MySensors on nRF24LE1

      @chickey @ykhokhlov This was a POC I did a few years ago and never updated the code nor did I do further development on the library due to limited interest. There are way better alternatives available nowadays, i.e. nrf51/nrf52.

      posted in My Project
      tekka
      tekka
    • RE: Mysensors with RFM98

      @dsiee You have to set the appropriate center frequency for your modules, i.e. for rfm98 use:

      #define MY_RFM95_FREQUENCY RFM95_434MHZ
      

      (RFM95_434MHZ = 433.92Mhz center frequency)

      posted in Troubleshooting
      tekka
      tekka
    • RE: My experiences with MySensors

      @neverdie said in My experiences with MySensors:

      Is LoRa even supported by mysensors as yet? It's been a long while since I last checked.

      Yes, we support RFM95 radios and various LoRa settings: https://www.mysensors.org/apidocs-beta/group__RFM95SettingGrpPub.html

      posted in My Project
      tekka
      tekka
    • RE: πŸ’¬ Sensebender Gateway

      @pepson Did you add

      #include <Ethernet.h>
      

      ?

      posted in OpenHardware.io
      tekka
      tekka
    • RE: mysbootloader with MY_SIGINING_SIMPLE_PASSWD

      @zen85 This feature is currently not supported in MYSBootloader.

      posted in Troubleshooting
      tekka
      tekka
    • RE: Bootloader ATmega 2560 for OTA

      @mkaiser That's a great idea - code contributions are always welcome πŸ˜‰

      posted in Development
      tekka
      tekka
    • RE: mysbootloader not working with nano? [solved]

      @zen85 You have to create a new CE/CSN definition here and adjust the init code here.

      posted in Troubleshooting
      tekka
      tekka
    • RE: mysbootloader not working with nano? [solved]

      @zen85 correct, if the radio pins are different you have to recompile the bootloader.

      posted in Troubleshooting
      tekka
      tekka
    • RE: [Solved] Device and gateway see each other, but not regestering

      @magpern One more thing - please re-run the test with my sketch uploaded to your node and adding

      #define MY_NODE_ID 100
      

      before the MySensors include, and an unmodified GW serial sketch from the example folder. Please post again both logs here.

      posted in Troubleshooting
      tekka
      tekka
    • RE: [Solved] Device and gateway see each other, but not regestering

      @magpern said in Device and gateway see each other, but not regestering:

      @tekka

      I actually don't think the device and the gateway actively talk. It is more like the Gateway is listening, but not talking.

      In your first post you mentioned:

      I have altered the device sketch to just have the bare minimum. The gateway works with other devices.

      So you can confirm that the sensebender GW communicates with other nodes? I'd like to narrow down the issue to the actual node.

      posted in Troubleshooting
      tekka
      tekka
    • RE: [Solved] Device and gateway see each other, but not regestering

      @magpern The issue is still the same: GW seems ok (based on the log and your report that it communicates with other nodes), but the actuator node does not receive a single message.

      Please upload this sketch to your node, run it for 10s and post the full debug log of GW & node.

      #define MY_DEBUG
      #define MY_DEBUG_VERBOSE_TRANSPORT_HAL
      
      #define MY_RADIO_RF24
      #define MY_RF24_PA_LEVEL RF24_PA_MAX 
      #define MY_RF24_DATARATE RF24_1MBPS
      #define MY_DEBUG_VERBOSE_RF24
      
      #include <MySensors.h>
      
      MyMessage msgGeneral(0, V_VAR1);
      uint32_t counter = 0, lastSend = 0;
      
      void setup() {
      	DEBUG_OUTPUT(PSTR("L=0x%" PRIx8 ", H=0x%" PRIx8 ", E=0x%" PRIx8 "\n"),
      		boot_lock_fuse_bits_get(GET_LOW_FUSE_BITS),
      		boot_lock_fuse_bits_get(GET_HIGH_FUSE_BITS),
      		boot_lock_fuse_bits_get(GET_EXTENDED_FUSE_BITS));
      }
      
      void presentation() {
        sendSketchInfo("Testnode", "1");
      }
      
      void loop() {
        if (millis() - lastSend > 1000) {
          send(msgGeneral.set(millis()));
          Serial.println(counter);
          counter = 0;
          lastSend = millis(); 
        }
        counter++;
      }
      
      posted in Troubleshooting
      tekka
      tekka
    • RE: mysgw.service fails with SEGV if ontroller connects

      @dirk120 what dev version were you on?

      posted in Troubleshooting
      tekka
      tekka
    • RE: [SOLVED] Sensbender Gateway gives a lot of "hu"

      @magpern This originates from the updated Arduino SAMD board definitions (>1.8.1) and is fixed in the dev branch. You can add

      #undef PRId8
      #undef PRIi8
      #undef PRIo8
      #undef PRIu8
      #undef PRIx8
      #undef PRIX8
      #undef PRIdLEAST8
      #undef PRIiLEAST8
      #undef PRIoLEAST8
      #undef PRIuLEAST8
      #undef PRIxLEAST8
      #undef PRIXLEAST8
      #undef PRIdFAST8
      #undef PRIiFAST8
      #undef PRIoFAST8
      #undef PRIuFAST8
      #undef PRIxFAST8
      #undef PRIXFAST8
      #define PRId8		"d"
      #define PRIi8		"i"
      #define PRIo8		"o"
      #define PRIu8		"u"
      #define PRIx8		"x"
      #define PRIX8		"X"
      #define PRIdLEAST8	"d"
      #define PRIiLEAST8	"i"
      #define PRIoLEAST8	"o"
      #define PRIuLEAST8	"u"
      #define PRIxLEAST8	"x"
      #define PRIXLEAST8	"X"
      #define PRIdFAST8	"d"
      #define PRIiFAST8	"i"
      #define PRIoFAST8	"o"
      #define PRIuFAST8	"u"
      #define PRIxFAST8	"x"
      #define PRIXFAST8	"X"
      

      before the MySensor.h include to temporarily fix that.

      posted in Troubleshooting
      tekka
      tekka
    • RE: NRF24 transport status not initialized

      @skywatch Here is a simplified flowchart that illustrates the two most common MySensors bootup scenarios (but as @mfalkvidd pointed out, there are many more possibilities depending on the transport configuration and/or defines):

      0_1562772587482_d16c6501-500b-41f1-9c9a-44c578789a9a-image.png

      posted in Troubleshooting
      tekka
      tekka
    • RE: NRF24 transport status not initialized

      @danielef alternatively, you can move the setup() code to preHwInit() - this function is called before the any other HW initializes.

      posted in Troubleshooting
      tekka
      tekka
    • RE: NRF24 transport status not initialized

      @danielef A driver initialization in setup() interferes with the SPI and/or RF24 radio: TSP=0 hints to a failed transport sanity check. I presume you're having radio issues in loop()?

      posted in Troubleshooting
      tekka
      tekka
    • RE: MY_RF24_IRQ_PIN on ESP8266 GW

      @yveaux Defining MY_RF24_IRQ_PIN does not enable the RX queue feature per se. Therefore it compiles πŸ˜‰

      posted in General Discussion
      tekka
      tekka
    • RE: MY_RF24_IRQ_PIN on ESP8266 GW

      @mfalkvidd said in MY_RF24_IRQ_PIN on ESP8266 GW:

      @sergio-rius if the gateway can send and receive messages, the irq is working.

      MY_RF24_IRQ_PIN is currently only used for the RX_QUEUE_BUFFER feature, and unfortunately, ESP8266 does not support interrupt usage for SPI. See comments here: https://github.com/mysensors/MySensors/blob/development/hal/transport/RF24/driver/RF24.cpp#L525

      posted in General Discussion
      tekka
      tekka
    • RE: Possible CryptoHAL bug.

      @gerator Looks like a stack overflow - how much RAM is free after compilation? Also, could you try with the latest development branch?

      posted in Bug Reports
      tekka
      tekka
    • RE: nRF24L01+ Communication Failure: Root Cause and β€œSolution”

      Here is a modified RF24 stack with (among other little changes) a waiting period and no IRQ line (as @Yveaux suggested) for testing: https://github.com/tekka007/MySensors/tree/OptimizedRF24polling

      @odritter

      Using the previously mentioned sensor board with a header socket, we observed that almost any nRF24L01+ board worked when cabled (~6 inches) rather than directly plugging into the sensor board. (BUT WHY?????)

      Is this setup referring to image 7?

      posted in Troubleshooting
      tekka
      tekka
    • RE: Failed to make encryption work on a barebone ATMEGA328P

      @mfalkvidd The Arduino builder generates two .hex files, one of which contains the bootloader as specified in boards.txt. Depending on the flashing settings you may burn the sketch only or the sketch + bootloader, however, the bootloader is not needed for ISP programming.

      posted in Troubleshooting
      tekka
      tekka
    • RE: Failed to make encryption work on a barebone ATMEGA328P

      @encrypt Ok, this explains your issue: programming via ISP will do a chip erase and hence the EESAVE fuse setting is critical for e2p persistance. The most common use case is programming via serial bootloader (e.g. optiboot, atmegaboot, etc.) which only does page erases and leaves the rest untouched. To answer your question: If you're using an ISP programmer you do not need a bootloader.

      posted in Troubleshooting
      tekka
      tekka
    • RE: Failed to make encryption work on a barebone ATMEGA328P

      @encrypt I may have an idea what's going on here: Are you programming a new sketch to your barebone AT328p via ArduinoISP or any other means of serial (=SPI) programming? Programming via bootloader (ATmegaboot or optiboot) requires a FTDI adapter and will only do page erases while leaving the eeprom untouched.

      posted in Troubleshooting
      tekka
      tekka
    • RE: Failed to make encryption work on a barebone ATMEGA328P

      @anticimex @Encrypt That's a bit odd and certainly specific to the bootloader you're using (ATmegaBoot): AVRdude does (at least with optiboot) a page erase (vs. chip erase where EESAVE has an effect). I do not have the EESAVE fuse bit set and no issues with erased eeprom when loading a new sketch, also see below:

      Arduino Uno with optiboot:

      uno.bootloader.tool=avrdude
      uno.bootloader.low_fuses=0xFF
      uno.bootloader.high_fuses=0xDE
      uno.bootloader.extended_fuses=0xFD
      uno.bootloader.unlock_bits=0x3F
      uno.bootloader.lock_bits=0x0F
      uno.bootloader.file=optiboot/optiboot_atmega328.hex
      

      High fuse (0xDE) does not enable EESAVE.

      posted in Troubleshooting
      tekka
      tekka
    • RE: MYSbootloader not rebooting, help

      @mythbai Looks like the node is not actively listening for incoming commands. Please post the full node sketch and node debug log for troubleshooting.

      posted in Development
      tekka
      tekka
    • RE: Heartbeat Gateway

      @sirben You can download the library here: https://github.com/tekka007/MySensors/tree/GWonlyHeartbeat

      posted in Bug Reports
      tekka
      tekka
    • RE: Heartbeat Gateway

      @sirben ok, this feature is currently disabled for GW-only with disabled transport network. I'll prepare a code update: https://github.com/mysensors/MySensors/pull/1273

      posted in Bug Reports
      tekka
      tekka
    • RE: Heartbeat Gateway

      @sirben Welcome to MySensors! When talking about the heartbeat output - are you referring to the serial debug or tcp/ip output?

      posted in Bug Reports
      tekka
      tekka
    • RE: Why does the value of second field of I_ID_REQUEST message change for each request?

      @phil2020 Thanks for reporting back. Do you happen to have a full debug log of both nodes incl. GW debug log while assigning ID 255, rebooting and setting new IDs (without random delay) - I'd like to understand why the random token verification failed.

      posted in Controllers
      tekka
      tekka
    • RE: Why does the value of second field of I_ID_REQUEST message change for each request?

      @phil2020 After assigning ID 255 you need to power cycle the node to trigger a new ID request (only for non-static ID defs)

      posted in Controllers
      tekka
      tekka
    • RE: Unable to initialize NRF24L01+ when using an ATmega328P-PU

      @bearwithbeard Your bare at328p runs at 8Mhz [intRC] but you compile with 16Mhz settings (according to platformio nanoatmega328 boards). You may resolve your issue with e.g. pro8MHzatmega328 settings (3V3, 8Mhz). Ideal baudrate 38400 or 57600.

      posted in Troubleshooting
      tekka
      tekka
    • RE: Unable to initialize NRF24L01+ when using an ATmega328P-PU

      @bearwithbeard What board settings did you choose for compilation?

      posted in Troubleshooting
      tekka
      tekka
    • RE: Broken gateway with local sensors on MQTT ESP8266 GW

      @mrumpf Thanks for your feedback - just for reference, did you try the BH1750FVI library and the sensor init code in preHwInit()?

      posted in Troubleshooting
      tekka
      tekka
    • RE: Broken gateway with local sensors on MQTT ESP8266 GW

      @mrumpf From the GW log:

      21822 MCO:BGN:INIT OK,TSP=0
      

      I see the RF24 sanity check failing and this is likely due to the BH1750 initialization code meddling with the RF24 SPI. Most probably you can fix the issue by moving the sensor setup code to preHwInit(), i.e.

      #define MY_DEBUG
      #define MY_BAUD_RATE 57600
      
      #define MY_RADIO_RF24
      #define MY_GATEWAY_MQTT_CLIENT
      #define MY_GATEWAY_ESP8266
      #define MY_MQTT_PUBLISH_TOPIC_PREFIX "mygateway1-out"
      #define MY_MQTT_SUBSCRIBE_TOPIC_PREFIX "mygateway1-in"
      #define MY_MQTT_CLIENT_ID "mygateway1"
      #define MY_WIFI_SSID "*****"
      #define MY_WIFI_PASSWORD "*********************"
      #define MY_HOSTNAME "mygateway1"
      #define MY_CONTROLLER_IP_ADDRESS 192, 168, 178, 58
      // #define MY_CONTROLLER_URL_ADDRESS "test.mosquitto.org"
      #define MY_PORT 1883
      
      
      #define LOCAL_SENSORS
      #define LOCAL_SENSORS_BH1750
      #define LOCAL_SENSORS_BME280
      
      #include <ESP8266WiFi.h>
      #include <SPI.h>
      #include <MySensors.h>
      
      #ifdef LOCAL_SENSORS
      #include <i2cdetect.h>
      #include <Wire.h>
      
      #ifdef LOCAL_SENSORS_BH1750
      #include <BH1750FVI.h>
      // light
      #define CHILD_ID_LIGHT 0
      BH1750FVI lightSensor(13, BH1750FVI::k_DevAddress_L, BH1750FVI::k_DevModeContHighRes);
      MyMessage lightMsg(CHILD_ID_LIGHT, V_LIGHT_LEVEL);
      #endif
      
      #ifdef LOCAL_SENSORS_BME280
      // temperature & humidity & pressure
      #include <Adafruit_Sensor.h>
      #include <Adafruit_BME280.h>
      #define CHILD_ID_TEMPERATURE 1
      #define CHILD_ID_HUMIDITY 2
      #define CHILD_ID_PRESSURE 3
      #define CHILD_ID_DEWPOINT 4
      Adafruit_BME280 bme;
      MyMessage temperatureMsg(CHILD_ID_TEMPERATURE, V_TEMP);
      MyMessage humidityMsg(CHILD_ID_HUMIDITY, V_HUM);
      MyMessage pressureMsg(CHILD_ID_PRESSURE, V_PRESSURE);
      #endif
      
      #endif // LOCAL_SENSORS
      
      void setup()
      {
      
      }
      
      void preHwInit()
      {
      #ifdef LOCAL_SENSORS
      
      #ifdef LOCAL_SENSORS_BH1750
        Wire.begin(D3, D4);
        //Wire.setClock(100000);
      
        Serial.println("Init: BH1750 (Light)");
        lightSensor.begin();
      #endif
      
      #ifdef LOCAL_SENSORS_BME280
        Serial.println("Init: BME280 (Temperature, Humidity, Pressure)");
        if (!bme.begin(0x77)) {
          Serial.println("Could not find a valid BME280 sensor, check wiring!");
          while (1);
        }
      #endif
      
      #endif
      }
      
      void presentation()
      {
      #ifdef LOCAL_SENSORS
        // Send the sketch version information to the gateway and Controller
        sendSketchInfo("Light/Temperature/Humidity/Pressure Gateway", "1.0");
      
        // Register all sensors to gateway (they will be created as child devices)
      #ifdef LOCAL_SENSORS_BH1750
        present(CHILD_ID_LIGHT, S_LIGHT_LEVEL);
      #endif
      
      #ifdef LOCAL_SENSORS_BME280
        present(CHILD_ID_TEMPERATURE, S_TEMP);
        present(CHILD_ID_HUMIDITY, S_HUM);
        present(CHILD_ID_PRESSURE, S_BARO);
      #endif
        
      #endif
      }
      
      void loop()
      {
      #ifdef LOCAL_SENSORS
        i2cdetect();
      
      #ifdef LOCAL_SENSORS_BH1750
        // light
        uint16_t lux = lightSensor.GetLightIntensity();
        Serial.print("Light: ");
        Serial.println(lux);
        send(lightMsg.set(lux));
      #endif
      
      #ifdef LOCAL_SENSORS_BME280
        // humidity
        float humidity = bme.readHumidity();
        Serial.print("Humidity: ");
        Serial.println(humidity);
        send(humidityMsg.set(humidity, 2));
      
        // temperature
        float temperatureC = bme.readTemperature();
        Serial.print("Temperature: ");
        Serial.println(temperatureC);
        send(temperatureMsg.set(temperatureC, 2));
      
        // pressure 
        float pressure = bme.readPressure() / 100.0F;
        Serial.print("Pressure: ");
        Serial.println(pressure);
        send(pressureMsg.set(pressure, 2));
      #endif
      
        wait(10000);
      #endif
      }
      

      This also explains why the GW "recovers" after 930000ms ~= 15mins, which happens to be the GW transport sanity check interval followed by a successful transport re-init:

      920856 !TSF:SAN:FAIL
      920859 TSM:FAIL:CNT=1
      920863 TSM:FAIL:DIS
      920867 TSF:TDI:TSL
      ...
      930871 TSM:FAIL:RE-INIT
      930876 TSM:INIT
      930884 TSM:INIT:TSP OK 
      
      posted in Troubleshooting
      tekka
      tekka
    • RE: Broken gateway with local sensors on MQTT ESP8266 GW

      @hek Is there a pic-only limitation with the file uploader?

      @mrumpf said in Broken gateway with local sensors on MQTT ESP8266 GW:

      Here are the logs.
      Again, after 930000 seconds the gateway did a re-init and after that the 2 devices could communicate.
      [0_1551388989628_Archive.zip](Uploading 100%)
      ![0_1551389194077_Archive.zip.png](Uploading 100%)
      Uploading a file gives me an error that only image types are supported!?

      posted in Troubleshooting
      tekka
      tekka
    • RE: Broken gateway with local sensors on MQTT ESP8266 GW

      @mrumpf Could be a power issue or one of the included libraries interfering with the SPI. The full debug log (from the beginning) may give additional hints - please upload them here (as .zip)

      posted in Troubleshooting
      tekka
      tekka
    • RE: Broken gateway with local sensors on MQTT ESP8266 GW

      @mrumpf Can you share more details about your setup & sensors used, also posting your sketch and the full debug log are a good starting point for troubleshooting.

      posted in Troubleshooting
      tekka
      tekka
    • RE: Signing 2.3.1 no longer allowing upload of new data?

      @njwyborn Can you post the GW sketch that fails in your setup - did you also try with the 2.3.2-dev branch?

      posted in Troubleshooting
      tekka
      tekka
    • RE: Signing 2.3.1 no longer allowing upload of new data?

      @anticimex indeed, seems to be a stack issue - see milliseconds counter before the GW reboots:
      0;255;3;0;9;26878 SGN:BND:NONCE=0E92DADC44930DBA963AE05F948FCBCAAD56AD406929AC6E67AAAAAAAAAAAAAA
      0;255;3;0;9;3204178589 SGN:BND:HMAC=7E75749D03A4DDC0AA3504697193B20458089AE4CC74A60874E0D66BC517060A
      0;255;3;0;9;0 MCO:BGN:INIT GW,CP=RRNGAS--,REL=255,VER=2.3.1

      posted in Troubleshooting
      tekka
      tekka
    • RE: Node personalizer sketch seems broken in MySensors 2.3.1

      Bingo! This is a backwards incompatibility 😀 - thanks for reporting!

      @joaoabs You should be able to fix this by using the SecurityPersonalizer example from the 2.3.1 lib and copy/paste the settings section from your current sketch to the example sketch.
      @Anticimex issue originates from replacing all signerSHA256xyz() functions in the cryptoHAL

      posted in Bug Reports
      tekka
      tekka
    • RE: NRF24L01 with Arduino Pro Mini at 1Mhz

      @snyfir Can you run the same tests using the latest release, i.e. 2.3.1?

      posted in Troubleshooting
      tekka
      tekka
    • RE: RFM95 network problem (RPI & Arduino GW)

      @m3nt4lll if the modules are 433Mhz you can use the pre-defined RFM95_434MHZ setting (center frequency is 433.92Mhz)

      posted in Troubleshooting
      tekka
      tekka
    • RE: RFM95 network problem (RPI & Arduino GW)

      @m3nt4lll Are you using 868 or 915Mhz modules? How are the IRQ lines connected?

      posted in Troubleshooting
      tekka
      tekka
    • RE: πŸ’¬ Temperature and humidity sensor(ver.ATmega328)+E-Ink display

      @berkseo Nice board and idea - would you mind posting your pcb layout files and testing sketch for the community?

      posted in OpenHardware.io
      tekka
      tekka
    • RE: MySensors suddenly stop working [solved]

      @flopp yes, GW sketch + log, and if possible, from a node that stops sending messages

      posted in Domoticz
      tekka
      tekka
    • RE: MySensors suddenly stop working [solved]

      @flopp Please post the full debug log + sketch for further troubleshooting

      posted in Domoticz
      tekka
      tekka
    • RE: Saving three bytes of memory with this crazy loop structure..

      @mfalkvidd Strictly speaking, only @Yveaux's solution would work without modifications to the MySensors core πŸ™‚ But the challenge was weakly defined, so no cheating in that sense πŸ˜…

      posted in General Discussion
      tekka
      tekka
    • RE: Saving three bytes of memory with this crazy loop structure..

      @alowhum Instead of a timer, the watchdog interrupt is used to set a flag on a (in this sketch) not-used eeprom addressing register (EEARL)...certainly not a generic approach, but functional πŸ˜ƒ

      posted in General Discussion
      tekka
      tekka
    • RE: Saving three bytes of memory with this crazy loop structure..

      @Yveaux @mfalkvidd Now it gets ugly - and we are not talking ASM yet... 😜

      ISR (WDT_vect) {
        WDTCSR = _BV(WDCE) | _BV(WDE); 
        WDTCSR = _BV(WDIF) | _BV(WDIE) | 6; // 1s
        EEARL = 1;
      } 
      
      void setup() {
        WDT_vect();
      }
      
      void loop() {
          if(EEARL) {
            EEARL = 0;
            // ... code that runs every second...
          }
      }
      

      Flash: 502 bytes
      Ram: 9 bytes

      posted in General Discussion
      tekka
      tekka
    • RE: Delay after TSF:TRI:TSB

      @fausti Can you re-test your setup with this patch (ideally, update GW and nodes): https://github.com/tekka007/MySensors/tree/RF24STDBYTiming - I've added a delay after setting the radio in standby mode.

      posted in Development
      tekka
      tekka
    • RE: Delay after TSF:TRI:TSB

      @fausti the log indicates that smartsleep is enabled - that said, smartsleep may originate from the nodemanager

      6047 MCO:SLP:MS=20864000,SMS=1

      posted in Development
      tekka
      tekka
    • RE: Delay after TSF:TRI:TSB

      FYI: I tried with both, 2.3.0 and 2.3.1-beta (incl. CE fix), on non-amplified and PA+LNA modules - I do not see any delay between TSB and SEND

      6973 MCO:SLP:MS=5000,SMS=1,I1=1,M1=1,I2=255,M2=255
      6979 TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=32,pt=5,l=4,sg=0,ft=0,st=OK:500
      7486 TSF:TDI:TSL
      7487 MCO:SLP:WUP=1
      7489 TSF:TRI:TSB
      7492 TSF:MSG:SEND,100-100-0-0,s=255,c=3,t=33,pt=5,l=4,sg=0,ft=0,st=OK:5000
      

      I assume you have a power issue, a bad module - or an artifact originating from the nodemanager?

      posted in Development
      tekka
      tekka
    • RE: Delay after TSF:TRI:TSB

      ...but, the delay between TSB and SEND is a bit odd;

      9480 TSF:TRI:TSB
      11180 !TSF:MSG:SEND,9-9-0-0,s=255,c=3,t=33,pt=5,l=4,sg=0,ft=0,st=NACK:20864000
      

      Enabling MY_DEBUG_VERBOSE_RF24 could eventually give some hints.

      posted in Development
      tekka
      tekka
    • RE: Delay after TSF:TRI:TSB

      @mfalkvidd @fausti no, this is normal the smartsleep log:

      6047 MCO:SLP:MS=20864000,SMS=1,I1=1,M1=1,I2=255,M2=255  
      

      ==> smart sleep enabled, IRQ on pin 1 set, going to sleep for 20864000 ms

      6125 TSF:MSG:SEND,9-9-0-0,s=255,c=3,t=32,pt=5,l=4,sg=0,ft=0,st=OK:500 
      

      ==> I_PRE_SLEEP_NOTIFICATION, 500ms to process any incoming message before going to seep

      6199 TSF:MSG:READ,0-0-9,s=2,c=1,t=23,pt=5,l=4,sg=0:5
      6254 TSF:MSG:ACK
      6699 TSF:TDI:TSL
      6717 MCO:SLP:WUP=1
      6735 TSF:TRI:TSB
      

      ==> sleep interrupted by IRQ 1

      8437 !TSF:MSG:SEND,9-9-0-0,s=255,c=3,t=33,pt=5,l=4,sg=0,ft=0,st=NACK:20864000
      

      ==> I_POST_SLEEP_NOTIFICATION, node was sleeping for 20864000ms (but sleep was interrupted)

      posted in Development
      tekka
      tekka