Meshtastic webserver upload issue

when ever I upload a fil onto the device it says write fail and then the file is 0kb but if i edit it, it works. but for the JS its larger than 200KB and the meshtastic crashes

This is a known issue with some boards. We really should document this better.

Here’s the fix that we know of. There are probably other fixes too.

1 Like

wait so i just flash with some random sketch?

Maybe use an older binary instead of a random one

can’t find the board in the ardino ide. can all this web server stuff just be put in the next firmware?

could you add the files to the bin for the firmware-tbeam-ANZ-1.1.48.bin?

Sorry, the web interface is not yet in alpha.

1 Like

all i need is the .js in there becaus ethe web interface doesnt work with such a big file

The problem on your device is the partition scheme. Check out the discussion I linked to update your partitions. Wish I could help more, I have not had this problem myself.

1 Like

i had a look and it was talking about the arduino IDE and there is now esp support there

I think some people has been able to manually run the commands in the install script included in the zipfile with firmware files. If you are on windows you may want to install git bash to do this.

1 Like

is there a discord? that would be a very good idea

As above, the problem seems to occur when your board has the partitioning structure set incorrectly. This typically occurs when the board has had a firmware other than Meshtastic on it previously. As well as the method of using the Arduino IDE to reset it, there are a couple of other methods that essentially involve erasing the flash and then re-uploading the Meshtastic firmware.

For Windows, try:
pio run --target erase --environment tbeam
Then re-install the firmware ie using ESPHome Flasher

Prerequisits: Python, Pio (pio · PyPI), command to be run in the root directory of the meshtastic-device project once you’ve cloned it (this last requirement is an assumption based on pio not knowing what a tbeam is).

@1984 posted another method using the python based esptool.py to erase and re-flash the firmware:
esptool.py --baud 921600 erase_flash
esptool.py --baud 921600 write_flash 0x1000 system-info.bin
esptool.py --baud 921600 write_flash 0x00390000 spiffs-*.bin
esptool.py --baud 921600 write_flash 0x10000 firmware-tbeam-EU865-1.1.42.bin

There is also the method of using the Visual Studio IDE as posted by @mc-hamster. This requires having Visual Studio and PlatformIO installed, along with having cloned the meshtastic-device code:

Once it has been successfully erased and re-flashed, visiting https://192.168.42.1/static should leave you free free space on the order of 300,000 bytes, rather than the 43,000 bytes you currently have. You can then upload the files from the meshtastic-web release.

Occasionally this may glitch when uploading the larger app.js.gz file, but a further erase and flash typically solves this.

2 Likes

As others have mentioned already, there is an issue with partition scheme on your board.

There is another person that had the same issue as you and he was able to resolve it by following steps previously suggested. Take a look at below thread:

https://meshtastic.discourse.group/t/new-device-alpha-1-1-33/2270/8

If you are in Windows, easiest thing is to install Git (which will install Git Bash) and then you can follow command line installation instructions.

I had several boards that originally came with SoftRF or Pax Counter preinstalled and had minimal spiffs partition scheme. Installing with Windows GUI ESPHome flasher on these boards keeps the original partition. You need to install with command line instructions in order for partition scheme to be modified. Or, use PlatformIO or Arduino IDE (you will need ESP32 board manager installed and then use some generic ESP32 board) to modify partition scheme and then use whatever installation method you like.

2 Likes

@apt105 thanks for that write up! I’ve largely copy/pasted your post into a wiki. Sorry for the poor formatting, I did it from my iPad in bed.

Since this issue keeps coming up, let’s update the wiki with what we find. Anyone’s welcome to edit the wiki to make it better.

Also thanks to @Scout for all the early research on this. I think we’re on the right track.

Thanks!

1 Like

There’s not one that I know. We do have a slack group for developers to collaborate. Once in a while there’s non-development chat, but usually there for us to help each other out with writing code.

Maybe start one up?

1 Like

Cheers, I’ve had a go at formatting, and I’ve added a link from the how to use meshtastic-web page. I’ll have a go at moving descriptions of the two linked methods when I work out how to upload images to the wiki.

1 Like

Upload images here:

I’ll approve your PR

Think I’ve managed a PR, though must confess I’m still rather new to GitHub!

3 Likes

PR accepted. Thanks!

2 Likes