GithubHelp home page GithubHelp logo

AirPlay can't connect about owl HOT 17 OPEN

oneBit-pixel avatar oneBit-pixel commented on July 29, 2024
AirPlay can't connect

from owl.

Comments (17)

Frostie314159 avatar Frostie314159 commented on July 29, 2024

AirPlay is not supported over OWL, as it requires the service discovery mechanism, as well as certain modifications to the DataPathStateTLV.

from owl.

hualu123 avatar hualu123 commented on July 29, 2024

Do you know how I can modify the DataPathStateTLV to support airplay?

from owl.

Frostie314159 avatar Frostie314159 commented on July 29, 2024

This is the code in my library, which parses the flags.

bitfield! {
    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
    pub struct DataPathFlags: u16 {
        pub infra_bssid_channel: bool => bit!(0),
        pub infra_address: bool => bit!(1),
        pub awdl_address: bool => bit!(2),
        pub is_umi: bool => bit!(4),
        pub dualband_support: bool => bit!(5),
        pub airplay_sink: bool => bit!(6),
        pub follow_channel_sequence: bool => bit!(7),
        pub country_code: bool => bit!(8),
        pub channel_map: bool => bit!(9),
        pub airplay_solo_mode: bool => bit!(10),
        pub umi_support: bool => bit!(11),
        pub unicast_options: bool => bit!(12),
        pub is_realtime: bool => bit!(13),
        pub rangeable: bool => bit!(14),
        pub extension_flags: bool => bit!(15)
    }
}

However, my current understanding is, that AirPlay requires more than the data path state tlv, namely unicast master indication frames. I'm afraid, that this would be a major change to OWL. I'm also uncertain, if the bandwidth currently provided by OWL is sufficient, since it's capped at 12 Mbit/s through the data rate set in the radiotap header.

from owl.

Frostie314159 avatar Frostie314159 commented on July 29, 2024

I'm currently working on an alternative to OWL written in rust, since there isn't much activity on this repo anymore and there is still room for improvement. Until it's en par with OWL, it will probably take some time, since up until now I'm just working on parser infrastructure for reading the frames. My ultimate goal is to support SD and UMIs too.

from owl.

hualu123 avatar hualu123 commented on July 29, 2024

I now try to send dns service information to the awdl0 network port. The Mac computer can find the Airplay service, but it fails when I click to connect. I used the netcat tool to test and found that a socket connection can be established through the awdl0 interface. So it feels strange.

from owl.

Frostie314159 avatar Frostie314159 commented on July 29, 2024

Could you try monitoring the connection with wireshark?

from owl.

hualu123 avatar hualu123 commented on July 29, 2024

I cannot capture the tcp sync during the connection through wireshark, but I can capture the udp packet of mdns.

from owl.

Frostie314159 avatar Frostie314159 commented on July 29, 2024

What I meant, was capturing the packets send over the wireless interface, you set OWL to use. i.e. The monitoring interface.

from owl.

hualu123 avatar hualu123 commented on July 29, 2024

awdl0 is the virtual node generated after starting owl

from owl.

hualu123 avatar hualu123 commented on July 29, 2024

When you say the node where wireshark captures packets, you mean the node generated by owl, right?

from owl.

hualu123 avatar hualu123 commented on July 29, 2024

This is the code in my library, which parses the flags.

bitfield! {
    #[derive(Clone, Copy, Debug, Default, PartialEq, Eq)]
    pub struct DataPathFlags: u16 {
        pub infra_bssid_channel: bool => bit!(0),
        pub infra_address: bool => bit!(1),
        pub awdl_address: bool => bit!(2),
        pub is_umi: bool => bit!(4),
        pub dualband_support: bool => bit!(5),
        pub airplay_sink: bool => bit!(6),
        pub follow_channel_sequence: bool => bit!(7),
        pub country_code: bool => bit!(8),
        pub channel_map: bool => bit!(9),
        pub airplay_solo_mode: bool => bit!(10),
        pub umi_support: bool => bit!(11),
        pub unicast_options: bool => bit!(12),
        pub is_realtime: bool => bit!(13),
        pub rangeable: bool => bit!(14),
        pub extension_flags: bool => bit!(15)
    }
}

However, my current understanding is, that AirPlay requires more than the data path state tlv, namely unicast master indication frames. I'm afraid, that this would be a major change to OWL. I'm also uncertain, if the bandwidth currently provided by OWL is sufficient, since it's capped at 12 Mbit/s through the data rate set in the radiotap header.

Can you explain what the fields here mean? Especially airplay_sink

from owl.

Frostie314159 avatar Frostie314159 commented on July 29, 2024

AirPlay sink indicates, that airplaying to this peer is supported.

from owl.

hualu123 avatar hualu123 commented on July 29, 2024

Can you tell me if there are any other meanings?

from owl.

hualu123 avatar hualu123 commented on July 29, 2024

owl turned out to be like this:
struct awdl_data_path_state_tlv {
uint8_t type;
uint16_t length;
uint16_t flags;
char country_code[3];
uint16_t social_channels;
struct ether_addr awdl_addr;
uint16_t ext_flags;
/* uint32_t logtrigger_id; if (ext_flags | 0x4) */
} attribute((packed));
Do you want to replace it with the DataPath format you sent?

from owl.

hualu123 avatar hualu123 commented on July 29, 2024

owl turned out to be like this:
struct awdl_data_path_state_tlv {
uint8_t type;
uint16_t length;
uint16_t flags;
char country_code[3];
uint16_t social_channels;
struct ether_addr awdl_addr;
uint16_t ext_flags;
/* uint32_t logtrigger_id; if (ext_flags | 0x4) */
} attribute((packed));
Do you want to replace it with the DataPath format you sent?

from owl.

Frostie314159 avatar Frostie314159 commented on July 29, 2024

Apply this patch two owl and it should work.

diff --git a/src/tx.c b/src/tx.c
index d72d7ff..a12b446 100644
--- a/src/tx.c
+++ b/src/tx.c
@@ -247,7 +247,7 @@ int awdl_init_data_path_state_tlv(uint8_t *buf, const struct awdl_state *state)
 	tlv->length = htole16(sizeof(struct awdl_data_path_state_tlv) - sizeof(struct tl));
 
 	/* TODO this is very ugly currently */
-	tlv->flags = htole16(0x8f24);
+	tlv->flags = htole16(0x8f64);
 
 	tlv->awdl_addr = state->self_address;
 

from owl.

Frostie314159 avatar Frostie314159 commented on July 29, 2024

I don't have my hardware on me right now to test it, so let me know if it works.

from owl.

Related Issues (20)

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.