···1616 },
1717 server::device::{
1818 configuration::ProtocolAttributesType,
1919- hardware::{Hardware, HardwareCommand, HardwareReadCmd, HardwareWriteCmd},
1919+ hardware::{Hardware, HardwareCommand, HardwareWriteCmd},
2020 protocol::{
2121 generic_protocol_initializer_setup,
2222 ProtocolHandler,
···5050impl ProtocolInitializer for TheHandyInitializer {
5151 async fn initialize(
5252 &mut self,
5353- hardware: Arc<Hardware>,
5353+ _hardware: Arc<Hardware>,
5454 _: &ProtocolDeviceAttributes,
5555 ) -> Result<Arc<dyn ProtocolHandler>, ButtplugDeviceError> {
5656+ // Ok, somehow this whole function has been basically a no-op. The read/write lines never had an
5757+ // await on them, so they were never run. But only now, in Rust 1.75/Buttplug 7.1.15, have we
5858+ // gotten a complaint from the compiler. Going to comment this out for now and see what happens.
5959+ // If we don't get any complaints, I'm going to have to rewrite all of my snark here. :(
6060+5661 // Ok, here we go. This is an overly-complex nightmare but apparently "protocomm makes the
5762 // firmware easier".
5863 //
···6772 // First we need to set up a session with The Handy. This will require sending the "security
6873 // initializer" to basically say we're sending plaintext. Due to pb3 making everything
6974 // optional, we have some Option<T> wrappers here.
7070- let session_req = protocomm::SessionData {
7171- sec_ver: protocomm::SecSchemeVersion::SecScheme0 as i32,
7272- proto: Some(protocomm::session_data::Proto::Sec0(
7373- protocomm::Sec0Payload {
7474- msg: protocomm::Sec0MsgType::S0SessionCommand as i32,
7575- payload: Some(protocomm::sec0_payload::Payload::Sc(
7676- protocomm::S0SessionCmd {},
7777- )),
7878- },
7979- )),
8080- };
7575+7676+ // let session_req = protocomm::SessionData {
7777+ // sec_ver: protocomm::SecSchemeVersion::SecScheme0 as i32,
7878+ // proto: Some(protocomm::session_data::Proto::Sec0(
7979+ // protocomm::Sec0Payload {
8080+ // msg: protocomm::Sec0MsgType::S0SessionCommand as i32,
8181+ // payload: Some(protocomm::sec0_payload::Payload::Sc(
8282+ // protocomm::S0SessionCmd {},
8383+ // )),
8484+ // },
8585+ // )),
8686+ // };
81878288 // We need to shove this at what we're calling the "firmware" endpoint but is actually the
8389 // "prov-session" characteristic. These names are stored in characteristic descriptors, which
···9096 //
9197 // If they ever change this, I quit (or will just update the device config).
92989393- let mut sec_buf = vec![];
9494- session_req
9595- .encode(&mut sec_buf)
9696- .expect("Infallible encode.");
9797- hardware.write_value(&HardwareWriteCmd::new(Endpoint::Firmware, sec_buf, false));
9898- let _ = hardware.read_value(&HardwareReadCmd::new(Endpoint::Firmware, 100, 500));
9999+ // hardware.write_value(&HardwareWriteCmd::new(Endpoint::Firmware, sec_buf, false));
100100+ // hardware.read_value(&HardwareReadCmd::new(Endpoint::Firmware, 100, 500));
99101100102 // At this point, the "handyplug" protocol does actually have both RequestServerInfo and Ping
101103 // messages that it can use. However, having removed these and still tried to run the system,