gmc-mh-1x-2x: Support for interface SI232-II with driver gmc-mh-2x-bd232.

This commit is contained in:
Matthias Heidbrink 2014-02-09 18:13:49 +01:00 committed by Uwe Hermann
parent c90beca780
commit fadd07072b
3 changed files with 20 additions and 10 deletions

View File

@ -288,10 +288,16 @@ a short list for convenience:
interface panel on top.
- Digitek DT4000ZC: Briefly press the "RS232" button.
- Gossen Metrawatt Metrahit 1x/2x devices, driver gmc-mh-1x-2x-rs232:
Power on the device with the "DATA" button pressed. Additionally Metrahit
2x devices must be configured for the respective interface type.
- Power on the device with the "DATA" button pressed.
- Metrahit 2x devices must be configured for the respective interface type.
- Gossen Metrawatt Metrahit 2x devices, driver gmc-mh-2x-bd232:
The device must be configured for the respective interface type.
- 'BD232' interface:
The multimeter must be configured for the respective interface type.
- 'SI232-II' interface ("PC Mode"):
The multimeter must be configured for interface type 'BD232' (all),
'SI232 online' (28-29S) or 'SI232 store' (22-26x). The interface must
be configured to the same baud rate as the host (default 9600).
Multimeter and interface must be configured to the same address.
- Norma DM950: If the interface doesn't work (e.g. USB-RS232 converter), power
on the device with "FUNC" pressed (to power the interface from the DMM).
- PCE PCE-DM32: Briefly press the "RS232" button.

View File

@ -436,13 +436,13 @@ static int config_get(int key, GVariant **data, const struct sr_dev_inst *sdi,
const struct sr_probe_group *probe_group)
{
int ret;
struct dev_context *devc;
(void)sdi;
(void)data;
(void)probe_group;
ret = SR_OK;
struct dev_context *devc;
(void)probe_group;
@ -621,7 +621,7 @@ SR_PRIV struct sr_dev_driver gmc_mh_1x_2x_rs232_driver_info = {
SR_PRIV struct sr_dev_driver gmc_mh_2x_bd232_driver_info = {
.name = "gmc-mh-2x-bd232",
.longname = "Gossen Metrawatt Metrahit 2x, 'BD232' interface",
.longname = "Gossen Metrawatt Metrahit 2x, 'BD232'/'SI232-II' interface",
.api_version = 1,
.init = init_2x_bd232,
.cleanup = cleanup_2x_bd232,

View File

@ -1320,11 +1320,15 @@ int req_stat14(const struct sr_dev_inst *sdi, gboolean power_on)
if (power_on) {
sr_info("Write some data and wait 3s to turn on powered off device...");
if ((serial_write(serial, msg, sizeof(msg)) == -1) ||
(serial_write(serial, msg, sizeof(msg)) == -1) ||
(serial_write(serial, msg, sizeof(msg)) == -1))
if (serial_write(serial, msg, sizeof(msg)) < 0)
return SR_ERR;
g_usleep(3*1000*1000);
g_usleep(1*1000*1000);
if (serial_write(serial, msg, sizeof(msg)) < 0)
return SR_ERR;
g_usleep(1*1000*1000);
if (serial_write(serial, msg, sizeof(msg)) < 0)
return SR_ERR;
g_usleep(1*1000*1000);
serial_flush(serial);
}