How to set wlan0 and eth0 to work simutaneously for Hokuyo LIDAR

The ROS program uses the wifi to access the internet. The network connection originates from the Jetson. The involved program at the end of each wifi is an internet service provider via router. Ethernet is used stimultaneously and Lidar is the only thing dependent on the wired ethernet.
The wifi uses the internet to connect to the roscore in ROS and the address is automatically assigned. The LIDAR can be assigned any address with a program.

In each case where a program originates a connection we need to know what the exact destination address is. So it sounds like all programs originating a connection are on the Jetson. One program accesses LIDAR over wired ethernet…what address does that program use to reach LIDAR? ROS is using wifi…what address is ROS trying to reach?

I’m attempting to match network/netmask and default route rules to see which part of networking is already correct, and which part needs to be edited. A summary of what the network/netmask/default route rules were in an earlier post, it’s the specific addressing (and origination point) which is needed now.

I finally got the LIDAR issue resolved. Here is what I wanted

  1. I wanted the TX1 wifi to be a wireless access point so it could communicate with the laptop.
  2. I wanted ROS to operate locally only between the TX1 and the laptop. I did not need ROS to communicate with the internet.

The UPENN F1 Tenth manual had some instructions for a Picostation route of getting a AP hotspot on a TK1, and I just fiddled around with this guide until I had my problem sorted out.

In the end, I guess this post got really long because I did not know what I wanted, and my apologies @linuxdev for making my questions confusing. Cheers.

I have been following this long discourse.I have exactly the same problem and your question was not confusing at all. This a typical setup for the ethernet LIDAR and the wlan ROS. Can you tell me how you did it ? Also, you mention that it worked before you flashed the Jetpack. Why bother with flashing the Jetpack at all. Do yo need it for ROS installation ? Thanks.

@DrWino: I ended up buying a Picostation to solve this problem. The solution below works intermittently. To be honest, the dev board has too many problems so I ended up buying a Zotac Zbox. I don’t use the dev board anymore but I understand your suffering so I am still replying. Best of luck!

Installation of AP Hotspot for TX1 Wifi
This is perhaps the most error prone if not challenging part of setting u
p the TX1. The /etc/NetworkManager/system-connections/Hokuyo file constantly changes the mode from ap back to infrastructure,so it is essential to recheck and confirm that the mode in this file is indeed ap and not infrastructure.
Also, despite the numerous attempts to stabilize the network, the hotspot seems to work on and off. The order of operation is as follows:
A.
sudo apt-get install hostapd dnsmasq
B.
Go to /etc/hostapd/hostapd.conf and make the following changes:
Interface = wlan0
SSID = Hokuyo
Hw_mode = g
Channel = 3
Wpa = 2
Wpa_passphrase = anything
C.
Edit /etc/dnsmasq.conf with the following:
Interface = lo,wlan0
No
-dhcp-interface = lo
Dhcp-range = 192.168.8.20,192.168.8.254,255.255.255.0,1
2h
D.
Edit /etc/sysctl.conf with the following
Net.ipv4.ip_forward = 1
E.
Edit /etc/NetworkManager/NetworkManager.conf with the following:
[main]
plugins=ifupdown,keyfile,ofono
dns=dnsmasq
[ifupdown]
managed=false
F.
Add onto /etc/modprobe.d/bcmdhd.conf with the following:
options bcmdhd op_mode=2
G.
Add onto /etc/rc.local with the following:
iptables -t nat -A POSTROUTING -s 192.168.8.0/24 ! -d 192.1
68.8.0/24 -j MASQUERADE
H.
Restart your system and check if hostapd is already running on your system.
I.
Run the following command after killing hostapd
rfkill unblock 0
sudo hostapd -B /etc/hostapd/hostapd.conf
J.
Reboot the computer and check to see that the interface type is AP by
typing: iw wlan0 info
K.
Type in the SSID from the Network Connections GUI as Hokuyo, set mode to Infrastructure and select the correct MAC Address.
L.
Go to the IPv4 Settings tab and select Shared to Other Computers then Save.
M.
Edit the /etc/NetworkManager/system-connections/Hokuyo file and change
mode = infrastructure to mode = ap. Save file.
*The SSID must be the same with the GUI configuration and the hostapd.
conf configuration
*The IP address for SSH must match
*The zcat line must remain appended once!
*The GUI of the Network Connections should have 1 hotspot name for 1 wl
an MAC address to
avoid confusion
*The WPA_Passphrase must be longer than four characters
*The file etc/network/interfaces remains untouched

Thanks for the detailed answer. I am using the TX1 on an Orbitty carrier. It runs ROS fine and the wifi works.

I have all my ROS programs worked out with a USB Hokuyo. Now I just need to substitute it with the 30LX ethernet LIDAR.

Unfortunately I cannot set a static IP on the TX1 on either the wired or wireless. There is no eth0 device ! So I gave up on this and just use DHCP. I can connect wired or wireless using DHCP. In fact if both are connected then the TX1 will show up with 2 IPs. So here is my plan. - I am going to connect the hokuyo ethernet to the DHCP router and the the TX1 wired port. Then SSH to the TX1 on the wifi and run ROS. Maybe this will work ?

The other alternative is to uninstall the Jetpack (not sure how) or buy another TX1 and I think the wifi and wired ports worked simulataneouly before the Jetpack flash.

I will try your solution as last resort because of the extra hardware and you think it is still unreliable.

I also suffer from this issue a lot.
Finally I find out this one works for me and relatively easy.
For Lidar Ethernet connection, after you set up the static ip in same subnet with Lidar.
At IPv4 Settings, click Routes option at right bottom corner, and choose the option
use this connection only for resources on its network detail see the following website.

@zhl355 I am trying to test your solution. However, when I opened the “network connection” on my tx2, I did not see any ethernet connection at all (I set the eth0 manually by editing /etc/network/interfaces). Please see the picture here http://www.artlystyles.com/tmp/NetworkConnection.png

Could you please let me know the details how you solved this problem?

Thank you very much. Your help is deeply appreciated.

I don’t change any setting using interfaces, the solution on website not work for me.
Instead, I found a way in the following link

My lidar IP is the default. 192.168.0.10
My wired IP on eth0 on board is 192.168.0.x
My wireless IP is 192.168.1.x

They trick is setting lidar wired connection on board using the link.
Editing IPv4 route for lidar wired connection.
Choose Use this connection only for resources on its network

My setting is attached.

what appears to me is that you have in network manager two wired connections and one of them is named lidar…
basically you may delete the Wired connection 1 to reduce the level of chaos and entropy, in my opinoin
There are multiple solutions for your issue, I would just enable ipvf and that would aggregate both wifi and ethernet interfaces and Lidar device would belong to the 192.168.0.x network, but if you want to get them separate - that will work, in my opinoin as well and will be even better for you.