Hi Innovv
The technical specifications on https://www.innovv.com/innovv-k2-spec says, that the USB Port on the K2 is for " Charging (DC5V), Data transfer ".
And when I connect the K2 on a computer, it starts up, but there is no data transfer available.
Is this a planned feature? I would love to transfer the videos over USB rather then removing the SD card everytime, because I am worried that the SD slot will wear out one day or another. Using the USB Port I could use a raspberry as a WLAN relay to access the K2 directly from my home pc.
What is the result of this very long thread? I have firmware 64 and imy Apple Mac doesnt recognise the k2 as a disc. I can’t see any files. I would love to have a short usb pigtail to connect to my laptop. Has anyone manage to make it work (I mean someone without an electronics PhD?). Thanks
Updated my K2 to V-52 (modified) yesterday and did 5 hour ride. No issues so far.
Back at home I plugged in my Raspberry on usb and got a transfer rate of around 15MB/sec. That´s a little bit less than the 20MB/sec I get when I put the sd card directly into my PC, but it´s ok.
Innovv just released a new V-52 firmware, which supports exfat filesystem.
Using this new firmware usb transfer works with cards greater than 32 GB, IF you format the card in the new exfat format (simply format using the app). Without that (means: sd card in fat32), usb still does not work.
But before happily installing V-52 and re-formatting your cards in exfat, please read my posting here
https://www.innovv.com/forum/innovv-k2/firmware-update-fails-if-using-new-exfat-format-in-v-52-firmware
This is more to @Rock Liu than to the forum member.
I logged the boot process of the K2 in the following situations.
- 32 GB SD Card without USB connected
- 32 GB SD Card with USB connected
- 128 GB SD Card with USB connected
- 128 GB SD Card with USB connected and Rear Cam removed
You can find the Boot Logs here
https://www.dropbox.com/sh/lksrduxzr5birvv/AADw-lLcRDikOBKM4YyJQwNAa?dl=0
Noticeable parts of the Logs:
1)
When USB works (32 GB SD or 128 GB SD with rear cam removed), you can see the following Entries right after "On Boot end".
[0m[35mOn Boot end
[0m
IPL_PATH_1: 1 IPL_PATH_2: 1
liveViewError :0 0
USBConnectType=1
[35mMode {MOVIE} Close begin
[0mSMediaRec_Close-B
[35mMode {MOVIE} Close end
[0m[35mMode {USBMenu} Open begin
[0m[35mMode {USBMenu} Open end
[0mg_bKeyScanDelayoffEn = 0
g_bKeyScanDelayoffEn = 0
[33m===================================== sensor display [MASK=00000003]->[MASK=00000003]
[0mbattery changed 4**********
This does not show up when USB does not work (e.g with a 128 GB SD Card)
2)
When USB works, you can see a fileid Entry during the G-Sensor initialization.
[0m------GSENSOR_DA380 chip id = 0x13-----
-->DA380 get data:0
GSensor_DA380_open: 1 0..
fileid:1
[31mERR:gyro_open() uiRecv1 = 0xffff
[0mGYRO OPEN Fail
[33mWRN:MovieExe_OnMovieSize() should change mode
[0m===Movie Rec Set Vol = 100
MovieExe_OnADASVoice:1
Don't know if this has something to do with USB, as the logs are about the GSensor, but that fileid does not show up when USB does not work.
3)
With the Rear Cam removed, we can see an error message in the Logs. Right after that, the USB detection seems to kick in again. That seems the be the reason why USB works if the Rear Cam is removed.
[0m[35mOn Boot end
[0m[33m===================================== sensor display [MASK=00000003]->[MASK=00000003]
[0m[33mWRN:System_OnSensorDisplay() dual sensor, but only connect single now, ignore!
[0m[31mERR:usb_chkCharger() line sts check: PC
[0mCONNECT to PC
Hope we can have other firmware update those days, and see if can get problem fixed.
No need to format SD card even it is more than 32GB.
Did some more tests today and figured out, what went wrong yesterday.
During my tests with different partition sizes, I simply created a partition on the sd card and increased/decreased it. Looks like this
.....<Partion>.....|....<unused space>....
But when I format the 32 GB SD card within the K2, it creates a partition which looks like this
.....<4MB unused space>.....|.....<Partition>.....
The K2 strictly follows the recommendations of the SD Card Association, where the FAT should be in the second 4MB Block of the SD card for best performance.
Consequently, If I format the 32 GB SD card like this (same Partition size as above)
.....<Partition>.....|.....<4MB unused space>.....
the K2 works, but usb does not work.
To tell long story short:
The reason why my tests came out to this strange partition size was because of sector alignment and addressing. If I had formatted the card like mentioned above, I would have came to the limit of 32 GB.
Which is, by the way, is the limit for FAT32 in the specifications of the SD Card Association.
Well...this explains why usb works out-of-the-box using a 32 GB card and does not work with bigger cards. But is does not explain why bigger cards work if we remove the rear cam. May they are doing some tricks like mapping the sd card to the (then unused) usb port to mount the card like an usb device.
I don't know. Maybe I can figure that out when I got shell access.
This K2 drives my crazy.
Using a partition size of 24667 MB on my 32 GB card, as mentioned above, worked when I did my test early this day.
24467 MB worked,
24468 MB did not work.
I tested this four or five times to make sure the values are correct.
Now I tested the same on my 128 GB card and it did not work. Ok...strange enough.
But more strange is...now, when I insert my 32 GB card with a partition size of 32 GB, usb works. WTF??? Early this day it did not work. What has changed? Solar Altitude? Earth Rays?
The K2 does not behave the same over the time.
Checking today for updates, I found a new firmware 0.49 (??) without the USBREAD in the name, with filedate 31/05/2019.
At the moment on my K2 is the 0.49-USBREAD with filedate 06/05/2019 installed.
Anybody knows the difference?
There is also a new App-Version 1.3.0., did anyone used it successfull on a Samsung J5?
Great detective work on this, Frostie- Sorry I'm not qualified to add constructive input!
Tested different sd cards
2 GB => USB works without removing rear cam
4 GB => USB works without removing rear cam
32 GB => USB does not work. Need to remove rear cam
128 GB => USB does not work. Need to remove rear cam
Unfortunately I don't have a 8 GB card for the test. The reason I would love to test this are the free disk space and the bytes necessary to save this.
4 GB => 3995133952 bytes. In Hex this is EE 20 E8 00 and requires 4 bytes to save.
8 GB => 7990267904 bytes. In Hex this is 01 DC 41 D0 00 and requres 5 bytes to save.
Would be interesting so see if this is the limit for usb to work out-of-the-box.
As a funny update.
I don't know what I've done, but now USB works all the time if the Raspi is connected before starting the K2. This definitively not happend when I started my tests. Already did a system reset and re-flashed the V49 firmware, but USB is still working. I will try to figure out why.
Edit:
Flashed the V39 and then the V49 to really erase all settings. After that, USB isn't working anymore.
As we all know. Now I will do all the tests I did today so see, which settings made USB working.
Edit2:
So far I discovered that it has something to do with the size of the sd card. I did my tests with a small 2GB sd card. With this card I got usb working simply by connecting the Raspi prior startup. Using a 128GB card, usb does not work. I switched the cards during my tests to flash the firmware. Because of that, I did some tests with the 128GB card and some with the 2GB card. And so sometimes usb worked and sometime it did not work. This led to my assumption that I "accidentally" changed some settings which are responsible for that. But in fact it is only the size of the card.
Will do more tests tomorrow.
Edit
Removed my posting, as the steps mentioned there were based on wrong conclussions.
During my tests changed the 128GB sd card to a small 2GB sd card. This led to my assumption, that the steps I wrote here could enable usb, But in fact, usb is working out-of-the-box, if the sd card is small enough (see below).
I did some more tests today.
First off all, to prevent any power issues, I connected the K2 power converter to an external power supply and set it to 12,5V.
As a site note:
I noticed that the K2 takes 230mA at 12,5V while running.
Converted to 5V this is 575mA. That's less than the 700mA Rock stated. And I would suppose that nearly any computer can deliver 575mA via USB.
Ok...back to the tests I did.
With both cams connected, I powered the K2 and waited till is has started, then connected my Raspberry. Results: Wifi on, no usb access (we all still know this)
With rear cam unplugged, I powered the K2 and waited till it has started, then connected my Raspberry. Results: Wifi on, no usb access. That was a little bit surprisingly. If this is a power or simply a ressource issue, usb should work now.
With rear cam unplugged, I powered the K2, but connected my Raspberry imediately before the K2 started up. Results: No Wifi, usb access.
During all tests I monitored port 3333 on the K2 in the hope I could see some kind of status or error message. But because wifi always switched off when usb was available, I could not see anything.
I also did a wlan scan to see if there is some kind of maintenance wlan, as I found some other ip addresses within the firmware, but unfortunately there is nothing.
During the tests where wifi was available, the K2 did not report anything on port 3333 (except normal status reports like "recording stop" or "power off")
So I plugged in the rear cam, started the K2, and (again) the rear cam was offline. Within the App the resolution settings switched to <nil>.
Because of this, I compared the settings of the K2 with and without rear cam
(https://192.168.1.254/?custom=1&cmd=3014) and noticed, that there are some settings missing when the rear cam is not connected. These settings are...
<Status>0</Status>
<Cmd>3040</Cmd>
<Status>0</Status>
<Cmd>3041</Cmd>
<Status>1</Status>
<Cmd>3042</Cmd>
<Status>0</Status>
<Cmd>3043</Cmd>
<Status>0</Status>
<Cmd>3039</Cmd>
<Status>0</Status>
<Cmd>8003</Cmd>
<Status>0</Status>
<Cmd>8005</Cmd>
<Status>0</Status>
<Cmd>8006</Cmd>
<Status>0</Status>
<Cmd>8007</Cmd>
<Status>0</Status>
<Cmd>8009</Cmd>
<Status>0</Status>
I haven't figured out yet what these settings are good for. They are not listed within the Novatek wifi command guide.
Another thing I am wondering about is the name of the usb storage device I see, when usb access is available.
[ 992.340956] usb 1-1.1.2: Product: DEMO1
[ 992.340964] usb 1-1.1.2: Manufacturer: NOVATEK
[ 992.340974] usb 1-1.1.2: SerialNumber: 966110000000100
[ 992.344204] usb-storage 1-1.1.2:1.0: USB Mass Storage device detected
[ 992.347835] scsi host0: usb-storage 1-1.1.2:1.0
[ 992.412724] usbcore: registered new interface driver uas
[ 993.444776] scsi 0:0:0:0: Direct-Access NOVATEKN vt-DSC PQ: 0 ANSI: 5
[ 993.449837] sd 0:0:0:0: [sda] 249737216 512-byte logical blocks: (128 GB/119 GiB)
[ 993.454008] sd 0:0:0:0: [sda] Write Protect is off
[ 993.454027] sd 0:0:0:0: [sda] Mode Sense: 2b 00 00 08
[ 993.454383] sd 0:0:0:0: [sda] Write cache: disabled, read cache: disabled, doesn't support DPO or FUA
Why is the storage device named "DEMO1"? I mean, if I would create a product named K2 and this product offers an usb storage device, I would name the device K2 or something like that. And not DEMO1.
To summarize all this. USB does only work if...
the rear cam is not connected
the usb connection is made before the K2 has started up.
It does not matter how the K2 is powered or what kind of cable you are using (as long as it has four wires).
All this leads me to the following suppositions, why usb is only working under the mentioned conditions.
There is a hardware restriction. The rear cam and the usb port shares the same hardware ressources in some ways, which makes it impossible for them functioning at the same time. However, there are many dual dashcams on the market, using the NT96663. I have not found any posting about problems accessing the dashcam via usb. Of course I have not checked every forum in the net, but I guess that these kind of errors would stick out when doing some google search. So this supposition is very unlikely.
There is a firmware issue or restriction. For some reason the usb device and any other device (webserver, rear cam) shares the same software ressources (file handler, uart, etc). Or (in my eyes more likely) the usb feature is implemented badly. The fact that the usb storage device is named "DEMO1" looks like someone copy-pasted some kind of example code. Another fact is, that the K2 only switches to usb storage mode when the computer is connected before the boot process of the K2 has finished. I know that the firmware offers events like "onUSBconnect", but obviously they are not used. It seems that the K2 simply checks on boot whether or not usb is connected and if yes, it switches to some kind of storage mode, but without initializing all the rest (cam, wifi, webserver, etc.) And why the hell does the K2 messes the resolution settings if I remove the rear cam? There is no need for this.
@Rock Liu
Sorry Rock, but whoever told you that this is a power or cable issue, is wrong. It is a hardware or (most likely) a firmware issue. Your developer(s) should move back at the drawing board.
Frostie,
I just tried again with DVR plugged in to USB port on my Windows 10 computer. I can only see the INNOVV wifi network when I have both cameras plugged in. In that config, both cameras are working. When I unplug either front or rear camera, I cannot see wifi network. USB connectivity same as reported above, e.g. only seems to work when front camera connected and rear camera removed.
HarleyFool
Very interesting results. Escpecially that USB is only working if the rear cam is removed, not the front cam. Thanks for that. But could you please do one more test?
Could you please do what you mentioned in NOTE 1 and then check, if the rear cam is really working after you plugged it in? For example by checking the live view.
http://192.168.1.254:8192
And if yes, start recording and check via USB if videos for both cams are saved?
http://192.168.1.254/?custom=1&cmd=2001&par=1 => starts recording
I have a suspicion what may going on here. And if I am right, the rear cam should not work while usb access.