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

what about the other way around? #1

Open
diramazioni opened this issue Mar 7, 2019 · 9 comments
Open

what about the other way around? #1

diramazioni opened this issue Mar 7, 2019 · 9 comments

Comments

@diramazioni
Copy link

This is a cool hack!
But what if I want to receive messages from an esp(32) sent to a rasberry?

@torntrousers
Copy link
Contributor

From some quick googling it sounds like the Pi's Wifi adapter doesn't out of the box support monitor mode, but there is a patch to add it according to this. So with that and doing a Wifi scan from the ESP32 / ESP8266 it would send a probe request which the Pi should be able catch. Give it a try? Or I might when I find a moment.

@torntrousers
Copy link
Contributor

torntrousers commented Mar 9, 2019

I started having a go at this and have a Pi Zero W catching the Wifi probe requests by following that guide mentioned. It went as described but didn't seem to create the mon0 interface or install tcpdump so had to add those, so the entire sequence of commands on the Pi was:

sudo su
cd /usr/local/src

wget  -O re4son-kernel_current.tar.xz https://re4son-kernel.com/download/re4son-kernel-current/

tar -xJf re4son-kernel_current.tar.xz

cd re4son-kernel_4*

./install.sh

(answer Y to a few prompts)

(reboots)

sudo iw phy phy0 interface add mon0 type monitor

sudo ifconfig mon0 up

sudo apt-get install tcpdump

(now tracking my device 6c:96:cf:db:2f:77)
sudo tcpdump -i mon0 -e -s 0 type mgt subtype probe-req and ether host 6c:96:cf:db:2f:77

@happytm
Copy link

happytm commented Jul 10, 2019

Can you please provide sketch for esp device that work as a sonoff switch as in example sketch & also work as a BME280 environment data sender all on same esp device.I assume 2 way data transfer is not suitable for low power application as esp device needs to stay on all the time to execute switch command.Am I right? this will be no problem for sonoff as it has to be wired to mains to work as actuator but what if we are using battery powered device to send some sensor data to raspberry using monitor mode? Does it still work like ESP-Now protocol and save precious battery power using deep sleep? If so did you measure current consumption or battery life on your BME-280 and barebone esp like you showed in your ESP-Now repository?

Thanks for your out of box idea.

@happytm
Copy link

happytm commented Jul 25, 2019

I setup my Raspberry PI using above procedure and monitor mode is working but I am confused about how to set up remote esp device with BME280 using esp-now so it can send Temp,Humdity and Pressure data to raspberry pi every 10 minutes.

Please help me.

Thanks

Thanks

@happytm
Copy link

happytm commented Aug 6, 2019

Is this code somehow usable on esp32 device with adhoc network to make it low battery powered sensor device?

https://github.com/Jeija/esp32-80211-tx

or

https://github.com/RicardoOliveira/FriendDetector

I am not a programmer so please help.

Thanks

@happytm
Copy link

happytm commented Sep 27, 2019

I want to thank you for creating this repo which gave me inspiration to create low power sensor network using adhoc network. I have working solution where 2 esp8266 devices communicating with each other exchanging 6 bytes of data both ways within 220 milliseconds.It is working reliably over few days I have been testing it.

Thanks again.

@torntrousers
Copy link
Contributor

@happytm thank you so much for letting me know and well done for making something useful.

@Kjronning
Copy link

I tried this hack (I'm using raspberry headless) and when I change the MAC address, I get instantly disconnected from the wireless network, thus the second line (the iwlist command) won't run. Is there a fix for this?

@happytm
Copy link

happytm commented Nov 5, 2019

If you are interested in communication between multiple ESP8266 devices run on batteries and 1 gateway using mains power with built in MQTT broker I have simple example at:

https://github.com/happytm/BatteryNode

ProbeSender.ino file is used on battery powered devices and ProbeReceiver.ino file is used for mains power gateway (always on).

I can not thank Anthony @torntrousers enough for inspiration.

Thanks.

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

4 participants