Topics

Morserino chat server

Wojtek SP9WPN
 

Hi everybody,

To expand upgraded "WiFi Trx" feature, I've wrote a simple chat-server which repeats messages from one Morserino to others.

This can be used:

* for testing your m32 WiFi operation

* for "chats" between two m32 users which are behind firewalls

* for "chats" between more two units

I hope the script will find its use in clubs, training groups etc.

The script (in Python) is freely available on github: https://github.com/sp9wpn/m32_chat_server


How to use?

1. Run the script on a server with public IP (or firewall with port forward). You can use my server at 138.68.90.111, but it won't be there forever.

2. Set server's IP in Morserino as "Buddy IP" in WiFi config.

3. Enter "WiFi Trx" mode

4. Send "HI" to register yourself on server. Server will respond with ":hi" to confirm.

5. Now any words you send are rebroadcasted to all other Morserinos registered on the server (you excluded).

6. After 5 minutes of no activity (ie. no transmissions) from you, you will be dropped. Server will say ":bye" so you know. Use "hi" to reconnect.


Caution: script uses empty UDP packets to keep NAT alive, and this prevents your Morserino from auto-shutdown! Watch your battery, WiFi uses a lot!


@Willi you can add this script to official Morserino repository if you feel so.


-- 
73!
Wojtek SP9WPN

Joe K9SZ
 

Very nice, Wojtek!


On Tue, May 12, 2020 at 9:38 AM Wojtek SP9WPN <sp9wpn@...> wrote:

Hi everybody,

To expand upgraded "WiFi Trx" feature, I've wrote a simple chat-server which repeats messages from one Morserino to others.

This can be used:

* for testing your m32 WiFi operation

* for "chats" between two m32 users which are behind firewalls

* for "chats" between more two units

I hope the script will find its use in clubs, training groups etc.

The script (in Python) is freely available on github: https://github.com/sp9wpn/m32_chat_server


How to use?

1. Run the script on a server with public IP (or firewall with port forward). You can use my server at 138.68.90.111, but it won't be there forever.

2. Set server's IP in Morserino as "Buddy IP" in WiFi config.

3. Enter "WiFi Trx" mode

4. Send "HI" to register yourself on server. Server will respond with ":hi" to confirm.

5. Now any words you send are rebroadcasted to all other Morserinos registered on the server (you excluded).

6. After 5 minutes of no activity (ie. no transmissions) from you, you will be dropped. Server will say ":bye" so you know. Use "hi" to reconnect.


Caution: script uses empty UDP packets to keep NAT alive, and this prevents your Morserino from auto-shutdown! Watch your battery, WiFi uses a lot!


@Willi you can add this script to official Morserino repository if you feel so.


-- 
73!
Wojtek SP9WPN

Willi, OE1WKL
 

Hi Wojtek,

Thanks a lot for this - great work!

I will add a link to your GitHub in my repository (copying is maybe not a good idea, should anything change…).

Re. Auto-shutdown: I don’t think the Morserino will be kept alive - it goes into sleep when it does not detect any display changes - anything happening in the background has no impact…


73

Willi
OE1WKL


Am 12.05.2020 um 16:38 schrieb Wojtek SP9WPN <sp9wpn@...>:

Hi everybody,

To expand upgraded "WiFi Trx" feature, I've wrote a simple chat-server which repeats messages from one Morserino to others.

This can be used:

* for testing your m32 WiFi operation

* for "chats" between two m32 users which are behind firewalls

* for "chats" between more two units

I hope the script will find its use in clubs, training groups etc.

The script (in Python) is freely available on github: https://github.com/sp9wpn/m32_chat_server


How to use?

1. Run the script on a server with public IP (or firewall with port forward). You can use my server at 138.68.90.111, but it won't be there forever.

2. Set server's IP in Morserino as "Buddy IP" in WiFi config.

3. Enter "WiFi Trx" mode

4. Send "HI" to register yourself on server. Server will respond with ":hi" to confirm.

5. Now any words you send are rebroadcasted to all other Morserinos registered on the server (you excluded).

6. After 5 minutes of no activity (ie. no transmissions) from you, you will be dropped. Server will say ":bye" so you know. Use "hi" to reconnect.


Caution: script uses empty UDP packets to keep NAT alive, and this prevents your Morserino from auto-shutdown! Watch your battery, WiFi uses a lot!


@Willi you can add this script to official Morserino repository if you feel so.


-- 
73!
Wojtek SP9WPN

Wojtek SP9WPN
 

On Wed, May 13, 2020 at 07:01 AM, Willi, OE1WKL wrote:

