Posts

Showing posts from November 27, 2018

Raspberry Pi, lost /dev/ttyUSB0 when plugged in second FTDI cable

Image
up vote 0 down vote favorite I had a RPi setup with 1 FTDI cable. I was able to use /dev/ttyUSB0 in code without issues When I plugged in a second FTDI cable, with the same vendor and product ID, /dev/ttyUSB1 never showed up, instead I lost /dev/ttyUSB0 lsusb shows that both devices are enumerated correctly. Now, even when I plug in just one FTDI cable, /dev/ttyUSB0 still does not show up! How can I get back the ttyUSB0 and ttyUSB1? Here is the output from dir /dev lsusb and dmesg Thanks, pi@raspberrypi:~ $ dir /dev autofs hwrng loop6 null ram2 serial1 tty13 tty23 tty33 tty43 tty53 tty63 vc-mem vcsa3 block initctl loop7 ptmx ram3 shm tty14 tty24 tty34 tty44 tty54 tty7 vcs vcsa4 bus input loop-control pts ram4 stderr tty15 tty25 tty35 tty45 tty55 tty8 vcs1 vcsa5 cachefiles kmsg mem ram0 ram5 stdin tty16 tty26 tty36 tty46 tty56 tty9 vcs2 vcsa6 char log memory_bandwidth ram1 ram6 stdout tty17 tty27 tty37 tty47 tty57 ttyAMA0 vcs3 vcsm console loop0 mmcblk0 ram10 ram7 tty

Incorrect results when using NSURL URLWITHSTRING: stringByAddingPercentEncodingWithAllowedCharacters?

Image
up vote -1 down vote favorite I'm updating an older iOS app (RSS reader) to replace use of the following deprecated code. stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding I've tried to use all of the variants of the recommended replacement (NSCHaracterSet) but none of the variants provide a usable result. Below the snippet of code below are the results I get when using each variant. Any suggestions on how to remove the "%20" characters added at the end of the URL string once encoded? All help is appreciated. (void)viewDidLoad [super viewDidLoad]; NSURL *myURL = [NSURL URLWithString: [self.url stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLFragmentAllowedCharacterSet]]]; NSURLRequest *request = [NSURLRequest requestWithURL:myURL]; [self.webView loadRequest:request]; NSLog(@"Link: %@", myURL); Link parsed from .xml input file: https://www.fis-ski.com/en/alpine-skiing/news-multimedia/videos/2018/11/behind-the-re