sipeed / NanoKVM

NanoKVM: Affordable, Multifunctional, Nano RISC-V IP-KVM
848 stars 7 forks source link

No IP Address #7

Closed sammcj closed 3 weeks ago

sammcj commented 1 month ago

Just recieved my NanoKVM, it boots up but never gets an IP.

I've tried updating the OS (dd the image to the usb mounted partition) but that didn't help.

The reset and power buttons dont seem to do anything.

There seems to be very little in the way of documentation and a lot of the source code seems to be missing?

polyzium commented 1 month ago

Have you updated to the latest firmware? I had the exact same problem until I flashed the latest image. One thing I noticed is that the NanoKVM sends the MAC address correctly, but doesn't get the IP. If your NanoKVM has a missing MAC, it may be a hardware defect.

sammcj commented 1 month ago

Hey @polyzium,

It's not yet 100% clear if I've correctly updated the firmware or not. I downloaded the latest available release image, extracted it, plugged the device in so that the removable drive showed up, unmounted it, used dd to write the image to the device, ejected and power cycled the KVM.

Is that the same process you followed?

Also interested to know if your device has ethernet link lights?

Thanks for the info!

polyzium commented 1 month ago

plugged the device in so that the removable drive showed up

The removable drive provided by NanoKVM is a data partition for ISO mounting. It does not affect your firmware in any way. If you have the Full version, you need to unscrew the case and lift the board out of the case. On the bottom side you will find a heat sink, behind it is the SD card slot with the 32GB Kioxia SD card. Remove the heatsink (it's held by a thermal pad), pull the SD card out, plug it into your computer (mine doesn't have a card reader, so I used a Steam Deck) and flash the firmware to it using DD like you previously did (although the official wiki recommends using Balena Etcher instead, which I don't really like). Once you're done, do the same steps in reverse.

When you're done flashing, you may notice that you had a mysterious "data" partition, but it's gone after flashing. This is the same partition for ISO mounting that the NanoKVM gives you file system access to when you plug it into your computer via USB. It will be created automatically when you boot the firmware, so don't do it manually.

Let me know if this helps.

Also interested to know if your device has ethernet link lights?

No. I checked my router settings instead.

sammcj commented 1 month ago

Ohhhh gosh - I did not realise that, I actually assumed this revision of the full version must have had some onboard / emmc flash as there is no port for the microSD card in the case, I just opened it up now to see the SDcard inside 🤦

That's really helpful advice @polyzium, I'm not sure if I missed this information in the repo or on the website somewhere, but I might submit a PR to the readme to add this information.

I updated the SD and now when it boots the OLED simply states "Couldn'tget IP!"

I might have to look at how I can get a serial console onto it to debug whats going on.

polyzium commented 1 month ago

Make sure you have DHCP enabled on your network, otherwise it won't work. Also, like I said, you probably need to check your router settings to see if the KVM is being recognized at all, either by MAC or some other means.

sammcj commented 1 month ago

Yeah DHCP is setup and working, I've got a pretty extensive home network/server environment, I've been monitoring the DHCP server logs and it doesn't seem to get any request, I'm suspecting either the NIC is faulty or is missing it's MAC address.

Z2Z-GuGu commented 4 weeks ago

Yeah DHCP is setup and working, I've got a pretty extensive home network/server environment, I've been monitoring the DHCP server logs and it doesn't seem to get any request, I'm suspecting either the NIC is faulty or is missing it's MAC address.

Hello, is there any change in the ETH status on the OLED after connecting to the network cable? If you are using the lite version, trying to connect to the development board and run the command 'cat /sys/class/net/eth0/carrier', if the result is 1, the network cable has been plugged in, please continue to run 'udhcpc -i eth0' to get the IP address.

sammcj commented 4 weeks ago

Hello, is there any change in the ETH status on the OLED after connecting to the network cable?

Hey, I get link lights on my switch or any computer I connect it to and they can see the link layer is up at 100mbps, but the KVM doesn't aquire an IP.

I have the full version of the KVM, does the 'reserved serial interface' or USB HID provide a serial console tty?

polyzium commented 4 weeks ago

I don't think the NanoKVM exposes a tty to the two serial ports. You might have some luck setting it up via the init scripts on the firmware. I believe getty is present on the firmware.

sammcj commented 3 weeks ago

I wonder if this might be a fix for the issue: https://github.com/sipeed/LicheeRV-Nano-Build/commit/82012f20c24e0c01ef5c2307d64e64b322da78a0

polyzium commented 3 weeks ago

I believe they have released the firmware with your fix. Maybe it's time to close this issue?

Z2Z-GuGu commented 3 weeks ago

Hello everyone, we reproduce this problem, and tried to make some software modifications, please refer to the firmware flashing to re-flash the latest v1.2.1 image to test again. We have found that a small number of power supplies or too long network cables can also cause the problem of not being able to get IP or slow network speed, if the new image still cannot get IP, please try to change the power supply of the NanoKVM or use a shorter network cable.

Z2Z-GuGu commented 3 weeks ago

I believe they have released the firmware with your fix. Maybe it's time to close this issue?

Thank you for your feedback, but I'm not sure the new image will solve everyone's problems, and we may need more feedback.

polyzium commented 3 weeks ago

My KVM has been working since day one, so I doubt it would change anything for me.

sammcj commented 3 weeks ago

Testing the new firmware out now, will report back.

sammcj commented 3 weeks ago

Unfotunately it's exactly the same:

IMG_4746

I wrote the SD card with:

sudo dd if=/Users/samm/Downloads/20240820_NanoKVM_Rev1_2_1.img conv=sync of=/dev/disk11 bs=4M
Password:
230+0 records in
230+0 records out
964689920 bytes transferred in 67.133205 secs (14369788 bytes/sec)

and safetly ejected before removing.

My DHCP server sees no requests for leases on v4 or v6 or errors.

Z2Z-GuGu commented 3 weeks ago

Hello, is there any change in the ETH status on the OLED after connecting to the network cable?

Hey, I get link lights on my switch or any computer I connect it to and they can see the link layer is up at 100mbps, but the KVM doesn't aquire an IP.

I have the full version of the KVM, does the 'reserved serial interface' or USB HID provide a serial console tty?

I'm sorry to see your reply so late, the USB HID port actually has RNDIS service enabled by default, please refer to here to connect your computer.

Z2Z-GuGu commented 3 weeks ago

Unfotunately it's exactly the same:

IMG_4746

I wrote the SD card with:

sudo dd if=/Users/samm/Downloads/20240820_NanoKVM_Rev1_2_1.img conv=sync of=/dev/disk11 bs=4M
Password:
230+0 records in
230+0 records out
964689920 bytes transferred in 67.133205 secs (14369788 bytes/sec)

and safetly ejected before removing.

My DHCP server sees no requests for leases on v4 or v6 or errors.

You can try changing to a completely isolated power source, such as a power bank, or try again with a short network cable. If you still can't get the IP, connect to the computer as described above and check the network cable connection status by 'cat /sys/class/net/eth0/carrier'

sammcj commented 3 weeks ago

Update: I figured it out!

So I tried the device on every switch in my house to no avil, then I tried connecting directly to my home server and did some debugging I found that the problem was indeed at the link layer.

I dug a little deeper and then realised that the NIC on the NanoKVM will not connect to any switch or network card in my house because it's limited to 100Mbit on the chipset, not just it's bus or due to performance constraints.

This means it will never work on any switches or connected to any network cards that support 1/2.5GbE, 1/5GbE or 1/10GbE as I think all or at least most of these modern standards no longer support 100MbE at the link layer.

My whole house (including my laptops) is 1/2.5GbE and a few 1/2.5/10GbE - so nothing would work with the old 100Mbit standard.

I'll have to think about either getting some older 100M/1GbE switches and chain those to my existing network if I want to roll these NanoKVMs out or get some more PiKVMs which I know work.

Very sorry for wasting your time looking for a software fix, I just didn't realise this was a hardware limitation of the Sipeed hardware it's based on. My fault for missing this in the specs!