UIFlow Desktop on MacOS mojave 10.14.5 cannot connect to Faces Dev Kit



  • Howdy, everyone!

    M5Stack noob here. I've recently started playing with my M5Stack Faces Dev Kit. The device seems to work correctly. It boots into the micropython repl.

    0_1588547609425_IMG_8453.jpg

    I've downloaded and installed the latest MacOS driver from silabs (https://www.silabs.com/products/development-tools/software/usb-to-uart-bridge-vcp-drivers), and then installed the latest uiFlow Desktop IDE.

    With the device connected to my Mac via the provided cable, when I open the IDE, it lists the device, but fails to connect.

    0_1588548180327_uiflow-ide-list-device.png

    0_1588548186519_uiflow-ide-error.png

    I'm not sure how to proceed now. Please let me know if there is any other information I need to provide.



  • You need to flash the latest uiFlow firmware with the M5Burner utility to use it with uiFlow.



  • Thanks, @world101! I was able to burn uiFlow v1.4.5.1 on the device and update it, using the burner app.

    Now, I'm able to connect to it from the desktop IDE via USB (when set in USB mode). I had to restart my Mac, though, for things to work.

    One problem, however, is that it still doesn't connect to the device in Internet mode, via flow.m5stack.com. After I enter the APIKEY displayed in the device screen, I keep getting the same Upload code failed... error in this mode.

    UPDATE 1: Looks like another user, @spoetnic, seems to be reporting a similar issue with the Internet approach (https://forum.m5stack.com/topic/1920/ide-crashes-after-startup-and-webide-cannot-connect-to-device-upload-code-failed-maybe-your-device-is-offline-check-it-and-retry/3), although they're on Windows.

    UPDATE 2: So, I updated the firmware to v1.5.1. Still have the same issue. Internet mode refuses to work.

    I setup mu-ide and connected to the device in USB mode, got a repl and ran the following commands:

    >>> import network
    
    >>> wlan = network.WLAN(network.STA_IF)
    I (51991) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
    I (51991) system_api: Base MAC address is not set, read default base MAC address from BLK0 of EFUSE
    
    >>> wlan.active(True)
    I (64675) phy: phy_version: 4102, 2fa7a43, Jul 15 2019, 13:06:06, 0, 0
    True
    
    >>> wlan.connect("My-WiFi-ESSID", "My-WiFi-Password")
    >>> I (267680) network: CONNECTED
    I (268594) network: GOT_IP
    
    >>> wlan.isconnected()
    True
    
    >>> wlan.ifconfig()
    ('192.168.0.14', '255.255.255.0', '192.168.0.1', 'XX.YY.ZZ.AA')
    
    >>> import urequests
    I (431608) modsocket: Initializing
    
    >>> urequests.get('https://www.google.com')
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
      File "libs/urequests.py", line 117, in get
      File "libs/urequests.py", line 54, in request
    IndexError: list index out of range
    >>> 
    

    It's clearly connecting to my WiFi, getting an IP, but unable to make requests.

    @lukasmaximus, please help!



  • @m5stack can someone please comment on the Internet connectivity issue ☝🏼? Is it working for anyone?



  • @indrajaal said in UIFlow Desktop on MacOS mojave 10.14.5 cannot connect to Faces Dev Kit:

    @m5stack can someone please comment on the Internet connectivity issue ☝🏼? Is it working for anyone?
    Internet access has been working ok for me but I may have been lucky. As there is only one server hosted in china (and one in singapore but we dont know how to switch between them) access can be problematic at certain times of the day as loads of people try to access the server.



  • https://flow.m5stack.com/ worked for me today. What country are you in? I know it can be unstable at times with the connection to the server in China. Did you try the Singapore server?

    When it fails for me, I just keep trying over and over until it works. Sometimes it takes 3-4 times for me. Also try to hit the refresh button at the bottom left of the UI to see if you get β€œconnected” before uploading your flow to the M5Stack.

    0_1588814874635_4D2CFA49-62D4-46CC-9901-38A0E5616CC7.jpeg



  • @world101, ok. I'll give it a couple of retries today. Will also try the Singapore server. I'm in the US, so it could very well be a latency/load issue.

    Was just trying to make sure nothing's wrong with my setup/device etc.



  • @world101, @ajb2k3 unfortunately, Internet mode consistently fails for me. I've tried both servers (CN, SG)--no dice.

    One thing I noticed is that the web IDEs show v1.4.5/v1.4.4 respectively, for CN and SG, but my device is on v1.5.1. Although, I was having this issue with v1.4.5 on the device as well, so maybe that's not the problem.

    Is there any other way to debug these kinds of issues?



  • @indrajaal looks like you set everything up correctly and it seems as though you got a connection. I will be releasing a video later today on how to use the urequests module, be sure to check it out. As for the uiflow website, do make sure you are in internet mode first, I often forget and then wonder why its not connecting, there can be some server issues at times but as @world101 suggests you'll need to persist. Otherwise use the offline version with 1.4.5 firmware, if you are creating an IoT project be sure to use the network blocks at the start of your program to establish a connection.



  • @lukasmaximus thanks for verifying that my setup is correct. Will check out the urequests video as well.

    Fortunately, USB mode is working for me, so, for now, I'll just use that to play around with my Faces dev kit.

    Thanks y'all for the help πŸ™πŸ½