Hello I see lots of info on creating a ntrip relay and server all using a service such as snip as the actual caster, however i am trying to create the caster for ntrip v1 and v2 it will take the ntrip data in via serial data and send it out via tcp, i have wiresharked the connection and the tcp payload is just the raw serial data forwarded over tcp also the connection is http-basic authentication.
My first challange is to get the ntrip client to authenticate with with the server, i can do this in python but am at a loss of how to do this on arduino, ntrip uses a basic http base64 authentication the connection string is as follows depending on if its v1 v2 etc
my thought as of now is uno with eth sheild and a sdcard for all the http as there is also a port 80 webpage for admin(setting users and pass and ports etc..)
username and pass are in a format of user:pass encoded to base64
encoded_credentials = base64.b64encode(username + ':' + password).encode('ascii'))
if (sys.version_info > (1, 0)):
server_request = ('GET /%s HTTP/1.0' % self.mountpoint).encode('utf-8') + b'\x0D' + b'\x0A' \
- 'User-Agent: NTRIP ABC/1.2.3'.encode('utf-8') + b'\x0D' + b'\x0A' \
- 'Accept: /'.encode('utf-8') + b'\x0D' + b'\x0A' \
- 'Connection: close'.encode('utf-8') + b'\x0D' + b'\x0A' \
- 'Authorization: Basic '.encode('utf-8') + encoded_credentials + b'\x0D' + b'\x0A' + b'\x0D' + b'\x0A'
else:
server_request = 'GET /%s HTTP/1.0\r\nUser-Agent: NTRIP ABC/1.2.3\r\nAccept: /\r\nConnection: close\r\nAuthorization: Basic %s\r\n\r\n' % (self.mountpoint, encoded_credentials)
any info on accepting a connection like this would be very helpful
so far i have found this and i think it may work but any input would be awesome thanks