[riot-devel] RIOT-OS/RIOT/examples vs RIOT-OS/applications
Hi everyone, I was about to add a PR for a RIOT application (a client for i2ot, a gateway to connect sensor boards with cloud services), but I'm not sure which repository I should add it to. There's of course RIOT-OS/RIOT/examples which shows you how to add shell commands, do basic networking etc., and I think it's a very good idea to ship this with the RIOT OS source code. Then there's RIOT-OS/application, which contains a sniffer, some openwsn stuff, and a microcoap example. Imho specific purpose applications should go in the latter, and general purpose stuff (such as the gnrc_networking example) should go in the former. Is there a policy/rule/wiki entry that distinguishes the purposes of the two? The reason I'm asking is that for a few weeks now, both repos contain a CoAP server based in the microcoap library. Both are pretty generic, so you could argue that it should go in RIOT-OS/RIOT/examples, but do we really want examples of every library RIOT supports in that folder? My application, the i2ot client, is of course rather specific, so I think it should go in RIOT-OS/applications. But because of the current situation, I decided to ask and perhaps resolve this matter for future PRs. Best, Lennart Links: https://github.com/RIOT-OS/RIOT/tree/master/examples https://github.com/RIOT-OS/applications https://github.com/i2ot ___ devel mailing list devel@riot-os.org https://lists.riot-os.org/mailman/listinfo/devel
Re: [riot-devel] CoAP
Hi Ilias, > To use CoAP in my R21 boards should I rite the code of socket > programming (open a udp port ,etc) or just use the coap library and it > takes care about the socket? all the microcoap library does is create and parse payloads (CoAP packets), and it let's you register callback functions for each URI. You have to handle all the networking stuff, i.e. sending and receiving UDP packets, yourself. I'm currently working on the mostly absent documentation of microcoap, you can find it in this fork: https://github.com/i2ot/microcoap It's not finished yet, but it might help you. For the networking stuff on RIOT OS, check out https://github.com/RIOT-OS/RIOT/tree/master/examples/gnrc_networking and https://github.com/RIOT-OS/RIOT/tree/master/examples/posix_sockets if you haven't already done so. The example code Baptiste pointed you to is indeed out of date, but the CoAP parts in it are still correct and should work, so you'd just have to change the socket calls etc. Regarding libcoap: It's a *lot* more code than microcoap, and yes, it does all the socket stuff for you. But its documentation, too, is pretty much nonexistent. Also, you'd probably have to port it to RIOT first, so I suggest you use microcoap for devices that will run RIOT OS. If you run into problems with microcoap, feel free to send me an e-mail. Best, Lennart ___ devel mailing list devel@riot-os.org https://lists.riot-os.org/mailman/listinfo/devel
Re: [riot-devel] Configure Raspberry Pi as 802.15.4/6LoWPAN Border Gateway
Hi, Why don't you host those kernels (zImages for Rpi 1 and Rpi 2) on github or something similar so that ppl can use them to build the same gateway without having to compile it on their own. Just a suggestion. :-) great idea, I'll do that and also add a PR to update the tutorial. Btw, I just realized I forgot one important step that needs to be changed to work with the RPi 2 Model B: After copying all the files and the kernel to the SD card, open /media/myusername/boot/config.txt (as described), but append device_tree=bcm2709-rpi-2-b.dtb device_tree_address=0x100 Anyway, I'll do this right within the next few days and add it to github, so stay tuned. Best, Lennart ___ devel mailing list devel@riot-os.org https://lists.riot-os.org/mailman/listinfo/devel
Re: [riot-devel] Configure Raspberry Pi as 802.15.4/6LoWPAN Border Gateway
Hi everyone, to build the kernel for a RPi 2 Model B, you have to do only a few things differently: First, before invoking any make command, set the environment variable KERNEL to kernel7, i.e. KERNEL=kernel7 When cloning the git repo with the kernel sources, use git clone --depth=1 https://github.com/raspberrypi/linux linux-rpi This creates a shallow clone, leaving out most of the history, which you don't need anyway. It takes considerably less time. When making the initial config, replace bcm2835_defconfig with bcm2709_defconfig, i.e. make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig Instead of arch/arm/boot/dts/bcm2835-rpi-b.dts, edit arch/arm/boot/dts/bcm2709-rpi-2-b.dts, but append the same text. Finally, when copying the new kernel to the SD card, I recommend to keep the old kernel, and give the new one a distinct name, e.g. sudo scripts/mkknlimg arch/arm/boot/zImage /media/myusername/boot/super-fresh-kernel.img and then open /boot/config.txt and add kernel=super-fresh-kernel.img. That way you still have a backup kernel you can use in case something goes wrong, and you don't have to install raspbian from scratch again. All the steps I did not mention explicitly stay the same. Happy hacking, Lennart ___ devel mailing list devel@riot-os.org https://lists.riot-os.org/mailman/listinfo/devel
Re: [riot-devel] Configure Raspberry Pi as 802.15.4/6LoWPAN Border Gateway
Hi, Oh I see. I think kernel compilation steps differs slightly for RPi 2. Follow this link: https://www.raspberrypi.org/documentation/linux/kernel/building.md thanks for pointing me to that page! I'll try that and let you know if it works. Best, Lennart ___ devel mailing list devel@riot-os.org https://lists.riot-os.org/mailman/listinfo/devel
Re: [riot-devel] Configure Raspberry Pi as 802.15.4/6LoWPAN Border Gateway
Hi, Which kernel version are you running ? (Can you post output of uname -a ? ) If you're running an older version of kernel (and raspberry pi boot loader / firmware) it won't support RPi 2 model B out of the box. Solution could be : sudo apt-get update sudo apt-get upgrade on RPi 1 to get firmware and kernel upgraded. Once done, It should boot on RPi 2 Model B as well. I downloaded the latest raspian image (2015-05-05) from raspberrypi.org, and after dd'ing it to the SD-Card, it boots on both devices. I did an apt-get update apt-get upgrade before installing the new (self-build) kernel, as recommended in the tutorial. Output of uname -a is Linux raspberrypi 4.1.6+ #1 PREEMPT Tue Aug 18 15:43:23 CEST 2015 armv6l GNU/Linux which says armv6l at the end, so I'm guessing I built a kernel for armv6 and replaced the original raspian kernel with it. Another run of apt-get update / upgrade tells me there are no new packages to install. Best, Lennart ___ devel mailing list devel@riot-os.org https://lists.riot-os.org/mailman/listinfo/devel
Re: [riot-devel] Configure Raspberry Pi as 802.15.4/6LoWPAN Border Gateway
Hi Tobias, with the help of other developers, I successfully got a Raspberry Pi with the Openlabs 802.15.4 radio adapter [0] working as a 802.15.4 and 6LoWPAN border gateway. thanks for your work, that's a great tutorial! Can you (and perhaps others) tell us which version of the RPi you used? Your method does not seem to work on the latest RPi (Pi 2 Model B), but it does work on the Pi 1 Model B+. I prepared an SD card following the exact steps in the tutorial, put it in both models, but it only booted on the Model 1 B+. In the REDAME of the git repo for the firmware it says * ./hardfp: userspace VideoCoreIV libraries built for armv6 hardfp ABI but the Model 2 B uses an ARMv7. Maybe that's the reason it doesn't work? I also suggest we put a note at the beginning of the tutorial about this, so people don't get confused and sad (like me) ;) Cheers, Lennart ___ devel mailing list devel@riot-os.org https://lists.riot-os.org/mailman/listinfo/devel
Re: [riot-devel] Connectivity between new NG stack and loopback
Hi everyone, I'm sorry for answering so late (I had some other things to take care of), and I would like to thank you for your help. The reason why this wasn't working on my system was just my firewall that interfered. After turning it off, everything worked just as you described. To make it easier for other newcomers, who might have to deal with this, I created a wiki article that describes how to talk to your RIOT process and mentions some of the pitfalls. It's not published yet, for now it's just a gist, but feel free to check it out: https://gist.github.com/backenklee/2dbdaae90af5b5878200 If you feel like something is missing or think something could be improved, please let me know. Cheers, Lennart ___ devel mailing list devel@riot-os.org https://lists.riot-os.org/mailman/listinfo/devel
Re: [riot-devel] Connectivity between new NG stack and loopback
Hi Alex, have a look at the microcoap example [1], which uses marz [2] to connect the RIOT node with your »normal« localhost. The RIOT application in this example is a just a server (and only reacts on requests), but it shouldn't be too hard to extend/customize. The marz code is a bit spaghetti like, and maybe I will build a better solution in the near future, as I need the same functionality you do for testing a gateway. As for the microcoap example: beware of pip, you may want to install Twisted and bidict manually by downloading it from the respective websites, because (on my system) pip installed only parts of the libraries. Also, check the $PYTHONPATH variable and which version of python the respective file/program uses when things don't work, this caused some trouble for me. As soon as I know more, I'll let you know. The method described by Cenk did not work for me, but I'll try and make that (or something similar) work as well. Best, Lennart [1] https://github.com/RIOT-OS/applications/tree/master/microcoap [2] https://github.com/sgso/marz ___ devel mailing list devel@riot-os.org https://lists.riot-os.org/mailman/listinfo/devel