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

    Not feeling the love : Pymakr will not sync project to LoPy

    Scheduled Pinned Locked Moved Pymakr
    4 Posts 2 Posters 1.9k Views 3 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.
    • N Offline
      nurquhar
      last edited by nurquhar

      I am not feeling the love of 5-10 faster development so far in my experience of pycom. Certainly when compared numerous other other emdedded IDE's and dev boards.

      My latest stumbling block with getting going with LoPy is that I can't get PyMakr to sync a simple test project to the LoPy. I could progress on with using FTP and Telnet instead but this is more clunky and a slower development approach.

      So to the issue when syncing, I see this in console :

      >>> 
      
      Syncing the project with the LoPy. Please wait...
      Syncing failed!
      
      Lost connection with the LoPy! (click to attempt to reconnect)
      Connecting to a LoPy...
      Error while communicating with the LoPy! (click to attempt to reconnect)
      Connecting to a LoPy...
      Connected
      >>> 
      

      And this on my usb/serial putty session

      >>> import os; [os.uname().sysname, os.uname().machine, os.uname().release]
      ['LoPy', 'LoPy with ESP32', '1.5.0.b1']
      >>>
      >>>
      >>>
      >>>
      >>>
      >>>
      >>>
      >>>
      >>>
      >>>
      raw REPL; CTRL-B to exit
      >OK>
      MicroPython v1.8.6-409-gc86bfcc on 2017-01-27; LoPy with ESP32
      Type "help()" for more information.
      >>> import os; [os.uname().sysname, os.uname().machine, os.uname().release]
      ['LoPy', 'LoPy with ESP32', '1.5.0.b1']
      >>>
      >>>
      

      I have the latest firmware loaded on the LoPy 1.5.0.b1 and I am using PyMakr 1.0.0.b8.

      I have this in my boot.py, note I haved added the fix to stop the connection being lost after a soft boot.

      # NAU - 25/01/17
      from network import WLAN
      import machine
      import os
      
      uart = machine.UART(0, 115200)
      os.dupterm(uart)
      
      wlan = WLAN(mode=WLAN.STA)
      nets = wlan.scan()
      if machine.reset_cause() != machine.SOFT_RESET:
      	for net in nets:
      		if (net.ssid == 'KITCHEN') or (net.ssid == 'DINING') or (net.ssid == 'BTHOMEHUB') :
      			print('Found Network : ' + net.ssid)
      			wlan.connect(net.ssid, auth=(net.sec, '................'), timeout=5000)
      			while not wlan.isconnected():
      				machine.idle() # save power while waiting
      			print('WLAN connection succeeded!')
      			break
      

      So is something broke or am I using it incorrectly in someway ??

      J 1 Reply Last reply Reply Quote 0
      • J Offline
        jmarcelino @nurquhar
        last edited by

        @nurquhar
        Are you trying to use Putty and Pymakr at the same time by any chance?

        You can't have two applications trying to use the same serial port at the same time, you'll have to close Putty to use Pymakr and vice-versa.

        1 Reply Last reply Reply Quote 1
        • N Offline
          nurquhar
          last edited by

          The Putty connection is via serial. I have set the preferences in PyMakr to recognize my LoPy via its machine name (ie via TCP/IP) . The console window is working so I know its connected ok.

          Even if I close the serial Putty connection and try to sync I get the same problem.

          What I have just tried and does some to work is to change PyMakr to use the my COM port connection to the LoPy then I can get the sync to succeed.

          So it looks like syncing via TCP/IP is broken.

          1 Reply Last reply Reply Quote 0
          • N Offline
            nurquhar
            last edited by

            Ok, after the serial connection sync from PyMakr which worked I noticed I could no longer see by LoPy on the network. On investigation I find it seems to have changed my boot.py.

            Is this expected behavior ?? because if it is does not make sense. If syncing changes boot.py it is going remove my custom code to connect to my Wifi network. So syncing via Wifi is never going to work if it breaks the connection setup it is trying to use. It is in effect shooting itself in the foot.

            The serial sync change boot.py to this :

            # boot.py -- run on boot-up
            import os
            from machine import UART
            uart = UART(0, 115200)
            os.dupterm(uart)
            
            1 Reply Last reply Reply Quote 0

            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