Part III. is about getting out from the house with the board. An important sellingpoint of the Coral board that it's a low consumption device that can be deployed as an edge device. So far the Coral board has lived on a table and was connected to a power source and some network.
According to the Coral boards datasheet, amongst it's features there is Wi-Fi 2x2 MIMO (802.11b/g/n/ac 2.4/5 GHz), and the chip is a Murata LBEE5U91CQ. The chips detailed page shows that it supports Network Topology: AP and STA dual mode. Bingo, AP means it can operate as a wireless network access point. So the next task is to configure Mendel Linux accordingly.
After some googling I've found a nice article: How to use your Raspberry Pi as a wireless access point. This aritcle explains how to create a network bridge from wlan to eth. As my goal was AP only, here are my steps:
I only had to install hostapd as dnsmasq is installed by default on Mendel.
mendel@vendel:~$ sudo apt-get install hostapd
To configure wlan0 witha static ip, one has to edit /etc/network/interfaces:
# interfaces(5) file used by ifup(8) and ifdown(8) # Include files from /etc/network/interfaces.d: source-directory /etc/network/interfaces.d auto wlan0 iface wlan0 inet static address 192.168.2.1 netmask 255.255.255.0
To configure the dhcp server (in our case it's dnsmasq), edit /etc/dnsmasq.conf
This step was not easy cause the settings in the Pi article were not working, or resulting a slow network. But a little googling again and I've found Gentoo Linux Hostapd Sample configurations Based on those I came up with my own config, that I entered into /etc/hostapd/hostapd.conf
ssid=coralnet wpa_passphrase=coralpass interface=wlan0 # driver=nl80211 wpa=2 wpa_key_mgmt=WPA-PSK rsn_pairwise=CCMP hw_mode=a channel=36 country_code=US ieee80211d=1 ieee80211n=1 ieee80211ac=1 wmm_enabled=1
As it can be seen on the pictures at the intro section of the article, I managed to take my coral board to a ride at the end. My set up was including a mobile charger battery, the Coral board, mounted on a gray LEGO plate, a webcam, an iPad and my laptop. In the car I started up the board, which created a 'CoralNet', with my laptop I connected to the 'CoralNet', and through ssh loged in to the board and started up my servers. Also connected my iPad to 'CoralNet', got out from the car and connected to the frontend server runing on the board. This way I could test most of the models my server is supporting. You can see that a 'car' is detected next to a 'person', face detection model detected my face, and the segmentation model segmented me green.
I did not mentioned in Part I., but lately I wrote a multi-threaded python server, and a react client. The python server is using opencv and TensorFlow Lite Interpreter, with Edge TPU runtime library as a delegate. After inference on the frames, the python server is streaming the frames and data, using WebScokets, to the React based client. The WebScoket communication is bidirectional so it's possible to control the python server as well ... ... but that is an other story for an other article.Back to vaew.io