members.png
May 9

How to access hidden features

31 comments

Edited: May 9

As the USB access did not work as intended, I got a little bit frustrated and started to poke around on the K2 to see if I can find something interesting. And well...I did :-)

 

First of all...you can access the K2 with your browser. Simply connect your laptop, tablet, phone or what else to your K2 and go to:

 

http://192.168.1.254

This will give you access to your sd card.

 

Another URL I found is:

http://192.168.1.254:8192

This will give you access to the live view

 

Looks like this

 

 

 

Well...this is nice, but I wanted at least the same access the App has, so I poked more. Which means I captured the network traffic between the App and the K2 to see what the App is doing. Sadly the App isn't very stable, so I had to start over the whole process every some seconds, causing me only to get some of the commands the App sends to the K2.

But, on the positive side, now as I knew some commands, I was able to simply ask Google if there is something about that in the net. And yes...I found the complete wifi-command user guide for the Novatek NT9666x. Sometimes things are easy :-)

 

So what is possible with these commands?

 

First of all, you can do the same as the App does. Means switching GPS on/off, settings G-Sensor sensitivity, select resolution, etc. But there are some more interesting things.

 

Set time and date

Something the App does automatically. Now you can do it manually.

 

Delete all files

Allows you to delete all files. No more need to format the card to remove all files.

 

Change PIP style

Allows you to change the style of the live view (front only, rear, only, front major, rear major)

Helps a little bit when aligning the cameras.

 

Change bitrate

Allows you to change the bitrate of the front cam. Rear cam seems to keep its default bitrate.

 

Change Wifi-Connection mode

Allows you to set the K2 in station mode to connect to your home wlan.

And yes...that works, but transfer speed is still awfull. Your wlan password must not contain special characters. At least the = character is not allowed.

Here is a screenshot of my K2 in my home wlan.

 

 

When the K2 is in your home wlan, the App isn't working anymore, as the K2 does not offer a wlan anymore. Changing wifi mode takes three commands (set ssid and password / set wifi mode / start wifi-reconnect)

 

 

How is it done?

 

The commands must be send as an URL to the K2. The syntax is...

http://192.168.1.254/?custom=1&cmd=xxx&par=yyy

 

xxx = the function you would like to active or change

yyy = the value you would like to set

 

(see Wifi Command guide)

 

For exampe:

http://192.168.1.254/?custom=1&cmd=2001&par=0

will stop recording. While..

http://192.168.1.254/?custom=1&cmd=2001&par=1

..will start recording

 

http://192.168.1.254/?custom=1&cmd=4004

will delete all files (there is no "par" here)

 

You will find the Novatek Wifi-Command List in my Dropbox share

https://www.dropbox.com/sh/o3xnk8u4alospta/AAAX67-ELsL6KDDt92-F1SQTa?dl=0

 

 

All settings commands are instantly effective, but will only be saved when the K2 shuts down properly. Means you can play around without the worry to mess something up. For example, if you change the wlan mode and it is not working, you can simply cut of power to the K2 to revert back to the old settings.

May 9

To go more into details, here is what to enter into your browser to change some settings.

All settings are only saved when the K2 shuts down properly. So if you just cut off power, nothing is saved. Means there is always a way back if you messed something up.

 

 

Change PIP style of live view

http://192.168.1.254/?custom=1&cmd=3028&par=0 => Front Cam only

http://192.168.1.254/?custom=1&cmd=3028&par=1 => Rear Cam only

http://192.168.1.254/?custom=1&cmd=3028&par=2 => Fron Cam major, Rear cam small (default)

http://192.168.1.254/?custom=1&cmd=3028&par=3 => Rear Cam major, Front cam small

 

 

Change bitrate of front cam

http://192.168.1.254/?custom1&cmd=2013&str=1450 => sets bitrate to 12 MBit (default)

http://192.168.1.254/?custom1&cmd=2013&str=2450 => sets bitrate to 20 MBit

 

The value for "str" is kb/sec.

 

 

