Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: check result of join #284

Merged
merged 1 commit into from
Feb 13, 2025
Merged

fix: check result of join #284

merged 1 commit into from
Feb 13, 2025

Conversation

lulf
Copy link
Member

@lulf lulf commented Feb 13, 2025

Should fix #283

@lulf
Copy link
Member Author

lulf commented Feb 13, 2025

/test

@hicklin
Copy link
Contributor

hicklin commented Feb 13, 2025

Hmm... Not sure what's wrong with my setup. I have two serial bluetooth dongles and when I run the updated test I get

running 1 test
[peripheral] advertising
[central] connecting
Central error: Controller(Read(InvalidValue))
Peripheral error: Controller(Read(InvalidValue))
thread 'l2cap_connection_oriented_channels' panicked at tests/l2cap.rs:166:17:
assertion failed: false
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
test l2cap_connection_oriented_channels ... FAILED

I had to amend how the test gets the adapters because the find_controller() does not work on my system (Ubuntu).

    // let adapters = common::find_controllers();
    // let peripheral = adapters[0].clone();
    // let central = adapters[1].clone();
    let peripheral = PathBuf::from("/dev/ttyACM1");
    let central = PathBuf::from("/dev/ttyACM0");

@lulf
Copy link
Member Author

lulf commented Feb 13, 2025

Hmm... Not sure what's wrong with my setup. I have two serial bluetooth dongles and when I run the updated test I get

Just to confirm: are they running the Zephyr UART HCI sample or something else? I've not really tested it with other dongles.

FWIW, the CI is using Debian, my desktop is Fedora, and both have this udev rule that sets up the serial devices:

$ cat /usr/lib/udev/rules.d/60-serial.rules

# do not edit this file, it will be overwritten on update

ACTION=="remove", GOTO="serial_end"
SUBSYSTEM!="tty", GOTO="serial_end"

SUBSYSTEMS=="usb", IMPORT{builtin}="usb_id", IMPORT{builtin}="hwdb --subsystem=usb"
SUBSYSTEMS=="pci", ENV{ID_BUS}=="", ENV{ID_BUS}="pci", \
  ENV{ID_VENDOR_ID}="$attr{vendor}", ENV{ID_MODEL_ID}="$attr{device}", \
  IMPORT{builtin}="hwdb --subsystem=pci"

# /dev/serial/by-path/, /dev/serial/by-id/ for USB devices
KERNEL!="ttyUSB[0-9]*|ttyACM[0-9]*", GOTO="serial_end"

SUBSYSTEMS=="usb-serial", ENV{.ID_PORT}="$attr{port_number}"

IMPORT{builtin}="path_id"
ENV{ID_PATH}=="?*", ENV{.ID_PORT}=="", SYMLINK+="serial/by-path/$env{ID_PATH}"
ENV{ID_PATH}=="?*", ENV{.ID_PORT}=="?*", SYMLINK+="serial/by-path/$env{ID_PATH}-port$env{.ID_PORT}"

ENV{ID_BUS}=="", GOTO="serial_end"
ENV{ID_SERIAL}=="", GOTO="serial_end"
ENV{ID_USB_INTERFACE_NUM}=="", GOTO="serial_end"
ENV{.ID_PORT}=="", SYMLINK+="serial/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$env{ID_USB_INTERFACE_NUM}"
ENV{.ID_PORT}=="?*", SYMLINK+="serial/by-id/$env{ID_BUS}-$env{ID_SERIAL}-if$env{ID_USB_INTERFACE_NUM}-port$env{.ID_PORT}"

LABEL="serial_end"

I'm not sure if there is a way to automatically generate this on ubuntu. Otherwise we could maybe add some other way to configure the adapters.

@lulf lulf merged commit 0691ef5 into main Feb 13, 2025
3 checks passed
@lulf lulf deleted the fix-false-success branch February 13, 2025 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

l2cap test is a false pass
2 participants