Unable to simulate Smart-car-use-case - mimik - edgeengine

I have been trying to solve the Smart-car-use-case. I took Car 1 as RaspberryPi and Car 2 as Laptop(Windows). I have an image of obstacle in Pi which is used as the dummy data.
As per the assumption any image on the local machine (here Pi board) can be taken as the dummy data.
And as in the step "[C2] → mSuperdrive mimik add a media Obj locally (Car 1)", I have to use the image file path (ex:home/pi/Desktop/image.jpg) as the url, so the postman should be running in Pi board.
But postman is not supported with RaspberryPi
then how can I simulate this problem.

On the laptop (Car2) if you have postman go to the [C2] → mSuperdrive mimik add a media Obj locally (Car 1) call and open it in a postman tab. On the right-hand side there is a "Code snippet" tab. Open this tab and set the code you want to see to "cURL" this will convert the [C2] → mSuperdrive mimik add a media Obj locally (Car 1) API call into a cURL command. Copy all the code in code snippet and move it to the PI. On the PI you will need to install cURL. Once cURL is installed paste the code snippet into terminal to simulate the call. Please make sure you use the right tokens and set the right paths before pasting the command into terminal.

Related

Unable to simulate Smart-car-use-case solution

I am working on mimik Smart-car-use-case Solution. I took both the device, Car1 and Car2 as RaspberryPi Board. Then how will i do the Postman Simulation, Since it is not supported with Pi,
And I have an image of obstacle in Car-1(in Pi Board1), which can be viewed by car-2 (Pi Board2), So the image path in "[C2] → mSuperdrive mimik add a media Obj locally (Car 1)" api call should be a filepath of an image in Pi-board1
In this case how can i give the image path in Postman.
Since postman is not supported, I cannot advise on any further alternative solutions. The solution requires postman so its best to use a PI image that supports Postman. Periodically check here to see if there are updates to the package.
For information on how to send and image via Postman, please view answers below:
"Post Image data using POSTMAN"

Getting error while making mSuperdrive and mBeam API Calls in Postman Collection

I am working on mimik Smart-car-use-case Postman Simulation. As in [C2] → mSuperdrive mimik add a media Obj locally (Car 1), I have added an image locally on Car 1, and Check the mimiked file by calling [C3]
and then I made [C4] → mbeam NODE1 GET play_queue api call and got the list of files in mBeam play_queue as below.
After that I deleted the image which I have added in [C2] Api Call,
and again I hit Send on [C3] , I am getting the following error,
Since the image is in mBeam play_queue why am I getting error, when i delete the actual image?
Regardless of the image being added to play_queue, the physical file still needs to reside in origin. The reason you are getting 404 is because the the actual file is gone due to your deletion.

Not able to make mSuperdrive and mBeam API Calls in the Postman Collection

I am trying to make mSuperdrive and mBeam API Calls as in the Smart-car-use case ( [ Group C – Car 1] in the postman Collection). When I made the [C1] → mSuperdrive LOCAL DISCOVERY api call (to see the Link Local clustering) I can find both of my devices in the response object,
but along with the response I am getting the following error.
This is an error coming from postman's "Tests" tab, we have put some code in there to extract data from response body in order to set environment variables. If you are getting a 200 OK response with your devices showing you can simply ignore this error. You can also comment out the code in "Test" tab and you will not see the error for that call again. Please periodically check here for new updates to the collection that will fix these issues in the future.

Not able to see MediaStream properties value in console

I am totally new to WebRTC and Node.js I was trying to build sample webRTC app using the tutorial http://www.tutorialspoint.com/webrtc/webrtc_media_stream_apis.htm
I have followed exactly the same steps except that I have created my own Nodejs server using nodejs tutorial from same site. As mentioned in webrtc tutorial I am not able to see properties value of MediaStream in console . In my case its totally blank. Is anything I am doing wrong. My file is running on http://127.0.0.1:8081/index.html and I am able to see my local video .
Yes, you should be able to see this. Try this:
In your browser, open a new empty tab, right-click and pick Inspect Element.
Go to the Console tab, paste in the following, and hit Enter: navigator.mediaDevices.getUserMedia({video: true}).then(stream => console.log(stream)).catch(e => console.error(e))
Select to share your camera.
You should see something like this (varies a bit by browser still):
MediaStream {id: "JFK9GaWaTxPptJVuKjNlj9lmfvNarWaXANjv", active: true, onactive: null, oninactive: null, onended: null…}
Note: Always be cautious about people on the internet telling you to paste things into console. :)

Chromecast "StartApplicationRequest failed with status: -4"

I've set up the Chromecast SDK, whitelisted my device, and am running web servers at the URLs I provided in the whitelist request.
The chromecast tic tac toe app works fine with the default app id "TicTacToe", however changing it to my own: "1813060e-33c5-41dc-b356-0d2bad12497f" or "1813060e-33c5-41dc-b356-0d2bad12497f_1" does not work.
The server url is up and running at http://chromecast.clockworkmod.com/, but no requests are being made to it by Chromecast. The chromecast doesn't display anything. However I get a few errors in the log.
Here is the logcat.
W/StartSessionTask(15590): StartApplicationRequest failed with status:
-4 E/ApplicationSession(15590): StartSessionTask failed with error: failed to start application: request failed D/GameActivity(15590):
start session failed: failed to start application: request failed
I've also tried using the internal app id with the dev url I had provided, http://192.168.1.2:3000/
I found the answer here:
unable to cast to personal whitelisted receiver app
Using the Chromecast app on my Macbook, I went into Settings.
Send serial number when Checking for updates
Reboot device the device using the Mac update app
This resolved the error for me. The chromecast doesn't know if it is whitelisted unless you send the serial during update checks.
I think I see what's missing! In your receiver you gave a link to, you have:
var receiver = new cast.receiver.Receiver(
'GoogleCastSampleApp',
[cast.receiver.RemoteMedia.NAMESPACE],
"",
5);
But it should be (fill in the 'YOUR APP ID HERE' with your App ID)
var receiver = new cast.receiver.Receiver(
'YOUR APP ID HERE',
[cast.receiver.RemoteMedia.NAMESPACE],
"",
5);
I am running into the same error as well. I after setting the Chromecast to send the serial when checking for updates I was finally able to access the debugger one port 9222. Unfortunately, I don't see anything happen on the Chromecast at all when I select it from the device list on my Nexus and try sending one of the demo videos.
Something I noticed and I don't know it makes difference or not but if you whitelist a domain in the GoogleCast extension for Chrome and you include the "http://" it will cause the injection to not work. I wonder if this is the problem with the look up that the Chromecast performs as I submitted my URLs to Google with the http:// prepended. Again I am not sure this should really make a difference but I plan on trying to resubmit the URLs just to see.
Install cURL in your windows machine from here
Now make sure that your device and laptop are in same network.
Now go to command prompt, type curl -d "" http://:8008/apps/YouTube
there If it gets casted automatically to TV then instead of YouTube put your appid and try.
If not then your router is blocking some traffic.

Resources