---
name: "useIsSigmeshGatewayConnected"
mode: "api"
versionRequirements:
  - { name: "@ray-js/panel-sdk", version: "1.8.0" }
title: "useIsSigmeshGatewayConnected"
---

## useIsSigmeshGatewayConnected

> [VERSION] @ray-js/panel-sdk >= 1.8.0

> 💡 This Hook determines the connection type by querying the device's online type: when onlineType is 8 (BLE Mesh) and the device is online, it is considered a direct Bluetooth connection and returns false; otherwise it returns true, indicating the gateway path.
> It also listens for online status changes and re-queries on changes.

### Description

Determine whether a SIG Mesh device is connected via a gateway (not direct Bluetooth)

### Parameters

`Params`

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `devId` | `string` | Yes | Sigmesh device ID |

### Return Value

None


### Examples

#### Example

```tsx
import { useIsSigmeshGatewayConnected } from '@ray-js/panel-sdk';

function MeshDeviceInfo({ devId }: { devId: string }) {
  const isGatewayConnected = useIsSigmeshGatewayConnected(devId);
  return (
    <Text>
      {isGatewayConnected ? 'Connected via gateway' : 'Direct Bluetooth connection'}
    </Text>
  );
}
```
