For my project I am working on the Edison with mini breakout powered by battery (7,4V) on J21 and wirelessly (WiFi) connected to the Ubiquity rocket M5 with a powerful antenna.
|AM5G16||AirMax Sector 5G-16-120: 5 Ghz 16 dBi 120 degrees 2x2 MIMO|
I use it to make a very powerful WiFi network which I can use on stage. The antenna is a sector antenna and thus looks explicitly in a certain direction. It also functions in the 5 GHz band which is not very populated...
In my configuration I use it in bridge mode which means that the rocket does not function as a router but directly funnels the signal through to the computer through ethernet. It is like a computer to computer connection.
This makes connecting to it hard with the Edison. I cannot use the standard setup tool since that works with DHCP and the rocket in bridge mode does not hand out IP addresses. So I have to go for the static option.
I had it connected in the past using this post:
I had been lucky then though. Since I had a new Edison to configure I had to follow the steps again...
I followed the lines of the script:
Try with the steps below:
- Connect to wireless network using connman. Run the following commands in the Edison's console:
- systemctl start connman
- systemctl enable connman
- enable wifi
- scan wifi
- Wait for the scan completed message and then run the following command:
- A list of the available networks will be displayed with the following format:
<network name> <service name>
- Then run the following commands:
- agent on
- connect <service name>
- At this point you will be asked for the passphrase. Enter the network password and then run the following command:
- Now you should be connected to the network. After a successful connection gather the gateway, netmask and broadcast information with the following commands:
For gateway information:
- netstat -nr
For netmask and broadcast information:
- ifconfig wlan0
>>>>>NOW HERE I HAVE A PROBLEM!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
>>>>>Since the Rocket does not hand out an ip address I get no ip address, no net mask and no gateway. None the less I went on and did also the next step:
- Now proceed to configure and set the static IP address using the service, gateway and netmask gathered with the following command:
- connmanctl config <service name> --ipv4 manual <ip address> <netmask> <gateway>
>>>>>although I did not get any information from ifconfig wlan0 I forced the <ip address> <netmask> and <gateway> anyway in the same network as the network that I had chosen for the Rocket - computer ethernet connection. If I subsequently pinged the ip address nothing happened though.
>>>>>I also did the step of creating the /etc/network/interfaces file for which the procedure is in the original post.
>>>>>If I then rebooted the Edison, there was no connection. Repeating the connman procedure would give errors and after the 'services' command service names that had a lot of zero's in them would show up.
>>>>>So I decided to start from scratch. I deleted the /etc/network/interfaces file that I had just created and I also got rid of all the entries in the /etc/wpa_supplicant/wpa_supplicant.conf file, leaving only this in that file:
config_methods=virtual_push_button virtual_display push_button keypad
>>>>>So I restarted, was ready to start the procedure again but then saw in connmanctl when I asked for 'services' that the Edison seemed to be connected to the Rocket!!!
>>>>>A much bigger present was the fact that after rebooting the Edison the Edison kept connecting to the Rocket.
>>>>>I am not sure what happened but it seems that when the wpa_supplicant.conf file does not have any network entries that the latest connman entry will be used. I checked the file later and there were no network entries added... I think I got lucky the first time I tried this because I did it on a fresh image on which I did not already try configure_edison --setup or the setup tool.
My main reason for posting is to help others with a similar problem. Maybe there is somebody as well with a deeper insight who can clarify this behaviour. And I am curious where connman stores/gets that network information and if it is possible to have more then one network that will be searched for when starting up the Edison...