Feel the Sweet Pain
So far, I’ve learned some painful, hard-fought, lessons in the last two days. I was initially able to register my DeepLens device with AWS Cloud, no problem. The first hiccup I encountered was when I tried to push one of the pre-made models down to the device. They simply would not go, and there are no logs to look at, as that might be too helpful. So, thinking like a DeepLens device myself, I reasoned I probably screwed-up the IAM roles when I tried to register the device (later I learned my assumption was spot-on). To correct the model push problem I was having, I Deregistered the device hoping I could simply go through the Registration process again making sure my IAM Roles were properly configured. And wouldn’t you know the dang wifi on the device stopped working preventing me from logging in to the device to re-register it with the cloud.
The way the DeepLens currently works is that you can only configure it (and upload the certificates it needs to identify itself with your AWS Account) by using it’s on-board wifi and pointing your web browser (on another computer) to http://192.168.0.1. I still can’t get over how odd this is – not sure what Amazon was thinking with this 🙂 . I think it’s odd because my first inclination is to treat the DeepLens like a first-class computer, meaning I have my keyboard, mouse and monitor connected to it. Why would I need to configure it from another computer over wifi? OMG so funny!!
Whither Went My DeepLens Wifi
So the wifi simply would not come on again, as life’s ironies often dictate. So my girlfriend and I went out to Best Buy in 20 degree weather (I bet your girlfriend wouldn’t do that) to buy a USB Hub and a USB-to-Ethernet connector, the idea being that if I could get the device online over ethernet, maybe I could configure this thing that way. Using a hard-wired ethernet connection, my DeepLens was back online, but now with an IP Address of 192.168.1.13. The instructions say to connect to your device console using http://192.168.0.1. Being the contrarian that I am, I tried to connect using http://192.168.1.13 – yeah, no dice. In fact, I could not even find anything running on port 80 of the device at this point. What had I done?!?
AWS guys, I’d totally put an ethernet port in the back of this device.
After poking around a bit, I found the awscam software in /opt/awscam. It looks to me like the DeepLens console is just a nodejs app that is served by some python scripts in the daemon-scripts directory. And wouldn’t you know, those scripts are hard-coded to bind the nodejs app to the wifi device and to run on port 192.168.0.1. I’m dying here. Ok, so I either have to figure out how to modify the daemon python scripts to use the eth0 device and bind to 192.168.1.13, or I have to get the on-board wifi working again.
Luckily, I saw a mention on the AWS forum about a possible Linux Kernel incompatibility with the DeepLens wifi hardware, so I decided to try the path of getting the wifi hardware working again by reverting to an older Linux Kernel, if one even existed – I didn’t know at this point. The following video got me over the hardest piece of solving how to boot an older Ubuntu Kernel:
The GRUB Loader does not display upon reboot in the DeepLense by default, so my first step was to get the GRUB Menu to show:
- edit /etc/default/grub
- comment out GRUB_HIDDEN_TIMEOUT
- set GRUB_TIMEOUT=-1
- sudo update-grub (or do it as root)
Once the device reboots you will finally see the GRUB menu – fantastic! Select advanced settings, then select the 4.10.17+ kernel. Once rebooted, the on-board wifi should be working again and the little blinky middle light should be happy again. Now you should be back on track to register your device per the AWS instructions. And if you ever need the happy blinking middle wifi light again, the setup pin hole in the back of the camera should work as long as you are running the correct Linux Kernel.
I’m not positive the kernel is the problem, but I am positive these steps worked for me. And how did I get kernel 4.13.0-26-generic installed in the first place? I’m not even sure. I did try to update my device, and maybe that was the start of the problem? I’m not sure.
Anyway, I am now able to download the pre-built Face-Detection Project to my device, as seen here:
At this rate, it’s doubtful I’ll get anything built by the hackathon deadline, but it’s kind of fun messing with the hardware.
This Armin Van Buuren Ibiza set is so tight. Love it, especially around minute 40!