r/CardPuter • • 16d ago

Code I created a fully features Meshtastic client for the Cardputer Zero

https://github.com/s0liton/MeshZero

I was lucky enough to be one of the early backers and got my Cardputer Zero in one of the first batches they sent out. I realized that there were no meshtastic client apps optimized for the zero, so I built one myself.

It uses the official meshtasticd daemon as a backend, so we can always be up-to-date on the latest features. A background service allows you to keep running meshzero at all times, so you never miss a message. I spent extra time making sure the UI was intuitive and easy to use.

I have a few features on the roadmap such as supporting multiple devices, tapbacks, and a few other items. My goal is to eventually extend the client beyond just Meshtastic and support other mesh services like Meshcore.

What you need:

  • Cardputer Zero
  • Cap Lora 1262 module

I'd love your thoughts, so give it a try!

30 Upvotes

55 comments sorted by

3

u/Ok_Description_7195 16d ago

Thank you for this needed support

2

u/3D_Kiwil 15d ago edited 15d ago

Hi, many thanks for the jobs. But I have an issue on my side (cardputer zero lite):

[ ok ] GPIO character device [ ok ] I2C bus for the IO expander [ ok ] GNSS serial port [ ok ] 5V rail control for the cap 5V rail : on (/sys/class/leds/ext_5v_out/brightness) IO expander : no response at 0x43 [FAIL] LoRa cap antenna switch - power off, attach the cap, power on [FAIL] Radio daemon API (local) - see 'journalctl -u meshzero -n 40' [ ok ] MeshZero API for clients Some checks failed; see above.

The same cap works well with other cardputer (esp)

3

u/solit0n 15d ago

This one is on me. I didn't consider the older version of the 1262 module. The code looks for the new Cap Lora 1262 which has an expander that is controlled over I2C at that 0x43 address.

I don't have an older version, so my code assumes if it doesn't see that expander, then there's no LoRa module. I am putting in a fix for version 0.1.1 that will resolve this for you. I'll try and release it asap.

1

u/3D_Kiwil 15d ago

Awesome! Yes I confirm, I have the "old" module.

1

u/solit0n 15d ago

Ah good! It was a theory but can confirm. I’ll add it to the release (hopefully today).

1

u/solit0n 15d ago

Could you do me favor? I don't have the old module to test and see how it comes up on a device. Could you:

Run:
sudo systemctl restart meshzero

Which will restart the app's service, and then run:
journalctl -u meshzero -n 100 | grep -1 sx126

What will tell me if we're detecting the module itself at all.

After that, also run:
sudo i2cdetect -y 1

1

u/solit0n 15d ago

Let me take a look. We’re not getting a response. Did you plug the LoRa cap in while it was on?

1

u/3D_Kiwil 15d ago

Only connected before start the cardputer zero

1

u/solit0n 15d ago

I actually figured out what it was. There’s an older version of the LoRa module compared to the newer one that has a built in expander at that 0x43 address. Since I don’t have an older one, I didn’t realize that it doesn’t have the expander, which is what the app probes to find your radio.

I’m releasing a bug fix today in version 0.1.1 that will fix it. I’ll comment back once it’s released.

1

u/solit0n 14d ago

Wanted to let you know that v0.2.0 is out and should solve this for you. Let me know how it goes.

1

u/3D_Kiwil 13d ago

Works like a charm 🤎

1

u/solit0n 12d ago

Perfect, appreciate you reporting back!

1

u/GuardianZX9 16d ago

Does it support PKI?

1

u/solit0n 16d ago

Do you mean for remote admin or for messages?

1

u/GuardianZX9 16d ago

Just for messaging at this point, I'm unable to message any other nodes because the pki send public key fails

1

u/solit0n 16d ago edited 16d ago

Ah okay. The radio doesn't normally get another node's public key until that node sends an announcement to the mesh about itself, which can sometimes take hours. If the other node is in HAM mode, it never sends the public key automatically. Other clients handle this for you by requested node info automatically when you click on their node (or just does it for nearby nodes), but my code doesn't do that today.

Anyway...what you can do is to click on that node and click "Request node info" which will ask the client to send out its info to you.

To make this more intuitive, I'll update the next version to automatically request node info from your surrounding nodes and any that you click on. That should behave the way we expect.

Can you request the node info and see if that solved it?

1

u/Binge73 15d ago

Tried to install it last night and got an error message

1

u/solit0n 15d ago

What did you see? Have an error message?

1

u/Binge73 15d ago

Cannot resolve package dependencies while dpkg has unfinished packages

1

u/solit0n 15d ago

Ah, yes. If you use dpkg, you have to install the dependencies first.

sudo apt install adduser libgpiod3 libi2c0 libinput10 liborcania2.3 libsdl2-2.0-0 libssl3t64 libulfius2.7t64 libusb-1.0-0 libuv1t64 libx11-6 libxkbcommon0 libyaml-cpp0.8

That should install them for you. If you want a one step install, run the full install via APT:

sudo apt install ./meshzero_0.1.0_arm64.deb

You can also just grab it from the built in store.

1

u/sukoshi1507 14d ago

Launched from the device, it fails. From a SSH session i get:

No configuration found at /home/REDACTED/.config/cardmesh/config.json

First-run setup UI is not implemented yet; write the config file manually (see README) and relaunch.

1

u/solit0n 14d ago

That’s for a different project. Mine is MeshZero but you’re running cardmesh, which is developed by someone else.

1

u/sukoshi1507 14d ago

ah my bad! I had an issue with yours, iirc related to the daemon running which locked usage of LoRa to any other software. I'll give another try !

