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

WIP: 2.11.0 #258

Merged
merged 42 commits into from
Aug 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
265c56c
Add files via upload
MayanKoyote Apr 12, 2024
2117037
replacing _L_ON/OFF with _L_ON_F/OFF_F
MayanKoyote Apr 14, 2024
4eab472
Add LICENSE for U8g2lib binaries
Schokobecher Apr 16, 2024
256bc9c
Merge pull request #251 from Schokobecher/develop
solosky Apr 18, 2024
1ad8583
add more file folder name check
solosky May 15, 2024
b99fd2c
update launcher.json
solosky May 15, 2024
1b35552
Put a switch on those things.
FluffyOMC May 18, 2024
e836a4c
Merge pull request #254 from VocalFan/main
solosky May 20, 2024
b7ab2bb
fix flash id
solosky May 20, 2024
ba6fd98
Merge pull request #250 from MayanKoyote/develop-brass
solosky May 20, 2024
0f056ba
Merge pull request #249 from MayanKoyote/develop-confirm
solosky May 20, 2024
b6b9283
update amiibo database icon, contributed by @baicheng
solosky Jun 20, 2024
a3334bb
update chameleon ultra upstream
solosky Jul 26, 2024
0c06cf6
add more new tag emulations: TAG_TYPE_MF0ICU1,
solosky Jul 26, 2024
7e2769e
Spnish Translation Tweak
impeeza Jul 29, 2024
ba32281
Merge pull request #257 from impeeza/impeeza-ES20240729
solosky Jul 29, 2024
877a835
Add about information
solosky Aug 11, 2024
9c64c39
New tag type select
solosky Aug 11, 2024
e4e52c9
Add about information
impeeza Aug 11, 2024
c23fe4a
Fixed #260: remove deprecated script font_data_gen.sh
solosky Aug 12, 2024
beb6539
Update Mifare Ultralight description
solosky Aug 12, 2024
be10b14
Add files via upload
impeeza Aug 12, 2024
8248efd
Merge pull request #259 from impeeza/impeeza-ESAbout
solosky Aug 12, 2024
1dc9a4a
Changes related to commit 877a835
MayanKoyote Aug 12, 2024
89bf4ca
Merge pull request #261 from MayanKoyote/develop-ainfo
solosky Aug 13, 2024
8794d50
License should be GPL 2.0 #259
solosky Aug 13, 2024
82eb8e6
add readonly flag
solosky Aug 19, 2024
5d4cc1e
add read only menu
solosky Aug 20, 2024
dad1b1e
amiibo browser and amiidb support read only option #256
solosky Aug 20, 2024
d4fb6cd
web application supports read only attribute
solosky Aug 21, 2024
9ca92f9
web build artifact
solosky Aug 21, 2024
f98a3b0
add new setting field
solosky Aug 21, 2024
aa252ca
web: Changes related to commit d4fb6c
MayanKoyote Aug 21, 2024
936ef88
support default card for card emulator app #156
solosky Aug 22, 2024
f54bbfd
Merge pull request #263 from MayanKoyote/develop-RO
solosky Aug 22, 2024
966e131
update gh-pages
solosky Aug 22, 2024
a15b9e1
update i18n.csv
solosky Aug 22, 2024
35ce865
update gh-pages
solosky Aug 22, 2024
feb7fec
Changes related to commits 5d4cc1e and 936ef88
MayanKoyote Aug 23, 2024
e4d1031
Merge pull request #264 from MayanKoyote/develop-defcard
solosky Aug 24, 2024
00a6adc
update documents
solosky Aug 25, 2024
ed61ce8
fix card emulator default card
solosky Aug 25, 2024
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
6 changes: 3 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"name": "Pixl.js JLink Debug",
"cwd": "${workspaceRoot}",
"executable": "fw/_build/pixljs.out",
"armToolchainPath": "D:/dev/SDKs/gcc-arm-none-eabi-10-2020-q4-major/bin",
"armToolchainPath": "",
"request": "launch",
"type": "cortex-debug",
"servertype": "jlink",
Expand All @@ -22,7 +22,7 @@
"name": "Pixl.js Pyocd Debug",
"cwd": "${workspaceRoot}",
"executable": "fw/_build/pixljs.out",
"armToolchainPath": "D:/dev/SDKs/gcc-arm-none-eabi-10-2020-q4-major/bin",
"armToolchainPath": "",
"request": "launch",
"type": "cortex-debug",
"servertype": "pyocd",
Expand All @@ -35,7 +35,7 @@
"name": "Pixl.js Openocd Debug",
"cwd": "${workspaceRoot}",
"executable": "fw/_build/pixljs.out",
"armToolchainPath": "D:/dev/SDKs/gcc-arm-none-eabi-10-2020-q4-major/bin",
"armToolchainPath": "",
"request": "launch",
"type": "cortex-debug",
"servertype": "openocd",
Expand Down
5 changes: 4 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
"nrf_log.h": "c",
"string.h": "c",
"math.h": "c",
"mlib_common.h": "c"
"mlib_common.h": "c",
"ios": "c",
"limits": "c",
"algorithm": "c"
}
}
5 changes: 4 additions & 1 deletion docs/en/02-Flash-Firmware.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,11 @@ First make sure your device is in off state, then press key sequences bellow to
- Any key to wake up the device
- LEFT
- MIDDLE
- LEFT X 4
- LEFT X N
- MIDDLE

If the firmware version before 2.11.x, press LEFT x 4
If the firmware version after 2.11.x, press LEFT x 5

Now you device is on DFU mode, use any of the [nRF Connect APP](#nRF-Connect-APP) or [Directly to the Firmware Update Page](#directly-to-the-firmware-update-page) methods to upgrade the fimware.

58 changes: 31 additions & 27 deletions docs/en/04-Using-Firmware.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,11 @@ You can browse folders and files using the thumbwheel slide dial switch, pushing
Once you select a .BIN file his data is used like the current amiibo, the screen shows current amiibo details like amiibo current UUID, filename and amiibo name.

## Amiibo details screen
You can use side buttons to change the current amiibo with the next or previous one on the current folder. Pressing the middle button you can change the behavior of the current amiibo, on the sub menu:
You can use side buttons to change the current amiibo with the next or previous one on the current folder.
If the amiibo file is marked as read-only, an info icon will be displayed in front of the amiiboe file name line.

## Amiibo detail menu
Pressing the middle button you can change the behavior of the current amiibo, on the sub menu:

| |
| ------------ |
Expand All @@ -58,6 +62,8 @@ You can use side buttons to change the current amiibo with the next or previous
Changes the current UUID presented to game to current amiibo. The new UUID stays in place until you change the current amiibo or select this option again.
### Auto Rand. (Automatic Random)
Turning ON this feature, will generate a new random UUID for the current amiibo each time a game read it. Allowing to use the same amiibo multiple times on games with restrictions.
### Read-only
Turning on this feature, any write operation to this tag will be denied.
### Delete Tag
Delete the file associated to current amiibo.
### Back to Tag Details
Expand Down Expand Up @@ -90,32 +96,6 @@ Returns to the file list of current folder.
### Back to Main Menu
Exit the amiibo emulator application.

If you have **highlighted a storage** the properties sub menu is different:

| |
| ------------ |
| Storage Status<BR>Total Space<BR>Free Space<BR>Format…<BR>Back List<BR>Back to Main Menu |
| |

### Storage Status
Shows the current status and type of the storage, by example:
```
=====Not Mounted=====
===Mounted[LFS]===
===Mounted[FFS]===
```

### Total Space
Shows total space of the mounted storage on KB.
### Free Space
Shows the actual free space of the mounted storage on KB.
### Format…
Ask confirmation for formatting the current storage, WARNING ALL DATA WILL BE LOST!
### Back to File List
Returns to the file list of current folder.
### Back to Main Menu
Exit the amiibo emulator application.

----
# Amiibo Database
This application allows the emulation of amiibo from the list of well know ones, using legally available information like the model info, then when you select one, a new virtual amiibo is created on memory using a random UUID. In order to use this application you must to provide your «key_retail.bin» file.
Expand Down Expand Up @@ -193,6 +173,8 @@ List the configured slots, you can browse the slots using side buttons, select o

If you press and hold middle button a sub menu with the option of reset the slot is shown allowing to empty the slot.

If you turn on the Read-only feature, the current amiibo slot will denied write operation to this slot. An info icon will be displayed in front of the amiibo name if read-only feature is enabled.

## Settings…
The settings menu show you the Keys status and number of slot set up.

Expand Down Expand Up @@ -276,9 +258,15 @@ Mifare cards are commonly used for access control cards, and the device can full

NTAG series cards are commonly used for device identification. Supported NTAG card types include:

* NTAG 210
* NTAG 212
* NTAG 213
* NTAG 215
* NTAG 216
* Mifire Ultralight C
* Mifire Ultralight C
* Mifire Ultralight EV1(640 bits)
* Mifire Ultralight EV1(1312 bits)

Currently, a total of 8 cards are supported, with the option for customizing the number of cards in the future.

Expand Down Expand Up @@ -317,9 +305,17 @@ Abbreviations for card types:
| MF 1k | Mifare 1K | 1024 |
| MF 2k | Mifare 2K | 2048 |
| MF 4k | Mifare 4K | 4096 |
| N210 | NTAG 210 | 80 |
| N212 | NTAG 212 | 164 |
| N213 | NTAG 213 | 180 |
| N215 | NTAG 215 | 540 |
| N216 | NTAG 216 | 924 |
| MFUL | Mifare Ultralight | 64 |
| MFULC | Mifare Ultralight C | 144 |
| MFEV11 | Mifare Ultralight EV1(640 bits) | 80 |
| MFEV21 | Mifare Ultralight EV1(1312 bits) | 164 |

* It will display a fav icon if the card is default card. The default card is the card that is automatically activated when the device is wakeup by NFC field presents.

# Main Menu

Expand All @@ -342,6 +338,7 @@ Pressing the middle button allows you to enter the main menu. As follows:
* Nick: The current name of the card. Pressing the middle button can enter the card name setting interface.
* ID: Displays the current card ID.
* Type: Displays the current card type.
* Default Card: if enabled, the card will be automatically activated when the device is wakeup by NFC field presents.
* Data: Pressing the middle button can manage card data.
* Advanced: Pressing the middle button can enter advanced card settings.
* Slot Settings: Pressing the middle button enters the slot management interface, where you can enable or disable card slots.
Expand All @@ -350,6 +347,7 @@ Pressing the middle button allows you to enter the main menu. As follows:

> **Special Note:**:<br/>
> Some modifications need to be saved to storage when exiting to the tag details. If you have modified some configurations, be sure to enter the tag details page to save them.
> The default card feature is conflict with Fast Resume. If the default card feature is enabled, the device will active the card emulator of the default card instead of the amiibo Fast Resume feature.

## Nick Update

Expand Down Expand Up @@ -510,3 +508,9 @@ This option put the device in the DFU mode, allowing OTA firmware update, you ca
You can go to the URL [https://thegecko.github.io/web-bluetooth-dfu/](https://thegecko.github.io/web-bluetooth-dfu/) to upload the firmware, this page also can be open through the official site [https://pixl.amiibo.xyz/](https://pixl.amiibo.xyz/)
## System Reboot
Allows you to reboot the device and get back to the state after you remove and put the battery.

## Reset Default Settings
Reset all settings to default values.

## About Device
Show Pixl.js project information, include source code repository, license.
5 changes: 4 additions & 1 deletion docs/zh/02-Flash-Firmware.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,12 @@ openocd -f interface/cmsis-dap.cfg -c "transport select swd" -f target/nrf52.cfg
任意键唤醒设备
左 x 4
左 x N

如果固件版本小于 2.11.x, 按左 x 4。
如果固件版本大于 2.11.x, 按左 x 5。

现在您的设备已经进入了DFU模式,请使用任何 [nRF Connect APP](#nRF-Connect-APP) 或 [直接进入固件页面更新](#directly-to-the-firmware-update-page) 的方法来升级固件。


Expand Down
17 changes: 16 additions & 1 deletion docs/zh/04-Using-Firmware.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,15 @@ Mifare卡片常见用于门禁卡,设备可以支持完整模拟Mifare类型

NTAG系列卡片常用于设备识别。支持的NTAG卡片类型有:

* NTAG 210
* NTAG 212
* NTAG 213
* NTAG 215
* NTAG 216
* Mifire Ultralight C
* Mifire Ultralight C
* Mifire Ultralight EV1(640 bits)
* Mifire Ultralight EV1(1312 bits)

目前总共支持存储8张卡片,后续开放自定义卡片数量。

Expand Down Expand Up @@ -186,17 +192,23 @@ NTAG系列的模拟功能还是测试中,功能还不太完善,未完全模
界面说明如下:
* 第一行:`01` 是卡片序号,`de:ad:be:ef`是卡号。
* 第二行:`卡槽 01`是当前卡的名字,可以自由设置
* 第三行:`MF 1K` 显示了卡类型,类型简写见下表,`08`是卡的SAK,`04 00`是卡的ATQA 最后一个符号是写入模式,如果是存储类型标记,则允许写入,否则不允许写入
* 第三行:`MF 1K` 显示了卡类型,类型简写见下表,`08`是卡的SAK,`04 00`是卡的ATQA 最后一个符号是写入模式,如果是存储类型标记,则允许写入,否则不允许写入。如果当前卡片设置了默认卡片,设备会展示一个收藏图标作为提示。

| 显示 | 类型 | 数据文件大小 |
| ---- | --- | --- |
| MF mini | Mifare Mini | 320 |
| MF 1k | Mifare 1K | 1024 |
| MF 2k | Mifare 2K | 2048 |
| MF 4k | Mifare 4K | 4096 |
| N210 | NTAG 210 | 80 |
| N212 | NTAG 212 | 164 |
| N213 | NTAG 213 | 180 |
| N215 | NTAG 215 | 540 |
| N216 | NTAG 216 | 924 |
| MFUL | Mifare Ultralight | 64 |
| MFULC | Mifare Ultralight C | 144 |
| MFEV11 | Mifare Ultralight EV1(640 bits) | 80 |
| MFEV21 | Mifare Ultralight EV1(1312 bits) | 164 |

# 主菜单

Expand All @@ -207,6 +219,7 @@ NTAG系列的模拟功能还是测试中,功能还不太完善,未完全模
|  卡名 [卡槽 01]|
|  ID [de:ad:be:ef]|
|  卡类型 [MiFare 1K] |
|  默认卡片 [开] |
|  卡数据.. |
|  卡高级设置.. |
|  卡槽管理.. |
Expand All @@ -218,6 +231,7 @@ NTAG系列的模拟功能还是测试中,功能还不太完善,未完全模
* 卡名:卡当前的名字,按中键可以进入设置卡名界面
* ID:显示了当前卡ID
* 卡类型:显示了当前卡类型
* 默认卡片:如果开启默认卡片,当设备从NFC场唤醒时,默认模拟这张卡。
* 卡数据:按中键可以进行卡数据管理
* 卡高级设置:按中键可以进入卡高级设置
* 卡槽管理:按中键进入卡槽管理界面,可以开启关闭卡槽
Expand All @@ -226,6 +240,7 @@ NTAG系列的模拟功能还是测试中,功能还不太完善,未完全模

> **特别注意**:<br/>
> 部分的修改需要在退出到标签详情才会保存到存储,如果修改了部分配置,请务必进入到标签详情页面保存下。
> 如果开启的默认卡片功能,当设备从NFC场唤醒时,会调用卡模拟器应用,默认模拟这张卡。此功能和快速唤醒功能冲突,如果设置了默认卡,快速唤醒功能不再生效。

## 卡名修改

Expand Down
8 changes: 5 additions & 3 deletions fw/application/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ SRC_FILES += \
$(PROJ_DIR)/app/settings/scene/settings_scene_oled_contrast.c \
$(PROJ_DIR)/app/settings/scene/settings_scene_language.c \
$(PROJ_DIR)/app/settings/scene/settings_scene_storage.c \
$(PROJ_DIR)/app/settings/scene/settings_scene_about.c \
$(PROJ_DIR)/i18n/en_US.c \
$(PROJ_DIR)/i18n/zh_Hans.c \
$(PROJ_DIR)/i18n/zh_TW.c \
Expand Down Expand Up @@ -332,7 +333,7 @@ SRC_FILES += \
$(CHAMELEON_ROOT)/application/src/rfid/nfctag/hf/crypto1_helper.c \
$(CHAMELEON_ROOT)/application/src/rfid/nfctag/hf/nfc_14a.c \
$(CHAMELEON_ROOT)/application/src/rfid/nfctag/hf/nfc_mf1.c \
$(CHAMELEON_ROOT)/application/src/rfid/nfctag/hf/nfc_ntag.c \
$(CHAMELEON_ROOT)/application/src/rfid/nfctag/hf/nfc_mf0_ntag.c \
$(CHAMELEON_ROOT)/application/src/rfid/crc_utils.c \
$(CHAMELEON_ROOT)/application/src/rfid/hex_utils.c \
$(CHAMELEON_ROOT)/application/src/rfid/mf1_crapto1.c \
Expand Down Expand Up @@ -613,10 +614,10 @@ CFLAGS += -DBOARD_$(BOARD)
ifneq ($(RELEASE), 1)
CFLAGS += -DDEBUG
CFLAGS += -DEBUG_NRF
# CFLAGS += -DU8G2_USE_LARGE_GB2312_FONT
#CFLAGS += -DU8G2_USE_LARGE_FONTS
else
CFLAGS += -DNDEBUG
CFLAGS += -DU8G2_USE_LARGE_GB2312_FONT
CFLAGS += -DU8G2_USE_LARGE_FONTS
endif
CFLAGS += -DMBEDTLS_CONFIG_FILE=\"nrf_crypto_mbedtls_config.h\"
CFLAGS += -DM_USE_THREAD_BACKEND=0
Expand Down Expand Up @@ -729,6 +730,7 @@ full: settingsgen
gen:
python3 ../scripts/amiibo_db_gen.py
python3 ../scripts/i18n_gen.py
python3 ../scripts/font_data_gen.py
python3 ../scripts/resource_gen.py

flash_ocd: default
Expand Down
25 changes: 16 additions & 9 deletions fw/application/src/app/amiibo/scene/amiibo_scene_amiibo_detail.c
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
#include "amiibo_helper.h"
#include "amiibo_scene.h"
#include "app_amiibo.h"
#include "app_timer.h"
#include "cwalk2.h"
#include "db_header.h"
#include "i18n/language.h"
#include "mui_list_view.h"
#include "nrf_log.h"
#include "ntag_emu.h"
#include "vfs.h"
#include "vfs_meta.h"
#include "amiibo_helper.h"
#include "ntag_store.h"
#include "settings.h"
#include "i18n/language.h"
#include "db_header.h"
#include "vfs.h"
#include "vfs_meta.h"

#define NRF_ERR_NOT_AMIIBO -1000
#define NRF_ERR_READ_ERROR -1001
Expand Down Expand Up @@ -70,10 +70,15 @@ static int32_t ntag_read(vfs_driver_t *p_vfs_driver, const char *path, ntag_t *n
vfs_meta_t meta;
memset(&meta, 0, sizeof(vfs_meta_t));
vfs_meta_decode(obj.meta, sizeof(obj.meta), &meta);
if(meta.has_notes){
if (meta.has_notes) {
memcpy(ntag->notes, meta.notes, strlen(meta.notes));
}

NRF_LOG_INFO("has_flag:%d flag:%d", meta.has_flags, meta.flags);
if (meta.has_flags && (meta.flags & VFS_OBJ_FLAG_READONLY)) {
ntag->read_only = true;
}

res = p_vfs_driver->read_file_data(path, ntag->data, 540);
if (res != 540 && res != 532) {
return NRF_ERR_READ_ERROR;
Expand All @@ -83,7 +88,7 @@ static int32_t ntag_read(vfs_driver_t *p_vfs_driver, const char *path, ntag_t *n

static void ntag_gen(void *p_context) {
ret_code_t err_code;
app_amiibo_t * app = p_context;
app_amiibo_t *app = p_context;
ntag_t *ntag_current = &app->ntag;

err_code = amiibo_helper_rand_amiibo_uuid(ntag_current);
Expand Down Expand Up @@ -136,7 +141,7 @@ static void ntag_update_cb(ntag_event_type_t type, void *context, ntag_t *p_ntag
if (type == NTAG_EVENT_TYPE_WRITTEN) {
ntag_update(app, p_ntag);
} else if (type == NTAG_EVENT_TYPE_READ) {
settings_data_t* p_settings = settings_get_data();
settings_data_t *p_settings = settings_get_data();
if (p_settings->auto_gen_amiibo) {
app_timer_stop(m_amiibo_gen_delay_timer);
app_timer_start(m_amiibo_gen_delay_timer, APP_TIMER_TICKS(1000), app);
Expand Down Expand Up @@ -187,7 +192,9 @@ static void amiibo_scene_amiibo_detail_reload_files(app_amiibo_t *app) {
vfs_meta_t meta;
memset(&meta, 0, sizeof(vfs_meta_t));
vfs_meta_decode(obj.meta, sizeof(obj.meta), &meta);
if (obj.type == VFS_TYPE_REG && (obj.size == NTAG_DATA_SIZE || obj.size == NTAG_TAGMO_DATA_SIZE || obj.size == NTAG_THENAYA_DATA_SIZE) &&
if (obj.type == VFS_TYPE_REG &&
(obj.size == NTAG_DATA_SIZE || obj.size == NTAG_TAGMO_DATA_SIZE ||
obj.size == NTAG_THENAYA_DATA_SIZE) &&
(!meta.has_flags || !(meta.flags & VFS_OBJ_FLAG_HIDDEN))) {
string_set_str(file_name, obj.name);
string_array_push_back(app->amiibo_files, file_name);
Expand Down
Loading
Loading