EST-100/EST-100GS/EST-J13X系列Harmony鴻蒙系統開發包(含身份證、社保卡、CPU、M1、磁條卡、銀行卡等卡)

廣東東信智能科技有限公司DONSEE EST-100多功能智能卡讀寫器系列開源鴻蒙開發包(含身份證、社保卡、CPU卡、M1卡、磁條卡、銀行卡、就診卡、掃碼等卡),支持EST-100、EST-100G、EST-J13X、EST-100GS、EST-100MR、EST-100(M20)等機型,僅供開發人員和測試人員使用。
鴻蒙測試版本:OpenHarmony 3.2、4.0、4.1、5.0、6.0.0、6.0.1、6.0.2、6.1 等系列。
demo開發語言:ArkTS,支持定制提供C語言調用的so庫開發使用。
編譯環境:
DevEco Studio 6.0.2 Release
Build Version: 6.0.2.642, built on March 5, 2026
Runtime version: 21.0.8+1-b1038.71 amd64 (JCEF 122.1.9)
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Toolkit: sun.awt.windows.WToolkit
Windows 10.0
GC: G1 Young Generation, G1 Concurrent GC, G1 Old Generation
Memory: 2048M
Cores: 16
Registry:
idea.plugins.compatible.build=IC-243.24978.46
Non-Bundled Plugins:
com.huawei.deveco.intelligent-assistant (6.1.1.268)
開源鴻蒙系統開發包下載地址:
OpenHarmony開源鴻蒙SDK開發包V2.0.3-20260604↓
開源鴻蒙系統SDK更新中,可聯系公司商務發送最新版SDK開發包。
產品銷售咨詢:138-2221-6429
鴻蒙技術咨詢:139-2221-0502








以下為更早版本:
OpenHarmony開源鴻蒙SDK開發包V1.0.3-20250827↓
OpenHarmony開源鴻蒙SDK開發包V1.0.3-20241204↓
以下為讀身份證和社保卡的部分代碼,詳細見開發文檔或者demo。
import DonseeDevice from 'donseedevicelib/src/main/ets/model/DonseeDevice';
import { IDCardInfor } from 'donseedevicelib/src/main/ets/model/IDCardInfor';
/**
* 身份證讀卡頁面
* 廣東東信智能科技有限公司
* www.www.mujia.cc
*/
@Entry
@Component
struct Index {
@State message: string = '東信智能多功能讀寫器測OpenHarmony開源鴻蒙測試';
@State imgBase64: string = '';
@State imageVisible: Visibility = Visibility.None;
@State tvResult: string = '等待操作...';
build() {
Column() {
// 頂部標題
Text(this.message)
.fontSize(20)
.fontWeight(FontWeight.Bold)
.fontColor('#0066CC')
.margin({ top: 10, bottom: 10 });
// 身份證照片展示
Image(this.imgBase64)
.visibility(this.imageVisible)
.width(102)
.height(126)
.borderRadius(10)
.objectFit(ImageFit.Cover)
.backgroundColor('#F5F5F5')
.margin({ bottom: 5 });
// 操作結果卡片
Scroll() {
Text(this.tvResult)
.fontSize(16)
.fontColor('#333333')
.lineHeight(26)
.width('100%')
.padding(20)
}
.width('92%')
.height(260)
.backgroundColor('#FFFFFF')
.borderRadius(16)
.shadow({ radius: 4, color: '#10000000', offsetX: 0, offsetY: 2 })
.margin({ bottom: 10 });
// 功能按鈕區域
Column({ space: 16 }) {
Button("打開設備")
.width('92%')
.height(40)
.fontSize(18)
.fontWeight(FontWeight.Medium)
.backgroundColor('#0066CC')
.borderRadius(26)
.onClick(() => {
let ret: number = DonseeDevice.Donsee_Open("USB");
if (ret == 0) {
DonseeDevice.Donsee_Beep(50);
this.tvResult = "? 東信讀寫器打開成功";
} else {
this.tvResult = "? 東信讀寫器打開失敗,錯誤碼:" + ret;
}
});
Button("讀取身份證")
.width('92%')
.height(40)
.fontSize(18)
.fontWeight(FontWeight.Medium)
.backgroundColor('#009966')
.borderRadius(26)
.onClick(() => {
let idInfo: IDCardInfor = DonseeDevice.Donsee_ReadIDCard(1);
console.info("readResult: " + idInfo.result);
if (idInfo.result == 0) {
DonseeDevice.Donsee_Beep(50);
if (idInfo.ENfullnameOther.length > 0) {
idInfo.ENfullname += idInfo.ENfullnameOther;
}
this.tvResult =
"?? 中文姓名:" + idInfo.name + "\n" +
"?? 英文姓名:" + idInfo.ENfullname + "\n" +
"?? 性別:" + idInfo.sex + " 民族:" + idInfo.people + "\n" +
"?? 出生日期:" + idInfo.birthday + "\n" +
"?? 住址:" + idInfo.address + "\n" +
"?? 身份證號:" + idInfo.number + "\n" +
"?? 簽發機關:" + idInfo.organs + "\n" +
"? 有效期:" + idInfo.signdate + " - " + idInfo.validterm;
if (idInfo.imgBase64.length > 0) {
this.imgBase64 = 'data:image/png;base64,' + idInfo.imgBase64;
this.imageVisible = Visibility.Visible;
}
} else {
this.imageVisible = Visibility.None;
this.tvResult = "? 讀取失敗,錯誤碼:" + idInfo.result;
}
});
Button("讀社保卡")
.width('92%')
.height(40)
.fontSize(18)
.fontWeight(FontWeight.Medium)
.backgroundColor('#009966')
.borderRadius(26)
.onClick(() => {
let nSlotPsam = 1
let nType = 1
let ssCardInfor = DonseeDevice.Donsee_ReadSSCard(nSlotPsam, nType)
if (ssCardInfor.result == 0) {
DonseeDevice.Donsee_Beep(50);
this.tvResult = "姓 名:" + ssCardInfor.name + "\n"
+ "性 別:" + ssCardInfor.sex + "\n"
+ "民 族:" + ssCardInfor.nation + "\n"
+ "出身日期:" + ssCardInfor.birthday + "\n"
+ "城市代碼:" + ssCardInfor.city + "\n"
+ "身份證號:" + ssCardInfor.idnumber + "\n"
+ "社保卡號:" + ssCardInfor.cardnumber + "\n"
+ "開始有效期限:" + ssCardInfor.signdate + "\n"
+ "結束有效期限:" + ssCardInfor.validterm + "\n"
+ "社保版本:" + ssCardInfor.cardveVrsion + "\n"
} else {
this.tvResult = "讀卡失敗:" + ssCardInfor.result+"\n errMsg = "+ssCardInfor.errMsg.trim()
}
});
Button("讀社保卡基本信息")
.width('92%')
.height(40)
.fontSize(18)
.fontWeight(FontWeight.Medium)
.backgroundColor('#009966')
.borderRadius(26)
.onClick(() => {
let datas = DonseeDevice.Donsee_iReadCardBas(3)
if (datas[0] == 0) {
DonseeDevice.Donsee_Beep(50);
this.tvResult = "讀基本信息成功:" + datas[1]
} else {
this.tvResult = "讀基本信息失敗:" + datas[0]
}
});
}
.width('100%')
}
.width('100%')
.height('100%')
.backgroundColor('#F2F3F5')
.alignItems(HorizontalAlign.Center)
}
}
import CommonContants from '../common/CommonContants';
import DonseeDevice from '@ohos/DonseeDevice/src/main/ets/model/DonseeDevice';
import { IDCardInfor } from '@ohos/DonseeDevice/src/main/ets/model/IDCardInfor';
/**
* 身份證讀卡頁面
* 廣東東信智能科技有限公司
* www.www.mujia.cc
*/
@Component
export struct IDCardComponent {
@State tvResult: string = '';
@State imgBase64: string = '';
@State imageVisible: Visibility = Visibility.None;
@State nType : number = 1;//0,文本信息;1,文本+照片;2,文本+照片+指紋
@Provide showSelector: boolean = false // 是否展開下拉菜單
@Provide modesData: any = [{id: 1,name: '文本信息'},{id: 2,name: '文本照片'},{id: 3,name: '文本照片指紋'}]
@Provide modeId: number = 0 // 當前選中項id
build() {
Column() {
Row() {
Column() {
Image(this.imgBase64)
.visibility(this.imageVisible)
.width(51)
.height(63)
.objectFit(ImageFit.Contain)
Text(this.tvResult)
.fontSize(10)
.margin({ top: 2 })
}
.layoutWeight(1)
.margin({left:10})
.alignItems(HorizontalAlign.Start)
Column() {
Column() {
Row() {
Radio({ value: "文本", group: "1234" })
.checked(this.nType === 0 ? true : false)
.height(20)
.width(20)
.onClick(() => {
this.nType = 0;
})
Text('文本')
}.margin({ left: 10 })
Row() {
Radio({ value: "文本照片", group: "1234" })
.checked(this.nType === 1 ? true : false)
.height(20)
.width(20)
.onClick(() => {
this.nType = 1;
console.info("Radio onClick")
})
Text('文本照片')
}.margin({ left: 10 })
Row() {
Radio({ value: "文本照片指紋", group: "1234" })
.checked(this.nType === 2 ? true : false)
.height(20)
.width(20)
.onClick(() => {
this.nType = 2;
console.info("Radio onClick")
})
Text('文本照片指紋')
}.margin({ left: 10 })
}.justifyContent(FlexAlign.Start)
.alignItems(HorizontalAlign.Start)
Button("讀身份證")
.fontSize($r('app.float.submit_button_font_size'))
.fontWeight(CommonContants.FONT_WEIGHT)
.height(30)
.width(120)
.onClick(() => {
let idInfo:IDCardInfor = DonseeDevice.Donsee_ReadIDCard(this.nType)
console.info("result: " + idInfo.result)
if(idInfo.result==0){
if(idInfo.ENfullnameOther.length>0){
idInfo.ENfullname += idInfo.ENfullnameOther
}
this.tvResult =
"中文姓名:"+ idInfo.name+" "
+"英文姓名:"+ idInfo.ENfullname+"\n"
+"性 別:"+ idInfo.sex+" "
+"民 族:"+ idInfo.people+" "
+"出生日期:"+ idInfo.birthday+"\n"
+"家庭住址:"+ idInfo.address+"\n"
+"身份證號:"+ idInfo.number+"\n"
+"簽發單位:"+ idInfo.organs+" "
+"國籍代碼:"+ idInfo.nationality+"\n"
+"有效期限:"+ idInfo.signdate+" - "+ idInfo.validterm+"\n"
+"證件類別:"+ idInfo.certType+" "
+"證件版本:"+ idInfo.certVersion+"\n"
+"通行證號:"+ idInfo.passNu+" "
+"換證次數:"+ idInfo.changCount+"\n"
+"簽發數次:"+ idInfo.signCount+" "
+"既往版本:"+ idInfo.oldNumber+"\n"
+"指紋:"+ idInfo.figData+"\n"
if(idInfo.imgBase64.length>0){
this.imgBase64 = 'data:image/png;base64,'+idInfo.imgBase64
this.imageVisible = Visibility.Visible
}else{
this.imageVisible = Visibility.None
}
}else{
this.imgBase64 = ''
this.tvResult = "讀取失敗:"+ idInfo.result
}
}).margin({top:10})
Button("身份證ID")
.fontSize($r('app.float.submit_button_font_size'))
.fontWeight(CommonContants.FONT_WEIGHT)
.height(30)
.width(120)
.onClick(() => {
let[result,data] = DonseeDevice.Donsee_ReadIDCardUid()
if(result == 0){
this.tvResult = "Uid:"+ data
}else{
this.tvResult = "Uid讀取失敗:"+ result
}
}).margin({top:10})
}.justifyContent(FlexAlign.End)
.margin({right:10})
}.justifyContent(FlexAlign.Start)
.width(CommonContants.FULL_PARENT)
}.justifyContent(FlexAlign.Start)
.backgroundColor($r('app.color.card_background'))
.width(CommonContants.FULL_PARENT)
.height(CommonContants.FULL_PARENT)
}
// 獲取選中項的內容
getSelectedText() {
const selectedItem = this.modesData.find(item => {
console.info('this.modeId==='+this.modeId)
console.info('item.id==='+item.id)
return item.id == this.modeId
})
if (selectedItem) {
console.info('selectedItem.name==='+selectedItem.name)
return selectedItem.name
}
return ''
}
}








































