Socket program to send and receive GPS fix time

How can I implement a app that uses socket programming to send and receive GPS fix time.

Please guide me through this

have you tried the “gnss” command?

when you say socket program, do you want to send data through TCP to some server?
If so, you can send the related information by “nc” command through TCP connection

I am using mangOH red board and I want to communicate through it

have you tried the “gnss” command?

when you say socket program, do you want to send data through TCP to some server?

Yes in console I am able to get all the gnss commands

when you say socket program, do you want to send data through TCP to some server?

I want to make my laptop as a server and mangOH as a client

then you can send the GNSS data by “nc” command through USB ECM interface.

I want to send it through ip address

“nc” command sends data through ip address

I want to write client and server application using socket. So that my laptop will act as a server and mangoH as a client

You can see this application note for socket programming

https://source.sierrawireless.com/resources/airprime/application_notes_and_code_samples/airprime_wp_series_and_fx30_uart_to_tcp_app/

I have my client code in PC as my PC will act as client and server code in mangoH red board and that acts as server

Please help me what command should I run to make them communicate?

you can use this sample as reference:
UART_TCP_Server.rar (3.7 KB)

  1. Disable firewall by
    iptables -I INPUT -j ACCEPT
  2. Start the application by
    app runProc UART_TCP_Server UART_TCP_Server --exe=uart – 5044 /dev/ttyHSL0 115200
  3. Establish a TCP client connection from PC to 192.168.2.2 on port 5044
  4. Send some data from TCP client and they will be forwarded to module’s UART1
  5. Type some characters on UART1 of module, they will be sent to TCP client.
  6. To disconnect the TCP connection, you can send ”exit”.