MIPS (Linux)

 

You can find this architecture in many routers OpenWRT equipped.

The reference packet for these devices is snap7-iot-mips

The tests were made with:

Descrizione: Descrizione: Descrizione: H:\img\yun.jpg

Arduino YUN

 

 

Build Snap7

Linux (not OpenWrt)

Go to build/unix and execute sudo make –f mips_linux.mk install

 

Linux OpenWRT (tested with YUN)

OpenWRT crosscompile

Thanks to Fulvio Bosco and Stefano for this procedure.

1.        Install OpenWRT buildroot (Successfully Tested in Debian Wheezy 32 bit architecture) following this :

http://wiki.openwrt.org/doc/howto/buildroot.exigence

2.     Build Snap7.

o   Unpack snap7-iot-mips-x.y.z into your /home/<user> folder, where <user> is the user logged name.

o   Go to build/unix and run make –f mips_linux.mk all ToolPath=/home/<user>/openwrt/staging_dir/

o   Copy libsnap7.so from /build/bin/mips-linux into your target hardware in /usr/lib

 

 Programming

This procedure was tested on ARDUINO YUN board

To compile c snap7 examples directly on the Yun platform, expand yun disc with procedure described here:

http://arduino.cc/en/Tutorial/ExpandingYunDiskSpace

and follow this

http://playground.arduino.cc/Hardware/Yun#Compiling_on_the_Yun

You can compile client.c under your yun with:

gcc -Wall -o client client.c -lm -lpthread -ldl ./libsnap7.so