Live data from Hacker News

Show HN: WebRTC signalling data using QR codes

github.com

11–20 of 55 posts

Re: Show HN: WebRTC signalling data using QR codes

#14

Why does the QR code constantly change?

I wasn't able to get all the info into one QR code, so I used a series of them (looping) to send all the data. I figure I can use this approach to send files too.

What is the capacity of those QR codes?

When I played with WebRTC, I was able to pack the relevant SDP data to just 80 bytes:

- 1 Type of the SDP - Offer or Answer

- 1 Packet size in bytes (not including ECC bytes)

- 4 IP address of the transmitting peer

- 2 Network port that will be used for the communication

- 32 SHA-256 fingerprint of the session data

- 40 ICE Credentials - 16 bytes username + 24 bytes password

Re: Show HN: WebRTC signalling data using QR codes

#16
Similar project of mine that connects a phone to a PC browser using a WebRTC QR code so you can use a pen / touch on the phone to create drawings on the desktop:

https://www.youtube.com/watch?v=Gvsm84xL9Sk (https://github.com/phiresky/webrtc-remote-touch-pen-input)

Sadly it needs a (tiny) server component to exchange the initial connection information - using a QR code in both directions is smart, but also pretty annoying for the user.

Re: Show HN: WebRTC signalling data using QR codes

#17

Why does the QR code constantly change?

I wasn't able to get all the info into one QR code, so I used a series of them (looping) to send all the data. I figure I can use this approach to send files too.

> I figure I can use this approach to send files too.

Or, you could send the files over WebRTC datachannels after establishing the connection!

Re: Show HN: WebRTC signalling data using QR codes

#18
post #12

Will this work across NATs?

This is still WebRTC, so the same limitations apply. The QR codes are used to share the `signalling data` for the WebRTC connection.

More detail: Yes, WebRTC contains several methods for routing through NATs -- ICE, STUN by default (using your browser's default STUN server), optionally TURN.

Re: Show HN: WebRTC signalling data using QR codes

#19

Earlier quoted context omitted.

I wasn't able to get all the info into one QR code, so I used a series of them (looping) to send all the data. I figure I can use this approach to send files too.

What is the capacity of those QR codes? When I played with WebRTC, I was able to pack the relevant SDP data to just 80 bytes: - 1 Type of the SDP - Offer or Answer - 1 Packet size in bytes (not including ECC bytes) - 4 IP address of the transmitting peer - 2 Network port that will be used for the communication - 32 SHA-256 fingerprint of the session data - 40 ICE Credentials - 16 bytes username + 24 bytes password

I found a similar limit (although I still want to try with different options for the qr codes). I send the data as is by splitting it into smaller segments and looping through them with more than one qr code.
Post reply on HN