Tensorflow Lite MicroPython support - I cannot use Pycom modules?
-
Hi guys,
I am using FiPy board on which I uploaded a new firmware that supports TensorFlow Lite features. I want to test the person detection model but for me that's not possible as I always get the message that modules, which I can use without problems with Pymakr, are not supported with this new firmware. Do you maybe know if I can fix this, or I must consider new modules (for LoRA lets say)?
Thanks in advance. Cheers! :D
-
@Adnan-Sabovic-0 A firmware which is not built for FiPy will not have the modules for the FiPy additional I/O devices, like LoRa or LTE. The Tensorflow firmware which you mentioned in the other post is for a generic ESP32 module, so no support for Pycom modules.
Pymakr is not the board. It is an IDE supporting you to use Pycom products, and it assumes that Pycom firmware is loaded to the target boards. -
@robert-hh So in that case, all modules supported by generic ESP32 can be used with TensorFlow Lite firmware? Yes, I know, just mentioned as a potential description of my issue (Pymakr will support all modules included in Pycom firmware). In the end, is it possible to use LoRaWAN with this implementation that I have right now?
-
@Adnan-Sabovic-0 If I understand it right, the tensorflow firmware includes the generic MicroPython firmware from micropython.org, dated Jan 27, NOT from Pycom. The micropython.org firmware from does NOT support anything beyond the ESP32 components. So no LoRa, no LTE. And you have to refer to their documentation for using the board.
If you want to use LoRa, you have to find a Python module that provides it, and adapt it to the board. -
@robert-hh Aha okay I understand. Then I will focus more on the generic MicroPython implementation and try to find some solutions there. Thanks anyway!
-
@robert-hh Do you maybe know how to fix issue with repl connection. I am not able to connect to repl when esp32 board is connected to my PC. I think that I tried everything that I found on web but it is not possible to connect it. Every time same message:
Using buffer-size of 32 Connecting to /dev/ttyUSB0 (buffer-size 32)... Trying to connect to REPLDo I need to connect some extra wires or what? It's a new board, I do not believe it's already damaged.
Cheers! :)
-
@Adnan-Sabovic-0 Which software do you use for REPL?
Simple tools like Putty or Teraterm should work. -
@robert-hh I want to connect using rshell as we talked in my previous post. I want to use rshell to upload files on esp32 and then run the example from repl, but it's not possible to connect it.
-
@Adnan-Sabovic-0 So you use a Linux System with a generic USB/UART FT232 adapter. I'm asking because only the /dev/ttyUSBx is the right port. Which devices do you see with
ls /dev/tty*
rshell is sometimes difficult to use. I prefer mpremote, which is faster and newer.
-
@robert-hh By typing ls /dev/tty* or dmesg | grep tty I can find my board:
/dev/ttyUSB0And this is the output from mpremote (when I type mpremote in Ubuntu terminal):
rst:0x3 (SW_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0030,len:4604 ho 0 tail 12 room 4 load:0x40078000,len:13872 load:0x40080400,len:3356 entry 0x4008061c E (56) flash_parts: partition 3 invalid - offset 0x300000 size 0xc65d40 exceeds flash chip size 0x400000 E (56) boot: Failed to verify partition table E (62) boot: load partition table error! ets Jun 8 2016 00:22:57Any idea how to solve this?
-
@Adnan-Sabovic-0 Like I answered in the Micropython forum: A reliable approach is performing a flash full erase using:
esptool.py --port /dev/ttyUSB0 --chip esp32 erase_flash
And the reinstall the firmware. That should fix the flash layout.
-
@robert-hh I did what you wrote here but again same issue. I performed a flash full erase and then installed again firmware and uploaded it on my board but again same error.
-
@Adnan-Sabovic-0 That's strange. After a full erase everything should come up straight again.
-
@robert-hh I really don't know. I tried everything but this is really hard to enable to work. Based on their suggestion on this link (https://github.com/mocleiri/tensorflow-micropython-examples/blob/main/examples/person_detection/README.md) the microlite-spiram-16m-esp32-firmware should be used with esp32. After error I thought it's quite heavy for my board and then tried a lighter version but again not possible to run anything on the board. For the lighter version of firmware I got this:
Rebooting... ets Jun 8 2016 00:22:57 rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0030,len:4604 ho 0 tail 12 room 4 load:0x40078000,len:13872 load:0x40080400,len:3356 entry 0x4008061c E (847) psram: PSRAM ID read error: 0xffffffff E (847) spiram: SPI RAM enabled but initialization failed. Bailing out. E (10) spiram: SPI RAM not initialized -
@Adnan-Sabovic-0 If 16m in the firmware name indicates 16MByte flash, then the firmware is wrong. FiPy has 8MB flash. So you need the matching firmware version.
-
@robert-hh I am not using FiPy right now. I ordered esp32-WROOM-32 to test as you suggested me to use pure MicroPython code (based on esp32). Because of that, I tried with 16MB firmware. With FiPy it works with "lighter" firmware but I want to test camera which is based on what I observed easier to do with esp32 board.
-
@Adnan-Sabovic-0 The WROOM-32 module has 4 MB Flash and no SPIRAM. So you have to use the MICROLITE version.
-
@robert-hh I just checked that, but are there any products with 8/16 MB Flash and SPIRAM as well. I also saw that they use esp32 cam. Is there classic esp32 cam with additional MB module and integrated camera is enough to support the proposed firmware (MICROLITE SPIRAM CAM)?
-
@Adnan-Sabovic-0 The must be hundreds of different ESP32 modules available. You have to Search. The first which I found was a esp32-CAM module, with 4 MB flash and 4 MB SPIRAM + camera.
-
@robert-hh Yes, indeed. Sit and search :)
Thanks for help!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login