Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get token from android App #8

Closed
pixeye33 opened this issue May 16, 2017 · 4 comments
Closed

Get token from android App #8

pixeye33 opened this issue May 16, 2017 · 4 comments

Comments

@pixeye33
Copy link

pixeye33 commented May 16, 2017

Hello,

I think i understood that i can control my vaccum only from one device at a time (home assistant or my phone).
Plus, putting the raspebberry on the vaccum network is not ideal in my case (wired raspberry).
I was wondering if there was a way to steal the token from the android app (while setting it up) ?

That way i gain controll from phone + home assistant ?

@rytilahti
Copy link
Owner

You can control it from multiple devices but you need the token for this library. It may be possible to find it somewhere in your Android installation, but I have not tried it out and for that you may need to root the device.

So the preferred way is to get the token first, and then after that connect the robot to the app.

@pixeye33
Copy link
Author

pixeye33 commented May 18, 2017

I'm not sure how once i get the token via mirobo discover, i can connect my phone ? if this works, it means the robots sends the token after the setup process ??
EDIT : found this : #5 (comment)
i guess the token stays the same and isnt "locked" untill the android setup is done.

I tried to use tcpdump on my android phone and recorded the exchange between my phone and the robot (while connected on the vaccum network)

OnePlus3T:/sdcard/Download # tcpdump port 54321 -x
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on wlan0, link-type EN10MB (Ethernet), capture size 262144 bytes

20:50:11.364753 IP android-7cd981062e935d40.38611 > 192.168.8.1.54321: UDP, length 32
        0x0000:  4500 003c 36f8 4000 4011 7260 c0a8 0807
        0x0010:  c0a8 0801 96d3 d431 0028 9192 2131 0020
        0x0020:  ffff ffff ffff ffff ffff ffff ffff ffff
        0x0030:  ffff ffff ffff ffff ffff ffff
20:50:11.372187 IP 192.168.8.1.54321 > android-7cd981062e935d40.38611: UDP, length 32
        0x0000:  4500 003c 0000 4000 4011 a958 c0a8 0801
        0x0010:  c0a8 0807 d431 96d3 0028 f24b 2131 0020
        0x0020:  0000 0000 034d db0e 0001 4bc7 7358 3857
        0x0030:  6e42 4577 5638 6552 5356 5734
20:50:11.384217 IP android-7cd981062e935d40.47393 > 192.168.8.1.54321: UDP, length 32
        0x0000:  4500 003c 36fa 4000 4011 725e c0a8 0807
        0x0010:  c0a8 0801 b921 d431 0028 9192 2131 0020
        0x0020:  ffff ffff ffff ffff ffff ffff ffff ffff
        0x0030:  ffff ffff ffff ffff ffff ffff
20:50:11.386195 IP 192.168.8.1.54321 > android-7cd981062e935d40.47393: UDP, length 32
        0x0000:  4500 003c 0000 4000 4011 a958 c0a8 0801
        0x0010:  c0a8 0807 d431 b921 0028 cffd 2131 0020
        0x0020:  0000 0000 034d db0e 0001 4bc7 7358 3857
        0x0030:  6e42 4577 >>5638 6552 5356 5734<<
20:50:11.387898 IP android-7cd981062e935d40.37691 > 192.168.8.1.54321: UDP, length 192
        0x0000:  4500 00dc 36fb 4000 4011 71bd c0a8 0807
        0x0010:  c0a8 0801 933b d431 00c8 9232 2131 00c0
        0x0020:  0000 0000 034d db0e 0001 4bc7 19d7 de9a
        0x0030:  eafe 0f56 356b 5e81 b1aa 8ec8 b8cc 0743
        0x0040:  27a3 ad6e 2e53 a464 3a74 a23d 20d4 953f
        0x0050:  384c 0125 db31 d9dc 6d4d 072c 57d2 7cd9
        0x0060:  00a0 ab30 24db 7a87 8453 b960 9151 de2a
        0x0070:  a145 a7ba 584c f8b6 2723 09e3 4cac 84b5
        0x0080:  49dc 95be 25a0 ea87 112f 175b 96cc a141
        0x0090:  fe69 0b90 7489 6e0c 42bd af30 2eee 6fe0
        0x00a0:  6f32 791e 664c a71e 19df 1255 310d e050
        0x00b0:  d695 9ec3 b347 72c6 3131 023d 0934 3ecd
        0x00c0:  7fa6 ff0f 921e 92b1 318f d5d4 7d23 a728
        0x00d0:  50b4 6ddc fa22 e275 187d 64e0
20:50:11.392306 IP 192.168.8.1.54321 > android-7cd981062e935d40.37691: UDP, length 80
        0x0000:  4500 006c 0000 4000 4011 a928 c0a8 0801
        0x0010:  c0a8 0807 d431 933b 0058 e3e9 2131 0050
        0x0020:  0000 0000 034d db0e 0001 4bc7 c469 446b
        0x0030:  5b60 737a 6ef7 88cc 5f42 a30c b8cc 0743
        0x0040:  27a3 ad6e 2e53 a464 3a74 a23d fecc b9da
        0x0050:  e847 e760 b663 25a9 905c 7faa ad4d 025d
        0x0060:  1fff 8cdb 19c2 5b4b 8f65 eb3d
20:50:15.801060 IP 10.11.0.86.42465 > 10.11.0.255.54321: UDP, length 32
        0x0000:  4500 003c e44d 4000 4011 40f9 0a0b 0056
        0x0010:  0a0b 00ff a5e1 d431 0028 15a4 2131 0020
        0x0020:  ffff ffff ffff ffff ffff ffff ffff ffff
        0x0030:  ffff ffff ffff ffff ffff ffff
20:50:15.829169 IP 10.11.0.86.42465 > 10.11.0.255.54321: UDP, length 32
        0x0000:  4500 003c e44d 4000 4011 40f9 0a0b 0056
        0x0010:  0a0b 00ff a5e1 d431 0028 4ecf 2131 0020
        0x0020:  ffff ffff ffff ffff ffff ffff ffff ffff
        0x0030:  ffff ffff ffff ffff ffff ffff
20:50:28.431991 IP 10.11.0.86.49749 > 10.11.0.255.54321: UDP, length 32
        0x0000:  4500 003c ec9a 4000 4011 38ac 0a0b 0056
        0x0010:  0a0b 00ff c255 d431 0028 15a4 2131 0020
        0x0020:  ffff ffff ffff ffff ffff ffff ffff ffff
        0x0030:  ffff ffff ffff ffff ffff ffff
20:50:28.518423 IP 10.11.0.86.49749 > 10.11.0.255.54321: UDP, length 32
        0x0000:  4500 003c ec9a 4000 4011 38ac 0a0b 0056
        0x0010:  0a0b 00ff c255 d431 0028 325b 2131 0020
        0x0020:  ffff ffff ffff ffff ffff ffff ffff ffff
        0x0030:  ffff ffff ffff ffff ffff ffff
20:50:28.626466 IP 10.11.0.78.54321 > 10.11.0.86.49749: UDP, length 32
        0x0000:  4500 003c 0000 4000 4011 25f8 0a0b 004e
        0x0010:  0a0b 0056 d431 c255 0028 0e9e 2131 0020
        0x0020:  0000 0000 034d db0e 591d ecf4 ffff ffff
        0x0030:  ffff ffff ffff ffff ffff ffff
^C
17 packets captured
17 packets received by filter
0 packets dropped by kernel

i guess my token is somewhere the responses, maybe can you tell me where ? 5638655253565734 ?

@rytilahti
Copy link
Owner

I'd assume the token is 7358 3857 6e42 4577 5638 6552 5356 5734 (without spaces).

@pixeye33
Copy link
Author

pixeye33 commented May 19, 2017

Well since i got the token with the other method and with the last 32 characters (as opposed to the 16 in the link i posted), i can now close this issue.

Many thanks 👍
(explained again what was my mistake mainly for future reference)

Added bonus, as a Home Assistant user : it works here too ! <3
image
And just for fun with an error :
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants