3

The pigpio GPIO library seems to provide a mechanism to invoke the pigpiod demon remotely using TCP/IP sockets. However, there appears to be some details missing. For example:

  • Do we use a TCP or UDP socket?
  • How do we terminate sending a command?
  • How do we know when the response is received/terminated?

Do we have any sample apps using native socket APIs either in C or Java?

Later ... Have started to reverse engineer code and it appears to be TCP sockets (AF_INET) ...

Kolban
  • 1,784
  • 2
  • 16
  • 28

1 Answers1

4

pigpio daemon

C I/F to pigpio daemon

Socket commands and responses

Examples of usage (in the download):

  • from Python is pigpio.py
  • from C is pigs.c
  • from C is pigpiod_if.c
  • using C I/F to daemon is x_pigpiod_if.c
joan
  • 71,024
  • 5
  • 73
  • 106
  • Thank you Joan. I had failed to find:

    http://abyz.co.uk/rpi/pigpio/sif.html

    – Kolban Apr 20 '15 at 11:47
  • 1
    @Kolban I sent an e-mail with the link. It may have got consumed by your spam system. – joan Apr 20 '15 at 12:23
  • Thanks my friend. Will be studying in great depth as soon as I can. My hope is to build a sample for calling pigpio natively from Java ... remotely ... using Sockets. If that test works, I'll look to provide a Java class that implements the pigpio APIs in 100% pure Java that then won't require any Linux libraries and can run anywhere that Java can run (eg. Windows, Mac, Android etc etc). When done ... and with agreement from the community, I'll donate for others to benefit. – Kolban Apr 20 '15 at 20:17