You are here

meshchat v1.0 released

57 posts / 0 new
Last post
K7FPV
meshchat v1.0 released

v1.0 - The first production version of meshchat is finished. Details can be found here:

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

Thanks to everyone who helped test and played with it!

AB4YY
MeshChat on RPI (Raspberry Pi) - file DL: host not found

My RPI has a hostname (ab4yy-rpi2) that I did not want to change and I did not want to advertise across the mesh.  So when I reserved a dhcp ip address for it in the node, I gave it a descriptive name for the mesh (ab4yy-Webpage).  I have a web page running on the RPI and folks get to that fine as well as MeshChat for chatting.  

The problem is when I upload a file to the RPI MeshChat, the link for the file shows up as:
       http://ab4yy-rpi2/cgi-bin/meshchat?action=file_download&file=....
   instead of:
       http://ab4yy-Webpage/cgi-bin/meshchat?action=file_download&file=....
The real hostname of the RPI is not known and therefore the file cannot be accessed by anyone on MeshChat.

I don't know if this is a MeshChat issue or not.  Also if I need to make a change, I'd prefer to fix this someway without having to change the actual RPI hostname.  Also if this is the wrong place for this post, please let me know.  
Any ideas?  Thanks, Mike ab4yy

K7DXS
It's a Meshchat issue.

It's a Meshchat issue. Meshchat is grabbing the real, locally defined hostname. To do what you want it needs to get its hostname from the node. There are theoretically three ways to do this. In order of desirability:

1. AREDN releases an update that exposes an API allowing you to query your hostname, or better, query any mesh hostname by IP. Then it's a simple HTTP request for MC to grab it. 2. MC uses Avahi to find it. Avahi is a common implementation of mDNS, which is what the mesh uses for these hostnames. 3. You can find where it is defined in the code and hardcode your correct hostname in. You will have to do this after every update.

K5DLQ
K5DLQ's picture
#1 is already in place:http:/

#1 is already in place:
http://localnode.local.mesh:8080/cgi-bin/sysinfo.json  
see the node element...
 

K7DXS
I don't have an AREDN node

I don't have an AREDN node available at the moment, but does that give the node's hostname or the client's? Or is it a list of hostnames on the node's dhcp server?

K5DLQ
K5DLQ's picture
it's the nodename

it's the nodename (which, on a node, should always be the same as the hostname)

AB4YY
Option #2 looks like the only

Option #2 looks like the only one in my control.  If anyone can give me a clue as to what to look for and where, I can edit to add the correct hostname, otherwise I may just wait until the issue is fixed.

Also I thought it is interesting regarding the sysinfo.json  query:

    I know this is probably 'old hat' (obvious; not interesting?) for folks who totally understand all of this.  :)

- Mike ab4yy


 

K5DLQ
K5DLQ's picture
looks like possibly a cut

looks like possibly a cut-paste error that has added extra chars to the link...
"/cgi-bin/sysinfo.json%C2%A0%C2%A0 was not found on this server."

try typing in manually.    http://localhost:8080/cgi-bin/sysinfo.json

EDIT: I think I have corrected the link.
 

AB4YY
The sysinfo.json query is

The sysinfo.json query is working now.  I don't know what my problem was with it...no matter...
Thanks!

K7DXS
Number 3

If you're doing it yourself, your best bet is number 3. Go into meshchatlib.pm as FPV said and hardcode your mesh hostname in there. He does bring up a good point, however - Why not set your real hostname to the one you advertise on the mesh?

AB4YY
I meant #3 in my earlier

I meant #3 in my earlier reply when I mistakenly said #2.  I'll look into what Trevor suggests below.

Why don't I change the RPI hostname?  No big reason....except for this MC file download 'issue', I had no reason to change it.  Also, things here are somewhat dynamic and ever-changing and that RPI could be changed or function put onto another existing platform.  It was handy that I did not (until now) have to change the hostname.

Also on a slight tangent but part of the answer to your question is that it seems in general all advertised services should have a unique identifier (e.g. callsign) as part of that advertised service.  If a node uses just "Camera" then the advertised service go out as (for example) "rtsp://Camera.local.mesh:554/Live0.264".  So in that example, that one node has hogged up a common name "Camera" and nobody else on that network can have that service name.  So I try to preface my services with my callsign.  The "ab4yy-Webpage" is kind of a silly hostname for the actual RPI but in the list of advertised services, it makes more sense and stands out from the two ip cameras are are also advertised services.

I set my Hosafe camera service name as: ab4yy-hosafe-cam
The link URL is: rtsp://ab4yy-hosafe-cam.local.mesh:554/Live0.264

- Mike ab4yy

K7FPV
This is by design. I'm not

This is by design. I'm not sure I understand why you would not want the hostnames to match. You can either make the hostname match by editing /etc/hostname and rebooting the pi, or you could edit this function on meshchatlib.pm:

sub node_name {
    if ( $platform eq 'node' ) {
        return lc( nvram_get("node") );
    }
    elsif ( $platform eq 'pi' ) {
        open( HST, "/etc/hostname" );
        my $hostname = <HST>;
        close(HST);

        chomp($hostname);

        if ( $hostname eq '' ) {
            $hostname = `hostname`;
            chomp($hostname);
        }

        return lc($hostname);
    }
}

AB4YY
Okay, I made the edit and

Okay, I made the edit and that seems to make it work fine.
Thanks.
- Mike ab4yy

w8erd
mesh chat

Sounds great!

1. Since the messages go to everyone in the zone or channel, might this better be called mesh broadcast, or mesh chat room?

2. How many channels can there be?   Could we make the chat more private by having a separate channel for each callsign?

Bob W8ERD

K5DLQ
K5DLQ's picture
re: #2...

re: #2...
I submitted a feature suggestion to Trevor a while ago to have a pre-defined list of rooms that are only visible to a known set/group of callsigns.
 

K5DLQ
K5DLQ's picture
ie.  "MESH ADMINS" =

ie.  "MESH ADMINS" = callsigns A,B,C,E
"LEADERS" = callsigns C,D,E,F
etc...
 

K7DXS
That's not really possible

That's not really possible without encryption. For Meshchat to work, all messages must be stored on all nodes. Perhaps the next best thing would be to have the capability for a node to be in multiple zones, and have a separate admin zone. This only provides security by obscurity, and that's all that's allowed over ham radio.

w6abj
I was just going to post so

I was just going to post so ask if it would be possible to add the ability to have different zones selectable. We have been discussin among our group and think it would be a great addition.

Thanks 
Rich W6ABJ

K7FPV
The name is kinda set in

The name is kinda set in stone now ;).

No limit on the number of channels. The dropdown is dynamically generated by the channels on the message db. No privacy is available. Not sure if doing that would violate part 97 and it was not really my intention for meshchat.

AB4YY
MeshChat on RPI: Seeing UL Files twice

On my RPI with MeshChat, I see each uploaded file twice.
If I upload a file, it shows up as two identical lines of entries.  The only difference is one of them (the top file) has the DELETE button next to it.

Right now, I have two files uploaded and it shows up as 4 files with one DELETE per file pair (total of 2 delete buttons).

When I log onto a regular node-MeshChat, I see the correct number of files (2).

Something doesn't seem right.
- Mike ab4yy

AB8XA
No problems

1.0 is working fine on my Pi running Raspbian Jesse with the meshchat-api package installed on my NSM2. No duplicate uploads.

AB4YY, grasping at straws here, but is it possible you installed the full meshchat rather than the meshchat-api package on the node?

AB4YY
'Problem' gone...

'Problem' gone...
I've made several changes here including swapping out main node device.  Maybe I was more careful at setting things back up but whatever, the dual file-listing in MeshChat is no longer there.  It very likely was just 'operator error'.  All is well now.  Thanks for the suggestion ab8xa.  BTW, I have both MeshChat -and- the MeshChat-API loaded on the node.
- Mike ab4yy

AB4YY
Probably not really gone....

I thought the problem went away but no.  It is still there.
When I log onto my MC that is on my RPI, I see double entries for each file ("Files Available"),  But if I log onto another user's MC, I only see one copy of the files.  (The files are all on my RPI.)
I uninstalled the full MC package and even rebooted RPI and node and it makes no difference.  I can try: uninstall MC-API also; reboot node and RPI; verify MC here is not in the picture; then reinstall MC-API...and retest.  I guess I'll try that next.
For MC-RPI, the associated node only needs the MC-API and not the regular MC install?
- Mike ab4yy
 

AB4YY
still double file listing...

I tried all the above: uninstalled MC as well as MC-API on the node.  Rebooted both node and RPI.  Installed only MC-API on the node and all works except when on my MC-RPI, double entries are still seen for files.

On thing that may be a clue: On my MC-RPI, in Status I see it syncs with the remote node but ALSO with itself, the MC in RPI.  The other guy's node never shows him syncing with himself.

