Closed piyush2greedy closed 2 years ago
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
Thanks @louis49. Working on it.
@louis49 Should i convert the pairingmessage.proto and remotemessage.proto in JS files using protoc compiler and use for message passing.
@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.
@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.
For .proto files you can transform them in pure json : https://github.com/protobufjs/protobuf.js/#using-json-descriptors
@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
@louis49 Can u please help on above issue mentioned
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 ?
@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; };
To go more deep in that problem I need to observe it : can you publish your code ?
Yes Sure @louis49. U must have got the invite email. Can u please confirm? I have published the code there. Thanks Again @louis49
In the meantime, Any idea which part of the code should i look to get it fixed.
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?
Yes Sure @louis49. U must have got the invite email. Can u please confirm? I have published the code there. Thanks Again @louis49
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
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
I’m in UTC+1 but i’ve a real life too : let me fews days to analyze it
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.
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
Hey @louis49
Really need ur help. I want to integrate Android TV Remote in Android and IOS App using React Native. I have given all my energy to it. Can u please help me guide how to achieve the same.
Any sort of guidance from u would be helpful.