Message Boards Message Boards

How do you read/write a usb device with mathematica?

Posted 11 years ago
How do you read/write a usb device connected to a Raspberry Pi with mathematica? I can see the device (AD5933 eval board) that is connected to the hub that is attached to the rpi. ControllerInformation[] returns:
No Controller devices detected from the rpi.
So no USB devices are detected by Mathematica but lsusb returns
 Bus 001 Device 002: ID 0424:9514 Standard Microsystems Corp.
 Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
 Bus 001 Device 009: ID 0835:8502 Action Star Enterprise Co., Ltd
 Bus 001 Device 010: ID 0c45:760b Microdia
 Bus 001 Device 013: ID 0456:b203 Analog Devices, Inc.
 Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
 Bus 001 Device 004: ID 0835:8500 Action Star Enterprise Co., Ltd
 Bus 001 Device 005: ID 0835:8501 Action Star Enterprise Co., Ltd
 Bus 001 Device 006: ID 046d:c404 Logitech, Inc. TrackMan Wheel
Bus 001 Device 007: ID 0bda:8176 Realtek Semiconductor Corp. RTL8188CUS 802.11n WLAN Adapter
Bus 001 Device 008: ID 0835:8500 Action Star Enterprise Co., Ltd

FindDevices[] returns

 Get::noopen: Cannot open ANTConnector`.
 Needs::nocont: Context ANTConnector` was not created when Needs was evaluated.
 {DeviceObject[{"DefaultShellCommandDemo", 1}], DeviceObject[{
   "DelayedRandomSignalDemo", 1}], DeviceObject[{
   "GPIO", 1}], DeviceObject[{"RandomSignalDemo", 1}], DeviceObject[{
   "RaspberryPiWeatherStation", 1}], DeviceObject[{
   "RaspiCam", 1}], DeviceObject[{
   "ShellCommandDemo", 1}], DeviceObject[{
   "TinkerForgeWeatherStation", 1}]}

Devices[] returns the same list as FindDevices[] but without the error messages.  Is it possible to use something like this?
DeviceOpen["Serial",{"/dev/ttyUSB0","BaudRate"->9600}]
I don't see a /dev/tty?? for my USB device however. I see /dev/usb/hiddev0 but don't know how to access the individual device connected to the hub.
POSTED BY: Jay Morreale
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract