Giter Club home page Giter Club logo

Comments (19)

louis49 avatar louis49 commented on August 15, 2024

First, you need to fork my work and adapt the socket layer with this package or an other that do the same things : https://www.npmjs.com/package/react-native-tcp-socket
Then, with this fork, adapt protobuf layer with this example : https://medium.com/@singhandresh09/using-protobuf-in-react-native-7cc8286389f5

from androidtv-remote.

piyush2greedy avatar piyush2greedy commented on August 15, 2024

Thanks @louis49. Working on it.

from androidtv-remote.

piyush2greedy avatar piyush2greedy commented on August 15, 2024

@louis49 Should i convert the pairingmessage.proto and remotemessage.proto in JS files using protoc compiler and use for message passing.

from androidtv-remote.

piyush2greedy avatar piyush2greedy commented on August 15, 2024

@louis49 Thanks. Was able to solve the .proto thing using google-protobuf.

I used the react-native-tcp-socket as suggested
Now i am stuck at TLS connection between client and server. Below is the screenshot attached.

Screen Shot 2022-01-29 at 5 12 02 PM

from androidtv-remote.

piyush2greedy avatar piyush2greedy commented on August 15, 2024

@louis49 The issue is that in PairingManager.js in this.client.on('data') function, the data coming is not satisfying thhe
if condition. this.chunks.length > 0 && this.chunks.readInt8(0) === this.chunks.length - 1.

Due to which Pairing code is not coming on TV

@louis49 Can u please help me solve the same.

from androidtv-remote.

louis49 avatar louis49 commented on August 15, 2024

For .proto files you can transform them in pure json : https://github.com/protobufjs/protobuf.js/#using-json-descriptors

from androidtv-remote.

piyush2greedy avatar piyush2greedy commented on August 15, 2024

@louis49 Proto thing is solved by transforming in pure json. The last thing in which i am stuck is

The issue is that in PairingManager.js in this.client.on('data') function, the data coming is not satisfying thhe
if condition. this.chunks.length > 0 && this.chunks.readInt8(0) === this.chunks.length - 1.

Due to which Pairing code is not coming on TV

@louis49 With ur guidance almost achieved the end goal. the above issue is creating a issue

from androidtv-remote.

piyush2greedy avatar piyush2greedy commented on August 15, 2024

@louis49 Can u please help on above issue mentioned

from androidtv-remote.

louis49 avatar louis49 commented on August 15, 2024

This line means that we are waiting enough data to analyze the received frame : the first byte say how many byte we are waiting.
What’s the size of the chunk you receive ?

from androidtv-remote.

piyush2greedy avatar piyush2greedy commented on August 15, 2024

@louis49
We just receive this much data {"data": [21, 3, 1, 0, 2, 2, 70], "type": "Buffer"} and after that no data. We only get this 7 bits of data.

No Idea why its happening. Can u please help

Want to share an observation.
After deeply analysing, I saw that object var options = { key: this.certs.key, cert: this.certs.cert, port: this.port, host: this.host, rejectUnauthorized: false, }

we pass in TcpSocket.createConnection is same as we pass in tls.connect.

Connection option in react-native-tcp-socket does not have key and cert .export ConnectionOptions = { port: number; host?: string | undefined; timeout?: number | undefined; localAddress?: string | undefined; localPort?: number | undefined; interface?: "wifi" | "cellular" | "ethernet" | undefined; reuseAddress?: boolean | undefined; tls?: boolean | undefined; tlsCheckValidity?: boolean | undefined; tlsCert?: any; };

from androidtv-remote.

louis49 avatar louis49 commented on August 15, 2024

To go more deep in that problem I need to observe it : can you publish your code ?

from androidtv-remote.

piyush2cloud avatar piyush2cloud commented on August 15, 2024

Yes Sure @louis49. U must have got the invite email. Can u please confirm? I have published the code there. Thanks Again @louis49

Github Repo Link

In the meantime, Any idea which part of the code should i look to get it fixed.

from androidtv-remote.

SodaSurfer avatar SodaSurfer commented on August 15, 2024

Hi @piyush2cloud I'm also trying to implement this on iOS if you want to team up on this or share some insights.
what's your email or Skype so I can contact you?

from androidtv-remote.

piyush2cloud avatar piyush2cloud commented on August 15, 2024

Hi @SodaSurfer

Sure. U can join me on below skype link.

https://join.skype.com/invite/w3bZKQNQ3GpY

from androidtv-remote.

piyush2cloud avatar piyush2cloud commented on August 15, 2024

Yes Sure @louis49. U must have got the invite email. Can u please confirm? I have published the code there. Thanks Again @louis49

Github Repo Link

In the meantime, Any idea which part of the code should i look to get it fixed.

@louis49 Can u also tell what timezone u r based of

from androidtv-remote.

piyush2cloud avatar piyush2cloud commented on August 15, 2024

Yes Sure @louis49. U must have got the invite email. Can u please confirm? I have published the code there. Thanks Again @louis49
Github Repo Link
In the meantime, Any idea which part of the code should i look to get it fixed.

@louis49 Can u also tell what timezone u r based of

@louis49 Did u got some bandwidth to check

from androidtv-remote.

louis49 avatar louis49 commented on August 15, 2024

I’m in UTC+1 but i’ve a real life too : let me fews days to analyze it

from androidtv-remote.

piyush2cloud avatar piyush2cloud commented on August 15, 2024

I’m in UTC+1 but i’ve a real life too : let me fews days to analyze it

Sorry @louis49. Actually i was stuck in it and ur inputs were really helpful.
I was really getting frustated on this part and with no option just messaged u. Sorry Again @louis49.

from androidtv-remote.

louis49 avatar louis49 commented on August 15, 2024

HI! I watched your code but I didn't succeeded to run it on my Mac M1 : cocoa pods config seems not well configured for it

from androidtv-remote.

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.