SSR_SetUserTmpStr in zkemkeeper.dll returns Error Code: -100 - zkemkeeper

I'm using VB.NET to copy fingerprint template from one device to another. I've successfully pulled fingerprint template from the origin device using SSR_GetUserTmpStr. However, when set the fingerprint template to destination device using SSR_SetUserTmpStr returns -100.
SSR_SetUserInfo was successfull and the new user was registered at the destination device.
Please advice.

Related

How to set hostname used in JavaMail or Apache James Message-Id header?

I am having issues with mail bouncing when sending from my own server to my own active yahoo account using JavaMail. The mails are passing SPF, DKIM and DMARC according to google mail that receives the same messages being bounced by yahoo. I can send messages from other accounts to my yahoo account without issue.
The messages send fine from my server to ZMail, GMail, Microsoft mail. Looking at the emails, the only thing that I have noticed is the message header for the Message-Id. My messages have the following header:
Message-ID: <923936395.17.1634776639078#[internally visible hostname]>
I am wondering if this header could be the problem and whether there is a way in JavaMail or in the Apache James to set the hostname or IP address that gets used in this message so that rather than using the "internally visible hostname", I can get the hostname that is externally visible. I have been searching the available documentation for Apache James and JavaMail but have not found any parameters to try in order to resolve this.
According to the Decompiled SRC of sun mail it should be possible by setting some properties for your session.
props.setProperty("mail.from", user);
props.setProperty("mail.host", host);
//props.setProperty("mail.user", user);
The Id will be updated by the save method (saveChanges()) and will trigger an new ID generation (updateHeaders() -> updateMessageID()). (Looked up in the decompiled MimeMessage.class)
Leading to the HostPart called in javax.mail.internet.InternetAddress.
The relevant method is _getLocalAddress.
Here you can see that the values get extracted from the Properties or will fallback to your local machine.
Used Fields:
user.name
mail.from
mail.user
mail.host
The user.name property can also be looked up from the system props.

Question about pymodbusTCP server implementaion

We have a simulator(client) and controller(server).
The controller sends a command signal through ModbusTCP to the simulator.
I want to emulate this controller on my computer.
What I have done
For the test, I wrote pymodbus Server script on my pc and pymodbus Client script on another PC. There was no problem to read holding and input register from client pc.
I connected my clinet pc to controller(server) to know what kind of values I have to send to actual client(simulator). I found out that 8 registers(from 0 to 7) are used to store integer values.
I tried to establish a connection between my pc(sever) and simulator computer(client).I was able to establish a connection and send a response to the client.
Problem
I have no information about this client(simulator) because we have no access to the client script.
I found out that this client sends a request not only for the reading but also for writing.
When I use the holding register, I got an error "illegal data address." But the input register does not show any error. For this reason, I am using input_register to save a specific integer number.
I stored some values on input_register, but sever input_registers are written by client(simulator) as below.
write request from client(simulator)
polling server(pc) with modpoll software
Question
why write requests from the client(simulator) overwrite my input_register? As far as I know, input_register is used for only reading. I assume that I made a mistake in storing a variable on the input_register.
When I make a connection between controller and simulator, wireshark and modpoll show that client(simulator) reads registers (from 0 to 7). But when I make a connection between my server(pc) and client(simulator), my sever response with different register numbers as below. Resister number starts from 1000. Why does simulator request different register start number? ex) from 0: controller, from 1000: PC(sever)
First response from server(pc)
Update! my server can respond with the values but with wrong register numbers. I changed starting register number(0 -->1000).
I attached picture.
response from server(pc)
Please advice me on this issue.
I will do my best effort to solve this issue.
'''
from pymodbus.server.sync import StartTcpServer
from pymodbus.datastore import ModbusSequentialDataBlock
from pymodbus.datastore import ModbusSlaveContext, ModbusServerContext
from pymodbus.device import ModbusDeviceIdentification
from pymodbus.datastore import ModbusSequentialDataBlock, ModbusSparseDataBlock
from pymodbus.datastore import ModbusSlaveContext, ModbusServerContext
from pymodbus.transaction import ModbusRtuFramer, ModbusBinaryFramer
#%%
import logging
FORMAT = ('%(asctime)-15s %(threadName)-15s'
' %(levelname)-8s %(module)-15s:%(lineno)-8s %(message)s')
logging.basicConfig(format=FORMAT)
log = logging.getLogger()
log.setLevel(logging.DEBUG)
#%%
#%%
def run_server():
store = ModbusSlaveContext(
ir=ModbusSequentialDataBlock(0, [28692,28692,28692,28692,28692,65508,65508,65508
]),zero_mode=True)
context = ModbusServerContext(slaves=store, single=True)
StartTcpServer(context, address=("192.168.1.231", 502))
identity = ModbusDeviceIdentification()
identity.VendorName = 'Pymodbus'
identity.ProductCode = 'PM'
identity.VendorUrl = 'http://github.com/riptideio/pymodbus/'
identity.ProductName = 'Pymodbus Server'
identity.ModelName = 'Pymodbus Server'
identity.MajorMinorRevision = '1.0'
#%%
if __name__ == "__main__":
run_server()
'''
Dear MarcosG,
I attached screen-shots from wireshark as below.
write request from clinet(simulator)
- as you can see clinet(simulator) send a request for writing and register number start from 256.
read response from server(controller)
- Sever(controller) responds to the request of clinet for reading. And it send a respond and register number start from 256.
polling sever with modpoll software
- we can look the values on the registers of sever, as you can see, values are stored in the register from 0 to 7. These values are from controller lever. If I adjust lever, these values are changing.
requested address_exel_File
- We have one more simulator(bridge2). It shows the same register number with both controller(server) and pc(server).
problem: the actual registers of sever which store values are from 0 to 7. However, Client and server communicate with different registers (from 256) which contain "0" values. But there is no issue for adjusting parameters of ship on the simulator.
Best regards
Byeon Seongsu

