mirror of https://github.com/drowe67/librtlsdr.git
UDP need to manually terminate the data transmission
parent
0281d088b3
commit
e892ab6a70
|
@ -43,7 +43,8 @@ enum RTL_TCP_COMMANDS {
|
||||||
SET_TUNER_GAIN_BY_INDEX = 0x0D,
|
SET_TUNER_GAIN_BY_INDEX = 0x0D,
|
||||||
SET_TUNER_BANDWIDTH = 0x0E,
|
SET_TUNER_BANDWIDTH = 0x0E,
|
||||||
SET_BIAS_TEE = 0x0F,
|
SET_BIAS_TEE = 0x0F,
|
||||||
UDP_ESTABLISH = 0x10
|
UDP_ESTABLISH = 0x10,
|
||||||
|
UDP_TERMINATE = 0x11
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -386,6 +386,11 @@ static void *command_worker(void *arg)
|
||||||
printf("setting bias-t to %d\n", ntohl(cmd.param));
|
printf("setting bias-t to %d\n", ntohl(cmd.param));
|
||||||
rtlsdr_set_bias_tee(dev, ntohl(cmd.param));
|
rtlsdr_set_bias_tee(dev, ntohl(cmd.param));
|
||||||
break;
|
break;
|
||||||
|
case UDP_TERMINATE:
|
||||||
|
printf("comm recv bye\n");
|
||||||
|
sighandler(0);
|
||||||
|
pthread_exit(NULL);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -688,7 +693,7 @@ int main(int argc, char **argv)
|
||||||
printf("Use the device argument 'rtl_tcp=%s:%d' in OsmoSDR "
|
printf("Use the device argument 'rtl_tcp=%s:%d' in OsmoSDR "
|
||||||
"(gr-osmosdr) source\n"
|
"(gr-osmosdr) source\n"
|
||||||
"to receive samples in GRC and control "
|
"to receive samples in GRC and control "
|
||||||
"rtl_tcp parameters (frequency, gain, ...).\n",
|
"rtl_udp parameters (frequency, gain, ...).\n",
|
||||||
addr, port);
|
addr, port);
|
||||||
|
|
||||||
while(1) {
|
while(1) {
|
||||||
|
|
Loading…
Reference in New Issue