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

add specification for Fullhan .FLS files #671

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions firmware/fullhan_fls.ksy
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
meta:
id: fullhan_fls
title: Fullhan FLS
armijnhemel marked this conversation as resolved.
Show resolved Hide resolved
file-extension: fls
license: CC0-1.0
endian: le
encoding: UTF-8
doc: |
Test files:
Comment on lines +8 to +9
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for declaring where to find test files (I'll check them out), but I think /doc should also include some general description of the format. You put the .ksy spec in the firmware directory, which suggests that the format is somehow firmware-related, but anything beyond that is left to the reader to guess. I guess it's a firmware update format of IP cameras of a certain brand Fullhan? At least one or two sentences would go a long way for someone not knowing the purpose of the format or perhaps trying to find a .ksy spec for it via certain keywords.

- https://www.nvripc.com/new-chinese-ip-camera-firmwares-update/
- https://www.herospeed.net/hs/ipc_test/fuhan/
seq:
- id: header
type: header
- id: entries
type: entry
repeat: expr
repeat-expr: header.num_entries
- id: data
size: header.len_file - ofs_data
type: dummy
instances:
ofs_data:
value: header._sizeof + header.num_entries * sizeof<entry>
types:
dummy: {}
header:
seq:
- id: model
size: 8
type: strz
- id: submodel
size: 8
type: strz
- id: len_file
type: u4
- id: num_entries
type: u4
entry:
seq:
- id: name
size: 128
type: strz
- id: len_data
type: u4
- id: ofs_data
type: u4
- id: unknown
size: 120
instances:
data:
io: _root.data._io
pos: ofs_data - _root.ofs_data
size: len_data