Unable to FTP data from GSM module

I am a newbie, I am using Quectel ec25-e GSm module. I am trying to send upload & and download data from FTP server. For this I am have gone through following steps:-
1. AT+QICSGP=1,1,"WWW","","",1 //Configure PDP context 1
2. AT+QIACT=1 //Activate PDP context 1.
3. AT+QFTPCFG="contextid",1 //Configure the PDP context ID as 1
4. AT+QFTPCFG="account","User","pass" //Set user name and password
5. AT+QFTPCFG="filetype",1 //Set file type as binary
6. AT+QFTPCFG="transmode",1 //Set transfer mode as passive mode.
7. AT+QFTPCFG="rsptimeout",150 //Set response timeout value
8. AT+QFTPOPEN="122.160.158.240",21 // Login to FTP server
Login part is working fine, Now I choose my working directory :-
AT+QFTPCWD="/test" //Set current directory.
I can also create, rename and delete folder with following commands:-
AT+QFTPMKDIR="check" //Create a folder as “check” on FTP(S) server.
AT+QFTPRENAME="check","check1" //Rename a folder.
AT+QFTPRMDIR="check1" //Delete a folder
Till now every thing is fine. but now i am trying to list out all file is the folder ( while I know I have some file out there), it just wait for timeout and then give error. My command is :-
AT+QFTPNLST="." //List file names of current directory
And my output is:-
+CME ERROR: 609
+CME ERROR: 609 means Timeout error .And same goes with uploading data.unfortunately Quectel is not providing documents for this module anymore. So, I can't share link. So I am attaching screen shots of application notes.Please tell me what i am missing here
Note* i have upgraded GSM firmware, but no success.
in FTP trans mode should be in active mode, so changing
AT+QFTPCFG="transmode",1
to
AT+QFTPCFG="transmode",0
works.

Unable to connect R with Youtube API

I am trying to connect with the youtube API using yt_oauth function but getting error as follows :
Error in readRDS(token) : error reading from connection.
I have checked my application several times. First I got the API Key and then the Client ID and Client Secret. I am using the Client ID and Client Secret for app_id and app_secret below. I have enabled all the 3 youtube APIs(Data,Analytics,Reporting)So where can I be going wrong? Any help appreciated.
Below is the code I am using
library("tuber")
app_id <- "XYZ"
app_secret<-"abc"
yt_oauth(app_id,app_secret)
Seems that you called yt_oauth previously with some invalid parameter. A file called .httr-oauth may exists at your current path (in my case it was on My Documents folder). One can remove that file or alternatively do this:
yt_oauth(app_id, app_secret, token = '')
It will force tuber to refresh the token state.

Ionic push - send to external ids

In the alpha Version of the IonicPush, it was possibe to send pushNotifications to external_ids. In the beta however, i only managed to send pushNotifications to internal ids.
An external_id is connected to a user in my Database, generated with my backend and looks like this: 55f743ed0664427a638c150c295741f8826994707148da4767
So sending a pushNotification to external_ids in the alpha like this was no problem
user_ids: array("55f743ed0664427a638c150c295741f8826994707148da4767","55f743ed0664427a638c150c295741f8826994707148da4767","55f743ed0664427a638c150c295741f8826994707148da4767");
Now in the beta, the ionicPush Service generates internal_ids for every user, and i can only send pushNotifications to internal_ids. Those internal_ids are not saved in my Database.
user_ids: array("5303434a-5f48-4743-9584-15ccb8bf7528","5303434a-5f48-4743-9584-15ccb8bf7528");
My problem now is that i have to send pushes via the external id but i am not able to do this anymore.
A ionic user, which is necessary to send targeted pushes, has an internal id, external id and a name in my case.
UPDATE: IonicUser
A ionicUser has a Name, ID and External ID. It is possible to send pushes to the ID but not to the external ID.
The ionic User saves the Android/iOs Device token
I don't know what you mean by Internal and External Id's, but when you use the code:
var push = new Ionic.Push({
"debug": true
});
push.register(function(token) {
console.log("Device token:",token.token);
});
It returns a token. This is the token you can save to the database and then use it to send notifications as described here: http://docs.ionic.io/docs/push-sending-push.

Resources