SensorDriver

Hi Ripul,
Based on the error log it seems that you haven't installed the ODKSensors
framework on the Android device. Is that correct? Before running your
driver, please make sure that the framework is installed on the device. Its
this project on google code:

http://code.google.com/p/opendatakit/source/browse?repo=sensors

The driver code you have sent might not work with your barcode reader, it
looks similar to the ZebraMzSeriesPrinter driver on google code, which
works with Bluetooth-enabled MZ series printers from Zebra. In order to
develop a driver for the barcode reader you have, you'll need to know its
messaging protocol. Do you have that? Data returned from the barcode reader
will be provided by the framework to your driver in the getSensorData
method. Data that you need to send to the barcode reader will need to be
structured in a format that the reader understands. You will return this
structured data from the sendDataToSensor method of the driver.

The AndroidManifest.xml file in your driver project is missing the metadata
required by ODKSensors framework. Please look at the email i sent out
earlier to the mailing list & refer to the driver project i mention there.

Finally, how are you connecting the barcode reader to Android? Are you able
to communicate with this reader from a computer? The product site says it
supports USB, RS232 interfaces. When you plug the reader to a computer
using USB, does a virtual serial port get created on the computer? If
that's the case, then you'll be able to communicate with the reader from
Android by specifying the "USB" channel in the driver's
AndroidManifest.xml. However, this will work only on Androids that have USB
Host capability & are running Android version 3.x or above.

rc

··· On Sat, Jul 6, 2013 at 11:19 AM, ripul kumar wrote:

Hello Rohit
thank you for replying for my last mail
as you told me for the error,m attaching the error log,which m getting
while running the code
m also attaching some more file
plzz find the attachment

Details of attachment
1)Error Log
2)code for bar-code driver and bar-code impl class
3)image of my bar-code reader with some details of the device

details for bar-code reader
Company Name:ARGOX
Model_NO:8250*10657647

thnx a lot for your cooperation
regards
Ripul Kumar

On Sat, Jul 6, 2013 at 10:07 AM, ripul kumar ripulku@gmail.com wrote:

---------- Forwarded message ----------
From: Rohit Chaudhri rohit.chaudhri@gmail.com
Date: Fri, Jul 5, 2013 at 12:59 PM
Subject: Re: SensorDriver
To: ripul kumar ripulku@gmail.com

Ripul,
The sensorID is provided by the physical sensor. For example, the
bluetooth MAC address is the sensorID for bluetooth sensors.

can you please tell me more about the error you are getting for #2? i
suspect that even though you are seeing an error related to the content
provider, it won't impact the ZephyrHeartRateSensor.

On Thu, Jul 4, 2013 at 11:54 PM, ripul kumar ripulku@gmail.com wrote:

Rohit we have discussed earlier and i need your help
i have 2 question to ask

1)How to get the* *sensorID of my device
i have to hard code this sensorID or the framework will find the
sensorID
*
*
*
*
2)"content://org.opendatakit.sensorsV2.usbsensordataprovider/sensors"
from where i find this call
m asking this because m getting some error while running
ZephyrHeartRateSensor

i think m getting this error because of this class

plzz suggest me for the above questions
thnx
Ripul

Hi Rohit
Thnx for replying for my last mail

1)I have successfully installed the ODKSensors framework on the Android
device(Tablet).

2)I don't have the messaging protocol for my device

3)Plzz see the The AndroidManifest.xml file in my driver project for
metadata required by ODKSensors framework(Plzz Find the attached doc)

4)I am connecting my device through USB port

5)I have attached my new Code and log file produced while running.

6)The code is working fine,but when i connect my USB device and click on
Add USB Device
the pages is changing,but nothing is happening.

plzz find the attached file.

plzz suggest me on the above problem
thnx in advance
Ripul Kumar

log.txt (2.2 KB)

hb.rar (1.27 MB)

··· On Tue, Jul 9, 2013 at 3:19 AM, Rohit Chaudhri wrote:

Hi Ripul,
Based on the error log it seems that you haven't installed the ODKSensors
framework on the Android device. Is that correct? Before running your
driver, please make sure that the framework is installed on the device. Its
this project on google code:

http://code.google.com/p/opendatakit/source/browse?repo=sensors

The driver code you have sent might not work with your barcode reader, it
looks similar to the ZebraMzSeriesPrinter driver on google code, which
works with Bluetooth-enabled MZ series printers from Zebra. In order to
develop a driver for the barcode reader you have, you'll need to know its
messaging protocol. Do you have that? Data returned from the barcode reader
will be provided by the framework to your driver in the getSensorData
method. Data that you need to send to the barcode reader will need to be
structured in a format that the reader understands. You will return this
structured data from the sendDataToSensor method of the driver.

The AndroidManifest.xml file in your driver project is missing the
metadata required by ODKSensors framework. Please look at the email i sent
out earlier to the mailing list & refer to the driver project i mention
there.

Finally, how are you connecting the barcode reader to Android? Are you
able to communicate with this reader from a computer? The product site says
it supports USB, RS232 interfaces. When you plug the reader to a computer
using USB, does a virtual serial port get created on the computer? If
that's the case, then you'll be able to communicate with the reader from
Android by specifying the "USB" channel in the driver's
AndroidManifest.xml. However, this will work only on Androids that have USB
Host capability & are running Android version 3.x or above.

rc

On Sat, Jul 6, 2013 at 11:19 AM, ripul kumar ripulku@gmail.com wrote:

Hello Rohit
thank you for replying for my last mail
as you told me for the error,m attaching the error log,which m getting
while running the code
m also attaching some more file
plzz find the attachment

Details of attachment
1)Error Log
2)code for bar-code driver and bar-code impl class
3)image of my bar-code reader with some details of the device

details for bar-code reader
Company Name:ARGOX
Model_NO:8250*10657647

thnx a lot for your cooperation
regards
Ripul Kumar

On Sat, Jul 6, 2013 at 10:07 AM, ripul kumar ripulku@gmail.com wrote:

---------- Forwarded message ----------
From: Rohit Chaudhri rohit.chaudhri@gmail.com
Date: Fri, Jul 5, 2013 at 12:59 PM
Subject: Re: SensorDriver
To: ripul kumar ripulku@gmail.com

Ripul,
The sensorID is provided by the physical sensor. For example, the
bluetooth MAC address is the sensorID for bluetooth sensors.

can you please tell me more about the error you are getting for #2? i
suspect that even though you are seeing an error related to the content
provider, it won't impact the ZephyrHeartRateSensor.

On Thu, Jul 4, 2013 at 11:54 PM, ripul kumar ripulku@gmail.com wrote:

Rohit we have discussed earlier and i need your help
i have 2 question to ask

1)How to get the* *sensorID of my device
i have to hard code this sensorID or the framework will find the
sensorID
*
*
*
*
2)"content://org.opendatakit.sensorsV2.usbsensordataprovider/sensors"
from where i find this call
m asking this because m getting some error while running
ZephyrHeartRateSensor

i think m getting this error because of this class

plzz suggest me for the above questions
thnx
Ripul

Hi Ripul,
Glad that you've been able to run the driver after installing ODKSensors.

The driver needs to know the format of messages sent by the sensor in order
to decode messages, so you'll need to know the messaging protocol. Even if
you were to implement an Android app that interfaces directly with the
sensor (i.e., without ODKSensors + a driver), you'll need to know the
message formats in order to process data received from the sensor. Sensor
manufacturers typically provide the message formats in datasheets or in
some sample code.

The Sensors framework you have on google code supports 2 types of USB
devices connected to Android 3.x or higher:

  1. Arduino-based ADK2011
    http://developer.android.com/tools/adk/adk.html devices:
    I suspect that your barcode reader might not implement ADK2011.
  2. USB serial devices: These devices do serial communications (rs232 or
    TTL) over a USB connection using an FTDI
    http://en.wikipedia.org/wiki/FTDIchip. If such devices are connected
    to a computer, a virtual serial port
    gets created for communications (provided the computer has the correct
    driver). So, to check if your barcode reader is in this category, i had
    asked if you see a virtual serial port when you connect the reader to a
    computer. Please keep in mind that for this to work on Android, the Android
    device needs to have USB Host capability. USB Host is getting more common
    in newer Android devices.
