No. Hub works only on first layer. On second layer only swithc/bridge works on second layer of OSI model.
There are no layer 1 switches; switches run at layer 2 or 3. A hub is a layer 1 device.
Physical layer
Hub
hub work at physical layer of osi model
TheHub work on layer 1 i.e. Physical layer of OSI Model
Hub and Swithc
hub
A hub is a layer 1 (physical) device because it does not use any part of the packet header to direct the packet to the right destination, it just broadcasts to all connected computers.
Physical layer = Hub, NIC, Repeater. Data Link Layer = Switch, Bridge. Network Layer = Router.
switch,hub.
A Hub or a Switch