Re. Auto-shutdown: I don’t think the Morserino will be kept alive - it goes
into sleep when it does not detect any display changes - anything happening in
the background has no impact…
Unfortunately, I've tested this few times. The "30r20s" stays on top of the screen all the time while keepalives are received.

You could add a simple "if len(message) == 0" somewhere to ignore those packets right at the start. They do their work on the network, once they reach Morserino they're useless anyway.

Cheers,
Wojtek

Gerard
 

Hi Wojtek,  Thank you for making this chat server available. I could see it being used to have some QSO when antenna issues arise. Is there a way to stay connected and wait for someone calling CQ (i.e when powered by USB)? I called several times CQ with no success.
Also, I am not Linux experienced but I would like to setup a Raspberry Pi as a server online for OM's to make WiFi QSO's. Where can I get some help in setting this up?

Best 73' de gerard, DL8SEL

Wojtek SP9WPN
 

Hi Gerard,

One could run his own server with a very long "client timeout", so Morserinos will stay connected for long. Default 5 mins may seem harsh, but I didn't though about making this an "internet band", but rather for scheduled usages.

Raspberry is fine, just install python (if it's not installed by default), download the script, edit your timeout value in it, then run the script. If in doubt, consult your local Linux geek, it will be straightforward for him/her.

73,
Wojtek

Gerard
 

Hi Wojtek,

Thank you for this quick reply and for your advice. I will try this
and let you know.

Best 73' de gerard, DL8SEL

On 17 May 2020 at 3:10, Wojtek SP9WPN wrote:

Hi Gerard,

One could run his own server with a very long "client timeout", so
Morserinos will stay connected for long. Default 5 mins may seem
harsh, but I didn't though about making this an "internet band", but
rather for scheduled usages.

Raspberry is fine, just install python (if it's not installed by
default), download the script, edit your timeout value in it, then
run the script. If in doubt, consult your local Linux geek, it will
be straightforward for him/her.

73,
Wojtek

Gerard
 

Hi Wojtek,

Sorry to bother you again. Maybe you have a simple answer.

I tried to start the script on an old Raspberry and sometimes it
started, sometimes not. It looked like being very slow and I could
not get a second Morserino to connect.

I installed Raspbian stretch on a new Raspberry 3 and the script does
not start at all. When arting in IDLE 2.7 I get the following error:

---------------------------------------------------------------------
=== RESTART:
/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py ===

Traceback (most recent call last):
File
"/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py", line
16, in <module>
serversock.bind((SERVER_IP, UDP_PORT))
File "/usr/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
gaierror: [Errno -2] Name or service not known
---------------------------------------------------------------------

When I start IDLE 3.0 I get the following error:
---------------------------------------------------------------------
=== RESTART:
/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py ===
Traceback (most recent call last):
File
"/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py", line
16, in <module>
serversock.bind((SERVER_IP, UDP_PORT))
socket.gaierror: [Errno -2] Name or service not known
---------------------------------------------------------------------


Any idea where to look for?

Thank you for your time and effort and best
73' de gerard, DL8SEL



On 17 May 2020 at 3:10, Wojtek SP9WPN wrote:

Hi Gerard,

One could run his own server with a very long "client timeout", so
Morserinos will stay connected for long. Default 5 mins may seem
harsh, but I didn't though about making this an "internet band", but
rather for scheduled usages.

Raspberry is fine, just install python (if it's not installed by
default), download the script, edit your timeout value in it, then
run the script. If in doubt, consult your local Linux geek, it will
be straightforward for him/her.

73,
Wojtek

Eike Lantzsch
 

On Monday, 18 May 2020 13:55:11 -04 Gerard wrote:
Hi Wojtek,

Sorry to bother you again. Maybe you have a simple answer.

I tried to start the script on an old Raspberry and sometimes it
started, sometimes not. It looked like being very slow and I could
not get a second Morserino to connect.

I installed Raspbian stretch on a new Raspberry 3 and the script does
not start at all. When arting in IDLE 2.7 I get the following error:

---------------------------------------------------------------------
=== RESTART:
/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py ===

Traceback (most recent call last):
File
"/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py", line
16, in <module>
serversock.bind((SERVER_IP, UDP_PORT))
File "/usr/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
gaierror: [Errno -2] Name or service not known

---------------------------------------------------------------------

When I start IDLE 3.0 I get the following error:
---------------------------------------------------------------------
=== RESTART:
/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py ===
Traceback (most recent call last):
File
"/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py", line
16, in <module>
serversock.bind((SERVER_IP, UDP_PORT))
socket.gaierror: [Errno -2] Name or service not known

---------------------------------------------------------------------


Any idea where to look for?
maybe python3-socketio is missing?

73, Eike
--
Eike Lantzsch ZP6CGE

Paradox: Getting live-updates about fatalities

Joe K9SZ
 

You might also try changing line 8

SERVER_IP = "0.0.0.0" 
to
SERVER_IP = '' or
SERVER_IP = None
https://www.raspberrypi.org/forums/viewtopic.php?t=233469 

73
Joe     

On Mon, May 18, 2020 at 1:12 PM Eike Lantzsch <zp6cge@...> wrote:
On Monday, 18 May 2020 13:55:11 -04 Gerard wrote:
> Hi Wojtek,
>
> Sorry to bother you again. Maybe you have a simple answer.
>
> I tried to start the script on an old Raspberry and sometimes it
> started, sometimes not. It looked like being very slow and I could
> not get a second Morserino to connect.
>
> I installed Raspbian stretch on a new Raspberry 3 and the script does
> not start at all. When arting in IDLE 2.7 I get the following error:
>
> ---------------------------------------------------------------------
> === RESTART:
> /home/pi/Morserino/m32_chat_server-master/m32_chat_server.py ===
>
> Traceback (most recent call last):
>   File
> "/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py", line
> 16, in <module>
>     serversock.bind((SERVER_IP, UDP_PORT))
>   File "/usr/lib/python2.7/socket.py", line 228, in meth
>     return getattr(self._sock,name)(*args)
> gaierror: [Errno -2] Name or service not known
>
> ---------------------------------------------------------------------
>
> When I start IDLE 3.0 I get the following error:
> ---------------------------------------------------------------------
> === RESTART:
> /home/pi/Morserino/m32_chat_server-master/m32_chat_server.py ===
> Traceback (most recent call last):
>   File
> "/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py", line
> 16, in <module>
>     serversock.bind((SERVER_IP, UDP_PORT))
> socket.gaierror: [Errno -2] Name or service not known
>
> ---------------------------------------------------------------------
>
>
> Any idea where to look for?

maybe python3-socketio is missing?

73, Eike
--
Eike Lantzsch ZP6CGE

Paradox: Getting live-updates about fatalities






Willi, OE1WKL
 

I would put in the REAL IP address!

Willi

Von meinem Mobiltelefon gesendet

Am 18.05.2020 um 20:26 schrieb Joe K9SZ <joseph.e.wittmer@...>:


You might also try changing line 8

SERVER_IP = "0.0.0.0" 
to
SERVER_IP = '' or
SERVER_IP = None
https://www.raspberrypi.org/forums/viewtopic.php?t=233469 

73
Joe     

On Mon, May 18, 2020 at 1:12 PM Eike Lantzsch <zp6cge@...> wrote:
On Monday, 18 May 2020 13:55:11 -04 Gerard wrote:
> Hi Wojtek,
>
> Sorry to bother you again. Maybe you have a simple answer.
>
> I tried to start the script on an old Raspberry and sometimes it
> started, sometimes not. It looked like being very slow and I could
> not get a second Morserino to connect.
>
> I installed Raspbian stretch on a new Raspberry 3 and the script does
> not start at all. When arting in IDLE 2.7 I get the following error:
>
> ---------------------------------------------------------------------
> === RESTART:
> /home/pi/Morserino/m32_chat_server-master/m32_chat_server.py ===
>
> Traceback (most recent call last):
>   File
> "/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py", line
> 16, in <module>
>     serversock.bind((SERVER_IP, UDP_PORT))
>   File "/usr/lib/python2.7/socket.py", line 228, in meth
>     return getattr(self._sock,name)(*args)
> gaierror: [Errno -2] Name or service not known
>
> ---------------------------------------------------------------------
>
> When I start IDLE 3.0 I get the following error:
> ---------------------------------------------------------------------
> === RESTART:
> /home/pi/Morserino/m32_chat_server-master/m32_chat_server.py ===
> Traceback (most recent call last):
>   File
> "/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py", line
> 16, in <module>
>     serversock.bind((SERVER_IP, UDP_PORT))
> socket.gaierror: [Errno -2] Name or service not known
>
> ---------------------------------------------------------------------
>
>
> Any idea where to look for?

maybe python3-socketio is missing?

73, Eike
--
Eike Lantzsch ZP6CGE

Paradox: Getting live-updates about fatalities






Gerard
 

Hi Wojtek, Hi Willi,

I tried SERVER_IP = "0.0.0.0" --> no error but does not work
I tried SERVER_IP = "127.0.0.1" --> no error but does not work
I tried SERVER_IP = "192.168.0.31" (this is the actual address of the
chat server) --> no error but does not work
I tried SERVER_IP = '' --> no error but does not work
I tried SERVER_IP = None" --> hier I get an error

I tried with Thonny 3.1.0 and I can see that I get a connect to the
chat server but then I get an error I am not able to understand:

%Run m32_chat_server.py
Traceback (most recent call last):
File "/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py",
line 58, in <module>
debug ("\nReceived %s from %s" % (":".join("{:02x}".format(ord(c))
for c in data),client))
File "/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py",
line 58, in <genexpr>
debug ("\nReceived %s from %s" %
(":".join("{:02x}".format(ord(c)) for c in data),client))
TypeError: ord() expected string of length 1, but int found
Any hint where I can look?

best 73' de gerard, DL8SEL


On 18 May 2020 at 20:31, Willi, OE1WKL wrote:

I would put in the REAL IP address!

Willi

Von meinem Mobiltelefon gesendet

Am 18.05.2020 um 20:26 schrieb Joe K9SZ <@joe.wittmer.k9sz>:


You might also try changing line 8

SERVER_IP = "0.0.0.0" 
to
SERVER_IP = '' or
SERVER_IP = None
https://www.raspberrypi.org/forums/viewtopic.php?t=233469 

73
Joe     

On Mon, May 18, 2020 at 1:12 PM Eike Lantzsch <zp6cge@...> wrote:
On Monday, 18 May 2020 13:55:11 -04 Gerard wrote:
> Hi Wojtek,
>
> Sorry to bother you again. Maybe you have a simple answer.
>
> I tried to start the script on an old Raspberry and sometimes it
> started, sometimes not. It looked like being very slow and I could
> not get a second Morserino to connect.
>
> I installed Raspbian stretch on a new Raspberry 3 and the script
does
> not start at all. When arting in IDLE 2.7 I get the following error:
>
>
---------------------------------------------------------------------
> === RESTART:
> /home/pi/Morserino/m32_chat_server-master/m32_chat_server.py ===
>
> Traceback (most recent call last):
>   File
> "/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py", line
> 16, in <module>
>     serversock.bind((SERVER_IP, UDP_PORT))
>   File "/usr/lib/python2.7/socket.py", line 228, in meth
>     return getattr(self._sock,name)(*args)
> gaierror: [Errno -2] Name or service not known
>
>
---------------------------------------------------------------------
>
> When I start IDLE 3.0 I get the following error:
>
---------------------------------------------------------------------
> === RESTART:
> /home/pi/Morserino/m32_chat_server-master/m32_chat_server.py ===
> Traceback (most recent call last):
>   File
> "/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py", line
> 16, in <module>
>     serversock.bind((SERVER_IP, UDP_PORT))
> socket.gaierror: [Errno -2] Name or service not known
>
>
---------------------------------------------------------------------
>
>
> Any idea where to look for?

maybe python3-socketio is missing?

73, Eike
--
Eike Lantzsch ZP6CGE

Paradox: Getting live-updates about fatalities









Groups.io Links:
You receive all messages sent to this group.
View/Reply Online (#1239) | Reply To Group | Reply To Sender | Mute
This Topic | New Topic

Your Subscription | Contact Group Owner | Unsubscribe
[gerardf@...]

Doug KD9PK
 

If you have a firewall on the server you may need to add Permissions for port 7373 and udp service.

Sent using 100% recycled electrons in under 9,192.631,770 vibrations of a cesium atom.

On May 18, 2020, at 5:26 PM, Gerard <gerardf@...> wrote:

Hi Wojtek, Hi Willi,

I tried SERVER_IP = "0.0.0.0" --> no error but does not work
I tried SERVER_IP = "127.0.0.1" --> no error but does not work
I tried SERVER_IP = "192.168.0.31" (this is the actual address of the
chat server) --> no error but does not work
I tried SERVER_IP = '' --> no error but does not work
I tried SERVER_IP = None" --> hier I get an error

I tried with Thonny 3.1.0 and I can see that I get a connect to the
chat server but then I get an error I am not able to understand:

%Run m32_chat_server.py
Traceback (most recent call last):
File "/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py",
line 58, in <module>
debug ("\nReceived %s from %s" % (":".join("{:02x}".format(ord(c))
for c in data),client))
File "/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py",
line 58, in <genexpr>
debug ("\nReceived %s from %s" %
(":".join("{:02x}".format(ord(c)) for c in data),client))
TypeError: ord() expected string of length 1, but int found
Any hint where I can look?

best 73' de gerard, DL8SEL


On 18 May 2020 at 20:31, Willi, OE1WKL wrote:

I would put in the REAL IP address!

Willi

Von meinem Mobiltelefon gesendet

Am 18.05.2020 um 20:26 schrieb Joe K9SZ <@joe.wittmer.k9sz>:


You might also try changing line 8

SERVER_IP = "0.0.0.0"
to
SERVER_IP = '' or
SERVER_IP = None
https://www.raspberrypi.org/forums/viewtopic.php?t=233469

73
Joe

On Mon, May 18, 2020 at 1:12 PM Eike Lantzsch <zp6cge@...> wrote:
On Monday, 18 May 2020 13:55:11 -04 Gerard wrote:
Hi Wojtek,

Sorry to bother you again. Maybe you have a simple answer.

I tried to start the script on an old Raspberry and sometimes it
started, sometimes not. It looked like being very slow and I could
not get a second Morserino to connect.

I installed Raspbian stretch on a new Raspberry 3 and the script
does
not start at all. When arting in IDLE 2.7 I get the following error:

---------------------------------------------------------------------
=== RESTART:
/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py ===

Traceback (most recent call last):
File
"/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py", line
16, in <module>
serversock.bind((SERVER_IP, UDP_PORT))
File "/usr/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
gaierror: [Errno -2] Name or service not known

---------------------------------------------------------------------

When I start IDLE 3.0 I get the following error:
---------------------------------------------------------------------
=== RESTART:
/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py ===
Traceback (most recent call last):
File
"/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py", line
16, in <module>
serversock.bind((SERVER_IP, UDP_PORT))
socket.gaierror: [Errno -2] Name or service not known

---------------------------------------------------------------------


Any idea where to look for?
maybe python3-socketio is missing?

73, Eike
--
Eike Lantzsch ZP6CGE

Paradox: Getting live-updates about fatalities









Groups.io Links:
You receive all messages sent to this group.
View/Reply Online (#1239) | Reply To Group | Reply To Sender | Mute
This Topic | New Topic

Your Subscription | Contact Group Owner | Unsubscribe
[gerardf@...]





Willi, OE1WKL
 

Seems to be a Python issue. Which version of Python do you run?
The script expects v. 2.7 - Version 3 will require changes (don’t ask me for details, I am not a Python expert).

Von meinem Mobiltelefon gesendet

Am 19.05.2020 um 00:26 schrieb Gerard <gerardf@...>:

Hi Wojtek, Hi Willi,

I tried SERVER_IP = "0.0.0.0" --> no error but does not work
I tried SERVER_IP = "127.0.0.1" --> no error but does not work
I tried SERVER_IP = "192.168.0.31" (this is the actual address of the
chat server) --> no error but does not work
I tried SERVER_IP = '' --> no error but does not work
I tried SERVER_IP = None" --> hier I get an error

I tried with Thonny 3.1.0 and I can see that I get a connect to the
chat server but then I get an error I am not able to understand:

%Run m32_chat_server.py
Traceback (most recent call last):
File "/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py",
line 58, in <module>
debug ("\nReceived %s from %s" % (":".join("{:02x}".format(ord(c))
for c in data),client))
File "/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py",
line 58, in <genexpr>
debug ("\nReceived %s from %s" %
(":".join("{:02x}".format(ord(c)) for c in data),client))
TypeError: ord() expected string of length 1, but int found
Any hint where I can look?

best 73' de gerard, DL8SEL


On 18 May 2020 at 20:31, Willi, OE1WKL wrote:

I would put in the REAL IP address!

Willi

Von meinem Mobiltelefon gesendet

Am 18.05.2020 um 20:26 schrieb Joe K9SZ <@joe.wittmer.k9sz>:


You might also try changing line 8

SERVER_IP = "0.0.0.0"
to
SERVER_IP = '' or
SERVER_IP = None
https://www.raspberrypi.org/forums/viewtopic.php?t=233469

73
Joe

On Mon, May 18, 2020 at 1:12 PM Eike Lantzsch <zp6cge@...> wrote:
On Monday, 18 May 2020 13:55:11 -04 Gerard wrote:
Hi Wojtek,

Sorry to bother you again. Maybe you have a simple answer.

I tried to start the script on an old Raspberry and sometimes it
started, sometimes not. It looked like being very slow and I could
not get a second Morserino to connect.

I installed Raspbian stretch on a new Raspberry 3 and the script
does
not start at all. When arting in IDLE 2.7 I get the following error:

---------------------------------------------------------------------
=== RESTART:
/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py ===

Traceback (most recent call last):
File
"/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py", line
16, in <module>
serversock.bind((SERVER_IP, UDP_PORT))
File "/usr/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
gaierror: [Errno -2] Name or service not known

---------------------------------------------------------------------

When I start IDLE 3.0 I get the following error:
---------------------------------------------------------------------
=== RESTART:
/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py ===
Traceback (most recent call last):
File
"/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py", line
16, in <module>
serversock.bind((SERVER_IP, UDP_PORT))
socket.gaierror: [Errno -2] Name or service not known

---------------------------------------------------------------------


Any idea where to look for?
maybe python3-socketio is missing?

73, Eike
--
Eike Lantzsch ZP6CGE

Paradox: Getting live-updates about fatalities









Groups.io Links:
You receive all messages sent to this group.
View/Reply Online (#1239) | Reply To Group | Reply To Sender | Mute
This Topic | New Topic

Your Subscription | Contact Group Owner | Unsubscribe
[gerardf@...]




Gerard
 

I am running both versions but only the version 3 show the error.
Version 2.7 doesn't show an error but doesn't work either.
Well, unless I get some help I will have to give up here :-(
Would have been a nice feature to have a CW server for those of us
with antenna issues.
Thanks anyway
Best 73' de gerard

On 19 May 2020 at 6:40, Willi, OE1WKL wrote:

Seems to be a Python issue. Which version of Python do you run?
The script expects v. 2.7 - Version 3 will require changes (don´t ask
me for details, I am not a Python expert).

Von meinem Mobiltelefon gesendet

Am 19.05.2020 um 00:26 schrieb Gerard <gerardf@...>:

Hi Wojtek, Hi Willi,

I tried SERVER_IP = "0.0.0.0" --> no error but does not work
I tried SERVER_IP = "127.0.0.1" --> no error but does not work
I tried SERVER_IP = "192.168.0.31" (this is the actual address of the
chat server) --> no error but does not work
I tried SERVER_IP = '' --> no error but does not work
I tried SERVER_IP = None" --> hier I get an error

I tried with Thonny 3.1.0 and I can see that I get a connect to the
chat server but then I get an error I am not able to understand:

%Run m32_chat_server.py
Traceback (most recent call last):
File "/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py",
line 58, in <module>
debug ("\nReceived %s from %s" % (":".join("{:02x}".format(ord(c))
for c in data),client))
File "/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py",
line 58, in <genexpr>
debug ("\nReceived %s from %s" %
(":".join("{:02x}".format(ord(c)) for c in data),client))
TypeError: ord() expected string of length 1, but int found
Any hint where I can look?

best 73' de gerard, DL8SEL


On 18 May 2020 at 20:31, Willi, OE1WKL wrote:

I would put in the REAL IP address!

Willi

Von meinem Mobiltelefon gesendet

Am 18.05.2020 um 20:26 schrieb Joe K9SZ <@joe.wittmer.k9sz>:


You might also try changing line 8

SERVER_IP = "0.0.0.0"
to
SERVER_IP = '' or
SERVER_IP = None
https://www.raspberrypi.org/forums/viewtopic.php?t=233469

73
Joe

On Mon, May 18, 2020 at 1:12 PM Eike Lantzsch <zp6cge@...> wrote:
On Monday, 18 May 2020 13:55:11 -04 Gerard wrote:
Hi Wojtek,

Sorry to bother you again. Maybe you have a simple answer.

I tried to start the script on an old Raspberry and sometimes it
started, sometimes not. It looked like being very slow and I could
not get a second Morserino to connect.

I installed Raspbian stretch on a new Raspberry 3 and the script
does
not start at all. When arting in IDLE 2.7 I get the following
error:

---------------------------------------------------------------------
=== RESTART:
/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py ===

Traceback (most recent call last):
File
"/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py",
line
16, in <module>
serversock.bind((SERVER_IP, UDP_PORT))
File "/usr/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
gaierror: [Errno -2] Name or service not known

---------------------------------------------------------------------

When I start IDLE 3.0 I get the following error:
---------------------------------------------------------------------
=== RESTART:
/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py ===
Traceback (most recent call last):
File
"/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py",
line
16, in <module>
serversock.bind((SERVER_IP, UDP_PORT))
socket.gaierror: [Errno -2] Name or service not known

---------------------------------------------------------------------


Any idea where to look for?
maybe python3-socketio is missing?

73, Eike
--
Eike Lantzsch ZP6CGE

Paradox: Getting live-updates about fatalities









Groups.io Links:
You receive all messages sent to this group.
View/Reply Online (#1239) | Reply To Group | Reply To Sender | Mute
This Topic | New Topic

Your Subscription | Contact Group Owner | Unsubscribe
[gerardf@...]




Gerard
 

Doug,

I am inside my own LAN with two Morserinos and the RPI server... So
this shouldn't be an issue.

73' de gerard, DL8SEL

On 18 May 2020 at 18:03, Doug KD9PK wrote:

If you have a firewall on the server you may need to add Permissions
for port 7373 and udp service.

Sent using 100% recycled electrons in under 9,192.631,770 vibrations
of a cesium atom.

On May 18, 2020, at 5:26 PM, Gerard <gerardf@...> wrote:

Hi Wojtek, Hi Willi,

I tried SERVER_IP = "0.0.0.0" --> no error but does not work
I tried SERVER_IP = "127.0.0.1" --> no error but does not work
I tried SERVER_IP = "192.168.0.31" (this is the actual address of the
chat server) --> no error but does not work
I tried SERVER_IP = '' --> no error but does not work
I tried SERVER_IP = None" --> hier I get an error

I tried with Thonny 3.1.0 and I can see that I get a connect to the
chat server but then I get an error I am not able to understand:

%Run m32_chat_server.py
Traceback (most recent call last):
File "/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py",
line 58, in <module>
debug ("\nReceived %s from %s" % (":".join("{:02x}".format(ord(c))
for c in data),client))
File "/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py",
line 58, in <genexpr>
debug ("\nReceived %s from %s" %
(":".join("{:02x}".format(ord(c)) for c in data),client))
TypeError: ord() expected string of length 1, but int found
Any hint where I can look?

best 73' de gerard, DL8SEL


On 18 May 2020 at 20:31, Willi, OE1WKL wrote:

I would put in the REAL IP address!

Willi

Von meinem Mobiltelefon gesendet

Am 18.05.2020 um 20:26 schrieb Joe K9SZ <@joe.wittmer.k9sz>:


You might also try changing line 8

SERVER_IP = "0.0.0.0"
to
SERVER_IP = '' or
SERVER_IP = None
https://www.raspberrypi.org/forums/viewtopic.php?t=233469

73
Joe

On Mon, May 18, 2020 at 1:12 PM Eike Lantzsch <zp6cge@...> wrote:
On Monday, 18 May 2020 13:55:11 -04 Gerard wrote:
Hi Wojtek,

Sorry to bother you again. Maybe you have a simple answer.

I tried to start the script on an old Raspberry and sometimes it
started, sometimes not. It looked like being very slow and I could
not get a second Morserino to connect.

I installed Raspbian stretch on a new Raspberry 3 and the script
does
not start at all. When arting in IDLE 2.7 I get the following
error:

---------------------------------------------------------------------
=== RESTART:
/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py ===

Traceback (most recent call last):
File
"/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py",
line
16, in <module>
serversock.bind((SERVER_IP, UDP_PORT))
File "/usr/lib/python2.7/socket.py", line 228, in meth
return getattr(self._sock,name)(*args)
gaierror: [Errno -2] Name or service not known

---------------------------------------------------------------------

When I start IDLE 3.0 I get the following error:
---------------------------------------------------------------------
=== RESTART:
/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py ===
Traceback (most recent call last):
File
"/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py",
line
16, in <module>
serversock.bind((SERVER_IP, UDP_PORT))
socket.gaierror: [Errno -2] Name or service not known

---------------------------------------------------------------------


Any idea where to look for?
maybe python3-socketio is missing?

73, Eike
--
Eike Lantzsch ZP6CGE

Paradox: Getting live-updates about fatalities









Groups.io Links:
You receive all messages sent to this group.
View/Reply Online (#1239) | Reply To Group | Reply To Sender | Mute
This Topic | New Topic

Your Subscription | Contact Group Owner | Unsubscribe
[gerardf@...]





Willi, OE1WKL
 

With V 2.7: set debug to 1 and observe what’s going on while you try to connect. I tested the script with  Python 2.7 without problems on my Mac (OS X Catalina) and on Ubuntu.

I am currently setting up a public chat server, located in a data center with good Internet  connectivity, using Ubuntu.

Currently in testing mode.
Timeout = 15 minutes
Max 20 clients

Feel free to test it!

73

Willi


Am 19.05.2020 um 09:48 schrieb Gerard <gerardf@...>:

I am running both versions but only the version 3 show the error.
Version 2.7 doesn't show an error but doesn't work either.
Well, unless I get some help I will have to give up here :-(
Would have been a nice feature to have a CW server for those of us
with antenna issues.
Thanks anyway
Best 73' de gerard



On 19 May 2020 at 6:40, Willi, OE1WKL wrote:

Seems to be a Python issue. Which version of Python do you run?
The script expects v. 2.7 - Version 3 will require changes (don´t ask
me for details, I am not a Python expert).

Von meinem Mobiltelefon gesendet

Am 19.05.2020 um 00:26 schrieb Gerard <gerardf@...>:

Hi Wojtek, Hi Willi,

I tried SERVER_IP = "0.0.0.0"  --> no error but does not work
I tried SERVER_IP = "127.0.0.1"  --> no error but does not work
I tried SERVER_IP = "192.168.0.31" (this is the actual address of the
chat server)  --> no error but does not work
I tried SERVER_IP = ''  --> no error but does not work
I tried SERVER_IP = None"  --> hier I get an error

I tried with Thonny  3.1.0 and I can see that I get a connect to the
chat server but then I get an error I am not able to understand:

%Run m32_chat_server.py
Traceback (most recent call last):
File "/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py",
line 58, in <module>
debug ("\nReceived %s from %s" % (":".join("{:02x}".format(ord(c))
for c in data),client))
File "/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py",
line 58, in <genexpr>
  debug ("\nReceived %s from %s" %
(":".join("{:02x}".format(ord(c)) for c in data),client))
TypeError: ord() expected string of length 1, but int found


Any hint where I can look?

best 73' de gerard, DL8SEL


On 18 May 2020 at 20:31, Willi, OE1WKL wrote:

I would put in the REAL IP address!

Willi

Von meinem Mobiltelefon gesendet

  Am 18.05.2020 um 20:26 schrieb Joe K9SZ <joseph.e.wittmer@...>:


  You might also try changing line 8

  SERVER_IP = "0.0.0.0"
  to
  SERVER_IP = '' or
  SERVER_IP = None
  https://www.raspberrypi.org/forums/viewtopic.php?t=233469

  73
  Joe

  On Mon, May 18, 2020 at 1:12 PM Eike Lantzsch <zp6cge@...> wrote:
  On Monday, 18 May 2020 13:55:11 -04 Gerard wrote:
Hi Wojtek,

Sorry to bother you again. Maybe you have a simple answer.

I tried to start the script on an old Raspberry and sometimes it
started, sometimes not. It looked like being very slow and I could
not get a second Morserino to connect.

I installed Raspbian stretch on a new Raspberry 3 and the script
  does
not start at all. When arting in IDLE 2.7 I get the following
error:


  ---------------------------------------------------------------------
=== RESTART:
/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py ===

Traceback (most recent call last):
  File
"/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py",
line
16, in <module>
    serversock.bind((SERVER_IP, UDP_PORT))
  File "/usr/lib/python2.7/socket.py", line 228, in meth
    return getattr(self._sock,name)(*args)
gaierror: [Errno -2] Name or service not known


  ---------------------------------------------------------------------

When I start IDLE 3.0 I get the following error:

  ---------------------------------------------------------------------
=== RESTART:
/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py ===
Traceback (most recent call last):
  File
"/home/pi/Morserino/m32_chat_server-master/m32_chat_server.py",
line
16, in <module>
    serversock.bind((SERVER_IP, UDP_PORT))
socket.gaierror: [Errno -2] Name or service not known


  ---------------------------------------------------------------------


Any idea where to look for?

  maybe python3-socketio is missing?

  73, Eike
  --
  Eike Lantzsch ZP6CGE

  Paradox: Getting live-updates about fatalities









Groups.io Links:
You receive all messages sent to this group.
View/Reply Online (#1239) | Reply To Group | Reply To Sender | Mute
This Topic | New Topic

Your Subscription | Contact Group Owner | Unsubscribe
[gerardf@...]












Wojtek SP9WPN
 

Hi,

Server script normally does not print anything on the screen. Set "DEBUG = 1" to see live information about received and sent data.

"0.0.0.0" and empty string ("") are equivalent. Your error is quite weird. Have you tried to run the script outside of IDLE, in raw command line?

Wojtek SP9WPN

Gerard
 

Hi Wojtek, hi Willi,

starting the script in raw mode did it :-))) The debug feature is
nice to see what happen. After a day or two, if it is stable I will
put it online for a while.

Thanks again for all the help. Yes, I am new to linux!

Best 73' de gerard

On 19 May 2020 at 1:25, Wojtek SP9WPN wrote:

Hi,

Server script normally does not print anything on the screen. Set
"DEBUG = 1" to see live information about received and sent data.

"0.0.0.0" and empty string ("") are equivalent. Your error is quite
weird. Have you tried to run the script outside of IDLE, in raw
command line?

Wojtek SP9WPN

Wojtek SP9WPN
 

Hi Gerard,

Great to know you have succeeded!

73,
Wojtek