1# JS API Changes of the Communication Subsystem 2 3The table below lists the APIs changes of the communication subsystem in OpenHarmony 3.2 Beta2 over OpenHarmony 3.2 Beta1. 4 5## API Changes 6 7| Module| Class| Method/Attribute/Enumeration/Constant| Change Type| 8|---|---|---|---| 9| nfctech | NdefFormatableTag | formatReadOnly(message: NdefMessage): Promise\<number>;<br>formatReadOnly(message: NdefMessage, callback: AsyncCallback\<number>): void; | Added| 10| nfctech | NdefFormatableTag | format(message: NdefMessage): Promise\<number>;<br>format(message: NdefMessage, callback: AsyncCallback\<number>): void; | Added| 11| nfctech | MifareUltralightTag | getType(): MifareUltralightType; | Added| 12| nfctech | MifareUltralightTag | writeSinglePages(pageIndex: number, data: string): Promise\<number>;<br>writeSinglePages(pageIndex: number, data: string, callback: AsyncCallback\<number>): void; | Added| 13| nfctech | MifareUltralightTag | readMultiplePages(pageIndex: number): Promise\<string>;<br>readMultiplePages(pageIndex: number, callback: AsyncCallback\<string>): void; | Added| 14| nfctech | MifareUltralightType | TYPE_ULTRALIGHT_C = 2 | Added| 15| nfctech | MifareUltralightType | TYPE_ULTRALIGHT = 1 | Added| 16| nfctech | MifareUltralightType | TYPE_UNKOWN = -1 | Added| 17| nfctech | MifareClassicTag | getSectorIndex(blockIndex: number): number; | Added| 18| nfctech | MifareClassicTag | getBlockIndex(sectorIndex: number): number; | Added| 19| nfctech | MifareClassicTag | isEmulatedTag(): boolean; | Added| 20| nfctech | MifareClassicTag | getTagSize(): number; | Added| 21| nfctech | MifareClassicTag | getType(): MifareClassicType; | Added| 22| nfctech | MifareClassicTag | getBlockCountInSector(sectorIndex: number): number; | Added| 23| nfctech | MifareClassicTag | getSectorCount(): number; | Added| 24| nfctech | MifareClassicTag | restoreFromBlock(blockIndex: number): Promise\<number>;<br>restoreFromBlock(blockIndex: number, callback: AsyncCallback\<number>): void; | Added| 25| nfctech | MifareClassicTag | transferToBlock(blockIndex: number): Promise\<number>;<br>transferToBlock(blockIndex: number, callback: AsyncCallback\<number>): void; | Added| 26| nfctech | MifareClassicTag | decrementBlock(blockIndex: number, value: number): Promise\<number>;<br>decrementBlock(blockIndex: number, value: number, callback: AsyncCallback\<number>): void; | Added| 27| nfctech | MifareClassicTag | incrementBlock(blockIndex: number, value: number): Promise\<number>;<br>incrementBlock(blockIndex: number, value: number, callback: AsyncCallback\<number>): void; | Added| 28| nfctech | MifareClassicTag | writeSingleBlock(blockIndex: number, data: string): Promise\<number>;<br>writeSingleBlock(blockIndex: number, data: string, callback: AsyncCallback\<number>): void; | Added| 29| nfctech | MifareClassicTag | readSingleBlock(blockIndex: number): Promise\<string>;<br>readSingleBlock(blockIndex: number, callback: AsyncCallback\<string>): void; | Added| 30| nfctech | MifareClassicTag | authenticateSector(sectorIndex: number, key: number[], isKeyA: boolean): Promise\<boolean>;<br>authenticateSector(sectorIndex: number, key: number[], isKeyA: boolean, callback: AsyncCallback\<boolean>): void; | Added| 31| nfctech | MifareTagSize | MC_SIZE_4K = 4096 | Added| 32| nfctech | MifareTagSize | MC_SIZE_2K = 2048 | Added| 33| nfctech | MifareTagSize | MC_SIZE_1K = 1024 | Added| 34| nfctech | MifareTagSize | MC_SIZE_MINI = 320 | Added| 35| nfctech | MifareClassicType | TYPE_PRO = 2 | Added| 36| nfctech | MifareClassicType | TYPE_PLUS = 1 | Added| 37| nfctech | MifareClassicType | TYPE_CLASSIC = 0 | Added| 38| nfctech | MifareClassicType | TYPE_UNKNOWN = -1 | Added| 39| nfctech | NdefTag | getNdefTagTypeString(type: NfcForumType): string; | Added| 40| nfctech | NdefTag | setReadOnly(): Promise\<number>;<br>setReadOnly(callback: AsyncCallback\<number>): void; | Added| 41| nfctech | NdefTag | canSetReadOnly(): Promise\<boolean>;<br>canSetReadOnly(callback: AsyncCallback\<boolean>): void; | Added| 42| nfctech | NdefTag | writeNdef(msg: NdefMessage): Promise\<number>;<br>writeNdef(msg: NdefMessage, callback: AsyncCallback\<number>): void; | Added| 43| nfctech | NdefTag | readNdef(): Promise\<NdefMessage>;<br>readNdef(callback: AsyncCallback\<NdefMessage>): void; | Added| 44| nfctech | NdefTag | isNdefWritable(): Promise\<boolean>;<br>isNdefWritable(callback: AsyncCallback\<boolean>): void; | Added| 45| nfctech | NdefTag | getNdefMessage(): NdefMessage; | Added| 46| nfctech | NdefTag | getNdefTagType(): NfcForumType; | Added| 47| nfctech | NdefTag | createNdefMessage(data: string): NdefMessage;<br>createNdefMessage(ndefRecords: NdefRecord[]): NdefMessage; | Added| 48| nfctech | NfcForumType | MIFARE_CLASSIC = 101 | Added| 49| nfctech | NfcForumType | NFC_FORUM_TYPE_4 = 4 | Added| 50| nfctech | NfcForumType | NFC_FORUM_TYPE_3 = 3 | Added| 51| nfctech | NfcForumType | NFC_FORUM_TYPE_2 = 2 | Added| 52| nfctech | NfcForumType | NFC_FORUM_TYPE_1 = 1 | Added| 53| nfctech | NdefMessage | messageToString(ndefMessage: NdefMessage): string; | Added| 54| nfctech | NdefMessage | makeExternalRecord(domainName: string, serviceName: string, externalData: string): NdefRecord; | Added| 55| nfctech | NdefMessage | makeMimeRecord(mimeType: string, mimeData: string): NdefRecord; | Added| 56| nfctech | NdefMessage | makeTextRecord(text: string, locale: string): NdefRecord; | Added| 57| nfctech | NdefMessage | makeUriRecord(uri: string): NdefRecord; | Added| 58| nfctech | NdefMessage | getNdefRecords(): NdefRecord[]; | Added| 59| nfctech | RtdType | RTD_URI: 'U'; | Added| 60| nfctech | RtdType | RTD_TEXT: 'T'; | Added| 61| nfctech | TnfType | TNF_UNCHANGED = 0x6 | Added| 62| nfctech | TnfType | TNF_UNKNOWN = 0x5 | Added| 63| nfctech | TnfType | TNF_EXT_APP = 0x4 | Added| 64| nfctech | TnfType | TNF_ABSOLUTE_URI = 0x3 | Added| 65| nfctech | TnfType | TNF_MEDIA = 0x2 | Added| 66| nfctech | TnfType | TNF_WELL_KNOWN = 0x1 | Added| 67| nfctech | TnfType | TNF_EMPTY = 0x0 | Added| 68| nfctech | NdefRecord | payload: string; | Added| 69| nfctech | NdefRecord | id: string; | Added| 70| nfctech | NdefRecord | rtdType: string; | Added| 71| nfctech | NdefRecord | tnf: number; | Added| 72| nfctech | IsoDepTag | isExtendedApduSupported(): Promise\<boolean>;<br>isExtendedApduSupported(callback: AsyncCallback\<boolean>): void; | Added| 73| nfctech | IsoDepTag | getHiLayerResponse(): string; | Added| 74| nfctech | IsoDepTag | getHistoricalBytes(): string; | Added| 75| ohos.bluetooth | ProfileId | PROFILE_PAN_NETWORK = 7 | Added| 76| ohos.bluetooth | ScanFilter | manufactureDataMask?: ArrayBuffer; | Added| 77| ohos.bluetooth | ScanFilter | manufactureData?: ArrayBuffer; | Added| 78| ohos.bluetooth | ScanFilter | manufactureId?: number; | Added| 79| ohos.bluetooth | ScanFilter | serviceDataMask?: ArrayBuffer; | Added| 80| ohos.bluetooth | ScanFilter | serviceData?: ArrayBuffer; | Added| 81| ohos.bluetooth | ScanFilter | serviceSolicitationUuidMask?: string; | Added| 82| ohos.bluetooth | ScanFilter | serviceSolicitationUuid?: string; | Added| 83| ohos.bluetooth | ScanFilter | serviceUuidMask?: string; | Added| 84| ohos.bluetooth | PanProfile | isTetheringOn(): boolean; | Added| 85| ohos.bluetooth | PanProfile | setTethering(enable: boolean): void; | Added| 86| ohos.bluetooth | PanProfile | off(type: "connectionStateChange", callback?: Callback\<StateChangeParam>): void; | Added| 87| ohos.bluetooth | PanProfile | on(type: "connectionStateChange", callback: Callback\<StateChangeParam>): void; | Added| 88| ohos.bluetooth | PanProfile | disconnect(device: string): boolean; | Added| 89| ohos.bluetooth | bluetooth | getProfileInst(profileId: ProfileId): A2dpSourceProfile \| HandsFreeAudioGatewayProfile \| HidHostProfile \| PanProfile; | Added| 90| ohos.nfc.tag | TagInfo | remoteTagService: rpc.RemoteObject; | Added| 91| ohos.nfc.tag | TagInfo | tagRfDiscId: number; | Added| 92| ohos.nfc.tag | TagInfo | extrasData: PacMap[]; | Added| 93| ohos.nfc.tag | TagInfo | technology: number[]; | Added| 94| ohos.nfc.tag | TagInfo | uid: string; | Added| 95| ohos.nfc.tag | tag | getNdefFormatableTag(tagInfo: TagInfo): NdefFormatableTag | Added| 96| ohos.nfc.tag | tag | getMifareUltralightTag(tagInfo: TagInfo): MifareUltralightTag | Added| 97| ohos.nfc.tag | tag | getMifareClassicTag(tagInfo: TagInfo): MifareClassicTag | Added| 98| ohos.nfc.tag | tag | getNdefTag(tagInfo: TagInfo): NdefTag | Added| 99| ohos.nfc.tag | tag | getIsoDepTag(tagInfo: TagInfo): IsoDepTag | Added| 100| ohos.nfc.tag | tag | const NDEF_FORMATABLE = 10; | Added| 101| ohos.wifi | WifiLinkedInfo | macType: number; | Added| 102| ohos.wifi | WifiSecurityType | WIFI_SEC_TYPE_WAPI_PSK = 9 | Added| 103| ohos.wifi | WifiSecurityType | WIFI_SEC_TYPE_WAPI_CERT = 8 | Added| 104| ohos.wifi | WifiSecurityType | WIFI_SEC_TYPE_OWE = 7 | Added| 105| ohos.wifi | WifiSecurityType | WIFI_SEC_TYPE_EAP_SUITE_B = 6 | Added| 106| ohos.wifi | WifiSecurityType | WIFI_SEC_TYPE_EAP = 5 | Added| 107| ohos.wifi | WifiScanInfo | infoElems: Array\<WifiInfoElem>; | Added| 108| ohos.wifi | WifiScanInfo | centerFrequency1: number; | Added| 109| ohos.wifi | WifiScanInfo | centerFrequency0: number; | Added| 110| ohos.wifi | WifiChannelWidth | WIDTH_INVALID | Added| 111| ohos.wifi | WifiChannelWidth | WIDTH_80MHZ_PLUS = 4 | Added| 112| ohos.wifi | WifiChannelWidth | WIDTH_160MHZ = 3 | Added| 113| ohos.wifi | WifiChannelWidth | WIDTH_80MHZ = 2 | Added| 114| ohos.wifi | WifiChannelWidth | WIDTH_40MHZ = 1 | Added| 115| ohos.wifi | WifiChannelWidth | WIDTH_20MHZ = 0 | Added| 116| ohos.wifi | WifiInfoElem | content: Uint8Array; | Added| 117| ohos.wifi | WifiInfoElem | eid: number; | Added| 118| ohos.wifi | WifiDeviceConfig | eapConfig: WifiEapConfig; | Added| 119| ohos.wifi | WifiEapConfig | eapSubId: number; | Added| 120| ohos.wifi | WifiEapConfig | plmn: string; | Added| 121| ohos.wifi | WifiEapConfig | realm: string; | Added| 122| ohos.wifi | WifiEapConfig | domainSuffixMatch: string; | Added| 123| ohos.wifi | WifiEapConfig | altSubjectMatch: string; | Added| 124| ohos.wifi | WifiEapConfig | clientCertAliases: string; | Added| 125| ohos.wifi | WifiEapConfig | caPath: string; | Added| 126| ohos.wifi | WifiEapConfig | caCertAliases: string; | Added| 127| ohos.wifi | WifiEapConfig | password: string; | Added| 128| ohos.wifi | WifiEapConfig | anonymousIdentity: string; | Added| 129| ohos.wifi | WifiEapConfig | identity: string; | Added| 130| ohos.wifi | WifiEapConfig | phase2Method: Phase2Method; | Added| 131| ohos.wifi | WifiEapConfig | eapMethod: EapMethod; | Added| 132| ohos.wifi | Phase2Method | PHASE2_AKA_PRIME | Added| 133| ohos.wifi | Phase2Method | PHASE2_AKA | Added| 134| ohos.wifi | Phase2Method | PHASE2_SIM | Added| 135| ohos.wifi | Phase2Method | PHASE2_GTC | Added| 136| ohos.wifi | Phase2Method | PHASE2_MSCHAPV2 | Added| 137| ohos.wifi | Phase2Method | PHASE2_MSCHAP | Added| 138| ohos.wifi | Phase2Method | PHASE2_PAP | Added| 139| ohos.wifi | Phase2Method | PHASE2_NONE | Added| 140| ohos.wifi | EapMethod | EAP_UNAUTH_TLS | Added| 141| ohos.wifi | EapMethod | EAP_AKA_PRIME | Added| 142| ohos.wifi | EapMethod | EAP_AKA | Added| 143| ohos.wifi | EapMethod | EAP_SIM | Added| 144| ohos.wifi | EapMethod | EAP_PWD | Added| 145| ohos.wifi | EapMethod | EAP_TTLS | Added| 146| ohos.wifi | EapMethod | EAP_TLS | Added| 147| ohos.wifi | EapMethod | EAP_PEAP | Added| 148| ohos.wifi | EapMethod | EAP_NONE | Added| 149| ohos.wifi | wifi | getP2pGroups(): Promise\<Array\<WifiP2pGroupInfo>>;<br>getP2pGroups(callback: AsyncCallback\<Array\<WifiP2pGroupInfo>>): void; | Added| 150| ohos.wifi | wifi | getP2pLocalDevice(): Promise\<WifiP2pDevice>;<br>getP2pLocalDevice(callback: AsyncCallback\<WifiP2pDevice>): void; | Added| 151| ohos.wifi | wifi | connectToCandidateConfig(networkId: number): void; | Added| 152| ohos.wifi | wifi | getCandidateConfigs(): Array\<WifiDeviceConfig>; | Added| 153| ohos.wifi | wifi | removeCandidateConfig(networkId: number): Promise\<void>;<br>removeCandidateConfig(networkId: number, callback: AsyncCallback\<void>): void; | Added| 154| ohos.wifi | wifi | addCandidateConfig(config: WifiDeviceConfig): Promise\<number>;<br>addCandidateConfig(config: WifiDeviceConfig, callback: AsyncCallback\<number>): void; | Added| 155| ohos.wifi | wifi | getScanInfosSync(): Array\<WifiScanInfo>; | Added| 156| ohos.bluetooth | A2dpSourceProfile | getPlayingState(device: string): PlayingState; | Deprecated| 157| ohos.nfc.tag | TagInfo | supportedProfiles: number[]; | Deprecated| 158