kairoaraujo / kodak-smart-home

Kodak Smart Home integration for Home Assistant
Apache License 2.0
7 stars 3 forks source link

Additional info #16

Open joer293 opened 1 year ago

joer293 commented 1 year ago

I know this is a stale project, but I wanted to provide URL’s that are available if you want to add features to this integration. I can’t find anyone else interested in these findings.

These are all local, using the IP of the camera. Works against c525’s.

/?req=get_mac_address

/?req=melody_vol &value=2

/?req=get_caminfo

/?req=get_pu_signal_strength

/?req=set_flipup&value=1 (1=ceiling mount, 0 normal.)

/?req=set_flicker&value=50 (value in hertz 50 or 60)

/?req=set_night_vision&value=0 (0=auto, 1=on, 2=off)

/?req=set_motion_source&value=0&schedule=0 (0=off, 1=on, )

/?req=set_motion_sensitivity&value=1 (low=1, medium=3, high=5)

/?req=set_motion_storage&value=1 (1=cloud, 0=SD)

/?req=set_motion_snapshot_storage&value=1 (1=cloud upload, 0=off)

/?req=auto_rm_clip&value=0&clips=10 (0=don’t delete 1=delete)

/?req=set_sound_detection&value=0&sensitivity=1&schedule=0 (0=off, 1=on, )

/?req=set_sound_detection&value=1&sensitivity=3 (1=low, 3=medium, 5=high)

/?req=set_temp_detection&value=0&type=3 (0=off, 1=on)

/?req=set_resolution&value=480 (480=normal. 720=HD)

/?req=set_blue_led&enable=0&on_time=180&red_led_affect=0 (0=off, 1=on)

/?req=homemode_advise_setting&interval=1440&threshold=20&enable=1 (0=disable, 1=enable)

/?req=pair_stop&silence=1 (restart camera)

/?req=get_temp_humid

req=set_sec_type&value=1

/?req=get_session_key&mode=local&port1=55390&ip=xxx.xxx.xxx.xxx&streamname=C9CBBB22B6E94B43DDD160209C2XXX_8

With the session key URL this returns a valid SIP based live video feed with the key to authenticate with.

trullock commented 1 year ago

Did you find the urls of the cloud streams?

joer293 commented 1 year ago

get_session_key returns the SIP parameters to start a video connection. I can see it on Wireshark, but I'm not that familiar with how to start a SIP session. It looks very similar to how other doorbell cameras work.

trullock commented 1 year ago

Thanks for you help. I'll have a play and report back what what I can get to work

kairoaraujo commented 1 year ago

Awesome folks! Thanks I'm a little busy. We can make it work again and better.

ip0p commented 1 year ago

Hey really cool finds! Does anyone know how the SIP stuff works?

sbeukers commented 10 months ago

On the Kodak site: https://support.kodaksmarthome.com/hc/en-us " Dear valued Customers, We regret to inform you that as of September 1st, 2023, we have officially sunset our Smart Home product line. " Anyone else interested in getting this to work? There must be a way to get the stream out of this camera.

And hopefully get a simple integration to work.

trullock commented 10 months ago

Maybe they're more likely to expose how it works now? Who knows. My kids will be old enough to not need this by the time it's solved haha. A simple esp32 cam would be a much better solution

sbeukers commented 10 months ago

Maybe they're more likely to expose how it works now? Who knows. My kids will be old enough to not need this by the time it's solved haha. A simple esp32 cam would be a much better solution

That is not what it's about haha. Off course you would be better off buying a complete PTZ dome camera from axis but there is no fun in that.

joer293 commented 10 months ago

now that the cloud SIP service is no longer available, you'll have to use the local rtsp stream. The camera's has a basic MAC address firewall in the code, so once the camera's are connected to the parent unit, spoof the parent unit's Mac address and you'll be able to do a regular rtsp to the IP of the camera.

sbeukers commented 10 months ago

This one is not mentioned yet /?req=get_url

sbeukers commented 10 months ago

now that the cloud SIP service is no longer available, you'll have to use the local rtsp stream. The camera's has a basic MAC address firewall in the code, so once the camera's are connected to the parent unit, spoof the parent unit's Mac address and you'll be able to do a regular rtsp to the IP of the camera.

