Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't show console command #5

Open
hanyuzzw opened this issue Jun 13, 2018 · 24 comments
Open

Can't show console command #5

hanyuzzw opened this issue Jun 13, 2018 · 24 comments

Comments

@hanyuzzw
Copy link

hanyuzzw commented Jun 13, 2018

Excuse me! Follow your steps, whether I configure the SLIP interface with :

    `IP4_ADDR(&netmask, 255, 255, 255, 0);
     IP4_ADDR(&gw, 127, 0, 0, 1);
     netif_add (&sl_netif, &config.ip_addr, &netmask, &gw, &int_no, slipif_init, ip_input);
     netif_set_up(&sl_netif);`

or with:

    `IP4_ADDR(&netmask, 255, 255, 255, 0);
     IP4_ADDR(&gw, 192, 168, 240, 2);
     netif_add (&sl_netif, &config.ip_addr, &netmask, &gw, &int_no, slipif_init, ip_input);
     netif_set_up(&sl_netif);`

it always can't show the console CMD after I run:

   `sudo slattach -p slip -s 115200 /dev/ttyUSB0 & sudo ifconfig sl0 192.168.240.2 pointopoint 
    192.168.240.1 up mtu 1500
    sudo telnet 192.168.240.1 7777`
    // telnet connection time out!!!

why?

@martin-ger
Copy link
Owner

But you also set
IP4_ADDR(&ipaddr, 192, 168, 240, 1);
on the ESP?

The telnet only works if you have a server running on the ESP. If you are referencing the simple example, the only thing you can do is pinging. Does the user_simple work for you?

@hanyuzzw
Copy link
Author

hanyuzzw commented Jun 13, 2018

yes, the config.ip_addr is 192.168.240.1, and I compiled with the user not the user_simple. I succeed one time, but I can't reappear it any more .
And if I use user_simple, the esp led is blinking all the time, and

`$ ping 192.168.240.1
PING 192.168.240.1 (192.168.240.1) 56(84) bytes of data.

 ping: sendmsg: No buffer space available  
 ping: sendmsg: No buffer space available  
 ping: sendmsg: No buffer space available  
 ping: sendmsg: No buffer space available  
 ping: sendmsg: No buffer space available  
 ping: sendmsg: No buffer space available
`  

but ping other ip is ok.

the configuration of slip interfance is:

   `sl0       Link encap:Serial Line IP    
               inet addr:192.168.240.2  pointtopoint :192.168.240.1  netmask:255.255.255.255`

@martin-ger
Copy link
Owner

Could you try to use the precompiled binaries first?

Also please try the following procedure first:
Sometimes, there is a wrong or non-matching version of "esp_init_data_default.bin" in the flash. If the firmware files from above flash correctly but after reboot you see only garbage on the serial and/or the LED on GPIO2 is flashing rapidly, try to re-initialize this sector: download https://github.com/martin-ger/esp_wifi_repeater/raw/master/firmware/esp_init_data_default_v08_vdd33.bin and flash it to 0x7c000 for 512 kB modules (some ESP-01, Sonoff Switch), 0xfc000 for 1 MB modules (most ESP-01), or 0x3fc000 for 4 MB modules (most ESP-12, Wemos D1).

@martin-ger
Copy link
Owner

Just uploaded a new version (plus binaries) that already include the esp_init_data_default.

@hanyuzzw
Copy link
Author

hanyuzzw commented Jul 2, 2018

Thanks for your reply,and if I want to test IPv6,where the lwip should I modify ,on /esp-open-sdk/sdk? on /esp-open-sdk/esp-open-lwip? on standalone sdk ESP8266_NONOS_SDK-2.1.0-18-g61248df or all of them?

@martin-ger
Copy link
Owner

Neither the open-sdk nor the NONOS_SDK provide any working IPv6 support. Already tried to work on this, but this is a real heroic job...

If you want to start with IPv6 on the ESP8266, the FreeRTOS is probably the best choice. Here is a project of my students as a starting point:
https://github.com/IPv6-ESP8266/IPv6-ESP8266

@martin-ger martin-ger reopened this Jul 2, 2018
@hanyuzzw
Copy link
Author

hanyuzzw commented Jul 2, 2018

Thank you very much and I will try it.

@yunfan
Copy link

yunfan commented Feb 27, 2019

i got the worse issues too
mine is a board Nodemcu lolin
and after i flashed the prebuilt binaries, i cant telnet to the target ip 192.168.240.1
also can not ping that ip

