Navigation

    • Register
    • Login
    • OpenHardware.io
    • Categories
    • Recent
    • Tags
    • Popular
    1. Home
    2. Jasper van Zuijlen
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Jasper van Zuijlen

    @Jasper van Zuijlen

    3
    Reputation
    4
    Posts
    296
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    Jasper van Zuijlen Follow

    Best posts made by Jasper van Zuijlen

    • RE: Cross compile mysensors gateway

      As promised, what I found so far: the following dockerfile yeilds a usable cross-compile environment, provided you use it with a Makefile.

      FROM ubuntu:xenial
      
      RUN apt-get update \
          && apt-get install --yes \
            vim \
            build-essential \
            git
      
      RUN git clone https://github.com/raspberrypi/tools
      
      RUN git clone https://gist.github.com/3873805.git /build
      
      WORKDIR "/build"
      
      CMD ["/usr/bin/make", "CC=/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-gcc"
      , "HelloWorld"]
      
      
      # Seems I need a real makefile for the above to work.
      

      For cross compiling mysensors to work, hoever, you also need to properly seed the variable in configure, for it to work correctly. This is where I left off.

      Sources:
      https://stackoverflow.com/questions/18007326/how-to-change-default-values-of-variables-like-cc-in-makefile
      https://bitbucket.org/mitchallen/pi-hello-cross-compile/src/master/
      https://desertbot.io/blog/how-to-cross-compile-for-raspberry-pi
      https://github.com/mitchallen/pi-cross-compile/blob/master/Dockerfile
      https://github.com/mysensors/MySensors/blob/development/configure
      https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/arm-bcm2708-linux-gnueabi/bin
      https://www.raspberrypi.org/documentation/linux/kernel/building.md
      https://www.mysensors.org/build/raspberry

      posted in General Discussion
      Jasper van Zuijlen
      Jasper van Zuijlen
    • RE: Cross compile mysensors gateway

      @monte yeah, it does only take that long. I think I got sidetracked a bit 😅 I usually set up my pi by Ansible, but it's very slow. I was thinking about ways to speed that up.

      Maybe get my project working first before I dive into this. I'll post what I have so far shortly should anyone be interesed.

      Thanks for screwing my head on straight again 😁

      posted in General Discussion
      Jasper van Zuijlen
      Jasper van Zuijlen

    Latest posts made by Jasper van Zuijlen

    • RE: Cross compile mysensors gateway

      As promised, what I found so far: the following dockerfile yeilds a usable cross-compile environment, provided you use it with a Makefile.

      FROM ubuntu:xenial
      
      RUN apt-get update \
          && apt-get install --yes \
            vim \
            build-essential \
            git
      
      RUN git clone https://github.com/raspberrypi/tools
      
      RUN git clone https://gist.github.com/3873805.git /build
      
      WORKDIR "/build"
      
      CMD ["/usr/bin/make", "CC=/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-gcc"
      , "HelloWorld"]
      
      
      # Seems I need a real makefile for the above to work.
      

      For cross compiling mysensors to work, hoever, you also need to properly seed the variable in configure, for it to work correctly. This is where I left off.

      Sources:
      https://stackoverflow.com/questions/18007326/how-to-change-default-values-of-variables-like-cc-in-makefile
      https://bitbucket.org/mitchallen/pi-hello-cross-compile/src/master/
      https://desertbot.io/blog/how-to-cross-compile-for-raspberry-pi
      https://github.com/mitchallen/pi-cross-compile/blob/master/Dockerfile
      https://github.com/mysensors/MySensors/blob/development/configure
      https://github.com/raspberrypi/tools/tree/master/arm-bcm2708/arm-bcm2708-linux-gnueabi/bin
      https://www.raspberrypi.org/documentation/linux/kernel/building.md
      https://www.mysensors.org/build/raspberry

      posted in General Discussion
      Jasper van Zuijlen
      Jasper van Zuijlen
    • RE: Cross compile mysensors gateway

      @monte yeah, it does only take that long. I think I got sidetracked a bit 😅 I usually set up my pi by Ansible, but it's very slow. I was thinking about ways to speed that up.

      Maybe get my project working first before I dive into this. I'll post what I have so far shortly should anyone be interesed.

      Thanks for screwing my head on straight again 😁

      posted in General Discussion
      Jasper van Zuijlen
      Jasper van Zuijlen
    • Cross compile mysensors gateway

      Hi!

      I'm about to attempt to cross compile a gateway for Arm (raspi 1 b+) on Ubuntu. Has anymore tried that before (I could't find any posts related)? Would it be interesting to document this here as well?

      posted in General Discussion
      Jasper van Zuijlen
      Jasper van Zuijlen
    • RE: How to receive data on openhab using UDP ? (solved)

      I had the same issue and found this post quite fast but although it says "(solved)" I found no solution. I am leaving my reply here for future reference.

      What I did to fix the "It will be discarded" message:

      [openhab.cfg]

      This sets up the receiving end of the binding i.e. the server that binds the 5005 port.

      udp:port=5005
      

      [default.items]

      This sets up the openhab binding to the string. Notice the asterisk after the IP address; because the client will connect to the server it will get assigned a random free port. The asterisk will catch all ports a client will get solving the "No channel is active or defined issue".

      String 	String_FF_Bath_Test 	"Test String[%s]" 	 {udp="<[127.0.0.1:\*:'REGEX((.\*))']"}
      

      [python]

      Just some test code to easily send a UDP message to openhab.

      import socket
      UDP_IP = "127.0.0.1"
      UDP_PORT = 5005
      MESSAGE = "Hello world!"
      
      print "UDP target IP:", UDP_IP
      print "UDP target port:", UDP_PORT
      print "message:", MESSAGE
      
      sock = socket.socket(socket.AF_INET, # Internet
                       socket.SOCK_DGRAM) # UDP
      sock.sendto(MESSAGE, (UDP_IP, UDP_PORT))
      posted in Troubleshooting
      Jasper van Zuijlen
      Jasper van Zuijlen