Well the android app is still working locally and is not using a spoofed MAC.. I'm having a bit of trouble reading the phones packets with Wireshark. edit: I tried using a proxy with a rule changing phoneip to proxyip which does work but I get no http responses anymore only unreadable udp packets

joer293 commented 10 months ago

I have ios. If you have the apk file, there are a couple free android decompilers online. Could run it through one and search for The url’s or connection code sections.

sbeukers commented 10 months ago

CLOSE_P2P_CMD = "close_p2p_rtsp_stun"; CLOSE_P2P_CMD_PARAMS = "&streamname=%s"; COMMAND_PREFIX = "req=";

GET_MAC_ADDRESS_CMD = "get_mac_address"; GET_P2P_CHANNEL_MODE_CMD = "p2p_ses_mode_get"; GET_P2P_CHANNEL_MODE_PARAMS = "&streamname=%s";

OPEN_P2P_COMBINE_SESSION_PARAMS = "&mode=combine&port1=%d&ip=%s&streamname=%s"; OPEN_P2P_LOCAL_SESSION_PARAMS = "&mode=local&port1=%d&ip=%s&streamname=%s"; OPEN_P2P_RELAY_SESSION_PARAMS = "&mode=relay"; OPEN_P2P_REMOTE_SESSION_PARAMS = "&mode=remote&port1=%d&ip=%s&streamname=%s"; OPEN_P2P_SESSION_CMD = "get_session_key"; OPEN_P2P_SESSION_T_CMD = "get_session_key_t"; OPEN_P2P_SESSION_T_PARAMS = "&yr=%d&ts=%d";

SET_P2P_CHANNEL_MODE_CMD = "p2p_ses_mode_set"; SET_P2P_CHANNEL_MODE_PARAMS = "&value=%d&streamname=%s";

There are 4 modes available Local, Relay, Remote and Combine All call the getPublic_ip and getPublic_port except Local which calls getLocal_ip and getLocal_port.

I'll keep digging

trullock commented 10 months ago

In for solving this, I dont have time to dig like you guys but happy to test potential solutions

sbeukers commented 10 months ago

Got something new to play with:

COMMAND_PANTIL_DOWN = "motor_down"; COMMAND_PANTIL_LEFT = "motor_left"; COMMAND_PANTIL_RIGHT = "motor_right"; COMMAND_PANTIL_STOP = "motor_stop"; COMMAND_PANTIL_UP = "motor_up"; COMMAND_PANTILT_TIME_PARAM = "&time=";

for example http://xxxxx/?req=motor_left&time=1

Have a play ;)

vampywiz17 commented 9 months ago

I hope somebody found something! Now that the cloud access are gone, it would be a really good solution to catch the local stream!

sbeukers commented 9 months ago

Does anyone has a way to force the android app to function in 'offline mode'? So without the login (doesn't work anymore)

spamoom commented 9 months ago

@sbeukers don't suppose you found the const for melody args did you? I've tried 'set_melody' and 'melody' with 'value=0|1' with no success

sbeukers commented 9 months ago

@sbeukers don't suppose you found the const for melody args did you? I've tried 'set_melody' and 'melody' with 'value=0|1' with no success

Here you go

/?req=melody_vol (show volume) /?req=melody_vol&value=3 (set volume (0 - 5)) /?req=melody1&duration=1 (melody 1-5 and duration 1=5 2=10 3=15) /?req=melodystop (melody stop)

sbeukers commented 9 months ago

Also important because there is no official way to connect through your router anymore now. /?req=get_caminfo ssid1=Primary SSID ssid2=Secundary SSID ssid3=Current SSID

UPDATE_WIFI_INFO_CMD = "change_router_info"; UPDATE_WIFI_INFO_PARAMS = "&ssid=%s&password=%s"; UPDATE_WIFI_INFO_PARAM_SSID = "&ssid=%s&password=%s";

/?req=change_router_info&ssid=MYWIFI&password=TEST

/?req=get_url

URL_SET_CMD = "url_set"; URL_SET_PARAMS = "&api_url=%s&mqtt_url=%s&ntp_url=%s&rms_url=%s&stun_url=%s&ana_url=%s"; URL_SET_PARAMS_LEGACY = "&api_url=%s&mqtt_url=%s&ntp_url=%s&rms_url=%s&stun_url=%s";

/?req=url_set&api_url=xxxx&mqtt_url=xxxx&ntp_url=xxxx&rms_url=xxxx&stun_url=xxxx&ana_url=xxxx

If you have a repeater. (Can we tap into this?)

EDIT RPT_PASSWORD = "admin"; RPT_USERNAME = "admin"; EDIT SET_REPEATER_INFO_CMD = "set_repeater_info"; SET_REPEATER_INFO_PARAM_MAC_ADDR = "&rp_mac_addr="; SET_REPEATER_INFO_PARAM_MODEL = "&rp_model="; SET_REPEATER_INFO_PARAM_NAME = "&rp_name="; SET_REPEATER_INFO_PARAM_PASS = "&rp_pass="; SET_REPEATER_INFO_PARAM_PASS_BASE64 = "&rp_pass_base64="; SET_REPEATER_INFO_PARAM_PREFER_CONN = "&prefer_conn="; SET_REPEATER_INFO_PARAM_SSID = "&rp_ssid="; SET_REPEATER_INFO_PARAM_SSID_BASE64 = "&rp_ssid_base64="; SET_REPEATER_INFO_PARAM_VERSION = "&rp_version=";

spamoom commented 9 months ago

@sbeukers don't suppose you found the const for melody args did you? I've tried 'set_melody' and 'melody' with 'value=0|1' with no success

Here you go

/?req=melody_vol (show volume) /?req=melody_vol&value=3 (set volume (0 - 5)) /?req=melody1&duration=1 (melody 1-5 and duration 1=5 2=10 3=15) /?req=melodystop (melody stop)

Hero - thank you, time to get this connected to my Home Assistant + Alexa!

eightball011854 commented 9 months ago

In need of some major help. Had to reset the camera due to the parent unit not connecting and now I have no way to pair to the router since the app is no longer online. Am I SOL or does anyone have a viable work around.

trullock commented 9 months ago

@eightball011854 ughh sorry youre in a mess. I dont have a solution but thanks for raising awareness for the rest of us

sbeukers commented 9 months ago

In need of some major help. Had to reset the camera due to the parent unit not connecting and now I have no way to pair to the router since the app is no longer online. Am I SOL or does anyone have a viable work around.

Well I am not going to replicate you ;) but I will try to help you. If you restart the camera unit can you find one of the following SSID's? Or maybe press the pairing mode. SSID_CHERISH_ALECTO = "AlectoCam-C"; SSID_CHERISH_KODAK = "KodakCam-C"; SSID_REPEATER = "KodakRangeExtender-"

If you do, is it a secure connection? Can you connect with it with a pc or phone?

If you can connect we have to find the ip/range and adress. Maybe do a IPscan when connected.

Then try: http://foundip/?req=change_router_info&ssid=YOURSSID&password=YOURPASSWORD

Let's see how far you can go with this info EDIT Found some additional info. Maybe worth mentioning. CAMERA_IP_0 = "192.168.222.1"; CAMERA_IP_1 = "192.168.193.1"; CAMERA_SSID_DEFAULT = "Camera-V"; CAMERA_SSID_ENCRYPTED = "Camera-VA";

eightball011854 commented 9 months ago

In need of some major help. Had to reset the camera due to the parent unit not connecting and now I have no way to pair to the router since the app is no longer online. Am I SOL or does anyone have a viable work around.

Well I am not going to replicate you ;) but I will try to help you.

If you restart the camera unit can you find one of the following SSID's?

Or maybe press the pairing mode.

SSID_CHERISH_ALECTO = "AlectoCam-C";

SSID_CHERISH_KODAK = "KodakCam-C";

SSID_REPEATER = "KodakRangeExtender-"

If you do, is it a secure connection?

Can you connect with it with a pc or phone?

If you can connect we have to find the ip/range and adress.

Maybe do a IPscan when connected.

Then try:

http://foundip/?req=change_router_info&ssid=YOURSSID&password=YOURPASSWORD

Let's see how far you can go with this info

EDIT

Found some additional info. Maybe worth mentioning.

CAMERA_IP_0 = "192.168.222.1";

CAMERA_IP_1 = "192.168.193.1";

CAMERA_SSID_DEFAULT = "Camera-V";

CAMERA_SSID_ENCRYPTED = "Camera-VA";

Amazing, I will give this a shot and report back if it works!

eightball011854 commented 9 months ago

In need of some major help. Had to reset the camera due to the parent unit not connecting and now I have no way to pair to the router since the app is no longer online. Am I SOL or does anyone have a viable work around.