I am wondering if maybe it is related to the advertised service oddness thatI have here and described earlier.  I guess I can go ahead and make changes so the advertised service for the RPI and the actual RPI hostname match.

- Mike ab4yy

AB4YY
fixed now...

I changed the RPI hostname to match the advertised service and that fixed the doubleness...
Case closed.

- Mike ab4yy

km4ack
Move file upload location

I just finished an installaing of MC on a raspberry pi.  Everything is up and running correctly.  Is is possible to move the uploaded files directory to a USB thumb drive instead of the current location /var/www/html/meshchat/files? 

Thanks,
Jason ~ KM4ACK

K7FPV
Just remove the directory and

Just remove the directory and soft link it to you USB mount point

rm -rf /var/www/html/meshchat/files
ln -s /path/to/usb /var/www/html/meshchat/files

km4ack
that's what i would have thought

after creating the softlink, i can click the softlink through file manager in the GUI and it takes me to the USB. but from within meshchat, my files are no longer listed on the files page even though they are on the USB. It's as if MC ignores the softlink. and other ideas?

k1ky
k1ky's picture
Check your permissions?

Check make sure the system has rw permissions on the file and directory?

km4ack
yes

i double checked the permission and they are correct.

KE2N
KE2N's picture
follow up

I wonder if anyone has got this (meshchat files on USB drive) working? 
I tried replacing the paths in the meshchatconfig.pm file with equivalent paths on my attached USB drive.
I got the message database on the USB drive but not the files.  And meshchatting itself is not working right.  
Anyone?

N7TZK
Meshchat 0.6 vs 1.0 issues

We are in early stages of deploying AREDN nodes here and everything is still pretty "temporary"... and mobile.  As such, I had previously installed MeshChat 0.6 on both my NSM2 as well as a Raspberry PI that was typically connected to the NSM2.  When the RPI was present, I unchecked the "link" box on the NSM2's Meshchat service advertisement, but otherwise left it operational.  To make it more obvious which was which, the service name for the MeshChat on my RPI was called Meshchat-Pi2.  And then came MeshChat v1.0...

The first issue I ran into was... AREDN wouldn't allow me to have two services listed on it with the same Service Name.  Yet with the Service Name now integral to how MeshChat 1.0 works, they have to be.  So... unless I'm misunderstanding something... I can't have MeshChat installed on my node if I may be connecting an RPI with Meshchat to that node.  At least not if it is advertised.  Which takes us a step away from the ease of rapidly deploying mesh nodes and related IT devices, sometimes by people with minimal IT savvy.

The other issue... IF I understand correctly... is it appears that there MUST be a node with Meshchat-API installed on it.  Atleast if there may be a RPI version present.  And presumably no more than one on that network.  Which seems like a single-point-of-failure.  And again, if one is rapidly deploying, things are a little less flexible about the use of nodes. 

One of the nice things about MeshChat 0.6 was you could put a copy of it on lots of nodes and since they were all replicating, there weren't any single points of failure.  Having an RPI based MeshChat was nice because of the increased file storage and data retention between power cycles, but you could have a pretty useful system even without it.  And no harm done if you installed two on the network.

None of which is to say I don't really appreciate the time and effort that goes into producing MeshChat.  It is a valuable addition to the toolkit.  But unless I'm missing something, I don't see how the newer architecture is an improvement over the previous way of doing things.

Dave

K7FPV
When you have a pi connected,

When you have a pi connected, then yes run it on the pi and put the api package on the node the pi is connected to. Think of those two devices as paired. Then install on other nodes just like before all using the same or different service names to create zones. You can install the api on any node, or number of nodes you want. Not really adding a point of failure for the pi with the api package installed since if that node it is connected to goes down, it could not talk to another node on the mesh anyways.

Many people run it on their node just fine, just get more storage etc with a pi attached.

Ai6bx
Looking for a set of install instructions

I am looking for a little more detailed set of install instructions for Raspberry Pi. I tried the install last night but do not seem to be getting the link between the API on he node, an AR, and the pi. Interesting that the /usr/lib/cgi-bin/meshchatconfig.pm file did not exist on the pi for editing. Any ideas?

Thanks

Problem solved.

Ai6bx
Rasp Pi install showing me twice as user

I have MeshChat V.1 installed on a Pi v3 with the API running on an AR HP. All works wonderfully with one odd exception. When I log in to mesh chat it shows my call sign and node name twice, ai6bx-2-chatpi, in the MeshChat Users box. Any ideas why this might be happening and how I would correct this? FYI the pi is running Jessie if this helps.

Thanks,

Keith - AI6BX

KD2EVR
KD2EVR's picture
So I installed meshchat on a

So I installed meshchat on a pi and the api on a node.  I edited the config file for my zone name and left "our $local_meshchat_node = 'localnode';" as-is.   I created a DHCP reservation and a service with the zone name pointing to the pi.  

This is the only meshchat installation on this mesh.  

Should I be seeing the local node on the "Node Sync Status" screen or should it be blank until another mesh chat station is online?  

K7FPV
Blank until another comes

Blank until another comes online.

KD2EVR
KD2EVR's picture
Ok, thanks. 

Ok, thanks. 

Nice work, by the way. 

I nominate you to revamp the AREDN web UI if and when that comes up. 

k1ky
k1ky's picture
MESHCHAT 1.0 RPI File Size Limitation?

Is there a Max file size limit (per file) for files stored on MESHCHAT 1.0 RPI version?

K7FPV
not in the mesh chat code

not in the mesh chat code itself. however apache will limit based on config.

KB1JDX
Meshchat Pi-to-Pi

Is is possible to run Meshchat direct Pi to Pi without the additional API on the mesh node? I have OLSR running on the two Pi which I'd love to use if possible but even manually putting in the node name would work. It looks like it should be possible looking at the config and code but I haven't been successful.

The Pi in question is actually part of the mesh using this method to make it a node: https://github.com/urlgrey/hsmm-pi

N7QJK
Uninstalling Meshchat

I recently tried to uninstall meshchat on from my 2.4 gig airgrid. All seem to go well, after waiting about five minutes rebooted the node the service was still listed and when I tried to click on it the listed service the screen showed two folder listings. I ended up deleting deleting the service and all seems ok. I just wonder if there some part of the installation still located on the airdrid...

Thanks
Dale - N7QJK

K6PC
How to edit service name?

Hello, I've installed MeshChat on two nodes.  I followed the instructions listed on Trevor's website up to the point where it says:

"Now you need to edit the service name that was created on installation to match the zone you want this installation to sync with."

When I go to Setup -> Port Forwarding, DHCP, and Services. Under "Advertised Services" all I see is "none"  How do I edit the service name?

When I log into either of my nodes that it's installed on they both show MeshChat services listed on the Mesh Status screen and it appears to work but on separate zones.

**EDIT**
I figured out my problem.  No advertised services will show up until a DMZ or port forwarding rule is applied.  I set up an arbitrary forwarding rule and then reinstalled MeshChat. It now shows up and allows me to change the service name.

k1ky
k1ky's picture
MESHCHat "Send" Button obscured v 1.0

The message "SEND" Button seems to be mostly hidden (90% or so) by the Messages window in all browsers (Chrome, Firefox, Edge) in MeshChat 1.0. I've checked with multiple users on our system and the results are basically the same.  Does anyone have a solution suggestion?  I've tried resizing the screen to no avail. 

AJ6GZ
OS ver?

This was one of the problems that manifested after moving Raspbian Jesse to Stretch, yeah?

K5DLQ
K5DLQ's picture
Seems ok on Firefox 61.0.1 on

Seems ok on Firefox 61.0.1 on OSX 10.13.6


 

Image Attachments: 
AB8XA
Seen that...

The problem we had is someone posted a horrendously long node name in the Channel field... look for "laguna hills" or something like that in past messages. We didn't see that until we linked with N2MH.

The channel field wraps it, shoving the Send button down almost out of sight.

Our solution for the Miami Valley Mesh Alliance was to start a new zone with a name other than MeshChat.
 

AB8XA
Sorry about the dupe... must

Sorry about the dupe... must have trackpad bounce...

KC0EUW
Inactive upload button installing meshchat-api ipk

Will be running meshchat as a service from Rpi, so went to install meshchat-api on the node.  Running firmware 3.18.9.0.  After selecting the meshchat-api_1.0_all.ipk package the Upload button remains inactive/unclickable.  I'm probably overlooking something...  just wanted to check.  THX
 

Image Attachments: 
AJ6GZ
Tunnels?

Do you have any tunnels running? If so uncheck the "Enabled" box(es) temporarily on each entry. Packages and OS upgrades must be done with no tunnels up.

Ian

KC0EUW
That's the issue then

Thanks, Ian.  I do have a tunnel server running, so that's the issue.  I'll uncheck and try again.  Many thanks!  Steve KC0EUW

Pages

Theme by Danetsoft and Danang Probo Sayekti inspired by Maksimer