You are here

meshchat v0.6 released

45 posts / 0 new
Last post
K7FPV
meshchat v0.6 released

Detailed information and installation instructions can be found here:

http://www.trevorsbench.com/meshchat-messaging-for-mesh-networks/

v0.6
Mobile and tablet style fixes
Get list of nodes running meshchat from OLSR vs polling every node
Change from wget-nossl to curl
Added config setting $tmp_upload_dir for USB drives on nodes
Loading spinner on Send button and better send message error handling and notification

AB4YY
sync 1-direction only
Trevor,
I have this installed on a Ubiquity device with the current AREDN beta FW.  I also have it installed on a LAN attached Linux-Mint-17.3-Mate desktop PC.  It appears the message syncing only goes from the Ubiquiti node to the PC and never from the PC to the node.
Any idea what is going on?
Thanks, Mike
K7FPV
Sure you need to add a

Sure you need to add a published service in OLSR so the node will find it and know it is running meshchat. Login to the AREDN node your linux box is connected to and click Setup -> Port Forwarding, DHCP, and Services. Make sure you have a DHCP reservation for the linux box, then add a service for it like this:



Then your node will query OLSR, see the linux box and that it is running mesh chat and start polling it for messages.

AB4YY
I think I have that set up
I think I have that set up correctly for both the Ubiquity node and the Linux box.  I can go to a distant node, look at my node the right click to open tabs for each of my 2 Meshchats (one on my Ubiquity device and one on the LAN connected PC) and open a browser tab for each.  And for each I can type in messages but still it only syncs from the Ubiquity-AREDN node to the PC and not vice versa.

The AREDN node has Meshchat on port 8080 and the PC is on port 80 but each come up fine.

