Navigation

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

    Topics created by GaryStofer

    • GaryStofer

      ACK -aka ECHO beeing missed by Serial Gateway with RF24 radios. V2.3.2
      Bug Reports • • GaryStofer  

      8
      0
      Votes
      8
      Posts
      56
      Views

      GaryStofer

      First let me say that the test "network" consists of a single node and a Serial GW with a Domoticz controller only. No repeater nodes are present and it operates at 250Kbd on a frequency outside of the WiFi spectrum verified to have no traffic. The test subjects are within 10 feet of each other and the protocol sniffer receiver is placed roughly midway between the two communicating nodes. The test node has a plugable connector for the RF modules so that I can switch them out separately. The GW has the LNA/PA module and the node is using the standard mudules. Both GW and node are set to "High" power. Looking at the problem with the promiscuous protocol sniffer and wireshark I can clearly see that packets collide mid air when both the node and the GW transmitting at the same time. This happens when the controller/GW talks to the node while having the protocol ACK request enabled and the node does not have the extra wait/delay programmed. Going through 12 RF modules node side, I can see that about 1/3 shows the problem consistently to the extent that all 16 retransmissions are used up , 1/3 to various degrees and the rest shows no problems at all. Before you say "ohh fake chips etc." these modules all came from the same batch, so more than likely not fake and non fake, but rather some parameter that the lib assumes to tight of a margin for. When turning off the protocol level ACK via the controller/GW, the package goes out without an request for the node to send back the package, only the HW ack remains in the picture. Setup like this I can see that the third of the modules that cause the persistent collisions evoke a re-send of the package by the GW after ~2 to 2.5ms , while the group that shows no problem shows one single transmission from the GW only. Since the sniffer is not fast enough to capture the quick turn around ( spec says 130us) for the short HW ack to go out I can not get say whether the node is simply not sending it or just not sending it in quick enough. All I can say is that the GW code did not see a HW ack and therefore sends out the package a second time. Meanwhile on the node side all is well, it just might get the same package twice and since no status changed there is no harm done. However when you now turn on the protocol level ACK request in the controller ( as you should) the node has to turn around and send out the echo package which then collides with the resend of the original package from the GW. The node also doesn't get an HW-ACK becasue of this and tries to resend the echo package over again until it runs out of tries. When I then introduce the wait/delay in the code above to wait out the 2.5Ms for the GW to resend the initial package this ACK/resend storm goes away because the air is clear when the node sends it's echo package. If I wait/delay for 2 ms the problem is greatly reduced and if I wait 3 ms I see no more evidence of collisions. Either wait or delay works however, I choose delay() to be positively sure that no other communication is started during that time by the node. I conclude that as a work around this solves the issue we are having with the RF24 transport, but without further investing into faster RF sniffing equipment I can't say for sure if this could be solved better on the TX side by waiting longer for the HW ack to arrive from the receiving node, however I think there would be a good chance for that. There is also a chance that the PA/LNA module used on the GW could be part of the problem by not being able to switch quickly enough back to RX mode and therefore loose the HW-ACK for nodes that respond quicker than others. Edited: Checked with a non PA/LNA module on the GW and no change could be observed, so this theory can be discounted. BTW: All of this is very reminiscent of an email communication in 2015 I had with Ekblad !! GS
    • GaryStofer

      Error sending switch command, check device/hardware ! ACK problems gateway to node.
      Troubleshooting • • GaryStofer  

      1
      0
      Votes
      1
      Posts
      12
      Views

      No one has replied

    • GaryStofer

      NRF24 nodes failing to connect on channels below ~100
      Troubleshooting • • GaryStofer  

      10
      0
      Votes
      10
      Posts
      53
      Views

      ejlane

      @GaryStofer Okay, then sounds like you're doing what I would. Are you able to turn on debug and connect serial to it to troubleshoot that way? Without getting more info on it, I'm out of ideas at the moment.
    • GaryStofer

      2AAA battery NRF24 Sensor PCB with ATmega 328p
      My Project • • GaryStofer  

      9
      0
      Votes
      9
      Posts
      856
      Views

      NeverDie

      @garystofer said in 2AAA battery NRF24 Sensor PCB with ATmega 328p: One could measure the VCC an other way not needing a voltage divider by configuring the ADC so that it uses the VCC as the reference and then measure the internal 1.1V reference. Yes this is how I do it, except even more extreme: I measure the battery voltage during the entire tx interval, and pick the lowest voltage (which, it turns out, is always the last measurement). So, I suspect the extreme method can be made more efficient by measuring just after Tx completes.
    • GaryStofer

      sleep(0) in V2.1 doesn't sleep indefinitely anymore. Used to powerdown and sleep in V1.5
      Bug Reports • • GaryStofer  

      3
      0
      Votes
      3
      Posts
      149
      Views

      GaryStofer

      @mfalkvidd No, the issue with sleep(0) still exists in V2.3.2. That is the version that the ArDuino Library installer installs currently . -- Work around is to call hwPowerDown(WDTO_SLEEP_FOEREVER) as in above code if you want the battery to last more than a day. GS
    • GaryStofer

      X10 lights and appliance control via X10-RF protocol from MySensor gateway
      My Project • • GaryStofer  

      1
      1
      Votes
      1
      Posts
      183
      Views

      No one has replied

    • GaryStofer

      [SOLVED] NRF24 Sniffer and V2.1 Library
      Hardware • • GaryStofer  

      5
      0
      Votes
      5
      Posts
      1567
      Views

      Yveaux

      @GaryStofer well, great to hear you nailed it!
    • GaryStofer

      ArduinoProMini to nRF24L patch PCB with battery holder and Switch
      Hardware • • GaryStofer  

      3
      2
      Votes
      3
      Posts
      2624
      Views

      GaryStofer

      You can do it ! Tweezers and magnifying goggles ( from Harbor Fright ) and you are in business. Don't forget to set the Arduino to internal clock 8 mhz via fuse settings when rinning at 3V -- Most of them run without it but some might not be happy running 16mhz of the xtal at 3V .Gary
    • GaryStofer

      MyGateway's use of PinChangeInt prevents Nodes from using any Pin change Interrupts
      Development • • GaryStofer  

      6
      0
      Votes
      6
      Posts
      1947
      Views

      hek

      No, hope not We had a lengthy discussion about it here: http://forum.mysensors.org/topic/304/2-0-discussion-units-sensor-types-and-protocol But then other stuff like multi radio support and signing got "in the way". This will be included in 1.5 as you're probably aware of. Hopefully I will have more time for 2.0 soon again where focus is to clean up a little bit of the over-the-air protocol problems we seen and bring in new ideas that could help auto-generating sketches (if I can dream a bit).
    • GaryStofer

      Can anyone shed some clarity in this ACK business? (Hek?)
      Development • • GaryStofer  

      6
      0
      Votes
      6
      Posts
      3174
      Views

      hek

      The hardware ack:ing in enabled for all messages (except for broadcasting). https://github.com/mysensors/Arduino/blob/master/libraries/MySensors/MySensor.cpp#L107
    • GaryStofer

      Comissioning a network, PAN-ID, Frequency selection ??
      Development • comissioning • • GaryStofer  

      6
      0
      Votes
      6
      Posts
      2081
      Views

      GaryStofer

      Ahh -- Yes I recall now, same problem on the SI44xx chips. So maybe a "bind" mode that uses a know fixed ID (maybe all F's) in conjunction with a random PAN_ID that is compiled into the gateway only. The randomness is controlled by the build process or it could be a sequenced number etc. Bind mode on the gateway would use the known fixed ID and it would only respond to GetPan_ID requests from nodes. The mode would be entered during boot, detected by a button press or jumper. The gateway would not exit bind mode until it is rebooted with the jumper removed. The end/router nodes would be built with the fixed ID programmed in the EEprom (hence all F's) and would therefore know that it has not gotten a PAN_ID yet. It would then enter a loop asking for a PAN_ID from the gateway, using said fixed ID . The end/router node would indicate a successful exchange of the PAN_ID by setting it's LED (on PB5/SCK ) and entering an indefinite loop after storing the PAN_ID in the eeprom. The end/router would have an option to ease the EEPROM during the boot of the node by detecting a switch closure or jumper to force a rebind to a different network. So from a user's point of view to bind a node you place a jumper on the gateway and the node then power both. Wait until you get a green light on the node. at which point you remove the jumpers and reset both. When playing with the PAN ID yesterday I noticed that the lower 8 bits (I think) showed some strange behavior. Is the library using the data pipes, and therefore 7:0 is not actually usable in the PANID? Gary