This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Er Rest Example Settings for cc2650 platform

Other Parts Discussed in Thread: CC2531, CC2650

I am working on cc2650 and cc2531 dongle and I have already installed 6lbr. And on 6lbr I see one connected sensor. Now I need to check security for CoAP and I need to implement a simple example. I want to work on Er-REST example and I have some questions regarding to deployment.

1)Do I have to also use Cooja? I am using the native-border-router together with the slip-radio. So which settings should I have done to be able to deploy the example?

There are how to's for other platforms but not slip radio and cc2650.

Is there anyone who worked on or do you have any suggestions?

Thanks in advance...

  • I am trying to go on with the instructions on github for other platforms. I tried to run "sudo make TARGET=srf06-cc26xx er-plugtest-server" and I receive errors during compilation. But there are some fields added under er-rest example:
    user@instant-contiki:~/contiki-3.0/contiki/examples/er-rest-example$ ll
    total 956
    drwxr-xr-x 4 root root 4096 May 4 20:30 ./
    drwxr-xr-x 52 root root 4096 Apr 6 17:27 ../
    -rw-r--r-- 1 root root 526188 May 4 20:30 contiki-srf06-cc26xx.a
    -rw-r--r-- 1 root root 5710 Apr 6 17:25 er-example-client.c
    -rw-r--r-- 1 root root 6731 Apr 6 17:25 er-example-observe-client.c
    -rw-r--r-- 1 root root 6259 Apr 6 17:25 er-example-server.c
    -rw-r--r-- 1 root root 3022 Apr 6 17:25 er-plugtest.h
    -rw-r--r-- 1 root root 4618 Apr 6 17:25 er-plugtest-server.c
    -rw-r--r-- 1 root root 323557 May 4 20:30 er-plugtest-server-srf06-cc26xx.map
    -rw-r--r-- 1 root root 156 Apr 6 17:25 in6addr.patch
    -rw-r--r-- 1 root root 2005 Apr 6 17:27 Makefile
    drwxr-xr-x 2 root root 12288 May 4 20:30 obj_srf06-cc26xx/
    -rw-r--r-- 1 root root 3574 Apr 6 17:25 project-conf.h
    -rw-r--r-- 1 root root 4575 Apr 6 17:27 README.md
    drwxr-xr-x 2 root root 4096 Apr 6 17:27 resources/
    -rw-r--r-- 1 root root 10258 Apr 6 17:27 server-client.csc
    -rw-r--r-- 1 root root 10246 Apr 6 17:27 server-client-native.csc
    -rw-r--r-- 1 root root 9371 Apr 6 17:25 server-client-observe.csc
    -rw-r--r-- 1 root root 8064 Apr 6 17:27 server-only.csc


    And I tried "sudo make TARGET=srf06-cc26xx BOARD=sensortag/cc2650 contiki-srf06-cc26xx.a CPU_FAMILY=cc26xx"

    user@instant-contiki:~/contiki-3.0/contiki/examples/er-rest-example$ sudo make TARGET=srf06-cc26xx BOARD=sensortag/cc2650 contiki-srf06-cc26xx.a CPU_FAMILY=cc26xx
    [sudo] password for user:
    CC ../../platform/srf06-cc26xx/sensortag/sensortag-sensors.c
    CC ../../platform/srf06-cc26xx/sensortag/sensor-common.c
    CC ../../platform/srf06-cc26xx/sensortag/bmp-280-sensor.c
    CC ../../platform/srf06-cc26xx/sensortag/tmp-007-sensor.c
    CC ../../platform/srf06-cc26xx/sensortag/opt-3001-sensor.c
    CC ../../platform/srf06-cc26xx/sensortag/hdc-1000-sensor.c
    CC ../../platform/srf06-cc26xx/sensortag/mpu-9250-sensor.c
    CC ../../platform/srf06-cc26xx/sensortag/reed-relay.c
    CC ../../platform/srf06-cc26xx/sensortag/ext-flash.c
    CC ../../platform/srf06-cc26xx/sensortag/buzzer.c
    CC ../../platform/srf06-cc26xx/sensortag/board-spi.c
    CC ../../platform/srf06-cc26xx/sensortag/board-i2c.c
    CC ../../cpu/cc26xx-cc13xx/./ieee-addr.c
    AR contiki-srf06-cc26xx.a


    but when I run "make clean" I receive an error: user@instant-contiki:~/contiki-3.0/contiki/examples/er-rest-example$ sudo make clean
    TARGET not defined, using target 'native'
    rm -f *~ *core core *.srec \
    *.lst *.map \
    *.cprg *.bin *.data contiki*.a *.firmware core-labels.S *.ihex *.ini \
    *.ce *.co
    rm -rf
    rm -rf obj_native


    Could you please help me for this matter?

    Thanks in advance...
  • Do you have any suggestion?
  • I tried to build er-test example but I cannot make it too. I would suggest you to post an issue on Contiki Github to see if experts there can help you.
  • I post an issue on Contiki github (github.com/.../1655). Have to wait someone to help.
  • The er-rest-example can be build with InstantContiki on VMPlayer. I suggest you use InstantContiki on VMPlayer to build the example.
  • Hi Thanks for that, I am already using VM Player but I could not fine any instructions to build the example so when I try "make target" I receive errors above.

    Is there any sollution or build steps for that? 

  • I run the following build command.

    make TARGET=srf06-cc26xx BOARD=srf06/cc26xx er-example-server.bin
  • thanks that works!

    But I tried the same command for client example and I received
    user@instant-contiki:~/contiki-3.0/examples/er-rest-example$ sudo make TARGET=srf06-cc26xx BOARD=srf06/cc26xx er-example-client.bin
    fatal: Not a git repository: '../../.git'
    make: *** No rule to make target `er-example-client.bin'. Stop.

    its same for server-client.bin file.

    I can implement get and post now, I also want to run put method so if there is another example please let me know.
  • Do you git to latest Contiki version?
  • yes I am using contiki 3.0 if you mean that.
  • I run out of idea. Maybe try to remove your current Contiki pull and git a fresh new one to test again.
  • I could run the command and created bin field. I flashed cc2650 with the created file. But on copper I received errors below;

     Can't I run the client example on the sensortag?

  • I think it's no problem to run client example on CC2650 SensorTag. By the way, why can you suddenly build binary successful?
  • well I was trying to built it here : user@instant-contiki:~/contiki-3.0/examples/er-rest-example$
    but I built all others here and when I tried it worked : user@instant-contiki:~/contiki-3.0/contiki/examples/er-rest-example$

    I am not able to build anything under contiki-3.0 but under contiki which I have done 'git clone --recursive github.com/.../contiki' for the cc26xx-web-demo.

    So, what am I doing wrong ?,
    I run the command 'sudo make TARGET=srf06-cc26xx BOARD=srf06/cc26xx er-example-client.bin'
    and it worked and then I flashed the bin file to the sensortag. But can not implement on copper.

    Do you have any advice? Or how can I try the server-client.csc to built server-client example?

  • You can use the following command to build binary for CC2650 SensorTag.

    make TARGET=srf06-cc26xx BOARD=sensortag/cc2650 er-example-client.bin
  • I created the a bin file with your command and flashed to sensortag but the result is same as screenshots.
  • Do you run cc2650 er-example-server.bin on your CC2650 or cc2650 er-example-client.bin?
  • First I tried server example on cc2650, get method was working  but not put method, I tried put with toggle.

    And then I flashed client bin file on cc2650 so that did not work at all.The print screens are running client examples.

    Do I need to flash second sensortag as server to be able to try it ?

  • When you use copper plugin on Firefox, you should run er-test-server on CC2650. However, I don't know why PUT doesn't work.