pppd

How do we refer to etc package from NixOS configuration?

前提是你 提交于 2019-12-11 07:13:11
问题 I want to get a path, which leads to nixos /etc location (any one of /run/current-system/etc or /nix/store/hashhere-etc-1.0 ). I use this path to configure pppd connect script, some kind of the following, environment.etc."huawei" = { text = '' /dev/ttyUSB0 38400 lock crtscts nodetach noipdefault # Below here what I've struggled connect ${pkgs.etc}/${environment.etc."huawei-script".target} ''; mode = "0777"; target = "ppp/peers/huawei"; }; I have tried to write ${pkgs.etc} or ${system.build

Sending AT commands to SIM900 whilst pppd is active

白昼怎懂夜的黑 提交于 2019-12-01 04:40:02
I have a Raspberry Pi with a SIM900 GSM add-on board connected. I have managed to establish a GPRS connection with pppd by following this guide . (It's for a different GSM module but the steps are the same) I would like to periodically send an AT command ( AT+CCLK? ) to the SIM900 to check the clock. I have managed send ad hoc AT commands using screen but when pppd is up I can't use screen to connect to the serial line. It just exits straight away saying [screen is terminating] . I'm guessing this is because pppd is using it to connect to the internet. Q: How do I get the clock time without

Sending AT commands to SIM900 whilst pppd is active

穿精又带淫゛_ 提交于 2019-12-01 02:33:39
问题 I have a Raspberry Pi with a SIM900 GSM add-on board connected. I have managed to establish a GPRS connection with pppd by following this guide. (It's for a different GSM module but the steps are the same) I would like to periodically send an AT command ( AT+CCLK? ) to the SIM900 to check the clock. I have managed send ad hoc AT commands using screen but when pppd is up I can't use screen to connect to the serial line. It just exits straight away saying [screen is terminating] . I'm guessing

Process started from system command in C inherits parent fd's

馋奶兔 提交于 2019-11-28 09:14:19
I have a sample application of a SIP server listening on both tcp and udp ports 5060. At some point in the code, I do a system("pppd file /etc/ppp/myoptions &"); After this if I do a netstat -apn, It shows me that ports 5060 are also opened for pppd! Is there any method to avoid this? Is this standard behaviour of the system function in Linux? Thanks, Elison Yes, by default whenever you fork a process (which system does), the child inherits all the parent's file descriptors. If the child doesn't need those descriptors, it SHOULD close them. The way to do this with system (or any other method

Process started from system command in C inherits parent fd's

允我心安 提交于 2019-11-27 02:46:58
问题 I have a sample application of a SIP server listening on both tcp and udp ports 5060. At some point in the code, I do a system("pppd file /etc/ppp/myoptions &"); After this if I do a netstat -apn, It shows me that ports 5060 are also opened for pppd! Is there any method to avoid this? Is this standard behaviour of the system function in Linux? Thanks, Elison 回答1: Yes, by default whenever you fork a process (which system does), the child inherits all the parent's file descriptors. If the child