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

Typo in readme #4

Closed
happytm opened this issue Aug 8, 2019 · 9 comments
Closed

Typo in readme #4

happytm opened this issue Aug 8, 2019 · 9 comments

Comments

@happytm
Copy link

happytm commented Aug 8, 2019

Minor typo here :

suto apt-get install net-tools instead of sudo apt-get install net-tools

Thanks

@happytm
Copy link
Author

happytm commented Aug 9, 2019

I just found your code here. I was able to scan the network using this code. Is it possible to decode collected MAC ID's and store it in RPIEasy as either system variable or dummy device value ?

I am trying to do following but in reverse to extract data from inside fake MAC ID created on ESP device.The remote ESP device will wake up from sleep every few minutes as station and scan for network and go back to sleep again for few minutes.

https://github.com/HarringayMakerSpace/sonoff-adhoc

Thanks

@happytm
Copy link
Author

happytm commented Aug 9, 2019

Specific use case I am thinking about is espfinder only scan for specific mac id's continuously and when esp device wakes up espfinder catches the fake mac id and store it in rpieasy. The fake mac id contains temp, humidity & pressure data like he is doing it with sonoff. But here instead of sending data to sonoff via mac id we want to get sensor data from BME280 via fake mac id created on esp device with fresh sensor data every few minutes. Goal here is to get data without creating wifi network overhead on esp device.esp device has to run in monitor mode like here:

https://github.com/RicardoOliveira/FriendDetector

I hope you understand what I am trying to do.

Thanks

@enesbcs
Copy link
Owner

enesbcs commented Aug 31, 2019

suto apt-get install net-tools instead of sudo apt-get install net-tools

Thanks i've fixed it.

@enesbcs
Copy link
Owner

enesbcs commented Aug 31, 2019

I just found your code here. I was able to scan the network using this code. Is it possible to decode collected MAC ID's and store it in RPIEasy as either system variable or dummy device value ?

I've not found any reasonable way yet to integrate ping scanning into RPIEasy. Returning results is a very interesting task...

@enesbcs
Copy link
Owner

enesbcs commented Aug 31, 2019

Specific use case I am thinking about is espfinder only scan for specific mac id's continuously and when esp device wakes up espfinder catches the fake mac id and store it in rpieasy. The fake mac id contains temp, humidity & pressure data like he is doing it with sonoff. But here instead of sending data to sonoff via mac id we want to get sensor data from BME280 via fake mac id created on esp device with fresh sensor data every few minutes. Goal here is to get data without creating wifi network overhead on esp device.esp device has to run in monitor mode like here:

It is an interesting idea, but as i know "sending" is not really possible if you try to get data from a remote device through ping-scanning, than the remote point has to be online at all time, otherwise there will be no data in most of time. The ESPNow method combined with deep-sleep you suggested at the RPIEasy topic may be a better way.

The another link you provided describes some softAP solution, do you really think, that stopping the RPI WiFi continously (cutting it's normal IP communication) scanning and connecting several ESP SoftAP's is a good idea? Or running 10 ESP SoftAP near each other at the same channel is a good idea? I think it is interesting for experimenting but not a real-world solution.

@happytm
Copy link
Author

happytm commented Aug 31, 2019

According to following code esp could be set as station mode:

extern "C" void preinit() {
uint8_t sta_mac[] = { 0xb4, 0xe6, 0x2d, 0x44, 0x86, 0xad };
wifi_set_opmode(STATIONAP_MODE);
wifi_set_macaddr(STATION_IF, sta_mac);
}

ESP-Now is very good solution for low power devices and I am looking for good framework but so far not many I could find which is mature. I am hopeful that following framework could be useful in future:

https://github.com/gmag11/EnigmaIOT

Thanks

@enesbcs
Copy link
Owner

enesbcs commented Aug 31, 2019

According to following code esp could be set as station mode:

extern "C" void preinit() {
uint8_t sta_mac[] = { 0xb4, 0xe6, 0x2d, 0x44, 0x86, 0xad };
wifi_set_opmode(STATIONAP_MODE);
wifi_set_macaddr(STATION_IF, sta_mac);
}

It can be done it is not a question. But i still do not think that creating 20 AP's near each other in my home is a good idea.

ESP-Now is very good solution for low power devices and I am looking for good framework but so far not many I could find which is mature. I am hopeful that following framework could be useful in future:

https://github.com/gmag11/EnigmaIOT

I prefer light solutions such as this:
https://github.com/HarringayMakerSpace/ESP-Now/blob/master/espnow-sensor-minimal/espnow-sensor-minimal.ino
After finishing my simple Raw Lora sensor, i will start to play with ESPNow.
https://github.com/enesbcs/EasyLoraSensor

@happytm
Copy link
Author

happytm commented Sep 5, 2019

I have been testing ESPNow protocol and adhoc network with 2 esp8266 devices. One device which would be powered by battery is called sender and uses ESPNow_Sender2.ino code and send data in both format (ESPNow and probe request using mac id). Another esp device is mains powered and it will be always on. It uses ESPNow_Receiver2.ino code. It can receive both types of data and print it to serial. So my thinking is we can format serial data output on receiver device in such a way that it can be used in RPIEasy. Like shown below in this thread:

https://www.letscontrolit.com/forum/viewtopic.php?f=2&t=6443&p=35439&hilit=serial+arduino#p36433

In my testing it looks like adhoc network is easy to implement and it can be received on raspberry pi directly thereby there will be no need for esp receiver device.Adhoc network can only send 6 bytes of data and 1 byte is used to identify the device so real sensor data is limited to 5 bytes but for most remote sensors that will be sufficient.Please see below for python code to receive probe requests:

https://www.youtube.com/watch?v=hrbI08iulzA

My working example code is here:

https://github.com/happytm/ESPNow-Adhoc

Thanks.

@enesbcs
Copy link
Owner

enesbcs commented Sep 8, 2019

ESPNow topic:
enesbcs/rpieasy#73

@enesbcs enesbcs closed this as completed Sep 8, 2019
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

2 participants