Let K2 join your home wlan

This needs three steps.

 

1) Set Name and Password of your home wlan

 

http://192.168.1.254/?custom1&cmd=3032&str=SSID:password

SSID = The Name of your wlan.

password = The Password of your wlan.

So if your wlan is named "MyHomeWLAN" and its password is "verysecretpassword123",

you have to type...

http://192.168.1.254/?custom1&cmd=3032&str=MyHomeWLAN:verysecretpassword123

 

As these parameters are send as an URL, the name and password must not contain special characters. Something like =, % or &. And I guess that the name is case sensitive.

 

2) Change Wifi mode to station mode

Next step is changing the Wifi mode of the K2 from AP mode (where the K2 acts as an AccessPoint) to station mode (where the K2 acts as a wifi client).

http://192.168.1.254/?custom1&cmd=3033&par=1 => 0 = AP mode (default) / 1 = station mode

 

3) Restart Wifi

Last step is to restart Wifi on the K2.

http://192.168.1.254/?custom1&cmd=3018

 

Now the K2 will try to join your home wlan. You should take a look at your home router the check what IP address it got.

If it does not work, cut off power to the K2 to make it revert back to AP mode.

Dont let it shutdown properly in that case, as this would make the K2 to save the (non functional) settings and you won't be able to access the K2 anymore.

 

 

 

Query current settings

http://192.168.1.254/?custom=1&cmd=3014

 

This will give you a list of all settings, which looks like this

 

<Cmd>2001</Cmd> => Function 2001 means "Recording"

<Status>1</Status> => Current value is 1, which means ON.

<Cmd>2011</Cmd> => Function 2011 means "G-sensor sensitivity"

<Status>2</Status> => Current value is 2, which means "medium"

 

Take a look in the Novatek wifi command guide for more info.

 

 

 

 

More features I still have to check are:

- Enable movie HDR/WDR Per default it is disabled.

- Movie EV Haven't figured out yet what this setting is good for.

- Notify Status. This makes the K2 report error messages on port 3333. Still have to check this.

- Check whether stopping recording and live view will speed up video download or not

 

 

 

 

 

 

 

Wow - awesome find, Frostie! Thanks for passing this along!!

May 10Edited: May 28

Next Update

 

- Enable movie HDR/WDR (cmd=2004) Per default it is disabled.

This feature does not seem to work. When setting it to 1 (on), the value is not saved.

That's a pity. WDR would be an improvement when facing direct sunlight or at night.

 

 

- Movie EV (cmd=2005)

These are the brightness settings. Parameters are:

0 => +2

1 => +5/3

2 => +4/3

3 => +1

4 => +2/3

5 => +1/3

6 => 0 (default)

7 => -1/3

etc.

 

- Notify Status.

The K2 sends status reports on port 3333. Simply telnet to port 3333. If you, for example, stop recording (cmd=2001&par=0), in will report status 2, which means "Record is stop" (see Wifi command guide)

 

 

- Check whether stopping recording and live view will speed up video download or not

Stopping recording and live view speeds up data transfer on wifi a little bit. But I was not able to get above 2,3 MB/sec.

 

 

There are still some commands for which I haven't figured out what they are good for.

2022 with value 8000

8003

8004

etc.

I will keep testing.

 

 

Now we need a clever person to build a desktop app around these commands :)

N.

May 10

That´s not my business. I am not a developer. :-)

My Intention for this is/was to find a way to make usb access work without the need to unplug a cam, because I am still convinced that this is not a power-, but a firmware issue. But I am afraid that I cannot analyse (and maybe solve) this problem without shell access to the K2. Well..this isn´t impossible, but it requires to solder some cables at the DSP. Abd that is something I would only do on a spare K2, :-)

 

Maybe Rock would like to send me one :-)

 

 

I think sending you a development K2 would be a good reward for the value you have added here on the forums!

N.

May 13

For sure, We will send you a set of K2.

 

Just sent you email asking for shipping address.

Load more replies
May 26

