Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Development environment feedback for multiple devices - ctel, curlftpfs, vscode,syslog, etc.

    Scheduled Pinned Locked Moved Software Tools
    pymakrbugother
    4 Posts 2 Posters 707 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      arthurlutz
      last edited by arthurlutz

      I'm developing on wipy2.0 and am having trouble finding the right setup to fit my needs, so I guess I'm going to describe my attempts to see if here on the forum we can share our experiences and tips around a decent dev environement for wipy (and possibly other pycom products), see https://forum.pycom.io/topic/2262/wipy-2-0-juggling-balls-protoyping about the projet itself (connect interactive juggling balls).

      setup

      The wipys connect to a local mqtt server (mosquitto)

      0_1534778366787_8df7ca9521618bce.jpg

      I can find their IP using nmap or watching the log on the mosquitto server

      0_1534778422765_Screenshot from 2018-08-20 17-15-49.png

      ctel - parallel telnet

      I successfully connect to the three wipy in parallel (it's part of clusterssh for anyone on debian/ubuntu) https://packages.debian.org/stretch/clusterssh or clusterssh.sourceforge.net

      ctel 192.168.0.22 192.168.0.21 192.168.0.17
      

      0_1534777749162_Screenshot from 2018-08-13 18-57-59.png

      One problem with ctel is that I can't use ctel's syntax that includes the username/password, if I do I have to retype the username/password, so I'm guessing the telnet session opens and then the username/password are asked instead of the standard telnet auth. I know this happens quite often on network switches, and there is a workaround using netmiko https://github.com/ktbyers/netmiko will we have to do this for pycom devices or any chance of seeing a proper implementation of the telnet cnx ?

      ctel and vscode

      When using ctel, it seems that I can't connect to the device using the vscode pycom console, any idea why ? Only one connection at once ? I've seen when using USB serial and telnet at the same time working.

      curlftpfs

      The sync mechanism in VSCode only works on one device at a time, so I though I would mount ftp on multiple folders and use rsync or something similar to upload new code. No luck on that front either. I get different directory listings and the FTP ends up timing out. http://curlftpfs.sourceforge.net/ and https://packages.debian.org/stretch/curlftpfs

      for i in 17 21 22; do mkdir wipy$i; curlftpfs ftp://micro:python@192.168.0.$i wipy$i; done
      

      First :

      0_1534778891823_Screenshot from 2018-08-20 17-18-08.png

      Second (no more flash subdir)
      0_1534778980273_Screenshot from 2018-08-20 17-18-27.png

      Third
      0_1534778997586_Screenshot from 2018-08-20 17-18-42.png

      remote logging

      I have usyslog https://github.com/kfricke/micropython-usyslog setup to log messages over UDP onto my dev machine which has rsyslog configured to receive syslog messages over the network, but I'm having some memory issues with that, so I kind of had to disable that logger. Any tips on that ?

      while loop

      I have a while loop to check on mqtt messages and act upon messages

      0_1534779259367_Screenshot from 2018-08-20 17-33-06.png

      But that ends up "blocking" the serial connection, so I have to ctrl-C it when I log on.

      0_1534779464134_Screenshot from 2018-08-20 17-33-37.png

      What's the right way of doing this ? Threads, async etc. tips are welcome.

      conclusion

      As you can see, I'm having trouble finding a comfortable setup to focus on my project. I'm aware that this is a long post and I can do a post per issue if needed. I hope we can share our tips on our setups here and get a better environment out of this awesome platform.

      1 Reply Last reply Reply Quote 1
      • A Offline
        arthurlutz
        last edited by

        Well... this didn't spark much conversation...

        John BairdJ 1 Reply Last reply Reply Quote 1
        • John BairdJ Offline
          John Baird @arthurlutz
          last edited by

          @arthurlutz Hi - I've only started really working with the Pycom modules in the past month or so and this is the first time I've seen this discussion. I'm having the same issue in trying to get an environment sorted out that works for handling multiple devices. When you're working with one at a time, the workflow is easy. Try working with half a dozen or more in the one project and the standard setup (I use VSC) just doesn't work. Simply changing serial ports all the time gets annoying. If our current project is accepted we could end up with the same codebase rolled out to hundreds of devices, but with each device having its own serial port, I'm not sure how we would manage that.

          I plan to work through your suggestions and try to figure out how to make it work for my case. If anyone has any ideas please share.

          1 Reply Last reply Reply Quote 2
          • A Offline
            arthurlutz
            last edited by

            Hi @John-Baird

            I hope you (and I) find a satisfying environment to work with these devices.

            Another project I've come across since then is balena (which used to be called resin) https://www.balena.io/ It's a very cool project, with almost everything open source and which can be self hosted.

            I talked about my use case on their forum https://forums.balena.io/t/edge-node-manager-for-wipy-micropython/2549 and someone replied with this https://github.com/Bucknalla/resin-pycom-ota project which I haven't had the time yet to try out. The idea is that you have a device that acts as and "edge manager", that device runs balena and whenever you upload new code (git commit & push) the edge device will update your pycom devices.

            1 Reply Last reply Reply Quote 1

            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
            • 1 / 1
            • First post
              Last post

            Pycom on Twitter

            Pycom