Nп/п : 35 из 60
 От   : Theo                                2:5075/128        06 сен 23 21:56:29
 К    : pozz                                                  06 сен 23 23:59:02
 Тема : Re: Configure network of an embedded device
----------------------------------------------------------------------------------
                                                                                 
@MSGID: FNJpz@news.chiark.greenend.org.uk>
608d85fc
@REPLY: 1@dont-email.me> 5d8b5125
@REPLYADDR Theo
<theom+news@chiark.greenend.org.uk>
@REPLYTO 2:5075/128 Theo
@CHRS: CP866 2
@RFC: 1 0
@RFC-Message-ID:
FNJpz@news.chiark.greenend.org.uk>
@RFC-References: 1@dont-email.me>
@TZUTC: 0100
@PID: tin/1.8.3-20070201 ("Scotasay") (UNIX)
(Linux/5.10.0-22-amd64 (x86_64))
@TID: FIDOGATE-5.12-ge4e8b94
pozz <pozzugno@gmail.com> wrote:
> So I`m wondering if there`s a standard or quasi-standard way to manage 
> network configuration of devices on the same LAN.

> The situation isn`t so uncommon. IPCams are network oriented devices 
> that can be controller by a Cloud service from the manufacturer, but 
> mainly from a web page. It usually happens that more than one IPCam are 
> installed on the same LAN.

There are several ways to do this.

If there`s ethernet, it`s not too complicated.  When the device boots, make a
DHCP request and provide your hostname as the device name plus a serial
number.  For example, supposing your product is called `HomeBox` and the
device`s serial number (MAC address?) is 12:34:56:78:90:ab.  Then make a
DHCP request and specify your hostname as `homebox90ab`.  Use enough digits
to minimise the changes of name collisions.  A user can either look on the
router for the `homebox` device, or you print instructions telling the user
to go to http://homebox90ab/ on a label.  At that site they can configure
the network settings if they want a fixed IP or whatever.

For wifi, it`s harder because you need to preconfigure wifi settings before
the device appears on the network.

One way is to include Bluetooth functionality, which is included on many
wifi chipsets.  An app is told the wifi config by the user, connects to the
Bluetooth and sends the details that way.  The device then connects to the
wifi and may shut down the Bluetooth interface.  To reconnect, a factory
reset via a pinhole reset button will clear the wifi settings and re-enable
Bluetooth.

If you don`t have Bluetooth or a mobile app, another option is to power up
in factory mode offering an access point with a default SSID, say
`homebox90ab`, and no password.  The user connects to the SSID and goes to a
web page as the ethernet example.  There they configure their wifi
credentials and, once saved, the device reboots and tries to connect to that
wifi network.  If it fails, the user must do the pinhole reset and try
again.

> For example, Dahua IPCams usually start with the fixed IP address 
> 192.168.1.108. They have a software (Config Tool) that can be used[3] to 
> manage network configuration of multiple IPCams, even if they are 
> installed at the same time with the default IP address 192.168.1.108.

On an enterprise network, maybe expecting any kind of DHCP is too much.  In
which case the initial setup could be its own DHCP server: you plug in a
laptop which gets an IP address handed out by the device, and go to
http://192.168.1.1/ (or http://homebox90ab/) which is the device.  From
there you configure its IP address and other settings.  Next time it reboots
it uses the new settings.  If it is no longer accessible, there`s the
pinhole reset procedure.

While it`s possible for the device to answer at a specific hardcoded IP,
it`s a bit awkward from the user perspective - you have to configure your
laptop with a particular static IP, netmask and so on.  Many OSes make that
annoying, and you can`t easily switch to another network without going in
and deleting all the settings (eg you want to search for help while
configuring the device).

On IPv6, a lot of these problems go away if SLAAC is enabled: you know your
network prefix, you know what the device`s MAC address, so it`s trivial to
work out the device`s static IP, or at least one IP that it`ll respond to if
you try to connect to it.

Theo
--- tin/1.8.3-20070201 ("Scotasay") (UNIX) (Linux/5.10.0-22-amd64 (x86_64))
 * Origin: University of Cambridge, England (2:5075/128)
SEEN-BY: 5001/100 5005/49 5015/255 5019/40 5020/715
848 1042 4441 12000
SEEN-BY: 5030/49 1081 5058/104 5075/128
@PATH: 5075/128 5020/1042 4441



   GoldED+ VK   │                                                 │   09:55:30    
                                                                                
В этой области больше нет сообщений.

Остаться здесь
Перейти к списку сообщений
Перейти к списку эх