Difference between revisions of "Blocking Access To Serial Port"

From LinuxMCE
Jump to: navigation, search
m (added to "serial" category)
m
Line 4: Line 4:
 
By default when you connect a usb->serial device the plug and play engine will try to figure out what type of serial device is attached by sending data across the port to test if it's a known TV, Alarm panel, etc.  If this is a serial device which you already have your own drivers, this can cause problems as the plug and play engine will also be opening the port and sending data on it.  To prevent this from happening, tail the DCERouter's log, such as using the command TailDCERouter.sh, connect the device and look for the Device Detected entry for this device that has the category "serial".  It will look like this:
 
By default when you connect a usb->serial device the plug and play engine will try to figure out what type of serial device is attached by sending data across the port to test if it's a known TV, Alarm panel, etc.  If this is a serial device which you already have your own drivers, this can cause problems as the plug and play engine will also be opening the port and sending data on it.  To prevent this from happening, tail the DCERouter's log, such as using the command TailDCERouter.sh, connect the device and look for the Device Detected entry for this device that has the category "serial".  It will look like this:
  
07      07/16/07 8:46:28.925            Received Message from 16 (HAL / Bedroom (Other)) to -1001 (unknown / ), type 2 id 65 Event:Device Detected, retry none, parameters: <0x757aeb90><br>
+
07      07/16/07 8:46:28.925            Received Message from 16 (HAL / Bedroom (Other)) to -1001 (unknown / ), type 2 id 65 Event:Device Detected, retry none, parameters: <0x757aeb90>
07      07/16/07 8:46:28.925              Parameter 5(Mac Address):  <0x757aeb90><br>
+
07      07/16/07 8:46:28.925              Parameter 5(Mac Address):  <0x757aeb90>
07      07/16/07 8:46:28.925              Parameter 13(Text):  <0x757aeb90><br>
+
07      07/16/07 8:46:28.925              Parameter 13(Text):  <0x757aeb90>
07      07/16/07 8:46:28.925              Parameter 28(IP Address):  <0x757aeb90><br>
+
07      07/16/07 8:46:28.925              Parameter 28(IP Address):  <0x757aeb90>
07      07/16/07 8:46:28.925              Parameter 49(PK_DeviceTemplate): 0 <0x757aeb90><br>
+
07      07/16/07 8:46:28.925              Parameter 49(PK_DeviceTemplate): 0 <0x757aeb90>
07      07/16/07 8:46:28.925              Parameter 51(VendorModelID): 14534026 <0x757aeb90><br>
+
07      07/16/07 8:46:28.925              Parameter 51(VendorModelID): 14534026 <0x757aeb90>
07      07/16/07 8:46:28.925              Parameter 52(PK_CommMethod): 4 <0x757aeb90><br>
+
07      07/16/07 8:46:28.925              Parameter 52(PK_CommMethod): 4 <0x757aeb90>
07      07/16/07 8:46:28.925              Parameter 53(PK_PnpProtocol): 0 <0x757aeb90><br>
+
07      07/16/07 8:46:28.925              Parameter 53(PK_PnpProtocol): 0 <0x757aeb90>
07      07/16/07 8:46:28.925              Parameter 54(PNP Serial Number): /org/freedesktop/Hal/devices/usb_device_1453_4026_noserial <0x757aeb90><br>
+
07      07/16/07 8:46:28.925              Parameter 54(PNP Serial Number): /org/freedesktop/Hal/devices/usb_device_1453_4026_noserial <0x757aeb90>
07      07/16/07 8:46:28.925              Parameter 55(DeviceData): 37|pci0000:00/0000:00:0b.0+1 <0x757aeb90><br>
+
07      07/16/07 8:46:28.925              Parameter 55(DeviceData): 37|pci0000:00/0000:00:0b.0+1 <0x757aeb90>
07      07/16/07 8:46:28.925              Parameter 56(Category): serial <0x757aeb90><br>
+
07      07/16/07 8:46:28.925              Parameter 56(Category): serial <0x757aeb90>
07      07/16/07 8:46:28.925              Parameter 59(Signature): 16,HAL <0x757aeb90><br>
+
07      07/16/07 8:46:28.925              Parameter 59(Signature): 16,HAL <0x757aeb90>
  
 
Then, go into the UnknownDevices table and add a row with that same vendor ID, and fill the serial number field with the value of "55(DeviceData)", and FK_Device_PC will be the device id of the topmost device (ie the pc or media director).  For the above, the row added is:
 
Then, go into the UnknownDevices table and add a row with that same vendor ID, and fill the serial number field with the value of "55(DeviceData)", and FK_Device_PC will be the device id of the topmost device (ie the pc or media director).  For the above, the row added is:
  
insert into `UnknownDevices`(`VendorModelId`,`SerialNumber`,`FK_Device_PC`) values ( '14534026','37|pci0000:00/0000:00:0b.0+9','1')
+
INSERT INTO `UnknownDevices`(`VendorModelId`,`SerialNumber`,`FK_Device_PC`) VALUES ( '14534026','37|pci0000:00/0000:00:0b.0+9','1')

Revision as of 17:02, 17 May 2010


By default when you connect a usb->serial device the plug and play engine will try to figure out what type of serial device is attached by sending data across the port to test if it's a known TV, Alarm panel, etc. If this is a serial device which you already have your own drivers, this can cause problems as the plug and play engine will also be opening the port and sending data on it. To prevent this from happening, tail the DCERouter's log, such as using the command TailDCERouter.sh, connect the device and look for the Device Detected entry for this device that has the category "serial". It will look like this:

07      07/16/07 8:46:28.925            Received Message from 16 (HAL / Bedroom (Other)) to -1001 (unknown / ), type 2 id 65 Event:Device Detected, retry none, parameters: <0x757aeb90>
07      07/16/07 8:46:28.925              Parameter 5(Mac Address):  <0x757aeb90>
07      07/16/07 8:46:28.925              Parameter 13(Text):  <0x757aeb90>
07      07/16/07 8:46:28.925              Parameter 28(IP Address):  <0x757aeb90>
07      07/16/07 8:46:28.925              Parameter 49(PK_DeviceTemplate): 0 <0x757aeb90>
07      07/16/07 8:46:28.925              Parameter 51(VendorModelID): 14534026 <0x757aeb90>
07      07/16/07 8:46:28.925              Parameter 52(PK_CommMethod): 4 <0x757aeb90>
07      07/16/07 8:46:28.925              Parameter 53(PK_PnpProtocol): 0 <0x757aeb90>
07      07/16/07 8:46:28.925              Parameter 54(PNP Serial Number): /org/freedesktop/Hal/devices/usb_device_1453_4026_noserial <0x757aeb90>
07      07/16/07 8:46:28.925              Parameter 55(DeviceData): 37|pci0000:00/0000:00:0b.0+1 <0x757aeb90>
07      07/16/07 8:46:28.925              Parameter 56(Category): serial <0x757aeb90>
07      07/16/07 8:46:28.925              Parameter 59(Signature): 16,HAL <0x757aeb90>

Then, go into the UnknownDevices table and add a row with that same vendor ID, and fill the serial number field with the value of "55(DeviceData)", and FK_Device_PC will be the device id of the topmost device (ie the pc or media director). For the above, the row added is:

INSERT INTO `UnknownDevices`(`VendorModelId`,`SerialNumber`,`FK_Device_PC`) VALUES ( '14534026','37|pci0000:00/0000:00:0b.0+9','1')