One difference is: On the right side of the Meshchat message screen, the AREDN node only shows itself whereas on the Linux box, I see both the Node as well as the Linux box.  (That's the area that shows Call Sign/Node/Last Seen)
 
K7FPV
Still sounds like there is
Still sounds like there is not a published service for meshchat on the linux box. Email me at k7fpv at aredn.org and we can setup a tunnel and I'll take a look.
AB4YY
From your email:
From your email:
Remove the trailing / on the service link for you linux box ie:

Use this:

http://powerspec.local.mesh/meshchat

NOT this:

http://powerspec.local.mesh/meshchat/

That should fix it.


>>>>>I did that and it fixed it!  Thanks Trevor.  - Mike


VE3RTJ
USB Drives on Nodes?
Hi, Trevor;
Having just picked up a couple of air-routers, I was wondering if this means I can take Meshchat's 2M file limit up by plugging a thumb-drive into the router's usb port? I don't know if 3.16b actually supports the AR's USB drive for storage, but this seems an excellent application.
K7FPV
Yeah I agree. There is some
Yeah I agree. There is some stuff in the works in the next version to support this. Stay tuned.
K5DLQ
K5DLQ's picture
We don't currently support
We don't currently support USB drives on the AirRouter, but, stay tuned.  ;-)
KD2EVR
KD2EVR's picture
hsmm-pi?

Do you have any idea if meshchat will work on an hsmm-pi node? 

K7FPV
It might. Give it a try, you
It might. Give it a try, you can always remove it if it doesn't. If you have trouble with it I can point you in the right direction.
KD2EVR
KD2EVR's picture
Ok, thanks for creating this.
Ok, thanks for creating this. 
I'll let you know what I find. 
kc8rgo
Would it be possible to put
Would it be possible to put the version # in the copyright notice?
I searched thru Meshchat several times to see if I could find the release.  I now know that it appears in the browser tab. (I know, I need to roll my eyes up and down once or twice a day.  :)
Vance, kc8rgo
K7FPV
Yeah I'll add this to the
Yeah I'll add this to the next release.
kj6dzb
kj6dzb's picture
I have an unusual required...
I have an unusual required... I realy like what meshchat is doing, its deployed on on our mesh here. Ive run a xastir aprs server on 2m for a lot longer than I've had the mesh up, I would like to talk about mesh chat sending messages to an aprs server for transmission via aprs. digirepet flaged massage over rf. Say we have a hams deployed with aprs enabled HT and we can create a message bridge for aprs. The node would have a list or group select via calsign and need a local igate with server ports open to send to. Dose this sound like something good to add?
K5DLQ
K5DLQ's picture
Ooooh...  I like this concept
Ooooh...  I like this concept.  

Perhaps adding a hashtag to indicate that you want this message sent to APRS. 
Although, I think we would need the "room" concept that Trevor has talked about first.

ie.  If I'm in Texas, and add have a tunnel to CA... If i created a message in meshchat "EOC is now activated #APRS" , i don't think that should propagate across all meshchat db's like it does today.  But, If I were in the "TEXAS" room on meshchat, it would not go to the "CA" room, thus your meshchat node would not send it to your APRS server.

 
K7FPV
Is there an IP way to
Is there an IP way to interface with APRS? I've never used it before. Maybe a link to some doc?
K7DXS
Linksys
Don't have my nodes with me to test, but do you think this would work on a Linksys node?
K5DLQ
K5DLQ's picture
No.  Not enough memory.
No.  Not enough memory.
K7DXS
Alright. Glad I asked, seeing
Alright. Glad I asked, seeing as IPKG would've just bricked my node.
KE2N
KE2N's picture
question re: FreePBX

I have a RPI2 running FreePBX which means the PI has Apache2 already running on it.
Can I install Mesh Chat on that without wiping out my PBX install?
The default opening page for FreePBX is /var/www/html/ where you find index.php and that takes you into the GUI.
But I found you can put other files in that directory and just go to them.
I assume adding a directory /meshchat/ with its index file would work too.
I just want to make sure mesh chat install does not wipe out files and directory structure that is there now ..
any pointers for actually doing the install?
Thanks




 

K7FPV
Yeah it should run fine with
Yeah it should run fine with FreePBX. I use that too, although I have meshchat on another pi. It will not delete anything on install, it will create a /var/www/html/meshchat directory and place files there.

You can find install instructions here: 

http://www.trevorsbench.com/meshchat-messaging-for-mesh-networks/
KE2N
KE2N's picture
OK!

The install was painless and did not destroy the PBX and (in theory) I am ready to chat.  
It is running but
If I type a message and press send, I see the green 'message sent' bar appear, but no entries on the time/messate/callsign/node table

Logging onto other people's meshchat pages I "see myself" so something is not quite working right with my install I think.

Just to be clear - it is running on a raspberry pi that is plugged into the LAN port of a mesh node.  
It is not running on a Raspberry PI based mesh node.


 

K7FPV
Probably a permission problem
Probably a permission problem. The package sets the permissions for www-data which is what raspbian uses, but FreePBX uses asterisk for the apache user. Run this cmd and it should fix it up:

chown -R asterisk:asterisk /var/www/html/meshchat
KE2N
KE2N's picture
looks better but

OK - now what I type in the new message box now shows up below and on the right.
But the Node information is just plain text, not a link.
And I cannot seeing any "chatter" (including some I created myself at other nodes).
 

KE2N
KE2N's picture
no luck

One suggestion I had was to change the host name of my RPI - which I did - to no effect. I still have a situation where the message table has only plain text - no links - and no chat from other nodes is displayed. Nothing is displayed on the status page

Some trouble shooting - if I upload a file it goes onto the PI in the files subdirectory as expected. And it displays a link. But the link has :8080 in the URL  (I have advertised only port 80 for the service).   If I try to download the file by clicking on the link, it fails.  If I manually edit the link, to take out the 8080, then the download from the PI succeeds.

I found this error while inspecting the page
http://ke2n-raspbx.local.mesh/meshchat/peer.min.js   Failed to load resource: the server responded with a status of 404 (Not Found)

Info - Apache version on this machine:  Apache/2.4.10 (Raspbian)



BTW - clicking logout from the file or status page does not send me back to the login page.   (a minor point at this stage)

KE2N
KE2N's picture
more

I did an install on a ubiquiti node for comparison.  I noticed that the web server there is spitting everything out on port 8080  (which I guess is the base case for mesh)

My Apache for the PBX is set up for port 80 and in fact is putting out the opening page of mesh chat on port 80 ( actually no explicit port number appears) 
could that be causing a problem?

KE2N
KE2N's picture
update

I changed the default port on the Pi to 8080 and now the file download works (for files I uploaded - I still cannot see anyone else).


 

K7FPV
Yeah there is still some bugs
Yeah there is still some bugs in the Pi version looks like. I have fixed most in v0.7. Just hang on for a bit and give it another shot when v0.7 comes out and it should work much better on the Pi. Should be soon.
kj6dzb
kj6dzb's picture
I dont think implementing a
I dont think implementing a full aprs server into mesh chat is what im talking about. 


K5DLQ ... at the moment every mesh chat instance will sync with every other instance. Right!?  Are there plans to make groups, or is it just going to be a big chat?

Sending a message to a local server requires a passcode, sending traffic into/receiving packets from the internet req a passcode. Im thinking a basic aprs message server can send packets to a local server or rotate.aprs.net. the local Mesh chat instance will need to handle a return message.  A beacon could be assembled from the lat and long.

here is how the xastir server port works. https://xastir.org/index.php/Server_Port

and a few docs on the proto call.
http://www.aprs.org/aprs12.html
http://www.aprs.org/doc/APRS101.PDF
http://wxqa.com/servers2use.html

 
Image Attachments: 
K5DLQ
K5DLQ's picture
right, I'm not suggesting
right, I'm not suggesting adding a full aprs server into meshchat.  I'm suggesting that meshchat could call out to an existing APRS server (running off-node).
 
K7FPV
I've been thinking about this
I've been thinking about this and the other requests to extend meshchat and this is my best idea at the moment is this:

Add support for "hashtag actions". When a hashtag is present in a message like #APRS, meshchat would look that up in a action config file. Hash tags could transcend the "rooms" or "channels" we are going to add. So you could post to a certain room/channel and add a hashtag whenever you want. This would be only supported on raspberry pi / linux since we don't want to over burden the AREDN nodes. You can create a hashtag message from any node, but only a non-AREDN node can call an action script. You would only configure the action config on probably 1 node in your mesh so that it does not go out on APRS twice, etc.

Action config file:

# Action   Script   Description
APRS     /usr/local/bin/aprs   APRS gateway for SF area
SMS       /usr/local/bin/sms   SMS gateway
ipcam-snapshot    /usr/local/bin/ipcam-snapshot    Record snapshot from IP camera and save it to meshchat file area

When that node gets a message with the hashtag in it, that script would be called and passed in a param that would be a path to a file like this:

/usr/local/bin/aprs /tmp/meshchat/actions/82fab0

That file would be the message from the message db in tab delimited format. Better than trying to escape all the stuff in a message into all command params. Then as we extend the message db we can add to the end of the line and keep compatibility to existing scripts. That script then can do whatever you want, send to APRS, WinLink, send a SMS, etc. Then you could even use www.twilio.com and add a SMS gateway into meshchat etc. You could extend it however you like by writing a script. We could have a library of scripts that people contribute to do all kinds of stuff. We would list all the configured hashtag actions on the status page from all nodes on the mesh. Pi A handles SMS and APRS, Pi B handles Winlink, etc but all those would be listed on the status page on all meshchat nodes so you would know what is available. Probably would have a log on the status page showing messages that had a hashtag and if they were processed, by which node, and the outcome from the script.

Thoughts?
K5DLQ
K5DLQ's picture
I love it.  nice
I love it.  nice architectural design.
kj6dzb
kj6dzb's picture
I forsee a problem running
I forsee a problem running the mesh chat on my aprs server... its running the hSMM Pi its got a webUi running. Could you add a way to disable the Web interface? at config/build ?  I havent addressed KE2N problem and place the www files in a /meshchat dir ? so can Handel a configuring Apache2. 

The APRS script will need to have an aprs call sign and passcode to pass messages to the aprs server via udp. As long as you think you can Handel passing the message DB from non aprs enables mesh chat instances to another. 

I hope to see a group chat tab so I dont even have to add a hash tag to a message. instead a list were I can add aprs callsigns to includ in the chat. Used to identify incoming messages when a phone# or aprs-4 chats back. Wow I didnt even think of SMS gateways! Would mesh chat relay a messages from another aprs station or phone# to the other stations on the list?  

I dont know about the capabilities of other aprs servers, Ive only used xastir ever. I can provide my RPI aprs server for testing I use vnc to monitor the UI. I can client into a tunnel on the next closest node.
K7FPV
You would not need to run it
You would not need to run it on the APRS Pi. The Pi that is running meshchat will need a script that can send the message to your APRS server in some way, that part would be up to you to do. Your script would have the APRS passcode in it and anything else needed to send it to APRS. Meshchat will just get you the call sign, epoch, id, and originating node of the message, your script will need to take care of the rest.

Group chat is in the works.
K5DLQ
K5DLQ's picture
Glad to hear about "talk
Glad to hear about "talk groups".  I was thinking I may change the advertised service name (and corresponding code) to create a Texas "zone", but, I'll wait....   ;-)
 
w6bi
w6bi's picture
Bug report
Here's a MeshChat bug report:   The "+" sign is absorbed - you can't transmit it in a conversation.

Orv
K7FPV
Good find, thx. Fixed in the
Good find, thx. Fixed in the next release.
w6bi
w6bi's picture
+1
+1 for the "+ fix"  :-D
kj6dzb
kj6dzb's picture
I will do some experimenting
I will do some experimenting on scripting udp messages for xastir. What language is MeshChat written in?

I could use some help, I dont think I will be able to work it into Mesh chat. Is the source code on Github?   
K5DLQ
K5DLQ's picture
you should be able to write a
you should be able to write a script in any language that you have loaded on your RaspberryPi (perl, bash, python, etc) and meshchat will be able to call it (in the next release).
kj6dzb
kj6dzb's picture
I looks like mesh chat is
I looks like mesh chat is perl? Im looking at the aprslib in python https://pypi.python.org/pypi/aprslib. 

I understand keeping the script on the on my RPI running xastir. So think of it this way! KJ6dzb-4 is my rpi running xastir, the Mesh node running mesh chat is kk6izs-1500mlk-1-omni.local.mesh,  the script has to have its own call sign kj6dzb-5 and passcode. Say I send a message to "#kj6glr-4 TEST TEST 1234" while logged onto kk6izs as kj6dzb, meshchat communicates with the script, the script sends:
xastir_udp_client localhost 2023 <callsign> <passcode> -to_rf "APRS Packet"
from kj6dzb-5 to kj6dzb-4 for RF transmission to kj6glr-4 with a message like the following "MeshChat from KJ6DZB : TEST TEST 1234"   the message is from kj6dzb,  kk6izs-1500mlk-1-omni sent the message to kj6dzb-5 to generated the aprs packet. So kj6glr-4 wants to send a message back to kj6dzb well the packet came from kj6dzb-5! If kj6glr-4 simply responds to the message it goes back to kj6dzb-5. The script has will pass ALL and any message sent to kj6dzb-5 and communicate with its mesh chat node. The script would need part of the functionality of meshchat and not just scrip it to send messages and receive messages, It will need to log them into its message DB directly.  When Chat groups happen the it would be thought full to add a subscribe api action for an aprs message, subscribe to a group, and start receiving messages from the group. 

With messages coming from synced DB and one could be assigned to a chat group it will not matter that the message was sent my kj6dzb via kk6izs-1500mlk-1-omni , The message would come back from kj6glr-4 and returns to kj6dzb-4 and the message is entered into the data base as coming from kj6glr-4, for his subscribed chat group if applicable.

 
K7FPV
Yeah you got the idea. To
Yeah you got the idea. To inject messages into mesh chat there is a API to use. You can just use curl to send it in, example is on my blog.

With the channels and hashtags you will able to configure the actions to call a script for all messages in meshchat, or all messages on a channel, a hashtag on any channel, or a hashtag from a specific channel. More details to come.
K7DXS
Running on Laptop
I installed the .deb package on my laptop, and for the most part it works fine. The only thing is it doesn't show the "last seen" box for most. It shows anybody on localhost and localnode but that's it. Any ideas?
K7FPV
New beta version available

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer