# Sentinel VOXL2 Microhard not running

Source: https://forum.modalai.com/topic/1065/sentinel-voxl2-microhard-not-running
Category: General Questions (https://forum.modalai.com/category/2/general-questions)
Posted: 2022-06-29 17:37:44 UTC by rohitpillai
Replies: 37 · Views: 8976

## rohitpillai · 2022-06-29 17:37:44 UTC

Hi,

Recently I bought a Sentinel Dev Drone with the Microhard add-on kit with pMDDL2450. My GS is a pMDDL5824. Once I configured all the microhard settings, I am able to ping the microhard from my GS and vice versa. However, when I try to setup ```voxl-configure-modem``` and then run ```systemctl status -l voxl-modem```. I get the following message and no IP address is given for it (Image attached below). Therefore I am not able to SSH into the drone via Microhard. How do I fix this?
![Screenshot from 2022-06-29 10-37-09.png](https://forum.modalai.com/assets/uploads/files/1656524253264-screenshot-from-2022-06-29-10-37-09.png)

## Reply by tom (ModalAI staff) · 2022-06-29 17:40:50 UTC

@rohitpillai What does `ifconfig` show?

as a note `voxl-modem` runs and exits so it is normal for it to be "not running" in `voxl-inspect-services`

## Reply by rohitpillai · 2022-06-29 17:44:41 UTC

```ifconfig``` shows the following.
![Screenshot from 2022-06-29 10-43-01.png](https://forum.modalai.com/assets/uploads/files/1656524609165-screenshot-from-2022-06-29-10-43-01.png) 
However, that is not the IP address that I have set for the microhard using ```voxl-configure-modem```. The IP address I have set is 192.168.168.60 therefore I am not able to SSH in.

## Reply by tom (ModalAI staff) · 2022-06-29 17:52:06 UTC

@rohitpillai As a test, can you do the following?:

- disable the voxl-modem service with `systemctl disable voxl-modem`
- reboot your drone
- adb back on
- run `voxl-modem-start.sh` manually
- post the output and resulting `ifconfig` here

## Reply by rohitpillai · 2022-06-29 17:57:09 UTC

Where is the ```voxl-modem-start.sh``` file located?

## Reply by tom (ModalAI staff) · 2022-06-29 17:58:18 UTC

@rohitpillai It's in `/usr/bin` so you should be able to run it from wherever

## Reply by rohitpillai · 2022-06-29 17:59:45 UTC

![Screenshot from 2022-06-29 10-59-07.png](https://forum.modalai.com/assets/uploads/files/1656525558794-screenshot-from-2022-06-29-10-59-07.png) 
Here is the output.

## Reply by tom (ModalAI staff) · 2022-06-29 18:00:54 UTC

@rohitpillai Let's see what package versions you have installed, can you run `voxl-version`?

## Reply by rohitpillai · 2022-06-29 18:01:47 UTC

![Screenshot from 2022-06-29 11-01-31.png](https://forum.modalai.com/assets/uploads/files/1656525698498-screenshot-from-2022-06-29-11-01-31.png) 
Here you go!

## Reply by tom (ModalAI staff) · 2022-06-29 18:06:40 UTC

@rohitpillai Okay that looks to be the latest, let me mimic your setup and see if I can figure out the issue. Thank you for being patient!

In the meantime, a couple other things to check:

What does your `/etc/network/interfaces` file look like?

And does anything change if you do the following:

`ifconfig usb0 down` and `ifconfig usb0 up`

## Reply by rohitpillai · 2022-06-29 18:12:40 UTC

Here is the output for the network-interfaces file
![Screenshot from 2022-06-29 11-09-42.png](https://forum.modalai.com/assets/uploads/files/1656526196442-screenshot-from-2022-06-29-11-09-42.png)

Output for ```ifconfig usb0 down```
![Screenshot from 2022-06-29 11-11-07.png](https://forum.modalai.com/assets/uploads/files/1656526273213-screenshot-from-2022-06-29-11-11-07.png) 

Output for ```ifconfig usb0 up``` gives the same output as ```ifconfig``` from previous message.

## Reply by tom (ModalAI staff) · 2022-06-29 18:57:25 UTC

@rohitpillai Try `ifconfig usb0 up` not eth0 also try adding a `sudo`

## Reply by rohitpillai · 2022-06-29 19:01:46 UTC

Here is the output - 
![Screenshot from 2022-06-29 11-59-53.png](https://forum.modalai.com/assets/uploads/files/1656529203972-screenshot-from-2022-06-29-11-59-53.png) 

If I try to SSH using this IP address, it takes me to this and not VOXL2 - 
![Screenshot from 2022-06-29 12-00-38.png](https://forum.modalai.com/assets/uploads/files/1656529251066-screenshot-from-2022-06-29-12-00-38.png) 

On the other drones it is usually ```eth0``` for the Microhard connection. Why is it defaulting to usb0?

## Reply by rohitpillai · 2022-06-29 19:04:33 UTC

Okay typing in bash takes me to VOXL2. However, it is not setting the static IP address that I want it to set, which is 192.168.168.60

## Reply by tom (ModalAI staff) · 2022-06-29 19:09:25 UTC

@rohitpillai I'm still playing around to figure out exactly what is going wrong but here are a couple answers:

That SSH session is the VOXL2, SSH just doesn't put you in the `bash` shell by default, if you run `bash` it should give you the expected `voxl` terminal you're used to.

The reason why it is showing up as `usb0` and not `eth0` is because the Microhard add-on board you're using is a newer flavor than the others "M0048-2" vs "M0048-1" (the silk screen may not reflect that correctly). This newer flavor removes the LAN7500 chip and uses a slightly different driver to enable comms between the chips. 

This functionality is new to `voxl-modem` as well which is why you're running into this bug, you're one of the first people to actually have one of these new boards in hand.

## Reply by rohitpillai · 2022-06-29 19:15:02 UTC

Oh cool! Is there anything I can do to help from my side to figure this out?

## Reply by tom (ModalAI staff) · 2022-06-29 19:17:52 UTC

@rohitpillai I will let you know if I need anything from you. I'm screwing around with the `voxl-modem` source code right now to try to figure out how to fix the issue. I think I've already found a couple things that could resolve it. 

I'll update once I get it going, I may generate a new `voxl-modem` deb package for you to try out

## Reply by rohitpillai · 2022-06-29 19:19:25 UTC

Sounds good!

## Reply by tom (ModalAI staff) · 2022-06-29 20:11:26 UTC

@rohitpillai I believe I have fixed the issue. `voxl-modem` was jumping ahead and assuming that the modem had enumerated before it had which would cause some of the commands to never be run.

I have generated a new dev package for you to try out, the download link is:

http://voxl-packages.modalai.com/dists/qrb5165/dev/binary-arm64/voxl-modem_0.15.2-202206291955_arm64.deb

You can take a look at the source code changes here: https://gitlab.com/voxl-public/voxl-sdk/utilities/voxl-modem/-/commit/0cc330f8fcd6cafc97b80412dfe9994b8389e90b

In order to try this package out, do the following:

- download the `voxl-modem_0.15.2-202206291955_arm64.deb` package using the above link
- push the package to your VOXL2 in the directory you'd like (I'll use /data) using:
```
adb push voxl-modem_0.15.2-202206291955_arm64.deb /data
```

- Force remove the `voxl-modem` package on board:
```
adb shell

dpkg --purge --force-all voxl-modem
```

- Install the new dev package:
```
cd /data

dpkg -i voxl-modem_0.15.2-202206291955_arm64.deb
```

- Re-run `voxl-configure-modem` and choose the IP to your liking

Verify that the network interface comes up and the IP is what you expect with `ifconfig`

Try a  couple reboots to confirm that the expected behavior is consistent.

Let me know if you need any clarity on the above and let me know the outcome of your tests.

The `usb0` network interface won't come up immediately after reboot (may take 10-15 seconds) for it to enumerate

## Reply by rohitpillai · 2022-06-29 20:27:01 UTC

After a couple of reboots I am getting the same behaviour. It works as it should now! Thanks!

![Screenshot from 2022-06-29 13-26-16.png](https://forum.modalai.com/assets/uploads/files/1656534409791-screenshot-from-2022-06-29-13-26-16.png)

## Reply by tom (ModalAI staff) · 2022-06-29 20:28:36 UTC

@rohitpillai Woot! Thank you for all of your help! I will go ahead and merge this into master so that it will make it into the next release.

## Reply by wilkinsaf · 2022-10-12 21:21:21 UTC (in reply to tom)

@tom Hey Tom, 

I am noticing this issue of microhard not having a static ip on my system as well. 
![10bc948b-8cf9-45ec-bbe4-bf0819d393b6-image.png](https://forum.modalai.com/assets/uploads/files/1665609644151-10bc948b-8cf9-45ec-bbe4-bf0819d393b6-image.png) 

It appears I am on a later version than the one in the post. Is the voxl-static-ip service now the preferred way to have a static ip?

## Reply by wilkinsaf · 2022-10-12 21:24:07 UTC (in reply to wilkinsaf)

@wilkinsaf Code is still there
![66b46d42-ff6b-469c-b6fd-a9ac143b7c61-image.png](https://forum.modalai.com/assets/uploads/files/1665609845381-66b46d42-ff6b-469c-b6fd-a9ac143b7c61-image.png)

## Reply by wilkinsaf · 2022-10-12 21:26:24 UTC (in reply to wilkinsaf)

@wilkinsaf But ip still is not what is in the config file

ip address: ![1e15d9f5-c3a7-4e66-83d3-d6f88ab6cd7d-image.png](https://forum.modalai.com/assets/uploads/files/1665609954166-1e15d9f5-c3a7-4e66-83d3-d6f88ab6cd7d-image.png) 

config file:
![feeb0a0b-b03b-47b5-99c6-ff48c891db04-image.png](https://forum.modalai.com/assets/uploads/files/1665609984075-feeb0a0b-b03b-47b5-99c6-ff48c891db04-image.png)

## Reply by tom (ModalAI staff) · 2022-10-12 21:31:33 UTC

@wilkinsaf Interesting, give `voxl-static-ip` a try and see if it helps. I have yet to integrate that directly into voxl-modem. We have a systemd service setup for it, so I would go ahead and modify `/usr/bin/voxl-static-ip` and then enable it's service `systemctl enable voxl-static-ip`

## Reply by wilkinsaf · 2022-10-12 21:33:01 UTC (in reply to tom)

@tom I did, but i had to add in a huge sleeper and have it After=voxl-modem.service

since the voxl-modem is a python script (thank you for that) I am just doing some caveman debugging. will post progress

## Reply by tom (ModalAI staff) · 2022-10-12 21:35:10 UTC

@wilkinsaf voxl-static-ip is pretty "dumb" as it doesn't check to see if the interface is actually up before trying to modify the IP so that's probably the reason why you need the big sleep, but I'm sure you figured that out already.

## Reply by wilkinsaf · 2022-10-12 21:39:16 UTC (in reply to tom)

@tom Yeah. I think I figured it out

My uname has "m0054". It uses eth0 as interface instead of usb0. i dont see code for setting the ip for eth0. What is weird is that I also see usb0 come up as an interface. But I am going to add some code here to hopefully fix that. Will make a branch or something if it is useful for someone else

![70be3696-0b4d-4496-b9ea-5bd60a2cf46b-image.png](https://forum.modalai.com/assets/uploads/files/1665610656624-70be3696-0b4d-4496-b9ea-5bd60a2cf46b-image.png)

## Reply by tom (ModalAI staff) · 2022-10-12 21:44:41 UTC

@wilkinsaf Do you have any other type of network connection going? WiFi? Ethernet?

I can try to copy your setup, so you've got a VOXL2 w/ Microhard add-on? anything else important connected? mipi cameras and such wouldn't affect this

## Reply by tom (ModalAI staff) · 2022-10-12 21:46:57 UTC

@wilkinsaf Also a `voxl-version` would be helpful to see. To give you some background on why this part is a little confusing, on newer builds of Microhard add-ons we had to change out a chip due to supply shortages and so the newer Microhard add-ons will be handled as "usb0" instead of "eth0".

## Reply by tom (ModalAI staff) · 2022-10-12 21:52:51 UTC

@wilkinsaf Oh also, while I'm asking you things, the output of the following would be helpful as well:
```
dmesg | grep eth0

dmesg | grep usb0
```

## Reply by wilkinsaf · 2022-10-12 21:54:24 UTC (in reply to tom)

@tom 

No other wifi or ethernet. I am connected with adb. 

VOXL2 with microhard
cameras: stereo, tracking, hires (although my config only has the tracking and hires turned on rn)

voxl-version:
![48d14733-076b-4228-8bb5-0a7009e395cb-image.png](https://forum.modalai.com/assets/uploads/files/1665611601619-48d14733-076b-4228-8bb5-0a7009e395cb-image.png) 

dmesg | grep eth0
```
[    3.291467] smsc75xx 1-1.1:1.0 eth0: register 'smsc75xx' at usb-xhci-hcd.0.auto-1.1, smsc75xx USB 2.0 Gigabit Ethernet, 42:cd:53:3c:37:18
[    5.516283] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    9.465432] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    9.475251] smsc75xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1
[   14.332677] smsc75xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1
[   14.345964] smsc75xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1
[   21.188500] smsc75xx 1-1.1:1.0 eth0: link down
[   22.663119] smsc75xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1
[   22.682574] smsc75xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1
[   23.155729] smsc75xx 1-1.1:1.0 eth0: link down
[   23.168624] smsc75xx 1-1.1:1.0 eth0: link down
[   25.801191] smsc75xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1
[   34.154417] smsc75xx 1-1.1:1.0 eth0: link down
[   35.708201] smsc75xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1
[   35.723892] smsc75xx 1-1.1:1.0 eth0: link up, 100Mbps, full-duplex, lpa 0x4DE1
```
dmesg | grep usb0
```
    2.202994] register_client_adhoc:Client handle 64 usb0
[    5.322266] f_cdev_alloc: port_name:at_usb0 (ffffffdd12c44c00) portno:(0)
[   37.386234] rndis_host 1-1.2:1.0 usb0: register 'rndis_host' at usb-xhci-hcd.0.auto-1.2, RNDIS device, 46:b5:b5:15:45:b0

```

## Reply by tom (ModalAI staff) · 2022-10-12 21:59:51 UTC

@wilkinsaf Hmm okay very interesting, I'll replicate your setup and see what I can find

## Reply by wilkinsaf · 2022-10-12 22:01:26 UTC (in reply to tom)

@tom Thanks for your help Tom. I am doing the same on my end. Will post if I find anything interesting

## Reply by wilkinsaf · 2022-10-12 22:08:20 UTC (in reply to tom)

@tom 

I threw some code in there to do the operation, but it's pretty much the same as voxl-static-ip

![3370d275-093b-4cd7-aa36-643c381d7827-image.png](https://forum.modalai.com/assets/uploads/files/1665612478612-3370d275-093b-4cd7-aa36-643c381d7827-image.png) 

I am just going to go with this patch for right now to continue dev work.

## Reply by tom (ModalAI staff) · 2022-10-12 22:32:25 UTC

@wilkinsaf What does your `/etc/network/interfaces` file looks like

## Reply by wilkinsaf · 2022-10-12 22:33:14 UTC (in reply to tom)

@tom said in [Sentinel VOXL2 Microhard not running](/post/6712):
> /etc/network/interfaces

![93d3ec0a-f8d9-4fbb-a829-e7b3551ab0f1-image.png](https://forum.modalai.com/assets/uploads/files/1665613992736-93d3ec0a-f8d9-4fbb-a829-e7b3551ab0f1-image.png)

I am wondering if they could be clashing

## Reply by wilkinsaf · 2022-10-12 22:37:25 UTC (in reply to wilkinsaf)

@wilkinsaf No, took out usb0 entry and it still didnt set the correct ip
