@shadowdoggie Same doubt here. Did not find any UIflow2 hardware driiver for this unit. Is there an example code availabe for UIflow, or uPython?
Posts made by falbriard
-
RE: RF433 TX and UIFlow
-
RE: Remote Sensing with Core2 (UIFlow) via LORA Point-to-point
@crami25 My sensor locations are out in the bush, where no cell signal, nor LoraWan gateway is available. LORA 9xx might be able to connect
env. data aquisition, or do emergency signal calls. -
RFID2 tag writer using UIflow2, or mpy
My hardware platform is a Cardputer. I would appreciate to get a working mpy code example, or UIflow2, that shows how to format the data and write it onto an RFID tag with RFID2 unit. Getting an error when using the bytearray data format during a write operation. Please also clarify the addressing scheme and length of the data chunks for write operations.
-
Battery Monitor at Cardputer UIFlow2 Hardware Functions?
At Cardputer and UIFlow2 firmware, does it deliver a "Power" function for battery monitoring? Not able to find the power function under 2.0.1 firmware. It is also not part of the optional hardware modules. Thanks for support.
-
RE: MQTT and AWS IoT Support in UiFlow 2.0
@falbriard Sorry, I found MQTT services as an optional software choice available under UIFlow2 and among other useful network services. Thanks.
-
RE: MQTT and AWS IoT Support in UiFlow 2.0
MQTT protocol support is essencial for IOT and should be part of the UIFlow2 blockly code. In the M5 core2 and UIFlow version 1, I've used it extensively for collecting sensor data together with the MQTT Adafruit server and Python API data functions (select criteria, delete).
-
RE: Error at NTP module on UIFlow2 and Cardputer: Missing timezone
I observe that there seems to be an NTP init step at the begin of the default UIFlow2 firmware startup, as the required arguments are part of the burn and configuration options. There is no more NTP section in the UIFLow2 blocks but a so called “Time” section thats delivers the “set timezone” command, which is in error. Please confirm the NTP was moved into the firmware and "Time" and also check why the “timezone” module was not loaded by the firmware. Thanks for support. Shouldn't there be a mandatory Wifi connection setup before issuing an NTP request? Further, I got NTP data but with strange return values like: 2054,2,20,12,11.. . Why?
-
Error at NTP module on UIFlow2 and Cardputer: Missing timezone
Set timezone: GMT-3 on Blockly throws error:
AttributeError: 'module' object has no attribute 'timezone'Please advice.
-
RE: UIflow 2.0.1 on Cardputer not booting
@ajb2k3 Thanks, got it working with the black USB cable of the Core2 device. The sequence used was: reset on the Cardputer, connect USB cable, burn, erase, configure, back to burn, take note of MAC address and login pairing, again burn until completion. The device will boot at completion message. Next steps are: to make it talk to UIflow2 programs via serial, or Wi-fi link run function.
-
RE: UIflow 2.0.1 on Cardputer not booting
Still getting a black screen after the burn. I've resett
ed the Cardputer, then called burn, erase (ok), configure with the final firmware transfer (ok, green confirmation message), disconnected the USB C cable, power-on which shows no display message, just a black screen. The same with the reset button, short or long press. UIflow2 version is 2.0.1 and ESP32 FN8. Any idea is welcome. -
UIflow 2.0.1 on Cardputer not booting
Was able to install latest M5burner and download, configure, burn the image on the Cardputer device. After that the firmware does not activate. Other demo apps worked perfectly. Any hints How to fix It?
-
Remote Sensing with Core2 (UIFlow) via LORA Point-to-point
Could you give me some insights about which LORA radio model to choose for point-to-point communication, at 3 km in a remote sensing application. There is no LORAWan gateway network available. I’m using two M2 Core2 at the endpoints. Would prefer to implement a MQTT data transfer under a Blockly MicroPython function.
-
Re: [RFID2 unit not working with UIFlow 1.12.5 / Core2 Burn 1.9.8]
Re: [RFID2 unit not working with UIFlow 1.12.5 / Core2 Burn 1.9.8]
Meanwhile I've isolated the issue. The error cause was not the M5 RFID2 device, but it was the format of my RFID tags. In order to the reader/writer work properly, the tag format must be ISO 14443-3A Mifare Classic 1K. To validate the tag format I used the Android NFC Tools. -
RFID2 unit not working with UIFlow 1.12.5 / Core2 Burn 1.9,8
I have an RFID reader device model "RFID2", default port A(33,32) programmed by UIFlow 1.12.5. I also did a new burn ate the M5burner with image 1.9.8. The tutorial explains:
"RFID2 compared to the previous generation RFID UNIT only makes the replacement of read and write IC (RC522->WS1850S), there is no difference in function.The product has been discontinued."The RFID "card near" and "card uid" functions are working OK, but no read, or write string at address 1, or other addresses. It gives a blank return information. Any hint how to fix it?
-
RE: RFID2 Unit and Core2 Processor
@falbriard An attempt to write a logic with Blockly & MicroPython code (via UIFlow), able to store up to 1000 characters on a RFID tag:
# by Claude Falbriard - QcLab Brazil # RFID tag with RC522 layout from m5stack import * from m5stack_ui import * from uiflow import * import time import unit screen = M5Screen() screen.clean_screen() screen.set_screen_bg_color(0x000000) rfid_0 = unit.get(unit.RFID, unit.PORTA) inputsrt2 = None elecounter = None alldata = None inputstr1 = None inputdata = None inputstr4 = None cardready = None label0 = M5Label('RFID Reader', x=10, y=10, color=0xf5f2f2, font=FONT_MONT_14, parent=None) text_2 = M5Label('text_2', x=10, y=113, color=0xb1ed94, font=FONT_MONT_14, parent=None) text_4 = M5Label('text_4', x=10, y=138, color=0xccf1a6, font=FONT_MONT_14, parent=None) debug1 = M5Label('Debug: ', x=10, y=226, color=0xf09a9a, font=FONT_MONT_14, parent=None) alldata_label = M5Label('alldata', x=10, y=170, color=0xdff2d7, font=FONT_MONT_14, parent=None) inputd1 = M5Label('input data', x=10, y=48, color=0xe8f081, font=FONT_MONT_14, parent=None) text_1 = M5Label('text_1', x=10, y=88, color=0xcbeeb9, font=FONT_MONT_14, parent=None) elecounter = 0 # constructing an RFID RC522 compliant data writer # https://www.blindtextgenerator.com/lorem-ipsum # generate a string with max length of 1000 characters ipsumstr = """Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. In enim justo, rhoncus ut, imperdiet a, venenatis vitae, justo. Nullam dictum felis eu pede mollis pretium. Integer tincidunt. Cras dapibus. Vivamus elementum semper nisi. Aenean vulputate eleifend tellus. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Aliquam lorem ante, dapibus in, viverra quis, feugiat a, tellus. Phasellus viverra nulla ut metus varius laoreet. Quisque rutrum. Aenean imperdiet. Etiam ultricies nisi vel augue. Curabitur ullamcorper ultricies nisi. Nam eget dui. Etiam rhoncus. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. N""" # chop test data string to 256 bytes ipsumstr = ipsumstr[:256] # split a text into 16 bytes elements, max size = 1000 def split_by_n(seq, n): '''A generator to divide a sequence into chunks of n units.''' while seq: yield seq[:n] seq = seq[n:] rc522list = list(split_by_n(ipsumstr, 16)) blkcount = len(rc522list) # process list by RC522 element max 1000 char validptr = [1,2,4,5,6,8,9,10,12,13,14,16,17,18,20,21,22,24,25,26,28,29,30,\ 32,33,34,36,37,38,40,41,42,44,45,46,48,49,50,52,53,54,56,57,58,\ 60,61,62,64,65,66,68,69,70,72,73,74,76,77,78,80,81,82,84,85,86] keyptr = [3,7,11,15,19,23,27,31,35,39,43,47,51,55,59,63,67,71,75,79,83] while True: alldata = '' inputstr1 = '' inputsrt2 = '' inputdata = '' inputstr4 = '' cardready = False wait(1) debug1.set_text('start reading ...') if rfid_0.isCardOn(): debug1.set_text('card found') inputdata = rfid_0.readUid() speaker.playTone(740, 1/2) inputd1.set_text(str(inputdata)) elecounter = 0 for ele in rc522list: blkdata = ele blkaddr = validptr[elecounter] rfid_0.writeBlock(blkaddr,blkdata) elecounter += 1 wait_ms(400) # read data only for debug inputstr1 = rfid_0.readBlockStr(1) inputsrt2 = rfid_0.readBlockStr(2) inputstr4 = rfid_0.readBlockStr(4) # all data stored on tag for blkcount in range (0,elecounter): blkaddr = validptr[blkcount] record = rfid_0.readBlockStr(blkaddr) alldata += record if inputdata == '1e1cb67cc8': power.setVibrationIntensity(80) power.setVibrationEnable(True) wait(0.5) power.setVibrationEnable(False) # show data for debug and validation text_1.set_text(str(inputstr1)) text_2.set_text(str(inputsrt2)) text_4.set_text(str(inputstr4)) alldata_label.set_text(str(alldata)) wait(2)
-
RE: RFID2 Unit and Core2 Processor
Using the UIflow code, I wrote data into the RFID addr 1, 2 and 4. Checking the result with Android "NFC Tools", function "Read Hex Memory" I see all the data written into the corresponding sectors in a hex format.
"addr 1" is "sector 0, Block 1"
"addr 2" is "sector 0, Block 2"
"addr 4" is "sector 1, Block 0"
...My guess is that the following write sequence will preserve the formatted key addresses
and make good use of the available Mifare tag memory space, organized in 16 bytes blocks.
The resulting addressing table for writing data is:Data addr: 1,2,4,5,6,8,9,10,12,13,14,16,17,18,20,21,22 .. etc
reserved
UID addr: 0
Key addr: 3,7,11,15,19,23 .. etc -
RE: RFID2 Unit and Core2 Processor
@falbriard Might be useful to illustrate the topic, attached you find the RC522 Mifare tag memory layout.
-
RFID2 Unit and Core2 Processor
I've bought an RFID2 reader/writer unit which I connected to the M5 CORE2 processor.
Using the web based UIFlow, I do not see a specific unit type RFID2 to add to the unit list. For this reason I've added the default RFID and the basic functions are OK and support functions like "card near", tag ID, read and write from address x, like 1. With few UIflow commands and a logic loop I was able to build a basic RFID Tag reader & writer and also to get the UID information.
Please clarify in some more depth the use of read from "addr" and write to “addr”.
My guess is that "addr" means sector number, where we find 16 sectors each constructed with 4 blocks, as shown in the memory reader of the "Android NFC Tools – function Memory Hex". There are 3 blocks of data, each 16 characters long, followed by one block of keys.
Sector 0 is used for UID.Sector 0 → UID
Sector 1 → Data1
Sector 2 → Data2
Sector 3 → Key
Sector 4 → Data3, etcMy doubt: By writing into "addr" 3, does it overwrite the key in sector 3, or does it write into sector 4 data field, by this preserving the key address? Overwriting a key field possibly would destroy the default RFID tag format. Hope there is code example available for this topic. Below see a hardcopy of my code:
-
RE: Core 2 unit with M5Go2, Serial Port C and external Elechouse RFID V 1.2
@felmue You are right, it seems to be a voltage mismatch. The UART requests 5V, but ESP32 delivers only 3.3V.
Reading: "On-board level shifter, Standard 5V TTL for I2C and UART, 3.3V TTL SPI"
Find more: https://manuals.plus/elechouse/pn532-nfc-rfid-module-manual#introduction
Time to buy a M5stack reader unit and use the standard UiFlow drivers. Thanks! -
Core 2 unit with M5Go2, Serial Port C and external Elechouse RFID V 1.2
On a Core 2 unit with M5Go2 bottom, I need to connect an external RFID board (Elechouse) but its not working yet, just getting a "None" or b'x\00' data return.
The connection is UART based using Port C (Blue), Pins TXD2 14, RXD2 13 : Supports UART with 115200 data rate configured to UART2). In order to test the Core2 side I did loop configuration sending RX to TX with a jumper wire and I worte a string "Testing_Serial" by an UART write command. This worked fine. When connecting the external board I get back a string with b'x\00'. The wires to the external device are crossed TX->RX, RX<-TX and the two power wires. Not sure, if there is a command sequence required to activate the data transmission and RFID data readout at the device. The board is reading tags and is blinking. Any insight are welcome.