neonious / lowsync

A tool to program the neonious one and other low.js for ESP32 based devices with external IDEs. Allows the user to sync directories to the device, change settings, start/stop programs and more.
MIT License
11 stars 5 forks source link

LowJS Professional error #18

Open ivanpajon opened 3 years ago

ivanpajon commented 3 years ago

I bought a license and one ESP32 16MB to use lowjs professional few weeks ago. When I flash my device without --pro --pro-key=MYKEY flags it works fine, but when I flash it with that flags, i see an error in console when I try to connect to it's IDE IP (192.168.0.1 by default).

LowJS Pro IDE Error

Also, with lowjs professional, lowsync sync throws a 507 error. So I deducted it's only posible to use through online IDE (I don't know if this is correct).

LowJS Pro Error 507

Using:

ThomasRogg commented 3 years ago

This is weird. So all you are doing is a

lowsync flash --init --pro --pro-key=...

and then you see that error when you connect to the Wifi and go to 192.168.0.1? Do you see the JavaScript example program?

507 normally means that the Flash space is full. You should have 8 MB for files however. How big are the files you are syncing?

ivanpajon commented 3 years ago

I can't access to IDE so I don't see the Javascript example program? Also, I'm not syncing anything so I neither understand the 507 error... I'm using an empty folder initialized with lowsync init.

If I flash my device without --pro --pro-key=MYKEY it works and I can see the webchat example synced in my folder. lowsync sync works in this case too.

ThomasRogg commented 3 years ago

You do not do need to access the IDE to see the JavaScript example program. It runs just like the webchat example, directly after syncing.

I will try to sync myself tomorrow, to see if we simply have a broken image uploaded. Sorry for keeping you waiting... But we will fix this.

ivanpajon commented 3 years ago

I can't see the example program because of 507 error shown above (If you mean to see the files synced in my PC). If I try to access 192.168.0.1 to enter webchat example I can't neither.

Other problem I saw is when I change settings via lowsync settings set wifi.ssid="MYWIFI" wifi.password="PASS" wifi.mode=station wifi.dhcp=client it works until I reset the device. Once I shutdown and start again my ESP32 I need to connect to his wifi and change the settings again. Maybe it can be related... If I flash it without lowjs pro it works properly.

ThomasRogg commented 3 years ago

Things are really weird on your system and I have no idea what is going on. Maybe it is because I am my Mac that I have no problems.

Look what I did here. Please try to follow what I did here and tell me exactly on which step what happens which is different. Please really make sure you have exactly the same steps, exactly the same parameters and so on.

STEP 1: Create empty directory, go to directory

Thomass-MBP:Desktop t.rogg$ mkdir test Thomass-MBP:Desktop t.rogg$ cd test

STEP 2: Flash new low.js Professional

Thomass-MBP:test t.rogg$ lowsync flash --init --port=/dev/tty.usbserial-14401 --pro --pro-key=<YOURKEY>
Step 1/3: Probing ESP32 microcontroller
    now checking if it is an ESP32-WROVER... (takes a while)