··· On Tue, Jul 9, 2013 at 9:28 AM, ripul kumar wrote:

Hi Rohit
Thnx for replying for my last mail

1)I have successfully installed the ODKSensors framework on the Android
device(Tablet).

2)I don't have the messaging protocol for my device

3)Plzz see the The AndroidManifest.xml file in my driver project for
metadata required by ODKSensors framework(Plzz Find the attached doc)

4)I am connecting my device through USB port

5)I have attached my new Code and log file produced while running.

6)The code is working fine,but when i connect my USB device and click on
Add USB Device
the pages is changing,but nothing is happening.

plzz find the attached file.

plzz suggest me on the above problem
thnx in advance
Ripul Kumar

On Tue, Jul 9, 2013 at 3:19 AM, Rohit Chaudhri rohit.chaudhri@gmail.comwrote:

Hi Ripul,
Based on the error log it seems that you haven't installed the ODKSensors
framework on the Android device. Is that correct? Before running your
driver, please make sure that the framework is installed on the device. Its
this project on google code:

http://code.google.com/p/opendatakit/source/browse?repo=sensors

The driver code you have sent might not work with your barcode reader, it
looks similar to the ZebraMzSeriesPrinter driver on google code, which
works with Bluetooth-enabled MZ series printers from Zebra. In order to
develop a driver for the barcode reader you have, you'll need to know its
messaging protocol. Do you have that? Data returned from the barcode reader
will be provided by the framework to your driver in the getSensorData
method. Data that you need to send to the barcode reader will need to be
structured in a format that the reader understands. You will return this
structured data from the sendDataToSensor method of the driver.

The AndroidManifest.xml file in your driver project is missing the
metadata required by ODKSensors framework. Please look at the email i sent
out earlier to the mailing list & refer to the driver project i mention
there.

Finally, how are you connecting the barcode reader to Android? Are you
able to communicate with this reader from a computer? The product site says
it supports USB, RS232 interfaces. When you plug the reader to a computer
using USB, does a virtual serial port get created on the computer? If
that's the case, then you'll be able to communicate with the reader from
Android by specifying the "USB" channel in the driver's
AndroidManifest.xml. However, this will work only on Androids that have USB
Host capability & are running Android version 3.x or above.

rc

On Sat, Jul 6, 2013 at 11:19 AM, ripul kumar ripulku@gmail.com wrote:

Hello Rohit
thank you for replying for my last mail
as you told me for the error,m attaching the error log,which m getting
while running the code
m also attaching some more file
plzz find the attachment

Details of attachment
1)Error Log
2)code for bar-code driver and bar-code impl class
3)image of my bar-code reader with some details of the device

details for bar-code reader
Company Name:ARGOX
Model_NO:8250*10657647

thnx a lot for your cooperation
regards
Ripul Kumar

On Sat, Jul 6, 2013 at 10:07 AM, ripul kumar ripulku@gmail.com wrote:

---------- Forwarded message ----------
From: Rohit Chaudhri rohit.chaudhri@gmail.com
Date: Fri, Jul 5, 2013 at 12:59 PM
Subject: Re: SensorDriver
To: ripul kumar ripulku@gmail.com

Ripul,
The sensorID is provided by the physical sensor. For example, the
bluetooth MAC address is the sensorID for bluetooth sensors.

can you please tell me more about the error you are getting for #2? i
suspect that even though you are seeing an error related to the content
provider, it won't impact the ZephyrHeartRateSensor.

On Thu, Jul 4, 2013 at 11:54 PM, ripul kumar ripulku@gmail.com wrote:

Rohit we have discussed earlier and i need your help
i have 2 question to ask

1)How to get the* *sensorID of my device
i have to hard code this sensorID or the framework will find the
sensorID
*
*
*
*
2)
"content://org.opendatakit.sensorsV2.usbsensordataprovider/sensors"
from where i find this call
m asking this because m getting some error while running
ZephyrHeartRateSensor

i think m getting this error because of this class

plzz suggest me for the above questions
thnx
Ripul

