Code Monkey home page Code Monkey logo

joy's People

Contributors

jayman2000 avatar waych avatar yamakaky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

joy's Issues

Windows Support

Currently running into two issues

-crates\joycon\src\hid.rs:88:9
(Commenting out the assertion allows it to continue but not sure what is going on here)

 Finished dev [unoptimized + debuginfo] target(s) in 3.81s
     Running `target\debug\joytk.exe camera`
Some([101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0])
[crates\joycon\src\hid.rs:326] status.ir_mode = ImageTransfer
[crates\joycon\src\hid.rs:326] status.ir_mode = HandAnalysisSilhouetteImage
requesting again packet 12
requesting again packet 15
requesting again packet 18
requesting again packet 21
requesting again packet 24
requesting again packet 26
requesting again packet 29
requesting again packet 32
requesting again packet 35
requesting again packet 38
requesting again packet 42
requesting again packet 45
requesting again packet 48
requesting again packet 51
requesting again packet 54
error: process didn't exit successfully: `target\debug\joytk.exe camera` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)

Some of the other functions seem to work but I am trying to get this working for the camera; I did get the camera working on MX Linux but was not sure if it was working properly.

The camera lights appear to turn on (Two Red Lights) for a split moment before the error

Trouble detecting paired joycons with joytk

Hey @Yamakaky!

First of all, thank you for making this software, I am really excited to start using this to get flex data off of the ringcon, something I've been hoping to do for over a year. It seems from discussions on the dekuNukem forums like you've really solved it.

That said I am not able to use the software yet, I suspect I'm doing something wrong— for context I am totally new to Rust. I'm on macOS 10.15.6 and have successfully paired R+L joycons over bluetooth, and am able to see their live inputs from another simple controller utility. But when I try to use any of the joytk commands, I always get the same error:

⟩ target/debug/joytk ringcon monitor ~/D/F/c/joy 1
Error: Failed opening hid device

Is there a setup step I missed to make the paired controllers visible to the HID library? Any guidance you can provide is much appreciated. Thanks!

Windows compatible?

Is it possible to get this running on windows, if so - how?

Also - I seen in a post that this has the ability to read the squeeze values from the ringcon.

FYI, I just managed to reverse engineer how the ringcon sweeze work. I have a working tool, available here: https://github.com/Yamakaky/joy. I have to do some doc, but for now you can connect the joycon via bluetooth and run cargo run --bin joytk ringcon, which will show the squeeze value. It doesn't require any additional hardware. If you want, we can work on integrating this to your mod.

Is it possible to map this value to an xinput device through say an analog stick value?

joytk relay Command doesnt work

The Relay function from the joytk is not working for me. as seen in the Error message below
image

The Monitor and The Ringcon Commands are perfectly working.
My OS is Ubuntu 20.04. Have you an Idea why it isnt working?

Does not compile

Kubuntu 22.04

cargo run --bin joytk
    Updating crates.io index
  Downloaded instant v0.1.12

...
Compiling clap v3.1.0
error[E0507]: cannot move out of `self.caps` which is behind a shared reference
 --> /home/my1/joy/target/debug/build/bluetooth-sys-44f1971f0d43a150/out/bindings.rs:3:187285
  |
3 | ...e (Debug)] pub struct bt_codec { pub id : u8 , pub cid : u16 , pub vid : u16 , pub data_path_id : u8 , pub num_caps : u8 , pub caps : __IncompleteArrayField < bt_codec_codec_caps > , ...
  |       ----- in this derive macro expansion                                                                                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because `self.caps` has type `__IncompleteArrayField<bt_codec_codec_caps>`, which does not implement the `Copy` trait
  |
  = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0507]: cannot move out of `self.codecs` which is behind a shared reference
 --> /home/my1/joy/target/debug/build/bluetooth-sys-44f1971f0d43a150/out/bindings.rs:3:189853
  |
