FORUMS
Remove All Ads from XDA

Wink Hub root

45 posts
Thanks Meter: 29
 
By FreeFly, Member on 10th December 2014, 09:47 PM
Post Reply Email Thread
11th December 2014, 12:45 PM |#11  
OP Member
Thanks Meter: 29
 
Donate to Me
More
Quote:
Originally Posted by automonkey

It doesn't seem to be taking my key? I can't ssh into it.
disconnected: no supported authentication methods available (server sent publickey)?

Did you try the passwordless method?
 
 
11th December 2014, 01:02 PM |#12  
OP Member
Thanks Meter: 29
 
Donate to Me
More
Quote:
Originally Posted by electronichamsters

Do you think you can use his Android app to figure out how to send HTTP posts to the Wink hub?

Pretty easy. His API is https://github.com/nashira/blink/blo...ands/index.php It's really a wrapper for the aprontest command. Pretty easy to use python to send JSON messages to the commands/index.php. Play with aprontest by itself for a bit first and you'll understand how to use it to switch and dim the lights:
http://gtvhacker.com/index.php/Wink_...80%8B%E2%80%8B

Then you'll understand you just send a command (update) with the master id for the light you want to switch, and value id (1 for dim, 2 for on/off), and a corresponding value (1-255 for dim / ON or OFF) wrap it in JSON and send to command/index.php



I'm going to write some code to do this myself so I'll post some samples here when I do.
11th December 2014, 01:37 PM |#13  
Senior Member
Thanks Meter: 48
 
More
Really?? They already patched it?
11th December 2014, 04:11 PM |#14  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by electronichamsters

Qnology, when did that happen? Is it on the "wink-hub-images.s3.amazonaws.com/00.01/app-rootfs.ubi"? I just manually updated my rooted hub today with that .ubi file. Wonder if I upgraded to 0.33 or 0.47?? I don't even know how to find out.

I guess yesterday. I upgraded a new out of box Win Hub using the iOS Wink App thinking that I would get 00.33. When I ran the curl command against dev_detail.php and received a 404, I checked my iOS Wink app and it showed that the Hub was on firmware 00.47.
11th December 2014, 05:03 PM |#15  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by FreeFly

Did you try the passwordless method?

Yes I got that to work via Rezurok's cmd.php, doing it via curl on windows in a command window wasn't giving me anything useful for feedback, whereas the cmd.php let me know it was pissy because it was too short. I've got it working now.
11th December 2014, 07:38 PM |#16  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by electronichamsters

Qnology, when did that happen? Is it on the "wink-hub-images.s3.amazonaws.com/00.01/app-rootfs.ubi"? I just manually updated my rooted hub today with that .ubi file. Wonder if I upgraded to 0.33 or 0.47?? I don't even know how to find out.

Run an MD5sum against your app-rootfs.ubi if the md5sum is 55574706f2cbf4f6e17e4d224b63287d then you have version 47. I don't havre the 33 md5sum in front of me I'll post it if I can find it...

---------- Post added at 02:38 PM ---------- Previous post was at 02:20 PM ----------

Quote:
Originally Posted by berserko

Run an MD5sum against your app-rootfs.ubi if the md5sum is 55574706f2cbf4f6e17e4d224b63287d then you have version 47. The MD5sum for 33 is eec07feee1fa1a4a06e05a00af18156f

I found the update went live at:

2014-12-10T22:16:58.000Z

I assume Z means zulu so 5:16pm eastern?
11th December 2014, 11:04 PM |#17  
Junior Member
Thanks Meter: 0
 
More
Here is the commands I used to upgrade my pre-rooted Wink for 33 to 47

Hope this helps:
Code:
echo "1" > /database/DO_UPDATE
reboot
Once it comes back in upgrade mode I ran the following:
Code:
cd /tmp
echo "127.0.0.1       localhost" > /etc/hosts
echo "127.0.0.1       flex-dvt" >> /etc/hosts
wget hXXp://wink-hub-images.s3.amazonaws.com/00.01/app-rootfs.ubi <--- Fix the URL forum is breaking it on me...
ubiformat /dev/mtd5 -f /tmp/app-rootfs.ubi
ubiattach -p /dev/mtd5
mkdir /tmp/updater
mount -t ubifs ubi2:rootfs /tmp/updater
sed -i 's/=-sg/=/' /tmp/updater/etc/default/dropbear
rm -f /tmp/updater/etc/init.d/S99local
cp /var/www/set_dev_value.php /tmp/updater/var/www
fw_setenv bootdelay 5
sed -i 's/bootdelay       0/bootdelay       5/' /database_default/u-boot.env
cp /etc/shadow /tmp/updater/etc
mkdir /tmp/updater/root/.ssh
cp /root/.ssh/authorized_keys /tmp/updater/root/.ssh/authorized_keys
echo "127.0.0.1       hub-api.winkapp.com"  >> /tmp/updater/etc/hosts
echo "127.0.0.1       hub-updates.winkapp.com" >> /tmp/updater/etc/hosts
echo "127.0.0.1       wink-hub-images.s3.amazonaws.com" >> /tmp/updater/etc/hosts
sed -i 's/rm \/database\/wpa_supplicant.conf/echo WPA Fix #rm \/database\/wpa_supplicant.conf/' /tmp/updater/etc/init.d/S31platform
sed -i 's/#ttyAM0/ttyAM0/' /tmp/updater/etc/inittab
echo "00.01" > /database/cf_build
echo "00.01" > /database/cf_fver2
echo "00.47" > /database/cf_fver3
echo "127.0.0.1       hub-api.winkapp.com"  >> /etc/hosts
echo "127.0.0.1       hub-updates.winkapp.com" >> /etc/hosts
echo "127.0.0.1       wink-hub-images.s3.amazonaws.com" >> /etc/hosts
echo "0" > /database/DO_UPDATE
reboot
Once the reboot completes the device will come back online as version 47 This worked fine for me but as always YMMV. The script keeps creates enough holes you should be able to get back in one way or another...
12th December 2014, 01:32 AM |#18  
Junior Member
Thanks Meter: 0
 
More
681
Starting from a new in box Wink Hub, is there anything I need to do before hand to make sure I can SSH into the "upgrade mode" partition? It'a not clear if people are using a Serial Console connection to access the "upgrade mode" partition or if they are SSHing in. For SSH access, I would assume the authorized_keys file needs to be updated (so the upgrade mode partition would need to be mounted and updated). Just need some confirmation. Thank you


Quote:
Originally Posted by berserko

Here is the commands I used to upgrade my pre-rooted Wink for 33 to 47

Hope this helps:

Code:
echo "1" > /database/DO_UPDATE
reboot

12th December 2014, 01:57 AM |#19  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by berserko

Run an MD5sum against your app-rootfs.ubi if the md5sum is 55574706f2cbf4f6e17e4d224b63287d then you have version 47. I don't havre the 33 md5sum in front of me I'll post it if I can find it...[COLOR="Silver"]

I ran a MD5sum on the copy of app-rootfs.ubi that I downloaded from the the amazon aws link sometime on dec 10th. It is "eec07feee1fa1a4a06e05a00af18156f".

I have no idea if it's v0.33 or 0.47. If someone else has a file they're sure is 0.33, can they run a MD5sum on it?
12th December 2014, 02:13 AM |#20  
Junior Member
Thanks Meter: 1
 
More
If I rooted and never updated, so I have original firmware, can I use the method you described to go straight to 47?

Thanks
Jeff


Quote:
Originally Posted by qnology

Starting from a new in box Wink Hub, is there anything I need to do before hand to make sure I can SSH into the "upgrade mode" partition? It'a not clear if people are using a Serial Console connection to access the "upgrade mode" partition or if they are SSHing in. For SSH access, I would assume the authorized_keys file needs to be updated (so the upgrade mode partition would need to be mounted and updated). Just need some confirmation. Thank you

12th December 2014, 03:00 AM |#21  
Junior Member
Thanks Meter: 0
 
More
Quote:
Originally Posted by electronichamsters

I ran a MD5sum on the copy of app-rootfs.ubi that I downloaded from the the amazon aws link sometime on dec 10th. It is "eec07feee1fa1a4a06e05a00af18156f".

I have no idea if it's v0.33 or 0.47. If someone else has a file they're sure is 0.33, can they run a MD5sum on it?



eec07feee1fa1a4a06e05a00af18156f is version 33

---------- Post added at 10:00 PM ---------- Previous post was at 09:51 PM ----------

Quote:
Originally Posted by qnology

Starting from a new in box Wink Hub, is there anything I need to do before hand to make sure I can SSH into the "upgrade mode" partition? It'a not clear if people are using a Serial Console connection to access the "upgrade mode" partition or if they are SSHing in. For SSH access, I would assume the authorized_keys file needs to be updated (so the upgrade mode partition would need to be mounted and updated). Just need some confirmation. Thank you

I have ran the following commands to my update partition to make sure I retain access:

Code:
ubiattach -p /dev/mtd2
mkdir /tmp/updater
mount -t ubifs ubi2:rootfs /tmp/updater
sed -i 's/=-sg/=/' /tmp/updater/etc/default/dropbear
rm -f /tmp/updater/etc/init.d/S99local
cp /var/www/set_dev_value.php /tmp/updater/var/www
fw_setenv bootdelay 5
sed -i 's/bootdelay       0/bootdelay       5/' /database_default/u-boot.env
echo "127.0.0.1       hub-api.winkapp.com"  >> /tmp/updater/etc/hosts
echo "127.0.0.1       hub-updates.winkapp.com" >> /tmp/updater/etc/hosts
echo "127.0.0.1       wink-hub-images.s3.amazonaws.com" >> /tmp/updater/etc/hosts
mkdir /tmp/updater/root/.ssh
cp /root/.ssh/authorized_keys /tmp/updater/root/.ssh/authorized_keys
cp /etc/shadow /tmp/updater/etc
sed -i 's/rm \/database\/wpa_supplicant.conf/echo WPA Fix #rm \/database\/wpa_supplicant.conf/' /tmp/updater/etc/init.d/S31platform
sed -i 's/#ttyAM0/ttyAM0/' /tmp/updater/etc/inittab
I use serial for access but ssh works just as well.
Post Reply Subscribe to Thread

Guest Quick Reply (no urls or BBcode)
Message:
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes