Coder Social home page Coder Social logo

Comments (14)

gepd avatar gepd commented on May 30, 2024

@vlad2005 I'm preparing a new release where that bug is fixed, in the meantime

Open the file Packages/Deviot/libs/PlatformioCLI.py (ST Menu > Preferences > Browse Packages)

Replace the line 664:

if(port and "COM" not in port and "esp" not in mcu):

for

if(port and "esp" not in MCU and "tty" not in port and "COM" not in port):

from deviot.

ubidefeo avatar ubidefeo commented on May 30, 2024

ha!
same thing happens on Mac.
thanks for the heads up, @gepd :)

from deviot.

ubidefeo avatar ubidefeo commented on May 30, 2024

Your fix doesn't seem to work on Mac. Bummer :D

from deviot.

ubidefeo avatar ubidefeo commented on May 30, 2024

I've been playing with it a little and it seems to also always return ATTINY85 from self.getMCU()
selected = env_data[0]['mcu'], I suppose

how would I revert to the previous build of DevIoT?
it worked great :)

from deviot.

vlad2005 avatar vlad2005 commented on May 30, 2024

@gepd
I tried your suggestion but got error (relevant part):
NameError: global name 'MCU' is not defined

LE:
I change to this (MCU -> mcu):

if(port and "esp" not in mcu and "tty" not in port and "COM" not in port):

I got error:
08:36:47 Uploading firmware | avrdude: ser_open(): can't open device "/dev/ttyS0": Permission denied`

My usb to serial adapter is on /dev/ttyUSBx and have permision fixed using udev.
After that started editor as superuser. Then got this error:
08:41:03 Uploading firmware | avrdude: ser_open(): can't set attributes for device "/dev/ttyS0": Inappropriate ioctl for device
So what to do next?

from deviot.

gepd avatar gepd commented on May 30, 2024

Sorry about that guys, please download this pre-release, you shouldn't keep seeing that error.
If you find any other problem, I'll thank your report, I'm doing the last tests before the launch.

PD: You only need to unzip the file and overwrite Deviot in the in Packages folder

from deviot.

ubidefeo avatar ubidefeo commented on May 30, 2024

Thanks, @gepd , I'll give it a shot.
meanwhile I found that the culprit in my case is that json.loads() doesn't seem to return a dict but just leave the JSON structure intact, hence returning the first item env_data[0] which is

{
        "id": "trinket3",
        "url": "http://www.adafruit.com/products/1500",
        "platform": "atmelavr",
        "vendor": "Adafruit",
        "rom": 8192,
        "fcpu": 8000000,
        "ram": 512,
        "mcu": "ATTINY85",
        "name": "Adafruit Trinket 3V/8MHz",
        "frameworks": [
            "arduino"
        ]
}

I'll let you know how this release handles it :)

from deviot.

ubidefeo avatar ubidefeo commented on May 30, 2024

ok!
had to do some cleanup but at some point it worked.

what I did:

  • disable keep temp files
  • clean
  • delete platformio.ini
  • quit Sublime Text 3
  • launch Sublime Text 3
  • select board
  • select serial port
  • build
  • upload

it works now!
thank you for your support, @gepd :)

from deviot.

vlad2005 avatar vlad2005 commented on May 30, 2024

Thanks for your work!

  1. is better to delete Deviot file form this location:
    ~/.config/sublime-text-3/Packages/User/
  2. I fixed the permision problem by adding user to groups uucp and dialout
    sudo usermod -a -G uucp,dialout username
  3. Now just works :)

P.S. I noticed a little problem. After upgrading menu disappeared, offering only option to change the language. After I selected the "English" menu reappeared.

Big thanks!

from deviot.

gepd avatar gepd commented on May 30, 2024

Thanks for your reports guys, the last platformio update changed some json structure so it broke some things.
I'm doing now the test to avoid all that reset stuff.

from deviot.

gepd avatar gepd commented on May 30, 2024

The last release is available now (1.2.3)
Any problem with the menu should be recovered automatically (If isn't recovered restart ST will do it)

Thanks for your feedback!

from deviot.

ubidefeo avatar ubidefeo commented on May 30, 2024

sorry to post on this one again, @gepd
I checked the code for the latest release, and there's one more issue about the if condition in mDNScheck()

on Mac, there's by design an alias for the tty port which is cu.SERIAL_PORT_ID, hence in the list you'll always have that port as well, but it's not handled by your if statement, hence causing that same OTA error.

the condition should be

if("esp" not in MCU and "tty" not in PORT and "cu" not in PORT and "COM" not in PORT):

the cu.* alias is the first one displayed in the list (see attachment), hence you can accidentally pick that if you don't know about the condition.

screen shot 2016-08-26 at 15 08 46

from deviot.

gepd avatar gepd commented on May 30, 2024

Thanks again @ubidefeo,

I've fixed this to the next release, if you have any problem or to make sure you don't get that error replace the if by:

from re import search
if(search(r"[\d{3}\.]{3}", PORT) is not None and "esp" not in MCU.lower()):

Now is checking if the port is an IP instead to check the serial ports

from deviot.

ubidefeo avatar ubidefeo commented on May 30, 2024

interesting solution :)
thank you

from deviot.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.