3 | ...ked)] # [derive (Debug)] pub struct bt_codecs { pub num_codecs : u8 , pub codecs : __IncompleteArrayField < bt_codec > , } # [test] fn bindgen_tes...
  |                     ----- in this derive macro expansion                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because `self.codecs` has type `__IncompleteArrayField<bt_codec>`, which does not implement the `Copy` trait
  |
  = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0507]: cannot move out of `self.service` which is behind a shared reference
 --> /home/my1/joy/target/debug/build/bluetooth-sys-44f1971f0d43a150/out/bindings.rs:3:194314
  |
3 | ...e (Debug)] pub struct bnep_setup_conn_req { pub type_ : u8 , pub ctrl : u8 , pub uuid_size : u8 , pub service : __IncompleteArrayField < u8 > , } ...
  |       ----- in this derive macro expansion                                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because `self.service` has type `__IncompleteArrayField<u8>`, which does not implement the `Copy` trait
  |
  = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0507]: cannot move out of `self.list` which is behind a shared reference
 --> /home/my1/joy/target/debug/build/bluetooth-sys-44f1971f0d43a150/out/bindings.rs:3:195737
  |
3 | ...erive (Debug)] pub struct bnep_set_filter_req { pub type_ : u8 , pub ctrl : u8 , pub len : u16 , pub list : __IncompleteArrayField < u8 > , } # [t...
  |           ----- in this derive macro expansion                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because `self.list` has type `__IncompleteArrayField<u8>`, which does not implement the `Copy` trait
  |
  = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0507]: cannot move out of `self.data` which is behind a shared reference
 --> /home/my1/joy/target/debug/build/bluetooth-sys-44f1971f0d43a150/out/bindings.rs:3:199559
  |
3 | ...d)] # [derive (Debug)] pub struct bnep_ext_hdr { pub type_ : u8 , pub len : u8 , pub data : __IncompleteArrayField < u8 > , } # [test] fn bindgen_...
  |                   ----- in this derive macro expansion                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because `self.data` has type `__IncompleteArrayField<u8>`, which does not implement the `Copy` trait
  |
  = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0507]: cannot move out of `self.condition` which is behind a shared reference
 --> /home/my1/joy/target/debug/build/bluetooth-sys-44f1971f0d43a150/out/bindings.rs:3:266645
  |
3 | ...[derive (Debug)] pub struct set_event_flt_cp { pub flt_type : u8 , pub cond_type : u8 , pub condition : __IncompleteArrayField < u8 > , } # [test]...
  |             ----- in this derive macro expansion                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because `self.condition` has type `__IncompleteArrayField<u8>`, which does not implement the `Copy` trait
  |
  = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0507]: cannot move out of `self.data` which is behind a shared reference
 --> /home/my1/joy/target/debug/build/bluetooth-sys-44f1971f0d43a150/out/bindings.rs:3:465628
  |
3 | ...acked)] # [derive (Debug)] pub struct evt_le_meta_event { pub subevent : u8 , pub data : __IncompleteArrayField < u8 > , } # [test] fn bindgen_tes...
  |                       ----- in this derive macro expansion                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because `self.data` has type `__IncompleteArrayField<u8>`, which does not implement the `Copy` trait
  |
  = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0507]: cannot move out of `self.data` which is behind a shared reference
 --> /home/my1/joy/target/debug/build/bluetooth-sys-44f1971f0d43a150/out/bindings.rs:3:469560
  |
3 | ...e (Debug)] pub struct le_advertising_info { pub evt_type : u8 , pub bdaddr_type : u8 , pub bdaddr : bdaddr_t , pub length : u8 , pub data : __IncompleteArrayField < u8 > , ...
  |       ----- in this derive macro expansion                                                                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because `self.data` has type `__IncompleteArrayField<u8>`, which does not implement the `Copy` trait
  |
  = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0507]: cannot move out of `self.handles` which is behind a shared reference
 --> /home/my1/joy/target/debug/build/bluetooth-sys-44f1971f0d43a150/out/bindings.rs:3:483704
  |
3 | ...e (Debug)] pub struct evt_num_completed_blocks { pub total_num_blocks : u16 , pub num_handles : u8 , pub handles : __IncompleteArrayField < cmplt_handle > , ...
  |       ----- in this derive macro expansion                                                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because `self.handles` has type `__IncompleteArrayField<cmplt_handle>`, which does not implement the `Copy` trait
  |
  = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0507]: cannot move out of `self.data` which is behind a shared reference
 --> /home/my1/joy/target/debug/build/bluetooth-sys-44f1971f0d43a150/out/bindings.rs:3:485921
  |