Step 2/3: Erasing flash and building image in parallel
esptool.py v2.6-beta1
Serial port /dev/tty.usbserial-14401
Connecting......
Detecting chip type... ESP32
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: cc:50:e3:ab:5e:30
Uploading stub...
Downloading data from neonious servers...
Building firmware...
Running stub...
****** Used flash space: ******
low.js code       2097152 bytes
low.js data       3365829 bytes
Static files            0 bytes
Factory files        5905 bytes
Modules             53830 bytes
Settings             1022 bytes
OTA support       2097152 bytes
Reserved           767718 bytes
-------------------------------
Total             8388608 bytes
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 6.8s
Hard resetting via RTS pin...
Step 3/3: Flashing firmware
esptool.py v2.6-beta1
Serial port /dev/tty.usbserial-14401
Connecting....
Detecting chip type... ESP32
Chip is ESP32D0WDQ6 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: cc:50:e3:ab:5e:30
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 16MB
Flash params set to 0x024f
Compressed 2093056 bytes to 1496784...
Wrote 2093056 bytes (1496784 compressed) at 0x00001000 in 133.0 seconds (effective 125.9 kbit/s)...
Hash of data verified.
Compressed 3426588 bytes to 2927054...
Wrote 3426588 bytes (2927054 compressed) at 0x00400000 in 260.1 seconds (effective 105.4 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
*** Done, low.js flashed. Please give your device a few seconds to reset to factory state
To communicate with your microcontroller, connect to the Wifi:
SSID:       low.js@ESP32 CC50E3AB5E30
Password:   ez9gQ8zVGFBG
In this Wifi, the microcontroller has the IP 192.168.0.1

STEP 3: Here I now login the the Wifi => Works. Go to http://192.168.0.1/ => I have the example program Click on the link to the IDE in the example program => IDE works well

STEP 4: Create simple test app I create a file index.js in the directory test with the following content: console.log("TEST");

STEP 5: Create Project Thomass-MBP:test t.rogg$ lowsync init ? IP address of the microcontroller on your network: 192.168.0.1 ? The local directory that you want to sync with: /Users/t.rogg/Desktop/test ? Enable ES 6 (and more) via automatic Babel transpilation? (if disabled, you wi ll have to handle this yourself!) Yes

STEP 6: Sync and run Thomass-MBP:test t.rogg$ lowsync Fetching file system listings... Reminder: No password set! Please set one via the lowsync settings set web.password="..." command. Continuing... ? The microcontroller has files in his file system (probably preinstalled exampl e application), the repository on your PC also. How would you like to continue? Delete files on microcontroller and copy local files to microcontroller. Synchronization complete |██████████████████████████████| 100% PC => MC: +File index.js PC => MC: -File/Folder README.txt PC => MC: -File/Folder package.json PC => MC: -File/Folder www ? Would you like to show the output of the microcontroller? (Use the --monitor c ommand line option to remove this prompt and enable/disable showing of the outpu t after sync.) Yes Restarting program... Starting monitor... --- User program's output: --- TEST --- Program exited. --- Thomass-MBP:test t.rogg$

Thats it! It works here...

Thomas

ivanpajon commented 3 years ago

I stopped in Step 3. I have login in to his wifi but i can't access http://192.168.0.1/

ThomasRogg commented 3 years ago

Can you write me the exact output of STEP 2?

ivanpajon commented 3 years ago
C:\Users\ivang>lowsync flash --init --port=COM1 --pro --pro-key=MYKEY
*** Step 1/3: Probing ESP32 microcontroller
    now checking if it is an ESP32-WROVER... (takes a while)
*** Step 2/3: Erasing flash and building image in parallel
esptool.py v2.6-beta1
Serial port COM1
Connecting........_____....._
Detecting chip type... ESP32
Chip is ESP32D0WDQ5 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: c8:2b:96:88:3f:d8
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Downloading data from neonious servers...
Building firmware...
****** Used flash space: ******
low.js code       2097152 bytes
low.js data       3365829 bytes
Static files            0 bytes
Factory files        5905 bytes
Modules             53830 bytes
Settings             1022 bytes
OTA support       2097152 bytes
Reserved           767718 bytes
-------------------------------
Total             8388608 bytes
Chip erase completed successfully in 7.1s
Hard resetting via RTS pin...
*** Step 3/3: Flashing firmware
esptool.py v2.6-beta1
Serial port COM1
Connecting........_
Detecting chip type... ESP32
Chip is ESP32D0WDQ5 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: c8:2b:96:XX:XX:XX
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 8MB
Flash params set to 0x023f
Compressed 2093056 bytes to 1496763...
Wrote 2093056 bytes (1496763 compressed) at 0x00001000 in 132.3 seconds (effective 126.5 kbit/s)...
Hash of data verified.
Compressed 3426588 bytes to 2927054...
Wrote 3426588 bytes (2927054 compressed) at 0x00400000 in 259.0 seconds (effective 105.8 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...
*** Done, low.js flashed. Please give your device a few seconds to reset to factory state
To communicate with your microcontroller, connect to the Wifi:
SSID:       low.js@ESP32 C82B96883FD8
Password:   bdj0DPkP2nDW
In this Wifi, the microcontroller has the IP 192.168.0.1

I also have tried to follow the steps and flash my device in Ubuntu 20 and MacOS Big Sur with same version configuration (Node, Lowsync, Python, etc) and I always stuck trying to access 192.168.0.1 with same results

ThomasRogg commented 3 years ago

If it does not work at all, on any configurations, it must be the device. Maybe Flash is broken in the higher bytes. I do not know. Do you have another device to test?

Thank you.

ivanpajon commented 3 years ago

Yes I have other device, but I have only 1 license for lowjs pro. Both devices I have works properly with lowjs normal.