Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

future support #4

Open
joedupa opened this issue Feb 10, 2022 · 7 comments
Open

future support #4

joedupa opened this issue Feb 10, 2022 · 7 comments

Comments

@joedupa
Copy link

joedupa commented Feb 10, 2022

(the title should read support/development) Hi, are you planning to continue with this project in the future? I am finding it very intriguing, I made it working for my project, but need your wisdom on a couple of issues I encountered. Thanks.

@happytm
Copy link
Owner

happytm commented Feb 10, 2022

I am not sure what else I can add to the project. This project was started as challenge to myself to come up with easy to use standalone IOT network (no WiFi required) with least amount of power consumption for sensor nodes. If you have issues please let me know and I will try to resolve it.

@joedupa
Copy link
Author

joedupa commented Feb 10, 2022

Fantastic, thanks, I am now concentrating on finding out the reason for loss of some packets (probe requests) that are not received by the gateway (around 2%) I live in a rural area and external interference is not an issue. Any ideas? I built a single sender- receiver platform without any extra stuff and am hunting the lost packets. Will let you know more, but it will make time , I am not very versed in WireShark. Thanks again.

@happytm
Copy link
Owner

happytm commented Feb 10, 2022

I remember last year I ran a test with 1 gateway and 3 slaves for about one month. Each slave published their sensor data every 15 minutes and it never missed any packet.

@joedupa
Copy link
Author

joedupa commented Feb 16, 2022

I created two very minimalistic files in my fork of your project here: https://github.com/joedupa/BatteryNode/tree/master/lost_packets_test
I accelerate the measurements, sending and receiving the requests every one second.
I'd appreciate if you could please test if you can see the same degree of packet loss (in my case it is actually between 7-9%)
I left only the ProbeRequest/Receive calls in the code to simplify the hunt for lost packets.
This is what I did for preparation:

  • Have two esp8266 boards ready
  • Open two independent instances of Arduino
  • Adjust your router credentials in TRSMIT_8266_min.ino
  • Flash board one with TRSMIT_8266_min.ino
  • Flash board two with RCV_8266_min.ino
  • Open corresponding serial monitors for each instance of Arduino
  • Make sure that the USB ports are unique for each serial monitor
  • Connect D0 to RCV on the transmitting board with a jumper wire (to enable deep sleep)
  • Disconnect and reconnect receiving board to USB port and clear output in serial monitor
  • Disconnect transmitting board, clear output in serial monitor (RTC will clear automatically)
  • Reconnect transmitting board, and watch the receive and sent packet numbers in corresponding serial monitor windows.

@happytm
Copy link
Owner

happytm commented Feb 16, 2022

First of all thank you for creating test sketches to debug lost packets. I never thought of doing this kind of test. I went down only 5 minutes sleep time when I tested it last year.

I can confirm that it is losing packets with one second sleep time as you experienced with your test sketches.

I remember I implemented basic acknowledgement from Gateway to sender device before but somewhere along the way I removed it to make it simpler one way communication. According to that logic sender device will keep sending sensor data by restarting itself until Gateway acknowledged the receipt of the data.

       Serial.print("Message sent to Gateway is: ");
       Serial.println(WiFi.macAddress());
       Serial.print("Message received from Gateway (HEX format)is: ");
       Serial.println(&WiFi.BSSIDstr(0)[0]);
       
  } else {
    Serial.println("Message from Gateway did not arrive, let me try again to get message data........................................");
   ESP.restart();
}

And in gateway I had acknowledgement sent like this from within proberequest function:

        sendCommand();
    }

@happytm
Copy link
Owner

happytm commented May 29, 2022

There are some added features to the code. It seems more reliable now. If you want to test now use code in example folder for gateway and remote. Now it uses only 45 millisecond to transmit 6 bytes.

@starfish1107
Copy link

nice concept - thank you for your work. But concerning reliability I am still looking for a firmware providing an ack concept with resend of lost or corrupted packets. This might be not needed when sending temperature or similar values, but important when monitoring security relevant sensors like gates, doors etc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants