This is just a quick post to list out the applications that I’m aware of that use the LEDs on the Nexus Q and their priorities within the system. The priority determines which application gets to control the LEDs at any given moment. Higher numbers represent higher priority. I haven’t looked at the code close enough to see how duplicate priorities are handled, but I’m guessing that that situation is not deterministic.
I haven’t put a lot of effort into verifying whether the descriptions match reality of what the applications do. I’m sure I’ve missed applications, too. Feel free to let me know if something is off.
|Priority ||Application ||Description |
|0 / 100 ||TungstenLEDService ||Master volume. Uses 100 to override everything when volume is changing and switches to 0 otherwise. |
|5 ||Visualizer ||Displays theme-based animations. |
|10 ||NetworkLedController ||Network status indication. |
|20 ||HubBroker ||Bluetooth Pairing portion of the @home broker. |
|25 ||HubBroker ||NFC handler. |
Here’s a quick list of ways I’ve been able to control playback using the adb developer tool.
- Send media key codes.
- Send broadcast Intents.
The values for both options are listed in the following tables.
adb shell input keyevent 85
adb shell input keyevent 88
adb shell input keyevent 87
adb shell am broadcast -a com.android.music.musicservicecommand.togglepause
adb shell am broadcast -a com.android.music.musicservicecommand.next
adb shell am broadcast -a com.android.music.musicservicecommand.previous
adb shell am broadcast -a com.android.music.musicservicecommand -e command play
adb shell am broadcast -a com.android.music.musicservicecommand -e command play
asb shell am broadcast -a com.android.music.musicservicecommand -e command stop
Do the following at your own risk!
Now that we’ve got that out of the way, here are some caveats:
- The internal “SD card” will be erased (mine only contained empty folders).
- You will unpair the device from your other Android devices and will need to set it up again.
- I wouldn’t flash the boot ROM I’m providing below. I know I haven’t.
- Nexus Q
- Android Development Kit, including the adb tool and fastboot.
- Plug your USB cable between your computer that contains the Android developer kit and the Nexus Q.
- Run adb reboot-bootloader . The LED ring will stay solid red. You should also be able to do this by holding your hand over the mute LED when it boots. Just let go when the ring turns red.
- Run fastboot devices to make sure you’re connected.
- Run fastboot oem unlock to unlock the bootloader.
- Within five seconds, run fastboot oem unlock_accept . The Q will erase user data and reboot.
- Pair your Android device again with the Q.
- Turn on debug mode again.
- I also put together a new boot.img file that modifies default.propwith the following values:
- Download nexusq-boot.img.
- Run adb reboot-bootloader .
- Run fastboot boot nexusq-boot.img to start the Q with root permissions.
Now you can upload su and back your regularly scheduled Android hacking.
adb reboot recovery results in pulsing red LEDs. Touching the mute LED flashes white. I didn’t see anything show up via the HDMI connector. The only way to get out of this mode was to tap the mute LED repeatedly (about five times).
You can run the adb utility to initiate a backup, but you’ll get a prompt on the screen to approve the backup. Since there’s no keyboard, you can’t type the password and click OK. Here’s how to do it without an input device.
- Open two command prompt or terminal windows.
- Run the desired backup command in the first window, such as adb backup -apk -shared -all –system .
- Enter the following commands in the second window to trigger keypad movements (down, right, and enter):
adb shell input keyevent 20
adb shell input keyevent 22
adb shell input keyevent 23
You'll now have a backup file named backup.ab on your local machine.
Here’s a really quick introduction on turning on debug mode for the Nexus Q.
- Micro AB USB cable (careful with that connector!)
- An Android device with the Nexus Q application installed
- You may need an Android tablet, see Troubleshooting below.
- On your Android device, turn on USB debugging in the device settings.
Set up the Nexus Q on your network by installing the Nexus Q application on an Android device. Start the application, and then select your Nexus Q device. Select Advanced. Under USB debugging, move to slider to ON. Go back to the previous screen. Plug on end of the USB cable into the Nexus Q and the other into your computer.
- Go to Settings, and then scroll down to Developer Options.
- Slide Developer options to ON.
- Check USB debugging.
- If you can’t see the USB debugging option in the Nexus Q application, You will need to turn on USB debugging in the Android device settings first (not the Q application, the main device settings control panel).
- I could only see this option on the Nexus 7 tablet, not on my Nexus Galaxy phone. The Nexus 7 had the USB debugging turn on in the main settings by default. Thanks to Ryan Warner for figuring this out.
Since I missed the May Home Automation Month, I really need to make up for it somehow. So here’s a quick video of Remoat (http://remoat.com), a little utility I’ve been putting together in my spare time. It’s not really production-ready, but I’ll make the source available for the hackers out there.
Currently it needs/supports the following:
- Windows Media Player: Plays music from your library.
- MiCasaVerde Vera: Allows you to turn on binary devices, such as lights that you’ve got configured.
- mControl 2.X: There’s some old code in the package from when I was running mControl on my WHS box (which had sequential disk failures and in the end killed my RAID –> switched to a QNAP NAS). Unsupported.
- Windows Vista/7 speech recognition: This is required (part of the operating system anyway).
- Windows text-to-speech: You can specify which audio device is used for speech output. This lets you hook up a pair of speakers that are always on and have the PC hooked up to you’re a/V system for better quality playback. Part of the operating system.
OK, so I started “home automation month” last year in May then went ahead and immediately missed it this year. To make up for this grievous error, I put together a plug-in for the Vera home automation device that allows you to remote control a Yamaha RX-V3800 receiver.
You’ll need a Yamaha RX-V3800 A/V receiver (or compatible unit, such as the RX-V1800 or HTR-6190), an Ethernet-to-serial adapter to hook it up to your network, and of course a Vera unit.
The download and additional information can be found on the project page at http://code.mios.com/trac/mios_yamaha-plugin .
Nexus Q... Another Google IO giveaway. Problems so far:
- Only getting 2 channel stereo for movies. Unacceptable.
- Continuous buffering issues on a 30M cable connection. Unacceptable.
- No basic remote. I need to unlock an Android device just to hit pause. Unacceptable.
- Both my tablet and phone are now stating that my account isn't allowed to make changes. Unacceptable.
- MAC address not printed on device or box. A pain to set up my firewall and WLAN since they limit access by MAC address.
On the other hand:
- Design. Nice. Funky.
- I can turn off the the LEDs. Excellent.
- Integrated power supply. Yes, please.
- HDMI connector. Thank you.
Overall, I'm here trying to watch a movie and... I don't have an option to download (to avoid the buffering issues), and it stops every few seconds to buffer. Sorry, but #fail.
Update: So I got bored waiting for the buffering and decided to check Google+ and watched a YouTube video. Now I can't continue watching the movie. All I get is a message stating "Playback stopped because you began playing this video on another device." #epicfail
Update 2: Did I mention the fact that I can't configure the Q anymore? Yes, I did. All I get is a message stating "Only the owner of this Nexus Q can modify its settings." As far as I know, I didn't rent it for 24h, it was given to me. Do I really need to pull up the Android SDK to reset the damn thing to get it working again, like I had to do with the Samsung Galaxy Tab?
Update 3: I ended up finishing the movie using Google Play / YouTube. But guess what? I paid for HD and YouTube only provided me with a 480 quality stream.
Update 4 (7/10/2012): Just got an email from Google that they've refunded my rental based on the issue I had. Plus one for Google. I stopped using the PlayStation Store for anything a long time ago when they declined to refund me for a movie that simply wouldn't play and they couldn't solve the issue.
Despite what all the tech blogs and even Samsung’s own site states, the Chromebox that was handed out today actually has an Intel Core i5 inside instead of the stated Intel® Celeron® Processor B840 running at 1.9 GHz.
This is what the system info reports:
Intel(R) Core(TM) i5-2450M CPU @ 2.50GHz
(The sticker on the side was the giveaway.)
I know I bashed Google after last year’s Android tablet release of the Samsung Galaxy Tab, and I still stand behind that. In fact, the situation got worse. I ended up having to use the Android developer kit to reset the device every few weeks after it got stuck in an infinite boot loop. This was made worse by the fact that I’d bought a case and keyboard dock for the tablet, and I effectively had a brick on my hands. Though, it must be said that the Google IO units were prerelease specimens with custom firmware for developers.
In any case, things look much brighter this year. The Asus-built Nexus 7 is a solid unit and Android 4.1 addresses my main concern, namely the smoothness of the user experience. I’ve only had a chance to play around with it for a day, but it’s night and day compared to other Android devices I’ve used in the past. I’d even go so far as to extend that to the Samsung Nexus Galaxy that was handed out, too (but I' haven’t been able to use it as a phone yet since I don’t have a micro SIM to mini SIM adapter).
Now if there was only a public SDK for the Nexus Q so I could add it to my home automation system…