Missing data in Watson IoT Platform from device - watson-iot

I installed the WIoT installer
pi#raspberrypijps1 ~ $ service iot status
[ ok ] iot is running.
pi#raspberrypijps1 ~ $ service iot getdeviceid
Running in registered mode
#config
org=faa9v
type=iotsample-raspberrypi
id=B827EB51C569
auth-method=token
auth-token=......
#end of config file
Added the device on the WIoT platform. However, the device data for B827EB51C569 is not showing up.
Browse Device results in Connection Status Disconnected.

Related

Unified Write Filter Causes Kernel Mode Exception When Enabled on Iot Core Version 10.0.17763.107

After installing the unified write filter packages on Iot Core version 10.0.17763.107 which is running on a Raspberyy Pi 3 version B, an unhanded kernel mode exception (blue screen) occurs after the UWF is enabled.
The UWF packages were installed from the Windows10_IoTCore_Packages_ARM32_en-us_17763Oct.iso from the semi-annual servicing channel download link.
The following steps were derived from the article "Using the Unified Write Filter (UWF) on Windows 10 IoT Core."
This process worked on Iot Core version 10.0.17134, however, the UWF package file names are different for the 17763 packages.
After installing the Windows_10_IoT_Core_ARM_Packages.msi from the iso, the packages:
C:\Program Files (x86)\Windows Kits\10\MSPackages\retail\arm\fre\Microsoft-IoTUAP-UnifiedWriteFilter-Package~31bf3856ad364e35~arm~~.cab
C:\Program Files (x86)\Windows Kits\10\MSPackages\retail\arm\fre\ Microsoft-IoTUAP-UnifiedWriteFilter-Package~31bf3856ad364e35~arm~en-us~.cab
were copied to the device into the folder u:\UnifiedWriteFilter
The following commands were ran from a remote powershell session:
u:
cd UnifiedWriteFilter
applyupdate –stage Microsoft-IoTUAP-UnifiedWriteFilter-Package~31bf3856ad364e35~arm~~.cab
applyupdate –stage Microsoft-IoTUAP-UnifiedWriteFilter-Package~31bf3856ad364e35~arm~en-us~.cab
applyupdate –commit
The device then appears to install the packages successfully.
Upon restart, the following commands were ran from a remote SSH session:
uwfmgr.exe volume protect c:
uwfmgr.exe volume protect u:
uwfmgr.exe filter enable
shutdown -r -t 0
When the device restarts, the "Your PC ran into a problem and needs to restart. We''l restart for you" screen appears with:
Stop code: KMODE exception not handled.
What failed: vwififlt.sys
This process has been repeated using two different SD cards.
Is there something that I am doing incorrectly to install and enable UWF for version 17763?
I have tested with the commands in your post. I can reproduce this issue. It seems that you can not protect the data volume(U:) via command 'uwfmgr.exe volume protect u:'. But it can be protected using the GUID for the volume.
Use putty or other tool to connect with the device through SSH, and then redirect to the root of partition C:;
Get the volume information via command dir /AL,you will get the GUID for the data volume:
Run the command to protect the volume with GUID which got from last step:
uwfmgr.exe volume protect \\?\Volume {GUID}

raspberry pi 3 iot agent unable to connect cumulocity platform

I have installed noobs v2_4_5 in raspberry pi 3 model ,configured JAVA_HOME, enabled SSH and set up static IP as well. I downloaded IOT agent cumulocity-rpi-agent-latest.deb and installed using the following 2 commands
$ wget http://resources.cumulocity.com/examples/cumulocity-rpi-agent-latest.deb
$ sudo dpkg -i cumulocity-rpi-agent-latest.deb
I registered the device in cumulocity platform. When agent is installed I should update cfg file cumulocity.properties located at /usr/share/cumulocity-rpi-agent/cfg. The file needs the following.
host
bootstrap.tenant
bootstrap.user
bootstrap.password
My account url is - arpita.cumulocity.com. What exactly I have to put in that file and any thing more I have to do to make active connection? Also device.properties file is not generating after agent installation. How to proceed?
I found the correct answer to this question.
After registering your raspberry Pi 3 on Cumulocity and updating your cumulocity.properties file, you need to enable SPI.
Here is a reference how to do that.
After SPI is enabled, you will see your device status on Cumulocity is waiting for you to accept the connection.

Debugging react-native application using WIFI

Could not run adb reverse: Command failed: /home/sofiane/Android/Sdk//platform-tools/adb -s 192.168.1.2:5555 reverse tcp:8081 tcp:8081
When i use port : 8081
adb tcpip 8081
adb connect 192.168.1.2:8081
I have this error :
And when i use port : 5555
adb tcpip 5555
adb connect 192.168.1.2:5555
I have this error :
If you are connected to an Android device over wifi you must do as advised in the last suggestion on the error screen (because adb -s ip:port reverse ... seems not to work):
With your app open, shake the device until you see the developer menu.
Go to "Dev Settings".
Set "Debug server host & port for device" to your development machine's IP at port 8081.
Make sure you have connected on the same network, like in my case I connected my laptop through my phone's hotspot. Of course you also need to have internet access and make sure you have successfully installed your app to your phone using react-native run android. If you have successfully installed your app you may now remove the attached USB cable.
Then on
Windows, just open your terminal (CMD), then type ipconfig, and then press enter.
You will then see the list of your IP configuration.
Your private ip address is the IPv4 Address, something like 192.168.0.10.
On your react native project, run react-native start to start the metro bundler.
When the metro bundler started it will say Running Metro Bundler on port 8081 <- this is the port that you have to connect through.
On your device go to device setting then to "Debug server host & port for device", then type the computer's private IP address plus the port where metro bundler is running, for example: 192.168.0.10:8081.
Click on save then try to reload your app again.
As stated on react-native docs
devices have to be on same wifi in order to work, then go to settings through app by shaking it and in menu select "Dev Settings": Just add pc local address to "Debug server host & port for device" like so 10.0.1.1:8081.
As well adb reverse tcp:8081 tcp:8081 may be required.
In the beginning connect your mobile to pc and run app using react-native run:android command. then run adb shell input keyevent 82 command. It will display a popup window and select Dev Settings.And then go to debug server host &port for device. Then Enter your wifi host ip which is also connect with your PC (use this link to get wifi IP get local IP of the connected wifi)
and get the value of Your Local IP is:*************
and after that IP address add : 8081
if you want to live reload through the wifi use this adb shell input keyevent 82
command and select live reload option.
I had same problem on Windows, I solved it by adding rule for port 8081.
in your case, this may help you:
sudo ufw allow 5555/tcp
What I do when I'm having troubles with the wi-fi connection because my PC at work has firewall rules that changes all the time.
Turn on my "mobile hotspot", to share my connection, with the mobile connected to the wi-fi.
Connect my notebook on the shared network from mobile.
Get the IP that the mobile has generated.
Set "Debug server host & port for device" to that IP at port 8081.
I was able to do without having to connect device and installing app initially.
Open project in Android Studio
Open "Device Manager" in Android Studio
Click "Pair using Wi-Fi" in Device Manager Android Studio
On device -> Settings -> Developer Options -> Wireless debugging -> Enable wireless debugging
On device -> Settings -> Developer Options -> Wireless debugging -> Pair using QR code -> Scan QR code showing in android
Run adb devices from terminal or equivalent to list the device on the same network
run react-native run-android deviceId=xxxxxxxx with xxxxxx the device name of your adb device on same wifi network showing in terminal
There you will have app debuggable from wifi
I had faced the same issue over trying to connect android 4.4 device for debugging with react native application .
you have to disable firewall
then connect over again , it works fine
Happy coding !!

appcelerator studio cannot find device

I'm using appcelerator studio version 4.6.0.201605201934
I'm using a nexus 6P, and windows 10
The phone has debugging enabled, and has MTP mode selected. File-Explorer detects the phone each time it is plugged in and tries to download photos from it.
I have put the google USB folder in the android/sdk/extras/google/usb_driver folder
I can see my device on the command prompt by going to the android/sdk folder
adb devices -l
HOWEVER when i go to appcelerator studio, it does not find the phone - the "run configurations" has an empty list of phones to choose from, and running it leads to it informing me that there is no device connected.
What am I doing wrong?
Have you tried to run the kill-server, and devices commands with the adb path?
In my case:
bash-3.2$ /Applications/Android/android-sdk-macosx/platform-tools/adb kill-server
bash-3.2$ /Applications/Android/android-sdk-macosx/platform-tools/adb devices
List of devices attached
* daemon not running. starting it now on port 5037 *
* daemon started successfully *
If this still doesn't solve your problem, try to add the Vendor ID of the device to the adb_usb.ini file, usually placed:
Windows: C:\Users\YourUser\.android
Mac OS: ~/.android
You can find the Vendor ID at the hardware info on Mac OS here: /Applications/Utilities/System Information
There is also a list of Vendor IDs at the android documentation: https://developer.android.com/studio/run/device.html
Your file will look, like this:
# ANDROID 3RD PARTY USB VENDOR ID LIST -- DO NOT EDIT.
# USE 'android update adb' TO GENERATE.
# 1 USB VENDOR ID PER LINE.
0x18d1
I have been using Titanium for some time and I also have the same issue regardless of what device or USB port I use. I even have the issue with simulators.
So I do the following instead:
# Install the application (replacing the existing one if it exists)
adb install -r build/android/bin/YOURAPP.apk
# Run the application (you could also just open the application on your phone)
adb shell am start -n com.package.name/com.package.name.ActivityName
# Show logs
adb logcat "TiAPI:*" "*:S"
The adb tool can be found in windows 10 at this path
/Users/username/AppData/Local/Android/sdk/platform-tools/adb.exe
The activity name can be found in the build/android/AndroidManifest.xml file.
It's usually: YourAppNameActivity
More information about logcat can be found here:
https://logmatic.io/blog/a-how-to-guide-to-debugging-with-android-logcat/
https://developer.android.com/studio/command-line/logcat.html

React-native Could not connect to Development Server on android device

Device is connected, Package Server is running, there was issue of port 8081,
That's why I started this using react-native run-android and react-native start --port 8089.
But still unable to run my first app
please help, thanks in advance :)
Have the same issue witch happens after every run-android . This line from https://facebook.github.io/react-native/docs/running-on-device-android.html
helps , i press reload and it works but next time -same thing
adb reverse tcp:8081 tcp:8081
or
sudo adb reverse tcp:8081 tcp:8081
There are two ways to connect to development server.
Via wifi if your mobile and pc is in same network.
Via usb cable.
For num 1 go through following checklist.
Check if your machine and mobile device is connected to same wifi network.
Open the react native menu in mobile device by typing this command "adb shell input keyevent 82" (your device must be connected to your machine via usb cable when using this command).
Click the option that stated "dev server" or something like that.
Enter your machines ip address along with the port number. In my case it is 192.168.0.10:8081
Reload the application and bingo.
For number 2 you can enter this command in the terminal "adb reverse tcp:8081 tcp:8081" .That will do the rest.
if you have a virtual device after you run react-native start
open a new terminal and go to your app directory and type adb connect 127.0.0.1:62001 then type adb devices
now you should see your device
after that go to your emulator or real device and shake it(in vitual device ctrl+0) and go to dev setting and ............

Resources