3 | ...acked)] # [derive (Debug)] pub struct evt_stack_internal { pub type_ : u16 , pub data : __IncompleteArrayField < u8 > , } # [test] fn bindgen_test...
  |                       ----- in this derive macro expansion                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because `self.data` has type `__IncompleteArrayField<u8>`, which does not implement the `Copy` trait
  |
  = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0507]: cannot move out of `self.data` which is behind a shared reference
 --> /home/my1/joy/target/debug/build/bluetooth-sys-44f1971f0d43a150/out/bindings.rs:3:547717
  |
3 | ...] # [derive (Debug)] pub struct l2cap_conf_req { pub dcid : u16 , pub flags : u16 , pub data : __IncompleteArrayField < u8 > , } # [test] fn bindg...
  |                 ----- in this derive macro expansion                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because `self.data` has type `__IncompleteArrayField<u8>`, which does not implement the `Copy` trait
  |
  = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0507]: cannot move out of `self.data` which is behind a shared reference
 --> /home/my1/joy/target/debug/build/bluetooth-sys-44f1971f0d43a150/out/bindings.rs:3:548844
  |
3 | ...erive (Debug)] pub struct l2cap_conf_rsp { pub scid : u16 , pub flags : u16 , pub result : u16 , pub data : __IncompleteArrayField < u8 > , } # [t...
  |           ----- in this derive macro expansion                                                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because `self.data` has type `__IncompleteArrayField<u8>`, which does not implement the `Copy` trait
  |
  = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0507]: cannot move out of `self.val` which is behind a shared reference
 --> /home/my1/joy/target/debug/build/bluetooth-sys-44f1971f0d43a150/out/bindings.rs:3:550165
  |
3 | ...d)] # [derive (Debug)] pub struct l2cap_conf_opt { pub type_ : u8 , pub len : u8 , pub val : __IncompleteArrayField < u8 > , } # [test] fn bindgen...
  |                   ----- in this derive macro expansion                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because `self.val` has type `__IncompleteArrayField<u8>`, which does not implement the `Copy` trait
  |
  = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

error[E0507]: cannot move out of `self.data` which is behind a shared reference
 --> /home/my1/joy/target/debug/build/bluetooth-sys-44f1971f0d43a150/out/bindings.rs:3:553699
  |
3 | ...] # [derive (Debug)] pub struct l2cap_info_rsp { pub type_ : u16 , pub result : u16 , pub data : __IncompleteArrayField < u8 > , } # [test] fn bin...
  |                 ----- in this derive macro expansion                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ move occurs because `self.data` has type `__IncompleteArrayField<u8>`, which does not implement the `Copy` trait
  |
  = note: this error originates in the derive macro `Debug` (in Nightly builds, run with -Z macro-backtrace for more info)

For more information about this error, try `rustc --explain E0507`.
The following warnings were emitted during compilation:

warning: couldn't execute `llvm-config --prefix` (error: No such file or directory (os error 2))
warning: set the LLVM_CONFIG_PATH environment variable to the full path to a valid `llvm-config` executable (including the executable itself)

error: could not compile `bluetooth-sys` (lib) due to 14 previous errors
warning: build failed, waiting for other jobs to finish...

License?

I want to create a game that uses the Ring-Con. Could you please place this repo under an open-source license?

Import into Wireshark

Hey, thanks for the captures and script.

I wrote a plugin for Wireshark analyzing the traffic: https://github.com/dekuNukem/Nintendo_Switch_Reverse_Engineering/tree/master/packet_parse/nxbt and would like to use it to analyze the captures. Do you know of any easy method to get these captures into Wireshark? Your format seems to be really easy to parse, but the import-from-hex in Wireshark seems to only support some messed up format that isn't even easy to convert to.

If no feel free to close this Issue, I'll figure something out to create Wireshark's weird mess.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.