-
Notifications
You must be signed in to change notification settings - Fork 83
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
Rx from python #113
Comments
Hi Mahmoud, I see two possible problems. First, try making the IPC Mode be TX instead of RX. Then, make the number of TX prefixes be 1 instead of zero, and add the line It may help if I explain that "Tx" is slang for "transmit" and "Rx" is slang for "receive". If both ends of the socket are in Rx mode, then everyone is listening but no one is talking :-) Also, a non-zero number of TX prefixes are needed for Tx to actually transmit something. If "SC" works for you, then we can talk about how to refine what is being sent. Your python looks plausible, but I'm not expert enough either in python or sockets to say with confidence. Regards, |
Okay will try this fix, but not both ends of the socket are TX. one is TX, and the other are RX, but the thing is that Tx and Rx ends are on the same PC device, would that be an issue? |
No, both ends of the socket can be on the same device with no problem. You have run the TxRx example problem, right? |
Yes I tried TxRx example, and it works Here is the new configuration for Inp_IPC of Tx, but still the same issue with Python being the Rx side.
And here is the python code
And this is the error I get
The error mentions that address 127.0.0.1 is already in use by Tx, but I think this is the case with TxRx example that both server and client are bound to same address and port, correct? |
Hi Mahmoud,
Okay, good. I was confused by your question about both ends of the socket being on the same machine. The TxRx problem demonstrates that. I can't help you troubleshoot your python code. What I can suggest is that you start with TxRx, then replace the Rx end with your code. Configure your end as much like Rx as you can. See 42ipc.c, Kit/Source/iokit.c, and Source/IPC/*.c for details. Once you get that interface working, the rest is easy ;-) Happy coding, |
Okay sure. Meanwhile, could you please confirm the following configuration for the TxRx example? Tx:
Rx:
Correct? |
It is working now I had to replace this line: client_socket.bind((client_host, client_port))
|
I am trying to receive data from Tx using a python script as the Rx (both on the same device)
Here is the code for Rx, I wrote a code that greps over available ports
It can grep over all ports except for 10001, and 44387
I am not sure how to receive from Tx, am I doing something wrong?
This is the configuration for Tx
The text was updated successfully, but these errors were encountered: