No description
  • Kotlin 99.8%
  • Java 0.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
kagura beb04f2bca Acknowledge LSS_CONTROL_POINT after location and time writes.
Match SnapBridge 2.13.3: wait for BLE auth before GPS I/O, dispatch a pending control-point read, honor the location-sync switch, and treat equator/zero altitude as S/W/M.
2026-09-17 15:18:28 +08:00
app Acknowledge LSS_CONTROL_POINT after location and time writes. 2026-09-17 15:18:28 +08:00
docs/images docs: add bilingual README and catgirl mascot 2026-09-17 11:13:53 +08:00
gradle feat: initial nokkin app scaffold 2026-09-15 17:47:01 +08:00
.gitignore Wire native LsSec and BLE client flow 2026-09-16 15:48:05 +08:00
AGENTS.md Acknowledge LSS_CONTROL_POINT after location and time writes. 2026-09-17 15:18:28 +08:00
build.gradle.kts feat: initial nokkin app scaffold 2026-09-15 17:47:01 +08:00
gradle.properties feat: initial nokkin app scaffold 2026-09-15 17:47:01 +08:00
gradlew feat: initial nokkin app scaffold 2026-09-15 17:47:01 +08:00
gradlew.bat feat: initial nokkin app scaffold 2026-09-15 17:47:01 +08:00
LICENSE License the project under Apache 2.0 and show the full text in Settings. 2026-09-16 15:45:31 +08:00
NOTICE License the project under Apache 2.0 and show the full text in Settings. 2026-09-16 15:45:31 +08:00
README.md Wire GPS location sync over LOCATION_INFORMATION. 2026-09-17 14:51:49 +08:00
settings.gradle.kts feat: initial nokkin app scaffold 2026-09-15 17:47:01 +08:00

Full-body illustration of nokkin’s catgirl mascot holding a camera / nokkin 猫娘看板娘的全身立绘,双手抱着相机

nokkin

An Android companion for Nikon cameras
适用于尼康相机的 Android 应用

Android 13+ · Nikon LSS · Bluetooth · English / 简体中文

English · 简体中文


English

nokkin is an independent Android companion for Nikon cameras using the SnapBridge / LSS protocol. It pairs over Bluetooth Low Energy (BLE), provides camera controls, and opens a PTP connection over Bluetooth Classic for image access.

Development status: version 0.1.0 is under development. Real-camera pairing, control, and transfers still need device testing; compatibility with individual camera models is not yet verified.

Meet our mascot

The catgirl at the top of this page is nokkins mascot, shown here in a full-body illustration based on the app icon. With fluffy ears, pink hair clips, and a camera in her hands, she greets you with a wink—ready for the next photo. Click the illustration to view the full-resolution image.

Features

Feature Current state
Find & pair BLE discovery, LSS authentication, Bluetooth Classic bonding, and saved cameras
Camera details Connect / disconnect, battery reading, camera clock updates, and GPS / location sync into new photos while connected (foreground service, stoppable from the notification)
Remote control BLE remote keys, shooting events, and camera status
Gallery Lists image handles through an open PTP session; no thumbnails yet
Image transfer Thumbnail, resized, and original download APIs exist; the gallery currently fetches bytes without saving them to your phone
Interface Jetpack Compose + Material 3, with English and Simplified Chinese strings
Settings Persistent preferences, adjustable log level, and version / Git commit information

Current limitations: Wi-Fi connections, automatic downloads, and automatic linking are not operational. The Wi-Fi preference currently uses Bluetooth Classic. wifiStationLocationSync is unused. Auto-download and auto-link switches only save preferences. The time-sync preference is saved, but connecting still writes the current time regardless of that switch. PTP capture, live-view, movie, and zoom action classes are not connected to the UI.

Getting started

  1. Install a debug build using the instructions below on an Android 13 or newer phone with BLE and Bluetooth Classic.
  2. Turn on Bluetooth, wake your Nikon LSS camera, and put it into pairing mode. Keep it close to your phone.
  3. Open nokkin and grant the requested Bluetooth and location permissions. Location permission is used for GPS tagging as well as scanning.
  4. Tap Pair a camera, select the camera, and complete any system pairing prompts.
  5. Open the saved camera and connect to explore camera details, remote control, and the gallery.

Pairing saves the camera and then disconnects; connect again from its detail screen to use it. Gallery access needs an open PTP session. The Download action does not yet save photos to phone storage.

Build

Use JDK 17 and an Android SDK with Platform 35 installed. Open the project in Android Studio and configure the SDK path, or set sdk.dir in your local local.properties file. The repository includes the Gradle wrapper and native LSS libraries.

From the repository root:

# Build a debug APK
./gradlew :app:assembleDebug

# Run JVM unit tests
./gradlew :app:testDebugUnitTest

# Install on a connected device with USB debugging enabled
adb install -r app/build/outputs/apk/debug/app-debug.apk

On Windows, use gradlew.bat in place of ./gradlew.

The APK is written to app/build/outputs/apk/debug/app-debug.apk. The application ID is uk.kagurach.nokkin.

Technical overview

  • UI: Kotlin 2.1, Jetpack Compose, Material Design 3.
  • Storage: Room for paired cameras; DataStore for settings and the LSS device ID.
  • Camera connection: BLE / GATT + native LSS authentication, followed by PTP over Bluetooth Classic RFCOMM with a second authentication handshake.
  • Tests: Protocol codecs, advertisement parsing, PTP-BT wire vectors, DeviceInfo parsing, and scan orchestration. These do not validate live GATT, native authentication, or end-to-end camera operation.

For development conventions and runtime wiring, see AGENTS.md.

License & credits

Original nokkin source is licensed under Apache License 2.0. The bundled libLsSec-jni.so files are third-party materials and are not covered by that license; see NOTICE.

Nikon and SnapBridge are trademarks of their respective owners. nokkin is an independent project, not affiliated with, endorsed by, or sponsored by Nikon Corporation.


简体中文

nokkin 是一款独立开发的 Android 尼康相机应用,面向使用 SnapBridge / LSS 协议的相机。它通过低功耗蓝牙BLE配对、提供相机控制并通过经典蓝牙建立 PTP 连接来访问照片。

开发状态: 当前版本为 0.1.0,仍在开发中。配对、遥控和传输流程还需要真机测试,尚未验证各相机型号的兼容性。

看板娘介绍

页面顶部的猫娘是 nokkin 的看板娘,这张全身立绘以应用图标中的形象为基础绘制。她有毛茸茸的猫耳,别着粉色发夹,双手抱着相机,正眨眼向你打招呼,准备记录下一个镜头。点击立绘可查看原尺寸图片。

功能

功能 当前状态
搜索与配对 BLE 扫描、LSS 认证、经典蓝牙绑定,以及保存已配对相机
相机详情 连接 / 断开、读取电量、更新相机时间,以及连接期间把 GPS / 位置写入新拍照片(前台服务,可从通知停止)
遥控 BLE 遥控按键、拍摄事件和相机状态
图库 通过已打开的 PTP 会话列出照片对象;暂时没有缩略图
照片传输 已有缩略图、缩放图和原图下载接口;图库目前只读取数据,不会保存到手机
界面 Jetpack Compose + Material 3提供英文和简体中文界面
设置 保存偏好设置、调整日志级别、查看版本和 Git 提交信息

当前限制: Wi-Fi 连接、自动下载和自动连接尚不可用。选择 Wi-Fi 优先时,实际仍使用经典蓝牙。wifiStationLocationSync 未使用。自动下载和自动连接开关目前只保存偏好。时间同步开关也会保存但连接相机时仍会写入当前时间不受该开关控制。PTP 拍摄、实时取景、录像和变焦操作类尚未接入界面。

使用方法

  1. 按照下方说明构建调试版,安装到支持 BLE 和经典蓝牙的 Android 13 或更新版本手机上。
  2. 打开蓝牙,唤醒支持 LSS 的尼康相机,并让相机进入配对模式。把相机放在手机附近。
  3. 打开 nokkin授予应用请求的蓝牙和位置权限。位置权限同时用于扫描附近设备和给照片写入 GPS。
  4. 点击配对相机按钮,选择相机,并完成系统可能弹出的配对提示。
  5. 打开已保存的相机并连接,即可探索相机详情、遥控和图库。

配对成功后会保存相机并断开连接;使用时请从相机详情页重新连接。图库需要已打开的 PTP 会话。目前点击下载还不会把照片保存到手机存储中。

构建

准备 JDK 17 和已安装 Platform 35 的 Android SDK。可以使用 Android Studio 打开项目并配置 SDK 路径,也可以在本地 local.properties 中设置 sdk.dir。仓库已包含 Gradle wrapper 和 LSS 原生库。

在仓库根目录执行:

# 构建调试版 APK
./gradlew :app:assembleDebug

# 运行 JVM 单元测试
./gradlew :app:testDebugUnitTest

# 安装到已连接且开启 USB 调试的设备
adb install -r app/build/outputs/apk/debug/app-debug.apk

Windows 用户请将 ./gradlew 替换为 gradlew.bat

APK 输出路径为 app/build/outputs/apk/debug/app-debug.apk,应用 ID 为 uk.kagurach.nokkin

技术概览

  • 界面: Kotlin 2.1、Jetpack Compose、Material Design 3。
  • 存储: Room 保存已配对相机DataStore 保存设置和 LSS 设备 ID。
  • 相机连接: BLE / GATT 与原生 LSS 认证,再通过经典蓝牙 RFCOMM 建立 PTP 连接,并进行第二次认证握手。
  • 测试: 覆盖协议编解码、广播解析、PTP-BT 数据帧、DeviceInfo 解析和扫描流程;不覆盖真实 GATT、原生认证或相机端到端操作。

开发约定和运行时依赖关系见 AGENTS.md

许可与致谢

nokkin 原创源代码采用 Apache License 2.0。随附的 libLsSec-jni.so 属于第三方材料,不在该许可证覆盖范围内,详情见 NOTICE

Nikon、SnapBridge 等名称属于各自权利人的商标。nokkin 是独立项目,与尼康公司无隶属关系,也未获其背书或赞助。