Discussion on support for custom build targets (i.e. different radio chips, cpus, one off boards)

It also works with older firmwares(radiohead). I use DOIT Esp32 DevKit v1 + ra-02 (sx1278) and rfm98w. Without issues. Flash TTGO lora32 v2 eu433.

oh yeah! heh! I forgot sx1278 is just a different name for RF95. yeah - we’ve been support that since day one ;-). I thought you were talking about that multichannel chip from Semtech.

It’s running, we got a heartbeat :heart:

I’m messing (or already meshing?) with two RA-02 Modules and two ESP32’s (one Lolin32 and a Lolin32 Lite)

Here is my log output (which looks promising to me) from one of them:


Received someone rebroadcasting for us fr=0xfc,to=0xff,id=113
Adding packet record for fr=0xfc,to=0xff,id=113
FIXME not implementedRebroadcasting received floodmsg to neighbors, fr=0xfc,to=0xff,id=113,hop_limit=1
enqueuing for send on mesh fr=0xfc,to=0xff,id=113 (txGood=1,rxGood=1,rxBad=1)
FIXME-update-db Sniffing packet fr=0xfc,to=0xff,id=113
Notifying observers of received packet fr=0xfc,to=0xff,id=113
Trigger powerFSM 3
                  Ignoring incoming packet - not a position
NOTE! Received a nodenum collision we lost, so picking a new nodenum
Update DB node 0xfc, rx_time=0
old user !240ac49bbafc/Unknown bafc/?00
updating changed=0 user !240ac49bbafc/Unknown bafc/?00
sending owner !240ac49bbafc/Unknown bafc/?00
Update DB node 0xfc, rx_time=0
old user !240ac49bbafc/Unknown bafc/?00
updating changed=0 user !240ac49bbafc/Unknown bafc/?00
Adding packet record for fr=0xfc,to=0xff,id=209
enqueuing for send on mesh fr=0xfc,to=0xff,id=209 (txGood=1,rxGood=1,rxBad=1)
Forwarding to phone, from=0xfc, rx_time=0
Update DB node 0xfc, rx_time=0
old user !240ac49bbafc/Unknown bafc/?00
updating changed=0 user !240ac49bbafc/Unknown bafc/?00
Telling client we have new packets 1
Telling client we have new packets 1
Starting low level send from=0xfc, to=0xff, id=113, want_ack=0
Completed sending to=0xff, id=113
Starting low level send from=0xfc, to=0xff, id=209, want_ack=0
Completed sending to=0xff, id=209

Can somebody interpret it for me? It looks like they found each other but have nothing else to tell?

I wonder what steps are now necessary that I could make use of the meshtastic app I have installed on my phone. I tried many times to add/find the meshtastic-devices via bluetooth inside the app but had no luck at all. Are more steps needed before I can do that?

1 Like

Does phones USB OTG or Linux PCs Python API connect/work?

1 Like

Good question, I need to try that! Meshtastic is totally new to me!

So USB OTG on the phone should also work with the app?

How would a API connection work? Do I need to lift the esp into my wifi?

1 Like

About Meshtastic python API: Python API release notes

USB OTG works automatically, when the node is connected to the phone.

So I tried it with USB OTG on my phone but the app doesn’t request a connection to it. On the other hand I can initiate a serial monitor (only with lower baud rate so no useful output) on the phone with the esp32 connected. So OTG works but the app doesn’t catch it.

Are there any dependencies on google services which are not present in AOSP? I don’t have google on my phone…

Ok, once again.

I can access via usb otg on a linux machine usinb meshtastic after installing (pip3 install meshtastic and pip3 install pygatt).

Out put looks like this:

Trigger powerFSM 1
Transition powerFSM transition=Press, from=ON to=ON
Client wants config, nonce=42
Reset nodeinfo read pointer
encoding toPhone packet to phone variant=3, 42 bytes
encoding toPhone packet to phone variant=6, 64 bytes
Sending nodeinfo: num=0xfc, lastseen=0, id=!240ac49bbafc, name=Unknown bafc
encoding toPhone packet to phone variant=4, 49 bytes
Sending nodeinfo: num=0x18, lastseen=0, id=!3c71bf034818, name=Unknown 4818
encoding toPhone packet to phone variant=4, 53 bytes
Done sending nodeinfos
encoding toPhone packet to phone variant=8, 2 bytes
Connected to radio...
encoding toPhone packet to phone variant=2, 62 bytes
Received: {'from': 24, 'to': 252, 'decoded': {'user': {'id': '!3c71bf034818', 'longName': 'Unknown 4818', 'shortName': '?00', 'macaddr': 'PHG/A0gY'}}, 'id': 101, 'rxSnr': -10.0, 'hopLimit': 3, 'fromId': '!3c71bf034818', 'toId': '!240ac49bbafc'}
encoding toPhone packet to phone variant=2, 64 bytes
Received: {'from': 24, 'to': 252, 'decoded': {'user': {'id': '!3c71bf034818', 'longName': 'Unknown 4818', 'shortName': '?00', 'macaddr': 'PHG/A0gY'}, 'wantResponse': True}, 'id': 102, 'rxSnr': -10.0, 'hopLimit': 3, 'fromId': '!3c71bf034818', 'toId': '!240ac49bbafc'}
1 Like