Ok. Sounds like the K2 does not save the wifi settings. Or at least the wifi mode settings.

The problem that would arise with a firmware that is fixed on station mode is, that there would be no way for you to enter your ssid and password. Means I would have to make an individual firmware for you with your ssid and password.

 

Let me see if I can find the necessary values within the firmware.

Great :-) Currently testing my alpha version of the software:

 

May 28Edited: May 28

Today the spare K2, Rock kindly provided to me, has arrived and I started to play around with it.

At first I did a list of all wifi commands the App uses to configure the K2.

I will also make a list of hidden commands and will test whether they get saved or not. Unfortunately some don't get saved during shutdown (e.g brightness).

 

 

The next thing was to test what @Flemming Nielsen wrote about joining the home wlan.

Unfortunately he is absolutely right. The K2 joins the home wlan, but after a reboot all values (ssid, password, wifi mode) resets to the default values. I guess that the save command does not simply save all settings to flash, but only what the developer of the firmware selected. Maybe that's why the command is called "save menu items" and not "save settings".

 

I will dig a little bit more about that. In the firmware I found some references to config files which (I guess) can be placed on the sd card to configure some things.

 

 

@Frostie Awesome :-) Keep up the good work A config-file for wifi settings would be awesome. Otherwise i could extend my program to - Join the K2 wifi - Set wifi settings - Join regular wifi - scan for K2 device

and then download files.

 

But i foresee that it would be hard to get those extra steps 100% stabile. Especially if i have to make them work across multiple version of windows..

May 29Edited: Jun 4

Next Part.

 

First the hidden features. Unfortunately most of them are quite useless, as they will not be saved by the save command or during shutdown.

 

Now the control commands. Maybe interesting for developers :-)

 

I also found some commands which are accepted by the K2, but does not work. These are:

  • TV Format (always stays at PAL)

  • HDR (always disabled)

  • Auto Recording (can be set and saved, but gets ignored)

There are still some commands where I don't know what they are good for. So the work isn't done yet.

 

 

Of course I also took a screwdriver to take a look inside the K2. This is what it looks like.

 

 

 

 

I am quite sure I already found the UART pads, where (I hope) I can get shell access to the K2. But as they are too small for my soldering tip, I first need to get a special tool (or another soldering tip)

 

 

 

May 30

This is huge, thank you so much for digging into this. I've had an idea for auto-downloading videos from my K2 when I park my bike. Here's my plan:

 

* Get a RaspberryPi

* Hook it up to my home LAN via ethernet

* Have it auto-connect to the wifi network created by the K2

* Download all new videos from the DVR

* Upload those video files to the NAS on my LAN

May 30

I had the same idea, but I want to connect the Raspi via USB to the K2. Using wifi would be much easier, but the wifi of the K2 is bloddy slow. Even when stopping recording and live view,

I can't get more than 2,8 MB/sec. And it does not matter whether I use my iPhone/Raspi or let the K2 join my home wlan. The transfer rate is always devastating and far too low for transfering more than one short clip.

 

So the idea was to use USB Auto-Mount on the Raspi to make him mount the K2 automatically. After that, I could access the mounted K2 via FTP, SCP or whatever protocol I prefer. But unfortunately USB access is a little bit buggy at the moment (see other Thread).

May 30

Yes, the wifi connection is slow, but USB connection is a non-starter for me as the DVR is mounted underneath my seat, which I have no easy access to. Even if I had easy access to the DVR, I think I would take the convenience of a wireless connection over the speed of USB. I'm not really in a huge hurry to transfer the videos since I can have it run while my bike is charging (it's electric).

Ooh nice one on the electric bike... how are you finding it.

May 30

@Neil Maltby Love it. Zero SR. It's a little bit awkward since I don't have direct access to the a battery for things like the K2, so I have to rely on switched accessory power only.

Jun 4

Today I tested the two pads on the K2, which I supposed are the UART pads. And I was right.

Left Pad is RX, Right Pad is TX. GND can easily be found at the USB housing.

 

Soldering the cables on the pads really is no fun. There is absolutely no space for mistakes. That's the reason I did not want to try this at my K2. Thanks again to Rock for sending me a spare K2 to do all these tests.

 

Using an USB UART you can get shell access to the K2. Connect parameters are 115200, 8N1.

 

Looks like this...

K2 Booting up

 

 

K2 Command List in CMD Mode

 

Now I have to poke around to figure out what the commands do, how I can change settings and how I can dump the memory to find out where these settings are located in the firmware file.

I am thinking of creating a firmware which defaults to station mode and joins the home wlan instead of creating one itself.

Jun 7Edited: Jun 7

Just as an update to @phinnaeus

I am working on a firmware which defaults to join the home wlan instead of creating an AP.

 

I already found the ssid and password within the firmware and successfully changed these values. One point I still have to fiddle about is, that there is some code which always appends the last four digits of the serial number to the ssid in AP mode. So currently when my K2 starts up, it creates a wlan called "K2-Test026a". Switching to Station Mode, the K2 joins my "K2-Test" wlan.

 

Currently I am searching for the Wifi Mode settings. I already discovered the value within the memory by comparing different memory dumps, but to my dissapointment it is a simple 00 and 01.

 

00000000 = AP Mode

00000001 = Station Mode

 

Now I have to find these value within the firmware to change them, which will not be easy, because there is no special pattern I can search in the firmware. 00000000 is VERY common within the firmware, so I have to spot around the wifi settings within the firmware if I can find a suspicious area. At the end this will be a lot of try-and-error.

 

 

 

Jun 15

Regarding me efforts to make the K2 startup Wifi in STA mode, I am at a dead point. Though I located the bytes responsible for the wifi mode within the memory, it is impossible for me to locate this byte within the firmware. So I have asked in another forum for help, as there are pepple with much more experience in programming than I have. I also asked Rock if he would be willing to send me the source files of the firmware. I am not sure I this files would help me, as I have no experience in programming this kind of devices, but I would like to give it a try.

Jun 19

I am very interesting in your great work. Now talking with Novatek the authorization for source code.

Jun 19

I am anxious what they will reply. I can imagine that they need some kind of declaration of commitment before giving the source code and the necessary libraries to anyone on the internet :-)

New Posts
  • @Michael Williams asked in in another thread where we are all from. I am interested in this, too. But as we should not spam a thread about a technical problem with off-topic posting, I decided that is would be better to create a separate thread for this. So here it is and everybody is invited to tell us where he/she is from and show us how international this forum is. I am located in a small city beside Duesseldorf, Germany, and riding a Tiger 1200 XRT.
  • Had the K2 for 5 days now. Overall its pretty good. I have a few issues that I need to look into. 1 - The lens seems to black out in the bottom (say 4 and 8 O'Clock) A bit like the lens has Glaucoma... 2 - I start my bike, put helmet, gloves on, ride off, but recording doesn't start until I am a few miles away, has to be at least 5 minutes after setting off, and maybe 6 minutes after starting the bike. An I supposed to wais 6 minutes before setting off? 3 - I have to do something with how I transfer the files, WiFi just doesn't cut it. My bike (R1250GS Adventure) automatically powers off after X minutes, not sure exactly how many, to preserve the battery, the WiFi hasn't managed to transfer a 3 minute file before the bike powers off. I cant view from the bike, stream, as it doesn't stream, it just jitters from frame to frame. I have an iPhone XS Max if that makes any difference. So far I have not been able to download or view any recording, only when setting up on live view. On the plus side, it only took 30 minutes to set up on the bike, only having to remove the tank panel. Does anyone have any thoughts on my three issues?
  • After the firmware v61 update, I noticed the blue light on the power transformer never goes off - no matter how long the bike is off. Is this normal? What could possibly be powering this other than my battery?
© INNOVV TECH CO., LTD @ 2013~2019
  • w-tbird
  • w-facebook
  • w-googleplus