Well I am not going to replicate you ;) but I will try to help you. If you restart the camera unit can you find one of the following SSID's? Or maybe press the pairing mode. SSID_CHERISH_ALECTO = "AlectoCam-C"; SSID_CHERISH_KODAK = "KodakCam-C"; SSID_REPEATER = "KodakRangeExtender-" If you do, is it a secure connection? Can you connect with it with a pc or phone? If you can connect we have to find the ip/range and adress. Maybe do a IPscan when connected. Then try: http://foundip/?req=change_router_info&ssid=YOURSSID&password=YOURPASSWORD Let's see how far you can go with this info EDIT Found some additional info. Maybe worth mentioning. CAMERA_IP_0 = "192.168.222.1"; CAMERA_IP_1 = "192.168.193.1"; CAMERA_SSID_DEFAULT = "Camera-V"; CAMERA_SSID_ENCRYPTED = "Camera-VA";

Amazing, I will give this a shot and report back if it works!

once I connect to the network, which is unsecured, and have the IP (1.2.168.222.2 and 192.168.222.1), i go into a browere and use the http://foundip/?req=change_router_info&ssid=YOURSSID&password=YOURPASSWORD, but nothing happens

sbeukers commented 9 months ago

In need of some major help. Had to reset the camera due to the parent unit not connecting and now I have no way to pair to the router since the app is no longer online. Am I SOL or does anyone have a viable work around.

Well I am not going to replicate you ;) but I will try to help you. If you restart the camera unit can you find one of the following SSID's? Or maybe press the pairing mode. SSID_CHERISH_ALECTO = "AlectoCam-C"; SSID_CHERISH_KODAK = "KodakCam-C"; SSID_REPEATER = "KodakRangeExtender-" If you do, is it a secure connection? Can you connect with it with a pc or phone? If you can connect we have to find the ip/range and adress. Maybe do a IPscan when connected. Then try: http://foundip/?req=change_router_info&ssid=YOURSSID&password=YOURPASSWORD Let's see how far you can go with this info EDIT Found some additional info. Maybe worth mentioning. CAMERA_IP_0 = "192.168.222.1"; CAMERA_IP_1 = "192.168.193.1"; CAMERA_SSID_DEFAULT = "Camera-V"; CAMERA_SSID_ENCRYPTED = "Camera-VA";

Amazing, I will give this a shot and report back if it works!

once I connect to the network, which is unsecured, and have the IP (1.2.168.222.2 and 192.168.222.1), i go into a browere and use the http://foundip/?req=change_router_info&ssid=YOURSSID&password=YOURPASSWORD, but nothing happens

Ok we got quite far I think on the first try. Witch SSID did you find? Dit you need to push the pair button?

Can you try: http://xxx/?req=get_caminfo EDIT I know i keep edditing ;) Can you just for the sake of it also try set_router_info? EDIT

And did/do you get any response or nothing at all? 0 usually means ok -1 means that the command is wrong

While connected can you do a portscan for all open ports 1-65535

If the app can do it we should also be able to. I'll keep digging (I know that we can add an alternate ssid also in the app) EDIT And also please try this: http://foundip/?req=change_router_info&ssid=YOURSSID1&password=YOURPASSWORD1&ssid=YOURSSID2&password=YOURPASSWORD2 EDIT

vampywiz17 commented 9 months ago

anybody found the rtsp stream, or any possiblity to access the video stream?

sbeukers commented 9 months ago

In need of some major help. Had to reset the camera due to the parent unit not connecting and now I have no way to pair to the router since the app is no longer online. Am I SOL or does anyone have a viable work around.

Well I am not going to replicate you ;) but I will try to help you. If you restart the camera unit can you find one of the following SSID's? Or maybe press the pairing mode. SSID_CHERISH_ALECTO = "AlectoCam-C"; SSID_CHERISH_KODAK = "KodakCam-C"; SSID_REPEATER = "KodakRangeExtender-" If you do, is it a secure connection? Can you connect with it with a pc or phone? If you can connect we have to find the ip/range and adress. Maybe do a IPscan when connected. Then try: http://foundip/?req=change_router_info&ssid=YOURSSID&password=YOURPASSWORD Let's see how far you can go with this info EDIT Found some additional info. Maybe worth mentioning. CAMERA_IP_0 = "192.168.222.1"; CAMERA_IP_1 = "192.168.193.1"; CAMERA_SSID_DEFAULT = "Camera-V"; CAMERA_SSID_ENCRYPTED = "Camera-VA";

