Differences

This shows you the differences between two versions of the page.

Link to this comparison view

iot:labs:11 [2015/07/01 02:25]
avner.solomon [2) Newsfeed]
iot:labs:11 [2020/01/07 18:55] (current)
jan.vaduva [Lab 11: IoT usecase for Yocto Project]
Line 1: Line 1:
-===== Lab 11 Web Services ​=====+======Lab 11: IoT usecase for Yocto Project======
  
-===== 1) Chat ===== +Open the AGL getting ​started ​guide located ​at: [[https://docs.automotivelinux.org/docs/en/​guppy/​getting_started/​reference/​getting-started/​image-workflow-intro.html|Developing an AGL Image]]
-Using the what you learned in course 11 continue the chat app you started ​in laboratory 10. +
-For this you have an api at +
-http://api.my-sandbox.co/chat/chat.php +
-When you call get on it you will receive all the messages +
-When you send via post the variables username and msg to it, it will add a message to the chat. +
-For visibility show only last 5-10 messagesEach message is separated by "​\n"​+
  
-===== 2Newsfeed =====+Set up your Linux system with the right packages (instruction are provided for Ubuntu, Fedora, CentOS and openSUSE)
  
-Continue the newsfeed you started in laboratory 10+  - Install prerequisites:​ <​code>​$ sudo apt-get install gawk wget git-core diffstat unzip texinfo gcc-multilib \ 
-Implement support for reading ​the whole article bu showing it on new page +     ​build-essential chrpath socat cpio python python3 python3-pip python3-pexpect \ 
-and support for liking articles and display ​the number of likes.+     ​xz-utils debianutils iputils-ping libsdl1.2-dev xterm xsltproc docbook-utils \ 
 +     fop dblatex xmlto make python-git curl</​code>​ 
 +  - Define ​the work directory: <​code>​$ export AGL_TOP=$HOME/​workspace_agl 
 +$ mkdir -p $AGL_TOP 
 +</​code>​ 
 +  - Setup //repo// tool: <​code>​$ mkdir -p ~/bin 
 +$ export PATH=~/​bin:​$PATH 
 +$ curl https://​storage.googleapis.com/​git-repo-downloads/​repo > ~/​bin/​repo 
 +$ chmod a+x ~/bin/repo 
 +</​code>​ 
 +  - Download latest stable AGL release: <​code>​$ cd $AGL_TOP 
 +$ repo init -b guppy -u https://​gerrit.automotivelinux.org/​gerrit/​AGL/​AGL-repo 
 +$ repo sync 
 +</​code>​ 
 +  - Source //​aglsetup.sh//​ script, to create ​the build directory: <​code>​$ source meta-agl/​scripts/​aglsetup.sh -f -m qemux86-64 agl-demo agl-devel</​code>​ 
 +  - Build the OS image: <​code>​$ bitbake agl-demo-platform</​code>​ 
 +  - Build the OS SDK image: <​code>​$ bitbake agl-demo-platform-crosssdk</​code>​  
 +  - Decompress the OS image that resulted after the build: <​code>​$ cd tmp/​deploy/​images/​qemux86-64 
 +$ xz -d agl-demo-platform-qemux86-64.vmdk.xz</​code>​ 
 +  - Boot the image with QEMU: <​code>​$ sudo apt-get install qemu-system-x86 
 +$ qemu-system-x86_64 -enable-kvm -m 2048 \ 
 +    -hda agl-demo-platform-qemux86-64.vmdk \ 
 +    -cpu kvm64 -cpu qemu64,​+ssse3,​+sse4.1,​+sse4.2,​+popcnt \ 
 +    -vga virtio -show-cursor \ 
 +    -device virtio-rng-pci \ 
 +    -serial mon:stdio -serial null \ 
 +    -soundhw hda \ 
 +    -net nic,vlan=0 \ 
 +    -net user,​hostfwd=tcp::​2222-:​22 
 +</​code>​
  
-For this you will have an api at: +===== Exercises===== 
- +  Replicate a successful AGL setup
-http://​api.my-sandbox.co/​chat/​get.php +  Get the list of packages ​the newly defined image has 
-used to fetch latesd news and +  - Check if packages such as openssh ​and screen are included in the image. 
-http://​api.my-sandbox.co/​chat/​get.php?​id=PRIMARY_KEY_OF_ARTICLE +  Deploy the AGL image onto VirtualBox 5.2.0 or later. You could also try using the latest snapshot available: [[https://download.automotivelinux.org/AGL/snapshots/master/latest/​qemux86-64/deploy/images/qemux86-64/|AGL Snapshot]]
-to fetch the full article +
- +
-and for likes +
- +
-GET http://​api.my-sandbox.co/​chat/​like.php with +
-with id set in order to get the number of likes for an article +
- +
-GET http://api.my-sandbox.co/chat/like.php with +
-with id and uuid set in order to get if you liked or not an article +
- +
-POST http://api.my-sandbox.co/chat/like.php with a JSON +
-  { +
-    method:"​like",​ +
-    uuid:"​phone-uuid",​ +
-    pk:"​article-pk"​ +
-  } +
-in order to like an article +
- +
-POST http://api.my-sandbox.co/chat/​like.php with a JSON +
-  { +
-    method:"​unlike",​ +
-    uuid:"​phone-uuid",​ +
-    pk:"​article-pk"​ +
-  } +
-in order to dislike an article. +
- +
-To get the uuid of the phone just access +
-device.uuid +
-The device plugin must be installed (it should be installed in your apps by default but you will have to move the config.xml from the root folder in the www folder) +
- +
-===== 3) Comunicate with webservers from your boards ===== +
- +
-Depending on what you made your boards try to make the phone communicate with the webserver from the boards.+
iot/labs/11.1435706701.txt.gz · Last modified: 2015/07/01 02:25 by avner.solomon
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0