WLAN/WIFI-Modul ESP8266

I have debugged the issue.

The problem is that the function to send data over the socket can take a long time to complete, longer than it takes for 255 bytes (the size of the buffer that is filled under IRQ) to arrive over the serial port, even at 19200 baud. I have increased the buffer where UART data is stored under IRQ from 255 to 1024 and that fixes the issue :)

Frederic
 
I was able to flash my esp. But how do you go from a Ino file to the bin file?
I also able to ping my device. How can i connect with my pc to the ardumower?
I tried putty with all kinds off settings but no luck.
Could you explain this a bit more?

Greetings

Patrick
 
Hi Patrick,

All is explained here: https://github.com/FredericG-BE/ardumower/wiki/Using-ESP8266-WIFI-module-on-Ardumower How to build the .bin files is explained in step 3. But no need to build the code as the bins are provided.

To control Ardumower, you need an application pfod or arduremote on an Adndoid device: https://play.google.com/store/apps/details?id=au.com.forward.pfodApp https://play.google.com/store/search?q=arduremote&c=apps
However, the latter does not support WIFI yet, only bluetooth.

pfod uses 8080, so it you would open an telnet connection with putty on port 8080 and send "{.}" ardumower will reply.

Frederic
 
hallo,

ok wenn ich zurück ins deutsche wechsle ?

ich bastle an einem mäher-versuchwägelchen. basis asuromechanik, mit nem ardumega2560 drauf, dazu ein kompassmodul (tiltkompensiert), ein 9150 für acc und gyro, ein rgb-sensor und ein esp8266 für telemetrie zum pc.

doch schon am anfang probleme : das 8266 arbeitet zwar prima als accesspoint, verbindet auch und macht dhcp, aber es scheint keine daten zu schicken. telnetversuche auf div. ports scheitern, http sowieso. (ping geht) ich dachte eigentlich, die fw wäre für übertragung serieller daten an rx vorbereitet, aber das war wohl ein trugschluß ?

was ist der einfachste weg, serielle daten (byte reicht) vom rx des 8266 auf den pc (dort in ne grafik) zu kriegen ?

you see, i stand on the schlauch !
 
Hi Reiner,

Sorry, i cannot write in German
Did you have a look at my last post, does that answer your questions?

To control Ardumower, you need an application pfod or arduremote on an Adndoid device:
play.google.com/store/apps/details?id=au.com.forward.pfodApp
play.google.com/store/search?q=arduremote&c=apps

However, the latter does not support WIFI yet, only bluetooth.

pfod uses 8080, so it you would open an telnet connection with putty on port 8080 and send "{.}" ardumower will reply.

Frederic
 
Hi Frederic,

At last I came to configure my ESP-Module.
Everything works fine till position 5.
I fail at programming the Arduino-Branch from your modification.
Compiling is ok, but no Upload starts.

When I switch to the regular Azurit 1.0.4a no Problem appears.
Neither reboot or reconnect of Mega2560 nor another Mega2560 fixes the problem.

The output of logging at upload looks identical to the output of correct upload.
The only minimal difference is the filesize (138266 to 140380 Bytes)
I have no idea how to fix...

(Arduino IDE 1.6.5 with ESP8266 Extension)
(Arduino Mega2560 blank without external wiring)

EXCERPT

Code:
Writing | avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_getsync(): timeout communicating with programmer
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout
avrdude: stk500v2_ReceiveMessage(): timeout


Has anyone tested the upload?

Thanks
Aiko
 
Oder in deutscher Kurzfassung:

Kann irgendwer mal bitte versuchen, die Ardumower-Version von Frederic´s Github-Seite auf einen Mega zu laden?
Ich habe keine Ahnung, warum der Upload bei mir in einem Timeout endet, während die reguläre Azurit 1.0.4a sofort funktioniert.

Wär echt nett! Daaanke!

Gruß
Aiko
 
Hi Aiko,

Could it be that the project is not correctly configured? In particular, check that the programmer is correctly configured. I am not at home and cant check how it should look like, but perhaps you could compare the settings for a project where loading works and the project where it does not.

Hope this helps,
Frederic
 
Hi Frederic,

thank you for reply. The config is exactly the same.
I have some previously versions of Arduino-IDE in an Backup.
These versions i will test and let you know...