@martin-ger
Copy link
Owner

I just checked the binary yesterday - for me it worked. Did you flash in DIO mode? Did you download the binaries with the browser? Sometimes they get corrupted by an CR/LF issue. Best is downloading the zip and extracting them.

The slip_router is a little bit hard to debug as it has no serial output. Just to check, whether flashing was all right, could you test to flash my "esp_mqtt" binariy with the same procedure? Try to connect to the serial console there. If this fails too, you probably have an issue with flashing or downloading...

@yunfan
Copy link

yunfan commented Feb 28, 2019

@martin-ger i guess i havnt use DIO mode, and i got the firmware by git clone https, might the problem you said

@yunfan
Copy link

yunfan commented Feb 28, 2019

@martin-ger btw, the wifi in my local dont share the same ssid with the default firmware, is this caused the problem? and is it possible to dynmic configuring the ssid and password?

@martin-ger
Copy link
Owner

git clone is fine. You can configure the SSID once you have access.

Did you do the following procedure?

To connect a Linux-based host, start the firmware on the ESP, connect it via serial to USB, and use the following commands on the host:

sudo slattach -p slip -s 115200 /dev/ttyUSB0&
sudo ifconfig sl0 192.168.240.2 pointopoint 192.168.240.1 up mtu 1500

now

telnet 192.168.240.1 7777

gives you terminal access to the esp as router. On the ESP you then enter:

CMD>set ssid <your_ssid> 
CMD>set password <your_pw> 
CMD>set use_ap 0
CMD>save
CMD>reset

If so, when does it fail?

@yunfan
Copy link

yunfan commented Feb 28, 2019

@martin-ger i had down slattatch and ifconfig
the only problem is cant telnet to that address also cant ping that ip

@martin-ger
Copy link
Owner

did you check, whether you can flash other firmwares correctly?

@yunfan
Copy link

yunfan commented Mar 1, 2019

@martin-ger yes, i'd flashed punyforth later, which works as expected

@sardaukar
Copy link

I have the same problem :( I have one of these https://learn.adafruit.com/adafruit-huzzah-esp8266-breakout/overview and managed to flash the pre-built firmware on the repo, and got a connection via telnet once, but can't connect anymore. Please help.

@sardaukar
Copy link

Oops figured it out - I changed the bitrate with set bitrate but was still doing slattach at 115200!

@aladds
Copy link

aladds commented Jul 14, 2019

So I am having the same issue as @yunfan.

I am using your pre-built binaries. I've tried with two different ESP boards (A NodeMCU "0.9" / ESP12 and an ESP-01)

I can make your esp wifi repeater code work correctly and connect to its wifi access point.

But this project...after flashing I get a constantly blinking LED on GPIO0 and ifconfig shows that whilst I am transmitting data, I never recieve any.

I have tried connecting with a USB cable to the NodeMCU, and I've tried a cp2102 bridge to both boards.

I made sure to download the zip file to avoid potential corruption issues. The SHA1 sums that I calculate match your files.

The esptool.py version I have is 1.3-dev (latest from pip) and I am using a Mac running 10.14.5. My slattach tests are being done on a Raspberry Pi

Any ideas of what else I can try?

@aladds
Copy link

aladds commented Jul 14, 2019

I have now tried again doing the whole process on the raspberry pi with esptool 2.6 with the same results.

GPIO0 flashing, no data transmitted.

@aladds
Copy link

aladds commented Jul 14, 2019

Default netmask!!! The default netmask is 255.255.255.255.

If you configure this to pretty much anything else it works.

@martin-ger
Copy link
Owner

Where do you think it should be configured?

@aladds
Copy link

aladds commented Jul 14, 2019

ifconfig.

For some reason, the version of Raspbian I have (latest buster release on a Pi 4) gave me that default netmask for sl0, so I couldn't talk to anything.

I solved it with:

sudo ifconfig netmask 255.0.0.0

@aladds
Copy link

aladds commented Jul 14, 2019

Got it working with my PowerBook 540c, if you're interested in my use:

https://68kmla.org/forums/index.php?/topic/57516-esp8266-wireless-without-another-computer/

@martin-ger
Copy link
Owner

This is great!

When I did this, I really wasn't aware of all the applications in retro computing. Now I have them all: Atari, Amiga, 286 PCs and a PowerBook!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants