I connected two Raspberry Pi 3 Model B via ad-hoc, using two TP-LINK TL-WN722N wireless adapters.
I used these commands to configure ad-hoc networking:
sudo ifconfig wlan1 down
sudo iwconfig wlan1 mode ad-hoc essid PIWLAN channel 5
sudo ifconfig wlan1 192.168.1.1 netmask 255.255.255.0
sudo ifconfig wlan1 up
The structure of icmp requests is always the same:
- 5 Packets with a ping of ~ 5 ms (fine)
- 2 Packets with a ping of ~ 1000 ms (fatal for my project)
- 5 Packets with a ping of ~ 5 ms
- 2 Packets with a ping of ~ 1000 ms
After some research, I figured out that my wireless adapter has ad-hoc problems. Therefore I configured the first Pi as an access point. The icmp requests were fine.
I bought two other wireless adapters (Edimax AC600, EW-7811USC) and replaced the old ones. Configured both for ad-hoc mode. But the icmp peaks stay the same.
Additional information: Both Pis are placed side by side and there is a packet loss of 0%.
https://wiki.debian.org/WiFi/AdHoc
It works now. The URL above shows two methods of configuring ad-hoc mode.
When I had the timing problems, the configuration was based on the manual method. Using the URLs debian method eliminates the problem.
Does anyone know why?