Bye
Aiko
 
That is odd. There is nothing special about it, just a few changes in some .cpp files; no reason why you should see any issue uploading it. To be sure, it is the regular ardumower.ino that needs to be uploaded configured for a mega board...

Frederic
 
Ok, i think i have my solution.
This is all very strange.
3x Mega2560 with obviously varied chipsets and drivers
[ul]
[li]with Arduino IDE 1.5.8 --> 3x ok[/li]
[li]with Arduino IDE 1.6.1 --> 3x ok[/li]
[li]with Arduino IDE 1.6.5 --> 2x error, 1x ok[/li]
[/ul]
 
all tests with regular 1.0a4 Azurit ok

Let´s close this issue!

Further tests with esp8266 follow soon ;)

good night
Aiko
 
Success!!

I have successfully set up a connection from pfod app to Arduino via esp8266-01 :woohoo:

Frederic, Thanks a lot for this great Work!!

I can say that this is another milestone on the way to "Jack of all trades" for this Project

Thumbs up!
Aiko
 
@Reiner:

Wenn Du den Workaround bis einschließlich Punkt 4c durchgearbeitet hast, hast Du eine direkte serielle Verbindung vom esp8266 zum PC over WLAN.
Geh zum einen in die Console der Arduino IDE und baue zusätzlich mit PuTTY eine Raw-Connection auf die IP-Adresse mit Port 8080 auf.
Alles was Du auf der jeweiligen Seite sendest, erscheint auf der anderen Seite.
Ist es das, was Du meinst?

Gruß
Aiko
 
Volker schrieb:

Hi Volker,

Not sure what you mean. Our PCB already allows to plug in the ESP8266, so no need for a shield. For PCB 1.3 we will add a status LED and a jumper to flash the ESP code.

The required software change for Ardumower is now in the develop branch and so official support for ESP will probably be included in the next release.

Frederic
 
Zuletzt bearbeitet von einem Moderator:
now it works as wanted :

the construktor of a class initialises the 8266 :

AT+CIPSTART="TCP", "192.168.4.1",1
AT+CIPMODE=1
AT+CIPSEND

then my send-method send the data (6 byte) directly at 115200 baud
to the uart of the esp.

the c-main calls this method in a cyle of 100 hz

the labtop connects the esp without any problems,
in vb a "tcp-listener" receives the data using the getstream-object
and its readbyte-method. byte by byte is received and displayed in
a simple graphic (like a oszilloskope).
 
Hi all,

Thanks to Frederic we have another member in the IoS (Internet of Sheeps).
It took me 1 day work to get to this point.
For others who will follow I will point out my obstacles in the way.

"ch_pd" pin need to be on 3.3V /VDD
the PCB's doing this already but since I have V0.5 (with RX/TX on the wrong pins) I wired it with cables. R14 (1k) was removed from the board. In the way investigating this issue I came across this forum http://www.element14.com/community/...014/11/04/esp8266-developing-using-an-arduino which had a discussion about 3.3V/5V on the RX/TX Pins... basically the datasheet says all GPIO pins are protected (only GPIO NOT VDD!!!).

3.3V VDD has to come from an "strong" powersupply. The onboard Voltageregulator of the Arduinos will not supply enough current for the ESP.

ESP Flasher: I could not flash the ESP with 115200 baud. the flasher stopt after little progress with an error msg. 19200baud in the passthroughTool and the flasher did the job.(don't forget to set the passthroughTool back to 115200baud if you want to check if the firmware upload is working...)

ESP8266 code for the ardumower is working very well. After switching to WIFI, saving user setting and a soft reset, Bluetooth can only be used after switich back to Bluetooth, saving user setting and a HARD reset (Power of completely), but it is working flawlessly.

As pointed out by Aiko here the virtual serial port comes in very handy and after some little adjustments, the python code I wrote for bluetooth/serial connection now also connects reliable to the sheep via wifi.

Chris
 
Thanks Chris for the detailed report!
The flashing procedure indeed needs some further work. I would need to sniff the serial ports to see why the flashing can sometimes fail with the passthough; probably timing that goes wrong. Probably it would be better to run something on the Arduino that understands the protocol. Perhaps the simplest would be to make a sketch that flashes the code in the ESP without any other PC tools

Frederic
 
Oben