Amazing, I will give this a shot and report back if it works!

once I connect to the network, which is unsecured, and have the IP (1.2.168.222.2 and 192.168.222.1), i go into a browere and use the http://foundip/?req=change_router_info&ssid=YOURSSID&password=YOURPASSWORD, but nothing happens

Did it work?

eightball011854 commented 9 months ago

@sbeukers

http://192.168.222.1/?req=get_caminfo got me the following results

get_caminfo: flicker=60&flipup=0&fliplr=0&brate=500&svol=2&mvol=22&wifi=100&bat=14&hum=-1&tem=-273&hum_float=-1.0&tem_float=-273.0&storage=1&md=0:0:3:0&sd=0:2:3:0&td=0:3:1529:0&lbd=1:0:1:0&ir=0&lulla=0&res=720&sdcap=-113&sdfree=0&sdatrm=1&sdnoclips=10&mdled=0&ca=1&charge=1&lulvol=3&isp_idx=1&agc_lvl=3&ssid1=&ssid2=&ssid3=&hw_id=4&puscan=1&pu_ana_en=1&rtscan=1&panel_vox=0&charge_dur=183&mvr=1&dnsm=8.8.8.8&dnss=232.229.62.0&wifi_env=20011000004000D&lulla_dur=15&localip=192.168.222.1&sync_channel=3&rp_pair=0&rp_conn=other&blue_led_en=1&blue_led_ontime=180&red_led_affect=0&block_pu_upgrade=0&pu_fw_pkg=00.00.00&advise_homemode=1&snapshot_storage=1&soc_ver=517260&

when I ran http://1912.168.222.1/?req=change_router_info&ssid=YOURSSID&password=YOURPASSWORD I got

change_router_info: 0

But it doesn't look like the camera connected to my router based on my router admin page

I could only stay connected to the network long enough to see Port 80 HTTP is Open (before the pairing sequence ended)

sbeukers commented 9 months ago

@sbeukers

http://192.168.222.1/?req=get_caminfo got me the following results

get_caminfo: flicker=60&flipup=0&fliplr=0&brate=500&svol=2&mvol=22&wifi=100&bat=14&hum=-1&tem=-273&hum_float=-1.0&tem_float=-273.0&storage=1&md=0:0:3:0&sd=0:2:3:0&td=0:3:1529:0&lbd=1:0:1:0&ir=0&lulla=0&res=720&sdcap=-113&sdfree=0&sdatrm=1&sdnoclips=10&mdled=0&ca=1&charge=1&lulvol=3&isp_idx=1&agc_lvl=3&ssid1=&ssid2=&ssid3=&hw_id=4&puscan=1&pu_ana_en=1&rtscan=1&panel_vox=0&charge_dur=183&mvr=1&dnsm=8.8.8.8&dnss=232.229.62.0&wifi_env=20011000004000D&lulla_dur=15&localip=192.168.222.1&sync_channel=3&rp_pair=0&rp_conn=other&blue_led_en=1&blue_led_ontime=180&red_led_affect=0&block_pu_upgrade=0&pu_fw_pkg=00.00.00&advise_homemode=1&snapshot_storage=1&soc_ver=517260&

when I ran http://1912.168.222.1/?req=change_router_info&ssid=YOURSSID&password=YOURPASSWORD I got

change_router_info: 0

But it doesn't look like the camera connected to my router based on my router admin page

I could only stay connected to the network long enough to see Port 80 HTTP is Open (before the pairing sequence ended)

Ok so looks very good. You definitely got connection with the camera.

change_router_info: 0 means that it at least accepted the command. (otherwise it would be -1) get_cam_info after that should say .........&ssid1=yourssid&ssid2=&ssid3=alsoyourssid...........

You could try /?req=setup_wireless_save I don't thik this does anything but worth the try.

Let me know how far you got.

eightball011854 commented 9 months ago

@sbeukers i did get_cam_info after submitting the command to change the ssid, and those are the results I shared in the last post, so doesn't look like it actually changed the SSID on the camera

sbeukers commented 9 months ago

Did you also tried the double one? http://foundip/?req=change_router_info&ssid=YOURSSID1&password=YOURPASSWORD1&ssid=YOURSSID2&password=YOURPASSWORD2

eightball011854 commented 9 months ago

@sbeukers yep, only thing that changes is the dnss on get_cam_info

sbeukers commented 9 months ago

I have the same issue with url_set. Maybe it has to be in setup mode or something to change that.

If anyone wants to take a peek. PublicConstant1.txt

So stupid that the unit can't connect to the app anymore. And we can't force offline mode.

jonct1 commented 9 months ago

Hi All, Hoping someone here can help and apologies if this has been covered.

For the last 2 weeks or so my kodak c525 camera has been disconnecting from the wifi every 11 mins or so.

I think it has something to do with the urls it is trying to connect to when I use /?req=get_url. The perimetersafe.com on port 8894. They obviously don't exist anymore and I think the camera reconnects to the network to try an reach it.

Does anyone know if I can stop the camera looking and hence get it to stay connected?

Thanks

davezyox commented 9 months ago

https://www.reddit.com/r/NewParents/comments/17buuio/comment/k5wopou/

I tried this to solve the clicking/disconnect issue by setting up mosquitto on my raspi running pihole but it didn't work. Quite a few saying it did for them though so maybe you'll have better luck. Appreciate any feedback if you do get it to work.

jonct1 commented 9 months ago

https://www.reddit.com/r/NewParents/comments/17buuio/comment/k5wopou/

I tried this to solve the clicking/disconnect issue by setting up mosquitto on my raspi running pihole but it didn't work. Quite a few saying it did for them though so maybe you'll have better luck. Appreciate any feedback if you do get it to work.

Will do. I was hoping you actually change the camera url instead of setting up a server etc. If I figure anything out I'll let you know.

trullock commented 9 months ago

https://www.reddit.com/r/NewParents/comments/17buuio/comment/k5wopou/

I tried this to solve the clicking/disconnect issue by setting up mosquitto on my raspi running pihole but it didn't work. Quite a few saying it did for them though so maybe you'll have better luck. Appreciate any feedback if you do get it to work.

Great find, thanks for this

I can confirm this solution works for me.

I added mqtt-t01-r1.perimetersafe.com, mqtt-t01-r2.perimetersafe.com and mqtt-t01-r3.perimetersafe.com as DNS Redirects in AdGuard to point to Home Assistant, where I added the FTP addon on port 8894 in order to provide a TCP socket for them to interact with.

Cameras/parent units no longer do the shutter flicker/clicking every few mins

👍

vampywiz17 commented 9 months ago

@trullock

Yes it working!!

I start a nginx docker container on my server and it also help me :)

version: '3'
services:
    nginx:
        image: nginx:latest
        restart: always
        ports:
          - 8894:80

i redirect *.perimetersafe.com wildcard to my server with in my opnsense firewall.

Blackhawk386 commented 9 months ago

/?req=get_session_key&mode=local&port1=55390&ip=xxx.xxx.xxx.xxx&streamname=C9CBBB22B6E94B43DDD160209C2XXX_8

Hi. Some who can help me how to use this request correct? I keep receiving get_session_key: error=200,port1=49165&ip=192.168... So do I have to enter the IP of the Babyphone or the client I try to access from? And is the streamname universal or do I have to figure out my individual streamname and how?

Thanks in advance.

h0d3nt3uf3l commented 8 months ago

/?req=get_session_key&mode=local&port1=55390&ip=xxx.xxx.xxx.xxx&streamname=C9CBBB22B6E94B43DDD160209C2XXX_8

Hi. Some who can help me how to use this request correct? I keep receiving get_session_key: error=200,port1=49165&ip=192.168... So do I have to enter the IP of the Babyphone or the client I try to access from? And is the streamname universal or do I have to figure out my individual streamname and how?

Thanks in advance.

You can't access the stream directly. It's encrypted somehow. After you request the session_key, the stream is pumped via URL to the IP-Address but you can't fetch it. Anyway, the stream will only be available for 5 seconds, after that, it wouldn't be send any data. Think there is missing a response from that IP which would be send by the APP / ParentUnit.

h0d3nt3uf3l commented 8 months ago

@sbeukers

when I ran http://1912.168.222.1/?req=change_router_info&ssid=YOURSSID&password=YOURPASSWORD I got

change_router_info: 0

But it doesn't look like the camera connected to my router based on my router admin page

I could only stay connected to the network long enough to see Port 80 HTTP is Open (before the pairing sequence ended)

@eightball011854 @sbeukers Got a look at the APK and found followed lines of code:

String format = String.format(Locale.US, "&ssid=%s&password=%s", Base64.encodeToString(str.getBytes(), 2), Base64.encodeToString(str2.getBytes(), 2));
        CommandRequest commandRequest = new CommandRequest();
        commandRequest.setCommand(PublicConstant1.UPDATE_WIFI_INFO_CMD);
        commandRequest.setCommandParams(format);
        commandRequest.setCommandCommunicatorHandler(new r(str, str2));
        this.f13461e.sendCommandRequest(commandRequest);

Therefore you'll have to encode YOURSSID and YOURPASSWORD in Base64 e.g. in Notepad++ (MIME Tools) or online (https://www.base64encode.org/).

For YOURSSID and YOURPASSWORD the URL would be like: http://192.168.222.1/?req=change_router_info&ssid=WU9VUlNTSUQ&password=WU9VUlBBU1NXT1JE

Tried it at my camera and saw it in SSID2, but the last character was truncated. Don't know why but won't try to much on my running Camera. I still need it an my wife would kill me :)

eightball011854 commented 8 months ago

@h0d3nt3uf3l gave it a shot - change_router_info: 0 but not seeing the camera on my network still

h0d3nt3uf3l commented 8 months ago

And your get_caminfo output?

Am 13. Dezember 2023 18:06:11 MEZ schrieb eightball011854 @.***>:

@h0d3nt3uf3l gave it a shot - change_router_info: 0 but not seeing the camera on my network still

-- Reply to this email directly or view it on GitHub: https://github.com/kairoaraujo/kodak-smart-home/issues/16#issuecomment-1854377472 You are receiving this because you were mentioned.

Message ID: @.***>

eightball011854 commented 8 months ago

And your get_caminfo output? Am 13. Dezember 2023 18:06:11 MEZ schrieb eightball011854 @.>: @h0d3nt3uf3l gave it a shot - change_router_info: 0 but not seeing the camera on my network still -- Reply to this email directly or view it on GitHub: #16 (comment) You are receiving this because you were mentioned. Message ID: @.>

nothing changes in the get_cam_info screen

ssid1, 2, and 3 are all still blank

h0d3nt3uf3l commented 8 months ago

Ok, anyway can you post it? Can compare it with mine, maybe we'll find another issue in it. To see your command would be usefull too but it's sensitive data.

sbeukers commented 8 months ago

Base64.encodeToString(str.getBytes(), 2) Good find!@eightball011854 I'm not brave enough to try it.

You have to provid 2 ssid's and passwords accoding to the APK.

I did try /?req=url_set to get around the random reconnect but it doesn't save.

h0d3nt3uf3l commented 8 months ago

You have to provid 2 ssid's and passwords accoding to the APK.

Why do you mean that? The number 2 in Base64.encodeToString(str.getBytes(), 2) is a flag named NO_WRAP. See https://developer.android.com/reference/android/util/Base64#encodeToString(byte[],%20int)

eightball011854 commented 8 months ago

Ok, anyway can you post it? Can compare it with mine, maybe we'll find another issue in it. To see your command would be usefull too but it's sensitive data.

get_caminfo: flicker=60&flipup=0&fliplr=0&brate=500&svol=2&mvol=22&wifi=100&bat=13&hum=64&tem=19&hum_float=64.0&tem_float=19.2&storage=1&md=0:0:3:0&sd=0:2:3:0&td=0:3:1529:0&lbd=1:0:1:0&ir=0&lulla=0&res=720&sdcap=-113&sdfree=0&sdatrm=1&sdnoclips=10&mdled=0&ca=1&charge=1&lulvol=3&isp_idx=1&agc_lvl=3&ssid1=&ssid2=&ssid3=&hw_id=4&puscan=1&pu_ana_en=1&rtscan=1&panel_vox=0&charge_dur=2488&mvr=1&dnsm=8.8.8.8&dnss=120.246.62.0&wifi_env=20011100003000D&lulla_dur=15&localip=192.168.222.1&sync_channel=3&rp_pair=0&rp_conn=disconnect&blue_led_en=1&blue_led_ontime=180&red_led_affect=0&block_pu_upgrade=0&pu_fw_pkg=00.00.00&advise_homemode=1&snapshot_storage=1&soc_ver=517260&