鉴权返回值信息表
文档版本 2.0.3
发布日期 2019-10-23
两大鉴权接口
- 在使用鉴权接口时我们先确保OEMID,合同号,用户密码及企业版本的授权码信息正确。
 - 鉴权接口必须在线鉴权,如果断网鉴权将失败。
 - 免费版本的SDK取消以前2小时体验(即使离线或者鉴权失败的情况下依然能使用两小时),统一采用在线鉴权,如果鉴权失败则不能使用。
 - 鉴权接口如下
 
个人版本接口
public int AuthorizedDevice(
String uidStr, 
String password, 
Context context)
企业版本接口
public int AuthorizedDeviceUserPassword(
String uidStr, 
String password, 
Context context, 
String userPassword)
接口返回值表
鉴权返回值分成两部分,第一部分是SDK自身的返回值,另外一部分是服务器返回。
- SDK自身返回会值:
 - Failed to open a socket
 
| 描述 | 返回值 | 
|---|
| Failed to open a socket | -66 | 
- Buffer is too small to hold the data.
 
| 描述 | 返回值 | 
|---|
| Buffer is too small to hold the data. | -67 | 
- The connection to the given server / port failed.
 
| 描述 | 返回值 | 
|---|
| The connection to the given server / port failed. | -68 | 
- The context is invalid, eg because it was free()ed.
 
| 描述 | 返回值 | 
|---|
| The context is invalid, eg because it was free()ed. | -69 | 
- Binding of the socket failed.
 
| 描述 | 返回值 | 
|---|
| Binding of the socket failed. | -70 | 
- Polling the net context failed.
 
| 描述 | 返回值 | 
|---|
| Polling the net context failed. | -71 | 
- Could not listen on the socket.
 
| 描述 | 返回值 | 
|---|
| Could not listen on the socket. | -72 | 
- Could not accept the incoming connection.
 
| 描述 | 返回值 | 
|---|
| Could not accept the incoming connection. | -74 | 
- Reading information from the socket failed
 
| 描述 | 返回值 | 
|---|
| Reading information from the socket failed | -76 | 
- Sending information through the socket failed.
 
| 描述 | 返回值 | 
|---|
| Sending information through the socket failed. | -78 | 
- Connection was reset by peer.
 
| 描述 | 返回值 | 
|---|
| Connection was reset by peer. | -80 | 
- Failed to get an IP address for the given hostname.
 
| 描述 | 返回值 | 
|---|
| Failed to get an IP address for the given hostname. | -82 | 
鉴权服务器返回值:
| 描述 | 返回值 | 
|---|
| 产品系列号或/和软件版本号不对,<br/>或在server上没有对应的软件版本号或产品系列号 | 504 | 
| 描述 | 返回值 | 
|---|
| 产品系列号或/和软件版本号不对,<br/>或在server上没有对应的软件版本号或产品系列号 | 505 | 
| 描述 | 返回值 | 
|---|
| uid获取失败'  从服务器的产品系列号及软件版本号去发布时,<br/>与软件里的产品系列号或/和软件版本号不一致 | 506 | 
| 描述 | 返回值 | 
|---|
| userpsw不匹配' 用户授权密码不正确 | 509 | 
| 描述 | 返回值 | 
|---|
| 老设备还在测试期间(不是错误,<br/>是合同本身需要有一个试用期,试用期间会得到全零的SN) | 512 | 
- 设备测试
 
| 描述 | 返回值 | 
|---|
| 新设备在测试期间(不是错误,<br/>是合同本身需要有一个试用期,试用期间会得到全零的SN) | 513 | 
- 设备注册失败
 
| 描述 | 返回值 | 
|---|
| 注册次数已达上限'  <br/>客户合同里的授权数已经用完 | 514 | 
- 设备注册失败
 
- 等待审核
 
- devId 长度错误
 
- devId 输入不合法
 
															
									
										
											| 文件名 | 
											大小 | 
											下载次数 | 
											操作 | 
										
									
									
																																																																			
													| 
														鉴权返回值.pdf
													 | 
													167.25KB | 
													0 | 
													
														下载
													 |