node-serialport: Not able to receive data after resetting esp32 on windows

Summary of Problem

I am trying to read data from esp32. It works as expected on Linux but does not behave the same on windows. (Sample code ‘GetChipID.ino’ is uploaded from arduino IDE to esp32)

In the starting, esp32 on both the platform (Linux and windows) shows correct data but on resetting, it does not. => On linux, On resetting esp32, below is the output,

ESP32 Chip ID = 54397BA4AE30
ESP32 Chip ID = 54397BA4AE30
ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
configsip: 0, SPIWP:0xee
clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
mode:DIO, clock div:1
load:0x3fff0018,len:4
load:0x3fff001c,len:1100
load:0x40078000,len:10208
load:0x40080400,len:6460
entry 0x400806a4
ESP32 Chip ID = 54397BA4AE30
ESP32 Chip ID = 54397BA4AE30
ESP32 Chip ID = 54397BA4AE30

=> On Windows, , below is the output, (it stops receiving data after resetting esp32)

ESP32 Chip ID = 54397BA4AE30
ESP32 Chip ID = 54397BA4AE30
ets Jun  8 2016 00:22:57

rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
waiting for download

Code to Reproduce the Issue

const SerialPort = require('serialport');
const Readline = require('@serialport/parser-readline');
const port = new SerialPort('/dev/ttyUSB0', // Port as per usage
{
    baudRate: 115200
});
const parser = port.pipe(new Readline());

parser.on('data', data => console.log(data));

Versions, Operating System and Hardware

=>Windows 8/10,

  • SerialPort@7.1.5
  • Node.js v10.15.3
  • Hardware = ESP32

=>Ubuntu 16.04,

  • SerialPort@7.1.5
  • Node.js v8.16.0
  • Hardware = ESP32

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 38 (9 by maintainers)

Commits related to this issue

Most upvoted comments