Avatar for hygy

hygy

Member since Oct 2015 • Last active Apr 2017
  • 5 conversations
  • 48 comments

Most recent activity

  • in General
    Avatar for hygy

    @Gordon Uh this is really cool! Thanks for it!!!

  • in ESP32
    Avatar for hygy

    This is what you wrote there:

    Then your timing is off - run the script again and push the boot button
    I just did a flash at --baud 460800 and it seemed to work fine.

    I tried pushing the Io0 button, and re run esptool.py but it does not help. Any other idea?

    Attached a pucture about the board.

  • in ESP32
    Avatar for hygy

    I just recieved my esp32 supporting board, soldered ESP-32S (blue one).

    when powering up i got this in a serial terminal:

    rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
    configsip: 0, SPIWP:0x00
    clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_d­rv:0x00,hd_drv:0x00,wp_drv:0x00
    mode:DIO, clock div:2
    load:0x3ffc0000,len:0
    load:0x3ffc0000,len:2568
    load:0x40078000,len:4092
    load:0x40098000,len:704
    entry 0x400981dc
    I (26) boot: Espressif ESP32 2nd stage bootloader v. V0.1
    I (33) boot: compile time 09:30:50
    D (54) boot: mmu set paddr=00000000 count=1
    D (54) boot: magic e9
    D (54) boot: blocks 04
    D (54) boot: spi_mode 02
    D (54) boot: spi_speed 00
    D (56) boot: spi_size 02
    I (60) boot: SPI Speed      : 40MHz
    I (65) boot: SPI Mode       : DIO
    I (69) boot: SPI Flash Size : 4MB
    I (74) boot: Partition Table:
    I (78) boot: ## Label            Usage          Type ST Offset   Length
    D (87) boot: load partition table entry from 4000(3f404000)
    D (95) boot: type=0 subtype=0
    I (99) boot:  0 factory          factory app      00 00 00010000 00100000
    D (109) boot: load partition table entry from 4020(3f404020)
    D (117) boot: type=1 subtype=1
    I (121) boot:  1 rfdata           RF data          01 01 00110000 00040000
    D (131) boot: load partition table entry from 4040(3f404040)
    D (139) boot: type=1 subtype=2
    I (143) boot:  2 wifidata         WiFi data        01 02 00150000 00040000
    D (153) boot: load partition table entry from 4060(3f404060)
    D (161) boot: type=ff subtype=ff
    I (165) boot: End of partition table
    I (170) boot: Loading app partition at offset 00010000
    D (177) boot: mmu set paddr=00010000 count=16
    D (183) boot: bin_header: 233 8 2 2 40080780
    I (189) boot: section 0: paddr=0x00000020 vaddr=0x00000000 size=0x0ffe8 ( 65512) 
    D (200) boot: found drom section, map from 00010010 to 3f400010
    I (208) boot: section 1: paddr=0x00010010 vaddr=0x3f400010 size=0x05b84 ( 23428) map
    I (220) boot: section 2: paddr=0x00015b9c vaddr=0x3ffbf100 size=0x0130c (  4876) load
    T�@�N@?��@T�@�N@?��@T�@�N@?��@T�@�N@?��@­T�@�N@?��@
                                                              e
                                                               K
    
                                                                
    
                                                                  r
    
                                                                   
    
                                                                     @I (280) heap_alloc_caps: Initializing heap allocator:
    I (280) heap_alloc_caps: Region 19: 3FFC040C len 0001FBF4 tag 0
    I (284) heap_alloc_caps: Region 23: 3FFE8000 len 00010000 tag 1
    check b=0x3ffc0418 size=130008 ok
    check b=0x3ffdfff0 size=0 ok
    check b=0x3ffe800c size=65508 ok
    I (306) cpu_start: Pro cpu up.
    I (310) cpu_start: Single core mode
    I (315) cpu_start: Pro cpu start user code
    rtc v112 Sep 26 2016 22:32:10
    XTAL 40M
    I (348) cpu_start: Starting scheduler on PRO CPU.
    D (350) nvs: init start=6 count=3
    D (353) nvs: nvs_open misc 1
    D (354) nvs: nvs_get_str_or_blob log
    frc2_timer_task_hdl:3ffc4290, prio:22, stack:2048
    tcpip_task_hdlxxx : 3ffc4ec4, prio:18,stack:2048
    phy_version: 123, Sep 13 2016, 20:01:58, 0
    D (486) nvs: nvs_open nvs.net80211 1
    D (486) nvs: nvs_get opmode 1
    D (486) nvs: nvs_get country 1
    D (487) nvs: nvs_get_str_or_blob sta.ssid
    D (491) nvs: nvs_get_str_or_blob sta.mac
    D (494) nvs: nvs_get sta.authmode 1
    D (497) nvs: nvs_get_str_or_blob sta.pswd
    D (501) nvs: nvs_get_str_or_blob sta.pmk
    D (505) nvs: nvs_get sta.chan 1
    D (508) nvs: nvs_get auto.conn 1
    D (511) nvs: nvs_get bssid.set 1
    D (514) nvs: nvs_get_str_or_blob sta.bssid
    D (517) nvs: nvs_get sta.phym 1
    D (520) nvs: nvs_get sta.phybw 1
    D (523) nvs: nvs_get_str_or_blob sta.apsw
    D (527) nvs: nvs_get_str_or_blob sta.apinfo
    D (531) nvs: nvs_get_str_or_blob ap.ssid
    D (535) nvs: nvs_get_str_or_blob ap.mac
    D (538) nvs: nvs_get_str_or_blob ap.passwd
    D (542) nvs: nvs_get_str_or_blob ap.pmk
    D (546) nvs: nvs_get ap.chan 1
    D (548) nvs: nvs_get ap.authmode 1
    D (551) nvs: nvs_get ap.hidden 1
    D (554) nvs: nvs_get ap.max.conn 1
    D (557) nvs: nvs_get bcn.interval 2
    D (561) nvs: nvs_get ap.phym 1
    D (563) nvs: nvs_get ap.phybw 1
    D (566) nvs: nvs_get ap.sndchan 1
    D (569) nvs: nvs_set_blob sta.mac 6
    D (583) nvs: nvs_set_blob ap.mac 6
    pp_task_hdl : 3ffc877c, prio:23, stack:8192
    get wifi mode: 2
    set wifi mode
    get wifi ap mac: 0A:C4:03:03:FB:68
    get wifi ap ssid: Ai-Thinker_ESP32_03FB68
    get wifi ap password: 12345678
    set wifi ap ...
    get wifi sta ssid: 
    get wifi sta password: 
    set wifi sta ...
    wifi start
    mode : softAP(24:0a:c4:03:fb:69)
    D (605) event: SYSTEM_EVENT_AP_START
    V (607) event: enter default callback
    dhcp server start:(ip: 192.168.4.1, mask: 255.255.255.0, gw: 192.168.4.1)
    V (617) event: exit default callback
    Ai-Thinker Technology Co. Ltd.
    Oct 13 2016 09:39:50
    start led blink task.
    start http server task.
    Welcome to use ESP-32S Module !
    Welcome to use ESP-32S Module !
    

    The last line is repeating...

    I press the reset and io0 and then release the reset, then io0, in serial terminal i got this:

    rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_­V2))
    waiting for download
    

    Then I try to flash it:

    hygy@hygy-ThinkPad-E450:~/work/espruino/­esp32/esptool(master % u=)$ ./esptool.py --port /dev/ttyUSB1 --baud 230400 write_flash -z --flash_mode dio --flash_freq 40m --flash_size 16MB 0x1000 ../bootloader.bin 0x10000 ../espruino_esp32.bin 0x8000 ../partitions_singleapp.bin 
    esptool.py v2.0-beta1
    Connecting....
    Detecting chip type... ESP32
    Uploading stub...
    
    A fatal error occurred: Invalid head of packet ('\x00')
    

    What I'm doing wrong?

  • in News
    Avatar for hygy

    So I have an orange pi zero, cloned the espruino repo, successfully compilled it and it is runing:

    root@orangepizero:/home/hygy/Espruino# ./espruino 
    Interactive mode.
    Size of JsVar is now 28 bytes
    Size of JsVarRef is now 4 bytes
    Added SIGINT hook
    Added SIGHUP hook
    Added SIGTERM hook
    
    Decompressing to 114688 bytes...
    >1+1
    =2
    

    I cloned and compiled wiringOP:

    root@orangepizero:/home/hygy/WiringOP/gp­io# ./gpio readall
     +-----+-----+----------+------+---+-Oran­ge Pi+---+---+------+---------+-----+--+
     | BCM | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi | BCM |
     +-----+-----+----------+------+---+----+­+----+---+------+----------+-----+-----+­
     |     |     |     3.3v |      |   |  1 || 2  |   |      | 5v       |     |     |
     |  12 |   8 |    SDA.0 | ALT5 | 0 |  3 || 4  |   |      | 5V       |     |     |
     |  11 |   9 |    SCL.0 | ALT5 | 0 |  5 || 6  |   |      | 0v       |     |     |
     |   6 |   7 |   GPIO.7 | ALT3 | 0 |  7 || 8  | 0 | ALT3 | TxD3     | 15  | 13  |
     |     |     |       0v |      |   |  9 || 10 | 0 | ALT3 | RxD3     | 16  | 14  |
     |   1 |   0 |     RxD2 | ALT5 | 0 | 11 || 12 | 0 | ALT3 | GPIO.1   | 1   | 110 |
     |   0 |   2 |     TxD2 | ALT5 | 0 | 13 || 14 |   |      | 0v       |     |     |
     |   3 |   3 |     CTS2 | ALT3 | 0 | 15 || 16 | 0 | ALT3 | GPIO.4   | 4   | 68  |
     |     |     |     3.3v |      |   | 17 || 18 | 0 | ALT3 | GPIO.5   | 5   | 71  |
     |  64 |  12 |     MOSI | ALT4 | 0 | 19 || 20 |   |      | 0v       |     |     |
     |  65 |  13 |     MISO | ALT4 | 0 | 21 || 22 | 0 | ALT3 | RTS2     | 6   | 2   |
     |  66 |  14 |     SCLK | ALT4 | 0 | 23 || 24 | 0 | ALT4 | CE0      | 10  | 67  |
     |     |     |       0v |      |   | 25 || 26 | 0 | ALT3 | GPIO.11  | 11  | 21  |
     |  19 |  30 |    SDA.1 | ALT4 | 0 | 27 || 28 | 0 | ALT4 | SCL.1    | 31  | 18  |
     |   7 |  21 |  GPIO.21 | ALT3 | 0 | 29 || 30 |   |      | 0v       |     |     |
     |   8 |  22 |  GPIO.22 | ALT3 | 0 | 31 || 32 | 0 | ALT3 | RTS1     | 26  | 200 |
     |   9 |  23 |  GPIO.23 | ALT3 | 0 | 33 || 34 |   |      | 0v       |     |     |
     |  10 |  24 |  GPIO.24 |  OUT | 1 | 35 || 36 | 0 | ALT3 | CTS1     | 27  | 201 |
     |  20 |  25 |  GPIO.25 |  OUT | 1 | 37 || 38 | 0 | ALT5 | TxD1     | 28  | 198 |
     |     |     |       0v |      |   | 39 || 40 | 0 | ALT5 | RxD1     | 29  | 199 |
     +-----+-----+----------+------+---+----+­+----+---+------+----------+-----+-----+­
     | BCM | wPi |   Name   | Mode | V | Physical | V | Mode | Name     | wPi | BCM |
     +-----+-----+----------+------+---+-Oran­ge Pi+---+------+----------+-----+-----+
    

    Now how can I access orange pi zero gpio from espruino?

    • 1 comment
    • 348 views
  • in ESP8266
    Avatar for hygy

    Hi,

    I'm using a few esp8266 with latest stable espruino build. After a while I cannot access anymore trough mqtt, and nor with espruino ide.

    Here is what I can see from the console:

    $ ping 192.168.1.5
    PING 192.168.1.5 (192.168.1.5) 56(84) bytes of data.
    64 bytes from 192.168.1.5: icmp_seq=1 ttl=128 time=6.14 ms
    64 bytes from 192.168.1.5: icmp_seq=2 ttl=128 time=10.9 ms
    ^C
    --- 192.168.1.5 ping statistics ---
    2 packets transmitted, 2 received, 0% packet loss, time 1001ms
    rtt min/avg/max/mdev = 6.140/8.551/10.963/2.413 ms
    $ nc 192.168.1.5 23
    $ telnet 192.168.1.5 88
    Trying 192.168.1.5...
    Connected to 192.168.1.5.
    Escape character is '^]'.
    get
    
    HTTP/1.1 400 ERROR
    Content-Type: text/plain
    Content-Length: 20
    Connection: close
    Cache-Control: no-store, no-cache, must-revalidate
    
    Invalid HTTP request^]
    
    telnet> quit
    Connection closed.
    hygy@hygy-Lenovo-G505:~$ 
    
    

    So the esp is up, and running, the code inside is running (couse I can use the connected switch, what change the light state). I can ping, access it trough port 88, but not the espruino ide port, and the running mqtt code is not accessible.

    What can be wrong?

    HyGy

    ps. I'm using a few nodemcu, witty, etc... All the same.

  • in ESP8266
    Avatar for hygy

    My (2) sonoff is worked good without any problem.

    But now I try to flash a simple esp8266. The flasing is success. And I think I got the same:

    >>> Connecting...
    Set Slow Write = true
    [object Object]
    Connected [object Object]
    Found a prompt... great!
    >>> Sending...
    ---> "echo(0);\nconsole.log(\"<\",\"<<\",JSON­.stringify(process.env),\">>\",\">\");ec­ho(1);\n"
    Sending block "echo(0);\nconsol", wait 50ms
    Sent
    Sending block "e.log(\"<\",\"<<\",", wait 50ms
    Sent
    Sending block "JSON.stringify(", wait 50ms
    Sent
    Sending block "process.env),\">", wait 50ms
    Sent
    Sending block ">\",\">\");echo(1)", wait 50ms
    Sent
    Sending block ";\n", wait 50ms
    Sent
    >>> Sent
    WARNING: No result found - just got ""
    Device found (connectionId=20)
    >>> Connected to port /dev/ttyUSB0
    Sending block "1", wait 50ms
    Sent
    Sending block "1", wait 50ms
    Sent
    Sending block "\r", wait 50ms
    Sent
    Sending block "1", wait 50ms
    Sending block "2", wait 50ms
    
  • in Interfacing
    Avatar for hygy

    It is really good for me now, there is no error with this new version.

  • in Interfacing
    Avatar for hygy

    I changed in this line the value to 30, and its working good, now it is always reads good value, no error

      },20); // time in msec (min 15 virker) 6 20 // PB
    
Actions