bao-project / bao-demos

A guide on how to build and use a set of Bao guest configurations for various platforms
Other
33 stars 38 forks source link

Cannot access Linux host through ssh FreeRTOS+Linux #39

Open e-nieto opened 1 year ago

e-nieto commented 1 year ago

Good evening team!

I've been trying to access the Linux guest OS through ssh according to the Linux+FreeRTOS guide (IP 192.168.42.15).

The system is able to boot according to FreeRTOS on UART: FreeRtos_running

When trying to ping or ssh, host appears offline (100% packet drop, not even connection refused). However, nmap is able to detect the RPi4 as being online and being able to connect, but all ports are ignored:

Screenshot_ping_bao

I am on a fresh make from commit e6f1f6f

josecm commented 1 year ago

@e-nieto Now that I've checked the readme files and the steps printed out when running make, I realize that something is not clear: the demo requires you to set up your machine's eth interface IP statically to something in the same private network. For example, 192.168.42.2/24.

Have you tried this?

e-nieto commented 1 year ago

No I didn't, but makes sense. I've been able to connect to Raspbian with an adhoc in the past, so it didn't occur to me to hook it up to the router. I'll try tomorrow and report back :)

e-nieto commented 1 year ago

I was able to autoassign a static IP to the interface (just as you suggested, I don't know why I tried to complicate myself with DHCP server + router + what have you) and it pings! I was able to log into root.

Nevertheless, is there a way to change the static IP before booting into the machine (through config.txt for example)? It would be great if someone is stuck or wants to integrate it to it's local network before trying to connect to it :)

josecm commented 11 months ago

I'm guessing @yanjiew1 wrongly marked this issue on their PR since this is related to the Linux+FreeRTOS demo, not the Linux+Zephyr.

@e-nieto sorry for not taking a look at this sooner. Were you able to change the static IP? I believe this would be possible by chaing the ip parameter in the kernel command line defined in the device tree's chosen/bootargs property.