ooh interesting! I think that means the bluetooth on your device is basically good to go. Also - the bluetooth support in the python tool is not quite ready for prime time, but I’m glad it worked for you.

Are there any dependencies on google services which are not present in AOSP? I don’t have google on my phone…

Hmm - there are (analytics and crash reporting), but I think they are both optional. It had been a while since I fired up an emulator running a bare AOSP. But I just launched it on an emulator running api level 21 (which I think is android 5?) and it ran fine. Alas, the emulator doesn’t let me try bluetooth, but I think the app still nicely runs on bare AOSP phones.

1 Like

btw - what version of the phone app do you have installed? If you were installing custom device builds based on the master branch of meshtastic-device, I think you’ll want your phone app to be at least 0.7.2.

1 Like

Good to know, just checked and I have a 0.6.8 on my phone! Will try the freshly backed :bread: 0.7.5 beta!

It’s crazy how fast this development goes on here! Congratulations! :star2:

News: I’m running meshtastic-android 0.7.5 beta on two (google free) android phones.

I was able to pair both of my nodes (one via display, the other one python meshtastic to show pairing code) with both phones via the internal bluetooth. They are present in my paired device and should be “ready to use” by the app.

But still when I have the meshtastic android app open it just says (on both android devices!):


force stopping the app and restarting also didn’t change the behauvior

it looks a little better than with the last version (0.6.8) which just never stopped with a loading animation.

1 Like

By any chance do you have location services turned off? Try turning it on if so. Android Bluetooth requires location services to be on to scan for devices or something along those lines.

2 Likes

Indeed. Location services is always off :wink: When I turn it on I can indeed see on one of my phones (Android 7.1) a list with the two meshtastic-devices with bluetooth in the app. But even if I select them I am not able to choose a user name. The note on top of the list is ether “Not connected, select radio below” or something that the device is a sleep now.

image

On the same phone I also tried via usb OTG which also get’s detected inside the app but the same as with bluetooth I can’t choose a username after selecting the device (/dev/bus/usb…). Message is also “Not connected, select radio below”.

And my Test with the other Android (8.1) phones: With bluetooth I were not able to get the list of device inside the meshtastic app (paired in android already) but I had success with usb OTG! If I choose it from the list I can then type a username and start the chat :tada:

1 Like

how are you programming your custom esp32 boards? using platform io? can you first do a complete erase of the esp32 using esptool?

Some ESP32s are shipped with malformatted flash which makes the ESP32 system code be unable to save BLE shared keys (generated during pairing).

1 Like

Yes, I cloned the meshtastic-device and just changed the platformio.ini to the right frequency. For the Lolin32 Lite board I also needed to lower the baud rate to be able to flash it. Beside that I just used the heltec profile and that’s it.

To wire my esp32’s (Lolin32 and Lolin32 Lite) to the RA-02 Module (SX1278) I just used the exact pins like the heltec board

can you first do a complete erase of the esp32 using esptool?

I did this already for the lolin32 lite because I had troubles flashing in the beginning.

I will try to get hold on another android device to test the meshtastic app on there.

Is there any way to disable the sleep function btw? For testing it would be better they are always awake I guess (plugged in anyways)…

Thank’s @geeksville for helping so much and bringing this great project to live :parachute:

I would like to create a micro mesh network to test new Meshtastic functions (mainly audio and OTR messaging). Would it be possible to use the cheap $3 SX1278 (E19) or nrf52840 and a ESP8266?

ESP8266 is not supported at all. nrf52 is not officially supported - still very pre alpha (but it will build). If it were me, I’d just buy a few of the alterady supported boards. Yes - you can make it work on a one-off custom board, but it is a fair amount of work.

yes - This can be done through the settings. Currently only the python tool has a user interface for it though. I’ll add a task for the android app to give full settings access. But it will be a couple of weeksish.

1 Like