I'm trying to use a makey makey (a device based on the Arduino Leonardo) as a keyboard for an iPad. I know that it has already been done, but I'm not able to reproduce it. My guess is that some versions of the iPad don't recognize this device.
Since I can use a USB keyboard and I know that mice are not recognized, I'd like to program the makey makey in such a way that it is "recognized only as a keyboard" (the original device can be used as a mouse and as a keyboard). I'm very new to Arduino, could someone give me a hint please?
A colleague helped me for this issue and we were able to solve it. We just erased this line about CDC:
#define CDC_ENABLED
in the file "USBDesc.h" (in the folder available on github: "firmware/Arduino/hardware/MaKeyMaKey/cores"). After doing this, there is a problem when compiling the code on the device, because the Arduino is not recognized anymore. You can still add your code to the Arduino, but you have to reset the device just after compilation start.
Using the ProMicro 5v and a "Case Logic 2.0 USB Hub" and the Camera kit I was able to get the programed keyboard commands to be recognized by the iPad without modifying "USBDesc.h" file.
ProMicro has built in HID emulation support very similar to Arduino Leonardo. Besides the "USB IO Board: The connected device is not supported" error, the device is apparently unofficially supported. I believe this has something to do with the hub.
In my arduino code I am using the "Keyboard_ascii.h" library and am using Keyboard.print, and Keyboard.write commands to send the key commands / text to the iPad.
Related
I'd like to test apps on device in the same way like on simulator - app runs on real device but I see screen on mac and I can interact with it using mouse. Im just tired of putting phone to my hand all the time. Developing on windows phone allows it, so It would be nice to have it here. Thank you
John Holdsworth on Remote Xcode plugin:
“Remote is a plugin for Xcode that allows you to control an iPhone
from a window on your Mac during development.”
I just found this. You can control device via mac.
I downloaded the iOS SDK for the Linea Pro device from their website and have successfully implemented some of it in my App - but I noticed the device never seems to work while its connected to the Mac via the USB cable. I've verified this 100% because as soon as I disconnect the LineaPro sled from the USB cable and run their Apps, it finds the Scanner and works. Otherwise, nothing.
This of course makes debugging near impossible because if you're not connected to Xcode you obviously can't see any output the App may have in Xcode's Console. You can't NSLog anything to the console, you can't put Breakpoints, you can't step-through your code - you pretty much can't do any of the things you'd normally do when developing an App.
I've actually had to resort to creating UITextViews and outputting everything I can to them during runtime ( which of course clutters up the interface big time) but even with that, if the App crashes, you never get to see your TextViews: you're thrown out and back to the iOS home screen, staring at all your little icons.
I've got some other ideas regarding work-arounds - but that's just it: they're all work-arounds. Does anyone out there know if there's any way to use the Linea Pro while its still connected to Xcode?
I don't think this is possible. For some reason lightning devices and USB don't seem to work together well.
I would suggest a combination of https://github.com/fpillet/NSLogger for logging and https://github.com/Shopify/superdb for sending messages to your app. You won't get breakpoints but you will have a few more tools at your disposal.
If you are using a device running iOS11 and you are using XCode 9, you no longer need to connect via lightning cable to debug your runtime build. XCode 9 introduced wireless debugging via a network connection:
Wireless Device Pairing Apple Documentation
Facing the same problem. I've resorted to using UIAlertViews instead of UITextFields to log messages on screen, but still its a huge pain the the buttocks.
You can also fire up a local server and hit it via localhost:8001?logmessage=myLogMessageWhichCanBeVeryVeryLong
and just print these GET requests to the terminal. Not pretty at all but its a workaround that could be of use if you want to get real creative...
Usually if you have a bug or error in your code it's going to be YOUR code, not the actual scanner or scanner input. So what I do while the app is in testing mode, is to have a button or other UIcontrol wired up to run an action AS IF there was scanner input, and I'll provide a mock string of input in a string (different inputs by incrementing a counter if needed). That way I can test away in the debugger for as long as necessary. Once my code works for me & I'm satisfied, I paste the same code into the scanner function and make the switch to the actual scanner. A little pain but not a big deal.
We are users of POS printer Bixolon SPP-R200II which we use for realisation of one of our projects. In the specification of this model it is listed that printer supports printing on iOS devices (iPhone & iPad) but until now we have not succeeded to achieve that. We switch the printer onto iOS mode with a required combination we fonud in official documentation and we got confirmation message. Then we connected to the printer from bluetooth interface inside iPhone Settings app.
After that we tryed to print on this device in various ways - using official test app from AppStore (https://itunes.apple.com/us/app/bixolon-printer-utility/id647125968?mt=8) and using official Bixolon SDK (http://www.bixolon.com/upload/download/software_all_bixolon_printer_sdk_for_ios_v3.1.8.zip) but unfortunately we havent managed to get any result. In this sample apps printer was not even listed as a possible connection point.
Can you direct us in any way to get the printing on iOS devices working? Thank you!
To connect to the SPP-R200II you need to enable MFi Mode for the printer.
Turn on printer
Open the cover and press the power button and paper feed button at the same time for 2 seconds
Close the cover when the buzzer sounds
The printer should now print "iOS mode enable!!" [sic]. If not, you just turned off MFi mode and need to repeat the steps to turn it on again.
Unfortunately the sample application distributed with the Bixolon SDK 3.1.8 is broken and when you press "Lookup/Targeting" nothing will happen. To fix it add this line to didFindPrinter in ViewController.h:
_uiTextFieldAddress.text = [NSString stringWithFormat:#"BT_%#", printer.macAddress];
It should now be possible to connect the printer simply by pressing "Lookup/Targeting" and then "Connect" when you se the Bluetooth address in the text field.
We had the same problem and after contacting technical support, concluded that the model we have is not compatible with iOS, the part number must be 3 letters i, for example SPP-R200IIIK/USA. After making the switch equipment provider, everything works perfectly.
Is the printer paired with the device in settings? It must be paired before the application can interact with it.
I'm developing a mobile app using Flash Builder 4.6/AIR. I've been able to debug on the device (an iPhone 4s) just fine until now. I connect my iPhone to my mac with the USB corad, and debug.
All of a sudden I'm getting a black screen for close to a minute. Then I see the "Enter ip address or hostname" dialog. If I enter the ip address of my machine it doesn't matter. The window goes away for about 15 seconds, then comes back. Meanwhile, Flash Builder on my mac times out. The only way I can actually see the program running is if I hit 'Cancel' on that dialog. The app then launches, but I cannot set any breakpoints, cannot debug.
Everything I've found on the internet around this issue mentions it in reference to AIR for android -- not iOs. But I'm seeing it with iOs.
Anyone know what's going on here?
Thanks.
To make it easier for future readers, the official answer to this issue;
With the current (official) version of the AIR SKD (3.2) USB debugging is not supported on iOS devices. This is going to change with the future 3.3 release which (amongst others) adds USB debugging support:
"USB debugging for AIR iOS
This new feature allows the iOS developer to connect to the desktop via USB while debugging their mobile applications instead of relying on network connectivity."
With version 3.2, iOS debugging works over the local network, so both devices (the machine the debugger runs on and the iOS device) have to be in the same network so that they can communicate with each other.
See also the reply to What is the address of my Flash debugger?, it really helped me to resolve similar issue. Using 'ios-debug' mode was the way to go.
If you still have this problem using Android with the device connected to same wifi, try checking firewall rules. In my case FlashDevelop was blocked and I didn't suspected because of updates worked perfectly.
Does anyone have example with iOS/Objective C, on how to send midi "note on/note off" signal (with different velocity) over wifi so that iPad would display in "Mac OS X->Audio Midi Setup->Network. then I click connect device" and by simple touching on the button on iPad code will send midi command. I believe I need to use some protocol,but I'm newbie on this, please help me.
Thanks.
You have to use the coremidi framework (provided by the IOS). See here for a introduction: http://www.synthtopia.com/content/2011/06/02/coremidi-brain-dump/
If you are still looking I wrote sample code that is on GITHUB that wirelessly sends/receives MIDI notes ON/OFF messages from iPhone/iPad to Windows PC, Apple Mac or any other device listening. Full instruction on GITHUB.
see: https://github.com/JohnGoodstadt/MidiNotes