patchAVR Downloader/UploaDEr - Patches: patch #8272, rfcomm devices can't connect in...


You are not allowed to post comments on this tracker with your current authentication level.

patch #8272: rfcomm devices can't connect in time to upload

Submitter:  David H. Wilkins <dwilkins>
Submitted:  Sun 12 Jan 2014 05:17:00 AM UTC
Votes: 1
Category:  None Priority:  5 - Normal
Status:  Need Info Privacy:  Public
Assigned to:  None Open/Closed:  Open

Sat 27 Nov 2021 09:43:16 PM UTC, comment #2: 

The audit trail refers to a problem inside Linux.

Is that still an issue these days?

Joerg Wunsch <joerg_wunsch>
Group administrator
Sun 23 Mar 2014 04:48:07 PM UTC, comment #1: 

The problem is with the Linux Bluetooth stack and not with avrdude.  Pyserial has the same problem.  The root cause is that RFCOMM sends ENOTCONN for non-blocking connections. POSIX requires either EAGAIN or EWOULDBLOCK if the connection may eventually succeed.  ENOTCONN indicates a permanent failure.

See also and

The fix is to use a Linux kernel with a non-broken Bluez stack.

Rob Riggs <rriggs>
Sun 12 Jan 2014 05:17:00 AM UTC, original submission:  

When using bluetooth serial devices for uploading, and using `rfcomm bind` to connect those devices when the /dev/rfcomm0 file is opened, avrdude doesn't allow enough time for the device to connect before failing.

If avrdude reads first, then the device has time to connect, but it seems that avrdude performs a ser_send first.  This patch adds 10 retries when ENOTCONN (107) "Transport endpoint is not connected" is returned as the errno for the send

David H. Wilkins <dwilkins>


(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attached Files
file #30248:  rfcomm_wont_upload.patch added by dwilkins (654B - text/x-patch)


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by joerg_wunsch (Posted a comment)
  • -email is unavailable- added by rriggs (Posted a comment)
  • -email is unavailable- added by dwilkins (Voted in favor of this item)
  • -email is unavailable- added by dwilkins (Submitted the item)

    There is 1 vote so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.


    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2021-11-27 joerg_wunsch StatusNone Need Info
    2014-01-15 dwilkins Carbon-Copy- Added dwilkins
    2014-01-12 dwilkins Attached File- Added rfcomm_wont_upload.patch, #30248

    Back to the top

    Powered by Savane 3.13-a854.
    Corresponding source code