Using the new Arduino IDE for ESP8266 and found bugs, report them here

Moderator: igrr

User avatar
By SwiCago
#60343 EDIT: It looks like this might be a PUTTY issue or a virtual comport issue on windows. With my Oscilloscope it shows correct data.



Not 100% sure if this is a bug yet, but I can consistently repeat the issue.
Hopefully someone can chime in and tell me what is wrong here.

Arduino IDE 1.6.5
Latest Stable ESP libraries: 2.3.0
Hardware: ESP-01

Code: Select all#include <ESP8266WiFi.h>

void setup() {
  Serial.begin(2400,SERIAL_8E1); //trying to interface with a Mitsubishi heat pump
 //Serial.begin(115200);                 //reproducible at this speed as well
  for(int i=0; i < 255; i++) {             //after 7F it begins to print two bytes, instead of one!
    Serial.write(i);
    //Serial.write((uint8_t) i);          //prints same as above
  }
}

void loop() {
}



Code: Select allHEX dump from COM, the first part is PUTTY junk and ESP boot junk, it starts to get interesting after 7f (line starting  00000d0:)
0000000: 3d7e 3d7e 3d7e 3d7e 3d7e 3d7e 3d7e 3d7e  =~=~=~=~=~=~=~=~
0000010: 3d7e 3d7e 3d7e 3d20 5075 5454 5920 6c6f  =~=~=~= PuTTY lo
0000020: 6720 3230 3137 2e30 312e 3033 2032 303a  g 2017.01.03 20:
0000030: 3031 3a34 3720 3d7e 3d7e 3d7e 3d7e 3d7e  01:47 =~=~=~=~=~
0000040: 3d7e 3d7e 3d7e 3d7e 3d7e 3d7e 3d0d 0ac2  =~=~=~=~=~=~=...
0000050: b565 64c2 a5c3 bb10 0102 0304 0506 0708  .ed.............
0000060: 090a 0b0c 0d0e 0f10 1112 1314 1516 1718  ................
0000070: 191a 1b1c 1d1e 1f20 2122 2324 2526 2728  ....... !"#$%&'(
0000080: 292a 2b2c 2d2e 2f30 3132 3334 3536 3738  )*+,-./012345678
0000090: 393a 3b3c 3d3e 3f40 4142 4344 4546 4748  9:;<=>?@ABCDEFGH
00000a0: 494a 4b4c 4d4e 4f50 5152 5354 5556 5758  IJKLMNOPQRSTUVWX
00000b0: 595a 5b5c 5d5e 5f60 6162 6364 6566 6768  YZ[\]^_`abcdefgh
00000c0: 696a 6b6c 6d6e 6f70 7172 7374 7576 7778  ijklmnopqrstuvwx
00000d0: 797a 7b7c 7d7e 7fc2 80c2 81c2 82c2 83c2  yz{|}~..........
00000e0: 84c2 85c2 86c2 87c2 88c2 89c2 8ac2 8bc2  ................
00000f0: 8cc2 8dc2 8ec2 8fc2 90c2 91c2 92c2 93c2  ................
0000100: 94c2 95c2 96c2 97c2 98c2 99c2 9ac2 9bc2  ................
0000110: 9cc2 9dc2 9ec2 9fc2 a0c2 a1c2 a2c2 a3c2  ................
0000120: a4c2 a5c2 a6c2 a7c2 a8c2 a9c2 aac2 abc2  ................
0000130: acc2 adc2 aec2 afc2 b0c2 b1c2 b2c2 b3c2  ................
0000140: b4c2 b5c2 b6c2 b7c2 b8c2 b9c2 bac2 bbc2  ................
0000150: bcc2 bdc2 bec2 bfc3 80c3 81c3 82c3 83c3  ................
0000160: 84c3 85c3 86c3 87c3 88c3 89c3 8ac3 8bc3  ................
0000170: 8cc3 8dc3 8ec3 8fc3 90c3 91c3 92c3 93c3  ................
0000180: 94c3 95c3 96c3 97c3 98c3 99c3 9ac3 9bc3  ................
0000190: 9cc3 9dc3 9ec3 9fc3 a0c3 a1c3 a2c3 a3c3  ................
00001a0: a4c3 a5c3 a6c3 a7c3 a8c3 a9c3 aac3 abc3  ................
00001b0: acc3 adc3 aec3 afc3 b0c3 b1c3 b2c3 b3c3  ................
00001c0: b4c3 b5c3 b6c3 b7c3 b8c3 b9c3 bac3 bbc3  ................
00001d0: bcc3 bdc3 be                           .....


Code: Select allSame Dump without putty and ESP boot log
0102 0304 0506 0708 090a 0b0c 0d0e 0f10
1112 1314 1516 1718  191a 1b1c 1d1e 1f20
2122 2324 2526 2728  292a 2b2c 2d2e 2f30
3132 3334 3536 3738 393a 3b3c 3d3e 3f40
4142 4344 4546 4748 494a 4b4c 4d4e 4f50
5152 5354 5556 5758 595a 5b5c 5d5e 5f60
6162 6364 6566 6768 696a 6b6c 6d6e 6f70
7172 7374 7576 7778 797a 7b7c 7d7e 7fc2
80c2 81c2 82c2 83c2  84c2 85c2 86c2 87c2
88c2 89c2 8ac2 8bc2 8cc2 8dc2 8ec2 8fc2
90c2 91c2 92c2 93c2 94c2 95c2 96c2 97c2
98c2 99c2 9ac2 9bc2 9cc2 9dc2 9ec2 9fc2
a0c2 a1c2 a2c2 a3c2 a4c2 a5c2 a6c2 a7c2
a8c2 a9c2 aac2 abc2 acc2 adc2 aec2 afc2
b0c2 b1c2 b2c2 b3c2 b4c2 b5c2 b6c2 b7c2
b8c2 b9c2 bac2 bbc2 bcc2 bdc2 bec2 bfc3
80c3 81c3 82c3 83c3 84c3 85c3 86c3 87c3
88c3 89c3 8ac3 8bc3 8cc3 8dc3 8ec3 8fc3
90c3 91c3 92c3 93c3 94c3 95c3 96c3 97c3
98c3 99c3 9ac3 9bc3 9cc3 9dc3 9ec3 9fc3
a0c3 a1c3 a2c3 a3c3 a4c3 a5c3 a6c3 a7c3
a8c3 a9c3 aac3 abc3 acc3 adc3 aec3 afc3
b0c3 b1c3 b2c3 b3c3 b4c3 b5c3 b6c3 b7c3
b8c3 b9c3 bac3 bbc3 bcc3 bdc3 be                           
Last edited by SwiCago on Wed Jan 04, 2017 9:14 pm, edited 1 time in total.
User avatar
By SwiCago
#60386
martinayotte wrote:It is probably a settings of your putty itself, maybe still in 7N1.
Because I've tried it with a python script under Linux and characters above 0x7F are Ok.


No putty settings are 2400/8/1 EVEN...this I triple checked LOL. I also used had the original device, that this esp is supposed to mimic and nothing gets messed up. I also tested against an old YUN and it also was correct. I never suspected the esp, but finally after being sure what was sent, should be correct I wanted to check it.
I may try software serial tonight, but can you or someone try to replicate the issue with esp, not with python.
Thanks
User avatar
By martinayotte
#60389 As I said, I've use python script to capture serial output of my ESP, and my sketch was outputting the characters from 0 to 255 without any glitches.
Another method could be to attach a logic analyser, but I doubt to be able to reproduce the issue since the first test didn't reveal that ESP is the guilty part.