Skip to content

DTR Line #63

Closed
Closed
@mribble

Description

@mribble

This is related to this issue, but now that I've tracked down part of that issue to esptool-ck I'm filing a bug here.

I'm programming the esp8266 through a sam3x over native USB using the USB CDC serial driver developed for Arduino Due. I used the 0.4.12 prebuilt windows exe and it fails. If I build my own exe using cygwin it succeeds.

The issue is that the USB CDC driver expects DTR to be active. However this project isn't setting DTR active (DTR is active low so I'm expecting DTR to be a low voltage while transmitting, but it is high with your pre-built exe). You can see some waveforms showing the difference in dtr voltage between the cygwin build and the pre-built exe here: http://glacialwanderer.com/files/2017/dtr_waveform.png

I suspect the issue is in serialport.c. Changing "sDCB.fDtrControl = DTR_CONTROL_DISABLE;" to enable might fix this problem in call cases (my guess is disabled might be handled differently using the cygwin build environment than yours).

However, since I can't reproduce the failure I can't verify it. Can you tell me what build environment you are using to make the prebuilt exes? Once I know that then I should be able to reproduce the issue I'm seeing in the prebuilt exe and verify a fix for it.

Here are some things I don't understand:

  1. Why cygwin is showing different behavior than whatever build enviroment you are using to make the exe.
  2. Why on the wave for you are that active pulse (remember dtr is active low) with the prebuilt exe. However, that brief pulse won't work for Arduino's cdc usb serial driver since it checks for the active dtr state on every usb write.

Here are the command line parameters I'm using with the prebuilt exe:
esptool.exe -vv -cd none -cb 115200 -cp COM5 -ca 0x0 -cf Esp8266.ino.bin

Here are the command line parameters I'm using with the prebuilt exe:
./esptool.exe -vv -cd none -cb 115200 -cp /dev/ttyS4 -ca 0x0 -cf ./Esp8266.ino.bin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions