question about declared transports

Jef Driesen jef at libdivecomputer.org
Thu Apr 19 04:29:34 PDT 2018


On 2018-04-19 12:10, Dirk Hohndel wrote:
> I have a question about the meaning of the transport flags.
> My understanding was that DC_TRANSPORT_SERIAL is an indication that the
> dive computer supports some form of wired serial interface (Rs232 or 
> more
> typically serial over USB). What I don't understand in this context is
> this:
> 
> /* Shearwater Predator */
> {"Shearwater", "Predator", DC_FAMILY_SHEARWATER_PREDATOR, 2,
> DC_TRANSPORT_SERIAL | DC_TRANSPORT_BLUETOOTH, dc_filter_shearwater},
> /* Shearwater Petrel */
> {"Shearwater", "Petrel",    DC_FAMILY_SHEARWATER_PETREL, 3,
> DC_TRANSPORT_SERIAL | DC_TRANSPORT_BLUETOOTH, dc_filter_shearwater},
> {"Shearwater", "Petrel 2",  DC_FAMILY_SHEARWATER_PETREL, 3,
> DC_TRANSPORT_SERIAL | DC_TRANSPORT_BLUETOOTH | DC_TRANSPORT_BLE,
> dc_filter_shearwater},
> {"Shearwater", "Nerd",      DC_FAMILY_SHEARWATER_PETREL, 4,
> DC_TRANSPORT_SERIAL | DC_TRANSPORT_BLUETOOTH, dc_filter_shearwater},
> {"Shearwater", "Perdix",    DC_FAMILY_SHEARWATER_PETREL, 5,
> DC_TRANSPORT_SERIAL | DC_TRANSPORT_BLUETOOTH | DC_TRANSPORT_BLE,
> dc_filter_shearwater},
> {"Shearwater", "Perdix AI", DC_FAMILY_SHEARWATER_PETREL, 6,
> DC_TRANSPORT_BLE, dc_filter_shearwater},
> {"Shearwater", "Nerd 2",    DC_FAMILY_SHEARWATER_PETREL, 7,
> DC_TRANSPORT_BLE, dc_filter_shearwater},
> 
> To the best of my knowledge, no version of the Predator / Petrel / Nerd
> family has a wired serial interface, all they do is BT or BLE (I 
> actually
> checked the website to make sure).
> 
> What am I missing?

You forgot about the serial port emulation feature of classic bluetooth 
(rfcomm). Basically any devices that supports bluetooth classic 
(DC_TRANSPORT_BLUETOOTH) can also use the serial port emulation mode 
(DC_TRANSPORT_SERIAL). This remains supported, and that's why they are 
listed both.

Jef


More information about the subsurface mailing list