Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cant Use The Test Code #5

Open
amahmoud1998 opened this issue Nov 24, 2022 · 13 comments
Open

Cant Use The Test Code #5

amahmoud1998 opened this issue Nov 24, 2022 · 13 comments

Comments

@amahmoud1998
Copy link

Hello,

I am new to ESPA 4.4.4. I started 2 virtual Serial Ports (COM29 and COM30). Then i ran your test code and i see nothing happening even when i send string data to COM29 or COM30. Could you please help ?

from digimat.espa import LinkSerial, Server, MultiChannelServer

class MyMultiChannelServer(MultiChannelServer):
def onNotification(self, notification):
print (notification)
if notification.isName('calltopager'):
print ("[%s]->paging(%s, %s)" % (notification.source,
notification.callAddress,
notification.message))

servers=MyMultiChannelServer()

link=LinkSerial('ts940', 'COM29', 9600, 'N', 8, 1)
servers.add(Server(link))

link=LinkSerial('espa2', 'COM30', 9600, 'N', 8, 1)
servers.add(Server(link))

servers.run()

@amahmoud1998 amahmoud1998 changed the title Cant Cant Use The Test Code Nov 24, 2022
@digimat
Copy link
Owner

digimat commented Nov 24, 2022 via email

@amahmoud1998
Copy link
Author

amahmoud1998 commented Nov 24, 2022

Thank you very much for your response as it helped me further.

I am trying to develop an ESPA 4.4.4 Client with Nodered and use your Project as the Server to test my Gateway.

When i send the following message "1<ENQ>" as Buffer to the server i receive the following error

image

@digimat
Copy link
Owner

digimat commented Nov 24, 2022 via email

@amahmoud1998
Copy link
Author

Thank you for the quick answer, unfortunately Another Problem showed up

image

@digimat
Copy link
Owner

digimat commented Nov 24, 2022 via email

@amahmoud1998
Copy link
Author

amahmoud1998 commented Nov 24, 2022

The Previous Problems seem to have been solved. Yet i dont receive any response from the server and i dont understand if i am sending the messages right.

All I am doing currently is i am sending 1<ENQ>. is that normal to get no response even if the server wrote TX[04]?

Could you maybe comment an example espa message that the server would expect ?

image

@digimat
Copy link
Owner

digimat commented Nov 24, 2022 via email

@amahmoud1998
Copy link
Author

Wow thank you for explaining that :)

Now it works.

Thank you again !!

@amahmoud1998
Copy link
Author

amahmoud1998 commented Nov 24, 2022

so i have tried to send this message
<SOH>1<STX>1<US>999<RS>2<US>FIRE SEC 123<ETX>
and the following error appeared:

image

my code:
msg.payload = "1" + String.fromCharCode(0x5) + "2" + String.fromCharCode(0x5) + String.fromCharCode(0x1) + "1" + String.fromCharCode(0x2) + "1" + String.fromCharCode(0x1F) + "999" + String.fromCharCode(0x1E) + "2" + String.fromCharCode(0x1F) + "FIRE SEC 123" + String.fromCharCode(0x03)
//<SOH>1<STX>1<US>999<RS>2<US>FIRE SEC 123<ETX>

@digimat
Copy link
Owner

digimat commented Nov 24, 2022 via email

@amahmoud1998
Copy link
Author

Thank you very much for the patches.

how to use your code to send a message to another espa station ? even with threading it wont work.

image

@amahmoud1998
Copy link
Author

came accross another bug :\

image

@digimat
Copy link
Owner

digimat commented Nov 25, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants