Does HID support two way data communication? - hid

I'm building a HID device. Does anyone know if the HID protocol supports two way communication -- can the host send commands to the device to, for example, turn on or off LEDs, power off, etc...?

Yes. E.g. it's possible to control a monitor (select its video input, select the color mode and so on) with hidmon.

Related

Extending Wifi/WLAN Range with one NIC on a Laptop

I plan to extend the range of my Wifi with my Notebook. - My question to this, is it possible to build a wireless repeater with only one NIC? or do I really need at least two NICs, one for being logged in and receiving the packets and the other for extending the WiFi/Signal. - Actually, what I wanna do is, using my laptop as a WiFi-Repeater, but only with the built-in NIC, no second one.
I've searched the net already but found nothing about the functionality of a WiFi-Repeater and if they have two NICs integrated.
Hope you guys can enlight me ;)
EDIT(added schemes):
Possibility A
Possibility B
What can be achieved with an AP capable Chip/Firmware, for instance, the Ath9k.
You can't turn laptop's WiFi into range extender, since I believe it requires a special WiFi chip firmware and a special configuration of antenna(s).
However, you might try to look on the internet if WiFi chip you have supports AP mode in firmware (not all manufacturers provides that), and if yes, you can set up the access point with the same SSID. In this case your WiFi clients will roam from one AP to another. Of course, this kind of setup requires Ethernet cable attached to your laptop.

How to send data to iPhone from external device

I have an external device that we manufacture that basically monitors 4 voltages, converts them to a 16 bit digital number then streams this info back to a PC every 100mS or so, using a serial over USB style chip. Basically a data logging system.
We would now like to collect this information on an iPhone and I am wondering what is the best way to get the data into the iPhone?
I am assuming there is no way we can physically connect directly to the iPhone dock connector as the protocol to do this is not available to iOS developers?
Obviously we could do it over a WiFi network but there will not always be one and we want to keep the external hardware fairly simple, i.e. no need for a computer or Wireless router etc.
If we add Bluetooth connectivity to our hardware would this work? I read that only 'Made for iPod' type Bluetooth devices will connect, in which case how can we achieve 'made for iPod' status? It would be relatively easy to add the necessary Bluetooth chips to get the system up and running.
In an ideal world we would like to do this without having to use a 3rd party interface.
I have been thinking about trying to digitise data as an audio signal – like a modem, and send it into the line input jack, but I don’t think it will be fast enough – this would be new territory for me.
Anyway all suggestions gratefully received!
Thanks!

Is it possible to make a (non jailbroken) iPhone emit i2c commands?

I want to control a string of LEDs directly from my iPhone. The LED controller chips talk the i2c serial protocol.
Can I do this with Apple-supported APIs on a non-jailbroken iPhone? Which frameworks do I need to use?
Yes, but you will need an external hardware to do that. iOS does not give you access directly to I2C in the docking connector.
KissBos has a OEM board to do that, with a special firmware. You can connect to their board via WiFi, using a TCP based protocol, or via a RTP-MIDI based protocol (RTP-MIDI is implemented in iOS, you don't have to deal with the protocol details, it's just a MIDI port for your application).
If you want to go through the dock connector, you will need their USB interface (it will transform the USB into RTP-MIDI, which goes in the OEM board)
I'm quite sure that you can't do that. Apple is very strict about what you are allowed to and not. I spent days trying to find a way to get access to the iphone's bluetooth layer and ended up with my head against the wall (only a limited game api is public, else you have to go with the Made For Iphone program). However, you are able to do some stuff using the usb cable, but I guess that the possibilities are limited with that too.

iPhone to RS-232 via Bluetooth

I'm looking to connect my iPhone to an RS-232 serial device via Bluetooth. Has anyone implemented this successfully and can offer advice on hardware to use? It's kind of tricky because of the need for the Apple Authentication Processor with the device. The best potential device I've found is this guy but it only comes in an embedded package, its serial port interface is just logic-level UART rather than line-level RS-232, and I can't find a supplier with it in stock.
Any thoughts would be appreciated.
I'm considering just using WiFi to serial instead, but please ignore that possibility for the purposes of this question.
most of the question was answered by yourself already.
Basically you have 5 (+2) choices.
Join the MFi program. This might be hard to impossible if you are not part of a at least mid-size company.
Buy the OEM Bluetooth Module. I'm not sure if this is even allowed by the apple policies.
Use WiFi. Keep in mind that you want to use a wifi chipset that can act as at least ad-hoc access point. Those chipsets are quite expensive, and you have to think of a way to join existing networks (customers don't want to leave their home network to use your product). This will add a lot of cost to the BOM of your device.
Jailbreak might be an option. I never tried to use accessories with a jailbreak, so I don't know if it's possible to use bluetooth without authentication.
Work with a company that is member of the MFi program.
(Maybe an option, and depending of the speed you want to have via RS232: Eventually you can convert the audio output of the head-phone jack to RS232 levels and vice versa)
(Not really an option: develop for Android and do whatever you want)
If you jailbreak your device, you can use BTstack.org (disclaimer: I'm the author of BTstack) to connect to a Bluetooth device that supports the Serial Port Profile. You can get Bluetooth Modules that implement SPP and provide UART level output. As David R. above points out, you then need a UART to RS232 converter, e.g. the MAX232.
Ok. Another option. There are one or two companies that sell RS232 cables for iOS, eg. Skywire here: http://www.southernstars.com/products/skywire/index.html
Then, you could uses a Bluetooth RS232 extender, which consists of a RS232-to-SPP and a SPP-to-RS232 pair. Ugly, but within Apple's rules.
Well. It seems like my answer could be something you didnt ask for.
But the guy you referred to is the answer. Buy his product and you are good to go, all you need is a MAX232 chip. Converts logic level UART to RS232.
the diffrence high + voltage low zero voltage is converted to high +~10volts low -~10volts.
I use the MAX232 chip with my microprocessor, that uses logic level USART to communicate over RS232.
There is a lot of tutorials out there explaining how to hook things up.
This product works: https://serialio.com/product/bluetooth-serial-adapter/bluesnap-smart-bluetooth-40-ble-rs232-adapter
The only downside is that the adapter requires power.
It should be possibly I would think to create something in the middle that accept the bluetooth commands and convert them to serial, similar to what this does with TCP connections: https://www.npmjs.com/package/stellar-socks

iPhone RS232 data transfer over WiFi/BT

I would like to write a simple app that displays weight values sent from a scale.
The scale sends data (with a defined protocol) through RS232 port: considering that I cannot connect the iPhone to the Serial port, I was thinking to use a RS232/WiFi adapter (or RS232/BT adapter).
The iPhone should act as a Master and the scale a Slave: the iPhone sends a command (a simple text string) to the scale and the scale answers with the weight value.
Is the WiFi/BT a possibile solution to exchange the serial data between the iPhone and the scale ?
If yes, how can I establish the connection with the scale and then exchange the data with it ?
I'm a newbie so I would need very basic information and possibly some links to tutorials or sample code to understand how to write this app.
Thanks.
Have you heard about using the audio jack as a receiver of data?
iPhone # 1200BAUD
With Wifi it's not possible cause iOS is not supporting peer-to-peer. Not sure you can do that with BT - you will have to do regular pairing and transmit over the available profiles.
It's not wireless but you can checkout http://www.redpark.com/c2db9.html.
The other option I would recommend is to add a ethernet serial server, then you can access the scale with the browser on your iPhone.