[fpc-pascal] How to send operating system commands (Linux on RPi)?

Bo Berglund bo.berglund at gmail.com
Sat Jul 2 01:12:34 CEST 2016

I need to include the ability to switch on and off the WiFi network
connection of a Raspberry Pi3 running Raspbian Jessie into my
FreePascal program.

The commands I am looking at now are:
sudo ifup wlan0
sudo ifdown wlan0

How could this be accomplished in a FreePascal program running as user

The Pi will be multihomed (there is an Ethernet network connection in
addition to the WiFi) and it has been preconfigured to connect to a
specific SSID in the conf file for WiFi.

I want my program to be able to switch on the device hosting the WiFi
Access Point using relays (already done), then command the RPi to
connect to the now active Access Point immediately.
Time is of importance here and with just switching on the WiFi device
I get connection delays varying from 20 seconds to several minutes.

So it seems like a specific command to tell the operating system to
connect to WiFi is needed....

Bo Berglund
Developer in Sweden

More information about the fpc-pascal mailing list