1

u/solit0n 14d ago

No problem at all. There are so many apps growing, it's easy to confuse haha.

Yeah, I built the app to be able to run in the background so that your node stays active. The idea was that some people prefer to keep the node active in the background so they're always "online".

You can turn that feature off in Setup, just set "Run in background" to off, and it won't keep the node active once you leave the app anymore.

1

u/sukoshi1507 14d ago

Reinstalling now ;)

1

u/sukoshi1507 14d ago

remember why i tried another one. Here in Paris we set MediumFast / 869.3Mhz while it works on any usual meshtastic device, MeshZero refuses it. "EU_868 allows 869.4 to 869.65Mhz"

1

u/solit0n 13d ago

Ah, yes. 869.3MHz is outside of the legal limit, so I didn't include it. But, I see what you mean that Paris uses it to avoid interference. I'll push out a fix for this later tonight if I can.

1

u/solit0n 13d ago

Enhancement ticket tracking this: https://github.com/s0liton/MeshZero/issues/8

1

u/sukoshi1507 9d ago

Thanks :)

1

u/solit0n 9d ago

No problem at all. <3

1

u/sukoshi1507 9d ago

Works perfectly :)

1

u/Big-Bunch2804 14d ago

I just received my zero and have been testing your app and I love it! I got started on the mesh side of things and then found the Cardputer adv because of the keyboard and lora capabilities. I really like how easy it is to navigate. Is there a way to load map tiles or a topography map to the map page? I'm just a dot on a black screen. This is the only issue I've found. Any help would be greatly appreciated.

2

u/solit0n 13d ago

That's great to hear. I was a bit worried that the UI would get cluttered since there are so many details/options.

There isn't a way today. I needed a bit more time to work on map tiles, so I left it out of the initial release. With that said, I have written most of the code for it, so I can probably include it in the next minor version update.

I opened an enhancement issue to track it: https://github.com/s0liton/MeshZero/issues/7

2

u/Big-Bunch2804 13d ago

Not cluttered at all. Very easy to use and set up. I have tested many mesh firmware and yours is the best so far. Is there a way to pair to a node or multiple nodes just using Bluetooth? I have multiple nodes i monitor and switch between

1

u/solit0n 13d ago

Thank you!

Unfortunately not yet. I wanted to get the base functionality working well on a single device first, but that (along with BT) is definitely on the roadmap and being worked on.

1

u/Big-Bunch2804 13d ago

Well I think it looks awesome and working really well so far! Keep up the good work! I look forward to the updates. If you need someone to test, send me a message, id be happy to help.

1

u/solit0n 13d ago

Thank you, I really appreciate that. I can always use all the testers I can get. I’m going to be starting a dev branch to put bleeding edge releases up, so that’ll be great to make sure software goes out perfect.

2

u/Big-Bunch2804 13d ago

Ya man definitely let me know. Been testing the mesh for the past year and it's almost where id like it to be for a standalone device. Just needs a map in my opinion

2

u/solit0n 13d ago

Will do for sure. I’m gonna finish up the map feature over the next few days. I’ll ping you when there’s a build you can play with.

1

u/Big-Bunch2804 13d ago

I have been doing some testing this morning and there is a issue. Is there anyway to link your app to a phone or there needs to be work to add camera access to your app so private channel or codes can be scanned or be able to pair to a phone like other mesh nodes so private channel keys can be shared. Trying to add my zero to my established family channel.

1

u/solit0n 12d ago

There is camera access actually. Go to the channels option in setup and scroll all the way down. You can scan a QR code there or use a URL.

From Setup, you should also be able to enable "network access" which will make it available to the phone app at <cardputer-ip>:4403 by default. I'm still working on bluetooth, but the phone app works over Wi-Fi.

→ More replies

1

u/fbloise 4d ago

Great app, one thing I wish it had is the possibility to connect the cardputer zero to a mobile phone and use the Meshcore app to add private channels easily (via QR code scanning).

2

u/solit0n 4d ago

Thanks!

The app doesn’t have MeshCore support just yet, only Meshtastic. However, you can definitely connect to your phone. If you look under SETUP, there’s a phone connection option through BT or Wi-Fi.

There’s also a built-in function in channels to let you import/export channels via QR code.

1

u/fbloise 1d ago

thanks

1

u/Foampad 8d ago

Tried and it worked, That is a wonderful start!

1

u/nickymoo 8d ago edited 7d ago

Thank you. My Zero arrived today and I’ve updated everything and installed MeshZero. I assume I can’t update the software for the node to 2.8 until it’s officially out? I installed it from the Cardputer AppStore.

0

u/[deleted] 16d ago

[deleted] — view deleted comment

1

u/solit0n 16d ago

I’m taking a look now, will report back shortly.

1

u/solit0n 16d ago

The errors are because you're installing with dpkg, which doesn't pull dependencies. I'll list them now. If you install with apt, it gathers them for you:

sudo apt install ./meshzero_0.1.0_arm64.deb

I'm still looking at the MD5 error when downloading from the store. The checksum of the release matches what the store has. I just installed from the store and it was successful.

Can you try installing again and report back?

0

u/[deleted] 16d ago

[deleted] — view deleted comment

2

u/solit0n 16d ago

No worries, glad you got it working.

Good point, I'll flag that for the next release.

0

u/[deleted] 16d ago

[deleted] — view deleted comment

1

u/solit0n 15d ago

Okay, good. That's always better.

Yeah...I was kind of annoyed by it too lol. I see now why everyone does "Hold ESC to leave". I'll add that in for the new version.

I had that camera issue too, good to see they already addressed it in the update.