How to make Pepper QiSDK robot full reboot with sensor check? - android

Greeting QiSDK Pepper robot community !
We know that there is an option to make Pepper QiSDK Android to reboot with full sensor check (long reboot), but we have forgotten how to make that happen and can't find instructions.
Please help :)

The Qi SDK relies on the Android SDK, and the latter does not provide a programmatic way to reboot the device. So the short answer is that you cannot.
But with a bit of creativity and a bunch of know-how, who knows...
Though it is not documented, the API for NAO 2.8 usually works for Pepper 2.9. So you can use libqi to connect, authenticate, and call ALSystem.reboot. Note that you will be able to authenticate only if you know the password of the robot, i.e. if you own the robot.
I had other bad ideas to reboot the tablet, but as discussed in the comments, this is not relevant since you want to reboot the robot and have it do the full check-up. I keep them here for the record:
I found this page about "Device Control" that mentions rebooting a device remotely. But it comes as part of a broader framework that seems deprecated, so I doubt it works.
You could have access to the tablet via WiFi and run adb reboot remotely. But leaving the remote debugging enabled is not a good idea in terms of security.
You can certainly access such system-level methods if you root the tablet. But this is a staggering security hazard.

Related

How to analyze btsnoop_hci.log (bluetooth/android/wireshark)

I am using an android app (Feiyu ON) to controll a camera gimbal (Feiyu MG lite) manualy over bluetooth (virtual joystick for rotate right/left/up/down).
However, I would like to rotate only one step every 10 seconds for example (To do some epic timelapse!).
I thought about getting the commands that are used for rotation and build an Android app by myself.
First try was to setup another bluetooth device with an terminal, name it like the gimbal and log all commands. But the Feiyu ON-app did not like to connect to my device.
Second hope was to log all Bluetooth communications on my phone (SGS7) and analyze the btsnoop_hci.log with wireshark. Thats were you could help. I do not understand all those handshakes and commonication packages, could someone have a quick look and tell me what i am looking for?
Steps i logged:
- connect to device,rotate left with virtual joystick, wait, rotate again
Also, do you have another idea how to realize my dream?
Thanks a lot, even if you only read through all of my bad explanations :)
My btsnoop_hci.log:
https://www.dropbox.com/s/4jzi2i76t6b5m2j/btsnoop_hci.log?dl=0
It uses bluetooth LE. I think it will be better to look into Feiyu ON app first. Fresh versions are obfuscated by LLVM, but it is possible to find an older version on some alternative app stores (it looks like at least version 2.0.6 is not obfuscated).
Upd: oh, it obfuscated also, but only partially and not by such sofisticated tool.

How do you develop Android apps with Bluetooth?

How do you effectively develop, debug, and test an android app that is based on Bluetooth.
I have been googling and searing stack overflow for the answer to this question and I am not getting a clear answer.
I understand that the emulators do not support Bluetooth. I also know of various guides explaining the functions, classes, and such, and I know people have mentioned that setting up a Bluetooth emulator is possible with Virtualbox. I even came across some old projects like BT-Sim that seemed like a way to create fake BT signals (though if my android emulator doesn't support BT, it doesn't help too much)
But no solid guide on how to get this going. It just likes a few scattered puzzle peaces that need to be stitched together. It makes me wonder how app developers reliably make BT enabled apps?
Are there any guides that dissect how to do this process? I imagine the steps to accomplish are:
Create a custom emulator on Virtualbox that can simulate Bluetooth?
Get the AVD Manager to talk to this emulator so my compiled Android code will work with it
Run a Bluetooth simulator to send BT signals over a port in your computer
(I don't really know how to do either of those 3 though!)
My overall goal is as follows:
Create an app that will collect data from a Bluetooth transmitter
But first, create a simulator on my computer that can talk to my android emulator as if it were the real thing
I'll be honest, I do find it odd that the Google folks don't allow Bluetooth emulation on their AVD. I understand not allowing real telephone calls, but I don't see how Bluetooth can be abused like that.
Anyway, any help in setting up Bluetooth would be greatly appreciated and hopefully help many others out there!
NOTE: I am using the standard Eclipse + Android SDK setup with AVD to do my Android development. Planning to use API 10. However, if I need to use a different set up, I am fine. As long as it comes with a step by step guide! That would be very nice.
Old question, but it's still unanswered. If you have a physical device, that seems easiest way to go. If, like me, you don't have a device it's still possible to develop with bluetooth and android.
Download an android x86 iso, load it into virtualbox with bridged network setting and install it.
Plug in your bluetooth dongle and select the device from the 'usb' menu, alternatively you can set a device filter in the vm's settings page.
Now just use adb and connect to it, you can find the ip by going to console (alt+f1) and typing netcfg or ifconfig eth0. You may also need to type adbd on the android console - I do, but I don't see many people mention it so seems it's not always needed.
It still works with eclipse, and is much faster than the emulator. Even when I'm not doing bluetooth dev I use the vm rather than the emulator.

Android Bluetooth HID implementation on different OS

Well, I believe this should be able to be implemented on the Android.
Recently, I found some Android developers created the Android remote controller(KB/MOUSE) app by
installing an app onto the server side(could be Windows or Mac or Linux) system and interact each other by bluetooth.
However, I believe it shouldnt be necessary to install an app onto host side if
we can take advantage of standard Bluetooth HID profile.
I have implemented the Android Bluetooth HID application which can make your android device play as a bluetooth kb/mouse input device.
to control my Ubuntu without installing any host side daemon.
The engineering approach involves Bluez deeply so it doesnt work on Mac or Windows.
Please bear my lack of bluetooth knowledge. I am really curious about the possibility of this matter.
If any of you has any approach or idea about this, please kindly share.
Thank you.
well, it seems this question is not yet implemented by the developer.
However, if any of you is interested in how to do this for Linux system. Feel free to write me an email. I would be happy to share the skill.

WinPhone7 needed for a porting?

I have an android app with more than 500,000 users. I want to try to port it to WinPhone7, but I haven't any smartphone with WinPhone7. Is a real device needed to publish an app on WinPhone? Is there some developper phone?
First of all, I will say that for some scenarios, there is no real substitute for have a physical device to test against. Having said that, I would suggest that 99% of what most apps will do can be developed and test perfectly well on the emulator that comes with the developer tools.
The advantage of the emulator is that you can write and test without shelling out for the hardware and then signing up to create.msdn.com to get it (officially) unlocked, but once you are ready to deploy to the marketplace you will need to sign up anyway.
In your case, I'd say the main word in your question is "try". You don't seem confident in being able to port to the platform so the emulator route seems like the best starting point.
Your will find a Windows Phone 7 emulator in the Windows Phone SDK. You can download it for free on create.msdn.com.
There is an Android to Windows Phone API mapping tool and Windows Phone 7 Guide for Android Application Developers white paper as described on the Windows Phone Developer Blog that you should find very useful.
For getting a development device, you should reach out to Brandon Watson or your local Microsoft WP7 dev rep.
Simple answer - no, you don't. There are plenty of applications out there that were published without being tested on an actual device. Whether it's a good idea or not - that is the main question here. Depending on your application type and its behavior, you might actually need a device.
Also, another problem is the fact that the resources used by the emulator are different from the resources used by the actual device. That being said, if your application runs just fine in the emulator, it will not necessarily run the same way on a device.
You can use the WP7 emulator to test your application. But if you want to deploy it on a real phone, you will have to unlock it though the App Hub portal. That will cost you 100 dollar/year though.
As you and others have rightly pointed out, you can start porting your application using the emulator. There are differences in the emulator and real devices. In particular, to answer your question, emulator does not take pictures.
If your Android app really has half a million users, MS will happily give you a developer device (nearly) for free.
Contact #BrandonWatson or #FrankPR on Twitter.
From my experience I can tell you, that the emulator works very well. But once in a while you will stumble about a problem that you don't understand why it happens. Then you try it on the phone and it works... So... The answer is yes...not!

What's the prognosis for Bluetooth device support in the emulator?

It's pretty clear that the current emulator does not provide Bluetooth support. While there appears to be a third-party emulator available that might work it seems to come with warnings about bugs that tend to suggest that I might be better off spending my energies elsewhere. Does anyone know of progress, and perhaps even a target, for getting Bluetooth support built into the device emulator in the Android SDK Tools?
There is a workaround available though that lets you utilize your computers bluetooth and still have the benefits of debugging on the spot, so to say.
You can install a virtual machine android and have it use your onboard bluetooth. There is a readily installed image for this available, just google it. You can then have adb connect to this device as you would with any other real or virtual device, it is also described if you look it up on the net. I hope this helps.
Still, build in bluetooth support is something I would love the emulator to get enhanced by.

Categories

Resources