Bonding two ESP8266 units for direct standalone communicati
Posted:
Thu May 10, 2018 6:09 pm
by Michael Lemo
Hello,
I'd like to have some sort of communication bridge between two ESP8266 module just like in classic BL and I got lost with all the internet terms of Client, HTTP client, access point, server,station, ect.
So I'd like to ask what is the best solution for such a request(it'd be best not to even be able to see any of the modules in wifi scanning(for example with the smartphone) ) and have as real time communication as possible for very low datarate.
It'd be very useful to also have an example attached for arduino sins I'm realy just getting started.
Would also like to utilize the UART and GPIO of each module.
Thanks for helping.
Re: Bonding two ESP8266 units for direct standalone communic
Posted:
Thu May 10, 2018 11:00 pm
by rudy
Start here -
https://arduino-esp8266.readthedocs.io/ ... eadme.htmlThen try this example
https://arduino-esp8266.readthedocs.io/ ... mples.htmlUse your PC on your network to talk to the ESP8266 with the Packet Sender program. Get familiar with it. Then you can add a second ESP and talk to it.
After all that you can set up one ESP8266 to create it's own Access Point and the second ESP programmed as a Station can connect to it. No need for joining an existing connection. Al this is one way to accomplish what you ask. There are others.
Because it is WiFi the SSID will still be visible but is that really a problem? Have a password so that nobody else can join.
Or the ESP8266 can use a mode different than WiFi, called ESP-Now.
https://www.espressif.com/en/products/s ... w/overviewI never tried it. I believe it is more like Bluetooth.
Re: Bonding two ESP8266 units for direct standalone communic
Posted:
Fri May 11, 2018 12:10 pm
by Michael Lemo
Well thanks,
But when I try to program the Wemos D1 mini pro it won't let me but it blinks a few times and then prints that error in the console :
Code: Select allesptool v0.4.13 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
setting board to nodemcu
setting baudrate from 115200 to 921600
setting port from COM1 to COM9
An error occurred while uploading the sketch
setting address from 0x00000000 to 0x00000000
espcomm_upload_file
espcomm_upload_mem
setting serial port timeouts to 1000 ms
opening bootloader
resetting board
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
Uploading 250464 bytes from C:\Users\Mike\AppData\Local\Temp\arduino_build_445861/Blink.ino.bin to flash at 0x00000000
erasing flash
size: 03d260 address: 000000
first_sector_index: 0
total_sector_count: 62
head_sector_count: 16
adjusted_sector_count: 46
erase_size: 02e000
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
setting serial port timeouts to 15000 ms
read 0, requested 1
setting serial port timeouts to 1000 ms
warning: espcomm_send_command: didn't receive command response
warning: espcomm_send_command(FLASH_DOWNLOAD_BEGIN) failed
closing bootloader
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
error: espcomm_upload_mem failed
Any idea why?
Re: Bonding two ESP8266 units for direct standalone communic
Posted:
Fri May 11, 2018 12:26 pm
by Michael Lemo
rudy wrote:Start here - https://arduino-esp8266.readthedocs.io/ ... eadme.html
Then try this example
https://arduino-esp8266.readthedocs.io/ ... mples.html
Use your PC on your network to talk to the ESP8266 with the Packet Sender program. Get familiar with it. Then you can add a second ESP and talk to it.
After all that you can set up one ESP8266 to create it's own Access Point and the second ESP programmed as a Station can connect to it. No need for joining an existing connection. Al this is one way to accomplish what you ask. There are others.
Because it is WiFi the SSID will still be visible but is that really a problem? Have a password so that nobody else can join.
Or the ESP8266 can use a mode different than WiFi, called ESP-Now. https://www.espressif.com/en/products/s ... w/overview
I never tried it. I believe it is more like Bluetooth.
Well thanks,
But when I try to program the Wemos D1 mini pro it won't let me but it blinks a few times and then prints that error in the console :
Code: Select allesptool v0.4.13 - (c) 2014 Ch. Klippel <ck@atelier-klippel.de>
setting board to nodemcu
setting baudrate from 115200 to 921600
setting port from COM1 to COM9
An error occurred while uploading the sketch
setting address from 0x00000000 to 0x00000000
espcomm_upload_file
espcomm_upload_mem
setting serial port timeouts to 1000 ms
opening bootloader
resetting board
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
read 0, requested 1
trying to connect
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
espcomm_send_command: receiving 2 bytes of data
Uploading 250464 bytes from C:\Users\Mike\AppData\Local\Temp\arduino_build_445861/Blink.ino.bin to flash at 0x00000000
erasing flash
size: 03d260 address: 000000
first_sector_index: 0
total_sector_count: 62
head_sector_count: 16
adjusted_sector_count: 46
erase_size: 02e000
espcomm_send_command: sending command header
espcomm_send_command: sending command payload
setting serial port timeouts to 15000 ms
read 0, requested 1
setting serial port timeouts to 1000 ms
warning: espcomm_send_command: didn't receive command response
warning: espcomm_send_command(FLASH_DOWNLOAD_BEGIN) failed
closing bootloader
flush start
setting serial port timeouts to 1 ms
setting serial port timeouts to 1000 ms
flush complete
error: espcomm_upload_mem failed
Any idea why?