Sorry Rohit
i forgot to tell you that ODK Sensor Framework is working fine for
Bluetooth devices
i.e
Add Bluetooth Device -> Scan Device -> Gives me the list of Bluetooth
devices

thnx
Ripul Kumar

··· On Tue, Jul 9, 2013 at 9:58 PM, ripul kumar wrote:

Hi Rohit
Thnx for replying for my last mail

1)I have successfully installed the ODKSensors framework on the Android
device(Tablet).

2)I don't have the messaging protocol for my device

3)Plzz see the The AndroidManifest.xml file in my driver project for
metadata required by ODKSensors framework(Plzz Find the attached doc)

4)I am connecting my device through USB port

5)I have attached my new Code and log file produced while running.

6)The code is working fine,but when i connect my USB device and click on
Add USB Device
the pages is changing,but nothing is happening.

plzz find the attached file.

plzz suggest me on the above problem
thnx in advance
Ripul Kumar

On Tue, Jul 9, 2013 at 3:19 AM, Rohit Chaudhri rohit.chaudhri@gmail.comwrote:

Hi Ripul,
Based on the error log it seems that you haven't installed the ODKSensors
framework on the Android device. Is that correct? Before running your
driver, please make sure that the framework is installed on the device. Its
this project on google code:

http://code.google.com/p/opendatakit/source/browse?repo=sensors

The driver code you have sent might not work with your barcode reader, it
looks similar to the ZebraMzSeriesPrinter driver on google code, which
works with Bluetooth-enabled MZ series printers from Zebra. In order to
develop a driver for the barcode reader you have, you'll need to know its
messaging protocol. Do you have that? Data returned from the barcode reader
will be provided by the framework to your driver in the getSensorData
method. Data that you need to send to the barcode reader will need to be
structured in a format that the reader understands. You will return this
structured data from the sendDataToSensor method of the driver.

The AndroidManifest.xml file in your driver project is missing the
metadata required by ODKSensors framework. Please look at the email i sent
out earlier to the mailing list & refer to the driver project i mention
there.

Finally, how are you connecting the barcode reader to Android? Are you
able to communicate with this reader from a computer? The product site says
it supports USB, RS232 interfaces. When you plug the reader to a computer
using USB, does a virtual serial port get created on the computer? If
that's the case, then you'll be able to communicate with the reader from
Android by specifying the "USB" channel in the driver's
AndroidManifest.xml. However, this will work only on Androids that have USB
Host capability & are running Android version 3.x or above.

rc

On Sat, Jul 6, 2013 at 11:19 AM, ripul kumar ripulku@gmail.com wrote:

Hello Rohit
thank you for replying for my last mail
as you told me for the error,m attaching the error log,which m getting
while running the code
m also attaching some more file
plzz find the attachment

Details of attachment
1)Error Log
2)code for bar-code driver and bar-code impl class
3)image of my bar-code reader with some details of the device

details for bar-code reader
Company Name:ARGOX
Model_NO:8250*10657647

thnx a lot for your cooperation
regards
Ripul Kumar

On Sat, Jul 6, 2013 at 10:07 AM, ripul kumar ripulku@gmail.com wrote:

---------- Forwarded message ----------
From: Rohit Chaudhri rohit.chaudhri@gmail.com
Date: Fri, Jul 5, 2013 at 12:59 PM
Subject: Re: SensorDriver
To: ripul kumar ripulku@gmail.com

Ripul,
The sensorID is provided by the physical sensor. For example, the
bluetooth MAC address is the sensorID for bluetooth sensors.

can you please tell me more about the error you are getting for #2? i
suspect that even though you are seeing an error related to the content
provider, it won't impact the ZephyrHeartRateSensor.

On Thu, Jul 4, 2013 at 11:54 PM, ripul kumar ripulku@gmail.com wrote:

Rohit we have discussed earlier and i need your help
i have 2 question to ask

1)How to get the* *sensorID of my device
i have to hard code this sensorID or the framework will find the
sensorID
*
*
*
*
2)
"content://org.opendatakit.sensorsV2.usbsensordataprovider/sensors"
from where i find this call
m asking this because m getting some error while running
ZephyrHeartRateSensor

i think m getting this error because of this class

plzz suggest me for the above questions
thnx
Ripul