Skip to content

HeadsetControl reports that my command was successful, but nothing actually happens. #396

Description

@ogmicco

Description

HeadsetControl reports that my command was successful, but nothing actually happens. For example my headset led is still on, even tho I ran the command to disable it

Image

Headset Name

Roccat Elo Air

On which OS does the problem happen?

Linux

Device information

Detailed Device Information
Device Found
 VendorID: 0x1e7d
ProductID: 0x3a37
 path: /dev/hidraw4
 serial_number: 7802FFFF3802
 Manufacturer: Turtle Beach
 Product:      Elo 7.1 Air
 Interface:    0
 Usage-Page: 0xff00 Usageid: 0x1

Device Found
 VendorID: 0x1e7d
ProductID: 0x3a37
 path: /dev/hidraw5
 serial_number: 7802FFFF3802
 Manufacturer: Turtle Beach
 Product:      Elo 7.1 Air
 Interface:    5
 Usage-Page: 0xc Usageid: 0x1

Activity

  1. Sapd commented on Apr 7, 2025

    @Sapd
    Owner

    That is really weird.

    Could you make here:

    A small printf statement and recompile?

    printf('test\n');
    

    Then check if test is outputted?

  2. ogmicco commented on Apr 7, 2025

    @ogmicco
    Author

    I hope I did it right:

    Image

    now I get this after running the "make" command:

    /home/user2540/Downloads/HeadsetControl/src/devices/roccat_elo_7_1_air.c: In function ‘send_receive’:
    /home/user2540/Downloads/HeadsetControl/src/devices/roccat_elo_7_1_air.c:55:8: warning: multi-character literal with 5 characters exceeds 'int' size of 4 bytes
    55 | printf('test\n');
    | ^~~~~~~~
    /home/user2540/Downloads/HeadsetControl/src/devices/roccat_elo_7_1_air.c:55:8: error: passing argument 1 of ‘printf’ makes pointer from integer without a cast [-Wint-conversion]
    55 | printf('test\n');
    | ^~~~~~~~
    | |
    | int
    In file included from /home/user2540/Downloads/HeadsetControl/src/devices/roccat_elo_7_1_air.c:4:
    /usr/include/stdio.h:363:43: note: expected ‘const char * restrict’ but argument is of type ‘int’
    363 | extern int printf (const char *__restrict __format, ...);
    | ~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~
    make[2]: *** [CMakeFiles/headsetcontrol.dir/build.make:429: CMakeFiles/headsetcontrol.dir/src/devices/roccat_elo_7_1_air.c.o] Error 1
    make[1]: *** [CMakeFiles/Makefile2:164: CMakeFiles/headsetcontrol.dir/all] Error 2
    make: *** [Makefile:146: all] Error 2

  3. ogmicco commented on Apr 7, 2025

    @ogmicco
    Author

    I downgraded to HeadsetControl 2.7.0 and it seems to work correctly

  4. Sapd commented on Apr 7, 2025

    @Sapd
    Owner

    Sorry, must be: printf("test\n");

  5. Sapd commented on Apr 7, 2025

    @Sapd
    Owner

    I downgraded to HeadsetControl 2.7.0 and it seems to work correctly

    Is the bug already there with 3.0.0?

  6. ogmicco commented on Apr 7, 2025

    @ogmicco
    Author

    3.0.0 also works correctly

  7. ogmicco commented on Apr 7, 2025

    @ogmicco
    Author

    Sorry, must be: printf("test\n");

    I did that and recompiled it without any errors. Should I get a log file somewhere or something?. I have no idea what to do now :D

  8. Sapd commented on Apr 7, 2025

    @Sapd
    Owner

    Sorry, must be: printf("test\n");

    I did that and recompiled it without any errors. Should I get a log file somewhere or something?. I have no idea what to do now :D

    No just run the command, it should display test somewhere.

  9. Sapd commented on Apr 7, 2025

    @Sapd
    Owner

    @nicola02nb If test is not displayed for him, it could be some issue with the multiple device support

  10. nicola02nb commented on Apr 7, 2025

    @nicola02nb
    Contributor

    @nicola02nb If test is not displayed for him, it could be some issue with the multiple device support

    Seems like... I'll give it look as soon as I can

  11. ogmicco commented on Apr 7, 2025

    @ogmicco
    Author

    Sorry, must be: printf("test\n");

    I did that and recompiled it without any errors. Should I get a log file somewhere or something?. I have no idea what to do now :D

    No just run the command, it should display test somewhere.

    this is what it does when I compile with "printf("test\n");"

    Image

  12. nicola02nb commented on Apr 7, 2025

    @nicola02nb
    Contributor

    Just probably found out the issue there:

    HeadsetControl/src/main.c

    Lines 1080 to 1081 in 7545874

    if (!device_check_ids(devices_found[i].device, selected_vendor_id, selected_product_id))
    continue;

    The not ! should be removed

  13. nicola02nb commented on Apr 7, 2025

    @nicola02nb
    Contributor

    Actually that not ! was correct... actually the problem is when the selected_vendor_id and selected_product_id aren't specified as args and are both 0 by default.

    So when it's time to run the actions, the program will skip every device due to device_selected vendorId and productId are diferent from selected_vendor_id and selected_product_id which are 0.

  14. Sapd commented on Apr 7, 2025

    @Sapd
    Owner

    @ogmicco Can you try again with the latest master?

  15. oddeirik commented on Apr 8, 2025

    @oddeirik

    I had the same problem and the fix in PR #397 resolved this 👍.

    On an slightly unrelated note, it seems that there's now a different (CRLF?) line terminator after reporting the command status? I see it from the screenshot in the initial reporting here, and I've also noticed the output changing at some point recently:

    Image

  16. nicola02nb commented on Apr 8, 2025

    @nicola02nb
    Contributor

    That's strange, I'm not getting that... can you try using the test device?

    headsetcontrol --test-device -l 0 -d 0xf00b:0xa00c

  17. oddeirik commented on Apr 8, 2025

    @oddeirik

    Apologies, it's actually missing a line terminator, which is what zsh is probably indicating that it has inserted (?). Bash does not show this behavior, it just shows the prompt on the same line as the "Successfully set lights!" message afterwards.

    Looks like this changed the output print, where it used to have a trailing \n, but now doesn't:

    28cf1b7#diff-cc249218afaaaa3e80151edd87d145b5e8f81f7d43f581f5d81e18bee9e4e96dR800

    Not a big deal at all, just something I noticed. I didn't mean to hijack the issue thread over that! 😅

  18. ogmicco commented on Apr 8, 2025

    @ogmicco
    Author

    @ogmicco Can you try again with the latest master?

    it seems to work now 👌

  19. Sapd commented on May 22, 2025

    @Sapd
    Owner

    Apologies, it's actually missing a line terminator, which is what zsh is probably indicating that it has inserted (?). Bash does not show this behavior, it just shows the prompt on the same line as the "Successfully set lights!" message afterwards.

    Looks like this changed the output print, where it used to have a trailing \n, but now doesn't:

    28cf1b7#diff-cc249218afaaaa3e80151edd87d145b5e8f81f7d43f581f5d81e18bee9e4e96dR800

    Not a big deal at all, just something I noticed. I didn't mean to hijack the issue thread over that! 😅

    Indeed thanks, there should always be a line terminator. Added it back #404

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions