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 authentification level.

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

Submitted by:  David H. Wilkins <dwilkins>
Submitted on:  Sun Jan 12 05:17:00 2014  
Votes:  1  
Category: NonePriority: 5 - Normal
Status: NonePrivacy: Public
Assigned to: NoneOpen/Closed: Open

Sun Mar 23 16:48:07 2014, 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 Jan 12 05:17:00 2014, 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>


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
  • -unavailable- added by rriggs (Posted a comment)
  • -unavailable- added by dwilkins (Voted in favor of this item)
  • -unavailable- added by dwilkins (Submitted the item)

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 1 encouragement so far.

    Only logged-in users can vote.


    Please enter the title of George Orwell's famous dystopian book (it's a date):



    Follow 2 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed Jan 15 01:15:14 2014dwilkinsCarbon-Copy-=>Added dwilkins
    Sun Jan 12 05:17:00 2014dwilkinsAttached File-=>Added rfcomm_wont_upload.patch, #30248

    Back to the top

    Powered by Savane 3.1-cleanup1