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

    Exp Board 2.0 serial communication problem

    Scheduled Pinned Locked Moved Expansion Board
    expansion boardcom portftdi
    45 Posts 3 Posters 8.3k 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.
    • S Offline
      szyba91 @robert-hh
      last edited by

      @robert-hh Yes, the both FiPys its self works with V3 board and sure - i removed jumper after updating

      1 Reply Last reply Reply Quote 0
      • danD Offline
        dan
        last edited by

        Hi @szyba91,

        Just to confirming, when you switch between the expansion boards, you change the address in VSCode, right? (you can check it in the pymakr.conf file or the plugin settings. All commands -> 'Pymakr > Project | Global Settings')
        Can you share your VSCode's and Pymakr plugin's version number?

        S 1 Reply Last reply Reply Quote 0
        • S Offline
          szyba91 @dan
          last edited by

          @dan Yes, I've been changing serial port numbers.
          I have:

          FiPys firmware version1.18.0.r1
          Visual Studio version 1.25.1
          Atom version: 1.29.0
          Pymakrs version 1.0.1
          Jumpers : RTS and CTS are removed, rest of them is on its place
          Windows 10 64bit
          The same on
          Ubuntu 16.04 LTS

          1 Reply Last reply Reply Quote 0
          • S Offline
            szyba91 @robert-hh
            last edited by szyba91

            @robert-hh Update : I've noticed something. When i was trying to upload this code
            https://github.com/pycom/pycom-libraries/blob/master/examples/lopy-lopy/lopy-A/main.py

            Just near to end I've got the masseage form terminal something like this :" Pybytes library: v0.9.0" and that it stacks. And after it I can't reach the COM anyway.
            What is interesting - I've lost connection with v3 now, then I've try with v2 (i was sure that it also be unreachable beacuse I had a problem with it before) Just imagine how supprised I was when I saw REPL on this board!
            Again - I trid to upload the same code on this board, and unfortunately after makaing the same it also stacks.

            I'm very confused now. Does anyone knows what is happning with this modules?

            robert-hhR 1 Reply Last reply Reply Quote 0
            • robert-hhR Offline
              robert-hh @szyba91
              last edited by

              @szyba91 Sorry I cannot tell you anything about working with VSC /Atom pymakr plugins or pybytes. I do not use these "tools". For uploading and file management on the devices I use ftp. The expansion boards, epscially V2.0, are dead simple devices. They should always work.

              1 Reply Last reply Reply Quote 0
              • S Offline
                szyba91
                last edited by

                Update : I just connect exp boards without FiPys. I was courious what will happend when i bridge TX i RX(physical pins 40 and 41) pin on board (should be an echo right?) and i've got echo. So boards it self works.
                Now i'm connect the fipy via USB-UART concerter and I can't reach the REPL on both FiPys :( :(

                robert-hhR S 2 Replies Last reply Reply Quote 0
                • robert-hhR Offline
                  robert-hh @szyba91
                  last edited by

                  @szyba91 The USB/UART bridge must be set to 3.3 V output. And sometimes TX/RX has to be swapped. Please not also that the typcial USB/UART switch cannot supply a FiPy. The simply deliver not enough power.

                  1 Reply Last reply Reply Quote 0
                  • S Offline
                    szyba91 @szyba91
                    last edited by

                    @szyba91 Now i've connected the fipy and exp board together and there is no REPL but when i push Reset rutton i'm having this:

                    rst:0x1 (POWERON_RESET),boot:0x12 (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:1
                    load:0x3fff8028,len:8
                    load:0x3fff8030,len:1728
                    load:0x4009fa00,len:0
                    load:0x4009fa00,len:14584
                    entry 0x400a059c
                    Pybytes library: v0.9.0

                    And it stucks and this command during code uploding. I'm using PuTTY

                    robert-hhR 1 Reply Last reply Reply Quote 0
                    • robert-hhR Offline
                      robert-hh @szyba91
                      last edited by

                      @szyba91 In putty, you have to disable flow control. It is in the Serial/conection tab.

                      S 1 Reply Last reply Reply Quote 0
                      • S Offline
                        szyba91 @robert-hh
                        last edited by

                        @robert-hh No change after disable flow control. Maybe I have to wait longer to see >>> because it doesn't stuck?

                        robert-hhR 1 Reply Last reply Reply Quote 0
                        • robert-hhR Offline
                          robert-hh @szyba91
                          last edited by robert-hh

                          @szyba91 No, the prompt should show up immediately. If you do not care what's in the flashof the device, try installing the standard firmware again (stable, no pybytes) with the option to erase the flash first, at least to erase the filesystem.

                          S 1 Reply Last reply Reply Quote 1
                          • S Offline
                            szyba91 @robert-hh
                            last edited by

                            @robert-hh It worked ! You are the best :) As for updates now i've marked the "Erese flsh file system" (I havnt markd it on my previous updates) and I've chosen type :"stable" I had i 'pycom" before.
                            Is it correct?

                            robert-hhR 1 Reply Last reply Reply Quote 0
                            • robert-hhR Offline
                              robert-hh @szyba91
                              last edited by

                              @szyba91 I think you marked "pybytes" before. "Stable" is the basic version.

                              S 1 Reply Last reply Reply Quote 0
                              • S Offline
                                szyba91 @robert-hh
                                last edited by

                                @robert-hh I've noticed that FiPy is getting stack when I'm uploading code. Now i uploaded the simple RGB led blink and I can see the result but it is also stucking:
                                rst:0x1 (POWERON_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:1
                                load:0x3fff8028,len:8
                                load:0x3fff8030,len:1728
                                load:0x4009fa00,len:0
                                load:0x4009fa00,len:14584
                                entry 0x400a059c

                                After last command I can't see the REPL, firmer update helps but it seams that code had been uploded correctly.

                                robert-hhR 1 Reply Last reply Reply Quote 0
                                • robert-hhR Offline
                                  robert-hh @szyba91
                                  last edited by robert-hh

                                  @szyba91 When you upload code in main.py that will run infinitely, you will not get a REPL prompt. This prompt will be presented AFTER main.py is finished.
                                  Edit: During boot, roughly the following steps are executed.

                                  1. Initialize the device
                                  2. Run _boot.py from frozen bytecode
                                  3. Run _main.py from frozen bytecode
                                  4. Run /flash/boot.py from the filesystem
                                  5. Run /flash/main.py from the filesystem
                                  6. Start REPL and show it's prompt.
                                  S 1 Reply Last reply Reply Quote 0
                                  • S Offline
                                    szyba91 @robert-hh
                                    last edited by

                                    @robert-hh said in Exp Board 2.0 serial communication problem:

                                    During boot, roughly the following steps are executed.

                                    But it isn't normal that after uploading code I can't reach REPL prompt ? Because its happnes.

                                    robert-hhR 1 Reply Last reply Reply Quote 0
                                    • robert-hhR Offline
                                      robert-hh @szyba91
                                      last edited by

                                      @szyba91 That depends on what is in the main.py you just uploaded. And if you upload with ftp, the REPL prompt stays until evetually you reset the device, at whih time the normal sequance is executed (see below).
                                      Since I do not know what Pymakr/VSC does, it may lock the device or force a safe boot, such that it requires a hard reset to run again with the intended sequence.

                                      S 1 Reply Last reply Reply Quote 0
                                      • S Offline
                                        szyba91 @robert-hh
                                        last edited by

                                        @robert-hh Could you provide me some information about your tools to programe fipy? What I've know you have Filezilla and using FTP serever and simple terminal like PuTTY aslo.

                                        Is there any manual how set up this step by step ? I've been trying to folow the PyCom doucumentation but When i try to connect to 192.168.4.1 is unreachable.

                                        How can i uplode the code in your way without using Atom or VSCode ?

                                        robert-hhR 1 Reply Last reply Reply Quote 0
                                        • robert-hhR Offline
                                          robert-hh @szyba91
                                          last edited by

                                          @szyba91 For connecting via FTP, you have also to connect "the WLAN wire", meaning, your PC has either to attach to the access point created by the FiPy, or the FiPy has to join the WIfI network you are using with the PC.
                                          By default, the FiPy creates an Access point with the name <forgot the name> and the password "micropythoN". When you attach to that, the FiPy assignes an IP address to your PC and is itself available with the IP address 192.168.4.1. You can then ftp to that address.
                                          For the FiPy to acess your WiFi network it requires a short script in your FiPy's boot.py or main.py. This is from the examples & should work.

                                          from network import WLAN
                                          wlan = WLAN(mode=WLAN.STA)
                                          
                                          nets = wlan.scan()
                                          for net in nets:
                                              if net.ssid == 'mywifi':
                                                  print('Network found!')
                                                  wlan.connect(net.ssid, auth=(net.sec, 'mywifikey'), timeout=5000)
                                                  while not wlan.isconnected():
                                                      machine.idle() # save power while waiting
                                                  print('WLAN connection succeeded!')
                                                  break
                                          

                                          The trick is to get that into the device. You can enter them manually into the REPL prompt. The required statements are:

                                          from network import WLAN
                                          wlan = WLAN(mode=WLAN.STA)
                                          wlan.connect('myssid', auth=(WLAN.WPA2, 'mywifikey'), timeout=5000)
                                          print("WLAN connected: ", wlan.isconnected())
                                          
                                          robert-hhR S 2 Replies Last reply Reply Quote 2
                                          • robert-hhR Offline
                                            robert-hh @robert-hh
                                            last edited by

                                            @robert-hh Sorry, the AP password is "www.wipy.io"

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

                                            Pycom on Twitter

                                            Pycom