Android Things - pico i.mx7 unable to connect - adb

I've just unpacked my new Pico Pro Maker Kit and started flashing procedure. After creating a product in AndroidThings platform and downloading the build I've started flashing procedure.
Command flash-all.sh failed on fastboot syntax, so I've build that manually and found that it was failing on part "set_active _a". I've skipped that and continued to flash device.
Now device is rebooted, I can see on the screen androidThings logo and version + info about network status ("not connected").
I'm unable to find this device in
fastboot devices
or
adb devices
so it looks like I have no way to connect into it.
Do you know a way of fixing that? Is there any way to force fastboot reboot on that device?
Thanks!

I had a related problem for IMX7 on initial install, I thought I'd pass along the Boundary feedback in case it helps. Tech support at Boundary devices recommended that I try the following:
Please try to add androidboot.dm_verity=disabled and
androidboot.selinux=disabled options to bootargs.
I presume these would be options you'd set at the boot prompt ==> (from the serial connection) but I haven't had a chance to test, which I may get to next week. Interested in your feedback if this has any impact to your situation in the meantime.

Related

Error updating Google Glass firmware using Mac w/ M1 CPU: fastboot: cannot get boot partition size

I am updating the Firmware for the Google Glasses Enterprise 2 as stated on google's documentation.
I am getting the error while I am running this command on terminal fastboot flash boot boot.img It returns with an error as stated above fastboot: error: cannot get boot partition size . Well i tried two different versions of the System images as mentioned on Google's website. I tried to change it to fastboot flash boot_a boot.img but the same error.
I saw someone was having the same issue as well there but no solution. Do someone have idea how can we install the system image on it. I have skipped it and run other commands all goes well but the boot is not working which is why the it only shows me now recovery mode/fastboot.
run fastboot --help and read somehow carefully
flash boot.img with fastboot flash:raw boot boot.img
This is problem with new Mac Mini. Because Apple is not using Intel CPU in new Mac mini M1. flash.android.com cannot update the firmware with browser on Apple M1.
I completed the task with windows pc and everything worked well. I believe this would help someone using M1 processors.

Failed activation of DJI Matrice 100 Drone

I am trying to run a sample application for the Matrice 100 by using ROS on a raspberry Pi 2.I have the Pi connected to the drone via USB-TTL cable to the UART port on the drone. I have my laptop connected to the drone running DJI Assistant 2, and the controller and my iPhone connected wirelessly to the drone as well through the DJI Go App(v3.1.54). All are connected to the internet and logged into my respective developer account for DJI. However, when I run "roslaunch dji_sdk sdk.launch" I am returned an error saying the drone is not activated.
I have enable API access from DJI Assistant 2, I've made sure the the TX and RX pins are connected correctly, and I have changed my sdk.launch file to have the correct App ID and Key. Ive noticed in other posts that they say to edit the UserConfig.txt file for App ID, Key, and BaudRate; however, I could not locate this file on my Pi(it doesn't exist). Just the sdk.launch file which I correctly changed these settings to fit my application and drone.
STATUS/1 # init, L55: attempting to open device /dev/ttyUSB0 with baudrate 230400...
STATUS/1 # init, L65: ...serial started successfully.
STATUS/1 # parseDroneVersionInfo, L727: device Serial No. = 041DF31901
STATUS/1 # parseDroneVersionInfo, L729: Hardware = M100
STATUS/1 # parseDroneVersionInfo, L730: Firmware = 3.1.10.0
STATUS/1 # parseDroneVersionInfo, L733: Version CRC = 0xA6453AAC
STATUS/1 # initSubscriber, L778: Telemetry subscription mechanism is not supported on this platform!
STATUS/1 # initMFIO, L981: MFIO is not supported on this platform!
STATUS/1 # initHardSync, L1077: Hardware sync is not supported on this platform!
STATUS/1 # activate, L1313: version 0x3010A00
STATUS/1 # getErrorCodeMessage, L656: activate
STATUS/1 # getCMDSetActivationMSG, L705: NEW_DEVICE_ERROR
ERRORLOG/1 # activate, L1339: Failed to activate please retry SET 0x0 ID 0x1 code 0x3
ERRORLOG/1 # activate, L1346: Solutions for NEW_DEVICE_ERROR
*Double check your app_id and app_key in UserConfig.txt. Does is match with your DJI developer account?
*If this is a new device, you need to activate it through the App or DJI assistant 2 with internet
For different aircraft, the App and the version of DJI Assistant 2 might be different,
For A3, N3, M600/Pro and M100, please use DJI Go App
For DJI Assistant 2, it's available on the download tab of the product page
*If this device is previously activated with another app_id and app_key, you will need to reactivate it again
*A new device needs to be activated twice to fix the NEW_DEVICE_ERROR, so please try it twice.
[ERROR] [1560967071.851508645]: drone activation error
[ERROR] [1560967071.851845364]: Vehicle initialization failed
I checked the app_id and app_key in the sdk.launch file and they are the same as on my app on DJI website. Still unable to find file "UserConfig.txt". I don't see where to activate a device on the DJI Go App after it is already connected to the vehicle via the controller. For DJI Assistant 2, I cannot find the download tab or where/how to activate the drone for OSDK via my laptop as well. I don't believe it was activated with another app_id and key considering it is very new. So this is where Im stuck, and would like to run a sample app on the drone. Any ideas on how to fix this issue?
Welcome to the hell of DJI SDK world. The world of shitty API documentation and bug land.
Based on your error, the link is ok -> as you can see firmware version.
The error is new device error which means you either did not open remote. Or the remote is not connected to Go App or Go App not authorize the API .
Connect everything and power on everything accordinly.
turn on the drone and remote. connect the phone and on Go App.
Make sure that you can see drone position in map.
Once you saw the drone in map in Go App, run sdk.launch.
Once you do that, the Go App will pop up a MESSAGE saying api sth sth xxxxxxxxx , you have to press OK or Confirm. This is to solve the new device error
Then ctrl-C for the terminal and run sdk.laucnch again.
Also make sure that the sdk.lunch app id is the same account that are login in to the Go App
If first time not working, power cycle again and repeat this 2 step.
The sdk.launch needs to be run at least twice. I know its stupid but it is DJI and it is common.
Also do remember to set up udev rules for your /dev/serial/by-id/usbXXXX , then set the low latency mode for the serial. Those are all common error you are going to expect as well.
I had the same problem a few days ago and literally went through like 10-20 posts on Stack Overflow, DJI forums, etc. I contacted dev#dji.com and their suggested approach worked for me. Below is the email.
Bruce Cheung (DJI) 6 Sep, 11:22 CST
Dear Chris,
Thank you for contacting DJI.
If have the same error log as before, it doesn't matter the new device
is activated. Suggest that you can delete the catkin_ws folder, then
git clone DJI OSDK-ROS source code, modify dji_sdk_node.cpp, and do
catkin_make. You can provide a new log document if there is any
problem again. Good luck with your project.
Thank you for your understanding and support, hope you have a nice
day.
Best Regards, DJI SDK Support Team
My reply after it worked:
Thank you, I took your advice and it worked.
I deleted the folders, did catkin_make. This time I made a 2nd Onboard
SDK project at developer.dji.com and used that one instead. My first
one had been activated on the same computer but through the Linux (not
ROS sdk). Not sure if that makes a difference. It works now.
Chris
I'm really not sure why removing and then uninstalling worked, as I had literally just added a new install the day or two before. But guess it worked. I also made a 2nd API key but according to DJI that wasn't the reason why it worked.

Smartface iOS Emulator Error

I always get this An error occurred during file transfer! Please check your USB connection and try again error in smartface. I have read the iOS emulator troubleshooting documents but did not work. There is no any problem with my cable. Everyting is OK. who has any solution?
It might occur about your iTunes installation.
Check the Itunes version and install the newest one.
Also, fake cables causes problems during file transfers.
Smartface.io Team

How do I get bluez 5 to accept a fixed pin?

I can find nothing on how to do this. I am programming an Intel Edison in C and an Android phone in Java. I want to pair the Edison from the Android phone. I would think simple pairing (sspmode 1) would work but I get an error message on the phone about a wrong pin where no pin was requested. With sspmode 0 I get asked for a password but have no idea what it is as it is randomly generated in my NoInputNoOutput Edison. We have everything else working. If we pair from Edison manually, the rest of the code can connect and send bluetooth messages back and forth from the Edison to the phone. But pairing from Edison to any random phone that walks by is not acceptable. I think it is called Bluejacking.
I have seen some posts about using simple-agent but frankly what I understand is that BlueZ security changed so much between 4 and 5 that most all that I see doesn't work. I also see that the switch from 4 to 5 broke a lot of systems so I don't feel alone. I would try it but simple-agent is not on Edison and I have not found a procedure to install it. And as I don't know if the little I can find applies to version 5 as it all references version 4 I am feeling a little lost.
Can anyone point me in the right direction to something that will work on BlueZ 5? I am on 5.18.
The solution presented on the last post of this article does work
http://www.linuxquestions.org/questions/linux-wireless-networking-41/setting-up-bluez-with-a-passkey-pin-to-be-used-as-headset-for-iphone-816003/
Edit simple-agent, put it somewhere, make it executable, put the missing files in the same directory and run it. It must stay running for it to be active.
In my case, the missing file was bluezutils.py.
Run hciconfig hci0 sspmode 0 first
Pl use Bluz5.30.
Initially it was really difficult to bring up bluetooth using Bluez 5. It seems it was okay with Bluez 4.I have tried different versions of Bluez 5 on my LFS build. Even up to Bluez 5.28 it was not satisfactory. Now it is Bluz5.30, with this, LFS doc and lot of trail, I could manage. I feel Bluez is one of the most badly documented user unfriendly software. I also feel it is very buggy. It can hang machines forcing to hard boot the system. I have seen bluetooth forcing the Android phone also to reboot. So it is important to get the latest version of the software. But to make the bluetooth speaker work Pulseaudio was needed. It is better to get the latest version; here also LFS doc was fine.
So the process of connecting speaker was using bluetoothctl is as follows;
>> power on
>> scan on
>> pairable on
>> pair <device>
>> agent on
>> default-agent
Now the actual sound. Here pactl and pacmd are useful.
paplay -d can test the devices.
using pacmd with command 'list-sinks' can show the devices.
pacmd ->list-modules can show the modules loaded.
How to change automatically the audio output to bluetooth speaker when it is connected?
For me in one machine it was working fine, with an identical LFS in another machine it was not working. Finally it was identified as a
missing module module-device-manager with arg do_routing=1.
Once it was loaded everything was fine. This particular module was not shown in the pulse configurations. So I have to find that and load,
pacmd
load-module module-device-manager do_routing=1
One can add a line in the default configuration file available in /etc/pulse.or one can add it in the user configuration file also.Now to make the new bluetooth speaker being used to play sound. For that issue the command 'move-sink-input ' using pacmd. You can find the sink names my issuing the command 'list-sinks'.
If your speaker is not connecting, it may be that it is already connected elsewhere. If it is not so, remove-device; scan on; pair; and connect using bluetoothctl. I was worrying how to make file transfer using bluetooth (Bluez5). Actually very little information is available in LFS documention or in general in the NET. This very true and unfortunate about Bluez in general. They do not provide any real user doc or nothing is available in net. So the steps are as follows:
You need to install OBEX library. Then you build Bluez5 (if it not done already). It will install obexd. After installation you can find obexd in $PREFIX/libexec/bluetooth/obexd.This is where you find bluetoothd also. One generally makes a link for bluetoothd in /usr/sbin. A similar link can be made for obexd also. Once you start bluetoothd and obexd you can find object transfer profiles in bluetoothctl->show.If you need a phone to push objects to the computer, you need to run obexd with options '-a' and '-r '. if '-a' is not given phone will fail to send the file. Now how to push a file from Computer to Phone. For this you need obexctl, I do not think it is a finished tool, and it will not be installed while we build Bluez 5. I have seen it in the source tree and copied to /usr/bin/. It should be used to connect the Phone and when the connection is established one can 'send ' and you have to accept the request in the phone.
Starting obexd as a deamon was a problem. When obexd was tried on a text terminal (init 3) it was not possible to start since it needs a dbus session which in turn needs X display. It means one need to login an X seession before you start obexd. If you dissable X while building DBUS (--without-x) then Window Managers will not work. But there is solution with 'dus-run-session < command> [args]'. That means you can start a service obexd (like bluetoothd) in the system start-up. So just by switching on the Computer ( if pairing, trusting etc... was done earlier) one can push files from Phone to computer.
>> connect <device>
Second time onwards just connection is fine. Probably you can trust the device.
>> trust <device>

ADB says 'Device Not Found' at last stage of sideloading lollipop

I'm trying to sideload Lollipop onto my Nexus 5 from the OTA zip file.
At this point, the adb recognizes the device after I plug in the USB cable, and spits out the serial number.
As I understand the instructions for sideloading, once I get to this point, I just need to reboot into recovery mode, (which works as expected) and then bypass the red exclamation point icon using "volume up and power" simultaneously. That works too.
At the point where the screen on the Nexus 5 says, "Now send the package you want to apply to the device with 'adb sideload &ltfilename&gt' I type "adb sideload + the OTA image file name", which I renamed for convenience". The file is in the platform-tools folder.
At which point the command window reports: error: device not found
So... the device is seen by the adb, but somehow is no longer found after the device reboots in recovery mode.
I've replaced all the usb drivers, enabled usb debugging and developer mode on the Nexus device. I've tried this in windows 7 and also in Linux (both from the android sdk tool kit and from an installation of Eclipse). I'm unable to get the adb to talk to the Nexus 5.
I read the android-windows usb inf file, and there is no section specifically for the Nexus 5, but I added a line under the "generic android" section with USB\VID_18D1&PID_D001 as has been suggested elsewhere for people who couldn't get the OS to see their nexus at all. My issue is not that the OS can't see it... and the adb sees it, too, until I try to sideload the OTA file in Recovery Mode.
Anyone else having this issue, or better yet... any ideas on how to solve it?
Thanks
It turns out that I had not enabled USB debugging before I tried to do this using Linux Ubuntu / Eclipse / Android SDK. So my problem was really a windows USB driver problem, I guess (though I can't be sure, since windows did see the device until I tried to transfer the file. Maybe that message was really conveying a permissions problem, too...)
I rebooted into Ubuntu and tried again and was able to transfer the update file. The only hitch I encountered at that point was to issue the sideload command as root. I didn't do that the first time I tried it, and got a message about lacking permissions.
I suspect the posted reply with a link to a universal USB inf file would have worked, but, though I'm grateful for the tip, I can't testify to that, since I managed to transfer the file without Windows.
Thanks to all who looked at this and especially to Alex P., for posting a possible solution. FW
IW, I'm glad to have finally been able to do this, but for anyone struggling to get Lollipop ahead of the OTA update... well, it's nice, but hardly worth a lot of effort.

Resources