2021年3月6日 星期六

[門禁卡UID/CUID] 如何用安卓手機NFC複製門禁卡(MIFARE Classic Tool教學/MCT教學)

MIFARE Classic Tool教學 / MCT教學


Android手機輕鬆簡單複製門禁卡,此方式只支援CUID卡.
大多數的門禁卡及電子鎖都可以用此方式複製.

APP載點: MIFARE Classic Tool(MCT)
推薦賣場:  CUID卡賣場 / CUID貼紙賣場

門禁系統主要是判斷卡號(UID),所以只要複製卡號就可以使用.


2021年2月14日 星期日

[BT/BLE] 重新燒錄HM-10

最近想測試有beacon功能的BLE模組,所以分別在不同時間買了幾顆HM10, 然而卻發現其功能都不太一樣且也無法使用beacon功能,指令功能與資料上的AT command差異有點大.

透過Google後才發現這模組很多都是飛元HM10的FW在模組內, 於是有了想找重燒HM10的想法, 果不其然,真的有人嘗試過了!!!

本文引用相關連結如下, 謝謝各位大神在網路上的教學:

2020年11月16日 星期一

[Eclipse] 修改文字及背景顏色

#ifdef
...
#endif

中間的背景顏色Inactive code highlight


---
背景顏色
General→Editor→Text Editor→Background color


---
控制台背景顏色
C/C++→Build→Console→Background color

2020年10月4日 星期日

[Linux] Kernel函式庫

Kernel

●忙碌等待(busy wait)

會占住CPU,不讓CPU處理其他事,不適合長時間使用.
#include <linux/delay.h>
void mdelay(unsigned long msecs); //毫秒
void udelay(unsigned long msecs); //微秒
void ndelay(unsigned long msecs); //奈秒


不忙碌等待(non-busy wait)
#include <linux/delay.h>
void ssleep(unsigned int seconds);
void msleep(unsigned int mecs);
unsigned long msleep_interruptible(unsigned int mecs);


[C] 函式庫(Library)

ASCII ->Hex
unsigned long int strtoul(const char *str, char **endptr, int base)
str: string
endptr:
base: 這是基數,2~36,或者是特殊值0。

●取絕對值
#include <stdlib.h>
int abs (int j);

●讓程式空轉以達到延遲
__NOP();

●小寫字母轉大寫
int toupper(int c);




access
http://naeilproj.blogspot.com/2015/08/linux-c-c.html


bswap_32
https://man7.org/linux/man-pages/man3/bswap.3.html


dump_stack();
#include <linux/kprobes.h>
#include <asm/traps.h>



stroul
char ptr; 
u32 value stroul("1234", ptr, 10);
把string 1234轉成value 1234
10表10進位(base)

●atoi
value → string

strcat

sscanf

strstr
char *p strstr("abcde", "de")
在abcde中找de, *p為d的位置