title: wiringPi is not working on 4th version of raspberry
body: <p>I have an RPi4.</p>
  
  <p>Based on this <a href="http://wiringpi.com/wiringpi-updated-to-2-52-for-the-raspberry-pi-4b/" rel="nofollow noreferrer">link</a> I need to have a version 2.52 of gpio to work properly on this device.</p>
  
  <p>I have done this:</p>
  
  <pre><code># cd /tmp
  # wget https://project-downloads.drogon.net/wiringpi-latest.deb
  # sudo dpkg -i wiringpi-latest.deb
  # gpio -v
    gpio version: 2.46
  </code></pre>
  
  <p>Also, writing to GPIO is not working, all ports are logic 1 after booting.</p>
  
  <p>And git.drogon.net is unavailable.</p>
  
  <p>What can I do now if I need to compile a software which relies on this library..?</p>
  
  <h2>UPDATE</h2>
  
  <p>I have cloned <a href="https://github.com/WiringPi/WiringPi" rel="nofollow noreferrer">this</a> repository as stevieb recommended.
  It also has a <a href="https://github.com/WiringPi/WiringPi/pull/65/commits/cd8e37719f479eb10be0265e7db16365ed8d2437" rel="nofollow noreferrer">pull</a> request for supporting PI4 boards.</p>
  
  <p>However even after applying that patch I'm not able to control the output pins of the PI4:</p>
  
  <p>First get the current states of the pins:</p>
  
  <pre><code># gpio readall
   +-----+-----+---------+------+---+---Pi 4+--+---+------+---------+-----+-----+
   | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
   +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
   |     |     |    3.3v |      |   |  1 || 2  |   |      | 5v      |     |     |
   |   2 |   8 |   SDA.1 |   IN | 1 |  3 || 4  |   |      | 5v      |     |     |
   |   3 |   9 |   SCL.1 |   IN | 1 |  5 || 6  |   |      | 0v      |     |     |
   |   4 |   7 | GPIO. 7 |   IN | 1 |  7 || 8  | 1 | IN   | TxD     | 15  | 14  |
   |     |     |      0v |      |   |  9 || 10 | 1 | IN   | RxD     | 16  | 15  |
   |  17 |   0 | GPIO. 0 |   IN | 1 | 11 || 12 | 1 | IN   | GPIO. 1 | 1   | 18  |
   |  27 |   2 | GPIO. 2 |   IN | 1 | 13 || 14 |   |      | 0v      |     |     |
   |  22 |   3 | GPIO. 3 |   IN | 1 | 15 || 16 | 1 | IN   | GPIO. 4 | 4   | 23  |
   |     |     |    3.3v |      |   | 17 || 18 | 1 | ALT0 | GPIO. 5 | 5   | 24  |
   |  10 |  12 |    MOSI |   IN | 1 | 19 || 20 |   |      | 0v      |     |     |
   |   9 |  13 |    MISO |   IN | 1 | 21 || 22 | 1 | IN   | GPIO. 6 | 6   | 25  |
   |  11 |  14 |    SCLK |   IN | 1 | 23 || 24 | 1 | ALT4 | CE0     | 10  | 8   |
   |     |     |      0v |      |   | 25 || 26 | 1 | IN   | CE1     | 11  | 7   |
   |   0 |  30 |   SDA.0 |   IN | 1 | 27 || 28 | 1 | IN   | SCL.0   | 31  | 1   |
   |   5 |  21 | GPIO.21 |   IN | 1 | 29 || 30 |   |      | 0v      |     |     |
   |   6 |  22 | GPIO.22 |   IN | 1 | 31 || 32 | 1 | ALT5 | GPIO.26 | 26  | 12  |
   |  13 |  23 | GPIO.23 |   IN | 1 | 33 || 34 |   |      | 0v      |     |     |
   |  19 |  24 | GPIO.24 |   IN | 1 | 35 || 36 | 1 | IN   | GPIO.27 | 27  | 16  |
   |  26 |  25 | GPIO.25 |   IN | 1 | 37 || 38 | 1 | IN   | GPIO.28 | 28  | 20  |
   |     |     |      0v |      |   | 39 || 40 | 1 | IN   | GPIO.29 | 29  | 21  |
   +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
   | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
   +-----+-----+---------+------+---+---Pi 4+--+---+------+---------+-----+-----+
  </code></pre>
  
  <p>Then set pin7 to output and check the result:</p>
  
  <pre><code># gpio mode 7 out
  # gpio readall
   +-----+-----+---------+------+---+---Pi 4+--+---+------+---------+-----+-----+
   | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
   +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
   |     |     |    3.3v |      |   |  1 || 2  |   |      | 5v      |     |     |
   |   2 |   8 |   SDA.1 |   IN | 1 |  3 || 4  |   |      | 5v      |     |     |
   |   3 |   9 |   SCL.1 |   IN | 1 |  5 || 6  |   |      | 0v      |     |     |
   |   4 |   7 | GPIO. 7 |  OUT | 1 |  7 || 8  | 1 | IN   | TxD     | 15  | 14  |
   |     |     |      0v |      |   |  9 || 10 | 1 | IN   | RxD     | 16  | 15  |
   |  17 |   0 | GPIO. 0 |   IN | 1 | 11 || 12 | 1 | IN   | GPIO. 1 | 1   | 18  |
   |  27 |   2 | GPIO. 2 |   IN | 1 | 13 || 14 |   |      | 0v      |     |     |
   |  22 |   3 | GPIO. 3 |   IN | 1 | 15 || 16 | 1 | IN   | GPIO. 4 | 4   | 23  |
   |     |     |    3.3v |      |   | 17 || 18 | 1 | ALT0 | GPIO. 5 | 5   | 24  |
   |  10 |  12 |    MOSI |   IN | 1 | 19 || 20 |   |      | 0v      |     |     |
   |   9 |  13 |    MISO |   IN | 1 | 21 || 22 | 1 | IN   | GPIO. 6 | 6   | 25  |
   |  11 |  14 |    SCLK |   IN | 1 | 23 || 24 | 1 | ALT4 | CE0     | 10  | 8   |
   |     |     |      0v |      |   | 25 || 26 | 1 | IN   | CE1     | 11  | 7   |
   |   0 |  30 |   SDA.0 |   IN | 1 | 27 || 28 | 1 | IN   | SCL.0   | 31  | 1   |
   |   5 |  21 | GPIO.21 |   IN | 1 | 29 || 30 |   |      | 0v      |     |     |
   |   6 |  22 | GPIO.22 |   IN | 1 | 31 || 32 | 1 | ALT5 | GPIO.26 | 26  | 12  |
   |  13 |  23 | GPIO.23 |   IN | 1 | 33 || 34 |   |      | 0v      |     |     |
   |  19 |  24 | GPIO.24 |   IN | 1 | 35 || 36 | 1 | IN   | GPIO.27 | 27  | 16  |
   |  26 |  25 | GPIO.25 |   IN | 1 | 37 || 38 | 1 | IN   | GPIO.28 | 28  | 20  |
   |     |     |      0v |      |   | 39 || 40 | 1 | IN   | GPIO.29 | 29  | 21  |
   +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
   | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
   +-----+-----+---------+------+---+---Pi 4+--+---+------+---------+-----+-----+
  </code></pre>
  
  <p>Then write 0 to pin7 and check the result:</p>
  
  <pre><code># gpio write 7 0
  # gpio readall
   +-----+-----+---------+------+---+---Pi 4+--+---+------+---------+-----+-----+
   | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
   +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
   |     |     |    3.3v |      |   |  1 || 2  |   |      | 5v      |     |     |
   |   2 |   8 |   SDA.1 |   IN | 1 |  3 || 4  |   |      | 5v      |     |     |
   |   3 |   9 |   SCL.1 |   IN | 1 |  5 || 6  |   |      | 0v      |     |     |
   |   4 |   7 | GPIO. 7 |  OUT | 1 |  7 || 8  | 1 | IN   | TxD     | 15  | 14  |
   |     |     |      0v |      |   |  9 || 10 | 1 | IN   | RxD     | 16  | 15  |
   |  17 |   0 | GPIO. 0 |   IN | 1 | 11 || 12 | 1 | IN   | GPIO. 1 | 1   | 18  |
   |  27 |   2 | GPIO. 2 |   IN | 1 | 13 || 14 |   |      | 0v      |     |     |
   |  22 |   3 | GPIO. 3 |   IN | 1 | 15 || 16 | 1 | IN   | GPIO. 4 | 4   | 23  |
   |     |     |    3.3v |      |   | 17 || 18 | 1 | ALT0 | GPIO. 5 | 5   | 24  |
   |  10 |  12 |    MOSI |   IN | 1 | 19 || 20 |   |      | 0v      |     |     |
   |   9 |  13 |    MISO |   IN | 1 | 21 || 22 | 1 | IN   | GPIO. 6 | 6   | 25  |
   |  11 |  14 |    SCLK |   IN | 1 | 23 || 24 | 1 | ALT4 | CE0     | 10  | 8   |
   |     |     |      0v |      |   | 25 || 26 | 1 | IN   | CE1     | 11  | 7   |
   |   0 |  30 |   SDA.0 |   IN | 1 | 27 || 28 | 1 | IN   | SCL.0   | 31  | 1   |
   |   5 |  21 | GPIO.21 |   IN | 1 | 29 || 30 |   |      | 0v      |     |     |
   |   6 |  22 | GPIO.22 |   IN | 1 | 31 || 32 | 1 | ALT5 | GPIO.26 | 26  | 12  |
   |  13 |  23 | GPIO.23 |   IN | 1 | 33 || 34 |   |      | 0v      |     |     |
   |  19 |  24 | GPIO.24 |   IN | 1 | 35 || 36 | 1 | IN   | GPIO.27 | 27  | 16  |
   |  26 |  25 | GPIO.25 |   IN | 1 | 37 || 38 | 1 | IN   | GPIO.28 | 28  | 20  |
   |     |     |      0v |      |   | 39 || 40 | 1 | IN   | GPIO.29 | 29  | 21  |
   +-----+-----+---------+------+---+----++----+---+------+---------+-----+-----+
   | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
   +-----+-----+---------+------+---+---Pi 4+--+---+------+---------+-----+-----+
  </code></pre>
  
  <p>As you can see every pin is at logic state 1. Measuring it with a voltage meter also confirms this.
  Does anyone has any idea on how can I modify the wiringPi library to be able to set the output values correctly?</p>
  
  <p>Thanks</p>